Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Fragments and model elements merging
Fragments and model elements merging [message #1067778] Wed, 10 July 2013 14:29 Go to next message
Pierre GAUTIER is currently offline Pierre GAUTIERFriend
Messages: 13
Registered: August 2010
Junior Member
Hi,

I've struggling with a fragment issue for some time and just found a post that seems related to my problem.

http://www.eclipse.org/forums/index.php/t/458845/

I'd like to be sure to understand well.

Let's say I've 2 plugins A & B, both optional to my application.

If both of them are present I'd like them to add a part in the same part stack. If only one of them is present I want the part stack created with the part, if none I don't want the stack created at all.

What would be the good way to achieve that ?

If I create the stack in only one plugin, obviously it won't work : if it's not present the stack wouldn't be either.

But if I create the stack in both plugin it seems that they are not merged.

Is it the normal comportment ? Should I use a processor to use that ? Wouldn't be better that to be the default comportment ?


Thanks by advance,

Pierre GAUTIER

[Updated on: Wed, 10 July 2013 14:39]

Report message to a moderator

Re: Fragments and model elements merging [message #1067838 is a reply to message #1067778] Wed, 10 July 2013 19:30 Go to previous messageGo to next message
Mateusz Malinowski is currently offline Mateusz MalinowskiFriend
Messages: 36
Registered: March 2013
Location: Bristol
Member
Hi,

If you don't care about persistance of the perspective which contains this part stack, you may create two processors (I'm afraid you can't avoid it).

1) the first processor will run before fragments and will simply remove all children of your part stack,
2) the second processor will run after fragments are merged and will set selected part, for example, the the first child, so you won't have any exceptions.

Now to test that, you can shift dependencies in your .product file, but if you read more about p2, you may find a way to pick plugins at the start-up of you application (when you export it to a stand-alone program).

This is the fastest solution I could think of.
Re: Fragments and model elements merging [message #1068108 is a reply to message #1067838] Fri, 12 July 2013 08:28 Go to previous message
Pierre GAUTIER is currently offline Pierre GAUTIERFriend
Messages: 13
Registered: August 2010
Junior Member

Thanks for your answer.

I got it, I'll use processors.

But still, why isn't it the default behaviour ?

I can't find a case where you want to declare some stack containers with same id in different fragments and lose some of them.

Just thinking it may be better.
Previous Topic:Toolbar items disappears when no parts opened (compatibilty mode)
Next Topic:Possibly incomplete PartDescriptor functionality?
Goto Forum:
  


Current Time: Fri Apr 26 17:00:39 GMT 2024

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

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

Back to the top