1

I am quite new to the RCP world and need some help.

I want to have E4Application work with IStartup. According to the documentation, I should use the "LifeCycleHandler" approach as in these 2 links.

How to make something on startup in Eclipse E4 application?

and

Eclipse e4 : IStartup extension not working

But I can't use them as I don't want to make code changes to my plugin. So I also went through the link below which talks about "Use the Compatibility Layer" but I could not really understand much. I would be great to have a solution to this since I can't modify the plugin code(may be by putting some plugin in the plugins dir etc).

My RCP is eclipse 4.6.2 based.

Observation: Eclipse 4.6.2 IDE is able to load my plugin but with version 4.6.2 based RCP, its not loading.

TIA

user578219
  • 597
  • 2
  • 9
  • 32

1 Answers1

2

A pure e4 RCP using E4Application cannot use IStartup or any of the other org.eclipse.ui.xxxx extension points and classes. You will have to use the Life Cycle class and rewrite your code.

If you want to use org.eclipse.ui.xxx classes and extension point stick to the traditional Eclipse RCP (which uses 3.x compatibility mode).

greg-449
  • 109,219
  • 232
  • 102
  • 145
  • Thanks Greg. A silly one- After rewriting using LifeCycle, Will it work for the older versions of RCP as well. The only aim for not re writing is I am unsure about the what all could break. – user578219 Mar 21 '18 at 13:09
  • You really need to choose one or the other (pure e4 or 3.x compatibility mode). There are huge differences between the two). Pure e4 is intended for new apps that don't use all the old stuff. – greg-449 Mar 21 '18 at 13:17
  • Thanks, so the problem is e4 and not the latest version, as eclipse 4.6.2 is able to load my plugin, right? – user578219 Mar 22 '18 at 09:54
  • A pure e4 RCP cannot use things like IStartup, a 3.x compatbility mode RCP can use them. That applies to any Eclipse 4 release – greg-449 Mar 22 '18 at 10:22
  • Hi, I read little more on RCP and e4App, but still no solution. I am now allowed to make changes to the plugin that needs to be loaded at startup when the E4 RCP App starts but I can't change the E4 RCP App itself. As I understand, for using the LifeCycyle Handlers, I need to change in my RCP to start a specific plugin. I cant do that. I can only make changes to my plugin that has IStartup and earlyStartup(). – user578219 Apr 03 '18 at 05:52