Commit fded2951 authored by Adrien's avatar Adrien

Do not update default queries when constraints are updated -> the

operation can be really expensive, it is not worth.
parent 3c9f5335
......@@ -48,6 +48,5 @@ public class ConstraintAttributeCheckListener implements ICheckStateListener {
}
selectedAttributeObservable.setValue(element);
constraintViewer.refresh(selectedConstraintObservable.getValue());
formPage.updateDefaultQueries();
}
}
......@@ -37,6 +37,7 @@ import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.e4.core.contexts.IEclipseContext;
import org.eclipse.jface.text.IDocument;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.ToolBar;
import org.xml.sax.SAXException;
......@@ -136,10 +137,12 @@ public abstract class AbstractBdmFormPage extends AbstractFormPage<BusinessObjec
}
public void updateDefaultQueries() {
Display.getDefault().asyncExec(() -> {
BusinessObject businessObject = observeBusinessObjectSelected().getValue();
Stream<Query> newDefaultQueries = getConverter().createDefaultQueries(businessObject);
businessObject.getDefaultQueries().clear();
newDefaultQueries.forEach(businessObject.getDefaultQueries()::add);
});
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment