Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Override or extend default resource delete action
Override or extend default resource delete action [message #331821] Tue, 23 September 2008 21:05 Go to next message
David Johnson is currently offline David JohnsonFriend
Messages: 10
Registered: July 2009
Junior Member
Is there a way to override or extend the default action for deleting a
resource from the Project Explorer?

Basically I want to be able to attempt to delete a file, and in addition
to the confirmation message 'Are you sure you want to delete xxxx?', I
want it to fire up an additional dialog warning the user in the case of
the file being referenced in a GMF diagram - something like 'File xxxx is
referenced in file yyyy. Are you sure you want to delete xxxx?'.

I've tried looking at seeing if this can be done via a resource listener,
but the event reported by IResourceDelta.REMOVED it seems is already too
late, and I don't see a way of intercepting the delete action before the
delete happens.

Any help will be greatly appreciated.

Best regards,
-David
Re: Override or extend default resource delete action [message #331866 is a reply to message #331821] Thu, 25 September 2008 18:25 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

On top of the delete resource event itself, in 3.4 even the IDE delete
action invokes the LTK refactoring support. deleteParticipants can be
added.

See LTK in the Platform Plug-in Developers Guide, for example
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/reference/extension-points/org_eclipse_lt k_core_refactoring_deleteParticipants.html


PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Previous Topic:Refreshing External Folders in Ganymede
Next Topic:Adding a view into a perspective without opening the perspective.
Goto Forum:
  


Current Time: Thu Nov 07 13:16:23 GMT 2024

Powered by FUDForum. Page generated in 0.03036 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top