Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » customize workbench with compatibility layer
customize workbench with compatibility layer [message #1603781] Fri, 06 February 2015 11:50 Go to next message
quest ionnere is currently offline quest ionnereFriend
Messages: 57
Registered: January 2015
Member
Hi,

is it possible to customize the workbench using the compatibility layer? Until now (rcp 3.7) we used
WorkbenchWindowAdvisor#createWindowContents(Shell)
to customize our workbench - the method is now deprecated and does not get called anymore. Eclipse wiki states that one has to do customizations in the application model, which, AFAIK, I do not have to have using the compatibility layer.
I did not yet find any hint how I could do those customizations using the compatibility layer - has anyone ever done something like that?
Re: customize workbench with compatibility layer [message #1611866 is a reply to message #1603781] Wed, 11 February 2015 17:05 Go to previous message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 672
Registered: January 2012
Senior Member

It's possible to get the model using the getService() calls from the various E3.x objects. For example, you can get the MApplication element via:
MApplication app = (MApplication)PlatformUI.getWorkbench().getService(MApplication.class)

You can similarly obtain the MPart for an IViewPart or IEditorPart.

You do need to be careful though as the E3.x compat layer assumes that the underlying E4 model belongs to it and it may well overwrite changes you make to model.

Brian.


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Previous Topic:configure compatibility layer's appModel
Next Topic:Move sash to a new window
Goto Forum:
  


Current Time: Sat Nov 18 03:02:45 GMT 2017

Powered by FUDForum. Page generated in 0.01698 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software