void createBinding(IConfigurationElement element, String idAttributeName) { String type= element.getAttribute(CONTENT_TYPE_ID_ATTRIBUTE); String id= element.getAttribute(idAttributeName); if (id == null) logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.targetIdAttributeMissing", idAttributeName)); //$NON-NLS-1$ if (type != null && id != null && fIdMap != null) { T o= fIdMap.get(id); if (o != null) { IContentType ct= fgContentTypeManager.getContentType(type); if (ct != null) { if (fContentTypeBindings == null) fContentTypeBindings= new HashMap<>(); List<T> l = fContentTypeBindings.get(ct); if (l == null) fContentTypeBindings.put(ct, l = new ArrayList<>()); l.add(o); } else { logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.contentTypeNotFound", type)); //$NON-NLS-1$ } } else { logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.targetNotFound", id)); //$NON-NLS-1$ } } }
void createBinding(IConfigurationElement element, String idAttributeName) { String type= element.getAttribute(CONTENT_TYPE_ID_ATTRIBUTE); String id= element.getAttribute(idAttributeName); if (id == null) logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.targetIdAttributeMissing", idAttributeName)); //$NON-NLS-1$ if (type != null && id != null && fIdMap != null) { Object o= fIdMap.get(id); if (o != null) { IContentType ct= fgContentTypeManager.getContentType(type); if (ct != null) { if (fContentTypeBindings == null) fContentTypeBindings= new HashMap(); fContentTypeBindings.put(ct, o); } else { logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.contentTypeNotFound", type)); //$NON-NLS-1$ } } else { logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.targetNotFound", id)); //$NON-NLS-1$ } } }
CompareUIPlugin.getPluginId(), VALIDATE_EDIT_PROBLEM, getFormattedString("ValidateEdit.error.stillReadonly", file.getFullPath().toString()), //$NON-NLS-1$ null); modified= addStatus(modified, entry); CompareUIPlugin.getPluginId(), VALIDATE_EDIT_PROBLEM, getFormattedString("ValidateEdit.error.fileModified", file.getFullPath().toString()), //$NON-NLS-1$ null); modified= addStatus(modified, entry);
CompareUIPlugin.getPluginId(), VALIDATE_EDIT_PROBLEM, getFormattedString("ValidateEdit.error.stillReadonly", file.getFullPath().toString()), //$NON-NLS-1$ null); modified= addStatus(modified, error); CompareUIPlugin.getPluginId(), VALIDATE_EDIT_PROBLEM, getFormattedString("ValidateEdit.error.fileModified", file.getFullPath().toString()), //$NON-NLS-1$ null); modified= addStatus(modified, error);
if (!CONTENT_TYPE_BINDING.equals(name)) { if (!STRUCTURE_CREATOR.equals(name)) logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.unexpectedTag", name, STRUCTURE_CREATOR)); //$NON-NLS-1$ fStructureCreators.register(element, new StructureCreatorDescriptor(element)); if (!CONTENT_TYPE_BINDING.equals(name)) { if (!VIEWER_TAG.equals(name)) logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.unexpectedTag", name, VIEWER_TAG)); //$NON-NLS-1$ fStructureMergeViewers.register(element, new ViewerDescriptor(element)); if (!CONTENT_TYPE_BINDING.equals(name)) { if (!VIEWER_TAG.equals(name)) logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.unexpectedTag", name, VIEWER_TAG)); //$NON-NLS-1$ fContentMergeViewers.register(element, new ViewerDescriptor(element)); if (!CONTENT_TYPE_BINDING.equals(name)) { if (!VIEWER_TAG.equals(name)) logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.unexpectedTag", name, VIEWER_TAG)); //$NON-NLS-1$ fContentViewers.register(element, new ViewerDescriptor(element));
if (!CONTENT_TYPE_BINDING.equals(name)) { if (!STRUCTURE_CREATOR.equals(name)) logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.unexpectedTag", name, STRUCTURE_CREATOR)); //$NON-NLS-1$ fStructureCreators.register(element, new StructureCreatorDescriptor(element)); if (!CONTENT_TYPE_BINDING.equals(name)) { if (!VIEWER_TAG.equals(name)) logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.unexpectedTag", name, VIEWER_TAG)); //$NON-NLS-1$ fStructureMergeViewers.register(element, new ViewerDescriptor(element)); if (!CONTENT_TYPE_BINDING.equals(name)) { if (!VIEWER_TAG.equals(name)) logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.unexpectedTag", name, VIEWER_TAG)); //$NON-NLS-1$ fContentMergeViewers.register(element, new ViewerDescriptor(element)); if (!CONTENT_TYPE_BINDING.equals(name)) { if (!FILTER_TAG.equals(name)) logErrorMessage(Utilities.getFormattedString( "CompareUIPlugin.unexpectedTag", name, FILTER_TAG)); //$NON-NLS-1$ fCompareFilters.register(element, new CompareFilterDescriptor(element)); if (!CONTENT_TYPE_BINDING.equals(name)) { if (!VIEWER_TAG.equals(name)) logErrorMessage(Utilities.getFormattedString("CompareUIPlugin.unexpectedTag", name, VIEWER_TAG)); //$NON-NLS-1$ fContentViewers.register(element, new ViewerDescriptor(element));
@Override public void doSave(IProgressMonitor progressMonitor) { final IEditorInput input= getEditorInput(); WorkspaceModifyOperation operation= new WorkspaceModifyOperation() { @Override public void execute(IProgressMonitor pm) throws CoreException { if (input instanceof CompareEditorInput) ((CompareEditorInput)input).saveChanges(pm); } }; Shell shell= getSite().getShell(); try { operation.run(progressMonitor); firePropertyChange(PROP_DIRTY); } catch (InterruptedException x) { // NeedWork } catch (OperationCanceledException x) { // NeedWork } catch (InvocationTargetException x) { String title= Utilities.getString("CompareEditor.saveError.title"); //$NON-NLS-1$ String reason= x.getTargetException().getMessage(); MessageDialog.openError(shell, title, Utilities.getFormattedString("CompareEditor.cantSaveError", reason)); //$NON-NLS-1$ } }
public void doSave(IProgressMonitor progressMonitor) { final IEditorInput input= getEditorInput(); WorkspaceModifyOperation operation= new WorkspaceModifyOperation() { public void execute(IProgressMonitor pm) throws CoreException { if (input instanceof CompareEditorInput) ((CompareEditorInput)input).saveChanges(pm); } }; Shell shell= getSite().getShell(); try { operation.run(progressMonitor); firePropertyChange(PROP_DIRTY); } catch (InterruptedException x) { // NeedWork } catch (OperationCanceledException x) { // NeedWork } catch (InvocationTargetException x) { String title= Utilities.getString("CompareEditor.saveError.title"); //$NON-NLS-1$ String reason= x.getTargetException().getMessage(); MessageDialog.openError(shell, title, Utilities.getFormattedString("CompareEditor.cantSaveError", reason)); //$NON-NLS-1$ } }
MessageDialog.openError(parentShell, title, Utilities.getFormattedString(bundle, "replaceError", reason)); //$NON-NLS-1$
String reason = x.getTargetException().getMessage(); MessageDialog.openError(parentShell, title, Utilities.getFormattedString(bundle, "replaceError", reason)); //$NON-NLS-1$
MessageDialog.openError(parentShell, title, Utilities.getFormattedString(bundle, "replaceError", reason)); //$NON-NLS-1$
MessageDialog.openError(parentShell, title, Utilities.getFormattedString(bundle, "replaceError", reason)); //$NON-NLS-1$