use of org.whole.lang.e4.ui.actions.ILinkViewerListener in project whole by wholeplatform.
the class DerivedViewPart method createPartControl.
@Override
public void createPartControl(Composite parent) {
super.createPartControl(parent);
getComponent().addLinkViewerListener(new ILinkViewerListener() {
public void viewerLinked(IEntityPartViewer viewer, IEntityPartViewer toViewer) {
redirectCommandStackActions(viewer);
}
public void viewerUnlinked(IEntityPartViewer viewer) {
redirectCommandStackActions(viewer);
}
protected void redirectCommandStackActions(IEntityPartViewer viewer) {
undoAction.redirect(viewer);
redoAction.redirect(viewer);
}
public void contentsDerived(IEntityPartViewer viewer, IBindingManager selection, IEntity result) {
if (disableEditing)
viewer.setInteractive(result, false, true, false);
}
});
linkToEditorAction.setLinkable(getComponent().getSelectionLinkable());
}
use of org.whole.lang.e4.ui.actions.ILinkViewerListener in project whole by wholeplatform.
the class OutlineTreeViewPart method createPartControl.
@Override
public void createPartControl(Composite parent) {
super.createPartControl(parent);
getComponent().addLinkViewerListener(new ILinkViewerListener() {
public void viewerLinked(IEntityPartViewer viewer, IEntityPartViewer toViewer) {
redirectCommandStackActions(viewer);
}
public void viewerUnlinked(IEntityPartViewer viewer) {
redirectCommandStackActions(viewer);
}
protected void redirectCommandStackActions(IEntityPartViewer viewer) {
undoAction.redirect(viewer);
redoAction.redirect(viewer);
}
public void contentsDerived(IEntityPartViewer viewer, IBindingManager selection, IEntity result) {
}
});
}
Aggregations