private IDisposable getDisposable(Object object) { if (object instanceof IDisposable) { return (IDisposable) object; } if (object instanceof DocumentRangeNode) { DocumentRangeNode node = (DocumentRangeNode) object; return getDisposable(node.getParentNode()); } return null; }
private IDisposable getDisposable(Object object) { if (object instanceof IDisposable) { return (IDisposable) object; } if (object instanceof DocumentRangeNode) { DocumentRangeNode node = (DocumentRangeNode) object; return getDisposable(node.getParentNode()); } return null; } }