-
Notifications
You must be signed in to change notification settings - Fork 5
Eclipse Workbench Modification_85983330
nxi edited this page Apr 9, 2015
·
1 revision
Created by Tony Lam, last modified on Jun 01, 2008
The Eclipse IDE workbench is basically a SWT shell with TrimLayout (internal API). That is, the UI component in the benchwork can be customised using any SWT widget. The class which controls the SWT control inside the workbench shell is org.eclipse.ui.internal.WorkbenchWindow. Assume you want to add a button permanently in the workbench, modify WorkbenchWindow with the following code snippet:
To restore welcome view on every launch, there are two options available:
private Composite composite; protected void createDefaultContents(final Shell shell) { ... composite = new Composite(shell, SWT.NONE); composite.setLayout(new FillLayout()); Button button = new Button(composite, SWT.NONE); Composite workbenchArea = new Composite(composite, SWT.NONE); workbenchArea.setLayout(new FillLayout()); createPageComposite(workbenchArea); ... } private void updateLayoutDataForContents() { ... defaultLayout.setCenterControl(composite); ... }
- Set IWorkbenchPreferenceConstants.SHOW_INTRO to true before org.eclipse.ui.application.WorkbenchWindowAdvisor.openIntro() is called
- Modify org.eclipse.ui.internal.ide.application.IDEWorkbenchWindowAdvisor.openIntro() so that the variable showIntro is always true (WorkbenchWindowAdvisor line 163 in Eclipse 3.3.2)
- Import plug-in org.eclipse.ui.workbench as source and modify the source code
- Import plug-in org.eclipse.ui.workbench as binary project. Remove the original jar from the build path. Create a fragment to org.eclipse.ui.workbench, and place the original workbench jar into the fragment.
Document generated by Confluence on Apr 01, 2015 00:11
Home | Developer Guide | Copyright © 2013 ANSTO