Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 13530 - [resources] Need to override refactor actions (copy, move, rename and delete) in Navigator
Summary: [resources] Need to override refactor actions (copy, move, rename and delete)...
Status: RESOLVED DUPLICATE of bug 36943
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 37444 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-04-11 11:29 EDT by Duong Nguyen CLA
Modified: 2003-07-31 12:31 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Duong Nguyen CLA 2002-04-11 11:29:41 EDT
Team 2.0 provided a mechanism to allow our plugins to handle the delete and 
rename action.

We need a similar mechanism for the refactor actions (copy, move, rename and
delete) in the navigator for certain file types. The file types that are
handled by our plugin require some special functionality when dealing with
refactor actions. Currently, I am unable to override these actions. I am
able to provide separate navigator view actions (using the extension
org.eclipse.ui.popupMenus) but unable to override the default actions. Our
IViewActionDelegates respond to selection changes in the navigator and
enable or disable appropriately.
Comment 1 Nick Edgar CLA 2002-04-11 11:43:52 EDT
The changes for hooking move/rename/delete were essentially to support VCM 
providers, and was a change made only at the workspce level (in 
org.eclipse.core.resources).

What you are asking for here does not fit into the mandate of that proposal.

Is this support for VCM?  Or is it some other use case where you are writing 
your own navigator-like view by extending the ResourceNavigator, and you simply 
need to handle these actions differently?

If the latter, note that there has been some refactoring here recently which 
may make it easier.  It would help to know more details about what you're 
trying to do.

Comment 2 Duong Nguyen CLA 2002-04-11 14:26:28 EDT
Use Case:
The following use case applies irrespective of whether project resources are 
under version control (team provider)or not.

Our plugin has files that contain information about other supporting files. 
These supporting files exist only when the main file exists. When the
main file is deleted the supporting files should also be deleted. The same 
scenario applies to copying, moving and renaming the main file.

Currently Eclipse does not provide a PRE-DELETE event for deleted resources. We 
receive only a post change event. If the main file has been deleted then
all information w.r.t the supporting files is lost.

Possible Solutions:
1) Eclipse should notify all the resource change listeners by firing off PRE- 
events for all refactor operations (Copy, move, rename and delete) for the 
affected resources.
2) If the above is not possible then Eclipse should provide a mechanism to 
override the copy, move rename and delete actions in the navigator.

Comment 3 Nick Edgar CLA 2002-04-11 15:22:45 EDT
Moving to Core for consideration of solution 1.
Comment 4 John Arthorne CLA 2003-07-31 12:30:18 EDT
*** Bug 37444 has been marked as a duplicate of this bug. ***
Comment 5 John Arthorne CLA 2003-07-31 12:31:30 EDT

*** This bug has been marked as a duplicate of 36943 ***