org.eclipse.ui.internal.WorkbenchMessages Java Examples
The following examples show how to use
org.eclipse.ui.internal.WorkbenchMessages.
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: FilteredTreeComposite.java From nebula with Eclipse Public License 2.0 | 6 votes |
/** * Create the button that clears the text. * * @param parent parent <code>Composite</code> of toolbar button */ private void createClearText(Composite parent) { // only create the button if the text widget doesn't support one // natively if ((filterText.getStyle() & SWT.CANCEL) == 0) { filterToolBar = new ToolBarManager(SWT.FLAT | SWT.HORIZONTAL); filterToolBar.createControl(parent); IAction clearTextAction = new Action("", IAction.AS_PUSH_BUTTON) {//$NON-NLS-1$ @Override public void run() { clearText(); } }; clearTextAction.setToolTipText(WorkbenchMessages.FilteredTree_ClearToolTip); clearTextAction.setImageDescriptor(XViewerImageCache.getImageDescriptor("clear.gif")); //$NON-NLS-1$ clearTextAction.setDisabledImageDescriptor(JFaceResources.getImageRegistry().getDescriptor(DCLEAR_ICON)); filterToolBar.add(clearTextAction); } }
Example #2
Source File: FileStoreSelectDialog.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
private void createFilter(final Composite listComposite) { final Text fileStoreListFilter = new Text(listComposite, SWT.BORDER | SWT.SEARCH | SWT.ICON_SEARCH | SWT.ICON_CANCEL); fileStoreListFilter.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create()); fileStoreListFilter.setMessage(WorkbenchMessages.FilteredTree_FilterMessage); fileStoreListFilter.addModifyListener(new ModifyListener() { private ViewerFilter filter; @Override public void modifyText(final ModifyEvent e) { final String textForFiltering = fileStoreListFilter.getText(); if (filter != null) { fileStoreListViewer.removeFilter(filter); } if (textForFiltering != null && !textForFiltering.isEmpty()) { filter = new ViewerFilterOnFileStoreName(textForFiltering); fileStoreListViewer.addFilter(filter); } } }); }
Example #3
Source File: AboutDialog.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
/** * Create an instance of the AboutDialog for the given window. * @param parentShell The parent of the dialog. */ public AboutDialog(Shell parentShell) { super(parentShell); product = Platform.getProduct(); if (product != null) { productName = product.getName(); } if (productName == null) { productName = WorkbenchMessages.AboutDialog_defaultProductName; } // create a descriptive object for each BundleGroup IBundleGroupProvider[] providers = Platform.getBundleGroupProviders(); LinkedList groups = new LinkedList(); if (providers != null) { for (int i = 0; i < providers.length; ++i) { IBundleGroup[] bundleGroups = providers[i].getBundleGroups(); for (int j = 0; j < bundleGroups.length; ++j) { groups.add(new AboutBundleGroupData(bundleGroups[j])); } } } bundleGroupInfos = (AboutBundleGroupData[]) groups .toArray(new AboutBundleGroupData[0]); }
Example #4
Source File: FilteredItemsSelectionDialog.java From tlaplus with MIT License | 6 votes |
/** * Refreshes the details field according to the current selection in the * items list. */ private void refreshDetails() { StructuredSelection selection = getSelectedItems(); switch (selection.size()) { case 0: details.setInput(null); break; case 1: details.setInput(selection.getFirstElement()); break; default: details .setInput(NLS .bind( WorkbenchMessages.FilteredItemsSelectionDialog_nItemsSelected, new Integer(selection.size()))); break; } }
Example #5
Source File: FilteredItemsSelectionDialog.java From tlaplus with MIT License | 6 votes |
/** * Hook that allows to add actions to the context menu. * <p> * Subclasses may extend in order to add other actions.</p> * * @param menuManager the context menu manager * @since 3.5 */ protected void fillContextMenu(IMenuManager menuManager) { List selectedElements= ((StructuredSelection)list.getSelection()).toList(); Object item= null; for (Iterator it= selectedElements.iterator(); it.hasNext();) { item= it.next(); if (item instanceof ItemsListSeparator || !isHistoryElement(item)) { return; } } if (selectedElements.size() > 0) { removeHistoryItemAction.setText(WorkbenchMessages.FilteredItemsSelectionDialog_removeItemsFromHistoryAction); menuManager.add(removeHistoryActionContributionItem); } }
Example #6
Source File: AboutDialog.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
/** * Add buttons to the dialog's button bar. * * Subclasses should override. * * @param parent * the button bar composite */ protected void createButtonsForButtonBar(Composite parent) { parent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); createButton(parent, DETAILS_ID, WorkbenchMessages.AboutDialog_DetailsButton, false); Label l = new Label(parent, SWT.NONE); l.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); GridLayout layout = (GridLayout) parent.getLayout(); layout.numColumns++; layout.makeColumnsEqualWidth = false; Button b = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true); b.setFocus(); }
Example #7
Source File: FilteredItemsSelectionDialog.java From tlaplus with MIT License | 6 votes |
/** * Stores dialog settings. * * @param settings * settings used to store dialog */ protected void storeDialog(IDialogSettings settings) { settings.put(SHOW_STATUS_LINE, toggleStatusLineAction.isChecked()); XMLMemento memento = XMLMemento.createWriteRoot(HISTORY_SETTINGS); this.contentProvider.saveHistory(memento); StringWriter writer = new StringWriter(); try { memento.save(writer); settings.put(HISTORY_SETTINGS, writer.getBuffer().toString()); } catch (IOException e) { // Simply don't store the settings StatusManager .getManager() .handle( new Status( IStatus.ERROR, PlatformUI.PLUGIN_ID, IStatus.ERROR, WorkbenchMessages.FilteredItemsSelectionDialog_storeError, e)); } }
Example #8
Source File: TmMatchEditorBodyMenu.java From translationstudio8 with GNU General Public License v2.0 | 5 votes |
protected CopyAction() { super(WorkbenchMessages.Workbench_copy); setEnabled(false); ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages(); setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY)); setDisabledImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED)); }
Example #9
Source File: PropToPrefLinkArea.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
public PropToPrefLinkArea(Composite parent, int style, final String pageId, String message, final Shell shell, final Object pageData) { /* * breaking new ground yet again - want to link between property and preference paes. ie: project specific debug * engine options to general debugging options */ pageLink = new Link(parent, style); IPreferenceNode node = getPreferenceNode(pageId); String result; if (node == null) { result = NLS.bind(WorkbenchMessages.PreferenceNode_NotFound, pageId); } else { result = MessageFormat.format(message, node.getLabelText()); // only add the selection listener if the node is found pageLink.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { PreferencesUtil.createPreferenceDialogOn(shell, pageId, new String[] { pageId }, pageData).open(); } }); } pageLink.setText(result); }
Example #10
Source File: DiagnoseSelektor.java From elexis-3-core with Eclipse Public License 1.0 | 5 votes |
@Override protected Control createDialogArea(Composite parent){ String oldListLabel = WorkbenchMessages.FilteredItemsSelectionDialog_listLabel; setMessage(Messages.DiagnoseSelektorDialog_Message); WorkbenchMessages.FilteredItemsSelectionDialog_listLabel = ""; //$NON-NLS-1$ Control ret = super.createDialogArea(parent); WorkbenchMessages.FilteredItemsSelectionDialog_listLabel = oldListLabel; return ret; }
Example #11
Source File: PropertyLinkArea.java From APICloud-Studio with GNU General Public License v3.0 | 5 votes |
public PropertyLinkArea(Composite parent, int style, final String pageId, IAdaptable element, String message, final IWorkbenchPreferenceContainer pageContainer) { this.element = element; pageLink = new Link(parent, style); IPreferenceNode node = getPreferenceNode(pageId); String text = null; if (node == null) { text = NLS.bind(WorkbenchMessages.PreferenceNode_NotFound, pageId); } else { text = NLS.bind(message, node.getLabelText()); } pageLink.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { pageContainer.openPage(pageId, null); } }); pageLink.setText(text); }
Example #12
Source File: TmMatchEditorBodyMenu.java From translationstudio8 with GNU General Public License v2.0 | 5 votes |
protected PasteAction() { super(WorkbenchMessages.Workbench_paste); setEnabled(false); ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages(); setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE)); setDisabledImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_DISABLED)); }
Example #13
Source File: TmMatchEditorBodyMenu.java From translationstudio8 with GNU General Public License v2.0 | 5 votes |
protected CutAction() { super(WorkbenchMessages.Workbench_cut); setEnabled(false); ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages(); setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_CUT)); setDisabledImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_CUT_DISABLED)); }
Example #14
Source File: TmMatchEditorBodyMenu.java From translationstudio8 with GNU General Public License v2.0 | 5 votes |
protected UndoAction() { super(WorkbenchMessages.Workbench_undo); setEnabled(false); ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages(); setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_UNDO)); setDisabledImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_UNDO_DISABLED)); }
Example #15
Source File: TmMatchEditorBodyMenu.java From translationstudio8 with GNU General Public License v2.0 | 5 votes |
protected RedoAction() { super(WorkbenchMessages.Workbench_redo); setEnabled(false); ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages(); setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_REDO)); setDisabledImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_REDO_DISABLED)); }
Example #16
Source File: MatchViewerBodyMenu.java From translationstudio8 with GNU General Public License v2.0 | 5 votes |
CopyAction() { super(WorkbenchMessages.Workbench_copy); ISharedImages sharedImages = view.getSite().getWorkbenchWindow().getWorkbench().getSharedImages(); setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY)); setDisabledImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED)); setEnabled(false); }
Example #17
Source File: PropertiesView.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
@SuppressWarnings("restriction") protected PasteActionHandler() { super(WorkbenchMessages.Workbench_paste); setId("ProperPasteAttribute");//$NON-NLS-1$ setActionDefinitionId(ActionFactory.PASTE.getCommandId()); setImageDescriptor(Activator.getImageDescriptor("images/menu/edit/paste.png")); setEnabled(true); }
Example #18
Source File: PropertiesView.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
protected CopyActionHandler() { super(WorkbenchMessages.Workbench_copy); setId("ProperCopyAttribute");//$NON-NLS-1$ setEnabled(true); setImageDescriptor(Activator.getImageDescriptor("images/menu/edit/copy.png")); setActionDefinitionId(ActionFactory.COPY.getCommandId()); }
Example #19
Source File: TmMatchEditorBodyMenu.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
protected CopyAction() { super(WorkbenchMessages.Workbench_copy); setEnabled(false); ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages(); setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY)); setDisabledImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED)); }
Example #20
Source File: TmMatchEditorBodyMenu.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
protected PasteAction() { super(WorkbenchMessages.Workbench_paste); setEnabled(false); ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages(); setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE)); setDisabledImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_DISABLED)); }
Example #21
Source File: TmMatchEditorBodyMenu.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
protected CutAction() { super(WorkbenchMessages.Workbench_cut); setEnabled(false); ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages(); setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_CUT)); setDisabledImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_CUT_DISABLED)); }
Example #22
Source File: TmMatchEditorBodyMenu.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
protected UndoAction() { super(WorkbenchMessages.Workbench_undo); setEnabled(false); ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages(); setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_UNDO)); setDisabledImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_UNDO_DISABLED)); }
Example #23
Source File: TmMatchEditorBodyMenu.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
protected RedoAction() { super(WorkbenchMessages.Workbench_redo); setEnabled(false); ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages(); setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_REDO)); setDisabledImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_REDO_DISABLED)); }
Example #24
Source File: MatchViewerBodyMenu.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
CopyAction() { super(WorkbenchMessages.Workbench_copy); ISharedImages sharedImages = view.getSite().getWorkbenchWindow().getWorkbench().getSharedImages(); setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY)); setDisabledImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED)); setEnabled(false); }
Example #25
Source File: PyConfigureExceptionDialog.java From Pydev with Eclipse Public License 1.0 | 5 votes |
public PyConfigureExceptionDialog(Shell parentShell, Object input, IStructuredContentProvider contentProvider, ILabelProvider labelProvider, String message) { super(parentShell); setTitle(WorkbenchMessages.ListSelection_title); this.inputElement = input; this.contentProvider = contentProvider; this.labelProvider = labelProvider; if (message != null) { setMessage(message); } else { setMessage(WorkbenchMessages.ListSelection_message); } }
Example #26
Source File: GlobalActions.java From elexis-3-core with Eclipse Public License 1.0 | 5 votes |
/** * Create a new <code>OpenPreferenceAction</code> and initialize it from the * given resource bundle. * * @param window */ public OpenPreferencesAction(IWorkbenchWindow window) { super(WorkbenchMessages.OpenPreferences_text); if (window == null) { throw new IllegalArgumentException(); } this.workbenchWindow = window; // @issue action id not set setToolTipText(WorkbenchMessages.OpenPreferences_toolTip); window.getWorkbench().getHelpSystem().setHelp(this, IWorkbenchHelpContextIds.OPEN_PREFERENCES_ACTION); }
Example #27
Source File: BlockSelektor.java From elexis-3-core with Eclipse Public License 1.0 | 5 votes |
@Override protected Control createDialogArea(Composite parent){ String oldListLabel = WorkbenchMessages.FilteredItemsSelectionDialog_listLabel; setMessage(""); WorkbenchMessages.FilteredItemsSelectionDialog_listLabel = ""; //$NON-NLS-1$ Control ret = super.createDialogArea(parent); WorkbenchMessages.FilteredItemsSelectionDialog_listLabel = oldListLabel; return ret; }
Example #28
Source File: FilteredTreeComposite.java From nebula with Eclipse Public License 2.0 | 5 votes |
/** * Create the filtered tree. * * @param treeStyle the style bits for the <code>Tree</code> * @param filter the filter to be used * @since 3.3 */ protected void init(int treeStyle, PatternFilter filter) { patternFilter = filter; showFilterControls = true; if (!XViewerDisplay.isStandaloneXViewer() && XViewerDisplay.isWorkbenchRunning()) { showFilterControls = PlatformUI.getPreferenceStore().getBoolean(IWorkbenchPreferenceConstants.SHOW_FILTERED_TEXTS); } createControl(parent, treeStyle); createRefreshJob(); setInitialText(WorkbenchMessages.FilteredTree_FilterMessage); setFont(parent.getFont()); }
Example #29
Source File: FilteredItemsSelectionDialog.java From tlaplus with MIT License | 5 votes |
/** * Creates a new instance of the class. * * @param shell * shell to parent the dialog on * @param multi * indicates whether dialog allows to select more than one * position in its list of items */ public FilteredItemsSelectionDialog(Shell shell, boolean multi) { super(shell); this.multi = multi; filterHistoryJob = new FilterHistoryJob(); filterJob = new FilterJob(); contentProvider = new ContentProvider(); refreshCacheJob = new RefreshCacheJob(); itemsListSeparator = new ItemsListSeparator( WorkbenchMessages.FilteredItemsSelectionDialog_separatorLabel); selectionMode = NONE; }
Example #30
Source File: FilteredItemsSelectionDialog.java From tlaplus with MIT License | 5 votes |
/** * Executes job using the given filtering progress monitor. A hook for * subclasses. * * @param monitor * progress monitor * @return result of the execution */ protected IStatus doRun(GranualProgressMonitor monitor) { try { internalRun(monitor); } catch (CoreException e) { cancel(); return new Status( IStatus.ERROR, PlatformUI.PLUGIN_ID, IStatus.ERROR, WorkbenchMessages.FilteredItemsSelectionDialog_jobError, e); } return Status.OK_STATUS; }