/** * Creates a <code>NavigationAction</code>. * * @param next if <code>true</code> action goes to the next difference; otherwise to the previous difference. */ public NavigationAction(boolean next) { this(CompareUI.getResourceBundle(), next); }
/** * Creates a <code>NavigationAction</code>. * * @param next if <code>true</code> action goes to the next difference; otherwise to the previous difference. */ public NavigationAction(boolean next) { this(CompareUI.getResourceBundle(), next); }
public static String getString(String key) { try { return CompareUI.getResourceBundle().getString(key); } catch (MissingResourceException e) { return "!" + key + "!"; //$NON-NLS-2$ //$NON-NLS-1$ } }
public static String getString(String key) { try { return CompareUI.getResourceBundle().getString(key); } catch (MissingResourceException e) { return "!" + key + "!"; //$NON-NLS-2$ //$NON-NLS-1$ } }
public static String getFormattedString(String key, String arg) { try { return MessageFormat.format(CompareUI.getResourceBundle().getString(key), arg); } catch (MissingResourceException e) { return "!" + key + "!"; //$NON-NLS-2$ //$NON-NLS-1$ } }
public static String getFormattedString(String key, String arg0, String arg1) { try { return MessageFormat.format(CompareUI.getResourceBundle().getString(key), new String[] { arg0, arg1 }); } catch (MissingResourceException e) { return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$ } }
public static String getFormattedString(String key, String arg0, String arg1) { try { return MessageFormat.format(CompareUI.getResourceBundle().getString(key), arg0, arg1); } catch (MissingResourceException e) { return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$ } }
public static String getFormattedString(String key, String arg) { try { return MessageFormat.format(CompareUI.getResourceBundle().getString(key), new String[] { arg }); } catch (MissingResourceException e) { return "!" + key + "!"; //$NON-NLS-2$ //$NON-NLS-1$ } }
public CompareEditorContributor() { ResourceBundle bundle= CompareUI.getResourceBundle(); IWorkbenchHelpSystem helpSystem= PlatformUI.getWorkbench().getHelpSystem(); fIgnoreWhitespace= ChangePropertyAction.createIgnoreWhiteSpaceAction(bundle, null); helpSystem.setHelp(fIgnoreWhitespace, ICompareContextIds.IGNORE_WHITESPACE_ACTION); fNext= new NavigationAction(bundle, true); helpSystem.setHelp(fNext, ICompareContextIds.GLOBAL_NEXT_DIFF_ACTION); fPrevious= new NavigationAction(bundle, false); helpSystem.setHelp(fPrevious, ICompareContextIds.GLOBAL_PREVIOUS_DIFF_ACTION); fToolbarNext= new NavigationAction(bundle, true); helpSystem.setHelp(fToolbarNext, ICompareContextIds.NEXT_DIFF_ACTION); fToolbarPrevious= new NavigationAction(bundle, false); helpSystem.setHelp(fToolbarPrevious, ICompareContextIds.PREVIOUS_DIFF_ACTION); }
public CompareEditorContributor() { ResourceBundle bundle= CompareUI.getResourceBundle(); IWorkbenchHelpSystem helpSystem= PlatformUI.getWorkbench().getHelpSystem(); fIgnoreWhitespace= ChangePropertyAction.createIgnoreWhiteSpaceAction(bundle, null); helpSystem.setHelp(fIgnoreWhitespace, ICompareContextIds.IGNORE_WHITESPACE_ACTION); fNext= new NavigationAction(bundle, true); helpSystem.setHelp(fNext, ICompareContextIds.GLOBAL_NEXT_DIFF_ACTION); fPrevious= new NavigationAction(bundle, false); helpSystem.setHelp(fPrevious, ICompareContextIds.GLOBAL_PREVIOUS_DIFF_ACTION); fToolbarNext= new NavigationAction(bundle, true); helpSystem.setHelp(fToolbarNext, ICompareContextIds.NEXT_DIFF_ACTION); fToolbarPrevious= new NavigationAction(bundle, false); helpSystem.setHelp(fToolbarPrevious, ICompareContextIds.PREVIOUS_DIFF_ACTION); }
/** * Adds standard actions to the given <code>ToolBarManager</code>. * <p> * Subclasses may override to add their own actions. * </p> * * @param toolBarManager the <code>ToolBarManager</code> to which to contribute */ public void contributeToToolBar(ToolBarManager toolBarManager) { ResourceBundle bundle= CompareUI.getResourceBundle(); ChangePropertyAction ignoreWhitespace= ChangePropertyAction.createIgnoreWhiteSpaceAction(bundle, getCompareConfiguration()); toolBarManager.getControl().addDisposeListener(ignoreWhitespace); ChangePropertyAction showPseudoConflicts= ChangePropertyAction.createShowPseudoConflictsAction(bundle, getCompareConfiguration()); toolBarManager.getControl().addDisposeListener(showPseudoConflicts); toolBarManager.add(new Separator()); toolBarManager.add(ignoreWhitespace); toolBarManager.add(showPseudoConflicts); }
/** * Adds standard actions to the given <code>ToolBarManager</code>. * <p> * Subclasses may override to add their own actions. * </p> * * @param toolBarManager the <code>ToolBarManager</code> to which to contribute */ public void contributeToToolBar(ToolBarManager toolBarManager) { ResourceBundle bundle= CompareUI.getResourceBundle(); ChangePropertyAction ignoreWhitespace= ChangePropertyAction.createIgnoreWhiteSpaceAction(bundle, getCompareConfiguration()); toolBarManager.getControl().addDisposeListener(ignoreWhitespace); ChangePropertyAction showPseudoConflicts= ChangePropertyAction.createShowPseudoConflictsAction(bundle, getCompareConfiguration()); toolBarManager.getControl().addDisposeListener(showPseudoConflicts); toolBarManager.add(new Separator()); toolBarManager.add(ignoreWhitespace); toolBarManager.add(showPseudoConflicts); }