|
Lines 18-25
Link Here
|
| 18 |
import org.eclipse.jface.action.IToolBarManager; |
18 |
import org.eclipse.jface.action.IToolBarManager; |
| 19 |
import org.eclipse.jface.action.MenuManager; |
19 |
import org.eclipse.jface.action.MenuManager; |
| 20 |
import org.eclipse.jface.action.Separator; |
20 |
import org.eclipse.jface.action.Separator; |
| 21 |
import org.eclipse.jface.action.ToolBarContributionItem; |
|
|
| 22 |
import org.eclipse.jface.action.ToolBarManager; |
| 23 |
import org.eclipse.swt.SWT; |
21 |
import org.eclipse.swt.SWT; |
| 24 |
import org.eclipse.ui.ISharedImages; |
22 |
import org.eclipse.ui.ISharedImages; |
| 25 |
import org.eclipse.ui.IViewPart; |
23 |
import org.eclipse.ui.IViewPart; |
|
Lines 30-35
Link Here
|
| 30 |
import org.eclipse.ui.actions.RetargetAction; |
28 |
import org.eclipse.ui.actions.RetargetAction; |
| 31 |
import org.eclipse.ui.application.ActionBarAdvisor; |
29 |
import org.eclipse.ui.application.ActionBarAdvisor; |
| 32 |
import org.eclipse.ui.application.IActionBarConfigurer; |
30 |
import org.eclipse.ui.application.IActionBarConfigurer; |
|
|
31 |
import org.eclipse.ui.presentations.ActionBarPresentation; |
| 33 |
|
32 |
|
| 34 |
/** |
33 |
/** |
| 35 |
* Builds the actions and populates the menubar and toolbar when a new window |
34 |
* Builds the actions and populates the menubar and toolbar when a new window |
|
Lines 158-165
Link Here
|
| 158 |
} |
157 |
} |
| 159 |
|
158 |
|
| 160 |
protected void fillCoolBar(ICoolBarManager coolBar) { |
159 |
protected void fillCoolBar(ICoolBarManager coolBar) { |
| 161 |
IToolBarManager toolBar = new ToolBarManager(SWT.FLAT | SWT.RIGHT); |
160 |
ActionBarPresentation toolBarPresentation = getActionBarConfigurer().getActionBarPresentation(); |
| 162 |
coolBar.add(new ToolBarContributionItem(toolBar, "standard")); //$NON-NLS-1$ |
161 |
IToolBarManager toolBar = toolBarPresentation.createToolBarManager(SWT.NONE); |
|
|
162 |
coolBar.add(toolBar); //$NON-NLS-1$ |
| 163 |
|
163 |
|
| 164 |
// For the Back and Forward actions, force their text to be shown on the toolbar, |
164 |
// For the Back and Forward actions, force their text to be shown on the toolbar, |
| 165 |
// not just their image. For the remaining actions, the ActionContributionItem |
165 |
// not just their image. For the remaining actions, the ActionContributionItem |
|
Lines 172-178
Link Here
|
| 172 |
forwardCI.setMode(ActionContributionItem.MODE_FORCE_TEXT); |
172 |
forwardCI.setMode(ActionContributionItem.MODE_FORCE_TEXT); |
| 173 |
toolBar.add(forwardCI); |
173 |
toolBar.add(forwardCI); |
| 174 |
|
174 |
|
| 175 |
toolBar.add(stopAction); |
175 |
toolBar.add(stopAction); |
| 176 |
toolBar.add(refreshAction); |
176 |
toolBar.add(refreshAction); |
| 177 |
} |
177 |
} |
| 178 |
} |
178 |
} |