Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2014-07-23 16:28:20 +0000
committerChristian W. Damus2014-07-23 17:28:38 +0000
commita13e6218401a3fb253d73be037339e7a3ac5dcdd (patch)
treed6bd02cd4880259de37c12265def05bdf4fe8975 /tests/junit/plugins/junit
parentb478cf0d527b251b205240b8c649538433b76fac (diff)
downloadorg.eclipse.papyrus-a13e6218401a3fb253d73be037339e7a3ac5dcdd.tar.gz
org.eclipse.papyrus-a13e6218401a3fb253d73be037339e7a3ac5dcdd.tar.xz
org.eclipse.papyrus-a13e6218401a3fb253d73be037339e7a3ac5dcdd.zip
440108: [Properties] Warning decoration for name clash shown on nameless element
https://bugs.eclipse.org/bugs/show_bug.cgi?id=440108 Use the UML2 API for distinguishability of named elements to validate a prospective new element name. Includes JUnit tests for cases that were spurious warnings (different metaclass, not accounting for operation signature). Also unset names of elements instead of setting their names to empty strings. This uses a new UnsetRequest supported by the UML edit-helpers.
Diffstat (limited to 'tests/junit/plugins/junit')
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/ResourceSetFixture.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/ResourceSetFixture.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/ResourceSetFixture.java
new file mode 100644
index 00000000000..23b14c2a334
--- /dev/null
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/ResourceSetFixture.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2014 CEA and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus (CEA) - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.junit.utils.rules;
+
+import org.eclipse.emf.common.command.BasicCommandStack;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+
+
+/**
+ * A simple non-transactional {@link ResourceSet} fixture.
+ */
+public class ResourceSetFixture extends AbstractModelFixture<EditingDomain> {
+
+ public ResourceSetFixture() {
+ super();
+ }
+
+ protected EditingDomain createEditingDomain() {
+ return new AdapterFactoryEditingDomain(new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE), new BasicCommandStack());
+ }
+}

Back to the top