Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: Re: [eclipse-dev] trap the delete action of the contextmenu in the resourceNavigator

The text editors do this by listening for resource changed events in the 
editor itself.   If the editor detects that its input has been deleted, it 
closes itself (it's not driven by the view).
In org.eclipse.ui.editors.text, see how 
FileDocumentProvider.FileSynchronizer listens for resource deltas and 
sends out its own delete notification, and how this is handled in 
AbstractTextEditor.ElementStateListener.elementDeleted.

Hope this helps.  In future, please post questions like this in the 
eclipse.platform newsgroup, not the *-dev mailing lists.

Nick






bildikar@xxxxxxxx
Sent by: eclipse-dev-admin@xxxxxxxxxxx
09/24/2003 12:46 AM
Please respond to eclipse-dev
 
        To:     Nick Edgar/Ottawa/IBM@IBMCA
        cc:     eclipse-dev@xxxxxxxxxxx
        Subject:        RE: Re: [eclipse-dev] trap the delete action of 
the contextmenu    in the resourceNavigator


Hi,
Nick,
what we are trying to do is on deletion of a file/folder if the file is 
open in the editor we wnat to close it. i know this funtionality is 
provided in eclipse, but in my case, i have created my own 
Rsourcenavigator,and editor. and i am setting the mainActionGroup in the 
context menu, do i need to add some code to the editor/navigator by which 
the default funtionality of eclipse is restored,i have created the editor 
by extending the IEditorPart, and the ResourceNavigator which extends 
ViewPart and implements ISetSelectionTarget, IResourceNavigator, i have 
also set the linking enabled to true.
kindly guide me on this issue,
thanks in advance,
Abhijit

Nick_Edgar@xxxxxxxxxx wrote
You can, however, get notified about folder deletions if that's all you 
want.  The resource delta is a tree structure and contains all changes 
from the projects on down.





John Arthorne/Ottawa/IBM@IBMCA
Sent by: eclipse-dev-admin@xxxxxxxxxxx
09/23/2003 09:38 AM
Please respond to eclipse-dev
 
        To:     eclipse-dev@xxxxxxxxxxx
        cc: 
        Subject:        Re: [eclipse-dev] trap the delete action of the 
contextmenu in the resourceNavigator



This isn't currently possible, but one of the plan items for release 3.0 
is to allow for plug-in participation in these kinds of operations.  Note 
that this won't allow you to re-implement a deletion, but merely to 
participate in the deletion operation, allowing you to clean up other 
references, etc.  Here is the link to the proposal: 

http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-ui-home/r3_0/proposals/refactoring/participants.html 



And here is the plan item bug report where you can add your comments: 

https://bugs.eclipse.org/bugs/show_bug.cgi?id=36943 
-- 




bildikar@xxxxxxxx 
Sent by: eclipse-dev-admin@xxxxxxxxxxx 
09/23/2003 06:07 AM 
Please respond to eclipse-dev 
 
        To:        eclipse-dev@xxxxxxxxxxx 
        cc: 
        Subject:        [eclipse-dev] trap the delete action of the 
contextmenu in the resourceNavigator



Hello,
friends,
I want trap the delete action from the contextMenu of the 
resourcenavigator, i am not deleting the entire project but only some 
files, so the resourceChanged listener is just returning the resource 
changed code, i have also refered to the article given in the forum 
resource-deltas.html but it says this for the delete option "There is no 
resource delta for these event types." now how do i trap the delete action 

on a file from the contextMenu for that case even the deletion of the 
folder.
kindly help me out,
thanks in advance
Abhijit 
_______________________________________________
eclipse-dev mailing list
eclipse-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/eclipse-dev


_______________________________________________
eclipse-dev mailing list
eclipse-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/eclipse-dev

_______________________________________________
eclipse-dev mailing list
eclipse-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/eclipse-dev




Back to the top