Community
Participate
Working Groups
calling PartService.isPartOrPlaceholderInPerspective(String, MPerspective) only works if the placeholder and the part have the same id.
I think instead of searching for placeholders it might be mere suitable of calling part.getCurSharedRef() to get the placeholder to check with?
(In reply to Christoph Laeubrich from comment #1) > I think instead of searching for placeholders it might be mere suitable of > calling > > part.getCurSharedRef() > > to get the placeholder to check with? I agree that searching for the placeholders with the same id is not the desired behavior, because then the you require the same ids. (It is advised to use the same ids, but that is also broken see Bug 562472). However, just taking the getCurSharedRef is not going to work: 1. The current ref might point to a different perspective then searching in. 2. The current ref might not be visible, but another placeholder in the same perspective is. So all placeholders in the current perspective that point to the part should be visited. Probably, easiest to do that is to find all placeholders in the perspective and check if its pointing to the part. Could you provide a Gerrit for this?
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/180607
Gerrit change https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/180607 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=9b5ba181c3c9a5b2477c10957e8c2fa630e0f271