Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » App run does not use Application.e4xml?(I run app from Eclipse and it seems it dos not use Application.e4xml)
App run does not use Application.e4xml? [message #1800644] Fri, 04 January 2019 10:19 Go to next message
Jonas Skendelis is currently offline Jonas SkendelisFriend
Messages: 2
Registered: January 2019
Junior Member

Hi all,
I got a new app for maintenance... Before I did not work with 'build on eclipse' programming ☹ So I'm new in this.
In app I need to include new part (com.cat.ExtraEditor; implemented in com.cat.editor.ExtraEditorPart.java) into it. In Application.e4xml at Part Descriptors I included new descriptor... When I run app from Eclipse, I get NULL in createPart method. For other parts in Application.e4xml it is ok to createPart. It seems that the app does not use Application.e4xml... and take appContext from somewhere else...

Application.e4xml:
<descriptors xmi:id="_jg8DoA9bEemR358_lF0RmA" elementId="com.cat.ExtraEditor" label="ExtraEditor"
iconURI="platform:/plugin/com.cat/icons/query_obj.gif" allowMultiple="true" closeable="true" contributionURI="bundleclass://com.cat/com.cat.editor.ExtraEditorPart"/>

// example
String P = "com.cat.ExtraEditor";
MPart part = pPartService.createPart(P); // return NULL
if (part == null) { // always goes into.
// that code is to show that I can create element -
part = pModelService.createModelElement(MPart.class);
part.setContributionURI("bundleclass://com.cat/com.cat.editor.ExtraEditorPart" );
part.setElementId("com.cat.ExtraEditor");
// there the part was created and later showed - so it's ok with its implementation
}
// ...

I checked while debugging that in org.eclipse.e4.ui.internal.workbench.ModelServiceImpl that in getPartDescriptor method no part com.cat.ExtraEditor but there are all previous parts from Application.e4xml
So I concluded that app does not use Application.e4xml
MApplication application = appContext.get(MApplication.class);

List<MPartDescriptor> descrs = application.getDescriptors())
// descrs has no AESKeysPolicyCheckEditor but it is in Application.e4xml

Could somebody explain what is going and how to solve this situation? I NEED to create part from description... A workaround is not solution.

Re: App run does not use Application.e4xml? [message #1800760 is a reply to message #1800644] Mon, 07 January 2019 21:08 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 865
Registered: January 2012
Senior Member

My guess is that you're hitting the following:

https://wiki.eclipse.org/Eclipse4/RCP/FAQ#I_modified_my_App.e4xmi.2Ffragment.e4xmi_but_the_changes_aren.27t_being_loaded._Why.3F

The Application.e4xmi is only loaded on first run.


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Re: App run does not use Application.e4xml? [message #1800784 is a reply to message #1800760] Tue, 08 January 2019 08:59 Go to previous message
Jonas Skendelis is currently offline Jonas SkendelisFriend
Messages: 2
Registered: January 2019
Junior Member
Tnx,
I found a workaround ...
I use Eclipse RCP Photon 4.8.0 for this project...
It loads updated Application.e4xml on run if I change workspace into new one (Run Configurations -> specific Eclipse Application ->Main tab -> Workspace Data path)
And yes, it appears to be related to persisting...
Previous Topic:CSS styling of MasterDetailsBlocks's DetailsPart
Next Topic:What is the best way to remove a MToolControl from main toolbar if part is deactivated?
Goto Forum:
  


Current Time: Sat Dec 07 20:07:25 GMT 2019

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

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

Back to the top