|
|
||
Edgar Silva's Blog
«NetBeans's JSF Palette Part II |
Main
| Using the Java Source Editor and Syntax highlight in any JEditorPane »
NetBeans Plugin Dev : Listing all packages from default main projectPosted by edgars on January 17, 2007 at 05:25 AM | Comments (0)Hi everybody, after some free time this week, I am almost finishing the new JSF Palette for NetBeans. In the following image you can see its actual state:
protected void initializeComboPackages() {
Project p = OpenProjects.getDefault().getMainProject();
Sources src = (Sources) p.getLookup().lookup(Sources.class);
if (src!=null) {
SourceGroup[] groups = src.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA);
if (groups.length>0) {
SourceGroup group = groups[0];
packages.setModel(PackageView.createListView(group));
packages.setRenderer(PackageView.listRenderer());
}
}
}
In the code "packages" is a JComboBox.
If you want create some plugin using similar feature, now you have this described here.
Bookmark blog post: CommentsComments are listed in date ascending order (oldest first) | Post Comment | ||
|
|