Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/presentation/NattabletesterEditor.java')
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/presentation/NattabletesterEditor.java63
1 files changed, 37 insertions, 26 deletions
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/presentation/NattabletesterEditor.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/presentation/NattabletesterEditor.java
index d548ee87c44..150aebee910 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/presentation/NattabletesterEditor.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattabletester/presentation/NattabletesterEditor.java
@@ -51,6 +51,8 @@ import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.provider.EcoreItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.emf.expressions.booleanexpressions.provider.BooleanExpressionsItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.emf.expressions.provider.ExpressionsItemProviderAdapterFactory;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.util.EContentAdapter;
@@ -99,13 +101,16 @@ import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.provider.N
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.provider.NattableaxisconfigurationItemProviderAdapterFactory;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.provider.NattableaxisproviderItemProviderAdapterFactory;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablecell.provider.NattablecellItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablecelleditor.provider.NattablecelleditorItemProviderAdapterFactory;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.provider.NattableconfigurationItemProviderAdapterFactory;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablelabelprovider.provider.NattablelabelproviderItemProviderAdapterFactory;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableproblem.provider.NattableproblemItemProviderAdapterFactory;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablestyle.provider.NattablestyleItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattablewrapper.provider.NattablewrapperItemProviderAdapterFactory;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattabletester.provider.NattabletesterItemProviderAdapterFactory;
import org.eclipse.papyrus.infra.nattable.model.nattable.presentation.NattableEditorPlugin;
import org.eclipse.papyrus.infra.nattable.model.nattable.provider.NattableItemProviderAdapterFactory;
+import org.eclipse.papyrus.infra.types.provider.ElementTypesConfigurationsItemProviderAdapterFactory;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CTabFolder;
import org.eclipse.swt.dnd.DND;
@@ -386,6 +391,8 @@ public class NattabletesterEditor
*/
protected EContentAdapter problemIndicationAdapter =
new EContentAdapter() {
+ protected boolean dispatching;
+
@Override
public void notifyChanged(Notification notification) {
if (notification.getNotifier() instanceof Resource) {
@@ -401,15 +408,7 @@ public class NattabletesterEditor
else {
resourceToDiagnosticMap.remove(resource);
}
-
- if (updateProblemIndication) {
- getSite().getShell().getDisplay().asyncExec
- (new Runnable() {
- public void run() {
- updateProblemIndication();
- }
- });
- }
+ dispatchUpdateProblemIndication();
break;
}
}
@@ -419,6 +418,19 @@ public class NattabletesterEditor
}
}
+ protected void dispatchUpdateProblemIndication() {
+ if (updateProblemIndication && !dispatching) {
+ dispatching = true;
+ getSite().getShell().getDisplay().asyncExec
+ (new Runnable() {
+ public void run() {
+ dispatching = false;
+ updateProblemIndication();
+ }
+ });
+ }
+ }
+
@Override
protected void setTarget(Resource target) {
basicSetTarget(target);
@@ -428,14 +440,7 @@ public class NattabletesterEditor
protected void unsetTarget(Resource target) {
basicUnsetTarget(target);
resourceToDiagnosticMap.remove(target);
- if (updateProblemIndication) {
- getSite().getShell().getDisplay().asyncExec
- (new Runnable() {
- public void run() {
- updateProblemIndication();
- }
- });
- }
+ dispatchUpdateProblemIndication();
}
};
@@ -633,14 +638,11 @@ public class NattabletesterEditor
}
if (markerHelper.hasMarkers(editingDomain.getResourceSet())) {
- markerHelper.deleteMarkers(editingDomain.getResourceSet());
- if (diagnostic.getSeverity() != Diagnostic.OK) {
- try {
- markerHelper.createMarkers(diagnostic);
- }
- catch (CoreException exception) {
- NattableEditorPlugin.INSTANCE.log(exception);
- }
+ try {
+ markerHelper.updateMarkers(diagnostic);
+ }
+ catch (CoreException exception) {
+ NattableEditorPlugin.INSTANCE.log(exception);
}
}
}
@@ -693,7 +695,12 @@ public class NattabletesterEditor
adapterFactory.addAdapterFactory(new NattablecellItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new NattableproblemItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new NattablestyleItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new NattablecelleditorItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new NattablewrapperItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new ElementTypesConfigurationsItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new ExpressionsItemProviderAdapterFactory());
+ adapterFactory.addAdapterFactory(new BooleanExpressionsItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
// Create the command stack that will notify this editor as commands are executed.
@@ -1033,6 +1040,7 @@ public class NattabletesterEditor
selectionViewer = (TreeViewer)viewerPane.getViewer();
selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
+ selectionViewer.setUseHashlookup(true);
selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
selectionViewer.setInput(editingDomain.getResourceSet());
@@ -1338,6 +1346,7 @@ public class NattabletesterEditor
// Set up the tree viewer.
//
+ contentOutlineViewer.setUseHashlookup(true);
contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
contentOutlineViewer.setInput(editingDomain.getResourceSet());
@@ -1485,7 +1494,9 @@ public class NattabletesterEditor
// Save the resources to the file system.
//
boolean first = true;
- for (Resource resource : editingDomain.getResourceSet().getResources()) {
+ List<Resource> resources = editingDomain.getResourceSet().getResources();
+ for (int i = 0; i < resources.size(); ++i) {
+ Resource resource = resources.get(i);
if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) {
try {
long timeStamp = resource.getTimeStamp();

Back to the top