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 27822 - Display correct nodes for closed projects
Summary: Display correct nodes for closed projects
Status: CLOSED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Vitezslav Stejskal
URL:
Keywords: API
Depends on:
Blocks:
 
Reported: 2002-10-04 14:52 UTC by Milan Kubec
Modified: 2004-04-19 16:37 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
exc stack trace (4.17 KB, text/plain)
2002-10-04 14:54 UTC, Milan Kubec
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Kubec 2002-10-04 14:52:49 UTC
ClassCastException is thrown when I expand project
file node in Filesystems tab of Explorer. Only
projects which were opened when IDE started had a
handle to expand them and also only these projects
had small J on its icon, although all other my
projects were java projects.
Comment 1 Milan Kubec 2002-10-04 14:54:45 UTC
Created attachment 7604 [details]
exc stack trace
Comment 2 Milan Kubec 2002-10-04 15:03:14 UTC
java.lang.ClassCastException
org.netbeans.modules.projects.ui.looks.SourcesLook$NS.<init>(SourcesLook.java:253)
org.netbeans.modules.projects.ui.looks.SourcesLook.attachTo(SourcesLook.java:226)
org.netbeans.spi.looks.ProxyLook$ProxySubstitute.looks(ProxyLook.java:1082)
org.netbeans.spi.looks.ProxyLook$ProxySubstitute.access$000(ProxyLook.java:986)
...
Comment 3 Milan Kubec 2002-10-09 11:20:46 UTC
Subcomponent changed to looks
Comment 4 Vitezslav Stejskal 2002-11-28 13:31:31 UTC
The CCE shouldn't occure anymore (at least I can't reproduce it now
and the code has been rewritten so it's hard to track what happend).
However the second part of this report complaining about wrong icon
displayed for closed projects node is still valid. The node for closed
project should have the same icon as it has when project is open, it
shouldn't ahve any children and it also should have different actions
in popup menu (e.g. open vs. close action).
Comment 5 Pavel Buzek 2003-06-27 12:50:05 UTC
It seems that opening and parsing the project, creating PFS and
scanning it for the looks just for the purpose of displaying the icon
is an overkill. I suggest to define some simple tag in project file
for this, e.g. as an attribute in ProjectDescriptor folder (next to
the projectId, in future I can envision that somebody may want to add
a user description of project -- a short text, etc.)

This means a tiny b/w compatible extension of PFS and a note in
documentation (I'm adding API keyword).
Comment 6 Vitezslav Stejskal 2003-06-27 16:05:31 UTC
Yes, parsing the whole project file is overkil (e.g. by using
XMLFileSystem), but perhaps some clever, simple, not validating
SAXParser which would read data only from the <folder
name="projectDescriptor"/> could be sufficiently fast.

Anyway, the icon shouldn't be persisted in project file as it is not
the user data. Moreover I am unclear even on how to persist the icon?
Ideas?
Comment 7 Pavel Buzek 2003-06-30 09:29:53 UTC
huh, I did not mean to store the icon itself in project file. I mean
that even if you read the project descriptor and you find the list of
natures you then need to ask if they provide a look for the project
node only to take the icon. I was proposing to create a simple tag
that would identify something like "type" of project. There would be
only one instance of it  (unlike natures) and it would be easy to
locate in project file. So a web project would be simply a web
project, not java project -- although it has both natures in it. Each
project type would have an icon associated with it (stored in IDE).
Comment 8 Vitezslav Stejskal 2003-06-30 11:20:24 UTC
OK, let's see how fast/slow will be looking at the natures and asking
looks for the ikon. If it will be slow we can try to create some
special tag as you proposed.
Comment 9 Vitezslav Stejskal 2003-11-26 12:52:46 UTC
As described in
http://www.netbeans.org/servlets/ReadMsg?msgId=619519&listName=nbdiscuss the
current work on projects prototype has been stopped.
Comment 10 Vitezslav Stejskal 2003-11-26 14:57:08 UTC
--> VERIFIED