org.eclipse.xtext.ui.XtextUIMessages Java Examples
The following examples show how to use
org.eclipse.xtext.ui.XtextUIMessages.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GamlEditor.java From gama with GNU General Public License v3.0 | 6 votes |
@Override protected void rulerContextMenuAboutToShow(final IMenuManager menu) { super.rulerContextMenuAboutToShow(menu); menu.remove("projection"); final IMenuManager foldingMenu = new MenuManager(XtextUIMessages.Editor_FoldingMenu_name, "projection"); //$NON-NLS-1$ menu.appendToGroup(ITextEditorActionConstants.GROUP_RULERS, foldingMenu); IAction action = getAction("FoldingToggle"); //$NON-NLS-1$ foldingMenu.add(action); action = getAction("FoldingExpandAll"); //$NON-NLS-1$ foldingMenu.add(action); action = getAction("FoldingCollapseAll"); //$NON-NLS-1$ foldingMenu.add(action); action = getAction("FoldingCollapseStrings"); //$NON-NLS-1$ foldingMenu.add(action); action = getAction("FoldingRestore"); //$NON-NLS-1$ foldingMenu.add(action); }
Example #2
Source File: SortOutlineContribution.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Override protected void configureAction(Action action) { action.setText(XtextUIMessages.LexicalSortingAction_label); action.setToolTipText(XtextUIMessages.LexicalSortingAction_tooltip); action.setDescription(XtextUIMessages.LexicalSortingAction_description); action.setImageDescriptor(XtextPluginImages.DESC_ALPHAB_SORT_CO); action.setDisabledImageDescriptor(XtextPluginImages.DESC_ALPHAB_SORT_CO_DISABLED); }
Example #3
Source File: LinkWithEditorOutlineContribution.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Override protected void configureAction(Action action) { action.setText(XtextUIMessages.ToggleLinkWithEditorAction_label); action.setToolTipText(XtextUIMessages.ToggleLinkWithEditorAction_toolTip); action.setDescription(XtextUIMessages.ToggleLinkWithEditorAction_description); action.setImageDescriptor(XtextPluginImages.DESC_LINK_WITH_EDITOR); action.setDisabledImageDescriptor(XtextPluginImages.DESC_LINK_WITH_EDITOR_DISABLED); }
Example #4
Source File: XtextEditor.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Override protected void rulerContextMenuAboutToShow(IMenuManager menu) { super.rulerContextMenuAboutToShow(menu); IMenuManager foldingMenu = new MenuManager(XtextUIMessages.Editor_FoldingMenu_name, "projection"); //$NON-NLS-1$ menu.appendToGroup(ITextEditorActionConstants.GROUP_RULERS, foldingMenu); IAction action = getAction("FoldingToggle"); //$NON-NLS-1$ foldingMenu.add(action); action = getAction("FoldingExpandAll"); //$NON-NLS-1$ foldingMenu.add(action); action = getAction("FoldingCollapseAll"); //$NON-NLS-1$ foldingMenu.add(action); action = getAction("FoldingRestore"); //$NON-NLS-1$ foldingMenu.add(action); }
Example #5
Source File: ContentAssistHandler.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Override public Object execute(ExecutionEvent event) throws ExecutionException { // Due to an Handler ExtensionPoint declaration, we have an XtextEditor as Active // Editor so can just cast to an ITextEditor new ContentAssistAction(XtextUIMessages.getResourceBundle(), "ContentAssistProposal.", (ITextEditor) HandlerUtil.getActiveEditor(event)).run(); return this; }
Example #6
Source File: AnnotationWithQuickFixesHover.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
private void createCompletionProposalsControl(Composite parent, ICompletionProposal[] proposals) { Composite composite= new Composite(parent, SWT.NONE); composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); GridLayout layout2= new GridLayout(1, false); layout2.marginHeight= 0; layout2.marginWidth= 0; layout2.verticalSpacing= 2; composite.setLayout(layout2); Label separator= new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL); GridData gridData= new GridData(SWT.FILL, SWT.CENTER, true, false); separator.setLayoutData(gridData); Label quickFixLabel= new Label(composite, SWT.NONE); GridData layoutData= new GridData(SWT.BEGINNING, SWT.CENTER, false, false); layoutData.horizontalIndent= 4; quickFixLabel.setLayoutData(layoutData); String text; if (proposals.length == 1) { // DIFF: replaced JavaHoverMessages with XtextUIMessages (4) text= XtextUIMessages.AnnotationWithQuickFixesHover_message_singleQuickFix; } else { // DIFF: replaced JavaHoverMessages with XtextUIMessages (4) text= MessageFormat.format(XtextUIMessages.AnnotationWithQuickFixesHover_message_multipleQuickFix, new Object[] { String.valueOf(proposals.length) }); } quickFixLabel.setText(text); setColorAndFont(composite, parent.getForeground(), parent.getBackground(), JFaceResources.getDialogFont()); createCompletionProposalsList(composite, proposals); }
Example #7
Source File: ProblemAnnotationHover.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
protected String formatInfo(final Collection<String> messages) { final StringBuilder buffer = new StringBuilder(); if (messages.size() > 1) { buffer.append(XtextUIMessages.AbstractHover_MultipleMarkers); final Iterator<String> e = messages.iterator(); while (e.hasNext()) { splitInfo("- " + e.next() + "\n", buffer); } buffer.deleteCharAt(buffer.length()-1); } else if (messages.size() == 1) { splitInfo(messages.iterator().next(), buffer); } return buffer.toString(); }
Example #8
Source File: DefaultEObjectHoverProvider.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
public BackAction(IXtextBrowserInformationControl infoControl) { fInfoControl = infoControl; setText(XtextUIMessages.XtextBrowserInformationControlInput_Back); ISharedImages images = PlatformUI.getWorkbench().getSharedImages(); setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_BACK)); setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_BACK_DISABLED)); update(); }
Example #9
Source File: DefaultEObjectHoverProvider.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
public void update() { BrowserInformationControlInput current = fInfoControl.getInput(); if (current != null && current.getPrevious() != null) { BrowserInput previous = current.getPrevious(); setToolTipText(MessageFormat.format(XtextUIMessages.XtextBrowserInformationControlInput_BackTo, new Object[] { previous.getInputName() })); setEnabled(true); } else { setToolTipText(XtextUIMessages.XtextBrowserInformationControlInput_Back); setEnabled(false); } }
Example #10
Source File: DefaultEObjectHoverProvider.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
public ForwardAction(IXtextBrowserInformationControl infoControl) { fInfoControl = infoControl; setText(XtextUIMessages.XtextBrowserInformationControlInput_Forward); ISharedImages images = PlatformUI.getWorkbench().getSharedImages(); setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD)); setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD_DISABLED)); update(); }
Example #11
Source File: DefaultEObjectHoverProvider.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
public void update() { BrowserInformationControlInput current = fInfoControl.getInput(); if (current != null && current.getNext() != null) { setToolTipText(MessageFormat.format(XtextUIMessages.XtextBrowserInformationControlInput_ForwardTo, new Object[] { current.getNext().getInputName() })); setEnabled(true); } else { setToolTipText(XtextUIMessages.XtextBrowserInformationControlInput_Forward); setEnabled(false); } }
Example #12
Source File: OverrideIndicatorRulerAction.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Override public void contributeActions(XtextEditor editor) { this.editor = editor; selectMarkerRulerAction = new XtextMarkerRulerAction(XtextUIMessages.getResourceBundle(), "XtextSelectAnnotationRulerAction.", editor, getVerticalRuler()); //$NON-NLS-1$ editor.setAction(ITextEditorActionConstants.RULER_CLICK, this); setEnabled(true); }
Example #13
Source File: OverrideIndicatorRulerAction.java From xtext-xtend with Eclipse Public License 2.0 | 5 votes |
@Override public void run() { if (overrideIndicatorAnnotation != null) { initialize(getResourceBundle(), getResourceKeyPrefix()); runInternal(); } else { initialize(XtextUIMessages.getResourceBundle(), "XtextSelectAnnotationRulerAction."); //$NON-NLS-1$ selectMarkerRulerAction.run(); } }
Example #14
Source File: DefaultEObjectHoverProvider.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
public OpenDeclarationAction(IXtextBrowserInformationControl infoControl) { fInfoControl = infoControl; setText(XtextUIMessages.XtextBrowserInformationControlInput_OpenDeclaration); setImageDescriptor(XtextPluginImages.DESC_OPEN_DECLARATION); setDisabledImageDescriptor(XtextPluginImages.DESC_OPEN_DECLARATION_DISABLED); }
Example #15
Source File: XbaseHoverProvider.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
public ShowInJavadocViewAction(IXtextBrowserInformationControl infoControl) { fInfoControl = infoControl; setText(XtextUIMessages.XtextBrowserInformationControlInput_ShowInJavaDocView); setImageDescriptor(JavaPluginImages.DESC_OBJS_JAVADOCTAG); }
Example #16
Source File: XbaseHoverProvider.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
public OpenDeclarationAction(IXtextBrowserInformationControl infoControl) { fInfoControl = infoControl; setText(XtextUIMessages.XtextBrowserInformationControlInput_OpenDeclaration); JavaPluginImages.setLocalImageDescriptors(this, "goto_input.gif"); //$NON-NLS-1$ }