private ITypedRegion getPartition(IDocument doc, int offset) { ITypedRegion tr = null; // not sure why document would ever be null, but put in this // guard for // https://bugs.eclipse.org/bugs/show_bug.cgi?id=86069 if (doc != null) { try { tr = TextUtilities.getPartition( doc, IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING, offset, false); } catch (BadLocationException e) { if (DEBUG) Logger.logException("problem getting partition at: " + offset, e); // $NON-NLS-1$ } } return tr; }
private static void handleCreateExecutableException(final Object[] result, Throwable e) { Logger.logException(e); result[0] = null; }