public ICompareFilter createCompareFilter() { try { return (ICompareFilter) fConfiguration .createExecutableExtension(CLASS_ATTRIBUTE); } catch (CoreException e) { CompareUIPlugin.log(e); } return null; }
public IStructureCreator createStructureCreator() { try { return (IStructureCreator)fElement.createExecutableExtension(CLASS_ATTRIBUTE); } catch (CoreException ex) { CompareUIPlugin.log(ex.getStatus()); //ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.createSorter.title"), SearchMessages.getString("Search.Error.createSorter.message")); //$NON-NLS-2$ //$NON-NLS-1$ return null; } catch (ClassCastException ex) { //ExceptionHandler.displayMessageDialog(ex, SearchMessages.getString("Search.Error.createSorter.title"), SearchMessages.getString("Search.Error.createSorter.message")); //$NON-NLS-2$ //$NON-NLS-1$ return null; } }
public IStructureCreator createStructureCreator() { try { return (IStructureCreator)fElement.createExecutableExtension(CLASS_ATTRIBUTE); } catch (CoreException ex) { CompareUIPlugin.log(ex.getStatus()); //ExceptionHandler.handle(ex, SearchMessages.getString("Search.Error.createSorter.title"), SearchMessages.getString("Search.Error.createSorter.message")); //$NON-NLS-2$ //$NON-NLS-1$ return null; } catch (ClassCastException ex) { //ExceptionHandler.displayMessageDialog(ex, SearchMessages.getString("Search.Error.createSorter.title"), SearchMessages.getString("Search.Error.createSorter.message")); //$NON-NLS-2$ //$NON-NLS-1$ return null; } }
private void handleException(Throwable throwable) { // TODO: Should show error to the user if (throwable instanceof InvocationTargetException) { InvocationTargetException ite = (InvocationTargetException) throwable; handleException(ite.getTargetException()); return; } CompareUIPlugin.log(throwable); }
public static void logErrorMessage(String message) { if (message == null) message= ""; //$NON-NLS-1$ log(new Status(IStatus.ERROR, getPluginId(), INTERNAL_ERROR, message, null)); }
private String getString(Object input) { if (input instanceof IStreamContentAccessor) { try { return Utilities.readString((IStreamContentAccessor) input); } catch (CoreException ex) { // NeedWork CompareUIPlugin.log(ex); } } return ""; //$NON-NLS-1$ } }
public static void log(Throwable t, String message) { CompareUIPlugin.log(new Status(IStatus.ERROR, CompareUIPlugin.getPluginId(), CompareUIPlugin.INTERNAL_ERROR, message, t)); }
private String getString(Object input) { if (input instanceof IStreamContentAccessor) { try { return Utilities.readString((IStreamContentAccessor) input); } catch (CoreException ex) { // NeedWork CompareUIPlugin.log(ex); } } return ""; //$NON-NLS-1$ } }
private boolean save(final IDocumentProvider provider, final IDocument document, final Object input, final ISharedDocumentAdapter sda, final IEditorInput key) { try { sda.flushDocument(provider, key, document, false); return true; } catch (CoreException e) { CompareUIPlugin.log(e); } return false; }
public static void logErrorMessage(String message) { if (message == null) message= ""; //$NON-NLS-1$ log(new Status(IStatus.ERROR, getPluginId(), INTERNAL_ERROR, message, null)); }
public static String getFormattedString(ResourceBundle bundle, String key, String arg) { if (bundle != null) { try { return MessageFormat.format(bundle.getString(key), arg); } catch (MissingResourceException x) { CompareUIPlugin.log(x); } } return "!" + key + "!"; //$NON-NLS-2$ //$NON-NLS-1$ }
private boolean save(final IDocumentProvider provider, final IDocument document, final Object input, final ISharedDocumentAdapter sda, final IEditorInput key) { try { sda.flushDocument(provider, key, document, false); return true; } catch (CoreException e) { CompareUIPlugin.log(e); } return false; }
private void registerPositionUpdater(int start, int length) { fBaseDocument.addPositionCategory(RANGE_CATEGORY); fRange= new Position(start, length); try { fBaseDocument.addPosition(RANGE_CATEGORY, fRange); } catch (BadPositionCategoryException ex) { CompareUIPlugin.log(ex); } catch (BadLocationException ex) { CompareUIPlugin.log(ex); } }
private void registerPositionUpdater(int start, int length) { fBaseDocument.addPositionCategory(RANGE_CATEGORY); fRange= new Position(start, length); try { fBaseDocument.addPosition(RANGE_CATEGORY, fRange); } catch (BadPositionCategoryException ex) { CompareUIPlugin.log(ex); } catch (BadLocationException ex) { CompareUIPlugin.log(ex); } }
public static String getCharset(Object resource) { if (resource instanceof IEncodedStorage) { try { return ((IEncodedStorage) resource).getCharset(); } catch (CoreException ex) { CompareUIPlugin.log(ex); } } return ResourcesPlugin.getEncoding(); }
public static String getCharset(Object resource) { if (resource instanceof IEncodedStorage) { try { return ((IEncodedStorage)resource).getCharset(); } catch (CoreException ex) { CompareUIPlugin.log(ex); } } return ResourcesPlugin.getEncoding(); }
protected void perform(CoreException e, Shell shell, String title, String message) { CompareUIPlugin.log(e); IStatus status= e.getStatus(); if (status != null) { ErrorDialog.openError(shell, title, message, status); } else { displayMessageDialog(e, e.getMessage(), shell, title, message); } }
private void add(String s, DocumentRangeNode parent, DocumentRangeNode child) { Position p= findCorrespondingPosition(parent, child); if (p != null) { try { fBaseDocument.replace(p.getOffset(), p.getLength(), s); } catch (BadLocationException ex) { CompareUIPlugin.log(ex); } } }
private void add(String s, DocumentRangeNode parent, DocumentRangeNode child) { Position p= findCorrespondingPosition(parent, child); if (p != null) { try { fBaseDocument.replace(p.getOffset(), p.getLength(), s); } catch (BadLocationException ex) { CompareUIPlugin.log(ex); } } }
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; } }