@Override public char charAt(int index) { try { return fDocument.getChar(index); } catch (BadLocationException x) { throw new IndexOutOfBoundsException(x.getLocalizedMessage()); } }
public char charAt(int index) { try { return fDocument.getChar(index); } catch (BadLocationException x) { throw new IndexOutOfBoundsException(x.getLocalizedMessage()); } }
public CharSequence subSequence(int start, int end) { try { return fDocument.get(start, end - start); } catch (BadLocationException x) { throw new IndexOutOfBoundsException(x.getLocalizedMessage()); } } }
@Override public char charAt(int index) { try { return fDocument.getChar(index); } catch (BadLocationException x) { throw new IndexOutOfBoundsException(x.getLocalizedMessage()); } }
@Override public CharSequence subSequence(int start, int end) { try { return fDocument.get(start, end - start); } catch (BadLocationException x) { throw new IndexOutOfBoundsException(x.getLocalizedMessage()); } } }
@Override public CharSequence subSequence(int start, int end) { try { return fDocument.get(start, end - start); } catch (BadLocationException x) { throw new IndexOutOfBoundsException(x.getLocalizedMessage()); } } }
public char charAt(int index) { try { return fDocument.getChar(index); } catch (BadLocationException x) { throw new IndexOutOfBoundsException(x.getLocalizedMessage()); } }
public CharSequence subSequence(int start, int end) { try { return fDocument.get(start, end - start); } catch (BadLocationException x) { throw new IndexOutOfBoundsException(x.getLocalizedMessage()); } } }
/** * Logs the exception. * * @param e the exception */ private void log(BadLocationException e) { String msg= e.getLocalizedMessage(); if (msg == null) msg= "unable to access the document"; //$NON-NLS-1$ TextEditorPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, TextEditorPlugin.PLUGIN_ID, IStatus.OK, msg, e)); } }
/** * Logs the exception. * * @param e the exception */ private void log(BadLocationException e) { String msg= e.getLocalizedMessage(); if (msg == null) msg= "unable to access the document"; //$NON-NLS-1$ TextEditorPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, TextEditorPlugin.PLUGIN_ID, IStatus.OK, msg, e)); } }
/** * Logs the exception. * * @param e the exception */ private void log(BadLocationException e) { String msg= e.getLocalizedMessage(); if (msg == null) msg= "unable to access the document"; //$NON-NLS-1$ TextEditorPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, TextEditorPlugin.PLUGIN_ID, IStatus.OK, msg, e)); } }
/** * Logs the exception. * * @param e the exception * * @since 3.6 */ private void log(BadLocationException e) { String msg= e.getLocalizedMessage(); if (msg == null) msg= "unable to access the document"; //$NON-NLS-1$ TextEditorPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, TextEditorPlugin.PLUGIN_ID, IStatus.OK, msg, e)); }
/** * Logs the exception. * * @param e the exception * * @since 3.6 */ private void log(BadLocationException e) { String msg= e.getLocalizedMessage(); if (msg == null) msg= "unable to access the document"; //$NON-NLS-1$ TextEditorPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, TextEditorPlugin.PLUGIN_ID, IStatus.OK, msg, e)); }
System.err.println(Messages.bind(Messages.ExceptionSkip ,errorMessage)); } catch (BadLocationException e) { String errorMessage = Messages.bind(Messages.CaughtException, "BadLocationException", e.getLocalizedMessage()); //$NON-NLS-1$ Util.log(e, errorMessage); System.err.println(Messages.bind(Messages.ExceptionSkip ,errorMessage));
System.err.println(Messages.bind(Messages.ExceptionSkip ,errorMessage)); } catch (BadLocationException e) { String errorMessage = Messages.bind(Messages.CaughtException, "BadLocationException", e.getLocalizedMessage()); //$NON-NLS-1$ Util.log(e, errorMessage); System.err.println(Messages.bind(Messages.ExceptionSkip ,errorMessage));
System.err.println(Messages.bind(Messages.ExceptionSkip ,errorMessage)); } catch (BadLocationException e) { String errorMessage = Messages.bind(Messages.CaughtException, "BadLocationException", e.getLocalizedMessage()); //$NON-NLS-1$ Util.log(e, errorMessage); System.err.println(Messages.bind(Messages.ExceptionSkip ,errorMessage));
@Override public void run(ITextFileBuffer textBuffer, Match match) { trackCount[0]++; Position pos= fMatchesToPositions.get(match); if (pos != null) { if (pos.isDeleted()) { AbstractTextSearchResult result= fMatchesToSearchResults.get(match); // might be that the containing element has been removed. if (result != null) { result.removeMatch(match); } untrackPosition(textBuffer, match); } else { if (match.getBaseUnit() == Match.UNIT_LINE) { try { pos= convertToLinePosition(pos, textBuffer.getDocument()); } catch (BadLocationException e) { SearchPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, SearchPlugin.getID(), 0, e.getLocalizedMessage(), e)); } } match.setOffset(pos.getOffset()); match.setLength(pos.getLength()); } } } });
public void run(ITextFileBuffer textBuffer, Match match) { trackCount[0]++; Position pos= (Position) fMatchesToPositions.get(match); if (pos != null) { if (pos.isDeleted()) { AbstractTextSearchResult result= (AbstractTextSearchResult) fMatchesToSearchResults.get(match); // might be that the containing element has been removed. if (result != null) { result.removeMatch(match); } untrackPosition(textBuffer, match); } else { if (match.getBaseUnit() == Match.UNIT_LINE) { try { pos= convertToLinePosition(pos, textBuffer.getDocument()); } catch (BadLocationException e) { SearchPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, SearchPlugin.getID(), 0, e.getLocalizedMessage(), e)); } } match.setOffset(pos.getOffset()); match.setLength(pos.getLength()); } } } });
it= model.getAnnotationIterator(line.getOffset(), line.getLength() + 1, true, true); } catch (BadLocationException e) { logException(new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, IStatus.OK, e.getLocalizedMessage(), e)); it= model.getAnnotationIterator();
if (actionBars != null) { IStatusLineManager statusLineMgr = actionBars.getStatusLineManager(); statusLineMgr.setErrorMessage( e.getLocalizedMessage() );