private void refreshNodeContent(final DBRProgressMonitor monitor, Object source) throws DBException { if (isDisposed()) { return; } this.locked = true; DBNModel model = getModel(); try { model.fireNodeUpdate(source, this, DBNEvent.NodeChange.LOCK); this.reloadChildren(monitor); model.fireNodeUpdate(source, this, DBNEvent.NodeChange.REFRESH); } finally { this.locked = false; // Unlock node model.fireNodeUpdate(source, this, DBNEvent.NodeChange.UNLOCK); } // new RefreshJob("Refresh node " + getNodeName()).schedule(); }
@Override public DBPImage getNodeIcon() { DBPImage image = null; final DBSObject object = getObject(); if (object instanceof DBPImageProvider) { image = ((DBPImageProvider) object).getObjectImage(); } if (image == null) { DBXTreeNode meta = getMeta(); if (meta != null) { image = meta.getIcon(this); } } if (image != null && object instanceof DBPStatefulObject) { image = DBNModel.getStateOverlayImage(image, ((DBPStatefulObject) object).getObjectState()); } return image; }
protected void unregisterNode(boolean reflect) { DBNModel model = getModel(); if (model != null) { model.removeNode(this, reflect); } }
protected void registerNode() { DBNModel model = getModel(); if (model != null) { model.addNode(this); } }