| Summary: | Cannot disable detached views or parts | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Ben Roling <rollsisu> | ||||||
| Component: | UI | Assignee: | Alex Say <say_aa> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | d.gabriel, gautier.desaintmartinlacaze, loskutov, mistria, noopur_gupta, remy.suen, say_aa, thomasa | ||||||
| Version: | 4.2 | ||||||||
| Target Milestone: | 4.8 M6 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| See Also: |
https://git.eclipse.org/r/113462 https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=d5d9eddcf470b6c5ef30dfb7d5694bcb4b9e5e7c https://git.eclipse.org/r/116766 https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=545fdb70afdc5660d658c92c2f7692852f6c99e0 |
||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 562663 | ||||||||
| Attachments: |
|
||||||||
|
Description
Ben Roling
I'm wondering would it be possible for you to just not include the addon in your RCP application? Created attachment 203094 [details]
patch with an example of how this issue might be fixed
I don't want to disallow drag and drop altogether. I just don't want dropping things off into detached windows. I suggest adding a new tag for MPart, following the example of "NoMove", and calling it "NoDetach" for example. Perhaps it will be enough to change the method org.eclipse.e4.ui.workbench.addons.dndaddon.DetaghedDropAgent.canDrop ():
@override
public boolean canDrop (MUIElement dragElement, DnDInfo info) {
if (info.curElement! = null) {
return false;
}
if (dragElement instanceof MPart || dragElement instanceof MPlaceholder
|| dragElement instanceof MPartStack) {
<b>return! dragElement.getTags (). contains ("NoDetach");</b>
}
return false;
}
(In reply to Alex Say from comment #4) > I suggest adding a new tag for MPart, following the example of "NoMove", and > calling it "NoDetach" for example. Perhaps it will be enough to change the Please push a good patch to Gerrit. Created attachment 271901 [details]
fix bug through adding tag
(In reply to Alex Say from comment #6) > Created attachment 271901 [details] > fix bug through adding tag Please use Gerrit for patches, see https://wiki.eclipse.org/Platform_UI/How_to_Contribute New Gerrit change created: https://git.eclipse.org/r/113462 Gerrit change https://git.eclipse.org/r/113462 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=d5d9eddcf470b6c5ef30dfb7d5694bcb4b9e5e7c Good patch merged. Thank you very much for your contribution Alex! New Gerrit change created: https://git.eclipse.org/r/116766 Gerrit change https://git.eclipse.org/r/116766 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=545fdb70afdc5660d658c92c2f7692852f6c99e0 (In reply to Eclipse Genie from comment #12) > Gerrit change https://git.eclipse.org/r/116766 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=545fdb70afdc5660d658c92c2f7692852f6c99e0 Fixed the API tools error due to missing @since tag. Does this just address *dragging* a part out of the workbench? Or does it also address the "Detach" context menu item on parts? it seems that the context menu would not be fixed by that for me |