Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » E4 Perspective not persisted(A perspective contributed via fragment.e4xmi is not persisted)
E4 Perspective not persisted [message #1711467] Fri, 16 October 2015 10:33 Go to next message
Kasper M.Friend
Messages: 15
Registered: September 2014
Junior Member
Hi All,
I need an help please.

I have an application with an Application.e4xmi which contains something like the file attached. I've a plugin where I contribute via fragment.e4xmi (attached) by adding a perspective.

The prespective is perfectly showed and it works but it is not persisted properly. If open a couple of view after the restart of my application are not showed!

I think the mistake is in the model as the plugin is (looks like) properly filled out ...

what mistake do I make?

thanks in advance.

_
Kasper.
Re: E4 Perspective not persisted [message #1711476 is a reply to message #1711467] Fri, 16 October 2015 11:13 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
So what's the value in the plugin.xml file where you contribute the
fragment - wild guess is that this one is merged in every time and
replaces the current perspective.

On 16.10.15 12:33, Kasper M. wrote:
> Hi All,
> I need an help please.
>
> I have an application with an Application.e4xmi which contains something like the file attached. I've a plugin where I contribute via fragment.e4xmi (attached) by adding a perspective.
>
> The prespective is perfectly showed and it works but it is not persisted properly. If open a couple of view after the restart of my application are not showed!
>
> I think the mistake is in the model as the plugin is (looks like) properly filled out ...
>
> what mistake do I make?
>
> thanks in advance.
>
> _
> Kasper.
>
Re: E4 Perspective not persisted [message #1711487 is a reply to message #1711476] Fri, 16 October 2015 12:07 Go to previous messageGo to next message
Kasper M.Friend
Messages: 15
Registered: September 2014
Junior Member
Hi Thomas,
thanks for your reply! really appreciated.

   <extension
         point="org.eclipse.ui.perspectives">
      <perspective
            class="com.TEST.ui.perspective.App"
            fixed="false"
            icon="icons/app.png"
            id="com.TEST.ui.perspective.App"
            name="App">
      </perspective>
   </extension>


and

   <extension
         id="APP"
         point="org.eclipse.e4.workbench.model">
      <fragment
            apply="always"
            uri="fragment.e4xmi">
      </fragment>
   </extension>


But basically the thing is:
I have an Application.e4xmi with one empty "PerspectiveStack" with ID: com.TEST.perspectivestack.0
I have a fragment.e4xmi with a Model Fragment with ID com.TEST.perspectivestack.0 ... here I want to contribute to the (Application.e4xmi) model

what I see is the correct perspective but not persisted ...





[Updated on: Fri, 16 October 2015 12:49]

Report message to a moderator

Re: E4 Perspective not persisted [message #1711488 is a reply to message #1711487] Fri, 16 October 2015 12:13 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
your fragment is merged *always* which means on each start the persisted
state is overridden by the fragment who defines the initial setup.

You need to set the value to never or notexist.

Tom

On 16.10.15 14:07, Kasper M. wrote:
> Hi Thomas, thanks for your reply! really appreciated.
>
> <extension
> point="org.eclipse.ui.perspectives">
> <perspective
> class="com.TEST.ui.perspective.App"
> fixed="false"
> icon="icons/app.png"
> id="com.TEST.ui.perspective.App"
> name="App">
> </perspective>
> </extension>
>
>
> and
> <extension
> id="atterminal"
> point="org.eclipse.e4.workbench.model">
> <fragment
> apply="always"
> uri="fragment.e4xmi">
> </fragment>
> </extension>
>
>
> But basically the thing is: I have an Application.e4xmi with one empty
> "PerspectiveStack" with ID: com.TEST.perspectivestack.0
> I have a fragment.e4xmi with a Model Fragment with ID
> com.TEST.perspectivestack.0 ... here I want to contribute to the
> (Application.e4xmi) model
> what I see is the correct perspective but not persisted ...
>
>
>
>
>
Re: E4 Perspective not persisted [message #1711492 is a reply to message #1711488] Fri, 16 October 2015 12:38 Go to previous messageGo to next message
Kasper M.Friend
Messages: 15
Registered: September 2014
Junior Member
can confirm that I have to set the (PerspectiveStack) ID from the application.e4xmi and the one into the fragment.e4xmi (ModelFragment) as the same? I mean having the PerspectiveStack in the application.e4xmi with the same id (ModelFragment) into the fragment.e4xmi
Re: E4 Perspective not persisted [message #1711494 is a reply to message #1711492] Fri, 16 October 2015 12:45 Go to previous messageGo to next message
Kasper M.Friend
Messages: 15
Registered: September 2014
Junior Member
BTW, by having this configuration still not working:
/// Fragment.e4xmi:
<fragments xsi:type="fragment:StringModelFragment" xmi:id="_jeCj0FRvEeSzRrIrWuanPw" featurename="children" parentElementId="PerspectiveStack">
<elements xsi:type="advanced:Perspective" xmi:id="_xoLHQFRvEeSzRrIrWuanPw" elementId="com....." label="App" iconURI="">

///Application.e4xmi:
<children xsi:type="advanced:PerspectiveStack" xmi:id="_j4rA4HQCEeWYc45L5sV2Pw" elementId="PerspectiveStack"/>

/// plugin.xml of the fragment plugin:
apply set to "notexist"

/// plugin.xml of the Application.e4xmi:
apply set to "notexist"

[Updated on: Fri, 16 October 2015 12:49]

Report message to a moderator

Re: E4 Perspective not persisted [message #1711498 is a reply to message #1711494] Fri, 16 October 2015 13:03 Go to previous messageGo to next message
Kasper M.Friend
Messages: 15
Registered: September 2014
Junior Member
Hi Thomas!
just want to say that I got it working Smile
you were right ...
Re: E4 Perspective not persisted [message #1711507 is a reply to message #1711498] Fri, 16 October 2015 13:47 Go to previous message
Kasper M.Friend
Messages: 15
Registered: September 2014
Junior Member
the only strange think is that I've removed from the Application.e4xmi the PerspectiveStack and having one into the Fragment.e4xmi with the ID: com.MY_ID.etc ....
it works! but if I put the ID: org.eclipse.ui.ide.perspectivestack ... it doesn't work.
why this?
Previous Topic:Could not find satisfiable constructor in codesnippetapp.views.SearchDialog
Next Topic:Eclipse Luna hangs keyboard input
Goto Forum:
  


Current Time: Thu Apr 25 21:27:26 GMT 2024

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

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

Back to the top