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 34191 - ContentDescriptor.getVisualObject() is pretty ugly
Summary: ContentDescriptor.getVisualObject() is pretty ugly
Status: CLOSED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@projects
URL:
Keywords: API
Depends on:
Blocks:
 
Reported: 2003-06-05 08:46 UTC by Jaroslav Tulach
Modified: 2003-12-11 14:25 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 Jaroslav Tulach 2003-06-05 08:46:43 UTC
I do not like and do not see reasons for method
ContentDescriptor.getVisualObject (). Either get
rid of it or document for what it is useful for.

I believe that a suitable replacement for this
method is Looks.node (contentDescriptor) that can
provide enough info about visual representation.
The only missing feature is "hiding" which is in
my guess done by returning null. If this is true
it might be better to replace it by a constructor
param "boolean hidden" that would be honored by
the look that has ContentDescriptors as children
which I believe is provided projects
infrastructure anyway.
Comment 1 Vitezslav Stejskal 2003-06-05 10:13:15 UTC
I think you are right. I'll look what it would cause to remove it.
Comment 2 Vitezslav Stejskal 2003-06-12 15:47:06 UTC
I think I can remove CD.getVO and register look for CD class which
will delegate to the look registered for CD.getProjectMember(). 

The visibility can be controlled using ProjectMemberVisualDescriptor
for CD.getPM(), but I think this will be more complicated, because the
visibility is not the property of the object itself, but the object
and container showing this object.
Comment 3 Vitezslav Stejskal 2003-08-06 09:11:28 UTC
UPGRADE GUIDE: Either register the Look for your subclass of
ContentDescriptor or register it for the MIME-type of ProjectMember
which implements your container (lies in /Containers folder). When
displaying node for any ContentDescriptor the system forwards to the
ProjectMember look unless there is special Look written and registered
for the particular subclass of ContentDescriptor.

Comment 4 Vitezslav Stejskal 2003-08-11 12:16:09 UTC
Done.

Checking in src/org/netbeans/api/projects/ContentDescriptor.java;
/cvs/projects/core/src/org/netbeans/api/projects/Attic/ContentDescriptor.java,v
 <--  ContentDescriptor.java
new revision: 1.1.2.10; previous revision: 1.1.2.9
Comment 5 Jan Becicka 2003-11-25 14:04:22 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 VERIFIED --->
Comment 6 Jan Becicka 2003-11-25 14:13:31 UTC
---> CLOSED