Community
Participate
Working Groups
Hello I have a Problem with my pin-able views: they cannot be restored at the same location in some cases. The problem can be easily reproduced using the search-view: - Open 2 view instances and pin both instances. - Then close the 1. opened view instance. - Move the left view instance to another area of the perspective (e.g. to the top-right area or the bottom-left area) - Then close this view instance and reopen it. -> It is reopened in the view area (bottom right) and not at the location it was moved to. The problem does not happen when the 2. opened view instance is closed and the 1. opened view instance is moved: it is reopened at the location it was moved to. The problem seems to be related to the view ID: if the secondary view ID is null, then it works, else it does not work. Thanks
I suspect that this is related to another defect that I'm looking at regarding placeholders with specific secondary id's. This fix for both should be the same; first we should try to find the placeholder for the complete compound id (<ViewId>:<secondaryId>) and if we find it we should treat it as a 'normal' open.
To me this appears to be working 'correctly' even though I can understand your confusion. If you put a breakpoint in WorkbenchPage#showView(id, secId, mode) and print out the id's of the view that is being opened you can see that the new instances of the Search view increase the value of the secondaryId. This mean that closing the one with the secondaryId of "2" after moving it and then opening another is actually opening a new instance with the secondaryId of "3" so it has to go back where it was. See bug 409834 which is another example of something similar...
M4 is done...
I've just re-verified that the secondaryId always changes in this scenario so the results are actually what should be expected...