@Override public void createPartControl(Composite parent) { this.parent = parent; backgroundColor = parent.getBackground(); new SyncViewDropTarget(this, parent); if (instance.current() == null) setDefaultName(); }
protected void setViewName() { CodeNode codeNode = instance.codeNode(); if (codeNode == null) { setDefaultName(); return; } setViewName(codeNode, (T) ((ClassNode) codeNode).instance()); }
@Override public final boolean synchronize(Clock clock) { if (!viewLock.acquire()) return false; T current = instance.current(); boolean result = synchronizeIFN(clock, current); viewLock.release(); unprotectedSynchronization(current); return result; }
@Override public void saveState(IMemento memento) { super.saveState(memento); instance.saveState(memento); }
@Override public void init(IViewSite site, IMemento memento) throws PartInitException { super.init(site, memento); instance.parseMemento(memento); }
@Override public boolean[] provide(CodeNode[] codeNode) { return instance.provide(codeNode); }
@Override public void drop(CodeNode[] supported) { instance.drop(supported); }
protected void setNodeToInstance(CodeNodeToInstance<T> toInstance) { instance.setNodeToInstance(toInstance); }
protected CodeNode codeNode() { return instance.codeNode(); }
protected void unsetInstance() { instance.unset(); }
@Override public void dispose() { super.dispose(); instance.unset(); }