Eclipse is not that good with static imports but it is possible to make the content assist suggest and automatically add static imports. Go to Preferences -> Java -> Editor -> Content Assist -> Favorites and add the types
javax.swing.GroupLayout.*
, javax.swing.GroupLayout.Alignment.*
and javax.swing.LayoutStyle.ComponentPlacement.*
:![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnS8Rx9uDTurGoCpok2AQ1ta5NtA6hqShcS2AMTZKyeUIf263GVyB4Qpx0Wq29UrLC6P0fYUtYaByctSZrZQa9w9Q89VzAJ5LaKNU5hZADVxQVdofyZzoilnb8-1LyzRZpQKDU7BqUDL7s/s400/static-import.png)
It is now possible to use the Content Assist (Ctrl + Space) to get help when writing the GroupLayout properties:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHwp2rTefeVbwMS-Uw8EdXK55EO5-IuIm7Cko3UMFToevTUxFsU4NyO1HK0IfVv3APqxzTtb-YG-hLNQloDxz-738NuaE-M2Lpq9ttj9M-BaJJEQ3aJ8VN2YjsUhV0jLFWil9reMBnI455/s400/static-import_content_assist.png)
No comments:
Post a Comment