Search |
||
NetBeans Plugin Dev : Listing all packages from default main projectPosted by edgars on January 17, 2007 at 5:25 AM PST
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.
»
Related Topics >>
Netbeans Comments
Comments are listed in date ascending order (oldest first)
|
||
|