I would like to stop Parts
from being detachable in Eclipse RCP 4.
Currently if I right click on a Part
I can select detach. From this I can then close the tab even if the Part
isn't Closeable
. In RCP 3 when a detached View
is closed it would then return back to its original location but now it closes completely.
Structure
Part Config
How can I remove the option to detach a Part
?
Also how can I stop a detached Part
from being closed or make it return to its original location?
To stop parts being detachable I used a custom stack renderer and overrode the method to populate the tab menu.
I then added a
Persisted State
into the Part Stacks that I didn't want to show theDetach
option.If anybody is having trouble setting a custom stack renderer then my question here might help.
Checkout the bug : Eclipse Bug
I think you have to wait for the fix for
NoDetach
till it is availableFor time being you can use
NoMove
tag which can stop dndDocumentation
A part can be annotated with a
NoMove
tag to indicate that the drag-and-drop system should not allow the user to move this part. (Defined by IPresentationEngine.NO_MOVE)