List of usage examples for org.eclipse.jface.action IStatusLineManager setMessage
public void setMessage(Image image, String message);
From source file:alma.acs.alarmsanalyzer.ApplicationWorkbenchWindowAdvisor.java
License:Open Source License
@Override public void postWindowOpen() { IStatusLineManager statusline = getWindowConfigurer().getActionBarConfigurer().getStatusLineManager(); statusline.setMessage(null, "Application started"); }
From source file:com.drgarbage.bytecodevisualizer.view.OperandStackViewPage.java
License:Apache License
private void setMesssageInStatusLine() { if (methodInput == null) { return;/*w w w . ja va 2 s .c o m*/ } IActionBars bars = getSite().getActionBars(); IStatusLineManager slm = bars.getStatusLineManager(); /* * DO NOT DELETE THIS LINE. * This is probably a bug in the StatusLineManeger implementation. * The setMessage() is first visible if the error message has * been cleaned by the setErrorMessage(""); */ slm.setErrorMessage(""); if (operandStack.getMaxStackSize() > methodInput.getMaxStack()) { StringBuffer buf = new StringBuffer(); buf.append(CoreMessages.Error); buf.append(JavaLexicalConstants.COLON); buf.append(JavaLexicalConstants.SPACE); buf.append(BytecodeVisualizerMessages.OperandStackAnalysis_Error_StackOverflow); buf.append(JavaLexicalConstants.COMMA); buf.append(JavaLexicalConstants.SPACE); buf.append("max_stack is "); //$NON-NLS-1$ buf.append(methodInput.getMaxStack()); buf.append(", calculated max stack size is "); //$NON-NLS-1$ buf.append(operandStack.getMaxStackSize()); buf.append(JavaLexicalConstants.DOT); slm.setErrorMessage( PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_ERROR_TSK), buf.toString()); } else if (operandStack.getMaxStackSize() < methodInput.getMaxStack()) { StringBuffer buf = new StringBuffer(); buf.append(CoreMessages.Warning); buf.append(JavaLexicalConstants.COLON); buf.append(JavaLexicalConstants.SPACE); buf.append(BytecodeVisualizerMessages.OperandStackAnalysis_Warning_StackUnderflow); buf.append(JavaLexicalConstants.COMMA); buf.append(JavaLexicalConstants.SPACE); buf.append("max_stack is "); //$NON-NLS-1$ buf.append(methodInput.getMaxStack()); buf.append(", calculated max stack size is "); //$NON-NLS-1$ buf.append(operandStack.getMaxStackSize()); buf.append(JavaLexicalConstants.DOT); slm.setMessage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_WARN_TSK), buf.toString()); } else { StringBuffer buf = new StringBuffer(); buf.append("max_stack: "); //$NON-NLS-1$ buf.append(methodInput.getMaxStack()); buf.append(", max_locals: "); //$NON-NLS-1$ buf.append(methodInput.getMaxLocals()); slm.setMessage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_INFO_TSK), buf.toString()); } slm.update(true); }
From source file:com.ebmwebsourcing.petals.studio.welcome.PetalsStudioWelcomePage.java
License:Open Source License
/** * Adds the presentation group./* w w w . j a v a2 s .co m*/ * @param outerContainer */ private void addPresentationWidget(Composite outerContainer) { Composite container = new Composite(outerContainer, SWT.BORDER); container.setBackground(outerContainer.getDisplay().getSystemColor(SWT.COLOR_WHITE)); GridLayout layout = new GridLayout(); layout.marginHeight = 10; layout.marginWidth = 15; container.setLayout(layout); GridData layoutData = new GridData(SWT.CENTER, SWT.DEFAULT, true, true); layoutData.verticalIndent = 20; container.setLayoutData(layoutData); // Title & introduction Label label = new Label(container, SWT.NONE); label.setText("Welcome into the Petals Studio!"); label.setFont(this.titleFont); label.setForeground(this.purpleColor); layoutData = new GridData(SWT.CENTER, SWT.DEFAULT, true, false); layoutData.verticalIndent = 10; label.setLayoutData(layoutData); label = new Label(container, SWT.WRAP); label.setText("Petals Studio is a set of tools for Petals ESB."); layoutData = new GridData(); layoutData.verticalIndent = 15; label.setLayoutData(layoutData); label = new Label(container, SWT.WRAP); label.setText( "Petals ESB is a distributed platform to interconnect heteregenous applications and services."); // Features Composite section = new Composite(container, SWT.NONE); layout = new GridLayout(2, false); layout.marginWidth = 0; layout.marginTop = 11; section.setLayout(layout); section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); FontData[] fs = label.getFont().getFontData(); fs = SwtJFaceUtils.changeFontDataSize(fs, 12); fs = SwtJFaceUtils.getModifiedFontData(fs, SWT.BOLD); this.subTitleFont = new Font(label.getDisplay(), fs); label = new Label(section, SWT.NONE); label.setText("Features"); label.setFont(this.subTitleFont); label.setForeground(this.purpleColor); label = new Label(section, SWT.SEPARATOR | SWT.HORIZONTAL); label.setLayoutData(new GridData(SWT.FILL, SWT.END, true, true)); // StringBuilder sb = new StringBuilder(); sb.append("<form>"); sb.append("Petals Studio provides tools to:"); sb.append("<li indent=\"15\">Create and export configurations for Petals components.</li>"); sb.append("<li indent=\"15\">Create and export BPEL processes and SCA applications for Petals ESB.</li>"); sb.append("<li indent=\"15\">Create and debug Petals components.</li>"); sb.append("</form>"); FormText formText = new FormText(container, SWT.WRAP | SWT.NO_FOCUS); formText.setText(sb.toString(), true, false); // Links this.orangeColor = new Color(label.getDisplay(), 228, 98, 17); section = new Composite(container, SWT.NONE); layout = new GridLayout(2, false); layout.marginWidth = 0; layout.marginTop = 14; section.setLayout(layout); section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); label = new Label(section, SWT.NONE); label.setText("Links"); label.setFont(this.subTitleFont); label.setForeground(this.purpleColor); label = new Label(section, SWT.SEPARATOR | SWT.HORIZONTAL); label.setLayoutData(new GridData(SWT.FILL, SWT.END, true, true)); // sb = new StringBuilder(); sb.append("<form>"); sb.append( "<li indent=\"15\">Find documentation on <a href=\"http://doc.petalslink.com/display/petalsstudio\">Petals Link's wiki</a>.</li>"); sb.append( "<li indent=\"15\">Ask community help on <a href=\"http://www.ebmwebsourcing.com/forum/\">Petals Link's forum</a>.</li>"); sb.append( "<li indent=\"15\">Get training, expertise and support on <a href=\"http://petalslink.com/en/services\">Petals Link's website</a>.</li>"); sb.append("</form>"); HyperlinkSettings settings = new HyperlinkSettings(label.getDisplay()); settings.setActiveForeground(this.orangeColor); settings.setForeground(this.orangeColor); settings.setHyperlinkUnderlineMode(HyperlinkSettings.UNDERLINE_HOVER); formText = new FormText(container, SWT.WRAP | SWT.NO_FOCUS); formText.setHyperlinkSettings(settings); formText.setText(sb.toString(), true, true); formText.addHyperlinkListener(new HyperlinkAdapter() { @Override public void linkActivated(HyperlinkEvent e) { try { URL url = new URL((String) e.getHref()); PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser().openURL(url); } catch (Exception e1) { PetalsStudioPlugin.log(e1, IStatus.ERROR); } } @Override public void linkEntered(HyperlinkEvent e) { IStatusLineManager manager = getIntroSite().getActionBars().getStatusLineManager(); manager.setMessage(PetalsStudioWelcomePage.this.iconImage, (String) e.getHref()); } @Override public void linkExited(HyperlinkEvent e) { IStatusLineManager manager = getIntroSite().getActionBars().getStatusLineManager(); manager.setMessage(null, ""); } }); }
From source file:com.kopson.cite.application.ApplicationWorkbenchWindowAdvisor.java
License:Open Source License
/** * Handle status line change event./* ww w . java2s. c o m*/ */ private void initStatusLine() { statusImage = AbstractUIPlugin.imageDescriptorFromPlugin(Activator.PLUGIN_ID, IImageKeys.TRY_ITEM_ICON) .createImage(); IStatusLineManager statusline = getWindowConfigurer().getActionBarConfigurer().getStatusLineManager(); statusline.setMessage(statusImage, CITE.STATUS_MESSAGE); }
From source file:fr.imag.adele.cadse.si.workspace.uiplatform.swt.SWTUIPlatform.java
License:Apache License
public void setMessage(String newMessage, int newType) { if (_pageSite != null) { IStatusLineManager statusLine = _pageSite.getActionBars().getStatusLineManager(); if (statusLine != null) { Image newImage = null; if (newMessage != null) { switch (newType) { case IMessageProvider.NONE: break; case IMessageProvider.INFORMATION: newImage = JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_INFO); break; case IMessageProvider.WARNING: newImage = JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_WARNING); break; case IMessageProvider.ERROR: newImage = JFaceResources.getImage(Dialog.DLG_IMG_MESSAGE_ERROR); break; }//from ww w .ja va2 s .c o m if (newType == UIPlatform.ERROR) { statusLine.setErrorMessage(newImage, newMessage); } else { statusLine.setMessage(newImage, newMessage); } } else { statusLine.setErrorMessage(null); statusLine.setMessage(null); } } } else if (dialog != null) { if (newMessage != null) { if (newType == UIPlatform.ERROR) { dialog.setErrorMessage(newMessage); IWizardPage page = dialog.getCurrentPage(); if (page instanceof WizardPage) ((WizardPage) page).setPageComplete(false); } else { dialog.setMessage(newMessage, newType); IWizardPage page = dialog.getCurrentPage(); if (page instanceof WizardPage) ((WizardPage) page).setPageComplete(true); } } else { dialog.setErrorMessage(null); dialog.setMessage(null); IWizardPage page = dialog.getCurrentPage(); if (page instanceof WizardPage) ((WizardPage) page).setPageComplete(true); } } }
From source file:org.bbaw.pdr.ae.rap2.ApplicationWorkbenchWindowAdvisor.java
License:Open Source License
@Override public void postWindowCreate() { Shell shell = getWindowConfigurer().getWindow().getShell(); shell.setMaximized(true);/*from www . j a va 2 s . c om*/ IStatusLineManager statusline = getWindowConfigurer().getActionBarConfigurer().getStatusLineManager(); statusline.setMessage(null, "Status line is ready"); }
From source file:org.bbaw.pdr.ae.standalone.ApplicationWorkbenchWindowAdvisor.java
License:Open Source License
@Override public void postWindowOpen() { IStatusLineManager statusline = getWindowConfigurer().getActionBarConfigurer().getStatusLineManager(); statusline.setMessage(null, "Ready"); boolean advanced = Platform.getPreferencesService().getBoolean(CommonActivator.PLUGIN_ID, "AE_ADVANCED_VERSION", AEConstants.AE_ADVANCED_VERSION, null); boolean canSynch = true; String url = Platform.getPreferencesService().getString(CommonActivator.PLUGIN_ID, "REPOSITORY_URL", AEConstants.REPOSITORY_URL, null); int rep = Platform.getPreferencesService().getInt(CommonActivator.PLUGIN_ID, "REPOSITORY_ID", AEConstants.REPOSITORY_ID, null); int pro = Platform.getPreferencesService().getInt(CommonActivator.PLUGIN_ID, "PROJECT_ID", AEConstants.PROJECT_ID, null); if (url == null || "".equals(url.trim()) || "xxx".equals(url) || rep == 0 || pro == 0) { canSynch = false;//from w ww. j ava2s.com } if (PlatformUI.isWorkbenchRunning()) { IWorkbench w = PlatformUI.getWorkbench(); // get the window (which is a IServiceLocator) if (w != null) { IWorkbenchWindow window = w.getActiveWorkbenchWindow(); // get the service ISourceProviderService service = (ISourceProviderService) window .getService(ISourceProviderService.class); // get our source provider by querying by the variable // name AEVersionProvider aeVersionProvider = (AEVersionProvider) service .getSourceProvider(AEPluginIDs.SOURCE_PARAMETER_AE_ADVANCED_VERSION); // String state = (String) // aeVersionProvider.getCurrentState().get( // "org.bbaw.pdr.ae.control.aeAdvancedVersion"); // System.out.println("org.bbaw.pdr.ae.control.aeAdvancedVersion state: " // + state); // set the value aeVersionProvider.setAEAdvancedVersion(advanced); aeVersionProvider.setCanSynchronize(canSynch); // state = (String) aeVersionProvider.getCurrentState().get( // "org.bbaw.pdr.ae.control.aeAdvancedVersion"); // System.out.println("org.bbaw.pdr.ae.control.aeAdvancedVersion state: " // + state); } } }
From source file:org.eclipse.dirigible.ide.common.status.StatusLineManagerUtil.java
License:Open Source License
public static void clearMessages() { UIJob job = new UIJob(CLEAR_MESSAGES_JOB) { @Override/*w ww .ja v a 2s.c o m*/ public IStatus runInUIThread(IProgressMonitor monitor) { final IStatusLineManager statusLineManager = getDefaultStatusLineManager(); statusLineManager.removeAll(); statusLineManager.setMessage(null, null); statusLineManager.setErrorMessage(null, null); return new Status(IStatus.OK, PLUGIN_ID, ""); } }; job.schedule(CLEAR_MESSAGE_JOB_DELAY); }
From source file:org.eclipse.jubula.examples.aut.adder.rcp.ApplicationWorkbenchWindowAdvisor.java
License:Open Source License
@Override public void postWindowOpen() { IStatusLineManager statusline = getWindowConfigurer().getActionBarConfigurer().getStatusLineManager(); statusline.setMessage(null, "Status line"); //$NON-NLS-1$ }
From source file:org.eclipse.mylyn.internal.tasks.ui.views.TaskListView.java
License:Open Source License
public void indicatePaused(boolean paused) { isPaused = paused;//from w w w .j a v a2s .c om IStatusLineManager statusLineManager = getViewSite().getActionBars().getStatusLineManager(); if (isPaused) { statusLineManager.setMessage(CommonImages.getImage(TasksUiImages.TASKS_VIEW), Messages.TaskListView_Mylyn_context_capture_paused); setPartName(Messages.TaskListView__paused_ + LABEL_VIEW); } else { statusLineManager.setMessage(""); //$NON-NLS-1$ setPartName(LABEL_VIEW); } }