Search in sources :

Example 1 with EntityEditDomain

use of org.whole.lang.ui.viewers.EntityEditDomain in project whole by wholeplatform.

the class DerivedLinkableSelectionListener method updateLinkType.

@Override
public void updateLinkType(LinkType linkType) {
    super.updateLinkType(linkType);
    if (linkType.isNotLinked()) {
        viewer.setEditDomain(new EntityEditDomain());
        viewer.setEntityContents(EntityUtils.clone(viewer.getEntityContents()));
        fireViewerUnlinked();
    } else if (lastSelection != null)
        updateViewerContents(true);
}
Also used : EntityEditDomain(org.whole.lang.ui.viewers.EntityEditDomain)

Example 2 with EntityEditDomain

use of org.whole.lang.ui.viewers.EntityEditDomain in project whole by wholeplatform.

the class E4GraphicalViewer method initialize.

@PostConstruct
protected void initialize() {
    if (domain == null)
        domain = new EntityEditDomain();
    partFocusListeners = new ArrayList<IPartFocusListener>();
    modelInputListeners = new ArrayList<IModelInputListener>();
    referencedResources = new HashSet<String>();
    createControl2(parent);
    domain.addViewer(this);
    setEditPartFactory(new WholeEditPartFactory());
    setRootEditPart(createRootEditPart());
    configureViewer(domain);
}
Also used : WholeEditPartFactory(org.whole.lang.ui.editparts.WholeEditPartFactory) IPartFocusListener(org.whole.lang.ui.editparts.IPartFocusListener) EntityEditDomain(org.whole.lang.ui.viewers.EntityEditDomain) IModelInputListener(org.whole.lang.ui.input.IModelInputListener) PostConstruct(javax.annotation.PostConstruct)

Example 3 with EntityEditDomain

use of org.whole.lang.ui.viewers.EntityEditDomain in project whole by wholeplatform.

the class E4TreeViewer method linkEditDomain.

public LightweightEditDomain linkEditDomain(IEntityPartViewer viewer) {
    EntityEditDomain editDomain = getEditDomain();
    if (editDomain != null)
        editDomain.removeViewer(this);
    editDomain = viewer.getEditDomain();
    editDomain.addViewer(this);
    return editDomain;
}
Also used : EntityEditDomain(org.whole.lang.ui.viewers.EntityEditDomain)

Example 4 with EntityEditDomain

use of org.whole.lang.ui.viewers.EntityEditDomain in project whole by wholeplatform.

the class AbstractRunnableWithProgress method asyncExec.

public void asyncExec(String message) {
    IEntityPartViewer viewer = (IEntityPartViewer) bm.wGetValue("viewer");
    EntityEditDomain editDomain = viewer.getEditDomain();
    if (isTransactional())
        editDomain.setDisabled(true);
    EntityEditDomainJob.asyncExec(message, editDomain, this);
}
Also used : EntityEditDomain(org.whole.lang.ui.viewers.EntityEditDomain) IEntityPartViewer(org.whole.lang.ui.viewers.IEntityPartViewer)

Example 5 with EntityEditDomain

use of org.whole.lang.ui.viewers.EntityEditDomain in project whole by wholeplatform.

the class AbstractRunnableWithProgress method syncExec.

public synchronized IBindingScope syncExec(long timeout) {
    IEntityPartViewer viewer = (IEntityPartViewer) bm.wGetValue("viewer");
    EntityEditDomain editDomain = viewer.getEditDomain();
    UISynchronize uiSynchronize = context.get(UISynchronize.class);
    try {
        context.set(UISynchronize.class, NoUISynchronize.instance);
        EntityEditDomainJob.syncExec("boh", editDomain, this);
    } finally {
        context.set(UISynchronize.class, uiSynchronize);
    }
    return bm;
}
Also used : EntityEditDomain(org.whole.lang.ui.viewers.EntityEditDomain) IEntityPartViewer(org.whole.lang.ui.viewers.IEntityPartViewer) UISynchronize(org.eclipse.e4.ui.di.UISynchronize)

Aggregations

EntityEditDomain (org.whole.lang.ui.viewers.EntityEditDomain)7 IEntityPartViewer (org.whole.lang.ui.viewers.IEntityPartViewer)3 UISynchronize (org.eclipse.e4.ui.di.UISynchronize)2 PostConstruct (javax.annotation.PostConstruct)1 IPartFocusListener (org.whole.lang.ui.editparts.IPartFocusListener)1 WholeEditPartFactory (org.whole.lang.ui.editparts.WholeEditPartFactory)1 IModelInputListener (org.whole.lang.ui.input.IModelInputListener)1