List of usage examples for org.eclipse.jface.action StatusLineManager update
@Override
public void update(boolean force)
From source file:com.carrotgarden.m2e.config.ConfigStartup.java
License:BSD License
private void addStatusLineContribution() { final IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows(); final WorkbenchWindow window = (WorkbenchWindow) windows[0]; final StatusLineManager statusLineManager = window.getStatusLineManager(); label = new ConfigLabel("config"); statusLineManager.add(new Separator("carrot")); statusLineManager.appendToGroup("carrot", label); statusLineManager.update(true); }
From source file:org.apache.sling.ide.eclipse.ui.dnd.assistant.StatusLineUtils.java
License:Apache License
private static void doSetErrorMessage(final String message) { final IStatusLineManager statusLineManager = getStatusLineManager(); if (statusLineManager != null) { Display.getDefault().syncExec(new Runnable() { @Override// w ww. j av a 2 s . com public void run() { if (statusLineManager instanceof SubContributionManager) { SubContributionManager sub = (SubContributionManager) statusLineManager; StatusLineManager parent = (StatusLineManager) sub.getParent(); parent.setErrorMessage(message); parent.update(true); } else { statusLineManager.setErrorMessage(message); statusLineManager.update(true); } } }); } }
From source file:org.geotools.swt.SwtMapFrame.java
License:Open Source License
protected Control createContents(Composite parent) { String title = content.getTitle(); content.layers();/*from ww w .j a va 2s .co m*/ if (title != null) { getShell().setText(title); } Composite mainComposite = null; if (showLayerTable) { SashForm sashForm = new SashForm(parent, SWT.HORIZONTAL | SWT.NULL); mainComposite = sashForm; MapLayerComposite mapLayerTable = new MapLayerComposite(mainComposite, SWT.BORDER); mapPane = new SwtMapPane(mainComposite, SWT.BORDER | SWT.NO_BACKGROUND); mapPane.setMapContent(content); mapLayerTable.setMapPane(mapPane); sashForm.setWeights(new int[] { 1, 3 }); } else { mainComposite = parent; mapPane = new SwtMapPane(mainComposite, SWT.BORDER | SWT.NO_BACKGROUND); mapPane.setMapContent(content); } // the map pane is the one element that is always displayed mapPane.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE)); mapPane.setRenderer(renderer); // drawAction.setMapPane(mapPane); infoAction.setMapPane(mapPane); panAction.setMapPane(mapPane); resetAction.setMapPane(mapPane); zoominAction.setMapPane(mapPane); zoomoutAction.setMapPane(mapPane); openShapeAction.setMapPane(mapPane); openCoverageAction.setMapPane(mapPane); StatusLineManager statusLineManager = getStatusLineManager(); if (statusLineManager != null) { IContributionItem filler = new ControlContribution("org.geotools.swt.SwtMapFrame.ID") { protected Control createControl(Composite parent) { Label almostParent = new Label(parent, SWT.NONE); StatusLineLayoutData statusLineLayoutData = new StatusLineLayoutData(); statusLineLayoutData.widthHint = 1; statusLineLayoutData.heightHint = 45; almostParent.setLayoutData(statusLineLayoutData); return almostParent; } }; CrsStatusBarButton crsButton = new CrsStatusBarButton(mapPane); statusLineManager.add(filler); statusLineManager.add(crsButton); statusLineManager.update(true); new StatusBarNotifier(this, mapPane); } return mainComposite; }
From source file:ummisco.gama.ui.viewers.gis.geotools.SwtMapFrame.java
@Override @SuppressWarnings("unused") protected Control createContents(final Composite parent) { final String title = content.getTitle(); content.layers();//from w w w . j ava 2 s. c o m if (title != null) { getShell().setText(title); } Composite mainComposite = null; if (showLayerTable) { final SashForm sashForm = new SashForm(parent, SWT.HORIZONTAL | SWT.NULL); mainComposite = sashForm; final MapLayerComposite mapLayerTable = new MapLayerComposite(mainComposite, SWT.BORDER); mapPane = new SwtMapPane(mainComposite, SWT.BORDER | SWT.NO_BACKGROUND); mapPane.setMapContent(content); mapLayerTable.setMapPane(mapPane); sashForm.setWeights(new int[] { 1, 3 }); } else { mainComposite = parent; mapPane = new SwtMapPane(mainComposite, SWT.BORDER | SWT.NO_BACKGROUND); mapPane.setMapContent(content); } // the map pane is the one element that is always displayed mapPane.setBackground(WorkbenchHelper.getDisplay().getSystemColor(SWT.COLOR_WHITE)); mapPane.setRenderer(renderer); // drawAction.setMapPane(mapPane); infoAction.setMapPane(mapPane); panAction.setMapPane(mapPane); resetAction.setMapPane(mapPane); zoominAction.setMapPane(mapPane); zoomoutAction.setMapPane(mapPane); openShapeAction.setMapPane(mapPane); openCoverageAction.setMapPane(mapPane); final StatusLineManager statusLineManager = getStatusLineManager(); if (statusLineManager != null) { final IContributionItem filler = new ControlContribution( "ummisco.gama.ui.viewers.gis.geotools.SwtMapFrame.ID") { @Override protected Control createControl(final Composite parent) { final Label almostParent = new Label(parent, SWT.NONE); final StatusLineLayoutData statusLineLayoutData = new StatusLineLayoutData(); statusLineLayoutData.widthHint = 1; statusLineLayoutData.heightHint = 45; almostParent.setLayoutData(statusLineLayoutData); return almostParent; } }; final CrsStatusBarButton crsButton = new CrsStatusBarButton(mapPane); statusLineManager.add(filler); statusLineManager.add(crsButton); statusLineManager.update(true); new StatusBarNotifier(this, mapPane); } return mainComposite; }