This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I defined a Project nature and associated Look for it. In my code, I return a valid Icon for getIcon and getOpenedIcon. They are never used. It appears that an icon from another Look is taking priority. I'm not sure how the icon is determined, but in my .project file, I see: <folder name="ProjectDescriptor"> <folder name="Natures"> <file name="org-netbeans-modules-projects-generic"/> <file name="org-netbeans-modules-projects-codegeneric"/> <file name="org-netbeans-modules-compilation"/> <file name="org-netbeans-modules-j2ee-deployment"/> <file name="org-netbeans-modules-java-project"/> <file name="com-sun-tools-j2ee-ejb-project"/> </folder> My nature is the last one in the list.
How do you register your look? If its in Looks/ProjectType folder you should define ordering attributes on this folder properly (to place you look before all others registered there by natures your nature depends on). The attr should be something like: <attr name="org-yourLook.instance/org-javaLook.instance" boolvalue="true"/>
This is how I define my natures: <folder name="ProjectDescriptor"> <!-- Natures that the ejb project extends --> <folder name="Natures"> <file name="org-netbeans-modules-java-project"/> <file name="org-netbeans-modules-j2ee-deployment"/> <file name="com-sun-forte4j-webdesigner-wsj2ee-wsDD"/> </folder> </folder> <!-- end of natures that the ejb project extends --> This is how I define the Look: <folder name="Looks"> <folder name="ProjectType"> <attr name="s1s-ejb-EJBModuleProject.instance/nb-java-JavaProject.insta nce" boolvalue="true"/> <file name="s1s-ejb-EJBModuleProject.instance"> <attr name="instanceOf" stringvalue="org.netbeans.api.looks.Look"/> <attr name="instanceClass" stringvalue="com.sun.tools.j2ee.ejb.project.ui.EJBProjectLook"/ > <attr name="instanceCreate" newvalue="com.sun.tools.j2ee.ejb.project.ui.EJBProjectLook"/> </file> </folder> The other 2 natures I extend do not supply a Look and it seems like I have the ordering correct.
Oops, your registration seems correct. Unfortunately the problem is in Registry API which ignores the ordering attributes, see issue #35461.
Should work now, could you check it please. --------------------------------------------------- Checking in core/src/org/netbeans/api/projects/ProvidersNamespace.java; /cvs/projects/core/src/org/netbeans/api/projects/Attic/ProvidersNamespace.java,v <-- ProvidersNamespace.java new revision: 1.1.2.5; previous revision: 1.1.2.4 done Processing log script arguments... More commits to come... Checking in ide/src/org/netbeans/modules/projects/ide/profiles/ProfileEnvironmentProvider.java; /cvs/projects/ide/src/org/netbeans/modules/projects/ide/profiles/Attic/ProfileEnvironmentProvider.java,v <-- ProfileEnvironmentProvider.java new revision: 1.1.2.4; previous revision: 1.1.2.3 done Processing log script arguments... More commits to come... Checking in ide/src/org/netbeans/modules/projects/ide/ui/looks/CompositeSelector.java; /cvs/projects/ide/src/org/netbeans/modules/projects/ide/ui/looks/Attic/CompositeSelector.java,v <-- CompositeSelector.java new revision: 1.1.2.6; previous revision: 1.1.2.5 done Processing log script arguments... Mailing the commit message to cvs@projects.netbeans.org (from vstejskal@netbeans.org)
Oops, sorry, I had to re-apply our patch for latest version of ContextImpl class. Please update again projects modules and rebuild. Ordering seems to work now (at least the web project's icon is correct).
Joe, can you verify it? Thanks
This is now working as I had expected. Thanks for the quick fix.
As described in http://www.netbeans.org/servlets/ReadMsg?msgId=619519&listName=nbdiscuss the current work on projects prototype has been stopped. Marking issue as CLOSED.