Reputation: 1396
I am new to Eclipse plugin development and I have just completed development of my 1st plugin.
It's running without any issues, when I run the project as an "Eclipse Application". So I exported the plugin and installed it to another distribution of eclipse. But now it's not working as I expected.
Inside my activator.start()
I added few even listeners and neither of them are getting triggered. Later I found this start()
method is not fired after I export the product.
To make sure, I used MessageConsoleStream
and print something to the console.
Again this is working in the development time, but not in the exported version.
But the view of the plugin is displayed without any problems.
What has gone wrong?
Eclipse version : 4.4.2
Upvotes: 1
Views: 172
Reputation: 111142
Activators are not normally started until something else in the plugin is used. They are not the place to add listeners.
If you want to start listening to something when Eclipse starts use the org.eclipse.ui.startup
extension to declare an early start up class
<extension point="org.eclipse.ui.startup">
<startup class="package.StartupClass"/>
</extension>
The start up class implements org.eclipse.ui.IStartup
Upvotes: 2