Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to perform an action after eclipse plugin is opened
How to perform an action after eclipse plugin is opened [message #899077] Mon, 30 July 2012 13:41 Go to next message
becks m is currently offline becks mFriend
Messages: 59
Registered: June 2012
Member
Hi,

I have an eclipse plugin and I want to perform certain action inside this plugin but after eclipse application is opened.

I tried to do it through overriding
public void postWindowCreate()

but it seems that I can't get inside this function when launching the application


Any ideas ?
Re: How to perform an action after eclipse plugin is opened [message #899092 is a reply to message #899077] Mon, 30 July 2012 14:26 Go to previous messageGo to next message
Joseph Carroll is currently offline Joseph CarrollFriend
Messages: 174
Registered: May 2012
Location: Milwaukee, WI
Senior Member

What are you trying to accomplish with the window?

JD
Re: How to perform an action after eclipse plugin is opened [message #899094 is a reply to message #899092] Mon, 30 July 2012 14:29 Go to previous messageGo to next message
becks m is currently offline becks mFriend
Messages: 59
Registered: June 2012
Member

a lot of methods in my plugin
example: open project or get the tree items of tree viewer or show view

but I wanted it to be called automatic after opening eclipe
Re: How to perform an action after eclipse plugin is opened [message #899101 is a reply to message #899094] Mon, 30 July 2012 14:44 Go to previous messageGo to next message
Joseph Carroll is currently offline Joseph CarrollFriend
Messages: 174
Registered: May 2012
Location: Milwaukee, WI
Senior Member

Is this for a new workbench instance or a reloaded instance?

If you are reloading a workbench instance, most of that should be taken care of. Especially any tree viewers, the content providers should be able to provide the content. Just make sure you enable saving the workbench state. It would be something like workbench.setSaveState(true). (That's not it but it is something along those lines).

Otherwise if it is for the case of a new workbench instance, just set the default perspective to your desired perspective.

So the primary issue I would focus on is what perspective is initially displayed. Everything else (views / viewers / commands / etc.. ), should be independent of the workbench state and react to the perspective.
Re: How to perform an action after eclipse plugin is opened [message #899323 is a reply to message #899101] Tue, 31 July 2012 13:20 Go to previous messageGo to next message
becks m is currently offline becks mFriend
Messages: 59
Registered: June 2012
Member
Great,
but I wanted to do something like:
with pseudo code
after eclipse is started and my perspective is opened
execute method ( open project)


where should I put the method (open project) in my code to do the previous scenario.

[Updated on: Tue, 31 July 2012 14:21]

Report message to a moderator

Re: How to perform an action after eclipse plugin is opened [message #899364 is a reply to message #899323] Tue, 31 July 2012 14:50 Go to previous messageGo to next message
Joseph Carroll is currently offline Joseph CarrollFriend
Messages: 174
Registered: May 2012
Location: Milwaukee, WI
Senior Member

Not sure what you mean by open projects. Typically, the user is responsible for creating/importing new projects into the workspace, or the workspace loads with the previous list of projects.

If you want a situation where projects are opened and closed depending upon the perspective, then what comes to mind is some type of processing in the PerspectiveFactory. However, IMHO I am not comfortable with that at all.

Remember that views and editors are shared. When you switch perspectives all you are really doing is changing what views are immediately visible. (Nothing is actually closed)

So I guess consider carefully the use of a open/closeProject().


JD
Re: How to perform an action after eclipse plugin is opened [message #899366 is a reply to message #899364] Tue, 31 July 2012 14:53 Go to previous messageGo to next message
becks m is currently offline becks mFriend
Messages: 59
Registered: June 2012
Member
openProject was a generic an example for a method.
I needed it to automate the process of calling some methods and notice their actions automatically without user interaction.
Re: How to perform an action after eclipse plugin is opened [message #899497 is a reply to message #899366] Wed, 01 August 2012 07:59 Go to previous message
Eclipse UserFriend
If this is a pure e4 app, you can easily do it by listening to the activation event of the perspective.
Previous Topic:Platform.getExtensionRegistry() returns null !!
Next Topic:A tool to evaluate expressions at runtime
Goto Forum:
  


Current Time: Thu Dec 26 12:17:31 GMT 2024

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

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

Back to the top