Browse Source

#189 replace 'Yakindu Statechart Tools (SCT)' with 'YAKINDU' in
feature.xml

Dominik Tesch 10 years ago
parent
commit
3ce4779590

+ 2 - 2
features/org.yakindu.base-feature/feature.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <feature
       id="org.yakindu.base"
-      label="Yakindu Base Feature"
+      label="YAKINDU Base Feature"
       version="2.5.0.qualifier"
       provider-name="statecharts.org">
 
@@ -18,7 +18,7 @@
    </license>
 
    <url>
-      <discovery label="Yakindu SCT Repository" url="http://updates.yakindu.org/mars/releases"/>
+      <discovery label="YAKINDU SCT Repository" url="http://updates.yakindu.org/mars/releases"/>
    </url>
 
    <includes

+ 1 - 1
features/org.yakindu.sct-feature/feature.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <feature
       id="org.yakindu.sct"
-      label="Yakindu Statechart Tools (SCT) Feature"
+      label="YAKINDU Feature"
       version="2.5.0.qualifier"
       provider-name="statecharts.org"
       plugin="org.yakindu.sct.doc.user">

+ 1 - 1
features/org.yakindu.sct.generator-feature/feature.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <feature
       id="org.yakindu.sct.generator"
-      label="Yakindu Statechart Tools (SCT) Generator All-In-One Feature"
+      label="YAKINDU Generator All-In-One Feature"
       version="2.5.0.qualifier"
       provider-name="yakindu.org"
       plugin="org.yakindu.sct.doc.user">

+ 1 - 1
features/org.yakindu.sct.generator.c-feature/feature.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <feature
       id="org.yakindu.sct.generator.c"
-      label="Yakindu Statechart Tools (SCT) C Generator Feature"
+      label="YAKINDU C Generator Feature"
       version="2.5.0.qualifier"
       provider-name="yakindu.org"
       plugin="org.yakindu.sct.doc.user">

+ 1 - 1
features/org.yakindu.sct.generator.cpp-feature/feature.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <feature
       id="org.yakindu.sct.generator.cpp"
-      label="Yakindu Statechart Tools (SCT) C++ Generator Feature"
+      label="YAKINDU C++ Generator Feature"
       version="2.5.0.qualifier"
       provider-name="statecharts.org"
       plugin="org.yakindu.sct.doc.user">

+ 1 - 1
features/org.yakindu.sct.generator.java-feature/feature.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <feature
       id="org.yakindu.sct.generator.java"
-      label="Yakindu Statechart Tools (SCT) Java Generator Feature"
+      label="YAKINDU Java Generator Feature"
       version="2.5.0.qualifier"
       provider-name="statecharts.org"
       plugin="org.yakindu.sct.doc.user">

+ 1 - 1
features/org.yakindu.sct.sdk-feature/feature.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <feature
       id="org.yakindu.sct.sdk"
-      label="Yakindu Statechart Tools (SCT) 2 SDK"
+      label="YAKINDU 2 SDK"
       version="2.5.0.qualifier"
       provider-name="yakindu.org"
       plugin="org.yakindu.sct.doc.user">

+ 1 - 1
features/org.yakindu.sct.test-feature/feature.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <feature
       id="org.yakindu.sct.test"
-      label="Yakindu Statechart Tools (SCT) 2 Test"
+      label="YAKINDU 2 Test"
       version="2.5.0.qualifier"
       provider-name="yakindu.org">
 

+ 1 - 1
plugins/org.yakindu.sct.generator.genmodel.ui/src/org/yakindu/sct/generator/genmodel/ui/wizard/SGenNewFileWizard.java

@@ -68,7 +68,7 @@ public class SGenNewFileWizard extends Wizard implements INewWizard {
 
 	public void init(IWorkbench workbench, IStructuredSelection selection) {
 		this.selection = selection;
-		setWindowTitle("New Yakindu SGen Model");
+		setWindowTitle("New YAKINDU SGen Model");
 		setNeedsProgressMonitor(true);
 
 	}

+ 105 - 105
plugins/org.yakindu.sct.simulation.core.sexec/src/org/yakindu/sct/simulation/core/sexec/interpreter/JavaOperationMockup.java

@@ -1,105 +1,105 @@
-/**
- * Copyright (c) 2013-2015 committers of YAKINDU 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:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.sct.simulation.core.sexec.interpreter;
-
-import java.lang.reflect.Method;
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.emf.common.util.WrappedException;
-import org.eclipse.xtext.util.PolymorphicDispatcher;
-import org.yakindu.base.types.Operation;
-import org.yakindu.sct.commons.WorkspaceClassLoaderFactory;
-
-import com.google.common.collect.Lists;
-import com.google.inject.Inject;
-import com.google.inject.Singleton;
-
-/**
- * Implementation of {@link IOperationMockup} interface that delegates simulator
- * operation calls to Java classes. These classes can be specified in the run
- * configuration tab.
- * 
- * @author andreas muelder - Initial contribution and API
- * 
- */
-@Singleton
-public class JavaOperationMockup implements IOperationMockup {
-
-	@Inject
-	protected IExecutionSlotResolver resolver;
-
-	private List<Object> callbacks;
-
-	public void initOperationCallbacks(IProject project, String[] classes) {
-		callbacks = Lists.newArrayList();
-
-		ClassLoader classLoader = new WorkspaceClassLoaderFactory().createClassLoader(project, getClass()
-				.getClassLoader());
-		try {
-			if (classes.length > 0)
-				for (String string : classes) {
-					string = string.trim();
-					if (string.length() == 0)
-						continue;
-					Class<?> loadClass = classLoader.loadClass(string);
-					callbacks.add(loadClass.newInstance());
-				}
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-
-	@Override
-	public boolean canExecute(Operation definition, Object[] parameter) {
-		for (Object callback : callbacks) {
-			Class<?> current = callback.getClass();
-			while (current != Object.class) {
-				Method[] methods = current.getDeclaredMethods();
-				for (Method method : methods) {
-					if (hasSignatureMatch(definition, method)) {
-						return true;
-					}
-				}
-				current = current.getSuperclass();
-			}
-		}
-
-		return false;
-	}
-
-	public Object execute(Operation definition, Object[] parameter) {
-		PolymorphicDispatcher<Object> dispatcher = new PolymorphicDispatcher<Object>(definition.getName(), definition
-				.getParameters().size(), definition.getParameters().size(), callbacks);
-		try {
-			return dispatcher.invoke(parameter);
-		} catch (Exception ex) {
-			throw new WrappedException("Error during invocation of operation '" + definition.getName()
-					+ "' with params " + definition.getParameters() + " '", ex);
-		}
-	}
-
-	protected boolean hasSignatureMatch(Operation definition, Method method) {
-		if (!definition.getName().equals(method.getName())) {
-			return false;
-		}
-
-		if (!(definition.getParameters().size() == method.getParameterTypes().length)) {
-			return false;
-		}
-
-		// TODO: Check parameter types and return type match. For this a
-		// JavaTypeChecker should be introduced to get a matching Java type for
-		// a Yakindu Type System type.
-
-		return true;
-	}
-}
+/**
+ * Copyright (c) 2013-2015 committers of YAKINDU 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:
+ * 	committers of YAKINDU - initial API and implementation
+ * 
+ */
+package org.yakindu.sct.simulation.core.sexec.interpreter;
+
+import java.lang.reflect.Method;
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.emf.common.util.WrappedException;
+import org.eclipse.xtext.util.PolymorphicDispatcher;
+import org.yakindu.base.types.Operation;
+import org.yakindu.sct.commons.WorkspaceClassLoaderFactory;
+
+import com.google.common.collect.Lists;
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+
+/**
+ * Implementation of {@link IOperationMockup} interface that delegates simulator
+ * operation calls to Java classes. These classes can be specified in the run
+ * configuration tab.
+ * 
+ * @author andreas muelder - Initial contribution and API
+ * 
+ */
+@Singleton
+public class JavaOperationMockup implements IOperationMockup {
+
+	@Inject
+	protected IExecutionSlotResolver resolver;
+
+	private List<Object> callbacks;
+
+	public void initOperationCallbacks(IProject project, String[] classes) {
+		callbacks = Lists.newArrayList();
+
+		ClassLoader classLoader = new WorkspaceClassLoaderFactory().createClassLoader(project, getClass()
+				.getClassLoader());
+		try {
+			if (classes.length > 0)
+				for (String string : classes) {
+					string = string.trim();
+					if (string.length() == 0)
+						continue;
+					Class<?> loadClass = classLoader.loadClass(string);
+					callbacks.add(loadClass.newInstance());
+				}
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+
+	@Override
+	public boolean canExecute(Operation definition, Object[] parameter) {
+		for (Object callback : callbacks) {
+			Class<?> current = callback.getClass();
+			while (current != Object.class) {
+				Method[] methods = current.getDeclaredMethods();
+				for (Method method : methods) {
+					if (hasSignatureMatch(definition, method)) {
+						return true;
+					}
+				}
+				current = current.getSuperclass();
+			}
+		}
+
+		return false;
+	}
+
+	public Object execute(Operation definition, Object[] parameter) {
+		PolymorphicDispatcher<Object> dispatcher = new PolymorphicDispatcher<Object>(definition.getName(), definition
+				.getParameters().size(), definition.getParameters().size(), callbacks);
+		try {
+			return dispatcher.invoke(parameter);
+		} catch (Exception ex) {
+			throw new WrappedException("Error during invocation of operation '" + definition.getName()
+					+ "' with params " + definition.getParameters() + " '", ex);
+		}
+	}
+
+	protected boolean hasSignatureMatch(Operation definition, Method method) {
+		if (!definition.getName().equals(method.getName())) {
+			return false;
+		}
+
+		if (!(definition.getParameters().size() == method.getParameterTypes().length)) {
+			return false;
+		}
+
+		// TODO: Check parameter types and return type match. For this a
+		// JavaTypeChecker should be introduced to get a matching Java type for
+		// a YAKINDU Type System type.
+
+		return true;
+	}
+}