Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 515233 - 'NoMove' tag does not work on PartDescriptors
Summary: 'NoMove' tag does not work on PartDescriptors
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.6   Edit
Hardware: All All
: P3 normal with 1 vote (vote)
Target Milestone: 4.10 M1   Edit
Assignee: Max Hohenegger CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-13 04:54 EDT by Max Hohenegger CLA
Modified: 2022-05-06 10:06 EDT (History)
3 users (show)

See Also:


Attachments
In case of MPlaceholder, evaluate tags of reference (1.93 KB, patch)
2017-04-13 05:03 EDT, Max Hohenegger CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Max Hohenegger CLA 2017-04-13 04:54:19 EDT
In my RCP application (based on 4.6.3), I contribute several MPartDescriptors via a fragment.e4xmi to org.eclipse.e4.ide.application:descriptors. I tagged them with 'View', so they show up in the "Show View" dialog, and some of them, I tagged with 'NoMove', so they cannot be dragged from the PartStack in which I open them. 
'View' works, but 'NoMove' does not. 'NoMove' does work when I use it on MPartStacks, though.

By debugging into the PartDragAgent, I discovered that, when dragging starts, the 'info.itemElement' is not an MPart, but an MPlaceholder (with the part being its ref). The part does have the right tags, but the placeholder does not, which explains why it does not work.
I will contribute a patch-set that would fix this issue for me.
Comment 1 Max Hohenegger CLA 2017-04-13 05:03:20 EDT
Created attachment 267788 [details]
In case of MPlaceholder, evaluate tags of reference
Comment 2 Lars Vogel CLA 2017-04-13 05:14:22 EDT
(In reply to Max Hohenegger from comment #1)
> Created attachment 267788 [details]
> In case of MPlaceholder, evaluate tags of reference

Thanks, please convert to a Gerrit review.
Comment 3 Eclipse Genie CLA 2017-05-05 03:39:16 EDT
New Gerrit change created: https://git.eclipse.org/r/96440
Comment 5 Lars Vogel CLA 2018-10-08 10:17:39 EDT
Thanks, Max.
Comment 6 Daniel Bernhardsson CLA 2022-05-06 10:06:41 EDT
I have been having problems trying to get the setMovable functionality for my E3 application working using layout.getViewLayout(MyView.ID).setMoveable(false)

Debugging, I have seen that for my E3 part, the 'NoMove' tag is set on the MPlaceholder, while the ref:d part does not have the NoMove tag.

Consequently, this fix seems to have broken the NoMove functionality for E3, as the referenced part created does not get the NoMove.