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.

Bug 35438 - Icon for my Look not being used
Summary: Icon for my Look not being used
Status: CLOSED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 3.x
Hardware: Sun SunOS
: P3 blocker (vote)
Assignee: Vitezslav Stejskal
URL:
Keywords:
Depends on: 35461
Blocks:
  Show dependency tree
 
Reported: 2003-08-14 22:50 UTC by Unknown
Modified: 2004-04-19 16:38 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Unknown 2003-08-14 22:50:47 UTC
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.
Comment 1 Vitezslav Stejskal 2003-08-15 10:19:07 UTC
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"/>
Comment 2 Unknown 2003-08-15 15:24:02 UTC
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. 
Comment 3 Vitezslav Stejskal 2003-08-18 09:40:29 UTC
Oops, your registration seems correct. Unfortunately the problem is in
Registry API which ignores the ordering attributes, see issue #35461.
Comment 4 Vitezslav Stejskal 2003-08-18 17:49:00 UTC
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)
Comment 5 Vitezslav Stejskal 2003-08-18 18:58:17 UTC
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).
Comment 6 Jan Becicka 2003-08-29 10:57:49 UTC
Joe, can you verify it? Thanks
Comment 7 Unknown 2003-08-29 16:46:46 UTC
This is now working as I had expected. Thanks for
the quick fix.
Comment 8 Jan Becicka 2003-11-25 14:20:44 UTC
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.