Просмотр исходного кода

Updated domain wizard, added domain plugin to feature

Andreas Mülder 11 лет назад
Родитель
Сommit
7ad902bd67

+ 1 - 1
plugins/org.yakindu.base.types/plugin.xml

@@ -16,7 +16,7 @@
    <extension
          point="org.yakindu.base.types.typesystem">
       <contribution
-            scheme="Default"
+            domainID="org.yakindu.domain.default"
             typesystem="org.yakindu.base.types.typesystem.DefaultTypeSystem">
       </contribution>
    </extension>

+ 1 - 1
plugins/org.yakindu.base.types/schema/typesystem.exsd

@@ -59,7 +59,7 @@
                </appInfo>
             </annotation>
          </attribute>
-         <attribute name="scheme" type="string" use="required">
+         <attribute name="domainID" type="string" use="required">
             <annotation>
                <documentation>
                   The import uri scheme this type system is responsible for

+ 5 - 2
plugins/org.yakindu.base.types/src/org/yakindu/base/types/DefaultTypeSystemRegistry.java

@@ -10,6 +10,7 @@
  */
 package org.yakindu.base.types;
 
+import org.eclipse.core.runtime.Assert;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.Platform;
 import org.yakindu.base.types.typesystem.ITypeSystem;
@@ -31,7 +32,7 @@ public class DefaultTypeSystemRegistry extends AbstractTypeSystemRegistry implem
 
 	private static final String EXTENSION_POINT_ID = "org.yakindu.base.types.typesystem";
 	private static final String ITYPESYSTEM_CLASS = "typesystem";
-	private static final String URI_SCHEME = "scheme";
+	private static final String DOMAIN_ID = "domainID";
 
 	public DefaultTypeSystemRegistry() {
 		init();
@@ -49,7 +50,9 @@ public class DefaultTypeSystemRegistry extends AbstractTypeSystemRegistry implem
 						bind(ITypeSystemRegistry.class).toInstance(DefaultTypeSystemRegistry.this);
 					}
 				}).injectMembers(typeSystem);
-				addTypeSystem(element.getAttribute(URI_SCHEME), typeSystem);
+				String attribute = element.getAttribute(DOMAIN_ID);
+				Assert.isNotNull(attribute);
+				addTypeSystem(attribute, typeSystem);
 			} catch (Exception e) {
 				e.printStackTrace();
 			}