Convert a set of plugin projects to a minimal Eclipse 4 RCP [message #1695984] |
Wed, 20 May 2015 16:21  |
Eclipse User |
|
|
|
Hello together!
I have a set of plugins that define their dependencies in their MANIFEST.MF files via the "Require-Bundle" or "Import-Package" headers. As a build system I use the Standart Java-Builder that is offered bei Eclipse by default - thus I have build.properties files that define source and output directories and the bin.includes of a plugin. Additionally I make use of the extension point mechanism to define views and menus.
It is my aim to move the application to a state where the user does not have to start it out of my IDE, but where the user can start an executable (.jar, .exe, .sh, ...). This lead me to consider moving to the Eclipse 4 RCP. Can anyone tell me if this is feasable? And if yes, could you point me to some documentation about getting up and running with E4? Or (even better) to documentation on converting a setup similar to mine to an E4 application.
Best Regards,
--
Alexander Baier
|
|
|
|
|
|
|
|
|
|
Re: Convert a set of plugin projects to a minimal Eclipse 4 RCP [message #1699501 is a reply to message #1699262] |
Wed, 24 June 2015 11:48   |
Eclipse User |
|
|
|
Dirk Fauth wrote on Tue, 23 June 2015 06:57I'm not sure about the question.
First, in E4 you do almost everything via injection. For the EPartService it is typically fine to do a field injection.
Ok, I will go down this route then. I was wondering, if there is some kind of lifecycle I have to be careful about, when working with the EPartService. E.g. does the service injected at object creation time (constructor, field) behave different than one, that is injected on a method call. Or, more to the point of my example, is it safe to use a PartService injected via the constructor after the constructor has finished executing.
Quote:Second, if you need to programmatically perform actions on the application model, you need to use the eclipse 4 services. Since you want to show different views dependent on your selection, IMHO using the EPartService is the correct way. If you only need to change the content of a view, you could give the ESelectionService a try.
I actually want to use multiple instances of the same view. How do I do that? Can I just call EPartService.createPart(String) multiple times? If yes, is there a build-in mechanism allowing me to differentiate between these multiple instances, or do I have to do my own book keeping?
Regards,
--
Alexander Baier
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Convert a set of plugin projects to a minimal Eclipse 4 RCP [message #1706943 is a reply to message #1706928] |
Tue, 01 September 2015 02:50  |
Eclipse User |
|
|
|
Quote:I am creating my MPart inside a class which I instantiate via ContextInjectionFactory#make. It gets the partService injected.
I guess that is ok, but still just creating it doesn't mean to add it to the model. IIRC partService#showPart() will add the MPart to the model hierarchy. So afterwards you will have the IEclipseContext. If you need it before you might want to try to add the MPart to the part stack manually before. Not sure if that is a "better" way. Just another one.
The contexts are designed to be hierarchical. This way you for example have access to the elements put in application level. That doesn't happen if you create a new one without the hierarchy. If you don't need other values from the context it is fine, otherwise it will fail when trying to access such values.
|
|
|
Powered by
FUDForum. Page generated in 0.07120 seconds