Community
Participate
Working Groups
Suppose you create two placeholders in two different perspectives a) MyView:* (PerpectiveA) b) MyView:specialSecondaryId (PerspectiveB) then PartServiceImpl#addPart(MPart providedPart, MPart localPart) for MyView:specialSecondaryId tries to find the placeholder MyView:* and locates its container. From the provided part the placeholder is determined which has id MyView:specialSecondaryId and resides in perspectiveB. The method however does not care about this placeholder and relocates it to the container of placeholder MyView:*. The MyView:specialSecondaryId placeholder is thus being moved where it should not. I suppose a search for the exact placeholder must occur before any wildcard placeholder is being searched. Reading http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fui%2FIPageLayout.html indicates that placeholders with secondaryIds are valid.
Created attachment 231930 [details] Search exact placeholder before the wildcard placeholder
Jens, thanks for the patch. We'll take a look for the SR1 release...
Thanks for setting a target milestone. FYI: I discovered that the patch brings up new problems in having multiple views. This is probably related to the adjustPlaceholder call and I will investigate this soon.
Beauty, get back with whatever you find...
Created attachment 234316 [details] Improved patch that favors shared area and active perspective
Jens, I'm looking at the defect and your patch and think we'd be better off trying a slightly different approach. Your case of the specific secondaryId *should* be able to be treated as if the placeholder was for a view with that id. What I mean here is that we might do the checks we normally do to find a normal view's placeholder and only if we can't find a location to do the ".*" search. Is there any way you could attach a small project that I could use to test with ?
I will setup some perspectives that should resemble the problematic model state.
Created attachment 235071 [details] Project that creates false relocation of placeholder.
Jens, I just tried your test project (thanks!!) using 4.4M3 and I get the following results: In PerspectiveA executing 'FindPlaceholderHandler' results in the view being opened to the left of the EditorArea, in PerspectiveB it shows up below the EA. To me this seems to indicate that this defect is already fixed, could you check and get back to me. I think that this defect was fixed by the code added for Bug 397612.
Tried this with 4.3.1 and it is still malfunctioning. Open Perspective A -> Click Show View Open Perspective B -> Clock Show View Two Views are present. Close one view in Perspective B and both views are closed.
Jens, I can see the problem now (it also fails in Luna), I working on this one now...
Committed: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=eeb3a086b45159d53eb930ccb819bd216f9a66de This does two things; - Makes sure that the search for the 'global wildcard' only takes place within the currently active perspective (which was the original cause of the defect) - Most important is that it also moves the test for the 'global wildcard' into 'addToLastContainer'. This means that we allow the full 'normal' logic to run *before* trying to find a ':*' wildcard. This means that you can have both a specific wildcard "<ViewId>:A" *and* a global one "<ViewId>:*" in the same perspective and it'll do the right thing...
Verified in 4.4.0.I20131209-2000.