Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Extending DeleteResourceAction
Extending DeleteResourceAction [message #331859] Thu, 25 September 2008 13:58 Go to next message
Eclipse UserFriend
Originally posted by: andreas-scharf.gmx.de

Hi,

I have view using the CNF which currently does almost the same as the
Resource Explorer. In my special application I have dependent resources
and if the user deletes resource A the dependent resource B (which is a
file which only contains UI information) also should be deleted. I
thought of using my own MyDeleteResourceAction in which I execute 2
DeleteResourceActions (one to actually delete the resource the user
selected and one to delete the dependent UI information resource).

Is that approach applicable or is there another (better) way to do this?

Greetings,
Andreas
Re: Extending DeleteResourceAction [message #331869 is a reply to message #331859] Thu, 25 September 2008 18:35 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Check out adding an LTK delete participant, which in 3.4 the Package
Explorer, Project Explorer and Resource navigator will honour.

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


Re: Extending DeleteResourceAction [message #331878 is a reply to message #331869] Fri, 26 September 2008 09:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: andreas-scharf.gmx.de

Paul,

thanks for pointing me to the ltk (never heard about that before). I'll
check this out.

Andreas

Paul Webster schrieb:
> Check out adding an LTK delete participant, which in 3.4 the Package
> Explorer, Project Explorer and Resource navigator will honour.
>
> PW
>
>
Re: Extending DeleteResourceAction [message #331900 is a reply to message #331878] Sat, 27 September 2008 10:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: andreas-scharf.gmx.de

Paul,

I implemented extending the DeleteResourceAction using the ltk stuff.
But I've got some question about the correct implementation of a
participant. One of my participants also deletes a corresponding file
which contains UI related information about the file the user wants to
delete. Now what happens is, when the user e.g. selects A.file AND
A.fileUI my participant should not add a Change. I've implemented it
checking in the createChange() method if getProcessor().getElements()
already contains the element my participant wants to delete. Now the
question is if this is the right place to do it. Or is there another
mechanism to not add a second change to delete the resource?

Andreas

Andreas Scharf schrieb:
> Paul,
>
> thanks for pointing me to the ltk (never heard about that before). I'll
> check this out.
>
> Andreas
>
> Paul Webster schrieb:
>> Check out adding an LTK delete participant, which in 3.4 the Package
>> Explorer, Project Explorer and Resource navigator will honour.
>>
>> PW
>>
>>
Re: Extending DeleteResourceAction [message #332002 is a reply to message #331900] Wed, 01 October 2008 13:14 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Andreas Scharf wrote:
> Paul,
>
> I implemented extending the DeleteResourceAction using the ltk stuff.
> But I've got some question about the correct implementation of a
> participant. One of my participants also deletes a corresponding file
> which contains UI related information about the file the user wants to
> delete. Now what happens is, when the user e.g. selects A.file AND
> A.fileUI my participant should not add a Change. I've implemented it
> checking in the createChange() method if getProcessor().getElements()
> already contains the element my participant wants to delete. Now the
> question is if this is the right place to do it. Or is there another
> mechanism to not add a second change to delete the resource?

Unfortunately my knowledge of LTK is limited. Hopefully someone else
can answer ... you could also ask your LTK question on eclipse.tools.jdt

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:How to disable Welcome view when running/debugging eclipse plug-in
Next Topic:unable to uninstall plugin with p2
Goto Forum:
  


Current Time: Fri Jul 12 09:05:21 GMT 2024

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

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

Back to the top