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 35419 - No way to justify cancellation of a ProjectMember operation
Summary: No way to justify cancellation of a ProjectMember operation
Status: CLOSED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: Vitezslav Stejskal
URL:
Keywords: API
Depends on:
Blocks:
 
Reported: 2003-08-13 17:49 UTC by Jan Pokorsky
Modified: 2004-04-19 16:19 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Pokorsky 2003-08-13 17:49:43 UTC
Usecase:
Suppose you implement the MoveOperation interface
for java files. Before the move is done the
operation can be canceled in two points canMove()
and beforeMove(). Both can return false. A reason
can be that eg a filename is not valid classname.
In that case a client calling ProjectMember.move
has no notion about the reason of the
cancellation. How do they ever detect that
something is wrong and what is the reason?

Current situation:
If the PM finds out an operation cannot be
executed (eg canMove == false) it throws an
IOException("Operation is not permitted").

Proposal:
There should be some way in the api/spi to let the
client know why the operation is not permitted. It
is insufficient to return just true or false.
Otherwise all tests before operations would have
to perform each client by oneself thus tests in
operation handlers would have no sense.
Comment 1 Vitezslav Stejskal 2003-08-14 08:26:56 UTC
Yes, I've already thought that we need something like this. It would
probably be possible to set the explanation (String) into the
OperationParams class and retrieve it somehow from the ProjectMember.
Comment 2 Vitezslav Stejskal 2003-11-26 12:52:52 UTC
As described in
http://www.netbeans.org/servlets/ReadMsg?msgId=619519&listName=nbdiscuss the
current work on projects prototype has been stopped.
Comment 3 Vitezslav Stejskal 2003-11-26 14:57:27 UTC
--> VERIFIED