Skip to main content


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 14:10 Go to next message
exquisitus is currently offline exquisitusFriend
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 15:37 Go to previous messageGo to next message
exquisitus is currently offline exquisitusFriend
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 15:37 Go to previous messageGo to next message
exquisitus is currently offline exquisitusFriend
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 11:30 Go to previous message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 423
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: Thu Mar 28 17:21:24 GMT 2024

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

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

Back to the top