/** * Returns the title which will be used in the compare editor's title bar. * It can be set with <code>setTitle</code>. * * @return the title */ public String getTitle() { if (fTitle == null) return Utilities.getString("CompareEditorInput.defaultTitle"); //$NON-NLS-1$ return fTitle; }
/** * Create a new ZipFileStructureCreator. */ public ZipFileStructureCreator() { this(Utilities.getString("ZipStructureCreator.name")); //$NON-NLS-1$ }
/** * Create a new ZipFileStructureCreator. */ public ZipFileStructureCreator() { this(Utilities.getString("ZipStructureCreator.name")); //$NON-NLS-1$ }
/** * Returns the title which will be used in the compare editor's title bar. * It can be set with <code>setTitle</code>. * * @return the title */ public String getTitle() { if (fTitle == null) return Utilities.getString("CompareEditorInput.defaultTitle"); //$NON-NLS-1$ return fTitle; }
public String getText(Object element) { if (element instanceof IDiffElement) return ((IDiffElement)element).getName(); return Utilities.getString(fBundle, "defaultLabel"); //$NON-NLS-1$ }
@Override public String getText(Object element) { if (element instanceof IDiffElement) return ((IDiffElement) element).getName(); return Utilities.getString(fBundle, "defaultLabel"); //$NON-NLS-1$ }
/** * Returns the viewer's name. * * @return the viewer's name */ public String getTitle() { return Utilities.getString(getResourceBundle(), "title"); //$NON-NLS-1$ }
/** * Returns the viewer's name. * * @return the viewer's name */ public String getTitle() { return Utilities.getString(getResourceBundle(), "title"); //$NON-NLS-1$ }
public void execute(IProgressMonitor pm) throws InvocationTargetException { try { String taskName= Utilities.getString(bundle, "taskName"); //$NON-NLS-1$ pm.beginTask(taskName, IProgressMonitor.UNKNOWN); file.setContents(sa.getContents(), false, true, pm); } catch (CoreException e) { throw new InvocationTargetException(e); } finally { pm.done(); } } };
public void setInput(IEditorInput input) { if (!(input instanceof CompareEditorInput)) { IStatus s= new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, IStatus.OK, Utilities.getString("CompareEditor.invalidInput"), null); //$NON-NLS-1$ String title= Utilities.getString("CompareEditor.error.setinput.title"); //$NON-NLS-1$ String msg= Utilities.getString("CompareEditor.error.setinput.message"); //$NON-NLS-1$ ErrorDialog.openError(getSite().getShell(), title, msg, s); return; } doSetInput(input); // Need to refresh the contributor (see #67888) refreshActionBarsContributor(); }
@Override protected void createButtonsForButtonBar(Composite parent) { String buttonLabel= Utilities.getString(fBundle, "buttonLabel", IDialogConstants.OK_LABEL); //$NON-NLS-1$ // a 'Cancel' and a 'Add' button fCommitButton= createButton(parent, IDialogConstants.OK_ID, buttonLabel, true); fCommitButton.setEnabled(false); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
protected String getEditionLabel(HistoryInput input) { String format= Utilities.getString(fBundle, "historyEditionLabel", null); //$NON-NLS-1$ if (format == null) format= Utilities.getString(fBundle, "editionLabel"); //$NON-NLS-1$ if (format == null) format= "x{0}"; //$NON-NLS-1$ long modDate= input.getModificationDate(); String date= DateFormat.getDateTimeInstance().format(new Date(modDate)); return MessageFormat.format(format, new Object[] { date }); }
protected String getEditionLabel(HistoryInput input) { String format= Utilities.getString(fBundle, "historyEditionLabel", null); //$NON-NLS-1$ if (format == null) format= Utilities.getString(fBundle, "editionLabel"); //$NON-NLS-1$ if (format == null) format= "x{0}"; //$NON-NLS-1$ long modDate= input.getModificationDate(); String date= DateFormat.getDateTimeInstance().format(new Date(modDate)); return MessageFormat.format(format, date); }
public AddFromHistoryDialog(Shell parent, ResourceBundle bundle) { super(parent, bundle); String iconName= Utilities.getString(fBundle, "dateIcon", "obj16/day_obj.png"); //$NON-NLS-2$ //$NON-NLS-1$ ImageDescriptor id= CompareUIPlugin.getImageDescriptor(iconName); if (id != null) fDateImage= id.createImage(); iconName= Utilities.getString(fBundle, "timeIcon", "obj16/resource_obj.png"); //$NON-NLS-1$ //$NON-NLS-2$ id= CompareUIPlugin.getImageDescriptor(iconName); if (id != null) fTimeImage= id.createImage(); }
protected void createButtonsForButtonBar(Composite parent) { String buttonLabel= Utilities.getString(fBundle, "buttonLabel", IDialogConstants.OK_LABEL); //$NON-NLS-1$ if (fCompareMode) { // only a 'Done' button createButton(parent, IDialogConstants.CANCEL_ID, buttonLabel, false); } else { // a 'Cancel' and a 'Add/Replace' button fCommitButton= createButton(parent, IDialogConstants.OK_ID, buttonLabel, true); fCommitButton.setEnabled(false); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); } }
private Diff findDiff(char type, int pos) { try { return fMerger.findDiff(type, pos); } catch (CoreException e) { CompareUIPlugin.log(e.getStatus()); String title= Utilities.getString(getResourceBundle(), "tooComplexError.title"); //$NON-NLS-1$ String msg= Utilities.getString(getResourceBundle(), "tooComplexError.message"); //$NON-NLS-1$ MessageDialog.openError(fComposite.getShell(), title, msg); return null; } }
public void init(IEditorSite site, IEditorInput input) throws PartInitException { if (!(input instanceof CompareEditorInput)) throw new PartInitException(Utilities.getString("CompareEditor.invalidInput")); //$NON-NLS-1$ setSite(site); setInput(input); }
public ImageMergeViewer(Composite parent, int styles, CompareConfiguration mp) { super(styles, ResourceBundle.getBundle(BUNDLE_NAME), mp); PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, ICompareContextIds.IMAGE_COMPARE_VIEW); buildControl(parent); String title= Utilities.getString(getResourceBundle(), "title"); //$NON-NLS-1$ getControl().setData(CompareUI.COMPARE_VIEWER_TITLE, title); }