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 29380 - [api] ProjectsEvent.getDescriptor redundancy
Summary: [api] ProjectsEvent.getDescriptor redundancy
Status: CLOSED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 3.x
Hardware: All All
: P1 blocker (vote)
Assignee: Vitezslav Stejskal
URL:
Keywords: API
Depends on:
Blocks:
 
Reported: 2002-12-06 18:58 UTC by Jan Pokorsky
Modified: 2003-12-11 14:25 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
commitlog of the change (1.12 KB, text/plain)
2003-01-17 18:52 UTC, Vitezslav Stejskal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Pokorsky 2002-12-06 18:58:24 UTC
What is the reason for the method
ProjectsEvent.getDescriptor? You can obtain the
descriptor via
ProjectsEvent.getProject().getDescriptor() easily.
Javadoc is silent about some special purpose. Thanks
Comment 1 Vitezslav Stejskal 2002-12-09 10:01:18 UTC
The Project.getDescritpor() did not exist at the time when
ProjectsEvent class was introduced. Anyway, the idea is that when you
receive projectClosed event the project you can get from
ProjectsEvent.getProject() is already closed and you should not call
any method on it. That's why PE.getDescriptor might be useful.

U would rather have this method since I think it's better to say
'don't call anythink on closed projects' than to explain which methods
can be called and which can't.

I will update the javadoc.
Comment 2 Jan Pokorsky 2002-12-10 01:16:56 UTC
Hmm, I think you will have to explain behavior of a closed  Project
object at any rate. Probably Project.isClosed() would be helpful. I am
still not convinced about necessity of ProjectsEvent.getDescriptor.
Comment 3 Vitezslav Stejskal 2002-12-22 01:15:54 UTC
OK, you aren't convinced and I am. Who will decide this dilema? Well,
I try. Although I think that having PE.getDescriptor will hurt nothing
even if it would be redundant API there is no reason to make the risk.
We can easily add this method in the future since adding is compatible
change. So, I will remove this method and we will see.
Comment 4 Vitezslav Stejskal 2003-01-15 16:14:33 UTC
UPGRADE GUIDE: Use Project.getDescriptor().getName() instead.
Comment 5 Vitezslav Stejskal 2003-01-17 18:52:14 UTC
Done.
Comment 6 Vitezslav Stejskal 2003-01-17 18:52:37 UTC
Created attachment 8615 [details]
commitlog of the change
Comment 7 Jan Pokorsky 2003-07-15 14:49:16 UTC
verified
Comment 8 Jan Becicka 2003-11-25 14:20:51 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.