Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Registring a new Action outside the ApplicationActionBarAdvisor
Registring a new Action outside the ApplicationActionBarAdvisor [message #497099] Thu, 12 November 2009 09:10 Go to next message
exquisitus is currently offline exquisitus
Messages: 211
Registered: July 2009
Senior Member
Hi,
I have to create Action dynamically while my RCP App is running.
In these Actions I need to know the path of the file associated with the
currently active Editor.

I thought I can let the Actions implement IWorkbenchWindowActionDelegate
and react on the SelectionChanged-Method to find out what the file path is.

But.... if the Action is not added trough an extension point (which is
not possible in my situation) its selectionChanged-Method will not be
triggered.
Delivering the ApplicationActionBarAdvisor and registring ist there does
not help.


Any ideas how i can get the harddisk-path of the file associated with
the currently active Editor...from an dynamic (not in the
ApplicationActionBarAdvisor) created Action.

Many thanks
Re: Registring a new Action outside the ApplicationActionBarAdvisor [message #497142 is a reply to message #497099] Thu, 12 November 2009 10:37 Go to previous messageGo to next message
exquisitus is currently offline exquisitus
Messages: 211
Registered: July 2009
Senior Member
exquisitus schrieb:
> Hi,
> I have to create Action dynamically while my RCP App is running.
> In these Actions I need to know the path of the file associated with the
> currently active Editor.
>
> I thought I can let the Actions implement IWorkbenchWindowActionDelegate
> and react on the SelectionChanged-Method to find out what the file path is.
>
> But.... if the Action is not added trough an extension point (which is
> not possible in my situation) its selectionChanged-Method will not be
> triggered.
> Delivering the ApplicationActionBarAdvisor and registring ist there does
> not help.
>
>
> Any ideas how i can get the harddisk-path of the file associated with
> the currently active Editor...from an dynamic (not in the
> ApplicationActionBarAdvisor) created Action.
>
> Many thanks

Hi, found a solution by myself
Re: Registring a new Action outside the ApplicationActionBarAdvisor [message #497144 is a reply to message #497099] Thu, 12 November 2009 10:37 Go to previous messageGo to next message
exquisitus is currently offline exquisitus
Messages: 211
Registered: July 2009
Senior Member
exquisitus schrieb:
> Hi,
> I have to create Action dynamically while my RCP App is running.
> In these Actions I need to know the path of the file associated with the
> currently active Editor.
>
> I thought I can let the Actions implement IWorkbenchWindowActionDelegate
> and react on the SelectionChanged-Method to find out what the file path is.
>
> But.... if the Action is not added trough an extension point (which is
> not possible in my situation) its selectionChanged-Method will not be
> triggered.
> Delivering the ApplicationActionBarAdvisor and registring ist there does
> not help.
>
>
> Any ideas how i can get the harddisk-path of the file associated with
> the currently active Editor...from an dynamic (not in the
> ApplicationActionBarAdvisor) created Action.
>
> Many thanks

Hi, found a solution by myself
Re: Registring a new Action outside the ApplicationActionBarAdvisor [message #498083 is a reply to message #497142] Sat, 14 November 2009 06:30 Go to previous message
Wim Jongman is currently offline Wim Jongman
Messages: 418
Registered: July 2009
Senior Member
And, what was it?


> exquisitus schrieb:
>> Hi,
>> I have to create Action dynamically while my RCP App is running.
>> In these Actions I need to know the path of the file associated with the
>> currently active Editor.
>>
>> I thought I can let the Actions implement IWorkbenchWindowActionDelegate
>> and react on the SelectionChanged-Method to find out what the file path
is.
>>
>> But.... if the Action is not added trough an extension point (which is
>> not possible in my situation) its selectionChanged-Method will not be
>> triggered.
>> Delivering the ApplicationActionBarAdvisor and registring ist there does
>> not help.
>>
>>
>> Any ideas how i can get the harddisk-path of the file associated with
>> the currently active Editor...from an dynamic (not in the
>> ApplicationActionBarAdvisor) created Action.
>>
>> Many thanks
>
> Hi, found a solution by myself
Previous Topic:Extensions tab incomplete
Next Topic:I dont know how to use the IProgressMonitor stop button :(
Goto Forum:
  


Current Time: Wed Aug 27 19:12:04 EDT 2014

Powered by FUDForum. Page generated in 0.01726 seconds