use of org.eclipse.ui.IViewSite in project org.csstudio.display.builder by kasemir.
the class PlaceHolderView method createPartControl.
@Override
public void createPartControl(final Composite parent) {
final IViewSite site = getViewSite();
parent.setLayout(new FillLayout());
final Text text = new Text(parent, SWT.MULTI | SWT.WRAP | SWT.READ_ONLY);
text.setText("Placeholder for displays that should appear in this location.\n" + "Close after all displays have been arranged.");
setPartName(site.getSecondaryId());
}
use of org.eclipse.ui.IViewSite in project dsl-devkit by dsldevkit.
the class DynamicViewMenu method getMenu.
/**
* Get the original menu which is used to find the menu item.
*/
private void getMenu() {
final ToolBarManager toolBarManager = (ToolBarManager) ((IViewSite) reference.getPart(true).getSite()).getActionBars().getToolBarManager();
PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
@Override
public void run() {
originalMenu = new Menu(toolBarManager.getControl());
}
});
}
use of org.eclipse.ui.IViewSite in project whole by wholeplatform.
the class DebugViewPart method createPartControl.
@Override
public void createPartControl(Composite parent) {
super.createPartControl(parent);
IViewSite viewSite = getViewSite();
IActionBars actionBars = viewSite.getActionBars();
IToolBarManager toolBarManager = actionBars.getToolBarManager();
toolBarManager.add(getComponent().getBreakpoiontsDisableAction(getContext()));
toolBarManager.add(getComponent().getResumeAction(getContext()));
toolBarManager.add(getComponent().getTerminateAction(getContext()));
}
use of org.eclipse.ui.IViewSite in project whole by wholeplatform.
the class ResultsViewPart method createPartControl.
@Override
public void createPartControl(Composite parent) {
super.createPartControl(parent);
IViewSite viewSite = getViewSite();
IActionBars actionBars = viewSite.getActionBars();
IToolBarManager toolBarManager = actionBars.getToolBarManager();
toolBarManager.add(getComponent().getClearContentsAction());
}
use of org.eclipse.ui.IViewSite in project egit by eclipse.
the class GitActionContributor method initialize.
@Override
public void initialize(ISynchronizePageConfiguration configuration) {
super.initialize(configuration);
ExpandAllModelAction expandAllAction = new ExpandAllModelAction(GitActionContributor_ExpandAll, configuration);
expandAllAction.setImageDescriptor(EXPAND_ALL);
appendToGroup(P_TOOLBAR_MENU, NAVIGATE_GROUP, expandAllAction);
PullAction pullAction = new PullAction(UIText.GitActionContributor_Pull, configuration);
pullAction.setImageDescriptor(PULL);
appendToGroup(P_TOOLBAR_MENU, SYNCHRONIZE_GROUP, pullAction);
PushAction pushAction = new PushAction(UIText.GitActionContributor_Push, configuration);
pushAction.setImageDescriptor(PUSH);
appendToGroup(P_TOOLBAR_MENU, SYNCHRONIZE_GROUP, pushAction);
ISynchronizePageSite site = configuration.getSite();
IWorkbenchSite ws = site.getWorkbenchSite();
openWorkingFileAction = new OpenWorkingFileAction(ws.getWorkbenchWindow().getActivePage());
site.getSelectionProvider().addSelectionChangedListener(openWorkingFileAction);
if (ws instanceof IViewSite) {
Object oldAction = configuration.getProperty(P_OPEN_ACTION);
if (!(oldAction instanceof Action))
return;
final GitOpenInCompareAction openInCompareAction = new GitOpenInCompareAction(configuration, (Action) oldAction);
configuration.setProperty(P_OPEN_ACTION, openInCompareAction);
}
}
Aggregations