diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.build/.classpath b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.build/.classpath new file mode 100644 index 00000000..098194ca --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.build/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.build/.project b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.build/.project new file mode 100644 index 00000000..14a8f640 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.build/.project @@ -0,0 +1,28 @@ + + + fr.obeo.dsl.arduino.build + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.build/.settings/org.eclipse.jdt.core.prefs b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.build/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..f42de363 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.build/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.build/META-INF/MANIFEST.MF b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.build/META-INF/MANIFEST.MF new file mode 100644 index 00000000..4c69f060 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.build/META-INF/MANIFEST.MF @@ -0,0 +1,12 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Arduino designer Build +Bundle-SymbolicName: fr.obeo.dsl.arduino.build +Bundle-Version: 1.0.0.qualifier +Bundle-Activator: fr.obeo.dsl.arduino.build.ArduinoBuilderActivator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + com.google.guava +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Bundle-ActivationPolicy: lazy +Export-Package: fr.obeo.dsl.arduino.build diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.build/build.properties b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.build/build.properties new file mode 100644 index 00000000..34d2e4d2 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.build/build.properties @@ -0,0 +1,4 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + . diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.build/pom.xml b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.build/pom.xml new file mode 100644 index 00000000..1414810c --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.build/pom.xml @@ -0,0 +1,42 @@ + + + + 4.0.0 + + + fr.obeo.dsl.arduino + parent + 1.0.0-SNAPSHOT + ../../releng/fr.obeo.dsl.arduino.parent + + + fr.obeo.dsl.arduino.build + eclipse-plugin + + Cross-compilation tools for Arduino + + + + + org.eclipse.tycho + tycho-source-plugin + + + org.apache.maven.plugins + maven-pmd-plugin + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.build/src/fr/obeo/dsl/arduino/build/ArduinoBuilder.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.build/src/fr/obeo/dsl/arduino/build/ArduinoBuilder.java new file mode 100644 index 00000000..10ad52c3 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.build/src/fr/obeo/dsl/arduino/build/ArduinoBuilder.java @@ -0,0 +1,565 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.build; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintStream; +import java.util.ArrayList; +import java.util.List; +import java.util.Scanner; + +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; + +import com.google.common.collect.Lists; + +/** + * Arduino builder is used to cross-compile ino files in order to be able to + * execute the code on an Arduino board. + * + * @author Melanie Batsmelanie + * .bats@obeo.fr + */ +public class ArduinoBuilder { + private static final String WINDOWS = "win"; + + private static final String MACOS = "mac os"; + + /** + * Arduino SDK path. + */ + private final String arduinoSdk; + + /** + * Arduino serial port. + */ + private final String serialPort; + + /** + * Board tag. + */ + private final String boardTag; + /** + * Working directory. + */ + private final File directory; + + /** + * OS. + */ + private String os; + + /** + * Arduino builder is used to cross-compile ino files in order to be able to + * execute the code on an Arduino board. + * + * @param arduinoSdk + * Path to the Arduino SDK + * @param boardTag + * Board tag + * @param directory + * Working directory + * @param serialPort + * the name of the Arduino serial port. + */ + public ArduinoBuilder(String arduinoSdk, String boardTag, String directory, + String serialPort) { + this.boardTag = boardTag; + this.directory = new File(directory); + this.os = System.getProperty("os.name").toLowerCase(); + this.arduinoSdk = getCorrectedPath(arduinoSdk, os); + this.serialPort = serialPort; + } + + private static String getCorrectedPath(String arduinoSdkPath, + String currentOS) { + String path = arduinoSdkPath; + if (!path.endsWith(File.separator)) { + path += File.separator; + } + if (currentOS.contains(MACOS) && arduinoSdkPath != null + && !arduinoSdkPath.contains(".app")) { + path = path + "Arduino.app/Contents/Resources/Java/"; + } + return path; + } + + /** + * To test. + * + * @param args + */ + public static void main(String[] args) { + String BOARD_TAG = "uno"; + String ARDUINO_SDK_LINUX = "/home/melanie/Obeo/dev/arduino/arduino-1.0.5/"; + String FOLDER_LINUX = "/home/melanie/Obeo/dev/arduino/workspace_sirius/fr.obeo.dsl.arduino.build/test/"; + String ARDUINO_SDK_MACOSX = "/Users/MpoObeo/Dev/arduino/arduino-1.0.6/Arduino/"; + String FOLDER_MACOSX = "/Users/MpoObeo/Dev/arduino/workspace_sirius/fr.obeo.dsl.arduino.build/test/"; + String ARDUINO_SDK_WIN = "C:\\Program Files\\Arduino\\"; + String FOLDER_WIN = "C:\\Documents and Settings\\toto\\runtime-EclipseApplication\\test\\"; + + String os = System.getProperty("os.name").toLowerCase(); + String arduinoSdk = null; + String folder = null; + String serialPort = null; + if (os.contains(WINDOWS)) { + arduinoSdk = ARDUINO_SDK_WIN; + folder = FOLDER_WIN; + serialPort= "COM3"; + } else if (os.contains("nux")) { + arduinoSdk = ARDUINO_SDK_LINUX; + folder = FOLDER_LINUX; + serialPort = "/dev/ttyACM0"; + } else if (os.contains(MACOS)) { + arduinoSdk = ARDUINO_SDK_MACOSX; + folder = FOLDER_MACOSX; + serialPort = "/dev/tty.usbmodem1421"; + } + ArduinoBuilder builder = new ArduinoBuilder(arduinoSdk, BOARD_TAG, + folder, serialPort); + List libraries = new ArrayList(); + libraries.add("Servo"); + IStatus status = builder.compile("Sketch", libraries); + System.out.println(status); + } + + /** + * Compile a sketch and its specific libraries. + * + * @param sketchName + * Sketch name + * @param libraries + * Specific libraries names. + */ + public IStatus compile(String sketchName, List libraries) { + + // Compile sketch + IStatus sketchStatus = compileSketch(sketchName, libraries); + if (sketchStatus.getSeverity() != IStatus.OK) { + return sketchStatus; + } + + // Compile main libraries + IStatus mainLibrariesStatus = compileMainLibraries(); + if (mainLibrariesStatus.getSeverity() != IStatus.OK) { + return mainLibrariesStatus; + } + + // Compile specific libraries + if (libraries != null) { + for (String library : libraries) { + String libraryName = Character.toUpperCase(library.charAt(0)) + + library.substring(1); + IStatus specificLibraryStatus = compileSpecificLibrary( + arduinoSdk + "libraries" + File.separator + libraryName + + File.separator, libraryName); + if (specificLibraryStatus.getSeverity() != IStatus.OK) { + return specificLibraryStatus; + } + } + } + + // Link all + IStatus linkStatus = link(sketchName, libraries); + if (linkStatus.getSeverity() != IStatus.OK) { + return linkStatus; + } + + // Generate arduino.hex + return generateArduinoHex(); + } + + public IStatus upload() { + System.out.println("Upload arduino.hex"); + String command = arduinoSdk + "hardware" + File.separator + "tools" + + File.separator; + ProcessBuilder builder = null; + if (os.contains(WINDOWS)) { + command += "avr" + File.separator + "bin" + File.separator + + "avrdude.exe"; + builder = new ProcessBuilder(command, "-q", "-V", "-p", getMMCU(), + "-C", arduinoSdk + "hardware" + File.separator + "tools" + + File.separator + "avr" + File.separator + "etc" + + File.separator + "avrdude.conf", "-c", "arduino", + "-b", "115200", "-P", serialPort, "-U", "flash:w:arduino.hex:i"); + } else if (os.contains(MACOS)) { + command += "avr" + File.separator + "bin" + File.separator + + "avrdude"; + builder = new ProcessBuilder(command, "-q", "-V", "-p", getMMCU(), + "-C", arduinoSdk + "hardware" + File.separator + "tools" + + File.separator + "avr" + File.separator + "etc" + + File.separator + "avrdude.conf", "-c", "arduino", + "-b", "115200", "-P", serialPort, "-U", + "flash:w:arduino.hex:i"); + } else { + command += "avrdude"; + builder = new ProcessBuilder(command, "-q", "-V", "-p", getMMCU(), + "-C", arduinoSdk + "hardware" + File.separator + "tools" + + File.separator + "avrdude.conf", "-c", "arduino", + "-b", "115200", "-P", serialPort, "-U", + "flash:w:arduino.hex:i"); + } + return executeCommand(directory, builder); + } + + /** + * Generate arduino.hex file. + */ + private IStatus generateArduinoHex() { + System.out.println("Generate arduino.hex"); + String command = arduinoSdk + "hardware" + File.separator + "tools" + + File.separator + "avr" + File.separator + "bin" + + File.separator + "avr-objcopy"; + ProcessBuilder builder = new ProcessBuilder(command, "-j", ".eeprom", + "--set-section-flags=.eeprom=alloc,load", + "--change-section-lma", ".eeprom=0", "-O", "ihex", + "arduino.elf", "arduino.eep"); + executeCommand(directory, builder); + builder = new ProcessBuilder(command, "-O", "ihex", "-R", ".eeprom", + "arduino.elf", "arduino.hex"); + return executeCommand(directory, builder); + } + + /** + * Link all. + * + * @param sketchName + * Arduino sketch file name + */ + private IStatus link(String sketchName, List libraries) { + System.out.println("Link all"); + String command = arduinoSdk + "hardware" + File.separator + "tools" + + File.separator + "avr" + File.separator + "bin" + + File.separator + "avr-gcc"; + List commands = Lists.newArrayList(); + ProcessBuilder builder = new ProcessBuilder(commands); + commands.add(command); + commands.add("-mmcu=" + getMMCU()); + commands.add("-Wl,--gc-sections"); + commands.add("-Os"); + commands.add("-o"); + commands.add("arduino.elf"); + commands.add(sketchName + ".o"); + commands.add("WInterrupts.o"); + commands.add("wiring_analog.o"); + commands.add("wiring.o"); + commands.add("wiring_digital.o"); + commands.add("wiring_pulse.o"); + commands.add("wiring_shift.o"); + commands.add("CDC.o"); + commands.add("HardwareSerial.o"); + commands.add("HID.o"); + commands.add("IPAddress.o"); + commands.add("main.o"); + commands.add("new.o"); + commands.add("Print.o"); + commands.add("Stream.o"); + commands.add("Tone.o"); + commands.add("USBCore.o"); + commands.add("WMath.o"); + commands.add("WString.o"); + for (String library : libraries) { + String libraryName = Character.toUpperCase(library.charAt(0)) + + library.substring(1); + commands.add(libraryName + ".o"); + } + commands.add("-lc"); + commands.add("-lm"); + return executeCommand(directory, builder); + } + + /** + * Compile specific library. + * + * @param libraryName + * Library name + */ + private IStatus compileSpecificLibrary(String libraryPath, + String libraryName) { + System.out.println("Compile Specific Libraries"); + return compileCPPFile(libraryPath, libraryName); + } + + /** + * Compile the main Arduino libraries. + */ + private IStatus compileMainLibraries() { + System.out.println("Compile main libraries"); + String arduinoMainLibraryPath = arduinoSdk + "hardware" + + File.separator + "arduino" + File.separator + "cores" + + File.separator + "arduino" + File.separator; + IStatus status = null; + status = compileCFile(arduinoMainLibraryPath, "WInterrupts"); + if (status.getSeverity() != IStatus.OK) + return status; + status = compileCFile(arduinoMainLibraryPath, "wiring_analog"); + if (status.getSeverity() != IStatus.OK) + return status; + status = compileCFile(arduinoMainLibraryPath, "wiring"); + if (status.getSeverity() != IStatus.OK) + return status; + status = compileCFile(arduinoMainLibraryPath, "wiring_digital"); + if (status.getSeverity() != IStatus.OK) + return status; + status = compileCFile(arduinoMainLibraryPath, "wiring_pulse"); + if (status.getSeverity() != IStatus.OK) + return status; + status = compileCFile(arduinoMainLibraryPath, "wiring_shift"); + if (status.getSeverity() != IStatus.OK) + return status; + status = compileCPPFile(arduinoMainLibraryPath, "CDC"); + if (status.getSeverity() != IStatus.OK) + return status; + status = compileCPPFile(arduinoMainLibraryPath, "HardwareSerial"); + if (status.getSeverity() != IStatus.OK) + return status; + status = compileCPPFile(arduinoMainLibraryPath, "HID"); + if (status.getSeverity() != IStatus.OK) + return status; + status = compileCPPFile(arduinoMainLibraryPath, "IPAddress"); + + if (status.getSeverity() != IStatus.OK) + return status; + status = compileCPPFile(arduinoMainLibraryPath, "main"); + if (status.getSeverity() != IStatus.OK) + return status; + status = compileCPPFile(arduinoMainLibraryPath, "new"); + if (status.getSeverity() != IStatus.OK) + return status; + status = compileCPPFile(arduinoMainLibraryPath, "Print"); + if (status.getSeverity() != IStatus.OK) + return status; + status = compileCPPFile(arduinoMainLibraryPath, "Stream"); + if (status.getSeverity() != IStatus.OK) + return status; + status = compileCPPFile(arduinoMainLibraryPath, "Tone"); + if (status.getSeverity() != IStatus.OK) + return status; + status = compileCPPFile(arduinoMainLibraryPath, "USBCore"); + if (status.getSeverity() != IStatus.OK) + return status; + status = compileCPPFile(arduinoMainLibraryPath, "WMath"); + if (status.getSeverity() != IStatus.OK) + return status; + compileCPPFile(arduinoMainLibraryPath, "WString"); + return status; + } + + /** + * Compile ino file. + * + * @param filePath + * Path of the ino file to compile + */ + private IStatus compileSketch(String fileName, List libraries) { + System.out.println("Compile Sketch"); + String command = arduinoSdk + "hardware" + File.separator + "tools" + + File.separator + "avr" + File.separator + "bin" + + File.separator + "avr-g++"; + + if (os.contains(WINDOWS)) { + command += ".exe"; + } + List commands = Lists.newArrayList(); + commands.add(command); + commands.add("-x"); + commands.add("c++"); + commands.add("-include"); + commands.add("Arduino.h"); + commands.add("-c"); + commands.add("-mmcu=" + getMMCU()); + commands.add("-DF_CPU=" + getDFCPU()); + commands.add("-DARDUINO=" + getDArduino()); + commands.add("-I."); + commands.add("-I" + arduinoSdk + "hardware" + File.separator + + "arduino" + File.separator + "cores" + File.separator + + "arduino"); + commands.add("-I" + arduinoSdk + "hardware" + File.separator + + "arduino" + File.separator + "variants" + File.separator + + "standard"); + for (String library : libraries) { + String libraryName = Character.toUpperCase(library.charAt(0)) + + library.substring(1); + commands.add("-I" + arduinoSdk + "libraries" + File.separator + + libraryName); + } + commands.add("-g"); + commands.add("-Os"); + commands.add("-Wall"); + commands.add("-ffunction-sections"); + commands.add("-fdata-sections"); + commands.add("-fno-exceptions"); + commands.add(fileName + ".ino"); + commands.add("-o"); + commands.add(fileName + ".o"); + + ProcessBuilder builder = new ProcessBuilder(commands); + + return executeCommand(directory, builder); + } + + /** + * Compile C file. + * + * @param filePath + * Path of the C file to compile + */ + private IStatus compileCFile(String filePath, String fileName) { + System.out.println("Compile C file : " + filePath + fileName); + String command = arduinoSdk + "hardware" + File.separator + "tools" + + File.separator + "avr" + File.separator + "bin" + + File.separator + "avr-gcc"; + if (os.contains(WINDOWS)) { + command += ".exe"; + } + ProcessBuilder builder = new ProcessBuilder(command, "-c", "-mmcu=" + + getMMCU(), "-DF_CPU=" + getDFCPU(), "-DARDUINO=" + + getDArduino(), "-I.", "-I" + arduinoSdk + "hardware" + + File.separator + "arduino" + File.separator + "cores" + + File.separator + "arduino", "-I" + arduinoSdk + "hardware" + + File.separator + "arduino" + File.separator + "variants" + + File.separator + "standard", "-g", "-Os", "-Wall", + "-ffunction-sections", "-fdata-sections", "-std=gnu99", + filePath + fileName + ".c", "-o", fileName + ".o"); + return executeCommand(directory, builder); + } + + /** + * Compile CPP file. + * + * @param filePath + * Path of the CPP file to compile + */ + private IStatus compileCPPFile(String filePath, String fileName) { + System.out.println("Compile CPP file : " + filePath + fileName); + String command = arduinoSdk + "hardware" + File.separator + "tools" + + File.separator + "avr" + File.separator + "bin" + + File.separator + "avr-g++"; + if (os.contains(WINDOWS)) { + command += ".exe"; + } + List commands = new ArrayList<>(); + commands.add(command); + commands.add("-c"); + commands.add("-mmcu=" + getMMCU()); + commands.add("-DF_CPU=" + getDFCPU()); + commands.add("-DARDUINO=" + getDArduino()); + commands.add("-I."); + commands.add("-I" + arduinoSdk + "hardware" + File.separator + + "arduino" + File.separator + "cores" + File.separator + + "arduino"); + commands.add("-I" + arduinoSdk + "hardware" + File.separator + + "arduino" + File.separator + "variants" + File.separator + + "standard"); + commands.add("-g"); + commands.add("-Os"); + commands.add("-Wall"); + commands.add("-ffunction-sections"); + commands.add("-fdata-sections"); + commands.add("-fno-exceptions"); + commands.add(filePath + fileName + ".cpp"); + commands.add("-o"); + commands.add(fileName + ".o"); + ProcessBuilder builder = new ProcessBuilder(commands); + return executeCommand(directory, builder); + } + + /** + * Execute a command. + * + * @param directory + * Current directory + * @param builder + * Command to execute + */ + private IStatus executeCommand(File directory, ProcessBuilder builder) { + System.out.println(builder.command()); + builder.directory(directory); + try { + Process process = builder.start(); + inheritIO(process.getInputStream(), System.out); + // inheritIO(process.getErrorStream(), System.err); + process.waitFor(); + if (process.exitValue() > 0) { + String error = convertStreamToString(process.getErrorStream()); + return new Status(IStatus.ERROR, + ArduinoBuilderActivator.PLUGIN_ID, error); + } + } catch (IOException e) { + return new Status(IStatus.ERROR, ArduinoBuilderActivator.PLUGIN_ID, + e.getMessage(), e); + } catch (InterruptedException e) { + return new Status(IStatus.ERROR, ArduinoBuilderActivator.PLUGIN_ID, + e.getMessage(), e); + } + return new Status(IStatus.OK, ArduinoBuilderActivator.PLUGIN_ID, null); + } + + /** + * Get information from {$ARDUINO_SDK}/lib/version.txt in the Arduino SDK. + * + * @return + */ + private String getDArduino() { + // TODO Auto-generated method stub + return "106"; + } + + /** + * Get information from {$ARDUINO_SDK}/hardware/arduino/boards.txt file in + * the Arduino SDK : {$BOARD_TAG}.build.mcu=xxxx. + * + * @return + */ + private String getMMCU() { + // TODO Auto-generated method stub + return "atmega328p"; + } + + /** + * Get information from b{$ARDUINO_SDK}/hardware/arduino/boards.txtt file in + * the Arduino SDK : {$BOARD_TAG}.build.f_cpu=xxxx. + * + * @return + */ + private String getDFCPU() { + // TODO Auto-generated method stub + return "16000000L"; + } + + /** + * Inherit IO in console. + * + * @param src + * Source stream + * @param dest + * Destination stream + */ + private static void inheritIO(final InputStream src, final PrintStream dest) { + new Thread(new Runnable() { + @Override + public void run() { + Scanner sc = new Scanner(src); + while (sc.hasNextLine()) { + dest.println(sc.nextLine()); + } + sc.close(); + } + }).start(); + } + + private static String convertStreamToString(java.io.InputStream is) { + java.util.Scanner s = new java.util.Scanner(is).useDelimiter("\\A"); + return s.hasNext() ? s.next() : ""; + } +} \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.build/src/fr/obeo/dsl/arduino/build/ArduinoBuilderActivator.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.build/src/fr/obeo/dsl/arduino/build/ArduinoBuilderActivator.java new file mode 100644 index 00000000..f68c6bde --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.build/src/fr/obeo/dsl/arduino/build/ArduinoBuilderActivator.java @@ -0,0 +1,77 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.build; + +import org.eclipse.core.runtime.Status; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class ArduinoBuilderActivator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "fr.obeo.dsl.arduino.build"; //$NON-NLS-1$ + + // The shared instance + private static ArduinoBuilderActivator plugin; + + /** + * The constructor + */ + public ArduinoBuilderActivator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + @Override + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static ArduinoBuilderActivator getDefault() { + return plugin; + } + + /** + * A helper to log plugin errors. + * + * @param severity + * the error severity. + * @param message + * the error message. + * @param exception + * the error exception. + */ + public static void log(int severity, String message, Throwable exception) { + getDefault().getLog().log( + new Status(severity, PLUGIN_ID, message, exception)); + } +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/.classpath b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/.classpath new file mode 100644 index 00000000..39810b7d --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/.gitignore b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/.gitignore new file mode 100644 index 00000000..5e56e040 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/.gitignore @@ -0,0 +1 @@ +/bin diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/.project b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/.project new file mode 100644 index 00000000..7f9b0b0c --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/.project @@ -0,0 +1,35 @@ + + + fr.obeo.dsl.arduino.design + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.acceleo.ide.ui.acceleoBuilder + + + + + + org.eclipse.acceleo.ide.ui.acceleoNature + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/META-INF/MANIFEST.MF b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/META-INF/MANIFEST.MF new file mode 100644 index 00000000..d7a054a9 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/META-INF/MANIFEST.MF @@ -0,0 +1,25 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: fr.obeo.dsl.arduino.design +Bundle-SymbolicName: fr.obeo.dsl.arduino.design;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-Activator: fr.obeo.dsl.arduino.design.ArduinoDesignerPlugin +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + fr.obeo.dsl.arduino, + fr.obeo.dsl.arduino.ui;bundle-version="1.0.0", + fr.obeo.dsl.arduino.gen, + org.eclipse.acceleo.engine;bundle-version="3.3.2", + org.eclipse.core.resources;bundle-version="3.8.1", + org.eclipse.emf.transaction, + org.eclipse.sirius;bundle-version="2.0.0", + org.eclipse.sirius.common.acceleo.mtl;bundle-version="2.0.0", + org.eclipse.sirius.ui;bundle-version="2.0.0", + org.eclipse.sirius.common;bundle-version="2.0.0", + org.eclipse.sirius.common.ui;bundle-version="2.0.0", + org.eclipse.sirius.diagram;bundle-version="2.0.0" +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Import-Package: com.google.common.collect +Export-Package: fr.obeo.dsl.arduino.design, + fr.obeo.dsl.arduino.design.services diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/build.properties b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/build.properties new file mode 100644 index 00000000..a01d3679 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/build.properties @@ -0,0 +1,12 @@ +# +#Sun Sep 08 12:38:13 CEST 2013 +bin.includes = META-INF/,\ + .,\ + description/,\ + plugin.xml,\ + icons/,\ + images/,\ + resources/ +output..=bin/ +source..=src/ +customBuildCallbacks=build.acceleo diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/description/arduino.odesign b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/description/arduino.odesign new file mode 100644 index 00000000..115ca1cf --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/description/arduino.odesign @@ -0,0 +1,1511 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Constant.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Constant.gif new file mode 100644 index 00000000..bb57b143 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Constant.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Constant.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Constant.png new file mode 100644 index 00000000..df1e4ae1 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Constant.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Constant.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Constant.svg new file mode 100644 index 00000000..cdde7664 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Constant.svg @@ -0,0 +1,60 @@ + + + +image/svg+xml + + + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Delay.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Delay.gif new file mode 100644 index 00000000..574dbc6e Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Delay.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Delay.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Delay.png new file mode 100644 index 00000000..18b3d994 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Delay.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Delay.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Delay.svg new file mode 100644 index 00000000..add7c763 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Delay.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Equal.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Equal.gif new file mode 100644 index 00000000..4188b14c Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Equal.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Equal.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Equal.png new file mode 100644 index 00000000..06e72731 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Equal.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Equal.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Equal.svg new file mode 100644 index 00000000..797c46c9 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Equal.svg @@ -0,0 +1,64 @@ + + + +image/svg+xml + + + += + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Flow.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Flow.gif new file mode 100644 index 00000000..a01c12aa Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Flow.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Flow.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Flow.png new file mode 100644 index 00000000..823c7411 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Flow.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Flow.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Flow.svg new file mode 100644 index 00000000..e743e9d1 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Flow.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Function.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Function.png new file mode 100644 index 00000000..bf354c2b Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Function.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/If.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/If.gif new file mode 100644 index 00000000..93147e5b Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/If.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/If.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/If.png new file mode 100644 index 00000000..a212f891 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/If.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/If.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/If.svg new file mode 100644 index 00000000..bbbedf02 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/If.svg @@ -0,0 +1,20 @@ + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Level.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Level.gif new file mode 100644 index 00000000..aedb4505 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Level.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Level.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Level.png new file mode 100644 index 00000000..47508a24 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Level.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Level.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Level.svg new file mode 100644 index 00000000..e97d5e30 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Level.svg @@ -0,0 +1,16 @@ + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Lower.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Lower.png new file mode 100644 index 00000000..8cc83c40 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Lower.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Lower.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Lower.svg new file mode 100644 index 00000000..7682c42a --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Lower.svg @@ -0,0 +1,64 @@ + + + +image/svg+xml + + + +< + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/LowerOrEqual.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/LowerOrEqual.png new file mode 100644 index 00000000..2d0aef58 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/LowerOrEqual.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/LowerOrEqual.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/LowerOrEqual.svg new file mode 100644 index 00000000..5f54046e --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/LowerOrEqual.svg @@ -0,0 +1,65 @@ + + + +image/svg+xml + + + +<= + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Minus.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Minus.png new file mode 100644 index 00000000..dcc6f682 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Minus.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Minus.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Minus.svg new file mode 100644 index 00000000..04833511 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Minus.svg @@ -0,0 +1,65 @@ + + + +image/svg+xml + + + +- + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Module.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Module.gif new file mode 100644 index 00000000..b74ba236 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Module.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Module.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Module.png new file mode 100644 index 00000000..2337805e Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Module.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Module.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Module.svg new file mode 100644 index 00000000..a157f23b --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Module.svg @@ -0,0 +1,51 @@ + + + +image/svg+xml + + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Parameter.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Parameter.png new file mode 100644 index 00000000..dd138ced Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Parameter.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Platform.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Platform.gif new file mode 100644 index 00000000..bff3106c Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Platform.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Platform.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Platform.png new file mode 100644 index 00000000..60aa71b3 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Platform.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Platform.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Platform.svg new file mode 100644 index 00000000..6b236c2c --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Platform.svg @@ -0,0 +1,56 @@ + + + +image/svg+xml + + + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Plus.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Plus.png new file mode 100644 index 00000000..239623fe Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Plus.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Plus.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Plus.svg new file mode 100644 index 00000000..3b2867b9 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Plus.svg @@ -0,0 +1,65 @@ + + + +image/svg+xml + + + ++ + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Repeat.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Repeat.gif new file mode 100644 index 00000000..fa36f216 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Repeat.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Repeat.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Repeat.png new file mode 100644 index 00000000..a9b7391e Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Repeat.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Repeat.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Repeat.svg new file mode 100644 index 00000000..a8c5f826 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Repeat.svg @@ -0,0 +1,15 @@ + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Sensor.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Sensor.gif new file mode 100644 index 00000000..be4c534e Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Sensor.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Sensor.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Sensor.png new file mode 100644 index 00000000..31d8f8a0 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Sensor.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Sensor.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Sensor.svg new file mode 100644 index 00000000..9833e566 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Sensor.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Set.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Set.gif new file mode 100644 index 00000000..d2a95949 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Set.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Set.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Set.png new file mode 100644 index 00000000..70262351 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Set.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Set.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Set.svg new file mode 100644 index 00000000..72ed503d --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Set.svg @@ -0,0 +1,56 @@ + + + +image/svg+xml + + + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Status.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Status.gif new file mode 100644 index 00000000..1c93efa1 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Status.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Status.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Status.png new file mode 100644 index 00000000..22c6bf95 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Status.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Status.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Status.svg new file mode 100644 index 00000000..a98915ca --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Status.svg @@ -0,0 +1,14 @@ + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Upper.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Upper.png new file mode 100644 index 00000000..9d731e68 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Upper.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Upper.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Upper.svg new file mode 100644 index 00000000..906892dd --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Upper.svg @@ -0,0 +1,64 @@ + + + +image/svg+xml + + + +> + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/UpperOrEqual.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/UpperOrEqual.png new file mode 100644 index 00000000..e6e65795 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/UpperOrEqual.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/UpperOrEqual.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/UpperOrEqual.svg new file mode 100644 index 00000000..6d786562 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/UpperOrEqual.svg @@ -0,0 +1,64 @@ + + + +image/svg+xml + + + +>= + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/UseFunction.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/UseFunction.png new file mode 100644 index 00000000..cb8976f0 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/UseFunction.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Variable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Variable.gif new file mode 100644 index 00000000..a9dec895 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Variable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Variable.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Variable.png new file mode 100644 index 00000000..d80ad0d7 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Variable.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Variable.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Variable.svg new file mode 100644 index 00000000..2241baf5 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Variable.svg @@ -0,0 +1,60 @@ + + + +image/svg+xml + + + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/While.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/While.gif new file mode 100644 index 00000000..22ade752 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/While.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/While.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/While.png new file mode 100644 index 00000000..35758366 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/While.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/While.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/While.svg new file mode 100644 index 00000000..1e1ada80 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/While.svg @@ -0,0 +1,13 @@ + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Wire.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Wire.gif new file mode 100644 index 00000000..b55ba122 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Wire.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Wire.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Wire.png new file mode 100644 index 00000000..e55d329f Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Wire.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Wire.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Wire.svg new file mode 100644 index 00000000..03c64368 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/Wire.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/channel_16x16.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/channel_16x16.png new file mode 100644 index 00000000..7371daf5 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/channel_16x16.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/channel_32x32.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/channel_32x32.png new file mode 100644 index 00000000..0ffd1f9d Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/channel_32x32.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/thread_16x16.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/thread_16x16.png new file mode 100644 index 00000000..348777e0 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/thread_16x16.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/thread_32x32.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/thread_32x32.png new file mode 100644 index 00000000..37923a7d Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/thread_32x32.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/thread_64x64.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/thread_64x64.png new file mode 100644 index 00000000..811b89df Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/icons/thread_64x64.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/analog.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/analog.png new file mode 100644 index 00000000..38adf4de Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/analog.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/analog.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/analog.svg new file mode 100644 index 00000000..0664fd09 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/analog.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/analog_input.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/analog_input.png new file mode 100644 index 00000000..081b0d5b Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/analog_input.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/analog_input.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/analog_input.svg new file mode 100644 index 00000000..d5aaa78c --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/analog_input.svg @@ -0,0 +1,59 @@ + + + +image/svg+xml + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/analog_output.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/analog_output.png new file mode 100644 index 00000000..14d96685 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/analog_output.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/analog_output.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/analog_output.svg new file mode 100644 index 00000000..483e25d7 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/analog_output.svg @@ -0,0 +1,58 @@ + + + +image/svg+xml + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/connector.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/connector.png new file mode 100644 index 00000000..428ff052 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/connector.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/connector.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/connector.svg new file mode 100644 index 00000000..531f77e6 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/connector.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/default.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/default.svg new file mode 100644 index 00000000..6b236c2c --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/default.svg @@ -0,0 +1,56 @@ + + + +image/svg+xml + + + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/delay.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/delay.svg new file mode 100644 index 00000000..add7c763 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/delay.svg @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/delete.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/delete.svg new file mode 100644 index 00000000..e9bf6205 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/delete.svg @@ -0,0 +1,55 @@ + + + +image/svg+xml + + + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/ambient_light.jpg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/ambient_light.jpg new file mode 100644 index 00000000..fda1c0d4 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/ambient_light.jpg differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/blue_led.jpg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/blue_led.jpg new file mode 100644 index 00000000..62b1f931 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/blue_led.jpg differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/buzzer.jpg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/buzzer.jpg new file mode 100644 index 00000000..bf42a54d Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/buzzer.jpg differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/default.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/default.svg new file mode 100644 index 00000000..6b236c2c --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/default.svg @@ -0,0 +1,56 @@ + + + +image/svg+xml + + + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/dfrduino_uno.jpg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/dfrduino_uno.jpg new file mode 100644 index 00000000..31b5ab2f Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/dfrduino_uno.jpg differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/infrared.jpg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/infrared.jpg new file mode 100644 index 00000000..2fa3cc15 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/infrared.jpg differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/platform.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/platform.svg new file mode 100644 index 00000000..6b236c2c --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/platform.svg @@ -0,0 +1,56 @@ + + + +image/svg+xml + + + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/push_button.jpg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/push_button.jpg new file mode 100644 index 00000000..a16a25a3 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/push_button.jpg differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/red_led.jpg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/red_led.jpg new file mode 100644 index 00000000..f5a70df1 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/red_led.jpg differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/rotation_sensor_v1.jpg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/rotation_sensor_v1.jpg new file mode 100644 index 00000000..490bc6d7 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/rotation_sensor_v1.jpg differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/servo.jpg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/servo.jpg new file mode 100644 index 00000000..39d0590c Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/servo.jpg differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/sound_sensor.jpg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/sound_sensor.jpg new file mode 100644 index 00000000..0e32fe36 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/sound_sensor.jpg differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/white_led.jpg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/white_led.jpg new file mode 100644 index 00000000..0e82573f Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/dfrobot/white_led.jpg differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/digital.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/digital.png new file mode 100644 index 00000000..85e3a12e Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/digital.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/digital.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/digital.svg new file mode 100644 index 00000000..77327d6c --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/digital.svg @@ -0,0 +1,21 @@ + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/digital_input.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/digital_input.png new file mode 100644 index 00000000..0964bdca Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/digital_input.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/digital_input.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/digital_input.svg new file mode 100644 index 00000000..0d7e7ef3 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/digital_input.svg @@ -0,0 +1,56 @@ + + + +image/svg+xml + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/digital_output.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/digital_output.png new file mode 100644 index 00000000..0d9c2b9f Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/digital_output.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/digital_output.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/digital_output.svg new file mode 100644 index 00000000..c5ae6a23 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/digital_output.svg @@ -0,0 +1,55 @@ + + + +image/svg+xml + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/existing_hardware.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/existing_hardware.svg new file mode 100644 index 00000000..0c4c32a9 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/existing_hardware.svg @@ -0,0 +1,57 @@ + + + +image/svg+xml + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/existing_hardwareKit.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/existing_hardwareKit.svg new file mode 100644 index 00000000..e2448738 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/existing_hardwareKit.svg @@ -0,0 +1,56 @@ + + + +image/svg+xml + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/existing_sketch.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/existing_sketch.png new file mode 100644 index 00000000..bf264d27 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/existing_sketch.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/existing_sketch.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/existing_sketch.svg new file mode 100644 index 00000000..79e992bd --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/existing_sketch.svg @@ -0,0 +1,57 @@ + + + +image/svg+xml + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/fan.jpg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/fan.jpg new file mode 100644 index 00000000..55b2e0bb Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/fan.jpg differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/hardware.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/hardware.svg new file mode 100644 index 00000000..a157f23b --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/hardware.svg @@ -0,0 +1,51 @@ + + + +image/svg+xml + + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/hardwareKit.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/hardwareKit.svg new file mode 100644 index 00000000..85c72776 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/hardwareKit.svg @@ -0,0 +1,52 @@ + + + +image/svg+xml + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/hardware_invalid.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/hardware_invalid.svg new file mode 100644 index 00000000..1020f4d3 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/hardware_invalid.svg @@ -0,0 +1,52 @@ + + + +image/svg+xml + + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/loop.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/loop.svg new file mode 100644 index 00000000..325f5021 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/loop.svg @@ -0,0 +1,14 @@ + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/loop_invalid.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/loop_invalid.svg new file mode 100644 index 00000000..9c4ccbeb --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/loop_invalid.svg @@ -0,0 +1,50 @@ + + + +image/svg+xml + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/music_player.jpg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/music_player.jpg new file mode 100644 index 00000000..6f505e31 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/music_player.jpg differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/platform.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/platform.png new file mode 100644 index 00000000..4b60253a Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/platform.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/platform.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/platform.svg new file mode 100644 index 00000000..6b236c2c --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/platform.svg @@ -0,0 +1,56 @@ + + + +image/svg+xml + + + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/software.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/software.svg new file mode 100644 index 00000000..20d38f7e --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/software.svg @@ -0,0 +1,51 @@ + + + +image/svg+xml + + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/software_invalid.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/software_invalid.svg new file mode 100644 index 00000000..54134814 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/software_invalid.svg @@ -0,0 +1,52 @@ + + + +image/svg+xml + + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/upload.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/upload.svg new file mode 100644 index 00000000..c7d292c7 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/upload.svg @@ -0,0 +1,53 @@ + + + +image/svg+xml + + + + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/upload_invalid.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/upload_invalid.svg new file mode 100644 index 00000000..39597b32 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/images/upload_invalid.svg @@ -0,0 +1,54 @@ + + + +image/svg+xml + + + + + \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/plugin.xml b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/plugin.xml new file mode 100644 index 00000000..8386fd1d --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/plugin.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/pom.xml b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/pom.xml new file mode 100644 index 00000000..eba4343d --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/pom.xml @@ -0,0 +1,42 @@ + + + + 4.0.0 + + + fr.obeo.dsl.arduino + parent + 1.0.0-SNAPSHOT + ../../releng/fr.obeo.dsl.arduino.parent + + + fr.obeo.dsl.arduino.design + eclipse-plugin + + Viewpoint Based Modeler for Arduino + + + + + org.eclipse.tycho + tycho-source-plugin + + + org.apache.maven.plugins + maven-pmd-plugin + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/resources/ArdublockKit.arduino b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/resources/ArdublockKit.arduino new file mode 100644 index 00000000..a8fa65d7 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/resources/ArdublockKit.arduino @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/src/fr/obeo/dsl/arduino/design/ArduinoDesignerPlugin.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/src/fr/obeo/dsl/arduino/design/ArduinoDesignerPlugin.java new file mode 100644 index 00000000..161f4efa --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/src/fr/obeo/dsl/arduino/design/ArduinoDesignerPlugin.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.design; + +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; +import org.eclipse.sirius.business.api.componentization.ViewpointRegistry; +import org.eclipse.sirius.viewpoint.description.Viewpoint; + +/** + * The activator class controls the plug-in life cycle + */ +public class ArduinoDesignerPlugin extends AbstractUIPlugin { + // The plug-in ID + public static final String PLUGIN_ID = "fr.obeo.dsl.arduino.design"; + + // The shared instance + private static ArduinoDesignerPlugin plugin; + + private static Set viewpoints; + + /** + * The constructor + */ + public ArduinoDesignerPlugin() { + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + viewpoints = new HashSet(); + viewpoints.addAll(ViewpointRegistry.getInstance().registerFromPlugin(PLUGIN_ID + "/description/arduino.odesign")); + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + @Override + public void stop(BundleContext context) throws Exception { + plugin = null; + if (viewpoints != null) { + for (final Viewpoint viewpoint: viewpoints) { + ViewpointRegistry.getInstance().disposeFromPlugin(viewpoint); + } + viewpoints.clear(); + viewpoints = null; + } + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static ArduinoDesignerPlugin getDefault() { + return plugin; + } +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/src/fr/obeo/dsl/arduino/design/ArduinoDesignerUtils.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/src/fr/obeo/dsl/arduino/design/ArduinoDesignerUtils.java new file mode 100644 index 00000000..440605f8 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/src/fr/obeo/dsl/arduino/design/ArduinoDesignerUtils.java @@ -0,0 +1,50 @@ +package fr.obeo.dsl.arduino.design; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.sirius.ui.business.api.session.IEditingSession; +import org.eclipse.sirius.ui.business.api.session.SessionUIManager; + +import fr.obeo.dsl.arduino.Project; + +/** + * Utility for arduino designer. + * + * @author Yvan Lussaud + * + */ +public final class ArduinoDesignerUtils { + + /** + * Constructor. + */ + private ArduinoDesignerUtils() { + // nothing to do here + } + + /** + * Gets the opened {@link Project}. + * + * @return the opened {@link Project} if nay, null otherwise + */ + public static Project getOpenedProject() { + Project res = null; + + for (IEditingSession session : SessionUIManager.INSTANCE + .getUISessions()) { + for (Resource resource : session.getSession() + .getSemanticResources()) { + for (EObject eObj : resource.getContents()) { + if (eObj instanceof Project + && eObj.eResource().getURI().isPlatformResource()) { + res = (Project) eObj; + break; + } + } + } + } + + return res; + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/src/fr/obeo/dsl/arduino/design/services/ArduinoServices.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/src/fr/obeo/dsl/arduino/design/services/ArduinoServices.java new file mode 100644 index 00000000..24d46e53 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.design/src/fr/obeo/dsl/arduino/design/services/ArduinoServices.java @@ -0,0 +1,985 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.design.services; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; + +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.emf.common.util.Enumerator; +import org.eclipse.emf.common.util.TreeIterator; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EStructuralFeature.Setting; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +import org.eclipse.emf.ecore.util.ECrossReferenceAdapter; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.sirius.business.api.dialect.DialectManager; +import org.eclipse.sirius.business.api.session.Session; +import org.eclipse.sirius.business.api.session.SessionManager; +import org.eclipse.sirius.diagram.DDiagram; +import org.eclipse.sirius.diagram.DDiagramElement; +import org.eclipse.sirius.diagram.DEdge; +import org.eclipse.sirius.ui.business.api.dialect.DialectUIManager; +import org.eclipse.sirius.viewpoint.DRepresentation; +import org.eclipse.sirius.viewpoint.DSemanticDecorator; +import org.eclipse.sirius.viewpoint.description.RepresentationDescription; +import org.eclipse.sirius.viewpoint.description.Viewpoint; + +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Lists; + +import fr.obeo.dsl.arduino.AnalogPin; +import fr.obeo.dsl.arduino.ArduinoAnalogModule; +import fr.obeo.dsl.arduino.ArduinoBoard; +import fr.obeo.dsl.arduino.ArduinoDigitalModule; +import fr.obeo.dsl.arduino.ArduinoFactory; +import fr.obeo.dsl.arduino.BinaryBooleanExpression; +import fr.obeo.dsl.arduino.BinaryBooleanOperatorKind; +import fr.obeo.dsl.arduino.BinaryExpression; +import fr.obeo.dsl.arduino.BinaryIntegerExpression; +import fr.obeo.dsl.arduino.BinaryIntegerOperatorKind; +import fr.obeo.dsl.arduino.Block; +import fr.obeo.dsl.arduino.Board; +import fr.obeo.dsl.arduino.BooleanConstant; +import fr.obeo.dsl.arduino.BooleanExpression; +import fr.obeo.dsl.arduino.BooleanModuleGet; +import fr.obeo.dsl.arduino.Constant; +import fr.obeo.dsl.arduino.Control; +import fr.obeo.dsl.arduino.DigitalPin; +import fr.obeo.dsl.arduino.Expression; +import fr.obeo.dsl.arduino.If; +import fr.obeo.dsl.arduino.Instruction; +import fr.obeo.dsl.arduino.IntegerConstant; +import fr.obeo.dsl.arduino.IntegerModuleGet; +import fr.obeo.dsl.arduino.Module; +import fr.obeo.dsl.arduino.ModuleAssignment; +import fr.obeo.dsl.arduino.ModuleGet; +import fr.obeo.dsl.arduino.ModuleInstruction; +import fr.obeo.dsl.arduino.Pin; +import fr.obeo.dsl.arduino.Project; +import fr.obeo.dsl.arduino.Sketch; +import fr.obeo.dsl.arduino.UnaryBooleanExpression; +import fr.obeo.dsl.arduino.UnaryBooleanOperatorKind; +import fr.obeo.dsl.arduino.UnaryExpression; +import fr.obeo.dsl.arduino.UnaryIntegerExpression; +import fr.obeo.dsl.arduino.UnaryIntegerOperatorKind; +import fr.obeo.dsl.arduino.Variable; +import fr.obeo.dsl.arduino.VariableAssignment; +import fr.obeo.dsl.arduino.VariableDeclaration; +import fr.obeo.dsl.arduino.While; + +public class ArduinoServices { + + private static final String IMAGES_PATH = "/fr.obeo.dsl.arduino.design/images/"; + + public void updateDigitalPins(ArduinoBoard platform, String totalOfPins) { + List pinsTmp = new ArrayList(); + pinsTmp.addAll(platform.getDigitalPins()); + + int total = Integer.parseInt(totalOfPins); + if (total > platform.getDigitalPins().size()) { + // Create missing pins + for (int i = pinsTmp.size(); i < total; i++) { + DigitalPin pin = ArduinoFactory.eINSTANCE.createDigitalPin(); + pin.setId(i); + platform.getDigitalPins().add(pin); + } + } else { + if (total > 0) { + // Delete the other pins + for (int i = total; i < pinsTmp.size(); i++) { + DigitalPin pin = pinsTmp.get(i); + EcoreUtil.delete(pin); + } + } else { + platform.getDigitalPins().clear(); + } + } + } + + public void updateAnalogPins(ArduinoBoard platform, String totalOfPins) { + List pinsTmp = new ArrayList(); + pinsTmp.addAll(platform.getAnalogPins()); + + int total = Integer.parseInt(totalOfPins); + if (total > platform.getAnalogPins().size()) { + // Create missing pins + for (int i = pinsTmp.size(); i < total; i++) { + AnalogPin pin = ArduinoFactory.eINSTANCE.createAnalogPin(); + pin.setId(i); + platform.getAnalogPins().add(pin); + } + } else { + if (total > 0) { + // Delete the other pins + for (int i = total; i < pinsTmp.size(); i++) { + AnalogPin pin = pinsTmp.get(i); + EcoreUtil.delete(pin); + } + } else { + platform.getAnalogPins().clear(); + } + } + } + + public Module getModule(Pin pin) { + Module res = null; + if (pin instanceof AnalogPin) { + res = ((AnalogPin) pin).getModule(); + } else if (pin instanceof DigitalPin) { + res = ((DigitalPin) pin).getModule(); + } + return res; + } + + public String getImage(Module module) { +// String imageName = module.getImage(); + return getImage(""); + } + + public String getImage(ArduinoBoard platform) { +// String imageName = platform.getImage(); + return getImage(""); + } + + private String getImage(String imageName) { + if (imageName != null && imageName.length() > 0) { + return IMAGES_PATH + imageName; + } + return IMAGES_PATH + "default.svg"; + } + + public List getPlatforms(EObject object) { + List result = Lists.newArrayList(); + Session session = SessionManager.INSTANCE.getSession(object); + + for (Resource resource : session.getSemanticResources()) { + for (Iterator iterator = resource.getAllContents(); iterator + .hasNext();) { + EObject content = iterator.next(); + if (content instanceof Board) { + result.add((Board) content); + } + } + } + + return result; + } + + public List getModules(EObject object) { + List result = Lists.newArrayList(); + Session session = SessionManager.INSTANCE.getSession(object); + + for (Resource resource : session.getSemanticResources()) { + for (Iterator iterator = resource.getAllContents(); iterator + .hasNext();) { + EObject content = iterator.next(); + if (content instanceof Module) { + result.add((Module) content); + } + } + } + return result; + } + + public List getActuators(Sketch sketch) { + List result = new ArrayList<>(); + List modules = ImmutableList + .copyOf(getConnectedModules(sketch.getProject().getBoards())); + + /*for (Module module : modules) { + if (module instanceof Actuator) { + result.add(module); + } + }*/ + return result; + } + + public List getSensors(Sketch sketch) { + List result = new ArrayList<>(); + List modules = ImmutableList + .copyOf(getConnectedModules(sketch.getProject().getBoards())); + + /* for (Module module : modules) { + if (module instanceof Sensor) { + result.add(module); + } + }*/ + return result; + } + + public List getLevelModules(Sketch sketch) { + List result = new ArrayList(); + //List modules = ImmutableList.copyOf(getActuators(sketch)); + + for(Board board : sketch.getProject().getBoards()){ + if(board instanceof ArduinoBoard){ + ArduinoBoard arduino = (ArduinoBoard)board; + for(DigitalPin pin : arduino.getDigitalPins()){ + if (pin.getModule().isLevel()) { + result.add(pin.getModule()); + } + } + for(AnalogPin pin : arduino.getAnalogPins()){ + if (pin.getModule().isLevel()) { + result.add(pin.getModule()); + } + } + } + } + + /*for (Module module : modules) { + if (module.isLevel()) { + result.add(module); + } + }*/ + return result; + } + + public Sketch getSketch(EObject eObject) { + if (eObject instanceof Sketch) { + return (Sketch) eObject; + } + + while (eObject != null && !(eObject instanceof Sketch)) { + eObject = eObject.eContainer(); + } + + return (Sketch) eObject; + } + + private List getConnectedModules(Board board) { + List result = new ArrayList<>(); + if (board instanceof ArduinoBoard) { + ArduinoBoard arduinoBoard = (ArduinoBoard) board; + for (AnalogPin pin : arduinoBoard.getAnalogPins()) { + final Module module = pin.getModule(); + if (module != null) { + result.add(module); + } + } + for (DigitalPin pin : arduinoBoard.getDigitalPins()) { + final Module module = pin.getModule(); + if (module != null) { + result.add(module); + } + } + } + return result; + } + + public String computeExpressionLabel(fr.obeo.dsl.arduino.ModuleAssignment e) { + String label = e.getModule().getName(); + if (e.getOperand() instanceof BooleanConstant) { + if (((BooleanConstant)e.getOperand()).isValue()){ + label += " : on"; + }else{ + label += " : off"; + } + } + if (e.getOperand() instanceof IntegerConstant) { + label += " : "+((IntegerConstant)e.getOperand()).getValue(); + } + return label; + } + + public String computeExpressionLabel(fr.obeo.dsl.arduino.Module e) { + String label = e.getName(); + return label; + } + + public String computeLinkLabel(DDiagramElement edgeLink) { + String label = ""; + if (edgeLink instanceof DEdge + && ((DEdge) edgeLink).getTargetNode() instanceof DSemanticDecorator) { + EObject target = ((DSemanticDecorator) ((DEdge) edgeLink) + .getTargetNode()).getTarget(); + if (target instanceof ModuleAssignment) { + ModuleAssignment ms = (ModuleAssignment) target; + if (ms.getOperand() instanceof BooleanConstant) { + if (((BooleanConstant)ms.getOperand()).isValue()){ + label = "on"; + }else{ + label = "off"; + } + } + } + } + + return label; + } + + + public String computeLabel(Expression Expression) { + if (Expression instanceof Variable) { + return ((Variable) Expression).getName(); + } + if (Expression instanceof BooleanConstant) { + return String.valueOf(((BooleanConstant) Expression).isValue()); + } + if (Expression instanceof IntegerConstant) { + return String.valueOf(((IntegerConstant) Expression).getValue()); + } + if (Expression instanceof ModuleGet) { + return "get("+((ModuleGet) Expression).getModule().getName()+")"; + } + if (Expression instanceof BinaryBooleanExpression) { + String label = ""; + label += computeLabel(((BinaryBooleanExpression)Expression).getLeft()) + " "; + label += getOperator(((BinaryBooleanExpression)Expression).getOperator()); + label += " " + computeLabel(((BinaryBooleanExpression)Expression).getRight()); + return label; + } + if (Expression instanceof BinaryIntegerExpression) { + return "(" + computeLabel(((BinaryExpression) Expression).getLeft()) + + getOperator(((BinaryIntegerExpression) Expression).getOperator()) + + computeLabel(((BinaryExpression) Expression).getRight()) + ")"; + } + if (Expression instanceof BinaryBooleanExpression) { + return "(" + computeLabel(((BinaryExpression) Expression).getLeft()) + + getOperator(((BinaryBooleanExpression) Expression).getOperator()) + + computeLabel(((BinaryExpression) Expression).getRight()) + ")"; + } + + + return "null"; + } + + + public String computeLabel(While instruction) { + String label = "While "; + if (instruction.getCondition() == null){ + label+= "null condition"; + return label; + } + Expression cond = instruction.getCondition(); + if (cond instanceof BinaryBooleanExpression + && ((BinaryBooleanExpression)instruction.getCondition()).getLeft() != null + && ((BinaryBooleanExpression)instruction.getCondition()).getRight() != null) { + label += computeLabel(((BinaryBooleanExpression)cond).getLeft()) + " "; + label += getOperator(((BinaryBooleanExpression)cond).getOperator()); + label += " " + computeLabel(((BinaryBooleanExpression)cond).getRight()); + } + if (cond instanceof BooleanModuleGet + && + ((BooleanModuleGet)cond).getModule() != null) { + label += computeLabel(cond); + } + + return label; + } + + public String computeLabelOperator(BinaryIntegerOperatorKind operator) { + return getOperator(operator); + } + public String computeLabelOperator(BinaryBooleanOperatorKind operator) { + return getOperator(operator); + } + public String computeLabelOperator(UnaryIntegerOperatorKind operator) { + return getOperator(operator); + } + public String computeLabelOperator(UnaryBooleanOperatorKind operator) { + return getOperator(operator); + } + + public String computeLabelOperator(BinaryIntegerExpression operator) { + return getOperator(operator.getOperator()); + } + public String computeLabelOperator(BinaryBooleanExpression operator) { + return getOperator(operator.getOperator()); + } + public String computeLabelOperator(UnaryIntegerExpression operator) { + return getOperator(operator.getOperator()); + } + public String computeLabelOperator(UnaryBooleanExpression operator) { + return getOperator(operator.getOperator()); + } + + public String computeLabel(ModuleGet instruction) { + return instruction.getModule().getName(); + } + public String computeLabel(IntegerModuleGet instruction) { + return instruction.getModule().getName(); + } + public String computeLabel(BooleanModuleGet instruction) { + return instruction.getModule().getName(); + } + + public String computeLabel(If instruction) { + String label = "If "; + if (instruction.getCondition() != null) { + label += computeLabel(instruction.getCondition()); + } + return label; + } + + public String computeLabel(VariableAssignment set) { + String label = "Set "; + if (set.getVariable() != null && set.getOperand() != null) { + label += set.getVariable().getName() + " = " + + computeLabel(set.getOperand()); + } + return label; + } + + public String computeLabel(String operator) { + return getOperator(getOperator(operator)); + } + + public String getOperator(Enumerator operator) { + return "operator not supported"; + } + public String getOperator(BinaryIntegerOperatorKind operator) { + switch (operator) { + case DIV: + return "/"; + case MAX: + return "max"; + case MIN: + return "min"; + case MINUS: + return "-"; + case MUL: + return "*"; + case PLUS: + return "+"; + case POURCENT: + return "%"; + } + return null; + } + + public String getOperator(UnaryIntegerOperatorKind operator) { + switch (operator) { + case MINUS: + return "-"; + case SQUARE_ROOT: + return "sqrt"; + } + return null; + } + + public String getOperator(UnaryBooleanOperatorKind operator) { + switch (operator) { + case NOT: + return "!"; + } + return null; + } + + public String getOperator(BinaryBooleanOperatorKind operator) { + switch (operator) { + case AND: + return "&"; + case DIFFERENT: + return "!="; + case EQUAL: + return "=="; + case OR: + return "or"; + case SUP: + return ">"; + case SUP_OR_EQUAL: + return ">="; + case INF: + return "<"; + case INF_OR_EQUAL: + return "<="; + } + return null; + } + + public Enumerator getOperator(String operator) { + + if (operator.equals("/") || operator.equals("div")) { + return BinaryIntegerOperatorKind.DIV; + } + if (operator.equals("max")) { + return BinaryIntegerOperatorKind.MAX; + } + if (operator.equals("min")) { + return BinaryIntegerOperatorKind.MIN; + } + if (operator.equals("-") || operator.equals("minus")) { + return BinaryIntegerOperatorKind.MINUS; + } + if (operator.equals("*") || operator.equals("mul")) { + return BinaryIntegerOperatorKind.MUL; + } + if (operator.equals("+") || operator.equals("plus")) { + return BinaryIntegerOperatorKind.PLUS; + } + if (operator.equals("%") || operator.equals("pourcent")) { + return BinaryIntegerOperatorKind.POURCENT; + } + + if (operator.equals("&") || operator.equals("and")) { + return BinaryBooleanOperatorKind.AND; + } + if (operator.equals("!=") || operator.equals("diff")) { + return BinaryBooleanOperatorKind.DIFFERENT; + } + if (operator.equals("==") || operator.equals("equal")) { + return BinaryBooleanOperatorKind.EQUAL; + } + if (operator.equals("<") || operator.equals("lower")) { + return BinaryBooleanOperatorKind.INF; + } + if (operator.equals("<=") || operator.equals("lowerOrEqual")) { + return BinaryBooleanOperatorKind.INF_OR_EQUAL; + } + if (operator.equals("or")) { + return BinaryBooleanOperatorKind.OR; + } + if (operator.equals(">") || operator.equals("upper")) { + return BinaryBooleanOperatorKind.SUP; + } + if (operator.equals(">=") || operator.equals("upperOrEqual")) { + return BinaryBooleanOperatorKind.SUP_OR_EQUAL; + } + if (operator.equals("not")) { + return UnaryBooleanOperatorKind.NOT; + } + + return null; + } + + public Expression getExpression(Sketch sketch, String expression) { + if (isInteger(expression)) { + fr.obeo.dsl.arduino.IntegerConstant constant = ArduinoFactory.eINSTANCE + .createIntegerConstant(); + constant.setValue(Integer.parseInt(expression)); + return constant; + } + Variable var = ArduinoFactory.eINSTANCE.createIntegerVariable(); + var.setName(expression); +// var.setExpression("0"); + return var; + } + + private boolean isInteger(String s) { + try { + Integer.parseInt(s); + } catch (NumberFormatException e) { + return false; + } + return true; + } + +// public void editLabel(While instruction, Sketch sketch, String left, +// String operator, String right) { +// BooleanExpression condition = ((BooleanExpression)instruction.getCondition()); +// if (condition == null) { +// condition = ArduinoFactory.eINSTANCE.createBooleanExpression(); +// sketch.getInstructions().add(condition); +// instruction.setCondition(condition); +// } +// +// Expression oldLeft = condition.getLeft(); +// Expression oldRight = condition.getRight(); +// +// condition.setLeft(getExpression(sketch, left)); +// condition.setOperator(getOperator(operator)); +// condition.setRight(getExpression(sketch, right)); +// +// deleteUnusedExpression(sketch, oldLeft); +// deleteUnusedExpression(sketch, oldRight); +// } + + public void editLabel(VariableAssignment instruction, Sketch sketch, String variable, + String Expression) { + Expression oldVariable = instruction.getVariable(); + Expression oldExpression = instruction.getOperand(); + instruction.setVariable((Variable) getExpression(sketch, variable)); + instruction.setOperand(getExpression(sketch, Expression)); + + // Clean unused Expressions + deleteUnusedExpression(sketch, oldVariable); + deleteUnusedExpression(sketch, oldExpression); + } + + public void editLabel(Expression Expression, String newExpression) { + + } + + public void deleteUnusedExpressions(Sketch sketch) { + ImmutableList instructions = ImmutableList.copyOf(getAllInstructions(sketch)); + for (Instruction instruction : instructions) { + if (instruction instanceof Expression) { + deleteUnusedExpression(sketch, (Expression) instruction); + } + } + } + + private void deleteUnusedExpression(Sketch sketch, Expression Expression) { + if (Expression != null && isNotUsedAnymore(sketch, Expression)) { + EcoreUtil.delete(Expression); + } + } + + private boolean isNotUsedAnymore(Sketch sketch, Expression Expression) { + ResourceSet resourceSet = Expression.eResource().getResourceSet(); + ECrossReferenceAdapter adapter = new ECrossReferenceAdapter(); + resourceSet.eAdapters().add(adapter); + Collection refs = adapter.getInverseReferences(Expression, true); + return refs.size() == 1; + } + + public List getVariableDeclarations(EObject container) { + List variableDeclarations = Lists.newArrayList(); + TreeIterator it = container.eAllContents(); + while(it.hasNext()){ + EObject eo = it.next(); + if (eo instanceof VariableDeclaration){ + variableDeclarations.add((VariableDeclaration) eo); + } + } + return variableDeclarations; + } + + public EObject getConnectedPin(EObject module) { + return module.eContainer(); + } + + + public Instruction getLastInstruction(Block block) { + List instructions = block.getInstructions(); + if (!instructions.isEmpty()) { + return instructions.get(instructions.size()-1); + } + return null; + } + + public EObject getNextInstruction(EObject current) { + EObject res = null; + if (current instanceof Instruction) { + Block block = (Block)current.eContainer(); + List instructions = block.getInstructions(); + int index = instructions.indexOf(current); + if (index != -1) { + index++; + if (index == instructions.size() && block instanceof Sketch) { + res = block; + } else if (index < instructions.size()) { + res = instructions.get(index); + } + } + } else if (current instanceof Sketch) { + List instructions = getAllInstructions((Sketch)current); + res = instructions.isEmpty() ? null : instructions.get(0); + } + return res; + } + + public List getNumericalExpressions(EObject container) { + List expressions = Lists.newArrayList(); + if (container instanceof VariableAssignment) { + Expression Expression = ((VariableAssignment) container).getOperand(); + if (Expression instanceof BinaryIntegerExpression) { + expressions.add((BinaryIntegerExpression) Expression); + } + } else if (container instanceof BinaryExpression) { + Expression left = ((BinaryExpression) container).getLeft(); + Expression right = ((BinaryExpression) container).getRight(); + if (left instanceof BinaryIntegerExpression) { + expressions.add((BinaryIntegerExpression) left); + } + if (right instanceof BinaryIntegerExpression) { + expressions.add((BinaryIntegerExpression) right); + } + } + return expressions; + } + + public List getModuleGets(EObject container) { + List moduleGetters = Lists.newArrayList(); + if (container instanceof Sketch) { + List instructions = getAllInstructions((Sketch)container); + for (Instruction instruction : instructions) { + if (instruction instanceof ModuleGet) { + if ( +// instruction.getNext() == null || + isNotUsedAnymore((Sketch) container, + (ModuleGet) instruction)) { + moduleGetters.add((ModuleGet) instruction); + } + } + } + } else if (container instanceof BinaryExpression) { + Expression left = ((BinaryExpression) container).getLeft(); + Expression right = ((BinaryExpression) container).getRight(); + if (left instanceof ModuleGet) { + moduleGetters.add((ModuleGet) left); + } + if (right instanceof ModuleGet) { + moduleGetters.add((ModuleGet) right); + } + } + return moduleGetters; + } + + public List getBooleanExpressions(EObject container) { + List booleanExpressions = Lists.newArrayList(); + Iterator it = container.eContents().iterator(); + while(it.hasNext()){ + EObject eo = it.next(); + if (eo instanceof BooleanExpression){ + booleanExpressions.add((BooleanExpression) eo); + } + } + return booleanExpressions; + } + + public List getConstants(EObject container) { + List constants = Lists.newArrayList(); + if (container instanceof VariableAssignment) { + Expression Expression = ((VariableAssignment) container).getOperand(); + if (Expression instanceof Constant) { + constants.add((Constant) Expression); + } + }else if (container instanceof UnaryExpression) { + Expression Expression = ((UnaryExpression) container).getOperand(); + if (Expression instanceof Constant) { + constants.add((Constant) Expression); + } + } else if (container instanceof BinaryExpression) { + Expression left = ((BinaryExpression) container).getLeft(); + Expression right = ((BinaryExpression) container).getRight(); + if (left instanceof Constant) { + constants.add((Constant) left); + } + if (right instanceof Constant) { + constants.add((Constant) right); + } + } + return constants; + } + + public IntegerConstant createConstant(Sketch sketch, int expression) { + for (Iterator iterator = sketch.eAllContents(); iterator + .hasNext();) { + EObject object = iterator.next(); + if (object instanceof IntegerConstant) { + if (((IntegerConstant) object).getValue() == expression) { + return (IntegerConstant) object; + } + } + } + + IntegerConstant constant = ArduinoFactory.eINSTANCE.createIntegerConstant(); + constant.setValue(expression); + return constant; + } + + public void removeWire(Board board, Module module) { + if (board instanceof ArduinoBoard) { + boolean found = false; + ArduinoBoard arduinoBoard = (ArduinoBoard) board; + for (AnalogPin pin : arduinoBoard.getAnalogPins()) { + if (pin.getModule() == module) { + pin.setModule(null); + found = true; + break; + } + } + if (!found) { + for (DigitalPin pin : arduinoBoard.getDigitalPins()) { + pin.setModule(null); + break; + } + } + } + } + + public void removeWire(Board board) { + if (board instanceof ArduinoBoard) { + ArduinoBoard arduinoBoard = (ArduinoBoard) board; + for (AnalogPin pin : arduinoBoard.getAnalogPins()) { + pin.setModule(null); + } + for (DigitalPin pin : arduinoBoard.getDigitalPins()) { + pin.setModule(null); + } + } + } + + public boolean isValidSketch(Project project) { + Sketch sketch = project.getSketch(); + if (sketch == null) { + return false; + } + fr.obeo.dsl.arduino.utils.ArduinoServices service = new fr.obeo.dsl.arduino.utils.ArduinoServices(); + return service.isValidSketch(sketch); + } + + public boolean isValidConnector(Module module, Pin pin) { + boolean result = false; + if (pin instanceof AnalogPin) { + result = module instanceof ArduinoAnalogModule; + } else if (pin instanceof DigitalPin){ + result = module instanceof ArduinoDigitalModule; + } + return result; + } + + public boolean isValidHardware(Project project) { + return project.getBoards() != null; + } + + public boolean isUploadable(Project project) { + return isValidHardware(project) && isValidSketch(project); + } + + public String getImage(ModuleInstruction instruction) { + return "/fr.obeo.dsl.arduino.design/images/default.svg"; +// return "/fr.obeo.dsl.arduino.design/images/" +// + instruction.getModule().getImage(); + } + + public String getImage(ModuleGet instruction) { + return "/fr.obeo.dsl.arduino.design/images/default.svg"; +// return "/fr.obeo.dsl.arduino.design/images/" +// + instruction.getModule().getImage(); + } + + public void addVariable(Instruction container, Variable variable) { + if (container instanceof BinaryExpression) { + addMathOperatorExpression((BinaryExpression) container, variable); + } else if (container instanceof VariableAssignment) { + ((VariableAssignment) container).setVariable(variable); + } + deleteUnusedExpressions(getSketch(variable)); + } + + public void addExpression(Instruction container, Constant Expression) { + if (container instanceof BinaryExpression) { + addMathOperatorExpression((BinaryExpression) container, Expression); + } else if (container instanceof VariableAssignment) { + ((VariableAssignment) container).setOperand(Expression); + } + deleteUnusedExpressions(getSketch(Expression)); + } + + private void addMathOperatorExpression(BinaryExpression container, Expression Expression) { + Expression left = container.getLeft(); + Expression right = container.getRight(); + + if (left == null && right == null) { + container.setLeft(Expression); + } else if (left != null && right == null) { + container.setRight(Expression); + } else if (left == null && right != null) { + container.setLeft(Expression); + } else if (left != null && right != null) { + container.setLeft(Expression); + } + deleteUnusedExpressions(getSketch(Expression)); + } + + public void updateExpression(Instruction container, Expression newExpression, + Expression oldExpression) { + if (container instanceof VariableAssignment) { + if (newExpression instanceof Variable) { + ((VariableAssignment) container).setVariable((Variable) newExpression); + } else { + ((VariableAssignment) container).setOperand(newExpression); + } + } else if (container instanceof BinaryExpression) { + Expression left = ((BinaryExpression) container).getLeft(); + Expression right = ((BinaryExpression) container).getRight(); + if (oldExpression.equals(left)) { + ((BinaryExpression) container).setLeft(newExpression); + } else if (oldExpression.equals(right)) { + ((BinaryExpression) container).setRight(newExpression); + } + + } + deleteUnusedExpressions(getSketch(container)); + } + + public void openHardwareDiagram(Board hardware) { + Session session = SessionManager.INSTANCE.getSession(hardware); + DRepresentation hardwareDiagram = getBoardDiagram(hardware); + DialectUIManager.INSTANCE.openEditor(session, hardwareDiagram, + new NullProgressMonitor()); + } + + public void openSketchDiagram(Sketch sketch) { + Session session = SessionManager.INSTANCE.getSession(sketch); + DRepresentation sketchDiagram = getSketchDiagram(sketch); + DialectUIManager.INSTANCE.openEditor(session, sketchDiagram, + new NullProgressMonitor()); + } + + private RepresentationDescription getDiagramDescription(Session session, + String diagramDescriptionName) { + for (Viewpoint vp : session.getSelectedViewpoints(false)) { + for (RepresentationDescription representationDescription : vp + .getOwnedRepresentations()) { + if (representationDescription.getName().equals( + diagramDescriptionName)) { + return representationDescription; + } + } + } + return null; + } + + private DRepresentation getBoardDiagram(Board board) { + return getDiagram(board, "Hardware", "Hardware"); + } + + private DRepresentation getSketchDiagram(Sketch sketch) { + return getDiagram(sketch, "Sketch", "Sketch"); + } + + private DRepresentation getDiagram(EObject semantic, String diagramName, String diagramDescriptionName) { + fr.obeo.dsl.arduino.utils.ArduinoServices service = new fr.obeo.dsl.arduino.utils.ArduinoServices(); + Session session = SessionManager.INSTANCE.getSession(semantic); + DRepresentation diagram = service.getDiagram(session, diagramName); + // Create representation if does not exist + if (diagram == null) { + diagram = (DDiagram) DialectManager.INSTANCE.createRepresentation( + diagramName, semantic, + getDiagramDescription(session, diagramDescriptionName), + session, new NullProgressMonitor()); + } + + return diagram; + } + + private List getAllInstructions(Sketch sketch){ + List instructions = new ArrayList(); + for(fr.obeo.dsl.arduino.Thread thread : sketch.getThreads()){ + instructions.addAll(getAllInstructions(thread)); + } + return instructions; + } + + private List getAllInstructions(fr.obeo.dsl.arduino.Thread thread){ + return thread.getBlock().getInstructions(); + } + + public List getAllInstructions(fr.obeo.dsl.arduino.Block block){ + List instructions = new ArrayList(); + for(Instruction insts : block.getInstructions()){ + instructions.add(insts); + if(insts instanceof Control){ + Control control = (Control)insts; + instructions.addAll(getAllInstructions(control.getBlock())); + } + } + return instructions; + } +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/.classpath b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/.classpath new file mode 100644 index 00000000..858bac42 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/.project b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/.project new file mode 100644 index 00000000..81ef93d8 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/.project @@ -0,0 +1,28 @@ + + + fr.obeo.dsl.arduino.edit + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/META-INF/MANIFEST.MF b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/META-INF/MANIFEST.MF new file mode 100644 index 00000000..3511db89 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/META-INF/MANIFEST.MF @@ -0,0 +1,15 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: fr.obeo.dsl.arduino.edit;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-ClassPath: . +Bundle-Activator: fr.obeo.dsl.arduino.provider.ArduinoEditPlugin$Implementation +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Export-Package: fr.obeo.dsl.arduino.provider +Require-Bundle: org.eclipse.core.runtime, + fr.obeo.dsl.arduino;visibility:=reexport, + org.eclipse.emf.edit;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/build.properties b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/build.properties new file mode 100644 index 00000000..972dc84a --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/build.properties @@ -0,0 +1,17 @@ +# Copyright (c) 2013 Obeo. +# 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: +# Obeo - initial API and implementation + +bin.includes = .,\ + icons/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src-gen/ +output.. = bin/ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAnalogPin_module_AmbientLightSensor.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAnalogPin_module_AmbientLightSensor.gif new file mode 100644 index 00000000..8ab34c64 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAnalogPin_module_AmbientLightSensor.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAnalogPin_module_MusicPlayer.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAnalogPin_module_MusicPlayer.gif new file mode 100644 index 00000000..dbd19ede Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAnalogPin_module_MusicPlayer.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAnalogPin_module_RotationSensor.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAnalogPin_module_RotationSensor.gif new file mode 100644 index 00000000..28d7cba3 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAnalogPin_module_RotationSensor.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAnalogPin_module_SoundSensor.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAnalogPin_module_SoundSensor.gif new file mode 100644 index 00000000..bc1868f4 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAnalogPin_module_SoundSensor.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateArduinoBoard_analogPins_AnalogPin.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateArduinoBoard_analogPins_AnalogPin.gif new file mode 100644 index 00000000..1b2d814f Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateArduinoBoard_analogPins_AnalogPin.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateArduinoBoard_digitalPins_DigitalPin.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateArduinoBoard_digitalPins_DigitalPin.gif new file mode 100644 index 00000000..f61f1983 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateArduinoBoard_digitalPins_DigitalPin.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_BinaryBooleanExpression.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_BinaryBooleanExpression.gif new file mode 100644 index 00000000..be505f92 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_BinaryBooleanExpression.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_BinaryIntegerExpression.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_BinaryIntegerExpression.gif new file mode 100644 index 00000000..a90e8244 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_BinaryIntegerExpression.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_BooleanConstant.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_BooleanConstant.gif new file mode 100644 index 00000000..4ffa17e7 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_BooleanConstant.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_BooleanModuleGet.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_BooleanModuleGet.gif new file mode 100644 index 00000000..929686b8 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_BooleanModuleGet.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_BooleanVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_BooleanVariable.gif new file mode 100644 index 00000000..f7c61c23 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_BooleanVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_IntegerConstant.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_IntegerConstant.gif new file mode 100644 index 00000000..89badf28 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_IntegerConstant.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_IntegerModuleGet.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_IntegerModuleGet.gif new file mode 100644 index 00000000..62e1e1ae Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_IntegerModuleGet.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_IntegerSharedResource.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_IntegerSharedResource.gif new file mode 100644 index 00000000..ab7abfd6 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_IntegerSharedResource.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_IntegerSharedVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_IntegerSharedVariable.gif new file mode 100644 index 00000000..34ee4512 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_IntegerSharedVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_IntegerVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_IntegerVariable.gif new file mode 100644 index 00000000..a92469c4 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_IntegerVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_SharedResource.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_SharedResource.gif new file mode 100644 index 00000000..f545273d Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_SharedResource.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_SharedVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_SharedVariable.gif new file mode 100644 index 00000000..f4268885 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_SharedVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_SharedVariableAccess.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_SharedVariableAccess.gif new file mode 100644 index 00000000..5a0697e6 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_SharedVariableAccess.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_UnaryBooleanExpression.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_UnaryBooleanExpression.gif new file mode 100644 index 00000000..013290db Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_UnaryBooleanExpression.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_UnaryIntegerExpression.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_UnaryIntegerExpression.gif new file mode 100644 index 00000000..7effa790 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_UnaryIntegerExpression.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_VariableRef.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_VariableRef.gif new file mode 100644 index 00000000..a92469c4 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateAssignment_operand_VariableRef.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_BinaryBooleanExpression.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_BinaryBooleanExpression.gif new file mode 100644 index 00000000..3494d531 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_BinaryBooleanExpression.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_BinaryIntegerExpression.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_BinaryIntegerExpression.gif new file mode 100644 index 00000000..de6af47e Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_BinaryIntegerExpression.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_BooleanConstant.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_BooleanConstant.gif new file mode 100644 index 00000000..3841fcea Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_BooleanConstant.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_BooleanModuleGet.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_BooleanModuleGet.gif new file mode 100644 index 00000000..671a6f16 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_BooleanModuleGet.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_BooleanVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_BooleanVariable.gif new file mode 100644 index 00000000..13d1a04b Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_BooleanVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_IntegerConstant.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_IntegerConstant.gif new file mode 100644 index 00000000..b7274792 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_IntegerConstant.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_IntegerModuleGet.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_IntegerModuleGet.gif new file mode 100644 index 00000000..88ba66a5 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_IntegerModuleGet.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_IntegerSharedResource.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_IntegerSharedResource.gif new file mode 100644 index 00000000..01d1dbbb Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_IntegerSharedResource.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_IntegerSharedVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_IntegerSharedVariable.gif new file mode 100644 index 00000000..3145841c Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_IntegerSharedVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_IntegerVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_IntegerVariable.gif new file mode 100644 index 00000000..d68f55cf Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_IntegerVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_SharedResource.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_SharedResource.gif new file mode 100644 index 00000000..99f2fe57 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_SharedResource.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_SharedVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_SharedVariable.gif new file mode 100644 index 00000000..be1e90e8 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_SharedVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_SharedVariableAccess.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_SharedVariableAccess.gif new file mode 100644 index 00000000..a89d0ec2 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_SharedVariableAccess.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_UnaryBooleanExpression.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_UnaryBooleanExpression.gif new file mode 100644 index 00000000..535a30ab Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_UnaryBooleanExpression.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_UnaryIntegerExpression.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_UnaryIntegerExpression.gif new file mode 100644 index 00000000..99a4283b Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_UnaryIntegerExpression.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_VariableRef.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_VariableRef.gif new file mode 100644 index 00000000..d68f55cf Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_left_VariableRef.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_BinaryBooleanExpression.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_BinaryBooleanExpression.gif new file mode 100644 index 00000000..3494d531 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_BinaryBooleanExpression.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_BinaryIntegerExpression.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_BinaryIntegerExpression.gif new file mode 100644 index 00000000..de6af47e Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_BinaryIntegerExpression.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_BooleanConstant.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_BooleanConstant.gif new file mode 100644 index 00000000..3841fcea Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_BooleanConstant.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_BooleanModuleGet.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_BooleanModuleGet.gif new file mode 100644 index 00000000..671a6f16 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_BooleanModuleGet.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_BooleanVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_BooleanVariable.gif new file mode 100644 index 00000000..13d1a04b Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_BooleanVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_IntegerConstant.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_IntegerConstant.gif new file mode 100644 index 00000000..b7274792 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_IntegerConstant.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_IntegerModuleGet.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_IntegerModuleGet.gif new file mode 100644 index 00000000..88ba66a5 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_IntegerModuleGet.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_IntegerSharedResource.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_IntegerSharedResource.gif new file mode 100644 index 00000000..01d1dbbb Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_IntegerSharedResource.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_IntegerSharedVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_IntegerSharedVariable.gif new file mode 100644 index 00000000..3145841c Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_IntegerSharedVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_IntegerVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_IntegerVariable.gif new file mode 100644 index 00000000..d68f55cf Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_IntegerVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_SharedResource.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_SharedResource.gif new file mode 100644 index 00000000..99f2fe57 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_SharedResource.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_SharedVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_SharedVariable.gif new file mode 100644 index 00000000..be1e90e8 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_SharedVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_SharedVariableAccess.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_SharedVariableAccess.gif new file mode 100644 index 00000000..a89d0ec2 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_SharedVariableAccess.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_UnaryBooleanExpression.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_UnaryBooleanExpression.gif new file mode 100644 index 00000000..535a30ab Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_UnaryBooleanExpression.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_UnaryIntegerExpression.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_UnaryIntegerExpression.gif new file mode 100644 index 00000000..99a4283b Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_UnaryIntegerExpression.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_VariableRef.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_VariableRef.gif new file mode 100644 index 00000000..d68f55cf Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBinaryExpression_right_VariableRef.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_abstractInstructionBlocks_AbstractInstructionBlock.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_abstractInstructionBlocks_AbstractInstructionBlock.gif new file mode 100644 index 00000000..671932c7 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_abstractInstructionBlocks_AbstractInstructionBlock.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_abstractInstructionBlocks_InstructionBlock.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_abstractInstructionBlocks_InstructionBlock.gif new file mode 100644 index 00000000..d056aafc Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_abstractInstructionBlocks_InstructionBlock.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_abstractInstructionBlocks_SynchronizationBlock.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_abstractInstructionBlocks_SynchronizationBlock.gif new file mode 100644 index 00000000..c6a162d4 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_abstractInstructionBlocks_SynchronizationBlock.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructionBlocks_InstructionBlock.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructionBlocks_InstructionBlock.gif new file mode 100644 index 00000000..d056aafc Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructionBlocks_InstructionBlock.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_Block.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_Block.gif new file mode 100644 index 00000000..799d63b4 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_Block.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_Delay.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_Delay.gif new file mode 100644 index 00000000..7926c341 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_Delay.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_If.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_If.gif new file mode 100644 index 00000000..c73000c7 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_If.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_ModuleAssignment.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_ModuleAssignment.gif new file mode 100644 index 00000000..903b6817 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_ModuleAssignment.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_Repeat.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_Repeat.gif new file mode 100644 index 00000000..fc17ce1f Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_Repeat.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_Sketch.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_Sketch.gif new file mode 100644 index 00000000..22e102ff Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_Sketch.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_Synchonization.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_Synchonization.gif new file mode 100644 index 00000000..85753e9f Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_Synchonization.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_Synchronization.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_Synchronization.gif new file mode 100644 index 00000000..e853fb39 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_Synchronization.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_VariableAssignment.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_VariableAssignment.gif new file mode 100644 index 00000000..e30d6c52 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_VariableAssignment.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_VariableDeclaration.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_VariableDeclaration.gif new file mode 100644 index 00000000..0915e408 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_VariableDeclaration.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_While.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_While.gif new file mode 100644 index 00000000..e853fb39 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_instructions_While.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_synchronizations_Synchronization.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_synchronizations_Synchronization.gif new file mode 100644 index 00000000..e853fb39 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateBlock_synchronizations_Synchronization.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_block_Block.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_block_Block.gif new file mode 100644 index 00000000..3e644949 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_block_Block.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_block_InstructionBlock.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_block_InstructionBlock.gif new file mode 100644 index 00000000..0f9364ba Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_block_InstructionBlock.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_block_Sketch.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_block_Sketch.gif new file mode 100644 index 00000000..7c9ec36d Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_block_Sketch.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_block_Thread.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_block_Thread.gif new file mode 100644 index 00000000..ce9d337b Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_block_Thread.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_instructions_Delay.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_instructions_Delay.gif new file mode 100644 index 00000000..794791ad Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_instructions_Delay.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_instructions_If.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_instructions_If.gif new file mode 100644 index 00000000..4833facb Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_instructions_If.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_instructions_ModuleAssignment.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_instructions_ModuleAssignment.gif new file mode 100644 index 00000000..ebd55acf Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_instructions_ModuleAssignment.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_instructions_Repeat.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_instructions_Repeat.gif new file mode 100644 index 00000000..82fdfc3e Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_instructions_Repeat.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_instructions_Sketch.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_instructions_Sketch.gif new file mode 100644 index 00000000..7c9ec36d Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_instructions_Sketch.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_instructions_VariableAssignment.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_instructions_VariableAssignment.gif new file mode 100644 index 00000000..49d98d93 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_instructions_VariableAssignment.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_instructions_VariableDeclaration.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_instructions_VariableDeclaration.gif new file mode 100644 index 00000000..07f63f9f Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_instructions_VariableDeclaration.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_instructions_While.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_instructions_While.gif new file mode 100644 index 00000000..94fcc9b7 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateControl_instructions_While.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateDigitalPin_module_Buzzer.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateDigitalPin_module_Buzzer.gif new file mode 100644 index 00000000..53a716ee Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateDigitalPin_module_Buzzer.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateDigitalPin_module_Fan.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateDigitalPin_module_Fan.gif new file mode 100644 index 00000000..5c173f12 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateDigitalPin_module_Fan.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateDigitalPin_module_InfraRedSensor.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateDigitalPin_module_InfraRedSensor.gif new file mode 100644 index 00000000..7e487021 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateDigitalPin_module_InfraRedSensor.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateDigitalPin_module_LED.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateDigitalPin_module_LED.gif new file mode 100644 index 00000000..c565965f Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateDigitalPin_module_LED.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateDigitalPin_module_MicroServo.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateDigitalPin_module_MicroServo.gif new file mode 100644 index 00000000..bb83437f Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateDigitalPin_module_MicroServo.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateDigitalPin_module_PushButton.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateDigitalPin_module_PushButton.gif new file mode 100644 index 00000000..20c81ccc Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateDigitalPin_module_PushButton.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateHardware_connectors_Connector.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateHardware_connectors_Connector.gif new file mode 100644 index 00000000..0cf5f67d Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateHardware_connectors_Connector.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateIf_elseBlock_Block.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateIf_elseBlock_Block.gif new file mode 100644 index 00000000..27dbe988 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateIf_elseBlock_Block.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateIf_elseBlock_InstructionBlock.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateIf_elseBlock_InstructionBlock.gif new file mode 100644 index 00000000..5a66bf41 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateIf_elseBlock_InstructionBlock.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateInstructionBlock_instructions_Delay.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateInstructionBlock_instructions_Delay.gif new file mode 100644 index 00000000..98a66f13 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateInstructionBlock_instructions_Delay.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateInstructionBlock_instructions_If.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateInstructionBlock_instructions_If.gif new file mode 100644 index 00000000..7e487021 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateInstructionBlock_instructions_If.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateInstructionBlock_instructions_ModuleAssignment.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateInstructionBlock_instructions_ModuleAssignment.gif new file mode 100644 index 00000000..a29500a4 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateInstructionBlock_instructions_ModuleAssignment.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateInstructionBlock_instructions_Repeat.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateInstructionBlock_instructions_Repeat.gif new file mode 100644 index 00000000..ea45c99e Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateInstructionBlock_instructions_Repeat.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateInstructionBlock_instructions_VariableAssignment.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateInstructionBlock_instructions_VariableAssignment.gif new file mode 100644 index 00000000..5c173f12 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateInstructionBlock_instructions_VariableAssignment.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateInstructionBlock_instructions_VariableDeclaration.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateInstructionBlock_instructions_VariableDeclaration.gif new file mode 100644 index 00000000..b03b80a7 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateInstructionBlock_instructions_VariableDeclaration.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateInstructionBlock_instructions_While.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateInstructionBlock_instructions_While.gif new file mode 100644 index 00000000..1010ed82 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateInstructionBlock_instructions_While.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreatePlatform_analogPins_AnalogPin.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreatePlatform_analogPins_AnalogPin.gif new file mode 100644 index 00000000..36e9ea84 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreatePlatform_analogPins_AnalogPin.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreatePlatform_digitalPins_DigitalPin.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreatePlatform_digitalPins_DigitalPin.gif new file mode 100644 index 00000000..fb5bcb5c Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreatePlatform_digitalPins_DigitalPin.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_board_ArduinoBoard.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_board_ArduinoBoard.gif new file mode 100644 index 00000000..b822374d Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_board_ArduinoBoard.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_boards_ArduinoBoard.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_boards_ArduinoBoard.gif new file mode 100644 index 00000000..b822374d Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_boards_ArduinoBoard.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_hardware_Hardware.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_hardware_Hardware.gif new file mode 100644 index 00000000..4b44067c Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_hardware_Hardware.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_links_Link.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_links_Link.gif new file mode 100644 index 00000000..1061b8f4 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_links_Link.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_Actuator.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_Actuator.gif new file mode 100644 index 00000000..41eefa22 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_Actuator.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_AmbientLightSensor.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_AmbientLightSensor.gif new file mode 100644 index 00000000..a39b7961 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_AmbientLightSensor.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_Buzzer.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_Buzzer.gif new file mode 100644 index 00000000..13449f59 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_Buzzer.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_Fan.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_Fan.gif new file mode 100644 index 00000000..7d4073e3 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_Fan.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_InfraRedSensor.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_InfraRedSensor.gif new file mode 100644 index 00000000..6fa04d1a Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_InfraRedSensor.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_LED.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_LED.gif new file mode 100644 index 00000000..a2c85842 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_LED.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_MicroServo.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_MicroServo.gif new file mode 100644 index 00000000..80dd10a5 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_MicroServo.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_MusicPlayer.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_MusicPlayer.gif new file mode 100644 index 00000000..6fa04d1a Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_MusicPlayer.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_PushButton.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_PushButton.gif new file mode 100644 index 00000000..3fa9c54b Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_PushButton.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_RotationSensor.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_RotationSensor.gif new file mode 100644 index 00000000..72306dc1 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_RotationSensor.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_Sensor.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_Sensor.gif new file mode 100644 index 00000000..cbd1b19c Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_Sensor.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_SoundSensor.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_SoundSensor.gif new file mode 100644 index 00000000..0e34563c Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_modules_SoundSensor.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_platform_Platform.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_platform_Platform.gif new file mode 100644 index 00000000..90f4828f Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_platform_Platform.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_sketch_Sketch.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_sketch_Sketch.gif new file mode 100644 index 00000000..3548c7d0 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateProject_sketch_Sketch.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSharedResource_variable_BooleanVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSharedResource_variable_BooleanVariable.gif new file mode 100644 index 00000000..b33e855f Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSharedResource_variable_BooleanVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSharedResource_variable_IntegerVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSharedResource_variable_IntegerVariable.gif new file mode 100644 index 00000000..bdfb88b8 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSharedResource_variable_IntegerVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_block_Block.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_block_Block.gif new file mode 100644 index 00000000..d4308a5e Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_block_Block.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_block_Thread.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_block_Thread.gif new file mode 100644 index 00000000..e75685c1 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_block_Thread.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_channel_Channel.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_channel_Channel.gif new file mode 100644 index 00000000..8ab34c64 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_channel_Channel.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_channels_Channel.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_channels_Channel.gif new file mode 100644 index 00000000..8ab34c64 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_channels_Channel.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_instructions_Delay.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_instructions_Delay.gif new file mode 100644 index 00000000..49fd29fa Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_instructions_Delay.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_instructions_If.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_instructions_If.gif new file mode 100644 index 00000000..dbd19ede Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_instructions_If.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_instructions_ModuleAssignment.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_instructions_ModuleAssignment.gif new file mode 100644 index 00000000..f576b4f9 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_instructions_ModuleAssignment.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_instructions_Repeat.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_instructions_Repeat.gif new file mode 100644 index 00000000..f018488d Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_instructions_Repeat.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_instructions_Sketch.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_instructions_Sketch.gif new file mode 100644 index 00000000..cb3d509b Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_instructions_Sketch.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_instructions_VariableAssignment.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_instructions_VariableAssignment.gif new file mode 100644 index 00000000..f52d6a90 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_instructions_VariableAssignment.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_instructions_VariableDeclaration.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_instructions_VariableDeclaration.gif new file mode 100644 index 00000000..d39e9f13 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_instructions_VariableDeclaration.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_instructions_While.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_instructions_While.gif new file mode 100644 index 00000000..4e47629d Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_instructions_While.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_sharedResources_IntegerSharedResource.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_sharedResources_IntegerSharedResource.gif new file mode 100644 index 00000000..f418bb97 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_sharedResources_IntegerSharedResource.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_sharedResources_IntegerSharedVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_sharedResources_IntegerSharedVariable.gif new file mode 100644 index 00000000..2397f66e Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_sharedResources_IntegerSharedVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_sharedResources_SharedResource.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_sharedResources_SharedResource.gif new file mode 100644 index 00000000..bcaa16d3 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_sharedResources_SharedResource.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_sharedResources_SharedVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_sharedResources_SharedVariable.gif new file mode 100644 index 00000000..e75685c1 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_sharedResources_SharedVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_threadConnectors_ThreadConnector.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_threadConnectors_ThreadConnector.gif new file mode 100644 index 00000000..43bee183 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_threadConnectors_ThreadConnector.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_threads_Thread.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_threads_Thread.gif new file mode 100644 index 00000000..e75685c1 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateSketch_threads_Thread.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateThread_accessors_SharedVariableAccess.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateThread_accessors_SharedVariableAccess.gif new file mode 100644 index 00000000..95a52452 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateThread_accessors_SharedVariableAccess.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateThread_block_Block.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateThread_block_Block.gif new file mode 100644 index 00000000..889f3af9 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateThread_block_Block.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateThread_block_InstructionBlock.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateThread_block_InstructionBlock.gif new file mode 100644 index 00000000..0f107c5f Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateThread_block_InstructionBlock.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateThread_block_SynchronizationBlock.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateThread_block_SynchronizationBlock.gif new file mode 100644 index 00000000..fac7c9b1 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateThread_block_SynchronizationBlock.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateThread_blocks_Block.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateThread_blocks_Block.gif new file mode 100644 index 00000000..889f3af9 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateThread_blocks_Block.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateThread_blocks_InstructionBlock.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateThread_blocks_InstructionBlock.gif new file mode 100644 index 00000000..0f107c5f Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateThread_blocks_InstructionBlock.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateThread_blocks_SynchronizationBlock.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateThread_blocks_SynchronizationBlock.gif new file mode 100644 index 00000000..fac7c9b1 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateThread_blocks_SynchronizationBlock.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_BinaryBooleanExpression.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_BinaryBooleanExpression.gif new file mode 100644 index 00000000..46c68606 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_BinaryBooleanExpression.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_BinaryIntegerExpression.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_BinaryIntegerExpression.gif new file mode 100644 index 00000000..258ed0ec Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_BinaryIntegerExpression.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_BooleanConstant.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_BooleanConstant.gif new file mode 100644 index 00000000..961acc56 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_BooleanConstant.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_BooleanModuleGet.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_BooleanModuleGet.gif new file mode 100644 index 00000000..b913037f Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_BooleanModuleGet.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_BooleanVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_BooleanVariable.gif new file mode 100644 index 00000000..80c6c9e5 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_BooleanVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_IntegerConstant.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_IntegerConstant.gif new file mode 100644 index 00000000..3a9f24e0 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_IntegerConstant.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_IntegerModuleGet.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_IntegerModuleGet.gif new file mode 100644 index 00000000..5e689e64 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_IntegerModuleGet.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_IntegerSharedResource.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_IntegerSharedResource.gif new file mode 100644 index 00000000..9cae865e Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_IntegerSharedResource.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_IntegerSharedVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_IntegerSharedVariable.gif new file mode 100644 index 00000000..f4c411ab Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_IntegerSharedVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_IntegerVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_IntegerVariable.gif new file mode 100644 index 00000000..b325c758 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_IntegerVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_SharedResource.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_SharedResource.gif new file mode 100644 index 00000000..cc494d4c Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_SharedResource.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_SharedVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_SharedVariable.gif new file mode 100644 index 00000000..b7e2f30c Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_SharedVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_SharedVariableAccess.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_SharedVariableAccess.gif new file mode 100644 index 00000000..81084b9c Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_SharedVariableAccess.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_UnaryBooleanExpression.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_UnaryBooleanExpression.gif new file mode 100644 index 00000000..da2473bc Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_UnaryBooleanExpression.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_UnaryIntegerExpression.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_UnaryIntegerExpression.gif new file mode 100644 index 00000000..bccc6769 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_UnaryIntegerExpression.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_VariableRef.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_VariableRef.gif new file mode 100644 index 00000000..b325c758 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateUnaryExpression_operand_VariableRef.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateVariableDeclaration_variable_BooleanVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateVariableDeclaration_variable_BooleanVariable.gif new file mode 100644 index 00000000..9c4e0af1 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateVariableDeclaration_variable_BooleanVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateVariableDeclaration_variable_IntegerSharedVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateVariableDeclaration_variable_IntegerSharedVariable.gif new file mode 100644 index 00000000..f5be1558 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateVariableDeclaration_variable_IntegerSharedVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateVariableDeclaration_variable_IntegerVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateVariableDeclaration_variable_IntegerVariable.gif new file mode 100644 index 00000000..205071f2 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateVariableDeclaration_variable_IntegerVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateVariableDeclaration_variable_SharedResource.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateVariableDeclaration_variable_SharedResource.gif new file mode 100644 index 00000000..2dde1a2a Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateVariableDeclaration_variable_SharedResource.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateVariableDeclaration_variable_SharedVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateVariableDeclaration_variable_SharedVariable.gif new file mode 100644 index 00000000..78987b08 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateVariableDeclaration_variable_SharedVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateVariableDeclaration_variable_SharedVariableAccess.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateVariableDeclaration_variable_SharedVariableAccess.gif new file mode 100644 index 00000000..7f00aa63 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/ctool16/CreateVariableDeclaration_variable_SharedVariableAccess.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/AbstractInstructionBlock.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/AbstractInstructionBlock.gif new file mode 100644 index 00000000..59155918 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/AbstractInstructionBlock.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Actuator.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Actuator.gif new file mode 100644 index 00000000..be22463d Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Actuator.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/AmbientLightSensor.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/AmbientLightSensor.gif new file mode 100644 index 00000000..b1f8afa4 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/AmbientLightSensor.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/AnalogPin.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/AnalogPin.gif new file mode 100644 index 00000000..90415988 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/AnalogPin.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/ArduinoBoard.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/ArduinoBoard.gif new file mode 100644 index 00000000..c00aedf4 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/ArduinoBoard.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/BinaryBooleanExpression.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/BinaryBooleanExpression.gif new file mode 100644 index 00000000..106881e5 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/BinaryBooleanExpression.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/BinaryIntegerExpression.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/BinaryIntegerExpression.gif new file mode 100644 index 00000000..e4bc22dd Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/BinaryIntegerExpression.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Block.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Block.gif new file mode 100644 index 00000000..89ad5da3 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Block.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/BooleanConstant.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/BooleanConstant.gif new file mode 100644 index 00000000..badaab06 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/BooleanConstant.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/BooleanExpression.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/BooleanExpression.gif new file mode 100644 index 00000000..ea58a657 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/BooleanExpression.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/BooleanModuleGet.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/BooleanModuleGet.gif new file mode 100644 index 00000000..53500daf Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/BooleanModuleGet.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/BooleanVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/BooleanVariable.gif new file mode 100644 index 00000000..4365960a Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/BooleanVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Buzzer.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Buzzer.gif new file mode 100644 index 00000000..c3370c7d Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Buzzer.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Channel.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Channel.gif new file mode 100644 index 00000000..720aa96e Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Channel.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Connector.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Connector.gif new file mode 100644 index 00000000..ed874747 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Connector.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Constant.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Constant.gif new file mode 100644 index 00000000..a26660ec Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Constant.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Delay.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Delay.gif new file mode 100644 index 00000000..be22463d Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Delay.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/DigitalPin.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/DigitalPin.gif new file mode 100644 index 00000000..106881e5 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/DigitalPin.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Fan.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Fan.gif new file mode 100644 index 00000000..30f0c48d Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Fan.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Hardware.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Hardware.gif new file mode 100644 index 00000000..db7414e9 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Hardware.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/If.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/If.gif new file mode 100644 index 00000000..7b7c428c Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/If.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/InfraRedSensor.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/InfraRedSensor.gif new file mode 100644 index 00000000..7b7c428c Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/InfraRedSensor.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/InstructionBlock.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/InstructionBlock.gif new file mode 100644 index 00000000..9538e2e3 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/InstructionBlock.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/IntegerConstant.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/IntegerConstant.gif new file mode 100644 index 00000000..48e3cf22 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/IntegerConstant.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/IntegerModuleGet.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/IntegerModuleGet.gif new file mode 100644 index 00000000..afb82ea4 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/IntegerModuleGet.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/IntegerSharedResource.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/IntegerSharedResource.gif new file mode 100644 index 00000000..59155918 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/IntegerSharedResource.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/IntegerSharedVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/IntegerSharedVariable.gif new file mode 100644 index 00000000..cb1755a7 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/IntegerSharedVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/IntegerVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/IntegerVariable.gif new file mode 100644 index 00000000..c673a520 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/IntegerVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/LED.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/LED.gif new file mode 100644 index 00000000..c414fe9f Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/LED.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Link.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Link.gif new file mode 100644 index 00000000..89ad5da3 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Link.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/MicroServo.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/MicroServo.gif new file mode 100644 index 00000000..c4a8af41 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/MicroServo.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/ModuleAssignment.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/ModuleAssignment.gif new file mode 100644 index 00000000..c4fb30e9 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/ModuleAssignment.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/ModuleGet.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/ModuleGet.gif new file mode 100644 index 00000000..b3643da0 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/ModuleGet.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/MusicPlayer.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/MusicPlayer.gif new file mode 100644 index 00000000..7b7c428c Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/MusicPlayer.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Platform.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Platform.gif new file mode 100644 index 00000000..33a997a1 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Platform.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Project.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Project.gif new file mode 100644 index 00000000..7bac4fd3 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Project.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/PushButton.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/PushButton.gif new file mode 100644 index 00000000..9250fecb Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/PushButton.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Repeat.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Repeat.gif new file mode 100644 index 00000000..134551bf Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Repeat.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/RotationSensor.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/RotationSensor.gif new file mode 100644 index 00000000..05dc74ad Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/RotationSensor.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Sensor.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Sensor.gif new file mode 100644 index 00000000..7bac4fd3 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Sensor.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/SharedResource.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/SharedResource.gif new file mode 100644 index 00000000..7bac4fd3 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/SharedResource.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/SharedVariable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/SharedVariable.gif new file mode 100644 index 00000000..c4a8af41 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/SharedVariable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/SharedVariableAccess.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/SharedVariableAccess.gif new file mode 100644 index 00000000..33854e98 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/SharedVariableAccess.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Sketch.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Sketch.gif new file mode 100644 index 00000000..90415988 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Sketch.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/SoundSensor.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/SoundSensor.gif new file mode 100644 index 00000000..afb82ea4 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/SoundSensor.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Synchonization.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Synchonization.gif new file mode 100644 index 00000000..8a5c70cb Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Synchonization.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Synchronization.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Synchronization.gif new file mode 100644 index 00000000..35ef84e2 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Synchronization.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/SynchronizationBlock.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/SynchronizationBlock.gif new file mode 100644 index 00000000..4ab82231 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/SynchronizationBlock.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Thread.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Thread.gif new file mode 100644 index 00000000..a36b03c7 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Thread.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/ThreadConnector.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/ThreadConnector.gif new file mode 100644 index 00000000..14af8aae Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/ThreadConnector.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/UnaryBooleanExpression.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/UnaryBooleanExpression.gif new file mode 100644 index 00000000..739ebbfa Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/UnaryBooleanExpression.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/UnaryIntegerExpression.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/UnaryIntegerExpression.gif new file mode 100644 index 00000000..1e5345fb Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/UnaryIntegerExpression.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Variable.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Variable.gif new file mode 100644 index 00000000..83afb9b3 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/Variable.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/VariableAssignment.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/VariableAssignment.gif new file mode 100644 index 00000000..30f0c48d Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/VariableAssignment.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/VariableDeclaration.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/VariableDeclaration.gif new file mode 100644 index 00000000..48e3cf22 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/VariableDeclaration.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/VariableRef.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/VariableRef.gif new file mode 100644 index 00000000..c673a520 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/VariableRef.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/While.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/While.gif new file mode 100644 index 00000000..35ef84e2 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/icons/full/obj16/While.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/plugin.properties b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/plugin.properties new file mode 100644 index 00000000..f3267baa --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/plugin.properties @@ -0,0 +1,243 @@ +# Copyright (c) 2013 Obeo. +# 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: +# Obeo - initial API and implementation + +pluginName = Arduino Edit Support +providerName = www.example.org + +_UI_CreateChild_text = {0} +_UI_CreateChild_text2 = {1} {0} +_UI_CreateChild_text3 = {1} +_UI_CreateChild_tooltip = Create New {0} Under {1} Feature +_UI_CreateChild_description = Create a new child of type {0} for the {1} feature of the selected {2}. +_UI_CreateSibling_description = Create a new sibling of type {0} for the selected {2}, under the {1} feature of their parent. + +_UI_PropertyDescriptor_description = The {0} of the {1} + +_UI_Hardware_type = Hardware +_UI_Platform_type = Platform +_UI_Module_type = Module +_UI_DigitalPin_type = Digital Pin +_UI_Pin_type = Pin +_UI_AnalogPin_type = Analog Pin +_UI_Sketch_type = Sketch +_UI_Project_type = Project +_UI_Instruction_type = Instruction +_UI_ModuleAssignment_type = Module Assignment +_UI_ModuleInstruction_type = Module Instruction +_UI_Control_type = Control +_UI_Utilities_type = Utilities +_UI_Delay_type = Delay +_UI_Sensor_type = Sensor +_UI_Actuator_type = Actuator +_UI_NamedElement_type = Named Element +_UI_Connector_type = Connector +_UI_Repeat_type = Repeat +_UI_ModuleGet_type = Module Get +_UI_While_type = While +_UI_BinaryExpression_type = Binary Expression +_UI_Variable_type = Variable +_UI_VariableAssignment_type = Variable Assignment +_UI_BinaryIntegerExpression_type = Binary Integer Expression +_UI_BinaryBooleanExpression_type = Binary Boolean Expression +_UI_Expression_type = Expression +_UI_Constant_type = Constant +_UI_If_type = If +_UI_IntegerConstant_type = Integer Constant +_UI_BooleanConstant_type = Boolean Constant +_UI_BooleanExpression_type = Boolean Expression +_UI_IntegerExpression_type = Integer Expression +_UI_Assignment_type = Assignment +_UI_IntegerVariable_type = Integer Variable +_UI_BooleanVariable_type = Boolean Variable +_UI_BooleanModuleGet_type = Boolean Module Get +_UI_IntegerModuleGet_type = Integer Module Get +_UI_UnaryExpression_type = Unary Expression +_UI_UnaryBooleanExpression_type = Unary Boolean Expression +_UI_UnaryIntegerExpression_type = Unary Integer Expression +_UI_VariableDeclaration_type = Variable Declaration +_UI_VariableRef_type = Variable Ref +_UI_Unknown_type = Object + +_UI_Unknown_datatype= Value + +_UI_Hardware_platforms_feature = Platforms +_UI_Hardware_modules_feature = Modules +_UI_Hardware_connectors_feature = Connectors +_UI_Platform_digitalPins_feature = Digital Pins +_UI_Platform_analogPins_feature = Analog Pins +_UI_Platform_image_feature = Image +_UI_Module_kind_feature = Kind +_UI_Module_image_feature = Image +_UI_Module_level_feature = Level +_UI_Module_library_feature = Library +_UI_Pin_id_feature = Id +_UI_Pin_level_feature = Level +_UI_Sketch_hardware_feature = Hardware +_UI_Sketch_instructions_feature = Instructions +_UI_Project_hardware_feature = Hardware +_UI_Project_sketch_feature = Sketch +_UI_Project_modules_feature = Modules +_UI_Project_platform_feature = Platform +_UI_Instruction_previous_feature = Previous +_UI_Instruction_next_feature = Next +_UI_ModuleInstruction_module_feature = Module +_UI_Control_instructions_feature = Instructions +_UI_Delay_unit_feature = Unit +_UI_Delay_value_feature = Value +_UI_NamedElement_name_feature = Name +_UI_Connector_pin_feature = Pin +_UI_Connector_module_feature = Module +_UI_Repeat_iteration_feature = Iteration +_UI_ModuleGet_module_feature = Module +_UI_While_condition_feature = Condition +_UI_BinaryExpression_left_feature = Left +_UI_BinaryExpression_right_feature = Right +_UI_VariableAssignment_variable_feature = Variable +_UI_BinaryIntegerExpression_operator_feature = Operator +_UI_BinaryBooleanExpression_operator_feature = Operator +_UI_If_condition_feature = Condition +_UI_IntegerConstant_value_feature = Value +_UI_BooleanConstant_value_feature = Value +_UI_Assignment_operand_feature = Operand +_UI_IntegerVariable_initialValue_feature = Initial Value +_UI_IntegerVariable_value_feature = Value +_UI_BooleanVariable_initialValue_feature = Initial Value +_UI_BooleanVariable_value_feature = Value +_UI_UnaryExpression_operand_feature = Operand +_UI_UnaryBooleanExpression_operator_feature = Operator +_UI_UnaryIntegerExpression_operator_feature = Operator +_UI_VariableDeclaration_variable_feature = Variable +_UI_VariableRef_variable_feature = Variable +_UI_Unknown_feature = Unspecified + +_UI_Time_MilliSecond_literal = MilliSecond +_UI_Time_MicroSecond_literal = MicroSecond +_UI_ModuleKind_digital_literal = digital +_UI_ModuleKind_analog_literal = analog +_UI_BinaryIntegerOperatorKind_minus_literal = minus +_UI_BinaryIntegerOperatorKind_plus_literal = plus +_UI_BinaryIntegerOperatorKind_mul_literal = mul +_UI_BinaryIntegerOperatorKind_div_literal = div +_UI_BinaryIntegerOperatorKind_min_literal = min +_UI_BinaryIntegerOperatorKind_max_literal = max +_UI_BinaryIntegerOperatorKind_pourcent_literal = pourcent +_UI_Library_none_literal = none +_UI_Library_servo_literal = servo +_UI_Library_music_literal = music +_UI_BinaryBooleanOperatorKind_inf_literal = inf +_UI_BinaryBooleanOperatorKind_sup_literal = sup +_UI_BinaryBooleanOperatorKind_infOrEqual_literal = infOrEqual +_UI_BinaryBooleanOperatorKind_supOrEqual_literal = supOrEqual +_UI_BinaryBooleanOperatorKind_equal_literal = equal +_UI_BinaryBooleanOperatorKind_and_literal = and +_UI_BinaryBooleanOperatorKind_or_literal = or +_UI_BinaryBooleanOperatorKind_Different_literal = Different +_UI_UnaryIntegerOperatorKind_minus_literal = minus +_UI_UnaryIntegerOperatorKind_squareRoot_literal = squareRoot +_UI_UnaryBooleanOperatorKind_not_literal = not +_UI_LED_type = LED +_UI_PushButton_type = Push Button +_UI_Buzzer_type = Buzzer +_UI_RotationSensor_type = Rotation Sensor +_UI_MicroServo_type = Micro Servo +_UI_InfraRedSensor_type = Infra Red Sensor +_UI_AmbientLightSensor_type = Ambient Light Sensor +_UI_SoundSensor_type = Sound Sensor +_UI_Fan_type = Fan +_UI_MusicPlayer_type = Music Player +_UI_Board_type = Board +_UI_ArduinoModule_type = Module +_UI_Block_type = Block +_UI_ArduinoBoard_type = Board +_UI_ArduinoDigitalModule_type = Digital Module +_UI_ArduinoAnalogModule_type = Analog Module +_UI_DigitalPin_module_feature = Module +_UI_AnalogPin_module_feature = Module +_UI_Project_board_feature = Board +_UI_Control_block_feature = Block +_UI_Block_instructions_feature = Instructions +_UI_ArduinoBoard_digitalPins_feature = Digital Pins +_UI_ArduinoBoard_analogPins_feature = Analog Pins +_UI_Board_project_feature = Project +_UI_Sketch_project_feature = Project +_UI_Sketch_block_feature = Block +_UI_Thread_type = Thread +_UI_SharedResource_type = Shared Resource +_UI_SharedResource_isLocked_feature = Is Locked +_UI_Sketch_threads_feature = Threads +_UI_Sketch_sharedResources_feature = Shared Resources +_UI_Thread_blocks_feature = Blocks +_UI_Thread_block_feature = Block +_UI_SharedResource_variable_feature = Variable +_UI_SharedVariable_type = Shared Variable +_UI_IntegerSharedVariable_type = Integer Shared Variable +_UI_SharedVariable_isLocked_feature = Is Locked +_UI_Instruction_block_feature = Block +_UI_Block_thread_feature = Thread +_UI_IntegerSharedResource_type = Integer Shared Resource +_UI_Thread_externalResources_feature = External Resources +_UI_SharedResource_threads_feature = Threads +_UI_SharedVariable_threads_feature = Threads +_UI_SharedVariableAccess_type = Shared Variable Access +_UI_SharedVariableAccess_sharedVariable_feature = Shared Variable +_UI_Thread_accessors_feature = Accessors +_UI_ThreadConnector_type = Thread Connector +_UI_Sketch_threadConnectors_feature = Thread Connectors +_UI_Thread_threadConnectors_feature = Thread Connectors +_UI_ThreadConnector_inThread_feature = In Thread +_UI_ThreadConnector_outThread_feature = Out Thread +_UI_Channel_type = Channel +_UI_Sketch_channel_feature = Channel +_UI_Thread_channels_feature = Channels +_UI_Channel_inThread_feature = In Thread +_UI_Channel_outThread_feature = Out Thread +_UI_Channel_inRate_feature = In Rate +_UI_Channel_outRate_feature = Out Rate +_UI_Thread_cycles_feature = Cycles +_UI_Channel_capacity_feature = Capacity +_UI_Channel_currentSize_feature = Current Size +_UI_Board_threads_feature = Threads +_UI_DigitalPin_board_feature = Board +_UI_AnalogPin_board_feature = Board +_UI_ArduinoDigitalModule_pin_feature = Pin +_UI_ArduinoAnalogModule_pin_feature = Pin +_UI_Channel_source_feature = Source +_UI_Channel_target_feature = Target +_UI_Sketch_channels_feature = Channels +_UI_Project_boards_feature = Boards +_UI_Instruction_ownedBlock_feature = Owned Block +_UI_Link_type = Link +_UI_Synchonization_type = Synchonization +_UI_Project_links_feature = Links +_UI_Thread_currentInstruction_feature = Current Instruction +_UI_Link_inBoard_feature = In Board +_UI_Link_outBoard_feature = Out Board +_UI_If_elseBlock_feature = Else Block +_UI_Synchronization_type = Synchronization +_UI_InstructionBlock_type = Instruction Block +_UI_Block_instructionBlocks_feature = Instruction Blocks +_UI_Block_synchronizations_feature = Synchronizations +_UI_Synchronization_instruction_feature = Instruction +_UI_InstructionBlock_instructions_feature = Instructions +_UI_InstructionBlock_sync_feature = Sync +_UI_SynchronizationBlock_type = Synchronization Block +_UI_AbstractInstructionBlock_type = Abstract Instruction Block +_UI_Block_abstractInstructionBlocks_feature = Abstract Instruction Blocks +_UI_SynchronizationBlock_next_feature = Next +_UI_SynchronizationBlock_previous_feature = Previous +_UI_InstructionBlock_next_feature = Next +_UI_InstructionBlock_previous_feature = Previous +_UI_ThreadInstructionBlock_type = Thread Instruction Block +_UI_ThreadInstructionBlock_thread_feature = Thread +_UI_Thread_first_feature = First +_UI_Thread_last_feature = Last +_UI_ThreadInstructionBlock_next_feature = Next +_UI_Link_channels_feature = Channels +_UI_Thread_cycle_feature = Cycle +_UI_Thread_nbCycle_feature = Nb Cycle diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/plugin.xml b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/plugin.xml new file mode 100644 index 00000000..5bafca0c --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/plugin.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/AmbientLightSensorItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/AmbientLightSensorItemProvider.java new file mode 100644 index 00000000..b70265af --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/AmbientLightSensorItemProvider.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.AmbientLightSensor; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.AmbientLightSensor} object. + * + * + * @generated + */ +public class AmbientLightSensorItemProvider extends ArduinoAnalogModuleItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public AmbientLightSensorItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns AmbientLightSensor.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/AmbientLightSensor")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((AmbientLightSensor)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_AmbientLightSensor_type") : + getString("_UI_AmbientLightSensor_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/AnalogPinItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/AnalogPinItemProvider.java new file mode 100644 index 00000000..d7cf93d3 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/AnalogPinItemProvider.java @@ -0,0 +1,166 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.AnalogPin; +import fr.obeo.dsl.arduino.ArduinoFactory; +import fr.obeo.dsl.arduino.ArduinoPackage; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.AnalogPin} object. + * + * + * @generated + */ +public class AnalogPinItemProvider extends PinItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public AnalogPinItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ArduinoPackage.Literals.ANALOG_PIN__MODULE); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns AnalogPin.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/AnalogPin")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + AnalogPin analogPin = (AnalogPin)object; + return getString("_UI_AnalogPin_type") + " " + analogPin.getId(); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(AnalogPin.class)) { + case ArduinoPackage.ANALOG_PIN__MODULE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ANALOG_PIN__MODULE, + ArduinoFactory.eINSTANCE.createRotationSensor())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ANALOG_PIN__MODULE, + ArduinoFactory.eINSTANCE.createAmbientLightSensor())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ANALOG_PIN__MODULE, + ArduinoFactory.eINSTANCE.createSoundSensor())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ANALOG_PIN__MODULE, + ArduinoFactory.eINSTANCE.createMusicPlayer())); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ArduinoAnalogModuleItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ArduinoAnalogModuleItemProvider.java new file mode 100644 index 00000000..44b74537 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ArduinoAnalogModuleItemProvider.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoAnalogModule; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.ArduinoAnalogModule} object. + * + * + * @generated + */ +public class ArduinoAnalogModuleItemProvider extends ArduinoModuleItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ArduinoAnalogModuleItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ArduinoAnalogModule)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_ArduinoAnalogModule_type") : + getString("_UI_ArduinoAnalogModule_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ArduinoBoardItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ArduinoBoardItemProvider.java new file mode 100644 index 00000000..05642608 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ArduinoBoardItemProvider.java @@ -0,0 +1,160 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoBoard; +import fr.obeo.dsl.arduino.ArduinoFactory; +import fr.obeo.dsl.arduino.ArduinoPackage; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.ArduinoBoard} object. + * + * + * @generated + */ +public class ArduinoBoardItemProvider extends BoardItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ArduinoBoardItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ArduinoPackage.Literals.ARDUINO_BOARD__DIGITAL_PINS); + childrenFeatures.add(ArduinoPackage.Literals.ARDUINO_BOARD__ANALOG_PINS); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns ArduinoBoard.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ArduinoBoard")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ArduinoBoard)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_ArduinoBoard_type") : + getString("_UI_ArduinoBoard_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ArduinoBoard.class)) { + case ArduinoPackage.ARDUINO_BOARD__DIGITAL_PINS: + case ArduinoPackage.ARDUINO_BOARD__ANALOG_PINS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ARDUINO_BOARD__DIGITAL_PINS, + ArduinoFactory.eINSTANCE.createDigitalPin())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ARDUINO_BOARD__ANALOG_PINS, + ArduinoFactory.eINSTANCE.createAnalogPin())); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ArduinoDigitalModuleItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ArduinoDigitalModuleItemProvider.java new file mode 100644 index 00000000..cad1f28d --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ArduinoDigitalModuleItemProvider.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoDigitalModule; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.ArduinoDigitalModule} object. + * + * + * @generated + */ +public class ArduinoDigitalModuleItemProvider extends ArduinoModuleItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ArduinoDigitalModuleItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ArduinoDigitalModule)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_ArduinoDigitalModule_type") : + getString("_UI_ArduinoDigitalModule_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ArduinoEditPlugin.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ArduinoEditPlugin.java new file mode 100644 index 00000000..fe6061cb --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ArduinoEditPlugin.java @@ -0,0 +1,97 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + +import org.eclipse.emf.common.EMFPlugin; + +import org.eclipse.emf.common.util.ResourceLocator; + +/** + * This is the central singleton for the Arduino edit plugin. + * + * + * @generated + */ +public final class ArduinoEditPlugin extends EMFPlugin { + /** + * Keep track of the singleton. + * + * + * @generated + */ + public static final ArduinoEditPlugin INSTANCE = new ArduinoEditPlugin(); + + /** + * Keep track of the singleton. + * + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * + * + * @generated + */ + public ArduinoEditPlugin() { + super + (new ResourceLocator [] { + }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plugin. + * + * + * @generated + */ + public static class Implementation extends EclipsePlugin { + /** + * Creates an instance. + * + * + * @generated + */ + public Implementation() { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ArduinoItemProviderAdapterFactory.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ArduinoItemProviderAdapterFactory.java new file mode 100644 index 00000000..8f5a446a --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ArduinoItemProviderAdapterFactory.java @@ -0,0 +1,1095 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + +import fr.obeo.dsl.arduino.util.ArduinoAdapterFactory; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.edit.provider.ChangeNotifier; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.IChangeNotifier; +import org.eclipse.emf.edit.provider.IDisposable; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.INotifyChangedListener; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; + +/** + * This is the factory that is used to provide the interfaces needed to support Viewers. + * The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}. + * The adapters also support Eclipse property sheets. + * Note that most of the adapters are shared among multiple instances. + * + * + * @generated + */ +public class ArduinoItemProviderAdapterFactory extends ArduinoAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable { + /** + * This keeps track of the root adapter factory that delegates to this adapter factory. + * + * + * @generated + */ + protected ComposedAdapterFactory parentAdapterFactory; + + /** + * This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}. + * + * + * @generated + */ + protected IChangeNotifier changeNotifier = new ChangeNotifier(); + + /** + * This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}. + * + * + * @generated + */ + protected Collection supportedTypes = new ArrayList(); + + /** + * This constructs an instance. + * + * + * @generated + */ + public ArduinoItemProviderAdapterFactory() { + supportedTypes.add(IEditingDomainItemProvider.class); + supportedTypes.add(IStructuredItemContentProvider.class); + supportedTypes.add(ITreeItemContentProvider.class); + supportedTypes.add(IItemLabelProvider.class); + supportedTypes.add(IItemPropertySource.class); + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.DigitalPin} instances. + * + * + * @generated + */ + protected DigitalPinItemProvider digitalPinItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.DigitalPin}. + * + * + * @generated + */ + @Override + public Adapter createDigitalPinAdapter() { + if (digitalPinItemProvider == null) { + digitalPinItemProvider = new DigitalPinItemProvider(this); + } + + return digitalPinItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.AnalogPin} instances. + * + * + * @generated + */ + protected AnalogPinItemProvider analogPinItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.AnalogPin}. + * + * + * @generated + */ + @Override + public Adapter createAnalogPinAdapter() { + if (analogPinItemProvider == null) { + analogPinItemProvider = new AnalogPinItemProvider(this); + } + + return analogPinItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.Sketch} instances. + * + * + * @generated + */ + protected SketchItemProvider sketchItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.Sketch}. + * + * + * @generated + */ + @Override + public Adapter createSketchAdapter() { + if (sketchItemProvider == null) { + sketchItemProvider = new SketchItemProvider(this); + } + + return sketchItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.Project} instances. + * + * + * @generated + */ + protected ProjectItemProvider projectItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.Project}. + * + * + * @generated + */ + @Override + public Adapter createProjectAdapter() { + if (projectItemProvider == null) { + projectItemProvider = new ProjectItemProvider(this); + } + + return projectItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.ModuleAssignment} instances. + * + * + * @generated + */ + protected ModuleAssignmentItemProvider moduleAssignmentItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.ModuleAssignment}. + * + * + * @generated + */ + @Override + public Adapter createModuleAssignmentAdapter() { + if (moduleAssignmentItemProvider == null) { + moduleAssignmentItemProvider = new ModuleAssignmentItemProvider(this); + } + + return moduleAssignmentItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.Delay} instances. + * + * + * @generated + */ + protected DelayItemProvider delayItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.Delay}. + * + * + * @generated + */ + @Override + public Adapter createDelayAdapter() { + if (delayItemProvider == null) { + delayItemProvider = new DelayItemProvider(this); + } + + return delayItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.Repeat} instances. + * + * + * @generated + */ + protected RepeatItemProvider repeatItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.Repeat}. + * + * + * @generated + */ + @Override + public Adapter createRepeatAdapter() { + if (repeatItemProvider == null) { + repeatItemProvider = new RepeatItemProvider(this); + } + + return repeatItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.While} instances. + * + * + * @generated + */ + protected WhileItemProvider whileItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.While}. + * + * + * @generated + */ + @Override + public Adapter createWhileAdapter() { + if (whileItemProvider == null) { + whileItemProvider = new WhileItemProvider(this); + } + + return whileItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.VariableAssignment} instances. + * + * + * @generated + */ + protected VariableAssignmentItemProvider variableAssignmentItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.VariableAssignment}. + * + * + * @generated + */ + @Override + public Adapter createVariableAssignmentAdapter() { + if (variableAssignmentItemProvider == null) { + variableAssignmentItemProvider = new VariableAssignmentItemProvider(this); + } + + return variableAssignmentItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.BinaryIntegerExpression} instances. + * + * + * @generated + */ + protected BinaryIntegerExpressionItemProvider binaryIntegerExpressionItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.BinaryIntegerExpression}. + * + * + * @generated + */ + @Override + public Adapter createBinaryIntegerExpressionAdapter() { + if (binaryIntegerExpressionItemProvider == null) { + binaryIntegerExpressionItemProvider = new BinaryIntegerExpressionItemProvider(this); + } + + return binaryIntegerExpressionItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.BinaryBooleanExpression} instances. + * + * + * @generated + */ + protected BinaryBooleanExpressionItemProvider binaryBooleanExpressionItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.BinaryBooleanExpression}. + * + * + * @generated + */ + @Override + public Adapter createBinaryBooleanExpressionAdapter() { + if (binaryBooleanExpressionItemProvider == null) { + binaryBooleanExpressionItemProvider = new BinaryBooleanExpressionItemProvider(this); + } + + return binaryBooleanExpressionItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.If} instances. + * + * + * @generated + */ + protected IfItemProvider ifItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.If}. + * + * + * @generated + */ + @Override + public Adapter createIfAdapter() { + if (ifItemProvider == null) { + ifItemProvider = new IfItemProvider(this); + } + + return ifItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.IntegerConstant} instances. + * + * + * @generated + */ + protected IntegerConstantItemProvider integerConstantItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.IntegerConstant}. + * + * + * @generated + */ + @Override + public Adapter createIntegerConstantAdapter() { + if (integerConstantItemProvider == null) { + integerConstantItemProvider = new IntegerConstantItemProvider(this); + } + + return integerConstantItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.BooleanConstant} instances. + * + * + * @generated + */ + protected BooleanConstantItemProvider booleanConstantItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.BooleanConstant}. + * + * + * @generated + */ + @Override + public Adapter createBooleanConstantAdapter() { + if (booleanConstantItemProvider == null) { + booleanConstantItemProvider = new BooleanConstantItemProvider(this); + } + + return booleanConstantItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.IntegerVariable} instances. + * + * + * @generated + */ + protected IntegerVariableItemProvider integerVariableItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.IntegerVariable}. + * + * + * @generated + */ + @Override + public Adapter createIntegerVariableAdapter() { + if (integerVariableItemProvider == null) { + integerVariableItemProvider = new IntegerVariableItemProvider(this); + } + + return integerVariableItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.BooleanVariable} instances. + * + * + * @generated + */ + protected BooleanVariableItemProvider booleanVariableItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.BooleanVariable}. + * + * + * @generated + */ + @Override + public Adapter createBooleanVariableAdapter() { + if (booleanVariableItemProvider == null) { + booleanVariableItemProvider = new BooleanVariableItemProvider(this); + } + + return booleanVariableItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.BooleanModuleGet} instances. + * + * + * @generated + */ + protected BooleanModuleGetItemProvider booleanModuleGetItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.BooleanModuleGet}. + * + * + * @generated + */ + @Override + public Adapter createBooleanModuleGetAdapter() { + if (booleanModuleGetItemProvider == null) { + booleanModuleGetItemProvider = new BooleanModuleGetItemProvider(this); + } + + return booleanModuleGetItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.IntegerModuleGet} instances. + * + * + * @generated + */ + protected IntegerModuleGetItemProvider integerModuleGetItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.IntegerModuleGet}. + * + * + * @generated + */ + @Override + public Adapter createIntegerModuleGetAdapter() { + if (integerModuleGetItemProvider == null) { + integerModuleGetItemProvider = new IntegerModuleGetItemProvider(this); + } + + return integerModuleGetItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.UnaryBooleanExpression} instances. + * + * + * @generated + */ + protected UnaryBooleanExpressionItemProvider unaryBooleanExpressionItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.UnaryBooleanExpression}. + * + * + * @generated + */ + @Override + public Adapter createUnaryBooleanExpressionAdapter() { + if (unaryBooleanExpressionItemProvider == null) { + unaryBooleanExpressionItemProvider = new UnaryBooleanExpressionItemProvider(this); + } + + return unaryBooleanExpressionItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.UnaryIntegerExpression} instances. + * + * + * @generated + */ + protected UnaryIntegerExpressionItemProvider unaryIntegerExpressionItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.UnaryIntegerExpression}. + * + * + * @generated + */ + @Override + public Adapter createUnaryIntegerExpressionAdapter() { + if (unaryIntegerExpressionItemProvider == null) { + unaryIntegerExpressionItemProvider = new UnaryIntegerExpressionItemProvider(this); + } + + return unaryIntegerExpressionItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.VariableDeclaration} instances. + * + * + * @generated + */ + protected VariableDeclarationItemProvider variableDeclarationItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.VariableDeclaration}. + * + * + * @generated + */ + @Override + public Adapter createVariableDeclarationAdapter() { + if (variableDeclarationItemProvider == null) { + variableDeclarationItemProvider = new VariableDeclarationItemProvider(this); + } + + return variableDeclarationItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.VariableRef} instances. + * + * + * @generated + */ + protected VariableRefItemProvider variableRefItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.VariableRef}. + * + * + * @generated + */ + @Override + public Adapter createVariableRefAdapter() { + if (variableRefItemProvider == null) { + variableRefItemProvider = new VariableRefItemProvider(this); + } + + return variableRefItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.LED} instances. + * + * + * @generated + */ + protected LEDItemProvider ledItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.LED}. + * + * + * @generated + */ + @Override + public Adapter createLEDAdapter() { + if (ledItemProvider == null) { + ledItemProvider = new LEDItemProvider(this); + } + + return ledItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.PushButton} instances. + * + * + * @generated + */ + protected PushButtonItemProvider pushButtonItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.PushButton}. + * + * + * @generated + */ + @Override + public Adapter createPushButtonAdapter() { + if (pushButtonItemProvider == null) { + pushButtonItemProvider = new PushButtonItemProvider(this); + } + + return pushButtonItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.Buzzer} instances. + * + * + * @generated + */ + protected BuzzerItemProvider buzzerItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.Buzzer}. + * + * + * @generated + */ + @Override + public Adapter createBuzzerAdapter() { + if (buzzerItemProvider == null) { + buzzerItemProvider = new BuzzerItemProvider(this); + } + + return buzzerItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.RotationSensor} instances. + * + * + * @generated + */ + protected RotationSensorItemProvider rotationSensorItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.RotationSensor}. + * + * + * @generated + */ + @Override + public Adapter createRotationSensorAdapter() { + if (rotationSensorItemProvider == null) { + rotationSensorItemProvider = new RotationSensorItemProvider(this); + } + + return rotationSensorItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.MicroServo} instances. + * + * + * @generated + */ + protected MicroServoItemProvider microServoItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.MicroServo}. + * + * + * @generated + */ + @Override + public Adapter createMicroServoAdapter() { + if (microServoItemProvider == null) { + microServoItemProvider = new MicroServoItemProvider(this); + } + + return microServoItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.InfraRedSensor} instances. + * + * + * @generated + */ + protected InfraRedSensorItemProvider infraRedSensorItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.InfraRedSensor}. + * + * + * @generated + */ + @Override + public Adapter createInfraRedSensorAdapter() { + if (infraRedSensorItemProvider == null) { + infraRedSensorItemProvider = new InfraRedSensorItemProvider(this); + } + + return infraRedSensorItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.AmbientLightSensor} instances. + * + * + * @generated + */ + protected AmbientLightSensorItemProvider ambientLightSensorItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.AmbientLightSensor}. + * + * + * @generated + */ + @Override + public Adapter createAmbientLightSensorAdapter() { + if (ambientLightSensorItemProvider == null) { + ambientLightSensorItemProvider = new AmbientLightSensorItemProvider(this); + } + + return ambientLightSensorItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.SoundSensor} instances. + * + * + * @generated + */ + protected SoundSensorItemProvider soundSensorItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.SoundSensor}. + * + * + * @generated + */ + @Override + public Adapter createSoundSensorAdapter() { + if (soundSensorItemProvider == null) { + soundSensorItemProvider = new SoundSensorItemProvider(this); + } + + return soundSensorItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.Fan} instances. + * + * + * @generated + */ + protected FanItemProvider fanItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.Fan}. + * + * + * @generated + */ + @Override + public Adapter createFanAdapter() { + if (fanItemProvider == null) { + fanItemProvider = new FanItemProvider(this); + } + + return fanItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.MusicPlayer} instances. + * + * + * @generated + */ + protected MusicPlayerItemProvider musicPlayerItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.MusicPlayer}. + * + * + * @generated + */ + @Override + public Adapter createMusicPlayerAdapter() { + if (musicPlayerItemProvider == null) { + musicPlayerItemProvider = new MusicPlayerItemProvider(this); + } + + return musicPlayerItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.ArduinoBoard} instances. + * + * + * @generated + */ + protected ArduinoBoardItemProvider arduinoBoardItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.ArduinoBoard}. + * + * + * @generated + */ + @Override + public Adapter createArduinoBoardAdapter() { + if (arduinoBoardItemProvider == null) { + arduinoBoardItemProvider = new ArduinoBoardItemProvider(this); + } + + return arduinoBoardItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.Thread} instances. + * + * + * @generated + */ + protected ThreadItemProvider threadItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.Thread}. + * + * + * @generated + */ + @Override + public Adapter createThreadAdapter() { + if (threadItemProvider == null) { + threadItemProvider = new ThreadItemProvider(this); + } + + return threadItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.Channel} instances. + * + * + * @generated + */ + protected ChannelItemProvider channelItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.Channel}. + * + * + * @generated + */ + @Override + public Adapter createChannelAdapter() { + if (channelItemProvider == null) { + channelItemProvider = new ChannelItemProvider(this); + } + + return channelItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.Link} instances. + * + * + * @generated + */ + protected LinkItemProvider linkItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.Link}. + * + * + * @generated + */ + @Override + public Adapter createLinkAdapter() { + if (linkItemProvider == null) { + linkItemProvider = new LinkItemProvider(this); + } + + return linkItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.SynchronizationBlock} instances. + * + * + * @generated + */ + protected SynchronizationBlockItemProvider synchronizationBlockItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.SynchronizationBlock}. + * + * + * @generated + */ + @Override + public Adapter createSynchronizationBlockAdapter() { + if (synchronizationBlockItemProvider == null) { + synchronizationBlockItemProvider = new SynchronizationBlockItemProvider(this); + } + + return synchronizationBlockItemProvider; + } + + /** + * This keeps track of the one adapter used for all {@link fr.obeo.dsl.arduino.InstructionBlock} instances. + * + * + * @generated + */ + protected InstructionBlockItemProvider instructionBlockItemProvider; + + /** + * This creates an adapter for a {@link fr.obeo.dsl.arduino.InstructionBlock}. + * + * + * @generated + */ + @Override + public Adapter createInstructionBlockAdapter() { + if (instructionBlockItemProvider == null) { + instructionBlockItemProvider = new InstructionBlockItemProvider(this); + } + + return instructionBlockItemProvider; + } + + /** + * This returns the root adapter factory that contains this factory. + * + * + * @generated + */ + public ComposeableAdapterFactory getRootAdapterFactory() { + return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); + } + + /** + * This sets the composed adapter factory that contains this factory. + * + * + * @generated + */ + public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { + this.parentAdapterFactory = parentAdapterFactory; + } + + /** + * + * + * @generated + */ + @Override + public boolean isFactoryForType(Object type) { + return supportedTypes.contains(type) || super.isFactoryForType(type); + } + + /** + * This implementation substitutes the factory itself as the key for the adapter. + * + * + * @generated + */ + @Override + public Adapter adapt(Notifier notifier, Object type) { + return super.adapt(notifier, this); + } + + /** + * + * + * @generated + */ + @Override + public Object adapt(Object object, Object type) { + if (isFactoryForType(type)) { + Object adapter = super.adapt(object, type); + if (!(type instanceof Class) || (((Class)type).isInstance(adapter))) { + return adapter; + } + } + + return null; + } + + /** + * This adds a listener. + * + * + * @generated + */ + public void addListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.addListener(notifyChangedListener); + } + + /** + * This removes a listener. + * + * + * @generated + */ + public void removeListener(INotifyChangedListener notifyChangedListener) { + changeNotifier.removeListener(notifyChangedListener); + } + + /** + * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. + * + * + * @generated + */ + public void fireNotifyChanged(Notification notification) { + changeNotifier.fireNotifyChanged(notification); + + if (parentAdapterFactory != null) { + parentAdapterFactory.fireNotifyChanged(notification); + } + } + + /** + * This disposes all of the item providers created by this factory. + * + * + * @generated + */ + public void dispose() { + if (digitalPinItemProvider != null) digitalPinItemProvider.dispose(); + if (analogPinItemProvider != null) analogPinItemProvider.dispose(); + if (sketchItemProvider != null) sketchItemProvider.dispose(); + if (projectItemProvider != null) projectItemProvider.dispose(); + if (moduleAssignmentItemProvider != null) moduleAssignmentItemProvider.dispose(); + if (delayItemProvider != null) delayItemProvider.dispose(); + if (repeatItemProvider != null) repeatItemProvider.dispose(); + if (whileItemProvider != null) whileItemProvider.dispose(); + if (variableAssignmentItemProvider != null) variableAssignmentItemProvider.dispose(); + if (binaryIntegerExpressionItemProvider != null) binaryIntegerExpressionItemProvider.dispose(); + if (binaryBooleanExpressionItemProvider != null) binaryBooleanExpressionItemProvider.dispose(); + if (ifItemProvider != null) ifItemProvider.dispose(); + if (integerConstantItemProvider != null) integerConstantItemProvider.dispose(); + if (booleanConstantItemProvider != null) booleanConstantItemProvider.dispose(); + if (integerVariableItemProvider != null) integerVariableItemProvider.dispose(); + if (booleanVariableItemProvider != null) booleanVariableItemProvider.dispose(); + if (booleanModuleGetItemProvider != null) booleanModuleGetItemProvider.dispose(); + if (integerModuleGetItemProvider != null) integerModuleGetItemProvider.dispose(); + if (unaryBooleanExpressionItemProvider != null) unaryBooleanExpressionItemProvider.dispose(); + if (unaryIntegerExpressionItemProvider != null) unaryIntegerExpressionItemProvider.dispose(); + if (variableDeclarationItemProvider != null) variableDeclarationItemProvider.dispose(); + if (variableRefItemProvider != null) variableRefItemProvider.dispose(); + if (ledItemProvider != null) ledItemProvider.dispose(); + if (pushButtonItemProvider != null) pushButtonItemProvider.dispose(); + if (buzzerItemProvider != null) buzzerItemProvider.dispose(); + if (rotationSensorItemProvider != null) rotationSensorItemProvider.dispose(); + if (microServoItemProvider != null) microServoItemProvider.dispose(); + if (infraRedSensorItemProvider != null) infraRedSensorItemProvider.dispose(); + if (ambientLightSensorItemProvider != null) ambientLightSensorItemProvider.dispose(); + if (soundSensorItemProvider != null) soundSensorItemProvider.dispose(); + if (fanItemProvider != null) fanItemProvider.dispose(); + if (musicPlayerItemProvider != null) musicPlayerItemProvider.dispose(); + if (arduinoBoardItemProvider != null) arduinoBoardItemProvider.dispose(); + if (threadItemProvider != null) threadItemProvider.dispose(); + if (channelItemProvider != null) channelItemProvider.dispose(); + if (linkItemProvider != null) linkItemProvider.dispose(); + if (synchronizationBlockItemProvider != null) synchronizationBlockItemProvider.dispose(); + if (instructionBlockItemProvider != null) instructionBlockItemProvider.dispose(); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ArduinoModuleItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ArduinoModuleItemProvider.java new file mode 100644 index 00000000..1fc1bfb7 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ArduinoModuleItemProvider.java @@ -0,0 +1,129 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoModule; +import fr.obeo.dsl.arduino.ArduinoPackage; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.ArduinoModule} object. + * + * + * @generated + */ +public class ArduinoModuleItemProvider extends NamedElementItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ArduinoModuleItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addLevelPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Level feature. + * + * + * @generated + */ + protected void addLevelPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Module_level_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Module_level_feature", "_UI_Module_type"), + ArduinoPackage.Literals.MODULE__LEVEL, + true, + false, + false, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ArduinoModule)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_ArduinoModule_type") : + getString("_UI_ArduinoModule_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ArduinoModule.class)) { + case ArduinoPackage.ARDUINO_MODULE__LEVEL: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/AssignmentItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/AssignmentItemProvider.java new file mode 100644 index 00000000..27404a1a --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/AssignmentItemProvider.java @@ -0,0 +1,192 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoFactory; +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.Assignment; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.Assignment} object. + * + * + * @generated + */ +public class AssignmentItemProvider extends InstructionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public AssignmentItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ArduinoPackage.Literals.ASSIGNMENT__OPERAND); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((Assignment)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_Assignment_type") : + getString("_UI_Assignment_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(Assignment.class)) { + case ArduinoPackage.ASSIGNMENT__OPERAND: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createBinaryIntegerExpression())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createBinaryBooleanExpression())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createIntegerConstant())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createBooleanConstant())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createIntegerVariable())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createBooleanVariable())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createBooleanModuleGet())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createIntegerModuleGet())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createUnaryBooleanExpression())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createUnaryIntegerExpression())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createVariableRef())); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BinaryBooleanExpressionItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BinaryBooleanExpressionItemProvider.java new file mode 100644 index 00000000..a50ab54a --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BinaryBooleanExpressionItemProvider.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.BinaryBooleanExpression; +import fr.obeo.dsl.arduino.BinaryBooleanOperatorKind; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.BinaryBooleanExpression} object. + * + * + * @generated + */ +public class BinaryBooleanExpressionItemProvider extends BinaryExpressionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public BinaryBooleanExpressionItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addOperatorPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Operator feature. + * + * + * @generated + */ + protected void addOperatorPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_BinaryBooleanExpression_operator_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_BinaryBooleanExpression_operator_feature", "_UI_BinaryBooleanExpression_type"), + ArduinoPackage.Literals.BINARY_BOOLEAN_EXPRESSION__OPERATOR, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns BinaryBooleanExpression.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/BinaryBooleanExpression")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + BinaryBooleanOperatorKind labelValue = ((BinaryBooleanExpression)object).getOperator(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? + getString("_UI_BinaryBooleanExpression_type") : + getString("_UI_BinaryBooleanExpression_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(BinaryBooleanExpression.class)) { + case ArduinoPackage.BINARY_BOOLEAN_EXPRESSION__OPERATOR: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}. + * + * + * @generated + */ + @Override + public String getCreateChildText(Object owner, Object feature, Object child, Collection selection) { + Object childFeature = feature; + Object childObject = child; + + boolean qualify = + childFeature == ArduinoPackage.Literals.BINARY_EXPRESSION__LEFT || + childFeature == ArduinoPackage.Literals.BINARY_EXPRESSION__RIGHT; + + if (qualify) { + return getString + ("_UI_CreateChild_text2", + new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BinaryExpressionItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BinaryExpressionItemProvider.java new file mode 100644 index 00000000..54826b5c --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BinaryExpressionItemProvider.java @@ -0,0 +1,269 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoFactory; +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.BinaryExpression; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.BinaryExpression} object. + * + * + * @generated + */ +public class BinaryExpressionItemProvider extends ExpressionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public BinaryExpressionItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ArduinoPackage.Literals.BINARY_EXPRESSION__LEFT); + childrenFeatures.add(ArduinoPackage.Literals.BINARY_EXPRESSION__RIGHT); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_BinaryExpression_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(BinaryExpression.class)) { + case ArduinoPackage.BINARY_EXPRESSION__LEFT: + case ArduinoPackage.BINARY_EXPRESSION__RIGHT: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.BINARY_EXPRESSION__LEFT, + ArduinoFactory.eINSTANCE.createBinaryIntegerExpression())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.BINARY_EXPRESSION__LEFT, + ArduinoFactory.eINSTANCE.createBinaryBooleanExpression())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.BINARY_EXPRESSION__LEFT, + ArduinoFactory.eINSTANCE.createIntegerConstant())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.BINARY_EXPRESSION__LEFT, + ArduinoFactory.eINSTANCE.createBooleanConstant())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.BINARY_EXPRESSION__LEFT, + ArduinoFactory.eINSTANCE.createIntegerVariable())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.BINARY_EXPRESSION__LEFT, + ArduinoFactory.eINSTANCE.createBooleanVariable())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.BINARY_EXPRESSION__LEFT, + ArduinoFactory.eINSTANCE.createBooleanModuleGet())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.BINARY_EXPRESSION__LEFT, + ArduinoFactory.eINSTANCE.createIntegerModuleGet())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.BINARY_EXPRESSION__LEFT, + ArduinoFactory.eINSTANCE.createUnaryBooleanExpression())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.BINARY_EXPRESSION__LEFT, + ArduinoFactory.eINSTANCE.createUnaryIntegerExpression())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.BINARY_EXPRESSION__LEFT, + ArduinoFactory.eINSTANCE.createVariableRef())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.BINARY_EXPRESSION__RIGHT, + ArduinoFactory.eINSTANCE.createBinaryIntegerExpression())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.BINARY_EXPRESSION__RIGHT, + ArduinoFactory.eINSTANCE.createBinaryBooleanExpression())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.BINARY_EXPRESSION__RIGHT, + ArduinoFactory.eINSTANCE.createIntegerConstant())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.BINARY_EXPRESSION__RIGHT, + ArduinoFactory.eINSTANCE.createBooleanConstant())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.BINARY_EXPRESSION__RIGHT, + ArduinoFactory.eINSTANCE.createIntegerVariable())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.BINARY_EXPRESSION__RIGHT, + ArduinoFactory.eINSTANCE.createBooleanVariable())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.BINARY_EXPRESSION__RIGHT, + ArduinoFactory.eINSTANCE.createBooleanModuleGet())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.BINARY_EXPRESSION__RIGHT, + ArduinoFactory.eINSTANCE.createIntegerModuleGet())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.BINARY_EXPRESSION__RIGHT, + ArduinoFactory.eINSTANCE.createUnaryBooleanExpression())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.BINARY_EXPRESSION__RIGHT, + ArduinoFactory.eINSTANCE.createUnaryIntegerExpression())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.BINARY_EXPRESSION__RIGHT, + ArduinoFactory.eINSTANCE.createVariableRef())); + } + + /** + * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}. + * + * + * @generated + */ + @Override + public String getCreateChildText(Object owner, Object feature, Object child, Collection selection) { + Object childFeature = feature; + Object childObject = child; + + boolean qualify = + childFeature == ArduinoPackage.Literals.BINARY_EXPRESSION__LEFT || + childFeature == ArduinoPackage.Literals.BINARY_EXPRESSION__RIGHT; + + if (qualify) { + return getString + ("_UI_CreateChild_text2", + new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BinaryIntegerExpressionItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BinaryIntegerExpressionItemProvider.java new file mode 100644 index 00000000..9dbf8627 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BinaryIntegerExpressionItemProvider.java @@ -0,0 +1,165 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.BinaryIntegerExpression; +import fr.obeo.dsl.arduino.BinaryIntegerOperatorKind; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.BinaryIntegerExpression} object. + * + * + * @generated + */ +public class BinaryIntegerExpressionItemProvider extends BinaryExpressionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public BinaryIntegerExpressionItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addOperatorPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Operator feature. + * + * + * @generated + */ + protected void addOperatorPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_BinaryIntegerExpression_operator_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_BinaryIntegerExpression_operator_feature", "_UI_BinaryIntegerExpression_type"), + ArduinoPackage.Literals.BINARY_INTEGER_EXPRESSION__OPERATOR, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns BinaryIntegerExpression.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/BinaryIntegerExpression")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + BinaryIntegerOperatorKind labelValue = ((BinaryIntegerExpression)object).getOperator(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? + getString("_UI_BinaryIntegerExpression_type") : + getString("_UI_BinaryIntegerExpression_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(BinaryIntegerExpression.class)) { + case ArduinoPackage.BINARY_INTEGER_EXPRESSION__OPERATOR: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}. + * + * + * @generated + */ + @Override + public String getCreateChildText(Object owner, Object feature, Object child, Collection selection) { + Object childFeature = feature; + Object childObject = child; + + boolean qualify = + childFeature == ArduinoPackage.Literals.BINARY_EXPRESSION__LEFT || + childFeature == ArduinoPackage.Literals.BINARY_EXPRESSION__RIGHT; + + if (qualify) { + return getString + ("_UI_CreateChild_text2", + new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BoardItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BoardItemProvider.java new file mode 100644 index 00000000..032882f5 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BoardItemProvider.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.Board; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.Board} object. + * + * + * @generated + */ +public class BoardItemProvider extends NamedElementItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public BoardItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addThreadsPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Threads feature. + * + * + * @generated + */ + protected void addThreadsPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Board_threads_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Board_threads_feature", "_UI_Board_type"), + ArduinoPackage.Literals.BOARD__THREADS, + true, + false, + true, + null, + null, + null)); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((Board)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_Board_type") : + getString("_UI_Board_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BooleanConstantItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BooleanConstantItemProvider.java new file mode 100644 index 00000000..c7f391fc --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BooleanConstantItemProvider.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.BooleanConstant; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.BooleanConstant} object. + * + * + * @generated + */ +public class BooleanConstantItemProvider extends ConstantItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public BooleanConstantItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addValuePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Value feature. + * + * + * @generated + */ + protected void addValuePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_BooleanConstant_value_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_BooleanConstant_value_feature", "_UI_BooleanConstant_type"), + ArduinoPackage.Literals.BOOLEAN_CONSTANT__VALUE, + true, + false, + false, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns BooleanConstant.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/BooleanConstant")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + BooleanConstant booleanConstant = (BooleanConstant)object; + return getString("_UI_BooleanConstant_type") + " " + booleanConstant.isValue(); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(BooleanConstant.class)) { + case ArduinoPackage.BOOLEAN_CONSTANT__VALUE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BooleanExpressionItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BooleanExpressionItemProvider.java new file mode 100644 index 00000000..1e5e422a --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BooleanExpressionItemProvider.java @@ -0,0 +1,102 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.BooleanExpression} object. + * + * + * @generated + */ +public class BooleanExpressionItemProvider extends ExpressionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public BooleanExpressionItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns BooleanExpression.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/BooleanExpression")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_BooleanExpression_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BooleanModuleGetItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BooleanModuleGetItemProvider.java new file mode 100644 index 00000000..16564bf0 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BooleanModuleGetItemProvider.java @@ -0,0 +1,102 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.BooleanModuleGet} object. + * + * + * @generated + */ +public class BooleanModuleGetItemProvider extends ModuleGetItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public BooleanModuleGetItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns BooleanModuleGet.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/BooleanModuleGet")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_BooleanModuleGet_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BooleanVariableItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BooleanVariableItemProvider.java new file mode 100644 index 00000000..780c723f --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BooleanVariableItemProvider.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.BooleanVariable; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.BooleanVariable} object. + * + * + * @generated + */ +public class BooleanVariableItemProvider extends VariableItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public BooleanVariableItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addInitialValuePropertyDescriptor(object); + addValuePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Initial Value feature. + * + * + * @generated + */ + protected void addInitialValuePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_BooleanVariable_initialValue_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_BooleanVariable_initialValue_feature", "_UI_BooleanVariable_type"), + ArduinoPackage.Literals.BOOLEAN_VARIABLE__INITIAL_VALUE, + true, + false, + false, + ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Value feature. + * + * + * @generated + */ + protected void addValuePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_BooleanVariable_value_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_BooleanVariable_value_feature", "_UI_BooleanVariable_type"), + ArduinoPackage.Literals.BOOLEAN_VARIABLE__VALUE, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns BooleanVariable.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/BooleanVariable")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((BooleanVariable)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_BooleanVariable_type") : + getString("_UI_BooleanVariable_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(BooleanVariable.class)) { + case ArduinoPackage.BOOLEAN_VARIABLE__INITIAL_VALUE: + case ArduinoPackage.BOOLEAN_VARIABLE__VALUE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BuzzerItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BuzzerItemProvider.java new file mode 100644 index 00000000..db820027 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/BuzzerItemProvider.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.Buzzer; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.Buzzer} object. + * + * + * @generated + */ +public class BuzzerItemProvider extends ArduinoDigitalModuleItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public BuzzerItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns Buzzer.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Buzzer")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((Buzzer)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_Buzzer_type") : + getString("_UI_Buzzer_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ChannelItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ChannelItemProvider.java new file mode 100644 index 00000000..874c1344 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ChannelItemProvider.java @@ -0,0 +1,258 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.Channel; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.Channel} object. + * + * + * @generated + */ +public class ChannelItemProvider extends NamedElementItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ChannelItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addSourcePropertyDescriptor(object); + addTargetPropertyDescriptor(object); + addInRatePropertyDescriptor(object); + addOutRatePropertyDescriptor(object); + addCapacityPropertyDescriptor(object); + addCurrentSizePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Source feature. + * + * + * @generated + */ + protected void addSourcePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Channel_source_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Channel_source_feature", "_UI_Channel_type"), + ArduinoPackage.Literals.CHANNEL__SOURCE, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Target feature. + * + * + * @generated + */ + protected void addTargetPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Channel_target_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Channel_target_feature", "_UI_Channel_type"), + ArduinoPackage.Literals.CHANNEL__TARGET, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the In Rate feature. + * + * + * @generated + */ + protected void addInRatePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Channel_inRate_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Channel_inRate_feature", "_UI_Channel_type"), + ArduinoPackage.Literals.CHANNEL__IN_RATE, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Out Rate feature. + * + * + * @generated + */ + protected void addOutRatePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Channel_outRate_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Channel_outRate_feature", "_UI_Channel_type"), + ArduinoPackage.Literals.CHANNEL__OUT_RATE, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Capacity feature. + * + * + * @generated + */ + protected void addCapacityPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Channel_capacity_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Channel_capacity_feature", "_UI_Channel_type"), + ArduinoPackage.Literals.CHANNEL__CAPACITY, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Current Size feature. + * + * + * @generated + */ + protected void addCurrentSizePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Channel_currentSize_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Channel_currentSize_feature", "_UI_Channel_type"), + ArduinoPackage.Literals.CHANNEL__CURRENT_SIZE, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns Channel.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Channel")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((Channel)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_Channel_type") : + getString("_UI_Channel_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(Channel.class)) { + case ArduinoPackage.CHANNEL__IN_RATE: + case ArduinoPackage.CHANNEL__OUT_RATE: + case ArduinoPackage.CHANNEL__CAPACITY: + case ArduinoPackage.CHANNEL__CURRENT_SIZE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ConstantItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ConstantItemProvider.java new file mode 100644 index 00000000..e8b62841 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ConstantItemProvider.java @@ -0,0 +1,102 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.Constant} object. + * + * + * @generated + */ +public class ConstantItemProvider extends ExpressionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ConstantItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns Constant.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Constant")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_Constant_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ControlItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ControlItemProvider.java new file mode 100644 index 00000000..86fc68a5 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ControlItemProvider.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoFactory; +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.Control; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.Control} object. + * + * + * @generated + */ +public class ControlItemProvider extends InstructionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ControlItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ArduinoPackage.Literals.CONTROL__BLOCK); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((Control)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_Control_type") : + getString("_UI_Control_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(Control.class)) { + case ArduinoPackage.CONTROL__BLOCK: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.CONTROL__BLOCK, + ArduinoFactory.eINSTANCE.createInstructionBlock())); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/DelayItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/DelayItemProvider.java new file mode 100644 index 00000000..9189731c --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/DelayItemProvider.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.Delay; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.Delay} object. + * + * + * @generated + */ +public class DelayItemProvider extends UtilitiesItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public DelayItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addUnitPropertyDescriptor(object); + addValuePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Unit feature. + * + * + * @generated + */ + protected void addUnitPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Delay_unit_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Delay_unit_feature", "_UI_Delay_type"), + ArduinoPackage.Literals.DELAY__UNIT, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Value feature. + * + * + * @generated + */ + protected void addValuePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Delay_value_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Delay_value_feature", "_UI_Delay_type"), + ArduinoPackage.Literals.DELAY__VALUE, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns Delay.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Delay")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((Delay)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_Delay_type") : + getString("_UI_Delay_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(Delay.class)) { + case ArduinoPackage.DELAY__UNIT: + case ArduinoPackage.DELAY__VALUE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/DigitalPinItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/DigitalPinItemProvider.java new file mode 100644 index 00000000..17fbbf66 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/DigitalPinItemProvider.java @@ -0,0 +1,176 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoFactory; +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.DigitalPin; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.DigitalPin} object. + * + * + * @generated + */ +public class DigitalPinItemProvider extends PinItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public DigitalPinItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ArduinoPackage.Literals.DIGITAL_PIN__MODULE); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns DigitalPin.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/DigitalPin")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + DigitalPin digitalPin = (DigitalPin)object; + return getString("_UI_DigitalPin_type") + " " + digitalPin.getId(); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(DigitalPin.class)) { + case ArduinoPackage.DIGITAL_PIN__MODULE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.DIGITAL_PIN__MODULE, + ArduinoFactory.eINSTANCE.createLED())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.DIGITAL_PIN__MODULE, + ArduinoFactory.eINSTANCE.createPushButton())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.DIGITAL_PIN__MODULE, + ArduinoFactory.eINSTANCE.createBuzzer())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.DIGITAL_PIN__MODULE, + ArduinoFactory.eINSTANCE.createMicroServo())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.DIGITAL_PIN__MODULE, + ArduinoFactory.eINSTANCE.createInfraRedSensor())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.DIGITAL_PIN__MODULE, + ArduinoFactory.eINSTANCE.createFan())); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ExpressionItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ExpressionItemProvider.java new file mode 100644 index 00000000..b4acf5f9 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ExpressionItemProvider.java @@ -0,0 +1,117 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.Expression} object. + * + * + * @generated + */ +public class ExpressionItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ExpressionItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_Expression_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ArduinoEditPlugin.INSTANCE; + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/FanItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/FanItemProvider.java new file mode 100644 index 00000000..5d815878 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/FanItemProvider.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.Fan; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.Fan} object. + * + * + * @generated + */ +public class FanItemProvider extends ArduinoDigitalModuleItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public FanItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns Fan.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Fan")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((Fan)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_Fan_type") : + getString("_UI_Fan_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/IfItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/IfItemProvider.java new file mode 100644 index 00000000..d7c1df73 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/IfItemProvider.java @@ -0,0 +1,200 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoFactory; +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.If; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.If} object. + * + * + * @generated + */ +public class IfItemProvider extends ControlItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public IfItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addConditionPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Condition feature. + * + * + * @generated + */ + protected void addConditionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_If_condition_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_If_condition_feature", "_UI_If_type"), + ArduinoPackage.Literals.IF__CONDITION, + true, + false, + true, + null, + null, + null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ArduinoPackage.Literals.IF__ELSE_BLOCK); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns If.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/If")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((If)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_If_type") : + getString("_UI_If_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(If.class)) { + case ArduinoPackage.IF__ELSE_BLOCK: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.IF__ELSE_BLOCK, + ArduinoFactory.eINSTANCE.createInstructionBlock())); + } + + /** + * This returns the label text for {@link org.eclipse.emf.edit.command.CreateChildCommand}. + * + * + * @generated + */ + @Override + public String getCreateChildText(Object owner, Object feature, Object child, Collection selection) { + Object childFeature = feature; + Object childObject = child; + + boolean qualify = + childFeature == ArduinoPackage.Literals.CONTROL__BLOCK || + childFeature == ArduinoPackage.Literals.IF__ELSE_BLOCK; + + if (qualify) { + return getString + ("_UI_CreateChild_text2", + new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) }); + } + return super.getCreateChildText(owner, feature, child, selection); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/InfraRedSensorItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/InfraRedSensorItemProvider.java new file mode 100644 index 00000000..d16ca359 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/InfraRedSensorItemProvider.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.InfraRedSensor; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.InfraRedSensor} object. + * + * + * @generated + */ +public class InfraRedSensorItemProvider extends ArduinoDigitalModuleItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public InfraRedSensorItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns InfraRedSensor.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/InfraRedSensor")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((InfraRedSensor)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_InfraRedSensor_type") : + getString("_UI_InfraRedSensor_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/InstructionBlockItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/InstructionBlockItemProvider.java new file mode 100644 index 00000000..9e387790 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/InstructionBlockItemProvider.java @@ -0,0 +1,184 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoFactory; +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.InstructionBlock; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.InstructionBlock} object. + * + * + * @generated + */ +public class InstructionBlockItemProvider extends ThreadInstructionBlockItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public InstructionBlockItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ArduinoPackage.Literals.INSTRUCTION_BLOCK__INSTRUCTIONS); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns InstructionBlock.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/InstructionBlock")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((InstructionBlock)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_InstructionBlock_type") : + getString("_UI_InstructionBlock_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(InstructionBlock.class)) { + case ArduinoPackage.INSTRUCTION_BLOCK__INSTRUCTIONS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.INSTRUCTION_BLOCK__INSTRUCTIONS, + ArduinoFactory.eINSTANCE.createModuleAssignment())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.INSTRUCTION_BLOCK__INSTRUCTIONS, + ArduinoFactory.eINSTANCE.createDelay())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.INSTRUCTION_BLOCK__INSTRUCTIONS, + ArduinoFactory.eINSTANCE.createRepeat())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.INSTRUCTION_BLOCK__INSTRUCTIONS, + ArduinoFactory.eINSTANCE.createWhile())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.INSTRUCTION_BLOCK__INSTRUCTIONS, + ArduinoFactory.eINSTANCE.createVariableAssignment())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.INSTRUCTION_BLOCK__INSTRUCTIONS, + ArduinoFactory.eINSTANCE.createIf())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.INSTRUCTION_BLOCK__INSTRUCTIONS, + ArduinoFactory.eINSTANCE.createVariableDeclaration())); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/InstructionItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/InstructionItemProvider.java new file mode 100644 index 00000000..119ffa65 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/InstructionItemProvider.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.Instruction; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.Instruction} object. + * + * + * @generated + */ +public class InstructionItemProvider extends NamedElementItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public InstructionItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((Instruction)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_Instruction_type") : + getString("_UI_Instruction_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/IntegerConstantItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/IntegerConstantItemProvider.java new file mode 100644 index 00000000..d428ac32 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/IntegerConstantItemProvider.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.IntegerConstant; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.IntegerConstant} object. + * + * + * @generated + */ +public class IntegerConstantItemProvider extends ConstantItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public IntegerConstantItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addValuePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Value feature. + * + * + * @generated + */ + protected void addValuePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_IntegerConstant_value_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_IntegerConstant_value_feature", "_UI_IntegerConstant_type"), + ArduinoPackage.Literals.INTEGER_CONSTANT__VALUE, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns IntegerConstant.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IntegerConstant")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + IntegerConstant integerConstant = (IntegerConstant)object; + return getString("_UI_IntegerConstant_type") + " " + integerConstant.getValue(); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(IntegerConstant.class)) { + case ArduinoPackage.INTEGER_CONSTANT__VALUE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/IntegerExpressionItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/IntegerExpressionItemProvider.java new file mode 100644 index 00000000..2fc1a1a4 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/IntegerExpressionItemProvider.java @@ -0,0 +1,91 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.IntegerExpression} object. + * + * + * @generated + */ +public class IntegerExpressionItemProvider extends ExpressionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public IntegerExpressionItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_IntegerExpression_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/IntegerModuleGetItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/IntegerModuleGetItemProvider.java new file mode 100644 index 00000000..536496a1 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/IntegerModuleGetItemProvider.java @@ -0,0 +1,102 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.IntegerModuleGet} object. + * + * + * @generated + */ +public class IntegerModuleGetItemProvider extends ModuleGetItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public IntegerModuleGetItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns IntegerModuleGet.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IntegerModuleGet")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_IntegerModuleGet_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/IntegerVariableItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/IntegerVariableItemProvider.java new file mode 100644 index 00000000..ff4e491c --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/IntegerVariableItemProvider.java @@ -0,0 +1,164 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.IntegerVariable; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.IntegerVariable} object. + * + * + * @generated + */ +public class IntegerVariableItemProvider extends VariableItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public IntegerVariableItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addInitialValuePropertyDescriptor(object); + addValuePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Initial Value feature. + * + * + * @generated + */ + protected void addInitialValuePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_IntegerVariable_initialValue_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_IntegerVariable_initialValue_feature", "_UI_IntegerVariable_type"), + ArduinoPackage.Literals.INTEGER_VARIABLE__INITIAL_VALUE, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Value feature. + * + * + * @generated + */ + protected void addValuePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_IntegerVariable_value_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_IntegerVariable_value_feature", "_UI_IntegerVariable_type"), + ArduinoPackage.Literals.INTEGER_VARIABLE__VALUE, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns IntegerVariable.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/IntegerVariable")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((IntegerVariable)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_IntegerVariable_type") : + getString("_UI_IntegerVariable_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(IntegerVariable.class)) { + case ArduinoPackage.INTEGER_VARIABLE__INITIAL_VALUE: + case ArduinoPackage.INTEGER_VARIABLE__VALUE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/LEDItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/LEDItemProvider.java new file mode 100644 index 00000000..dcb2ee9a --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/LEDItemProvider.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.LED; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.LED} object. + * + * + * @generated + */ +public class LEDItemProvider extends ArduinoDigitalModuleItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public LEDItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns LED.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/LED")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((LED)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_LED_type") : + getString("_UI_LED_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/LinkItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/LinkItemProvider.java new file mode 100644 index 00000000..5281217b --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/LinkItemProvider.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.Link; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.Link} object. + * + * + * @generated + */ +public class LinkItemProvider extends NamedElementItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public LinkItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addInBoardPropertyDescriptor(object); + addOutBoardPropertyDescriptor(object); + addChannelsPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the In Board feature. + * + * + * @generated + */ + protected void addInBoardPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Link_inBoard_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Link_inBoard_feature", "_UI_Link_type"), + ArduinoPackage.Literals.LINK__IN_BOARD, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Out Board feature. + * + * + * @generated + */ + protected void addOutBoardPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Link_outBoard_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Link_outBoard_feature", "_UI_Link_type"), + ArduinoPackage.Literals.LINK__OUT_BOARD, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Channels feature. + * + * + * @generated + */ + protected void addChannelsPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Link_channels_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Link_channels_feature", "_UI_Link_type"), + ArduinoPackage.Literals.LINK__CHANNELS, + true, + false, + true, + null, + null, + null)); + } + + /** + * This returns Link.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Link")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((Link)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_Link_type") : + getString("_UI_Link_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/MicroServoItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/MicroServoItemProvider.java new file mode 100644 index 00000000..9a2e855d --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/MicroServoItemProvider.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.MicroServo; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.MicroServo} object. + * + * + * @generated + */ +public class MicroServoItemProvider extends ArduinoDigitalModuleItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public MicroServoItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns MicroServo.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/MicroServo")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((MicroServo)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_MicroServo_type") : + getString("_UI_MicroServo_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ModuleAssignmentItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ModuleAssignmentItemProvider.java new file mode 100644 index 00000000..963ce5c2 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ModuleAssignmentItemProvider.java @@ -0,0 +1,203 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoFactory; +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.ModuleAssignment; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.ModuleAssignment} object. + * + * + * @generated + */ +public class ModuleAssignmentItemProvider extends ModuleInstructionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ModuleAssignmentItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ArduinoPackage.Literals.ASSIGNMENT__OPERAND); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns ModuleAssignment.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ModuleAssignment")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ModuleAssignment)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_ModuleAssignment_type") : + getString("_UI_ModuleAssignment_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(ModuleAssignment.class)) { + case ArduinoPackage.MODULE_ASSIGNMENT__OPERAND: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createBinaryIntegerExpression())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createBinaryBooleanExpression())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createIntegerConstant())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createBooleanConstant())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createIntegerVariable())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createBooleanVariable())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createBooleanModuleGet())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createIntegerModuleGet())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createUnaryBooleanExpression())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createUnaryIntegerExpression())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createVariableRef())); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ModuleGetItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ModuleGetItemProvider.java new file mode 100644 index 00000000..ce49ede1 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ModuleGetItemProvider.java @@ -0,0 +1,128 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoPackage; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.ModuleGet} object. + * + * + * @generated + */ +public class ModuleGetItemProvider extends ExpressionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ModuleGetItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addModulePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Module feature. + * + * + * @generated + */ + protected void addModulePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ModuleGet_module_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ModuleGet_module_feature", "_UI_ModuleGet_type"), + ArduinoPackage.Literals.MODULE_GET__MODULE, + true, + false, + true, + null, + null, + null)); + } + + /** + * This returns ModuleGet.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/ModuleGet")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_ModuleGet_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ModuleInstructionItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ModuleInstructionItemProvider.java new file mode 100644 index 00000000..a2f19799 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ModuleInstructionItemProvider.java @@ -0,0 +1,121 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.ModuleInstruction; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.ModuleInstruction} object. + * + * + * @generated + */ +public class ModuleInstructionItemProvider extends InstructionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ModuleInstructionItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addModulePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Module feature. + * + * + * @generated + */ + protected void addModulePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ModuleInstruction_module_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ModuleInstruction_module_feature", "_UI_ModuleInstruction_type"), + ArduinoPackage.Literals.MODULE_INSTRUCTION__MODULE, + true, + false, + true, + null, + null, + null)); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ModuleInstruction)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_ModuleInstruction_type") : + getString("_UI_ModuleInstruction_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/MusicPlayerItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/MusicPlayerItemProvider.java new file mode 100644 index 00000000..57183bc9 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/MusicPlayerItemProvider.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.MusicPlayer; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.MusicPlayer} object. + * + * + * @generated + */ +public class MusicPlayerItemProvider extends ArduinoAnalogModuleItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public MusicPlayerItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns MusicPlayer.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/MusicPlayer")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((MusicPlayer)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_MusicPlayer_type") : + getString("_UI_MusicPlayer_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/NamedElementItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/NamedElementItemProvider.java new file mode 100644 index 00000000..60108ae6 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/NamedElementItemProvider.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.NamedElement; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.NamedElement} object. + * + * + * @generated + */ +public class NamedElementItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public NamedElementItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addNamePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Name feature. + * + * + * @generated + */ + protected void addNamePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_NamedElement_name_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_NamedElement_name_feature", "_UI_NamedElement_type"), + ArduinoPackage.Literals.NAMED_ELEMENT__NAME, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((NamedElement)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_NamedElement_type") : + getString("_UI_NamedElement_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(NamedElement.class)) { + case ArduinoPackage.NAMED_ELEMENT__NAME: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ArduinoEditPlugin.INSTANCE; + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/PinItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/PinItemProvider.java new file mode 100644 index 00000000..8c1a5289 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/PinItemProvider.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.Pin; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.util.ResourceLocator; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; +import org.eclipse.emf.edit.provider.IItemLabelProvider; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.IItemPropertySource; +import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; +import org.eclipse.emf.edit.provider.ITreeItemContentProvider; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemProviderAdapter; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.Pin} object. + * + * + * @generated + */ +public class PinItemProvider + extends ItemProviderAdapter + implements + IEditingDomainItemProvider, + IStructuredItemContentProvider, + ITreeItemContentProvider, + IItemLabelProvider, + IItemPropertySource { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public PinItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addIdPropertyDescriptor(object); + addLevelPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Id feature. + * + * + * @generated + */ + protected void addIdPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Pin_id_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Pin_id_feature", "_UI_Pin_type"), + ArduinoPackage.Literals.PIN__ID, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This adds a property descriptor for the Level feature. + * + * + * @generated + */ + protected void addLevelPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Pin_level_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Pin_level_feature", "_UI_Pin_type"), + ArduinoPackage.Literals.PIN__LEVEL, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + Pin pin = (Pin)object; + return getString("_UI_Pin_type") + " " + pin.getId(); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(Pin.class)) { + case ArduinoPackage.PIN__ID: + case ArduinoPackage.PIN__LEVEL: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + + /** + * Return the resource locator for this item provider's resources. + * + * + * @generated + */ + @Override + public ResourceLocator getResourceLocator() { + return ArduinoEditPlugin.INSTANCE; + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ProjectItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ProjectItemProvider.java new file mode 100644 index 00000000..9b22923c --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ProjectItemProvider.java @@ -0,0 +1,167 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoFactory; +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.Project; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.Project} object. + * + * + * @generated + */ +public class ProjectItemProvider extends NamedElementItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ProjectItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ArduinoPackage.Literals.PROJECT__BOARDS); + childrenFeatures.add(ArduinoPackage.Literals.PROJECT__SKETCH); + childrenFeatures.add(ArduinoPackage.Literals.PROJECT__LINKS); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns Project.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Project")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((Project)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_Project_type") : + getString("_UI_Project_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(Project.class)) { + case ArduinoPackage.PROJECT__BOARDS: + case ArduinoPackage.PROJECT__SKETCH: + case ArduinoPackage.PROJECT__LINKS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.PROJECT__BOARDS, + ArduinoFactory.eINSTANCE.createArduinoBoard())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.PROJECT__SKETCH, + ArduinoFactory.eINSTANCE.createSketch())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.PROJECT__LINKS, + ArduinoFactory.eINSTANCE.createLink())); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/PushButtonItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/PushButtonItemProvider.java new file mode 100644 index 00000000..f9873c6e --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/PushButtonItemProvider.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.PushButton; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.PushButton} object. + * + * + * @generated + */ +public class PushButtonItemProvider extends ArduinoDigitalModuleItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public PushButtonItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns PushButton.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/PushButton")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((PushButton)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_PushButton_type") : + getString("_UI_PushButton_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/RepeatItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/RepeatItemProvider.java new file mode 100644 index 00000000..72084d34 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/RepeatItemProvider.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.Repeat; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.Repeat} object. + * + * + * @generated + */ +public class RepeatItemProvider extends ControlItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public RepeatItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addIterationPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Iteration feature. + * + * + * @generated + */ + protected void addIterationPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Repeat_iteration_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Repeat_iteration_feature", "_UI_Repeat_type"), + ArduinoPackage.Literals.REPEAT__ITERATION, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns Repeat.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Repeat")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((Repeat)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_Repeat_type") : + getString("_UI_Repeat_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(Repeat.class)) { + case ArduinoPackage.REPEAT__ITERATION: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/RotationSensorItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/RotationSensorItemProvider.java new file mode 100644 index 00000000..990bff2b --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/RotationSensorItemProvider.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.RotationSensor; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.RotationSensor} object. + * + * + * @generated + */ +public class RotationSensorItemProvider extends ArduinoAnalogModuleItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public RotationSensorItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns RotationSensor.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/RotationSensor")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((RotationSensor)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_RotationSensor_type") : + getString("_UI_RotationSensor_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/SketchItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/SketchItemProvider.java new file mode 100644 index 00000000..49be079e --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/SketchItemProvider.java @@ -0,0 +1,160 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoFactory; +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.Sketch; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.Sketch} object. + * + * + * @generated + */ +public class SketchItemProvider extends NamedElementItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public SketchItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ArduinoPackage.Literals.SKETCH__THREADS); + childrenFeatures.add(ArduinoPackage.Literals.SKETCH__CHANNELS); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns Sketch.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Sketch")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((Sketch)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_Sketch_type") : + getString("_UI_Sketch_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(Sketch.class)) { + case ArduinoPackage.SKETCH__THREADS: + case ArduinoPackage.SKETCH__CHANNELS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.SKETCH__THREADS, + ArduinoFactory.eINSTANCE.createThread())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.SKETCH__CHANNELS, + ArduinoFactory.eINSTANCE.createChannel())); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/SoundSensorItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/SoundSensorItemProvider.java new file mode 100644 index 00000000..7b930db9 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/SoundSensorItemProvider.java @@ -0,0 +1,107 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.SoundSensor; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.SoundSensor} object. + * + * + * @generated + */ +public class SoundSensorItemProvider extends ArduinoAnalogModuleItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public SoundSensorItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns SoundSensor.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/SoundSensor")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((SoundSensor)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_SoundSensor_type") : + getString("_UI_SoundSensor_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/SynchronizationBlockItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/SynchronizationBlockItemProvider.java new file mode 100644 index 00000000..e3c08b1c --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/SynchronizationBlockItemProvider.java @@ -0,0 +1,109 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.SynchronizationBlock; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.SynchronizationBlock} object. + * + * + * @generated + */ +public class SynchronizationBlockItemProvider extends ThreadInstructionBlockItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public SynchronizationBlockItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns SynchronizationBlock.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/SynchronizationBlock")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((SynchronizationBlock)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_SynchronizationBlock_type") : + getString("_UI_SynchronizationBlock_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ThreadInstructionBlockItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ThreadInstructionBlockItemProvider.java new file mode 100644 index 00000000..61c8781d --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ThreadInstructionBlockItemProvider.java @@ -0,0 +1,144 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.ThreadInstructionBlock; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.ThreadInstructionBlock} object. + * + * + * @generated + */ +public class ThreadInstructionBlockItemProvider extends NamedElementItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ThreadInstructionBlockItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addThreadPropertyDescriptor(object); + addNextPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Thread feature. + * + * + * @generated + */ + protected void addThreadPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ThreadInstructionBlock_thread_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ThreadInstructionBlock_thread_feature", "_UI_ThreadInstructionBlock_type"), + ArduinoPackage.Literals.THREAD_INSTRUCTION_BLOCK__THREAD, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Next feature. + * + * + * @generated + */ + protected void addNextPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_ThreadInstructionBlock_next_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_ThreadInstructionBlock_next_feature", "_UI_ThreadInstructionBlock_type"), + ArduinoPackage.Literals.THREAD_INSTRUCTION_BLOCK__NEXT, + true, + false, + true, + null, + null, + null)); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((ThreadInstructionBlock)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_ThreadInstructionBlock_type") : + getString("_UI_ThreadInstructionBlock_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ThreadItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ThreadItemProvider.java new file mode 100644 index 00000000..10122521 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/ThreadItemProvider.java @@ -0,0 +1,277 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoFactory; +import fr.obeo.dsl.arduino.ArduinoPackage; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.Thread} object. + * + * + * @generated + */ +public class ThreadItemProvider extends NamedElementItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public ThreadItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addChannelsPropertyDescriptor(object); + addCurrentInstructionPropertyDescriptor(object); + addFirstPropertyDescriptor(object); + addLastPropertyDescriptor(object); + addNbCyclePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Channels feature. + * + * + * @generated + */ + protected void addChannelsPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Thread_channels_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Thread_channels_feature", "_UI_Thread_type"), + ArduinoPackage.Literals.THREAD__CHANNELS, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Current Instruction feature. + * + * + * @generated + */ + protected void addCurrentInstructionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Thread_currentInstruction_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Thread_currentInstruction_feature", "_UI_Thread_type"), + ArduinoPackage.Literals.THREAD__CURRENT_INSTRUCTION, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the First feature. + * + * + * @generated + */ + protected void addFirstPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Thread_first_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Thread_first_feature", "_UI_Thread_type"), + ArduinoPackage.Literals.THREAD__FIRST, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Last feature. + * + * + * @generated + */ + protected void addLastPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Thread_last_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Thread_last_feature", "_UI_Thread_type"), + ArduinoPackage.Literals.THREAD__LAST, + true, + false, + true, + null, + null, + null)); + } + + /** + * This adds a property descriptor for the Nb Cycle feature. + * + * + * @generated + */ + protected void addNbCyclePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_Thread_nbCycle_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_Thread_nbCycle_feature", "_UI_Thread_type"), + ArduinoPackage.Literals.THREAD__NB_CYCLE, + true, + false, + false, + ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE, + null, + null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ArduinoPackage.Literals.THREAD__BLOCKS); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns Thread.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Thread")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((fr.obeo.dsl.arduino.Thread)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_Thread_type") : + getString("_UI_Thread_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(fr.obeo.dsl.arduino.Thread.class)) { + case ArduinoPackage.THREAD__NB_CYCLE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + case ArduinoPackage.THREAD__BLOCKS: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.THREAD__BLOCKS, + ArduinoFactory.eINSTANCE.createSynchronizationBlock())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.THREAD__BLOCKS, + ArduinoFactory.eINSTANCE.createInstructionBlock())); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/UnaryBooleanExpressionItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/UnaryBooleanExpressionItemProvider.java new file mode 100644 index 00000000..2cd2f65e --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/UnaryBooleanExpressionItemProvider.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.UnaryBooleanExpression; +import fr.obeo.dsl.arduino.UnaryBooleanOperatorKind; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.UnaryBooleanExpression} object. + * + * + * @generated + */ +public class UnaryBooleanExpressionItemProvider extends UnaryExpressionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public UnaryBooleanExpressionItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addOperatorPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Operator feature. + * + * + * @generated + */ + protected void addOperatorPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_UnaryBooleanExpression_operator_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_UnaryBooleanExpression_operator_feature", "_UI_UnaryBooleanExpression_type"), + ArduinoPackage.Literals.UNARY_BOOLEAN_EXPRESSION__OPERATOR, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns UnaryBooleanExpression.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/UnaryBooleanExpression")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + UnaryBooleanOperatorKind labelValue = ((UnaryBooleanExpression)object).getOperator(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? + getString("_UI_UnaryBooleanExpression_type") : + getString("_UI_UnaryBooleanExpression_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(UnaryBooleanExpression.class)) { + case ArduinoPackage.UNARY_BOOLEAN_EXPRESSION__OPERATOR: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/UnaryExpressionItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/UnaryExpressionItemProvider.java new file mode 100644 index 00000000..d1c3bd9e --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/UnaryExpressionItemProvider.java @@ -0,0 +1,189 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoFactory; +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.UnaryExpression; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.UnaryExpression} object. + * + * + * @generated + */ +public class UnaryExpressionItemProvider extends ExpressionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public UnaryExpressionItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ArduinoPackage.Literals.UNARY_EXPRESSION__OPERAND); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_UnaryExpression_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(UnaryExpression.class)) { + case ArduinoPackage.UNARY_EXPRESSION__OPERAND: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.UNARY_EXPRESSION__OPERAND, + ArduinoFactory.eINSTANCE.createBinaryIntegerExpression())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.UNARY_EXPRESSION__OPERAND, + ArduinoFactory.eINSTANCE.createBinaryBooleanExpression())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.UNARY_EXPRESSION__OPERAND, + ArduinoFactory.eINSTANCE.createIntegerConstant())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.UNARY_EXPRESSION__OPERAND, + ArduinoFactory.eINSTANCE.createBooleanConstant())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.UNARY_EXPRESSION__OPERAND, + ArduinoFactory.eINSTANCE.createIntegerVariable())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.UNARY_EXPRESSION__OPERAND, + ArduinoFactory.eINSTANCE.createBooleanVariable())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.UNARY_EXPRESSION__OPERAND, + ArduinoFactory.eINSTANCE.createBooleanModuleGet())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.UNARY_EXPRESSION__OPERAND, + ArduinoFactory.eINSTANCE.createIntegerModuleGet())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.UNARY_EXPRESSION__OPERAND, + ArduinoFactory.eINSTANCE.createUnaryBooleanExpression())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.UNARY_EXPRESSION__OPERAND, + ArduinoFactory.eINSTANCE.createUnaryIntegerExpression())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.UNARY_EXPRESSION__OPERAND, + ArduinoFactory.eINSTANCE.createVariableRef())); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/UnaryIntegerExpressionItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/UnaryIntegerExpressionItemProvider.java new file mode 100644 index 00000000..6c1399bb --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/UnaryIntegerExpressionItemProvider.java @@ -0,0 +1,142 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.UnaryIntegerExpression; +import fr.obeo.dsl.arduino.UnaryIntegerOperatorKind; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.UnaryIntegerExpression} object. + * + * + * @generated + */ +public class UnaryIntegerExpressionItemProvider extends UnaryExpressionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public UnaryIntegerExpressionItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addOperatorPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Operator feature. + * + * + * @generated + */ + protected void addOperatorPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_UnaryIntegerExpression_operator_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_UnaryIntegerExpression_operator_feature", "_UI_UnaryIntegerExpression_type"), + ArduinoPackage.Literals.UNARY_INTEGER_EXPRESSION__OPERATOR, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns UnaryIntegerExpression.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/UnaryIntegerExpression")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + UnaryIntegerOperatorKind labelValue = ((UnaryIntegerExpression)object).getOperator(); + String label = labelValue == null ? null : labelValue.toString(); + return label == null || label.length() == 0 ? + getString("_UI_UnaryIntegerExpression_type") : + getString("_UI_UnaryIntegerExpression_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(UnaryIntegerExpression.class)) { + case ArduinoPackage.UNARY_INTEGER_EXPRESSION__OPERATOR: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/UtilitiesItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/UtilitiesItemProvider.java new file mode 100644 index 00000000..109a4440 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/UtilitiesItemProvider.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.Utilities; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.Utilities} object. + * + * + * @generated + */ +public class UtilitiesItemProvider extends InstructionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public UtilitiesItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((Utilities)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_Utilities_type") : + getString("_UI_Utilities_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/VariableAssignmentItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/VariableAssignmentItemProvider.java new file mode 100644 index 00000000..00ad31f6 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/VariableAssignmentItemProvider.java @@ -0,0 +1,227 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoFactory; +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.VariableAssignment; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.VariableAssignment} object. + * + * + * @generated + */ +public class VariableAssignmentItemProvider extends InstructionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public VariableAssignmentItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addVariablePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Variable feature. + * + * + * @generated + */ + protected void addVariablePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_VariableAssignment_variable_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_VariableAssignment_variable_feature", "_UI_VariableAssignment_type"), + ArduinoPackage.Literals.VARIABLE_ASSIGNMENT__VARIABLE, + true, + false, + true, + null, + null, + null)); + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ArduinoPackage.Literals.ASSIGNMENT__OPERAND); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns VariableAssignment.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/VariableAssignment")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((VariableAssignment)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_VariableAssignment_type") : + getString("_UI_VariableAssignment_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(VariableAssignment.class)) { + case ArduinoPackage.VARIABLE_ASSIGNMENT__OPERAND: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createBinaryIntegerExpression())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createBinaryBooleanExpression())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createIntegerConstant())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createBooleanConstant())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createIntegerVariable())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createBooleanVariable())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createBooleanModuleGet())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createIntegerModuleGet())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createUnaryBooleanExpression())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createUnaryIntegerExpression())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.ASSIGNMENT__OPERAND, + ArduinoFactory.eINSTANCE.createVariableRef())); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/VariableDeclarationItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/VariableDeclarationItemProvider.java new file mode 100644 index 00000000..7451d220 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/VariableDeclarationItemProvider.java @@ -0,0 +1,158 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoFactory; +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.VariableDeclaration; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EStructuralFeature; + +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.VariableDeclaration} object. + * + * + * @generated + */ +public class VariableDeclarationItemProvider extends InstructionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public VariableDeclarationItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + } + return itemPropertyDescriptors; + } + + /** + * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an + * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or + * {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}. + * + * + * @generated + */ + @Override + public Collection getChildrenFeatures(Object object) { + if (childrenFeatures == null) { + super.getChildrenFeatures(object); + childrenFeatures.add(ArduinoPackage.Literals.VARIABLE_DECLARATION__VARIABLE); + } + return childrenFeatures; + } + + /** + * + * + * @generated + */ + @Override + protected EStructuralFeature getChildFeature(Object object, Object child) { + // Check the type of the specified child object and return the proper feature to use for + // adding (see {@link AddCommand}) it as a child. + + return super.getChildFeature(object, child); + } + + /** + * This returns VariableDeclaration.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/VariableDeclaration")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((VariableDeclaration)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_VariableDeclaration_type") : + getString("_UI_VariableDeclaration_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(VariableDeclaration.class)) { + case ArduinoPackage.VARIABLE_DECLARATION__VARIABLE: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.VARIABLE_DECLARATION__VARIABLE, + ArduinoFactory.eINSTANCE.createIntegerVariable())); + + newChildDescriptors.add + (createChildParameter + (ArduinoPackage.Literals.VARIABLE_DECLARATION__VARIABLE, + ArduinoFactory.eINSTANCE.createBooleanVariable())); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/VariableItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/VariableItemProvider.java new file mode 100644 index 00000000..e44174be --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/VariableItemProvider.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.Variable; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; +import org.eclipse.emf.edit.provider.ViewerNotification; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.Variable} object. + * + * + * @generated + */ +public class VariableItemProvider extends ExpressionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public VariableItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addNamePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Name feature. + * + * + * @generated + */ + protected void addNamePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_NamedElement_name_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_NamedElement_name_feature", "_UI_NamedElement_type"), + ArduinoPackage.Literals.NAMED_ELEMENT__NAME, + true, + false, + false, + ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, + null, + null)); + } + + /** + * This returns Variable.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/Variable")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((Variable)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_Variable_type") : + getString("_UI_Variable_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + + switch (notification.getFeatureID(Variable.class)) { + case ArduinoPackage.VARIABLE__NAME: + fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); + return; + } + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/VariableRefItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/VariableRefItemProvider.java new file mode 100644 index 00000000..7a297469 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/VariableRefItemProvider.java @@ -0,0 +1,128 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoPackage; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.VariableRef} object. + * + * + * @generated + */ +public class VariableRefItemProvider extends ExpressionItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public VariableRefItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addVariablePropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Variable feature. + * + * + * @generated + */ + protected void addVariablePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_VariableRef_variable_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_VariableRef_variable_feature", "_UI_VariableRef_type"), + ArduinoPackage.Literals.VARIABLE_REF__VARIABLE, + true, + false, + true, + null, + null, + null)); + } + + /** + * This returns VariableRef.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/VariableRef")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + return getString("_UI_VariableRef_type"); + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/WhileItemProvider.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/WhileItemProvider.java new file mode 100644 index 00000000..d9a61258 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.edit/src-gen/fr/obeo/dsl/arduino/provider/WhileItemProvider.java @@ -0,0 +1,132 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.provider; + + +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.While; + +import java.util.Collection; +import java.util.List; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; +import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; + +/** + * This is the item provider adapter for a {@link fr.obeo.dsl.arduino.While} object. + * + * + * @generated + */ +public class WhileItemProvider extends ControlItemProvider { + /** + * This constructs an instance from a factory and a notifier. + * + * + * @generated + */ + public WhileItemProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * This returns the property descriptors for the adapted class. + * + * + * @generated + */ + @Override + public List getPropertyDescriptors(Object object) { + if (itemPropertyDescriptors == null) { + super.getPropertyDescriptors(object); + + addConditionPropertyDescriptor(object); + } + return itemPropertyDescriptors; + } + + /** + * This adds a property descriptor for the Condition feature. + * + * + * @generated + */ + protected void addConditionPropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_While_condition_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_While_condition_feature", "_UI_While_type"), + ArduinoPackage.Literals.WHILE__CONDITION, + true, + false, + true, + null, + null, + null)); + } + + /** + * This returns While.gif. + * + * + * @generated + */ + @Override + public Object getImage(Object object) { + return overlayImage(object, getResourceLocator().getImage("full/obj16/While")); + } + + /** + * This returns the label text for the adapted class. + * + * + * @generated + */ + @Override + public String getText(Object object) { + String label = ((While)object).getName(); + return label == null || label.length() == 0 ? + getString("_UI_While_type") : + getString("_UI_While_type") + " " + label; + } + + + /** + * This handles model notifications by calling {@link #updateChildren} to update any cached + * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. + * + * + * @generated + */ + @Override + public void notifyChanged(Notification notification) { + updateChildren(notification); + super.notifyChanged(notification); + } + + /** + * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children + * that can be created under this object. + * + * + * @generated + */ + @Override + protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) { + super.collectNewChildDescriptors(newChildDescriptors, object); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/.classpath b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/.classpath new file mode 100644 index 00000000..858bac42 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/.project b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/.project new file mode 100644 index 00000000..c310c345 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/.project @@ -0,0 +1,28 @@ + + + fr.obeo.dsl.arduino.editor + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/META-INF/MANIFEST.MF b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/META-INF/MANIFEST.MF new file mode 100644 index 00000000..23d91edd --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/META-INF/MANIFEST.MF @@ -0,0 +1,18 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: fr.obeo.dsl.arduino.editor;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-ClassPath: . +Bundle-Activator: fr.obeo.dsl.arduino.presentation.ArduinoEditorPlugin$Implementation +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Export-Package: fr.obeo.dsl.arduino.presentation +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.core.resources;visibility:=reexport, + fr.obeo.dsl.arduino.edit;visibility:=reexport, + org.eclipse.emf.ecore.xmi;visibility:=reexport, + org.eclipse.emf.edit.ui;visibility:=reexport, + org.eclipse.ui.ide;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/build.properties b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/build.properties new file mode 100644 index 00000000..4a0dca34 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/build.properties @@ -0,0 +1,17 @@ +# Copyright (c) 2013 Obeo. +# 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: +# Obeo - initial API and implementation + +bin.includes = .,\ + icons/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src-gen/ +output.. = bin diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/icons/full/obj16/ArduinoModelFile.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/icons/full/obj16/ArduinoModelFile.gif new file mode 100644 index 00000000..e5c6e175 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/icons/full/obj16/ArduinoModelFile.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/icons/full/wizban/NewArduino.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/icons/full/wizban/NewArduino.gif new file mode 100644 index 00000000..caab2147 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/icons/full/wizban/NewArduino.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/plugin.properties b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/plugin.properties new file mode 100644 index 00000000..95ef0c81 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/plugin.properties @@ -0,0 +1,60 @@ +# Copyright (c) 2013 Obeo. +# 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: +# Obeo - initial API and implementation + +pluginName = Arduino Editor +providerName = www.example.org + +_UI_ArduinoEditor_menu = &Arduino Editor + +_UI_CreateChild_menu_item = &New Child +_UI_CreateSibling_menu_item = N&ew Sibling + +_UI_ShowPropertiesView_menu_item = Show &Properties View +_UI_RefreshViewer_menu_item = &Refresh + +_UI_SelectionPage_label = Selection +_UI_ParentPage_label = Parent +_UI_ListPage_label = List +_UI_TreePage_label = Tree +_UI_TablePage_label = Table +_UI_TreeWithColumnsPage_label = Tree with Columns +_UI_ObjectColumn_label = Object +_UI_SelfColumn_label = Self + +_UI_NoObjectSelected = Selected Nothing +_UI_SingleObjectSelected = Selected Object: {0} +_UI_MultiObjectSelected = Selected {0} Objects + +_UI_OpenEditorError_label = Open Editor + +_UI_Wizard_category = Example EMF Model Creation Wizards + +_UI_CreateModelError_message = Problems encountered in file "{0}" + +_UI_ArduinoModelWizard_label = Arduino Model +_UI_ArduinoModelWizard_description = Create a new Arduino model + +_UI_ArduinoEditor_label = Arduino Model Editor + +_UI_ArduinoEditorFilenameDefaultBase = My +_UI_ArduinoEditorFilenameExtensions = arduino + +_UI_Wizard_label = New + +_WARN_FilenameExtension = The file name must end in ''.{0}'' +_WARN_FilenameExtensions = The file name must have one of the following extensions: {0} + +_UI_ModelObject = &Model Object +_UI_XMLEncoding = &XML Encoding +_UI_XMLEncodingChoices = UTF-8 ASCII UTF-16 UTF-16BE UTF-16LE ISO-8859-1 +_UI_Wizard_initial_object_description = Select a model object to create + +_UI_FileConflict_label = File Conflict +_WARN_FileConflict = There are unsaved changes that conflict with changes made outside the editor. Do you wish to discard this editor's changes? + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/plugin.xml b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/plugin.xml new file mode 100644 index 00000000..9ada8ccb --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/plugin.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + %_UI_ArduinoModelWizard_description + + + + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/src-gen/fr/obeo/dsl/arduino/presentation/ArduinoActionBarContributor.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/src-gen/fr/obeo/dsl/arduino/presentation/ArduinoActionBarContributor.java new file mode 100644 index 00000000..8e3372fd --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/src-gen/fr/obeo/dsl/arduino/presentation/ArduinoActionBarContributor.java @@ -0,0 +1,431 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.presentation; + +import java.util.ArrayList; +import java.util.Collection; + +import org.eclipse.emf.common.ui.viewer.IViewerProvider; + +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.edit.domain.IEditingDomainProvider; + +import org.eclipse.emf.edit.ui.action.ControlAction; +import org.eclipse.emf.edit.ui.action.CreateChildAction; +import org.eclipse.emf.edit.ui.action.CreateSiblingAction; +import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor; +import org.eclipse.emf.edit.ui.action.LoadResourceAction; +import org.eclipse.emf.edit.ui.action.ValidateAction; + +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.ActionContributionItem; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.action.IContributionItem; +import org.eclipse.jface.action.IContributionManager; +import org.eclipse.jface.action.IMenuListener; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.jface.action.Separator; +import org.eclipse.jface.action.SubContributionItem; + +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.ISelectionProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.Viewer; + +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.PartInitException; + +/** + * This is the action bar contributor for the Arduino model editor. + * + * + * @generated + */ +public class ArduinoActionBarContributor + extends EditingDomainActionBarContributor + implements ISelectionChangedListener { + /** + * This keeps track of the active editor. + * + * + * @generated + */ + protected IEditorPart activeEditorPart; + + /** + * This keeps track of the current selection provider. + * + * + * @generated + */ + protected ISelectionProvider selectionProvider; + + /** + * This action opens the Properties view. + * + * + * @generated + */ + protected IAction showPropertiesViewAction = + new Action(ArduinoEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) { + @Override + public void run() { + try { + getPage().showView("org.eclipse.ui.views.PropertySheet"); + } + catch (PartInitException exception) { + ArduinoEditorPlugin.INSTANCE.log(exception); + } + } + }; + + /** + * This action refreshes the viewer of the current editor if the editor + * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}. + * + * + * @generated + */ + protected IAction refreshViewerAction = + new Action(ArduinoEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) { + @Override + public boolean isEnabled() { + return activeEditorPart instanceof IViewerProvider; + } + + @Override + public void run() { + if (activeEditorPart instanceof IViewerProvider) { + Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer(); + if (viewer != null) { + viewer.refresh(); + } + } + } + }; + + /** + * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to each descriptor + * generated for the current selection by the item provider. + * + * + * @generated + */ + protected Collection createChildActions; + + /** + * This is the menu manager into which menu contribution items should be added for CreateChild actions. + * + * + * @generated + */ + protected IMenuManager createChildMenuManager; + + /** + * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding to each descriptor + * generated for the current selection by the item provider. + * + * + * @generated + */ + protected Collection createSiblingActions; + + /** + * This is the menu manager into which menu contribution items should be added for CreateSibling actions. + * + * + * @generated + */ + protected IMenuManager createSiblingMenuManager; + + /** + * This creates an instance of the contributor. + * + * + * @generated + */ + public ArduinoActionBarContributor() { + super(ADDITIONS_LAST_STYLE); + loadResourceAction = new LoadResourceAction(); + validateAction = new ValidateAction(); + controlAction = new ControlAction(); + } + + /** + * This adds Separators for editor additions to the tool bar. + * + * + * @generated + */ + @Override + public void contributeToToolBar(IToolBarManager toolBarManager) { + toolBarManager.add(new Separator("arduino-settings")); + toolBarManager.add(new Separator("arduino-additions")); + } + + /** + * This adds to the menu bar a menu and some separators for editor additions, + * as well as the sub-menus for object creation items. + * + * + * @generated + */ + @Override + public void contributeToMenu(IMenuManager menuManager) { + super.contributeToMenu(menuManager); + + IMenuManager submenuManager = new MenuManager(ArduinoEditorPlugin.INSTANCE.getString("_UI_ArduinoEditor_menu"), "fr.obeo.dsl.arduinoMenuID"); + menuManager.insertAfter("additions", submenuManager); + submenuManager.add(new Separator("settings")); + submenuManager.add(new Separator("actions")); + submenuManager.add(new Separator("additions")); + submenuManager.add(new Separator("additions-end")); + + // Prepare for CreateChild item addition or removal. + // + createChildMenuManager = new MenuManager(ArduinoEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); + submenuManager.insertBefore("additions", createChildMenuManager); + + // Prepare for CreateSibling item addition or removal. + // + createSiblingMenuManager = new MenuManager(ArduinoEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); + submenuManager.insertBefore("additions", createSiblingMenuManager); + + // Force an update because Eclipse hides empty menus now. + // + submenuManager.addMenuListener + (new IMenuListener() { + public void menuAboutToShow(IMenuManager menuManager) { + menuManager.updateAll(true); + } + }); + + addGlobalActions(submenuManager); + } + + /** + * When the active editor changes, this remembers the change and registers with it as a selection provider. + * + * + * @generated + */ + @Override + public void setActiveEditor(IEditorPart part) { + super.setActiveEditor(part); + activeEditorPart = part; + + // Switch to the new selection provider. + // + if (selectionProvider != null) { + selectionProvider.removeSelectionChangedListener(this); + } + if (part == null) { + selectionProvider = null; + } + else { + selectionProvider = part.getSite().getSelectionProvider(); + selectionProvider.addSelectionChangedListener(this); + + // Fake a selection changed event to update the menus. + // + if (selectionProvider.getSelection() != null) { + selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection())); + } + } + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener}, + * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings + * that can be added to the selected object and updating the menus accordingly. + * + * + * @generated + */ + public void selectionChanged(SelectionChangedEvent event) { + // Remove any menu items for old selection. + // + if (createChildMenuManager != null) { + depopulateManager(createChildMenuManager, createChildActions); + } + if (createSiblingMenuManager != null) { + depopulateManager(createSiblingMenuManager, createSiblingActions); + } + + // Query the new selection for appropriate new child/sibling descriptors + // + Collection newChildDescriptors = null; + Collection newSiblingDescriptors = null; + + ISelection selection = event.getSelection(); + if (selection instanceof IStructuredSelection && ((IStructuredSelection)selection).size() == 1) { + Object object = ((IStructuredSelection)selection).getFirstElement(); + + EditingDomain domain = ((IEditingDomainProvider)activeEditorPart).getEditingDomain(); + + newChildDescriptors = domain.getNewChildDescriptors(object, null); + newSiblingDescriptors = domain.getNewChildDescriptors(null, object); + } + + // Generate actions for selection; populate and redraw the menus. + // + createChildActions = generateCreateChildActions(newChildDescriptors, selection); + createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection); + + if (createChildMenuManager != null) { + populateManager(createChildMenuManager, createChildActions, null); + createChildMenuManager.update(true); + } + if (createSiblingMenuManager != null) { + populateManager(createSiblingMenuManager, createSiblingActions, null); + createSiblingMenuManager.update(true); + } + } + + /** + * This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for each object in descriptors, + * and returns the collection of these actions. + * + * + * @generated + */ + protected Collection generateCreateChildActions(Collection descriptors, ISelection selection) { + Collection actions = new ArrayList(); + if (descriptors != null) { + for (Object descriptor : descriptors) { + actions.add(new CreateChildAction(activeEditorPart, selection, descriptor)); + } + } + return actions; + } + + /** + * This generates a {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each object in descriptors, + * and returns the collection of these actions. + * + * + * @generated + */ + protected Collection generateCreateSiblingActions(Collection descriptors, ISelection selection) { + Collection actions = new ArrayList(); + if (descriptors != null) { + for (Object descriptor : descriptors) { + actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor)); + } + } + return actions; + } + + /** + * This populates the specified manager with {@link org.eclipse.jface.action.ActionContributionItem}s + * based on the {@link org.eclipse.jface.action.IAction}s contained in the actions collection, + * by inserting them before the specified contribution item contributionID. + * If contributionID is null, they are simply added. + * + * + * @generated + */ + protected void populateManager(IContributionManager manager, Collection actions, String contributionID) { + if (actions != null) { + for (IAction action : actions) { + if (contributionID != null) { + manager.insertBefore(contributionID, action); + } + else { + manager.add(action); + } + } + } + } + + /** + * This removes from the specified manager all {@link org.eclipse.jface.action.ActionContributionItem}s + * based on the {@link org.eclipse.jface.action.IAction}s contained in the actions collection. + * + * + * @generated + */ + protected void depopulateManager(IContributionManager manager, Collection actions) { + if (actions != null) { + IContributionItem[] items = manager.getItems(); + for (int i = 0; i < items.length; i++) { + // Look into SubContributionItems + // + IContributionItem contributionItem = items[i]; + while (contributionItem instanceof SubContributionItem) { + contributionItem = ((SubContributionItem)contributionItem).getInnerItem(); + } + + // Delete the ActionContributionItems with matching action. + // + if (contributionItem instanceof ActionContributionItem) { + IAction action = ((ActionContributionItem)contributionItem).getAction(); + if (actions.contains(action)) { + manager.remove(contributionItem); + } + } + } + } + } + + /** + * This populates the pop-up menu before it appears. + * + * + * @generated + */ + @Override + public void menuAboutToShow(IMenuManager menuManager) { + super.menuAboutToShow(menuManager); + MenuManager submenuManager = null; + + submenuManager = new MenuManager(ArduinoEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item")); + populateManager(submenuManager, createChildActions, null); + menuManager.insertBefore("edit", submenuManager); + + submenuManager = new MenuManager(ArduinoEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item")); + populateManager(submenuManager, createSiblingActions, null); + menuManager.insertBefore("edit", submenuManager); + } + + /** + * This inserts global actions before the "additions-end" separator. + * + * + * @generated + */ + @Override + protected void addGlobalActions(IMenuManager menuManager) { + menuManager.insertAfter("additions-end", new Separator("ui-actions")); + menuManager.insertAfter("ui-actions", showPropertiesViewAction); + + refreshViewerAction.setEnabled(refreshViewerAction.isEnabled()); + menuManager.insertAfter("ui-actions", refreshViewerAction); + + super.addGlobalActions(menuManager); + } + + /** + * This ensures that a delete action will clean up all references to deleted objects. + * + * + * @generated + */ + @Override + protected boolean removeAllReferencesOnDelete() { + return true; + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/src-gen/fr/obeo/dsl/arduino/presentation/ArduinoEditor.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/src-gen/fr/obeo/dsl/arduino/presentation/ArduinoEditor.java new file mode 100644 index 00000000..b0e1cc82 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/src-gen/fr/obeo/dsl/arduino/presentation/ArduinoEditor.java @@ -0,0 +1,1826 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.presentation; + + +import java.io.IOException; +import java.io.InputStream; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.EventObject; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IMarker; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceChangeEvent; +import org.eclipse.core.resources.IResourceChangeListener; +import org.eclipse.core.resources.IResourceDelta; +import org.eclipse.core.resources.IResourceDeltaVisitor; +import org.eclipse.core.resources.ResourcesPlugin; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; + +import org.eclipse.jface.action.IMenuListener; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.IStatusLineManager; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.jface.action.Separator; + +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.dialogs.ProgressMonitorDialog; + +import org.eclipse.jface.util.LocalSelectionTransfer; + +import org.eclipse.jface.viewers.ColumnWeightData; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.ISelectionProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.ListViewer; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.viewers.StructuredViewer; +import org.eclipse.jface.viewers.TableLayout; +import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.jface.viewers.Viewer; + +import org.eclipse.swt.SWT; + +import org.eclipse.swt.custom.CTabFolder; + +import org.eclipse.swt.dnd.DND; +import org.eclipse.swt.dnd.FileTransfer; +import org.eclipse.swt.dnd.Transfer; + +import org.eclipse.swt.events.ControlAdapter; +import org.eclipse.swt.events.ControlEvent; + +import org.eclipse.swt.graphics.Point; + +import org.eclipse.swt.layout.FillLayout; + +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Menu; +import org.eclipse.swt.widgets.Table; +import org.eclipse.swt.widgets.TableColumn; +import org.eclipse.swt.widgets.Tree; +import org.eclipse.swt.widgets.TreeColumn; + +import org.eclipse.ui.IActionBars; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IEditorSite; +import org.eclipse.ui.IPartListener; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.PartInitException; + +import org.eclipse.ui.dialogs.SaveAsDialog; + +import org.eclipse.ui.ide.IGotoMarker; + +import org.eclipse.ui.part.FileEditorInput; +import org.eclipse.ui.part.MultiPageEditorPart; + +import org.eclipse.ui.views.contentoutline.ContentOutline; +import org.eclipse.ui.views.contentoutline.ContentOutlinePage; +import org.eclipse.ui.views.contentoutline.IContentOutlinePage; + +import org.eclipse.ui.views.properties.IPropertySheetPage; +import org.eclipse.ui.views.properties.PropertySheet; +import org.eclipse.ui.views.properties.PropertySheetPage; + +import org.eclipse.emf.common.command.BasicCommandStack; +import org.eclipse.emf.common.command.Command; +import org.eclipse.emf.common.command.CommandStack; +import org.eclipse.emf.common.command.CommandStackListener; + +import org.eclipse.emf.common.notify.AdapterFactory; +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.common.ui.MarkerHelper; +import org.eclipse.emf.common.ui.ViewerPane; + +import org.eclipse.emf.common.ui.editor.ProblemEditorPart; + +import org.eclipse.emf.common.ui.viewer.IViewerProvider; + +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.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; + +import org.eclipse.emf.ecore.util.EContentAdapter; +import org.eclipse.emf.ecore.util.EcoreUtil; + +import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain; +import org.eclipse.emf.edit.domain.EditingDomain; +import org.eclipse.emf.edit.domain.IEditingDomainProvider; + +import org.eclipse.emf.edit.provider.AdapterFactoryItemDelegator; +import org.eclipse.emf.edit.provider.ComposedAdapterFactory; +import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; + +import org.eclipse.emf.edit.provider.resource.ResourceItemProviderAdapterFactory; + +import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor; + +import org.eclipse.emf.edit.ui.celleditor.AdapterFactoryTreeEditor; + +import org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter; +import org.eclipse.emf.edit.ui.dnd.LocalTransfer; +import org.eclipse.emf.edit.ui.dnd.ViewerDragAdapter; + +import org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider; +import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; +import org.eclipse.emf.edit.ui.provider.UnwrappingSelectionProvider; + +import org.eclipse.emf.edit.ui.util.EditUIMarkerHelper; +import org.eclipse.emf.edit.ui.util.EditUIUtil; + +import org.eclipse.emf.edit.ui.view.ExtendedPropertySheetPage; + +import fr.obeo.dsl.arduino.provider.ArduinoItemProviderAdapterFactory; + +import org.eclipse.ui.actions.WorkspaceModifyOperation; + + +/** + * This is an example of a Arduino model editor. + * + * + * @generated + */ +public class ArduinoEditor + extends MultiPageEditorPart + implements IEditingDomainProvider, ISelectionProvider, IMenuListener, IViewerProvider, IGotoMarker { + /** + * This keeps track of the editing domain that is used to track all changes to the model. + * + * + * @generated + */ + protected AdapterFactoryEditingDomain editingDomain; + + /** + * This is the one adapter factory used for providing views of the model. + * + * + * @generated + */ + protected ComposedAdapterFactory adapterFactory; + + /** + * This is the content outline page. + * + * + * @generated + */ + protected IContentOutlinePage contentOutlinePage; + + /** + * This is a kludge... + * + * + * @generated + */ + protected IStatusLineManager contentOutlineStatusLineManager; + + /** + * This is the content outline page's viewer. + * + * + * @generated + */ + protected TreeViewer contentOutlineViewer; + + /** + * This is the property sheet page. + * + * + * @generated + */ + protected List propertySheetPages = new ArrayList(); + + /** + * This is the viewer that shadows the selection in the content outline. + * The parent relation must be correctly defined for this to work. + * + * + * @generated + */ + protected TreeViewer selectionViewer; + + /** + * This inverts the roll of parent and child in the content provider and show parents as a tree. + * + * + * @generated + */ + protected TreeViewer parentViewer; + + /** + * This shows how a tree view works. + * + * + * @generated + */ + protected TreeViewer treeViewer; + + /** + * This shows how a list view works. + * A list viewer doesn't support icons. + * + * + * @generated + */ + protected ListViewer listViewer; + + /** + * This shows how a table view works. + * A table can be used as a list with icons. + * + * + * @generated + */ + protected TableViewer tableViewer; + + /** + * This shows how a tree view with columns works. + * + * + * @generated + */ + protected TreeViewer treeViewerWithColumns; + + /** + * This keeps track of the active viewer pane, in the book. + * + * + * @generated + */ + protected ViewerPane currentViewerPane; + + /** + * This keeps track of the active content viewer, which may be either one of the viewers in the pages or the content outline viewer. + * + * + * @generated + */ + protected Viewer currentViewer; + + /** + * This listens to which ever viewer is active. + * + * + * @generated + */ + protected ISelectionChangedListener selectionChangedListener; + + /** + * This keeps track of all the {@link org.eclipse.jface.viewers.ISelectionChangedListener}s that are listening to this editor. + * + * + * @generated + */ + protected Collection selectionChangedListeners = new ArrayList(); + + /** + * This keeps track of the selection of the editor as a whole. + * + * + * @generated + */ + protected ISelection editorSelection = StructuredSelection.EMPTY; + + /** + * The MarkerHelper is responsible for creating workspace resource markers presented + * in Eclipse's Problems View. + * + * + * @generated + */ + protected MarkerHelper markerHelper = new EditUIMarkerHelper(); + + /** + * This listens for when the outline becomes active + * + * + * @generated + */ + protected IPartListener partListener = + new IPartListener() { + public void partActivated(IWorkbenchPart p) { + if (p instanceof ContentOutline) { + if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) { + getActionBarContributor().setActiveEditor(ArduinoEditor.this); + + setCurrentViewer(contentOutlineViewer); + } + } + else if (p instanceof PropertySheet) { + if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) { + getActionBarContributor().setActiveEditor(ArduinoEditor.this); + handleActivate(); + } + } + else if (p == ArduinoEditor.this) { + handleActivate(); + } + } + public void partBroughtToTop(IWorkbenchPart p) { + // Ignore. + } + public void partClosed(IWorkbenchPart p) { + // Ignore. + } + public void partDeactivated(IWorkbenchPart p) { + // Ignore. + } + public void partOpened(IWorkbenchPart p) { + // Ignore. + } + }; + + /** + * Resources that have been removed since last activation. + * + * + * @generated + */ + protected Collection removedResources = new ArrayList(); + + /** + * Resources that have been changed since last activation. + * + * + * @generated + */ + protected Collection changedResources = new ArrayList(); + + /** + * Resources that have been saved. + * + * + * @generated + */ + protected Collection savedResources = new ArrayList(); + + /** + * Map to store the diagnostic associated with a resource. + * + * + * @generated + */ + protected Map resourceToDiagnosticMap = new LinkedHashMap(); + + /** + * Controls whether the problem indication should be updated. + * + * + * @generated + */ + protected boolean updateProblemIndication = true; + + /** + * Adapter used to update the problem indication when resources are demanded loaded. + * + * + * @generated + */ + protected EContentAdapter problemIndicationAdapter = + new EContentAdapter() { + @Override + public void notifyChanged(Notification notification) { + if (notification.getNotifier() instanceof Resource) { + switch (notification.getFeatureID(Resource.class)) { + case Resource.RESOURCE__IS_LOADED: + case Resource.RESOURCE__ERRORS: + case Resource.RESOURCE__WARNINGS: { + Resource resource = (Resource)notification.getNotifier(); + Diagnostic diagnostic = analyzeResourceProblems(resource, null); + if (diagnostic.getSeverity() != Diagnostic.OK) { + resourceToDiagnosticMap.put(resource, diagnostic); + } + else { + resourceToDiagnosticMap.remove(resource); + } + + if (updateProblemIndication) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + updateProblemIndication(); + } + }); + } + break; + } + } + } + else { + super.notifyChanged(notification); + } + } + + @Override + protected void setTarget(Resource target) { + basicSetTarget(target); + } + + @Override + protected void unsetTarget(Resource target) { + basicUnsetTarget(target); + resourceToDiagnosticMap.remove(target); + if (updateProblemIndication) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + updateProblemIndication(); + } + }); + } + } + }; + + /** + * This listens for workspace changes. + * + * + * @generated + */ + protected IResourceChangeListener resourceChangeListener = + new IResourceChangeListener() { + public void resourceChanged(IResourceChangeEvent event) { + IResourceDelta delta = event.getDelta(); + try { + class ResourceDeltaVisitor implements IResourceDeltaVisitor { + protected ResourceSet resourceSet = editingDomain.getResourceSet(); + protected Collection changedResources = new ArrayList(); + protected Collection removedResources = new ArrayList(); + + public boolean visit(IResourceDelta delta) { + if (delta.getResource().getType() == IResource.FILE) { + if (delta.getKind() == IResourceDelta.REMOVED || + delta.getKind() == IResourceDelta.CHANGED && delta.getFlags() != IResourceDelta.MARKERS) { + Resource resource = resourceSet.getResource(URI.createPlatformResourceURI(delta.getFullPath().toString(), true), false); + if (resource != null) { + if (delta.getKind() == IResourceDelta.REMOVED) { + removedResources.add(resource); + } + else if (!savedResources.remove(resource)) { + changedResources.add(resource); + } + } + } + return false; + } + + return true; + } + + public Collection getChangedResources() { + return changedResources; + } + + public Collection getRemovedResources() { + return removedResources; + } + } + + final ResourceDeltaVisitor visitor = new ResourceDeltaVisitor(); + delta.accept(visitor); + + if (!visitor.getRemovedResources().isEmpty()) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + removedResources.addAll(visitor.getRemovedResources()); + if (!isDirty()) { + getSite().getPage().closeEditor(ArduinoEditor.this, false); + } + } + }); + } + + if (!visitor.getChangedResources().isEmpty()) { + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + changedResources.addAll(visitor.getChangedResources()); + if (getSite().getPage().getActiveEditor() == ArduinoEditor.this) { + handleActivate(); + } + } + }); + } + } + catch (CoreException exception) { + ArduinoEditorPlugin.INSTANCE.log(exception); + } + } + }; + + /** + * Handles activation of the editor or it's associated views. + * + * + * @generated + */ + protected void handleActivate() { + // Recompute the read only state. + // + if (editingDomain.getResourceToReadOnlyMap() != null) { + editingDomain.getResourceToReadOnlyMap().clear(); + + // Refresh any actions that may become enabled or disabled. + // + setSelection(getSelection()); + } + + if (!removedResources.isEmpty()) { + if (handleDirtyConflict()) { + getSite().getPage().closeEditor(ArduinoEditor.this, false); + } + else { + removedResources.clear(); + changedResources.clear(); + savedResources.clear(); + } + } + else if (!changedResources.isEmpty()) { + changedResources.removeAll(savedResources); + handleChangedResources(); + changedResources.clear(); + savedResources.clear(); + } + } + + /** + * Handles what to do with changed resources on activation. + * + * + * @generated + */ + protected void handleChangedResources() { + if (!changedResources.isEmpty() && (!isDirty() || handleDirtyConflict())) { + if (isDirty()) { + changedResources.addAll(editingDomain.getResourceSet().getResources()); + } + editingDomain.getCommandStack().flush(); + + updateProblemIndication = false; + for (Resource resource : changedResources) { + if (resource.isLoaded()) { + resource.unload(); + try { + resource.load(Collections.EMPTY_MAP); + } + catch (IOException exception) { + if (!resourceToDiagnosticMap.containsKey(resource)) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + } + } + } + + if (AdapterFactoryEditingDomain.isStale(editorSelection)) { + setSelection(StructuredSelection.EMPTY); + } + + updateProblemIndication = true; + updateProblemIndication(); + } + } + + /** + * Updates the problems indication with the information described in the specified diagnostic. + * + * + * @generated + */ + protected void updateProblemIndication() { + if (updateProblemIndication) { + BasicDiagnostic diagnostic = + new BasicDiagnostic + (Diagnostic.OK, + "fr.obeo.dsl.arduino.editor", + 0, + null, + new Object [] { editingDomain.getResourceSet() }); + for (Diagnostic childDiagnostic : resourceToDiagnosticMap.values()) { + if (childDiagnostic.getSeverity() != Diagnostic.OK) { + diagnostic.add(childDiagnostic); + } + } + + int lastEditorPage = getPageCount() - 1; + if (lastEditorPage >= 0 && getEditor(lastEditorPage) instanceof ProblemEditorPart) { + ((ProblemEditorPart)getEditor(lastEditorPage)).setDiagnostic(diagnostic); + if (diagnostic.getSeverity() != Diagnostic.OK) { + setActivePage(lastEditorPage); + } + } + else if (diagnostic.getSeverity() != Diagnostic.OK) { + ProblemEditorPart problemEditorPart = new ProblemEditorPart(); + problemEditorPart.setDiagnostic(diagnostic); + problemEditorPart.setMarkerHelper(markerHelper); + try { + addPage(++lastEditorPage, problemEditorPart, getEditorInput()); + setPageText(lastEditorPage, problemEditorPart.getPartName()); + setActivePage(lastEditorPage); + showTabs(); + } + catch (PartInitException exception) { + ArduinoEditorPlugin.INSTANCE.log(exception); + } + } + + if (markerHelper.hasMarkers(editingDomain.getResourceSet())) { + markerHelper.deleteMarkers(editingDomain.getResourceSet()); + if (diagnostic.getSeverity() != Diagnostic.OK) { + try { + markerHelper.createMarkers(diagnostic); + } + catch (CoreException exception) { + ArduinoEditorPlugin.INSTANCE.log(exception); + } + } + } + } + } + + /** + * Shows a dialog that asks if conflicting changes should be discarded. + * + * + * @generated + */ + protected boolean handleDirtyConflict() { + return + MessageDialog.openQuestion + (getSite().getShell(), + getString("_UI_FileConflict_label"), + getString("_WARN_FileConflict")); + } + + /** + * This creates a model editor. + * + * + * @generated + */ + public ArduinoEditor() { + super(); + initializeEditingDomain(); + } + + /** + * This sets up the editing domain for the model editor. + * + * + * @generated + */ + protected void initializeEditingDomain() { + // Create an adapter factory that yields item providers. + // + adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); + + adapterFactory.addAdapterFactory(new ResourceItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ArduinoItemProviderAdapterFactory()); + adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory()); + + // Create the command stack that will notify this editor as commands are executed. + // + BasicCommandStack commandStack = new BasicCommandStack(); + + // Add a listener to set the most recent command's affected objects to be the selection of the viewer with focus. + // + commandStack.addCommandStackListener + (new CommandStackListener() { + public void commandStackChanged(final EventObject event) { + getContainer().getDisplay().asyncExec + (new Runnable() { + public void run() { + firePropertyChange(IEditorPart.PROP_DIRTY); + + // Try to select the affected objects. + // + Command mostRecentCommand = ((CommandStack)event.getSource()).getMostRecentCommand(); + if (mostRecentCommand != null) { + setSelectionToViewer(mostRecentCommand.getAffectedObjects()); + } + for (Iterator i = propertySheetPages.iterator(); i.hasNext(); ) { + PropertySheetPage propertySheetPage = i.next(); + if (propertySheetPage.getControl().isDisposed()) { + i.remove(); + } + else { + propertySheetPage.refresh(); + } + } + } + }); + } + }); + + // Create the editing domain with a special command stack. + // + editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, new HashMap()); + } + + /** + * This is here for the listener to be able to call it. + * + * + * @generated + */ + @Override + protected void firePropertyChange(int action) { + super.firePropertyChange(action); + } + + /** + * This sets the selection into whichever viewer is active. + * + * + * @generated + */ + public void setSelectionToViewer(Collection collection) { + final Collection theSelection = collection; + // Make sure it's okay. + // + if (theSelection != null && !theSelection.isEmpty()) { + Runnable runnable = + new Runnable() { + public void run() { + // Try to select the items in the current content viewer of the editor. + // + if (currentViewer != null) { + currentViewer.setSelection(new StructuredSelection(theSelection.toArray()), true); + } + } + }; + getSite().getShell().getDisplay().asyncExec(runnable); + } + } + + /** + * This returns the editing domain as required by the {@link IEditingDomainProvider} interface. + * This is important for implementing the static methods of {@link AdapterFactoryEditingDomain} + * and for supporting {@link org.eclipse.emf.edit.ui.action.CommandAction}. + * + * + * @generated + */ + public EditingDomain getEditingDomain() { + return editingDomain; + } + + /** + * + * + * @generated + */ + public class ReverseAdapterFactoryContentProvider extends AdapterFactoryContentProvider { + /** + * + * + * @generated + */ + public ReverseAdapterFactoryContentProvider(AdapterFactory adapterFactory) { + super(adapterFactory); + } + + /** + * + * + * @generated + */ + @Override + public Object [] getElements(Object object) { + Object parent = super.getParent(object); + return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); + } + + /** + * + * + * @generated + */ + @Override + public Object [] getChildren(Object object) { + Object parent = super.getParent(object); + return (parent == null ? Collections.EMPTY_SET : Collections.singleton(parent)).toArray(); + } + + /** + * + * + * @generated + */ + @Override + public boolean hasChildren(Object object) { + Object parent = super.getParent(object); + return parent != null; + } + + /** + * + * + * @generated + */ + @Override + public Object getParent(Object object) { + return null; + } + } + + /** + * + * + * @generated + */ + public void setCurrentViewerPane(ViewerPane viewerPane) { + if (currentViewerPane != viewerPane) { + if (currentViewerPane != null) { + currentViewerPane.showFocus(false); + } + currentViewerPane = viewerPane; + } + setCurrentViewer(currentViewerPane.getViewer()); + } + + /** + * This makes sure that one content viewer, either for the current page or the outline view, if it has focus, + * is the current one. + * + * + * @generated + */ + public void setCurrentViewer(Viewer viewer) { + // If it is changing... + // + if (currentViewer != viewer) { + if (selectionChangedListener == null) { + // Create the listener on demand. + // + selectionChangedListener = + new ISelectionChangedListener() { + // This just notifies those things that are affected by the section. + // + public void selectionChanged(SelectionChangedEvent selectionChangedEvent) { + setSelection(selectionChangedEvent.getSelection()); + } + }; + } + + // Stop listening to the old one. + // + if (currentViewer != null) { + currentViewer.removeSelectionChangedListener(selectionChangedListener); + } + + // Start listening to the new one. + // + if (viewer != null) { + viewer.addSelectionChangedListener(selectionChangedListener); + } + + // Remember it. + // + currentViewer = viewer; + + // Set the editors selection based on the current viewer's selection. + // + setSelection(currentViewer == null ? StructuredSelection.EMPTY : currentViewer.getSelection()); + } + } + + /** + * This returns the viewer as required by the {@link IViewerProvider} interface. + * + * + * @generated + */ + public Viewer getViewer() { + return currentViewer; + } + + /** + * This creates a context menu for the viewer and adds a listener as well registering the menu for extension. + * + * + * @generated + */ + protected void createContextMenuFor(StructuredViewer viewer) { + MenuManager contextMenu = new MenuManager("#PopUp"); + contextMenu.add(new Separator("additions")); + contextMenu.setRemoveAllWhenShown(true); + contextMenu.addMenuListener(this); + Menu menu= contextMenu.createContextMenu(viewer.getControl()); + viewer.getControl().setMenu(menu); + getSite().registerContextMenu(contextMenu, new UnwrappingSelectionProvider(viewer)); + + int dndOperations = DND.DROP_COPY | DND.DROP_MOVE | DND.DROP_LINK; + Transfer[] transfers = new Transfer[] { LocalTransfer.getInstance(), LocalSelectionTransfer.getTransfer(), FileTransfer.getInstance() }; + viewer.addDragSupport(dndOperations, transfers, new ViewerDragAdapter(viewer)); + viewer.addDropSupport(dndOperations, transfers, new EditingDomainViewerDropAdapter(editingDomain, viewer)); + } + + /** + * This is the method called to load a resource into the editing domain's resource set based on the editor's input. + * + * + * @generated + */ + public void createModel() { + URI resourceURI = EditUIUtil.getURI(getEditorInput()); + Exception exception = null; + Resource resource = null; + try { + // Load the resource through the editing domain. + // + resource = editingDomain.getResourceSet().getResource(resourceURI, true); + } + catch (Exception e) { + exception = e; + resource = editingDomain.getResourceSet().getResource(resourceURI, false); + } + + Diagnostic diagnostic = analyzeResourceProblems(resource, exception); + if (diagnostic.getSeverity() != Diagnostic.OK) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + editingDomain.getResourceSet().eAdapters().add(problemIndicationAdapter); + } + + /** + * Returns a diagnostic describing the errors and warnings listed in the resource + * and the specified exception (if any). + * + * + * @generated + */ + public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) { + if (!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) { + BasicDiagnostic basicDiagnostic = + new BasicDiagnostic + (Diagnostic.ERROR, + "fr.obeo.dsl.arduino.editor", + 0, + getString("_UI_CreateModelError_message", resource.getURI()), + new Object [] { exception == null ? (Object)resource : exception }); + basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true)); + return basicDiagnostic; + } + else if (exception != null) { + return + new BasicDiagnostic + (Diagnostic.ERROR, + "fr.obeo.dsl.arduino.editor", + 0, + getString("_UI_CreateModelError_message", resource.getURI()), + new Object[] { exception }); + } + else { + return Diagnostic.OK_INSTANCE; + } + } + + /** + * This is the method used by the framework to install your own controls. + * + * + * @generated + */ + @Override + public void createPages() { + // Creates the model from the editor input + // + createModel(); + + // Only creates the other pages if there is something that can be edited + // + if (!getEditingDomain().getResourceSet().getResources().isEmpty()) { + // Create a page for the selection tree view. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ArduinoEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + Tree tree = new Tree(composite, SWT.MULTI); + TreeViewer newTreeViewer = new TreeViewer(tree); + return newTreeViewer; + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + + selectionViewer = (TreeViewer)viewerPane.getViewer(); + selectionViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + + selectionViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + selectionViewer.setInput(editingDomain.getResourceSet()); + selectionViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); + viewerPane.setTitle(editingDomain.getResourceSet()); + + new AdapterFactoryTreeEditor(selectionViewer.getTree(), adapterFactory); + + createContextMenuFor(selectionViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_SelectionPage_label")); + } + + // Create a page for the parent tree view. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ArduinoEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + Tree tree = new Tree(composite, SWT.MULTI); + TreeViewer newTreeViewer = new TreeViewer(tree); + return newTreeViewer; + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + + parentViewer = (TreeViewer)viewerPane.getViewer(); + parentViewer.setAutoExpandLevel(30); + parentViewer.setContentProvider(new ReverseAdapterFactoryContentProvider(adapterFactory)); + parentViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(parentViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_ParentPage_label")); + } + + // This is the page for the list viewer + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ArduinoEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new ListViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + listViewer = (ListViewer)viewerPane.getViewer(); + listViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + listViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(listViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_ListPage_label")); + } + + // This is the page for the tree viewer + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ArduinoEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new TreeViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + treeViewer = (TreeViewer)viewerPane.getViewer(); + treeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + treeViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + new AdapterFactoryTreeEditor(treeViewer.getTree(), adapterFactory); + + createContextMenuFor(treeViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_TreePage_label")); + } + + // This is the page for the table viewer. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ArduinoEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new TableViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + tableViewer = (TableViewer)viewerPane.getViewer(); + + Table table = tableViewer.getTable(); + TableLayout layout = new TableLayout(); + table.setLayout(layout); + table.setHeaderVisible(true); + table.setLinesVisible(true); + + TableColumn objectColumn = new TableColumn(table, SWT.NONE); + layout.addColumnData(new ColumnWeightData(3, 100, true)); + objectColumn.setText(getString("_UI_ObjectColumn_label")); + objectColumn.setResizable(true); + + TableColumn selfColumn = new TableColumn(table, SWT.NONE); + layout.addColumnData(new ColumnWeightData(2, 100, true)); + selfColumn.setText(getString("_UI_SelfColumn_label")); + selfColumn.setResizable(true); + + tableViewer.setColumnProperties(new String [] {"a", "b"}); + tableViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + tableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(tableViewer); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_TablePage_label")); + } + + // This is the page for the table tree viewer. + // + { + ViewerPane viewerPane = + new ViewerPane(getSite().getPage(), ArduinoEditor.this) { + @Override + public Viewer createViewer(Composite composite) { + return new TreeViewer(composite); + } + @Override + public void requestActivation() { + super.requestActivation(); + setCurrentViewerPane(this); + } + }; + viewerPane.createControl(getContainer()); + + treeViewerWithColumns = (TreeViewer)viewerPane.getViewer(); + + Tree tree = treeViewerWithColumns.getTree(); + tree.setLayoutData(new FillLayout()); + tree.setHeaderVisible(true); + tree.setLinesVisible(true); + + TreeColumn objectColumn = new TreeColumn(tree, SWT.NONE); + objectColumn.setText(getString("_UI_ObjectColumn_label")); + objectColumn.setResizable(true); + objectColumn.setWidth(250); + + TreeColumn selfColumn = new TreeColumn(tree, SWT.NONE); + selfColumn.setText(getString("_UI_SelfColumn_label")); + selfColumn.setResizable(true); + selfColumn.setWidth(200); + + treeViewerWithColumns.setColumnProperties(new String [] {"a", "b"}); + treeViewerWithColumns.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + treeViewerWithColumns.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + + createContextMenuFor(treeViewerWithColumns); + int pageIndex = addPage(viewerPane.getControl()); + setPageText(pageIndex, getString("_UI_TreeWithColumnsPage_label")); + } + + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + setActivePage(0); + } + }); + } + + // Ensures that this editor will only display the page's tab + // area if there are more than one page + // + getContainer().addControlListener + (new ControlAdapter() { + boolean guard = false; + @Override + public void controlResized(ControlEvent event) { + if (!guard) { + guard = true; + hideTabs(); + guard = false; + } + } + }); + + getSite().getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + updateProblemIndication(); + } + }); + } + + /** + * If there is just one page in the multi-page editor part, + * this hides the single tab at the bottom. + * + * + * @generated + */ + protected void hideTabs() { + if (getPageCount() <= 1) { + setPageText(0, ""); + if (getContainer() instanceof CTabFolder) { + ((CTabFolder)getContainer()).setTabHeight(1); + Point point = getContainer().getSize(); + getContainer().setSize(point.x, point.y + 6); + } + } + } + + /** + * If there is more than one page in the multi-page editor part, + * this shows the tabs at the bottom. + * + * + * @generated + */ + protected void showTabs() { + if (getPageCount() > 1) { + setPageText(0, getString("_UI_SelectionPage_label")); + if (getContainer() instanceof CTabFolder) { + ((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT); + Point point = getContainer().getSize(); + getContainer().setSize(point.x, point.y - 6); + } + } + } + + /** + * This is used to track the active viewer. + * + * + * @generated + */ + @Override + protected void pageChange(int pageIndex) { + super.pageChange(pageIndex); + + if (contentOutlinePage != null) { + handleContentOutlineSelection(contentOutlinePage.getSelection()); + } + } + + /** + * This is how the framework determines which interfaces we implement. + * + * + * @generated + */ + @SuppressWarnings("rawtypes") + @Override + public Object getAdapter(Class key) { + if (key.equals(IContentOutlinePage.class)) { + return showOutlineView() ? getContentOutlinePage() : null; + } + else if (key.equals(IPropertySheetPage.class)) { + return getPropertySheetPage(); + } + else if (key.equals(IGotoMarker.class)) { + return this; + } + else { + return super.getAdapter(key); + } + } + + /** + * This accesses a cached version of the content outliner. + * + * + * @generated + */ + public IContentOutlinePage getContentOutlinePage() { + if (contentOutlinePage == null) { + // The content outline is just a tree. + // + class MyContentOutlinePage extends ContentOutlinePage { + @Override + public void createControl(Composite parent) { + super.createControl(parent); + contentOutlineViewer = getTreeViewer(); + contentOutlineViewer.addSelectionChangedListener(this); + + // Set up the tree viewer. + // + contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory)); + contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory)); + contentOutlineViewer.setInput(editingDomain.getResourceSet()); + + // Make sure our popups work. + // + createContextMenuFor(contentOutlineViewer); + + if (!editingDomain.getResourceSet().getResources().isEmpty()) { + // Select the root object in the view. + // + contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true); + } + } + + @Override + public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) { + super.makeContributions(menuManager, toolBarManager, statusLineManager); + contentOutlineStatusLineManager = statusLineManager; + } + + @Override + public void setActionBars(IActionBars actionBars) { + super.setActionBars(actionBars); + getActionBarContributor().shareGlobalActions(this, actionBars); + } + } + + contentOutlinePage = new MyContentOutlinePage(); + + // Listen to selection so that we can handle it is a special way. + // + contentOutlinePage.addSelectionChangedListener + (new ISelectionChangedListener() { + // This ensures that we handle selections correctly. + // + public void selectionChanged(SelectionChangedEvent event) { + handleContentOutlineSelection(event.getSelection()); + } + }); + } + + return contentOutlinePage; + } + + /** + * This accesses a cached version of the property sheet. + * + * + * @generated + */ + public IPropertySheetPage getPropertySheetPage() { + PropertySheetPage propertySheetPage = + new ExtendedPropertySheetPage(editingDomain) { + @Override + public void setSelectionToViewer(List selection) { + ArduinoEditor.this.setSelectionToViewer(selection); + ArduinoEditor.this.setFocus(); + } + + @Override + public void setActionBars(IActionBars actionBars) { + super.setActionBars(actionBars); + getActionBarContributor().shareGlobalActions(this, actionBars); + } + }; + propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory)); + propertySheetPages.add(propertySheetPage); + + return propertySheetPage; + } + + /** + * This deals with how we want selection in the outliner to affect the other views. + * + * + * @generated + */ + public void handleContentOutlineSelection(ISelection selection) { + if (currentViewerPane != null && !selection.isEmpty() && selection instanceof IStructuredSelection) { + Iterator selectedElements = ((IStructuredSelection)selection).iterator(); + if (selectedElements.hasNext()) { + // Get the first selected element. + // + Object selectedElement = selectedElements.next(); + + // If it's the selection viewer, then we want it to select the same selection as this selection. + // + if (currentViewerPane.getViewer() == selectionViewer) { + ArrayList selectionList = new ArrayList(); + selectionList.add(selectedElement); + while (selectedElements.hasNext()) { + selectionList.add(selectedElements.next()); + } + + // Set the selection to the widget. + // + selectionViewer.setSelection(new StructuredSelection(selectionList)); + } + else { + // Set the input to the widget. + // + if (currentViewerPane.getViewer().getInput() != selectedElement) { + currentViewerPane.getViewer().setInput(selectedElement); + currentViewerPane.setTitle(selectedElement); + } + } + } + } + } + + /** + * This is for implementing {@link IEditorPart} and simply tests the command stack. + * + * + * @generated + */ + @Override + public boolean isDirty() { + return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded(); + } + + /** + * This is for implementing {@link IEditorPart} and simply saves the model file. + * + * + * @generated + */ + @Override + public void doSave(IProgressMonitor progressMonitor) { + // Save only resources that have actually changed. + // + final Map saveOptions = new HashMap(); + saveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED, Resource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER); + saveOptions.put(Resource.OPTION_LINE_DELIMITER, Resource.OPTION_LINE_DELIMITER_UNSPECIFIED); + + // Do the work within an operation because this is a long running activity that modifies the workbench. + // + WorkspaceModifyOperation operation = + new WorkspaceModifyOperation() { + // This is the method that gets invoked when the operation runs. + // + @Override + public void execute(IProgressMonitor monitor) { + // Save the resources to the file system. + // + boolean first = true; + for (Resource resource : editingDomain.getResourceSet().getResources()) { + if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) { + try { + long timeStamp = resource.getTimeStamp(); + resource.save(saveOptions); + if (resource.getTimeStamp() != timeStamp) { + savedResources.add(resource); + } + } + catch (Exception exception) { + resourceToDiagnosticMap.put(resource, analyzeResourceProblems(resource, exception)); + } + first = false; + } + } + } + }; + + updateProblemIndication = false; + try { + // This runs the options, and shows progress. + // + new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation); + + // Refresh the necessary state. + // + ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone(); + firePropertyChange(IEditorPart.PROP_DIRTY); + } + catch (Exception exception) { + // Something went wrong that shouldn't. + // + ArduinoEditorPlugin.INSTANCE.log(exception); + } + updateProblemIndication = true; + updateProblemIndication(); + } + + /** + * This returns whether something has been persisted to the URI of the specified resource. + * The implementation uses the URI converter from the editor's resource set to try to open an input stream. + * + * + * @generated + */ + protected boolean isPersisted(Resource resource) { + boolean result = false; + try { + InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI()); + if (stream != null) { + result = true; + stream.close(); + } + } + catch (IOException e) { + // Ignore + } + return result; + } + + /** + * This always returns true because it is not currently supported. + * + * + * @generated + */ + @Override + public boolean isSaveAsAllowed() { + return true; + } + + /** + * This also changes the editor's input. + * + * + * @generated + */ + @Override + public void doSaveAs() { + SaveAsDialog saveAsDialog = new SaveAsDialog(getSite().getShell()); + saveAsDialog.open(); + IPath path = saveAsDialog.getResult(); + if (path != null) { + IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path); + if (file != null) { + doSaveAs(URI.createPlatformResourceURI(file.getFullPath().toString(), true), new FileEditorInput(file)); + } + } + } + + /** + * + * + * @generated + */ + protected void doSaveAs(URI uri, IEditorInput editorInput) { + (editingDomain.getResourceSet().getResources().get(0)).setURI(uri); + setInputWithNotify(editorInput); + setPartName(editorInput.getName()); + IProgressMonitor progressMonitor = + getActionBars().getStatusLineManager() != null ? + getActionBars().getStatusLineManager().getProgressMonitor() : + new NullProgressMonitor(); + doSave(progressMonitor); + } + + /** + * + * + * @generated + */ + public void gotoMarker(IMarker marker) { + List targetObjects = markerHelper.getTargetObjects(editingDomain, marker); + if (!targetObjects.isEmpty()) { + setSelectionToViewer(targetObjects); + } + } + + /** + * This is called during startup. + * + * + * @generated + */ + @Override + public void init(IEditorSite site, IEditorInput editorInput) { + setSite(site); + setInputWithNotify(editorInput); + setPartName(editorInput.getName()); + site.setSelectionProvider(this); + site.getPage().addPartListener(partListener); + ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener, IResourceChangeEvent.POST_CHANGE); + } + + /** + * + * + * @generated + */ + @Override + public void setFocus() { + if (currentViewerPane != null) { + currentViewerPane.setFocus(); + } + else { + getControl(getActivePage()).setFocus(); + } + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. + * + * + * @generated + */ + public void addSelectionChangedListener(ISelectionChangedListener listener) { + selectionChangedListeners.add(listener); + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider}. + * + * + * @generated + */ + public void removeSelectionChangedListener(ISelectionChangedListener listener) { + selectionChangedListeners.remove(listener); + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to return this editor's overall selection. + * + * + * @generated + */ + public ISelection getSelection() { + return editorSelection; + } + + /** + * This implements {@link org.eclipse.jface.viewers.ISelectionProvider} to set this editor's overall selection. + * Calling this result will notify the listeners. + * + * + * @generated + */ + public void setSelection(ISelection selection) { + editorSelection = selection; + + for (ISelectionChangedListener listener : selectionChangedListeners) { + listener.selectionChanged(new SelectionChangedEvent(this, selection)); + } + setStatusLineManager(selection); + } + + /** + * + * + * @generated + */ + public void setStatusLineManager(ISelection selection) { + IStatusLineManager statusLineManager = currentViewer != null && currentViewer == contentOutlineViewer ? + contentOutlineStatusLineManager : getActionBars().getStatusLineManager(); + + if (statusLineManager != null) { + if (selection instanceof IStructuredSelection) { + Collection collection = ((IStructuredSelection)selection).toList(); + switch (collection.size()) { + case 0: { + statusLineManager.setMessage(getString("_UI_NoObjectSelected")); + break; + } + case 1: { + String text = new AdapterFactoryItemDelegator(adapterFactory).getText(collection.iterator().next()); + statusLineManager.setMessage(getString("_UI_SingleObjectSelected", text)); + break; + } + default: { + statusLineManager.setMessage(getString("_UI_MultiObjectSelected", Integer.toString(collection.size()))); + break; + } + } + } + else { + statusLineManager.setMessage(""); + } + } + } + + /** + * This looks up a string in the plugin's plugin.properties file. + * + * + * @generated + */ + private static String getString(String key) { + return ArduinoEditorPlugin.INSTANCE.getString(key); + } + + /** + * This looks up a string in plugin.properties, making a substitution. + * + * + * @generated + */ + private static String getString(String key, Object s1) { + return ArduinoEditorPlugin.INSTANCE.getString(key, new Object [] { s1 }); + } + + /** + * This implements {@link org.eclipse.jface.action.IMenuListener} to help fill the context menus with contributions from the Edit menu. + * + * + * @generated + */ + public void menuAboutToShow(IMenuManager menuManager) { + ((IMenuListener)getEditorSite().getActionBarContributor()).menuAboutToShow(menuManager); + } + + /** + * + * + * @generated + */ + public EditingDomainActionBarContributor getActionBarContributor() { + return (EditingDomainActionBarContributor)getEditorSite().getActionBarContributor(); + } + + /** + * + * + * @generated + */ + public IActionBars getActionBars() { + return getActionBarContributor().getActionBars(); + } + + /** + * + * + * @generated + */ + public AdapterFactory getAdapterFactory() { + return adapterFactory; + } + + /** + * + * + * @generated + */ + @Override + public void dispose() { + updateProblemIndication = false; + + ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceChangeListener); + + getSite().getPage().removePartListener(partListener); + + adapterFactory.dispose(); + + if (getActionBarContributor().getActiveEditor() == this) { + getActionBarContributor().setActiveEditor(null); + } + + for (PropertySheetPage propertySheetPage : propertySheetPages) { + propertySheetPage.dispose(); + } + + if (contentOutlinePage != null) { + contentOutlinePage.dispose(); + } + + super.dispose(); + } + + /** + * Returns whether the outline view should be presented to the user. + * + * + * @generated + */ + protected boolean showOutlineView() { + return true; + } +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/src-gen/fr/obeo/dsl/arduino/presentation/ArduinoEditorPlugin.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/src-gen/fr/obeo/dsl/arduino/presentation/ArduinoEditorPlugin.java new file mode 100644 index 00000000..4a9e2a35 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/src-gen/fr/obeo/dsl/arduino/presentation/ArduinoEditorPlugin.java @@ -0,0 +1,99 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.presentation; + +import org.eclipse.emf.common.EMFPlugin; + +import org.eclipse.emf.common.ui.EclipseUIPlugin; + +import org.eclipse.emf.common.util.ResourceLocator; + +/** + * This is the central singleton for the Arduino editor plugin. + * + * + * @generated + */ +public final class ArduinoEditorPlugin extends EMFPlugin { + /** + * Keep track of the singleton. + * + * + * @generated + */ + public static final ArduinoEditorPlugin INSTANCE = new ArduinoEditorPlugin(); + + /** + * Keep track of the singleton. + * + * + * @generated + */ + private static Implementation plugin; + + /** + * Create the instance. + * + * + * @generated + */ + public ArduinoEditorPlugin() { + super + (new ResourceLocator [] { + }); + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + @Override + public ResourceLocator getPluginResourceLocator() { + return plugin; + } + + /** + * Returns the singleton instance of the Eclipse plugin. + * + * + * @return the singleton instance. + * @generated + */ + public static Implementation getPlugin() { + return plugin; + } + + /** + * The actual implementation of the Eclipse Plugin. + * + * + * @generated + */ + public static class Implementation extends EclipseUIPlugin { + /** + * Creates an instance. + * + * + * @generated + */ + public Implementation() { + super(); + + // Remember the static instance. + // + plugin = this; + } + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/src-gen/fr/obeo/dsl/arduino/presentation/ArduinoModelWizard.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/src-gen/fr/obeo/dsl/arduino/presentation/ArduinoModelWizard.java new file mode 100644 index 00000000..573f41bb --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.editor/src-gen/fr/obeo/dsl/arduino/presentation/ArduinoModelWizard.java @@ -0,0 +1,636 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.presentation; + + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.MissingResourceException; +import java.util.StringTokenizer; + +import org.eclipse.emf.common.CommonPlugin; + +import org.eclipse.emf.common.util.URI; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EClassifier; + +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; + +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; + +import org.eclipse.emf.ecore.EObject; + +import org.eclipse.emf.ecore.xmi.XMLResource; + +import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry; + +import org.eclipse.core.resources.IContainer; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IFolder; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.ResourcesPlugin; + +import org.eclipse.core.runtime.IProgressMonitor; + +import org.eclipse.jface.dialogs.MessageDialog; + +import org.eclipse.jface.viewers.IStructuredSelection; + +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.jface.wizard.WizardPage; + +import org.eclipse.swt.SWT; + +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.events.ModifyEvent; + +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; + +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Label; + +import org.eclipse.ui.INewWizard; +import org.eclipse.ui.IWorkbench; + +import org.eclipse.ui.actions.WorkspaceModifyOperation; + +import org.eclipse.ui.dialogs.WizardNewFileCreationPage; + +import org.eclipse.ui.part.FileEditorInput; +import org.eclipse.ui.part.ISetSelectionTarget; + +import fr.obeo.dsl.arduino.ArduinoFactory; +import fr.obeo.dsl.arduino.ArduinoPackage; +import fr.obeo.dsl.arduino.provider.ArduinoEditPlugin; + + +import org.eclipse.core.runtime.Path; + +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.StructuredSelection; + +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PartInitException; + + +/** + * This is a simple wizard for creating a new model file. + * + * + * @generated + */ +public class ArduinoModelWizard extends Wizard implements INewWizard { + /** + * The supported extensions for created files. + * + * + * @generated + */ + public static final List FILE_EXTENSIONS = + Collections.unmodifiableList(Arrays.asList(ArduinoEditorPlugin.INSTANCE.getString("_UI_ArduinoEditorFilenameExtensions").split("\\s*,\\s*"))); + + /** + * A formatted list of supported file extensions, suitable for display. + * + * + * @generated + */ + public static final String FORMATTED_FILE_EXTENSIONS = + ArduinoEditorPlugin.INSTANCE.getString("_UI_ArduinoEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", "); + + /** + * This caches an instance of the model package. + * + * + * @generated + */ + protected ArduinoPackage arduinoPackage = ArduinoPackage.eINSTANCE; + + /** + * This caches an instance of the model factory. + * + * + * @generated + */ + protected ArduinoFactory arduinoFactory = arduinoPackage.getArduinoFactory(); + + /** + * This is the file creation page. + * + * + * @generated + */ + protected ArduinoModelWizardNewFileCreationPage newFileCreationPage; + + /** + * This is the initial object creation page. + * + * + * @generated + */ + protected ArduinoModelWizardInitialObjectCreationPage initialObjectCreationPage; + + /** + * Remember the selection during initialization for populating the default container. + * + * + * @generated + */ + protected IStructuredSelection selection; + + /** + * Remember the workbench during initialization. + * + * + * @generated + */ + protected IWorkbench workbench; + + /** + * Caches the names of the types that can be created as the root object. + * + * + * @generated + */ + protected List initialObjectNames; + + /** + * This just records the information. + * + * + * @generated + */ + public void init(IWorkbench workbench, IStructuredSelection selection) { + this.workbench = workbench; + this.selection = selection; + setWindowTitle(ArduinoEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); + setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(ArduinoEditorPlugin.INSTANCE.getImage("full/wizban/NewArduino"))); + } + + /** + * Returns the names of the types that can be created as the root object. + * + * + * @generated + */ + protected Collection getInitialObjectNames() { + if (initialObjectNames == null) { + initialObjectNames = new ArrayList(); + for (EClassifier eClassifier : arduinoPackage.getEClassifiers()) { + if (eClassifier instanceof EClass) { + EClass eClass = (EClass)eClassifier; + if (!eClass.isAbstract()) { + initialObjectNames.add(eClass.getName()); + } + } + } + Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); + } + return initialObjectNames; + } + + /** + * Create a new model. + * + * + * @generated + */ + protected EObject createInitialModel() { + EClass eClass = (EClass)arduinoPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName()); + EObject rootObject = arduinoFactory.create(eClass); + return rootObject; + } + + /** + * Do the work after everything is specified. + * + * + * @generated + */ + @Override + public boolean performFinish() { + try { + // Remember the file. + // + final IFile modelFile = getModelFile(); + + // Do the work within an operation. + // + WorkspaceModifyOperation operation = + new WorkspaceModifyOperation() { + @Override + protected void execute(IProgressMonitor progressMonitor) { + try { + // Create a resource set + // + ResourceSet resourceSet = new ResourceSetImpl(); + + // Get the URI of the model file. + // + URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true); + + // Create a resource for this file. + // + Resource resource = resourceSet.createResource(fileURI); + + // Add the initial model object to the contents. + // + EObject rootObject = createInitialModel(); + if (rootObject != null) { + resource.getContents().add(rootObject); + } + + // Save the contents of the resource to the file system. + // + Map options = new HashMap(); + options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding()); + resource.save(options); + } + catch (Exception exception) { + ArduinoEditorPlugin.INSTANCE.log(exception); + } + finally { + progressMonitor.done(); + } + } + }; + + getContainer().run(false, false, operation); + + // Select the new file resource in the current view. + // + IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow(); + IWorkbenchPage page = workbenchWindow.getActivePage(); + final IWorkbenchPart activePart = page.getActivePart(); + if (activePart instanceof ISetSelectionTarget) { + final ISelection targetSelection = new StructuredSelection(modelFile); + getShell().getDisplay().asyncExec + (new Runnable() { + public void run() { + ((ISetSelectionTarget)activePart).selectReveal(targetSelection); + } + }); + } + + // Open an editor on the new file. + // + try { + page.openEditor + (new FileEditorInput(modelFile), + workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId()); + } + catch (PartInitException exception) { + MessageDialog.openError(workbenchWindow.getShell(), ArduinoEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage()); + return false; + } + + return true; + } + catch (Exception exception) { + ArduinoEditorPlugin.INSTANCE.log(exception); + return false; + } + } + + /** + * This is the one page of the wizard. + * + * + * @generated + */ + public class ArduinoModelWizardNewFileCreationPage extends WizardNewFileCreationPage { + /** + * Pass in the selection. + * + * + * @generated + */ + public ArduinoModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection) { + super(pageId, selection); + } + + /** + * The framework calls this to see if the file is correct. + * + * + * @generated + */ + @Override + protected boolean validatePage() { + if (super.validatePage()) { + String extension = new Path(getFileName()).getFileExtension(); + if (extension == null || !FILE_EXTENSIONS.contains(extension)) { + String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension"; + setErrorMessage(ArduinoEditorPlugin.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXTENSIONS })); + return false; + } + return true; + } + return false; + } + + /** + * + * + * @generated + */ + public IFile getModelFile() { + return ResourcesPlugin.getWorkspace().getRoot().getFile(getContainerFullPath().append(getFileName())); + } + } + + /** + * This is the page where the type of object to create is selected. + * + * + * @generated + */ + public class ArduinoModelWizardInitialObjectCreationPage extends WizardPage { + /** + * + * + * @generated + */ + protected Combo initialObjectField; + + /** + * @generated + * + * + */ + protected List encodings; + + /** + * + * + * @generated + */ + protected Combo encodingField; + + /** + * Pass in the selection. + * + * + * @generated + */ + public ArduinoModelWizardInitialObjectCreationPage(String pageId) { + super(pageId); + } + + /** + * + * + * @generated + */ + public void createControl(Composite parent) { + Composite composite = new Composite(parent, SWT.NONE); + { + GridLayout layout = new GridLayout(); + layout.numColumns = 1; + layout.verticalSpacing = 12; + composite.setLayout(layout); + + GridData data = new GridData(); + data.verticalAlignment = GridData.FILL; + data.grabExcessVerticalSpace = true; + data.horizontalAlignment = GridData.FILL; + composite.setLayoutData(data); + } + + Label containerLabel = new Label(composite, SWT.LEFT); + { + containerLabel.setText(ArduinoEditorPlugin.INSTANCE.getString("_UI_ModelObject")); + + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + containerLabel.setLayoutData(data); + } + + initialObjectField = new Combo(composite, SWT.BORDER); + { + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + data.grabExcessHorizontalSpace = true; + initialObjectField.setLayoutData(data); + } + + for (String objectName : getInitialObjectNames()) { + initialObjectField.add(getLabel(objectName)); + } + + if (initialObjectField.getItemCount() == 1) { + initialObjectField.select(0); + } + initialObjectField.addModifyListener(validator); + + Label encodingLabel = new Label(composite, SWT.LEFT); + { + encodingLabel.setText(ArduinoEditorPlugin.INSTANCE.getString("_UI_XMLEncoding")); + + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + encodingLabel.setLayoutData(data); + } + encodingField = new Combo(composite, SWT.BORDER); + { + GridData data = new GridData(); + data.horizontalAlignment = GridData.FILL; + data.grabExcessHorizontalSpace = true; + encodingField.setLayoutData(data); + } + + for (String encoding : getEncodings()) { + encodingField.add(encoding); + } + + encodingField.select(0); + encodingField.addModifyListener(validator); + + setPageComplete(validatePage()); + setControl(composite); + } + + /** + * + * + * @generated + */ + protected ModifyListener validator = + new ModifyListener() { + public void modifyText(ModifyEvent e) { + setPageComplete(validatePage()); + } + }; + + /** + * + * + * @generated + */ + protected boolean validatePage() { + return getInitialObjectName() != null && getEncodings().contains(encodingField.getText()); + } + + /** + * + * + * @generated + */ + @Override + public void setVisible(boolean visible) { + super.setVisible(visible); + if (visible) { + if (initialObjectField.getItemCount() == 1) { + initialObjectField.clearSelection(); + encodingField.setFocus(); + } + else { + encodingField.clearSelection(); + initialObjectField.setFocus(); + } + } + } + + /** + * + * + * @generated + */ + public String getInitialObjectName() { + String label = initialObjectField.getText(); + + for (String name : getInitialObjectNames()) { + if (getLabel(name).equals(label)) { + return name; + } + } + return null; + } + + /** + * + * + * @generated + */ + public String getEncoding() { + return encodingField.getText(); + } + + /** + * Returns the label for the specified type name. + * + * + * @generated + */ + protected String getLabel(String typeName) { + try { + return ArduinoEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type"); + } + catch(MissingResourceException mre) { + ArduinoEditorPlugin.INSTANCE.log(mre); + } + return typeName; + } + + /** + * + * + * @generated + */ + protected Collection getEncodings() { + if (encodings == null) { + encodings = new ArrayList(); + for (StringTokenizer stringTokenizer = new StringTokenizer(ArduinoEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens(); ) { + encodings.add(stringTokenizer.nextToken()); + } + } + return encodings; + } + } + + /** + * The framework calls this to create the contents of the wizard. + * + * + * @generated + */ + @Override + public void addPages() { + // Create a page, set the title, and the initial model file name. + // + newFileCreationPage = new ArduinoModelWizardNewFileCreationPage("Whatever", selection); + newFileCreationPage.setTitle(ArduinoEditorPlugin.INSTANCE.getString("_UI_ArduinoModelWizard_label")); + newFileCreationPage.setDescription(ArduinoEditorPlugin.INSTANCE.getString("_UI_ArduinoModelWizard_description")); + newFileCreationPage.setFileName(ArduinoEditorPlugin.INSTANCE.getString("_UI_ArduinoEditorFilenameDefaultBase") + "." + FILE_EXTENSIONS.get(0)); + addPage(newFileCreationPage); + + // Try and get the resource selection to determine a current directory for the file dialog. + // + if (selection != null && !selection.isEmpty()) { + // Get the resource... + // + Object selectedElement = selection.iterator().next(); + if (selectedElement instanceof IResource) { + // Get the resource parent, if its a file. + // + IResource selectedResource = (IResource)selectedElement; + if (selectedResource.getType() == IResource.FILE) { + selectedResource = selectedResource.getParent(); + } + + // This gives us a directory... + // + if (selectedResource instanceof IFolder || selectedResource instanceof IProject) { + // Set this for the container. + // + newFileCreationPage.setContainerFullPath(selectedResource.getFullPath()); + + // Make up a unique new name here. + // + String defaultModelBaseFilename = ArduinoEditorPlugin.INSTANCE.getString("_UI_ArduinoEditorFilenameDefaultBase"); + String defaultModelFilenameExtension = FILE_EXTENSIONS.get(0); + String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension; + for (int i = 1; ((IContainer)selectedResource).findMember(modelFilename) != null; ++i) { + modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension; + } + newFileCreationPage.setFileName(modelFilename); + } + } + } + initialObjectCreationPage = new ArduinoModelWizardInitialObjectCreationPage("Whatever2"); + initialObjectCreationPage.setTitle(ArduinoEditorPlugin.INSTANCE.getString("_UI_ArduinoModelWizard_label")); + initialObjectCreationPage.setDescription(ArduinoEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description")); + addPage(initialObjectCreationPage); + } + + /** + * Get the file from the page. + * + * + * @generated + */ + public IFile getModelFile() { + return newFileCreationPage.getModelFile(); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/.classpath b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/.classpath new file mode 100644 index 00000000..64c5e31b --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/.project b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/.project new file mode 100644 index 00000000..0e157150 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/.project @@ -0,0 +1,28 @@ + + + fr.obeo.dsl.arduino.gen.ui + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/.settings/org.eclipse.jdt.core.prefs b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..d1c0bf94 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,6 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/META-INF/MANIFEST.MF b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/META-INF/MANIFEST.MF new file mode 100644 index 00000000..a0cd1bca --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/META-INF/MANIFEST.MF @@ -0,0 +1,23 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Acceleo Gen Module IDE Plug-in +Bundle-SymbolicName: fr.obeo.dsl.arduino.gen.ui;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-Activator: fr.obeo.dsl.arduino.gen.ui.Activator +Bundle-Vendor: Eclipse Modeling Project +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.core.resources, + fr.obeo.dsl.arduino.gen, + org.eclipse.emf.ecore, + org.eclipse.emf.ecore.xmi, + org.eclipse.ocl, + org.eclipse.ocl.ecore, + org.eclipse.acceleo.model, + org.eclipse.acceleo.engine +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Bundle-ActivationPolicy: lazy +Eclipse-LazyStart: true +Export-Package: fr.obeo.dsl.arduino.gen.ui, + fr.obeo.dsl.arduino.gen.ui.common, + fr.obeo.dsl.arduino.gen.ui.popupMenus diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/build.properties b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/build.properties new file mode 100644 index 00000000..d0a0e71d --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/build.properties @@ -0,0 +1,7 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + icons/ + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/icons/default.gif b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/icons/default.gif new file mode 100644 index 00000000..6a04c491 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/icons/default.gif differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/plugin.xml b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/plugin.xml new file mode 100644 index 00000000..4713b5a1 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/plugin.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/src/fr/obeo/dsl/arduino/gen/ui/Activator.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/src/fr/obeo/dsl/arduino/gen/ui/Activator.java new file mode 100644 index 00000000..194fd45e --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/src/fr/obeo/dsl/arduino/gen/ui/Activator.java @@ -0,0 +1,66 @@ +/******************************************************************************* + * Copyright (c) 2008, 2012 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package fr.obeo.dsl.arduino.gen.ui; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle. + */ +public class Activator extends AbstractUIPlugin { + + /** + * The plug-in ID. + */ + public static final String PLUGIN_ID = "fr.obeo.dsl.arduino.gen.ui"; + + /** + * The shared instance. + */ + private static Activator plugin; + + /** + * The constructor. + */ + public Activator() { + } + + /**{@inheritDoc} + * + * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext) + * @generated + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /**{@inheritDoc} + * + * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext) + * @generated + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance. + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/src/fr/obeo/dsl/arduino/gen/ui/common/GenerateAll.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/src/fr/obeo/dsl/arduino/gen/ui/common/GenerateAll.java new file mode 100644 index 00000000..bf9fbc90 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/src/fr/obeo/dsl/arduino/gen/ui/common/GenerateAll.java @@ -0,0 +1,148 @@ +/******************************************************************************* + * Copyright (c) 2008, 2012 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package fr.obeo.dsl.arduino.gen.ui.common; + +import java.io.IOException; +import java.net.URL; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.List; + +import org.eclipse.emf.common.util.BasicMonitor; +import org.eclipse.core.resources.IContainer; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.Platform; +import org.eclipse.emf.common.util.URI; +import org.osgi.framework.Bundle; + + +/** + * Main entry point of the 'Gen' generation module. + */ +public class GenerateAll { + + /** + * The model URI. + */ + private URI modelURI; + + /** + * The output folder. + */ + private IContainer targetFolder; + + /** + * The other arguments. + */ + List arguments; + + /** + * Constructor. + * + * @param modelURI + * is the URI of the model. + * @param targetFolder + * is the output folder + * @param arguments + * are the other arguments + * @throws IOException + * Thrown when the output cannot be saved. + * @generated + */ + public GenerateAll(URI modelURI, IContainer targetFolder, List arguments) { + this.modelURI = modelURI; + this.targetFolder = targetFolder; + this.arguments = arguments; + } + + /** + * Launches the generation. + * + * @param monitor + * This will be used to display progress information to the user. + * @throws IOException + * Thrown when the output cannot be saved. + * @generated + */ + public void doGenerate(IProgressMonitor monitor) throws IOException { + if (!targetFolder.getLocation().toFile().exists()) { + targetFolder.getLocation().toFile().mkdirs(); + } + + // final URI template0 = getTemplateURI("fr.obeo.dsl.arduino.gen", new Path("/fr/obeo/dsl/arduino/gen/main/generate.emtl")); + // fr.obeo.dsl.arduino.gen.main.Generate gen0 = new fr.obeo.dsl.arduino.gen.main.Generate(modelURI, targetFolder.getLocation().toFile(), arguments) { + // protected URI createTemplateURI(String entry) { + // return template0; + // } + //}; + //gen0.doGenerate(BasicMonitor.toMonitor(monitor)); + monitor.subTask("Loading..."); + fr.obeo.dsl.arduino.gen.main.Generate gen0 = new fr.obeo.dsl.arduino.gen.main.Generate(modelURI, targetFolder.getLocation().toFile(), arguments); + monitor.worked(1); + String generationID = org.eclipse.acceleo.engine.utils.AcceleoLaunchingUtil.computeUIProjectID("fr.obeo.dsl.arduino.gen", "fr.obeo.dsl.arduino.gen.main.Generate", modelURI.toString(), targetFolder.getFullPath().toString(), new ArrayList()); + gen0.setGenerationID(generationID); + gen0.doGenerate(BasicMonitor.toMonitor(monitor)); + + + } + + /** + * Finds the template in the plug-in. Returns the template plug-in URI. + * + * @param bundleID + * is the plug-in ID + * @param relativePath + * is the relative path of the template in the plug-in + * @return the template URI + * @throws IOException + * @generated + */ + @SuppressWarnings("unchecked") + private URI getTemplateURI(String bundleID, IPath relativePath) throws IOException { + Bundle bundle = Platform.getBundle(bundleID); + if (bundle == null) { + // no need to go any further + return URI.createPlatformResourceURI(new Path(bundleID).append(relativePath).toString(), false); + } + URL url = bundle.getEntry(relativePath.toString()); + if (url == null && relativePath.segmentCount() > 1) { + Enumeration entries = bundle.findEntries("/", "*.emtl", true); + if (entries != null) { + String[] segmentsRelativePath = relativePath.segments(); + while (url == null && entries.hasMoreElements()) { + URL entry = entries.nextElement(); + IPath path = new Path(entry.getPath()); + if (path.segmentCount() > relativePath.segmentCount()) { + path = path.removeFirstSegments(path.segmentCount() - relativePath.segmentCount()); + } + String[] segmentsPath = path.segments(); + boolean equals = segmentsPath.length == segmentsRelativePath.length; + for (int i = 0; equals && i < segmentsPath.length; i++) { + equals = segmentsPath[i].equals(segmentsRelativePath[i]); + } + if (equals) { + url = bundle.getEntry(entry.getPath()); + } + } + } + } + URI result; + if (url != null) { + result = URI.createPlatformPluginURI(new Path(bundleID).append(new Path(url.getPath())).toString(), false); + } else { + result = URI.createPlatformResourceURI(new Path(bundleID).append(relativePath).toString(), false); + } + return result; + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/src/fr/obeo/dsl/arduino/gen/ui/popupMenus/AcceleoGenerateGenAction.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/src/fr/obeo/dsl/arduino/gen/ui/popupMenus/AcceleoGenerateGenAction.java new file mode 100644 index 00000000..4da67dcc --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen.ui/src/fr/obeo/dsl/arduino/gen/ui/popupMenus/AcceleoGenerateGenAction.java @@ -0,0 +1,112 @@ +/******************************************************************************* + * Copyright (c) 2008, 2012 Obeo. + * 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: + * Obeo - initial API and implementation + *******************************************************************************/ +package fr.obeo.dsl.arduino.gen.ui.popupMenus; + +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.util.Iterator; +import java.util.List; +import java.util.ArrayList; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IContainer; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.emf.common.util.URI; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.operation.IRunnableWithProgress; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import fr.obeo.dsl.arduino.gen.ui.Activator; +import fr.obeo.dsl.arduino.gen.ui.common.GenerateAll; +import org.eclipse.ui.IActionDelegate; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.actions.ActionDelegate; + +/** + * Gen code generation. + */ +public class AcceleoGenerateGenAction extends ActionDelegate implements IActionDelegate { + + /** + * Selected model files. + */ + protected List files; + + /**{@inheritDoc} + * + * @see org.eclipse.ui.actions.ActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection) + * @generated + */ + @SuppressWarnings("unchecked") + public void selectionChanged(IAction action, ISelection selection) { + if (selection instanceof IStructuredSelection) { + files = ((IStructuredSelection) selection).toList(); + } + } + + /**{@inheritDoc} + * + * @see org.eclipse.ui.actions.ActionDelegate#run(org.eclipse.jface.action.IAction) + * @generated + */ + public void run(IAction action) { + if (files != null) { + IRunnableWithProgress operation = new IRunnableWithProgress() { + public void run(IProgressMonitor monitor) { + try { + Iterator filesIt = files.iterator(); + while (filesIt.hasNext()) { + IFile model = (IFile)filesIt.next(); + URI modelURI = URI.createPlatformResourceURI(model.getFullPath().toString(), true); + try { + IContainer target = model.getProject().getFolder("src-gen"); + GenerateAll generator = new GenerateAll(modelURI, target, getArguments()); + generator.doGenerate(monitor); + } catch (IOException e) { + IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e); + Activator.getDefault().getLog().log(status); + } finally { + model.getProject().refreshLocal(IResource.DEPTH_INFINITE, monitor); + } + } + } catch (CoreException e) { + IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e); + Activator.getDefault().getLog().log(status); + } + } + }; + try { + PlatformUI.getWorkbench().getProgressService().run(true, true, operation); + } catch (InvocationTargetException e) { + IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e); + Activator.getDefault().getLog().log(status); + } catch (InterruptedException e) { + IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e); + Activator.getDefault().getLog().log(status); + } + } + } + + /** + * Computes the arguments of the generator. + * + * @return the arguments + * @generated + */ + protected List getArguments() { + return new ArrayList(); + } + +} \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/.classpath b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/.classpath new file mode 100644 index 00000000..bf1769bc --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/.project b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/.project new file mode 100644 index 00000000..3bf9ce00 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/.project @@ -0,0 +1,35 @@ + + + fr.obeo.dsl.arduino.gen + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.acceleo.ide.ui.acceleoBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.acceleo.ide.ui.acceleoNature + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/META-INF/MANIFEST.MF b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/META-INF/MANIFEST.MF new file mode 100644 index 00000000..5ba27e48 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/META-INF/MANIFEST.MF @@ -0,0 +1,23 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Acceleo Gen Module Runtime Plug-in +Bundle-SymbolicName: fr.obeo.dsl.arduino.gen +Bundle-Version: 1.0.0.qualifier +Bundle-Activator: fr.obeo.dsl.arduino.gen.Activator +Bundle-Vendor: Eclipse Modeling Project +Require-Bundle: org.eclipse.core.runtime, + fr.obeo.dsl.arduino, + org.eclipse.emf.ecore, + org.eclipse.emf.ecore.xmi, + org.eclipse.ocl, + org.eclipse.ocl.ecore, + org.eclipse.acceleo.common;bundle-version="3.3.0", + org.eclipse.acceleo.model;bundle-version="3.3.0", + org.eclipse.acceleo.profiler;bundle-version="3.3.0", + org.eclipse.acceleo.engine;bundle-version="3.3.0", + com.google.guava +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Bundle-ActivationPolicy: lazy +Eclipse-LazyStart: true +Export-Package: fr.obeo.dsl.arduino.gen.main + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/build.properties b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/build.properties new file mode 100644 index 00000000..dc056cb7 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + . +customBuildCallbacks = build.acceleo +jre.compilation.profile = JavaSE-1.6 diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/pom.xml b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/pom.xml new file mode 100644 index 00000000..0ee9e589 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/pom.xml @@ -0,0 +1,72 @@ + + + + 4.0.0 + + + fr.obeo.dsl.arduino + parent + 1.0.0-SNAPSHOT + ../../releng/fr.obeo.dsl.arduino.parent + + + fr.obeo.dsl.arduino.gen + eclipse-plugin + + Arduino Acceleo Generator + + + + + org.eclipse.tycho + tycho-source-plugin + + + org.apache.maven.plugins + maven-pmd-plugin + + + org.eclipse.acceleo + org.eclipse.acceleo.maven + 3.5.0-SNAPSHOT + + + compile + + acceleo-compile + + + + + false + true + + ${project.basedir} + + + src + target/classes + + + + + fr.obeo.dsl.arduino.ArduinoPackage + + org.eclipse.acceleo.maven.AcceleoURIHandler + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/src/fr/obeo/dsl/arduino/gen/Activator.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/src/fr/obeo/dsl/arduino/gen/Activator.java new file mode 100644 index 00000000..715124f9 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/src/fr/obeo/dsl/arduino/gen/Activator.java @@ -0,0 +1,82 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.gen; + +import org.eclipse.core.runtime.Plugin; +import org.eclipse.core.runtime.Status; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle. + */ +public class Activator extends Plugin { + + /** + * The plug-in ID. + */ + public static final String PLUGIN_ID = "fr.obeo.dsl.arduino.gen"; + + /** + * The shared instance. + */ + private static Activator plugin; + + /** + * The constructor. + */ + public Activator() { + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /** + * {@inheritDoc} + * + * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance. + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + /** + * A helper to log plugin errors. + * + * @param severity + * the error severity. + * @param message + * the error message. + * @param exception + * the error exception. + */ + public static void log(int severity, String message, Throwable exception) { + getDefault().getLog().log( + new Status(severity, PLUGIN_ID, message, exception)); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/src/fr/obeo/dsl/arduino/gen/main/ArduinoGenServices.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/src/fr/obeo/dsl/arduino/gen/main/ArduinoGenServices.java new file mode 100644 index 00000000..4db3b615 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/src/fr/obeo/dsl/arduino/gen/main/ArduinoGenServices.java @@ -0,0 +1,188 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.gen.main; + +import java.util.Iterator; + +import org.eclipse.emf.common.util.Enumerator; + +import fr.obeo.dsl.arduino.BinaryBooleanExpression; +import fr.obeo.dsl.arduino.BinaryBooleanOperatorKind; +import fr.obeo.dsl.arduino.BinaryIntegerExpression; +import fr.obeo.dsl.arduino.BinaryIntegerOperatorKind; +import fr.obeo.dsl.arduino.Constant; +import fr.obeo.dsl.arduino.Expression; +import fr.obeo.dsl.arduino.Instruction; +import fr.obeo.dsl.arduino.BinaryExpression; +import fr.obeo.dsl.arduino.ModuleGet; +import fr.obeo.dsl.arduino.Repeat; +import fr.obeo.dsl.arduino.Sketch; +import fr.obeo.dsl.arduino.UnaryBooleanOperatorKind; +import fr.obeo.dsl.arduino.UnaryIntegerOperatorKind; +import fr.obeo.dsl.arduino.Variable; + +public class ArduinoGenServices { + + public int getRepeatInstructionIndex(Sketch sketch, Repeat repeat) { + int i = 0; + for (Iterator iterator = sketch.eAllContents(); iterator.hasNext();) { + Instruction instruction = (Instruction) iterator.next(); + i++; + if (instruction instanceof Repeat && instruction.equals(repeat)) { + return i; + } + } + + return 0; + } + + public String getValue(Expression value) { + if (value instanceof Variable) { + return ((Variable) value).getName(); + } + if (value instanceof Constant) { + return "Constant";//value.getValue(); + } + if (value instanceof BinaryBooleanExpression) { + return "(" + getValue(((BinaryExpression) value).getLeft()) + + getOperator(((BinaryBooleanExpression) value).getOperator()) + + getValue(((BinaryExpression) value).getRight()) + ")"; + } + if (value instanceof BinaryIntegerExpression) { + return "(" + getValue(((BinaryExpression) value).getLeft()) + + getOperator(((BinaryIntegerExpression) value).getOperator()) + + getValue(((BinaryExpression) value).getRight()) + ")"; + } + if (value instanceof ModuleGet) { + return ((ModuleGet) value).getModule().getName().replaceAll(" ", ""); + } + return null; + } + + public String getOperator(Enumerator operator) { + return "operator not supported"; + } + public String getOperator(BinaryIntegerOperatorKind operator) { + switch (operator) { + case DIV: + return "/"; + case MAX: + return "max"; + case MIN: + return "min"; + case MINUS: + return "-"; + case MUL: + return "*"; + case PLUS: + return "+"; + case POURCENT: + return "%"; + } + return null; + } + + public String getOperator(UnaryIntegerOperatorKind operator) { + switch (operator) { + case MINUS: + return "-"; + case SQUARE_ROOT: + return "sqrt"; + } + return null; + } + + public String getOperator(UnaryBooleanOperatorKind operator) { + switch (operator) { + case NOT: + return "!"; + } + return null; + } + + public String getOperator(BinaryBooleanOperatorKind operator) { + switch (operator) { + case AND: + return "&"; + case DIFFERENT: + return "!="; + case EQUAL: + return "=="; + case OR: + return "or"; + case SUP: + return ">"; + case SUP_OR_EQUAL: + return ">="; + case INF: + return "<"; + case INF_OR_EQUAL: + return "<="; + } + return null; + } + + public Enumerator getOperator(String operator) { + + if (operator.equals("/") || operator.equals("div")) { + return BinaryIntegerOperatorKind.DIV; + } + if (operator.equals("max")) { + return BinaryIntegerOperatorKind.MAX; + } + if (operator.equals("min")) { + return BinaryIntegerOperatorKind.MIN; + } + if (operator.equals("-") || operator.equals("minus")) { + return BinaryIntegerOperatorKind.MINUS; + } + if (operator.equals("*") || operator.equals("mul")) { + return BinaryIntegerOperatorKind.MUL; + } + if (operator.equals("+") || operator.equals("plus")) { + return BinaryIntegerOperatorKind.PLUS; + } + if (operator.equals("%") || operator.equals("pourcent")) { + return BinaryIntegerOperatorKind.POURCENT; + } + + if (operator.equals("&") || operator.equals("and")) { + return BinaryBooleanOperatorKind.AND; + } + if (operator.equals("!=") || operator.equals("diff")) { + return BinaryBooleanOperatorKind.DIFFERENT; + } + if (operator.equals("==") || operator.equals("equal")) { + return BinaryBooleanOperatorKind.EQUAL; + } + if (operator.equals("<") || operator.equals("lower")) { + return BinaryBooleanOperatorKind.INF; + } + if (operator.equals("<=") || operator.equals("lowerOrEqual")) { + return BinaryBooleanOperatorKind.INF_OR_EQUAL; + } + if (operator.equals("or")) { + return BinaryBooleanOperatorKind.OR; + } + if (operator.equals(">") || operator.equals("upper")) { + return BinaryBooleanOperatorKind.SUP; + } + if (operator.equals(">=") || operator.equals("upperOrEqual")) { + return BinaryBooleanOperatorKind.SUP_OR_EQUAL; + } + if (operator.equals("not")) { + return UnaryBooleanOperatorKind.NOT; + } + + return null; + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/src/fr/obeo/dsl/arduino/gen/main/Generate.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/src/fr/obeo/dsl/arduino/gen/main/Generate.java new file mode 100644 index 00000000..4faa99ad --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/src/fr/obeo/dsl/arduino/gen/main/Generate.java @@ -0,0 +1,429 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.gen.main; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.acceleo.engine.event.IAcceleoTextGenerationListener; +import org.eclipse.acceleo.engine.generation.strategy.IAcceleoGenerationStrategy; +import org.eclipse.acceleo.engine.service.AbstractAcceleoGenerator; +import org.eclipse.emf.common.util.BasicMonitor; +import org.eclipse.emf.common.util.Monitor; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.ResourceSet; + +/** + * Entry point of the 'Generate' generation module. + * + * @generated + */ +public class Generate extends AbstractAcceleoGenerator { + /** + * The name of the module. + * + * @generated + */ + public static final String MODULE_FILE_NAME = "/fr/obeo/dsl/arduino/gen/main/generate"; + + /** + * The name of the templates that are to be generated. + * + * @generated + */ + public static final String[] TEMPLATE_NAMES = { "generateSketch" }; + + /** + * The list of properties files from the launch parameters (Launch + * configuration). + * + * @generated + */ + private List propertiesFiles = new ArrayList(); + + /** + * Allows the public constructor to be used. Note that a generator created + * this way cannot be used to launch generations before one of + * {@link #initialize(EObject, File, List)} or + * {@link #initialize(URI, File, List)} is called. + *

+ * The main reason for this constructor is to allow clients of this + * generation to call it from another Java file, as it allows for the + * retrieval of {@link #getProperties()} and + * {@link #getGenerationListeners()}. + *

+ * + * @generated + */ + public Generate() { + // Empty implementation + } + + /** + * This allows clients to instantiates a generator with all required + * information. + * + * @param modelURI + * URI where the model on which this generator will be used is + * located. + * @param targetFolder + * This will be used as the output folder for this generation : + * it will be the base path against which all file block URLs + * will be resolved. + * @param arguments + * If the template which will be called requires more than one + * argument taken from the model, pass them here. + * @throws IOException + * This can be thrown in three scenarios : the module cannot be + * found, it cannot be loaded, or the model cannot be loaded. + * @generated + */ + public Generate(URI modelURI, File targetFolder, + List arguments) throws IOException { + initialize(modelURI, targetFolder, arguments); + } + + /** + * This allows clients to instantiates a generator with all required + * information. + * + * @param model + * We'll iterate over the content of this element to find Objects + * matching the first parameter of the template we need to call. + * @param targetFolder + * This will be used as the output folder for this generation : + * it will be the base path against which all file block URLs + * will be resolved. + * @param arguments + * If the template which will be called requires more than one + * argument taken from the model, pass them here. + * @throws IOException + * This can be thrown in two scenarios : the module cannot be + * found, or it cannot be loaded. + * @generated + */ + public Generate(EObject model, File targetFolder, + List arguments) throws IOException { + initialize(model, targetFolder, arguments); + } + + /** + * This can be used to launch the generation from a standalone application. + * + * @param args + * Arguments of the generation. + * @generated + */ + public static void main(String[] args) { + try { + if (args.length < 2) { + System.out.println("Arguments not valid : {model, folder}."); + } else { + URI modelURI = URI.createFileURI(args[0]); + File folder = new File(args[1]); + + List arguments = new ArrayList(); + + /* + * If you want to change the content of this method, do NOT forget to change the "@generated" + * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation + * of the Acceleo module with the main template that has caused the creation of this class will + * revert your modifications. + */ + + /* + * Add in this list all the arguments used by the starting point of the generation + * If your main template is called on an element of your model and a String, you can + * add in "arguments" this "String" attribute. + */ + + Generate generator = new Generate(modelURI, folder, arguments); + + /* + * Add the properties from the launch arguments. + * If you want to programmatically add new properties, add them in "propertiesFiles" + * You can add the absolute path of a properties files, or even a project relative path. + * If you want to add another "protocol" for your properties files, please override + * "getPropertiesLoaderService(AcceleoService)" in order to return a new property loader. + * The behavior of the properties loader service is explained in the Acceleo documentation + * (Help -> Help Contents). + */ + + for (int i = 2; i < args.length; i++) { + generator.addPropertiesFile(args[i]); + } + + generator.doGenerate(new BasicMonitor()); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + + /** + * Launches the generation described by this instance. + * + * @param monitor + * This will be used to display progress information to the user. + * @throws IOException + * This will be thrown if any of the output files cannot be + * saved to disk. + * @generated + */ + @Override + public void doGenerate(Monitor monitor) throws IOException { + /* + * TODO if you wish to change the generation as a whole, override this. The default behavior should + * be sufficient in most cases. If you want to change the content of this method, do NOT forget to + * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, + * any compilation of the Acceleo module with the main template that has caused the creation of this + * class will revert your modifications. If you encounter a problem with an unresolved proxy during the + * generation, you can remove the comments in the following instructions to check for problems. Please + * note that those instructions may have a significant impact on the performances. + */ + + //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); + + /* + * If you want to check for potential errors in your models before the launch of the generation, you + * use the code below. + */ + + //if (model != null && model.eResource() != null) { + // List errors = model.eResource().getErrors(); + // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { + // System.err.println(diagnostic.toString()); + // } + //} + + super.doGenerate(monitor); + } + + /** + * If this generator needs to listen to text generation events, listeners + * can be returned from here. + * + * @return List of listeners that are to be notified when text is generated + * through this launch. + * @generated + */ + @Override + public List getGenerationListeners() { + List listeners = super.getGenerationListeners(); + /* + * TODO if you need to listen to generation event, add listeners to the list here. If you want to change + * the content of this method, do NOT forget to change the "@generated" tag in the Javadoc of this method + * to "@generated NOT". Without this new tag, any compilation of the Acceleo module with the main template + * that has caused the creation of this class will revert your modifications. + */ + return listeners; + } + + /** + * If you need to change the way files are generated, this is your entry + * point. + *

+ * The default is + * {@link org.eclipse.acceleo.engine.generation.strategy.DefaultStrategy}; + * it generates files on the fly. If you only need to preview the results, + * return a new + * {@link org.eclipse.acceleo.engine.generation.strategy.PreviewStrategy}. + * Both of these aren't aware of the running Eclipse and can be used + * standalone. + *

+ *

+ * If you need the file generation to be aware of the workspace (A typical + * example is when you wanna override files that are under clear case or any + * other VCS that could forbid the overriding), then return a new + * {@link org.eclipse.acceleo.engine.generation.strategy.WorkspaceAwareStrategy} + * . Note, however, that this cannot be used standalone. + *

+ *

+ * All three of these default strategies support merging through JMerge. + *

+ * + * @return The generation strategy that is to be used for generations + * launched through this launcher. + * @generated + */ + @Override + public IAcceleoGenerationStrategy getGenerationStrategy() { + return super.getGenerationStrategy(); + } + + /** + * This will be called in order to find and load the module that will be + * launched through this launcher. We expect this name not to contain file + * extension, and the module to be located beside the launcher. + * + * @return The name of the module that is to be launched. + * @generated + */ + @Override + public String getModuleName() { + return MODULE_FILE_NAME; + } + + /** + * If the module(s) called by this launcher require properties files, return + * their qualified path from here.Take note that the first added properties + * files will take precedence over subsequent ones if they contain + * conflicting keys. + * + * @return The list of properties file we need to add to the generation + * context. + * @see java.util.ResourceBundle#getBundle(String) + * @generated + */ + @Override + public List getProperties() { + /* + * If you want to change the content of this method, do NOT forget to change the "@generated" + * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation + * of the Acceleo module with the main template that has caused the creation of this class will + * revert your modifications. + */ + + /* + * TODO if your generation module requires access to properties files, add their qualified path to the list here. + * + * Properties files can be located in an Eclipse plug-in or in the file system (all Acceleo projects are Eclipse + * plug-in). In order to use properties files located in an Eclipse plugin, you need to add the path of the properties + * files to the "propertiesFiles" list: + * + * final String prefix = "platform:/plugin/"; + * final String pluginName = "org.eclipse.acceleo.module.sample"; + * final String packagePath = "/org/eclipse/acceleo/module/sample/properties/"; + * final String fileName = "default.properties"; + * propertiesFiles.add(prefix + pluginName + packagePath + fileName); + * + * With this mechanism, you can load properties files from your plugin or from another plugin. + * + * You may want to load properties files from the file system, for that you need to add the absolute path of the file: + * + * propertiesFiles.add("C:\Users\MyName\MyFile.properties"); + * + * If you want to let your users add properties files located in the same folder as the model: + * + * if (EMFPlugin.IS_ECLIPSE_RUNNING && model != null && model.eResource() != null) { + * propertiesFiles.addAll(AcceleoEngineUtils.getPropertiesFilesNearModel(model.eResource())); + * } + * + * To learn more about Properties Files, have a look at the Acceleo documentation (Help -> Help Contents). + */ + return propertiesFiles; + } + + /** + * Adds a properties file in the list of properties files. + * + * @param propertiesFile + * The properties file to add. + * @generated + * @since 3.1 + */ + @Override + public void addPropertiesFile(String propertiesFile) { + this.propertiesFiles.add(propertiesFile); + } + + /** + * This will be used to get the list of templates that are to be launched by + * this launcher. + * + * @return The list of templates to call on the module + * {@link #getModuleName()}. + * @generated + */ + @Override + public String[] getTemplateNames() { + return TEMPLATE_NAMES; + } + + /** + * This can be used to update the resource set's package registry with all + * needed EPackages. + * + * @param resourceSet + * The resource set which registry has to be updated. + * @generated + */ + @Override + public void registerPackages(ResourceSet resourceSet) { + super.registerPackages(resourceSet); + + /* + * If you want to change the content of this method, do NOT forget to change the "@generated" + * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation + * of the Acceleo module with the main template that has caused the creation of this class will + * revert your modifications. + */ + + /* + * If you need additional package registrations, you can register them here. The following line + * (in comment) is an example of the package registration for UML. + * + * You can use the method "isInWorkspace(Class c)" to check if the package that you are about to + * register is in the workspace. + * + * To register a package properly, please follow the following conventions: + * + * If the package is located in another plug-in, already installed in Eclipse. The following content should + * have been generated at the beginning of this method. Do not register the package using this mechanism if + * the metamodel is located in the workspace. + * + * if (!isInWorkspace(UMLPackage.class)) { + * // The normal package registration if your metamodel is in a plugin. + * resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE); + * } + * + * If the package is located in another project in your workspace, the plugin containing the package has not + * been register by EMF and Acceleo should register it automatically. If you want to use the generator in + * stand alone, the regular registration (seen a couple lines before) is needed. + * + * To learn more about Package Registration, have a look at the Acceleo documentation (Help -> Help Contents). + */ + } + + /** + * This can be used to update the resource set's resource factory registry + * with all needed factories. + * + * @param resourceSet + * The resource set which registry has to be updated. + * @generated + */ + @Override + public void registerResourceFactories(ResourceSet resourceSet) { + super.registerResourceFactories(resourceSet); + /* + * If you want to change the content of this method, do NOT forget to change the "@generated" + * tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation + * of the Acceleo module with the main template that has caused the creation of this class will + * revert your modifications. + */ + + /* + * TODO If you need additional resource factories registrations, you can register them here. the following line + * (in comment) is an example of the resource factory registration for UML. + * + * If you want to use the generator in stand alone, the resource factory registration will be required. + * + * To learn more about the registration of Resource Factories, have a look at the Acceleo documentation (Help -> Help Contents). + */ + + // resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(UMLResource.FILE_EXTENSION, UMLResource.Factory.INSTANCE); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/src/fr/obeo/dsl/arduino/gen/main/arduinoservices.mtl b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/src/fr/obeo/dsl/arduino/gen/main/arduinoservices.mtl new file mode 100644 index 00000000..4a12acef --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/src/fr/obeo/dsl/arduino/gen/main/arduinoservices.mtl @@ -0,0 +1,18 @@ +[comment encoding = UTF-8 /] +[module arduinoservices('http://www.obeo.fr/arduino')/] + +[query public getRepeatInstructionIndex(arg0 : Sketch, arg1 : Repeat) : Integer + = invoke('fr.obeo.dsl.arduino.gen.main.ArduinoGenServices', 'getRepeatInstructionIndex(fr.obeo.dsl.arduino.Sketch, fr.obeo.dsl.arduino.Repeat)', Sequence{arg0,arg1}) +/] + +[query public getOperator(arg0 : BinaryIntegerOperatorKind) : String + = invoke('fr.obeo.dsl.arduino.gen.main.ArduinoGenServices', 'getOperator(fr.obeo.dsl.arduino.BinaryIntegerOperatorKind)', Sequence{arg0}) +/] + +[query public getOperator(arg0 : BinaryBooleanOperatorKind) : String + = invoke('fr.obeo.dsl.arduino.gen.main.ArduinoGenServices', 'getOperator(fr.obeo.dsl.arduino.BinaryBooleanOperatorKind)', Sequence{arg0}) +/] + +[query public getValue(arg0 : Expression) : String + = invoke('fr.obeo.dsl.arduino.gen.main.ArduinoGenServices', 'getValue(fr.obeo.dsl.arduino.Expression)', Sequence{arg0}) +/] \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/src/fr/obeo/dsl/arduino/gen/main/generate.mtl b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/src/fr/obeo/dsl/arduino/gen/main/generate.mtl new file mode 100644 index 00000000..dd919423 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/src/fr/obeo/dsl/arduino/gen/main/generate.mtl @@ -0,0 +1,258 @@ +[comment encoding = UTF-8 /] +[module generate('http://www.obeo.fr/arduino')] +[import fr::obeo::dsl::arduino::gen::main::arduinoservices /] + + +[template public generateSketch(sketch : Sketch)] + +[comment @main/] +[genIno()/] +[genMakefile()/] +[/template] + +[template public genIno (sketch : Sketch) ] +[file (sketch.getVariableName()+'.ino', false, 'UTF-8')] +[for (library : Library | sketch.eAllContents("ModuleAssignment").module->select(library<>arduino::Library::none).library->asOrderedSet())] +#include <[library.toString().toUpperFirst()/].h> +[/for] +[for (mod : Module | sketch.eAllContents("ModuleInstruction").module->asOrderedSet())] +[if (mod.library<>arduino::Library::music)] +int [mod.getVariableName()/] = [sketch.getPinId(mod)/]; +[/if] +[/for] +[for (mod : Module | sketch.eAllContents("ModuleAssignment").module->select(library<>arduino::Library::none)->asOrderedSet())] +[mod.library.toString().toUpperFirst()/] [mod.getVariableName()/]; +[/for] +[for (mod : Module | sketch.eAllContents("ModuleGet").module->select(m |m.oclIsKindOf(Sensor))->asOrderedSet())] +int [mod.getVariableName()/] = [sketch.getPinId(mod)/]; +[/for] +[for (instruction : Repeat | getRepeatInstructions(sketch))] +int iter_[eContainer(arduino::Sketch).getRepeatInstructionIndex(instruction)/]; +[/for] +[for (instruction : VariableDeclaration | sketch.eAllContents("VariableDeclaration"))] +[if (instruction.variable.oclIsTypeOf(IntegerVariable))]int [instruction.variable.name/];[/if] +[if (instruction.variable.oclIsTypeOf(BooleanVariable))]short unsigned int [instruction.variable.name/];[/if] +[/for] + +void setup() { +[if (sketch.eAllContents("ModuleAssignment").module.library->select(lib|lib = arduino::Library::music)->asOrderedSet()->size()>=1)] + music.init(); +[/if] +[for (mod : Module | sketch.eAllContents("ModuleAssignment").module->asOrderedSet())] +[if (mod.library<>arduino::Library::music)] + pinMode([mod.getVariableName()/], OUTPUT); +[/if] +[/for] +[for (mod : Module | sketch.eAllContents("ModuleAssignment").module->select(library<>arduino::Library::none)->asOrderedSet())] + [mod.getVariableName()/].attach([sketch.getPinId(mod)/]); +[/for] +[for (instruction : VariableDeclaration | sketch.eAllContents("VariableDeclaration"))] +[if (instruction.variable.oclIsTypeOf(IntegerVariable))][instruction.variable.name/] = [instruction.variable.oclAsType(IntegerVariable).initialValue/];[/if] +[if (instruction.variable.oclIsTypeOf(BooleanVariable))][instruction.variable.name/] = [instruction.variable.oclAsType(BooleanVariable).initialValue/];[/if] +[/for] +} + +// the loop routine runs over and over again forever: +void loop() { + [sketch.next.genINO()/] +} +[/file] +[/template] + +[template public genINO(i : Instruction)post (trim())] +[i.generateInstruction()/] +[if (not i.oclIsInvalid() and not i.next.oclIsInvalid() and not i.next.oclIsKindOf(arduino::Sketch))] +[genINO(i.next)/] +[/if] +[/template] + + +[template public genMakefile (sketch : Sketch) ] +[file ('Makefile', false, 'UTF-8')] +BOARD_TAG = uno +ARDUINO_PORT = /dev/ttyACM0 +ARDUINO_LIBS = [for (library : Library | sketch.eAllContents("ModuleAssignment").module->select(library<>arduino::Library::none).library->asOrderedSet())][library.toString().toUpperFirst()/][/for] + +include /usr/share/arduino/Arduino.mk +[/file] +[/template] + +[template public generateInstruction(instruction : Delay)post (trim())] +delay([instruction.value/]); +[/template] + +[template public generateInstruction(instruction : ModuleAssignment)post (trim())] +[if (instruction.module.library=arduino::Library::music)] +[if (instruction.operand.oclIsTypeOf(BooleanConstant) and instruction.operand.oclAsType(BooleanConstant).value=false)] + music.play(); +[else] + music.pause(); +[/if] +[else] +digitalWrite([instruction.module.getVariableName()/], [getStatus(instruction)/]); +[/if] + +[/template] + +[template public generateInstruction(instruction : ModuleGet)post (trim())] +[instruction.module.getVariableName()/]_value +[/template] + +[template private getStatus(instruction : ModuleAssignment)post (trim())] +[if ((not instruction.operand.oclIsInvalid()) and instruction.operand.oclIsTypeOf(BooleanConstant))] + [if (instruction.operand.oclAsType(BooleanConstant).value=false)] +HIGH + [else] +LOW + [/if] +[else] + [if (instruction.operand.oclIsTypeOf(IntegerConstant))] +[instruction.operand.oclAsType(IntegerConstant).value/] + [else] + [if (instruction.operand.oclIsTypeOf(ModuleGet))] +[generateInstruction(instruction)/] + [/if] + [/if] +[/if] +[/template] + +[template public generateInstruction(instruction : ModuleInstruction)post (trim())] +[if (instruction.module.kind=ModuleKind::digital)] +digitalRead([instruction.module.getVariableName()/]) +[else] +analogRead([instruction.module.getVariableName()/]) +[/if] + +[/template] + +[template public generateInstruction(instruction : Repeat)post (trim())] +[let index : Integer = eContainer(arduino::Sketch).getRepeatInstructionIndex(instruction)] +for (iter_[index/]=0; iter_[index/] < ( [instruction.iteration/] ); ++iter_[index/] ) +{ + [instruction.instructions->first().genINO()/] +} +[/let] +[/template] + +[template public generateInstruction(instruction : While)post (trim())] +{ + [instruction.generateContainedModuleGet()/] + while ([instruction.condition.generateExpression()/]) + { + [instruction.instructions->first().genINO()/] + } +} +[/template] + +[template public generateInstruction(instruction : If)post (trim())] +{//IF + [instruction.generateContainedModuleGet()/] + if ([instruction.condition.generateExpression()/]) + { + [instruction.instructions->first().genINO()/] + } +//endIf +} +[/template] + +[template public generateContainedModuleGet(instruction : If)post (trim())] +[if (((not instruction.condition.oclIsInvalid()) and instruction.condition.oclIsKindOf(ModuleGet)) )] +int [instruction.condition.oclAsType(ModuleGet).module.getVariableName()/]_value = digitalRead([instruction.condition.oclAsType(ModuleGet).module.getVariableName()/]); +[/if] +[if ((not instruction.condition.oclIsInvalid()) + and + (instruction.condition.oclIsKindOf(BinaryBooleanExpression) + and instruction.condition.oclAsType(BinaryBooleanExpression).left.oclIsKindOf(ModuleGet)) + )] +int [instruction.condition.oclAsType(BinaryBooleanExpression).left.oclAsType(ModuleGet).module.getVariableName()/]_value = digitalRead([instruction.condition.oclAsType(BinaryBooleanExpression).left.oclAsType(ModuleGet).module.getVariableName()/]); +[/if] +[if ((not instruction.condition.oclIsInvalid()) + and + (instruction.condition.oclIsKindOf(BinaryBooleanExpression) + and instruction.condition.oclAsType(BinaryBooleanExpression).right.oclIsKindOf(ModuleGet)) + )] +int [instruction.condition.oclAsType(BinaryBooleanExpression).right.oclAsType(ModuleGet).module.getVariableName()/]_value = digitalRead([instruction.condition.oclAsType(BinaryBooleanExpression).right.oclAsType(ModuleGet).module.getVariableName()/]); +[/if] +[/template] + +[template public generateContainedModuleGet(instruction : While)post (trim())] +[if (((not instruction.condition.oclIsInvalid()) and instruction.condition.oclIsKindOf(ModuleGet)) )] +int [instruction.condition.oclAsType(ModuleGet).module.getVariableName()/]_value = digitalRead([instruction.condition.oclAsType(ModuleGet).module.getVariableName()/]); +[/if] +[if ((not instruction.condition.oclIsInvalid()) + and + (instruction.condition.oclIsKindOf(BinaryBooleanExpression) + and instruction.condition.oclAsType(BinaryBooleanExpression).left.oclIsKindOf(ModuleGet)) + )] +int [instruction.condition.oclAsType(BinaryBooleanExpression).left.oclAsType(ModuleGet).module.getVariableName()/]_value = digitalRead([instruction.condition.oclAsType(BinaryBooleanExpression).left.oclAsType(ModuleGet).module.getVariableName()/]); +[/if] +[if ((not instruction.condition.oclIsInvalid()) + and + (instruction.condition.oclIsKindOf(BinaryBooleanExpression) + and instruction.condition.oclAsType(BinaryBooleanExpression).right.oclIsKindOf(ModuleGet)) + )] +int [instruction.condition.oclAsType(BinaryBooleanExpression).right.oclAsType(ModuleGet).module.getVariableName()/]_value = digitalRead([instruction.condition.oclAsType(BinaryBooleanExpression).right.oclAsType(ModuleGet).module.getVariableName()/]); +[/if] +[/template] + + + +[comment][template public generateInstruction(instruction : Level)post (trim())] +[if (instruction.module.library=arduino::Library::servo)] +[instruction.module.getVariableName()/].write([instruction.level.generateInstruction()/]); +[else] +analogWrite([instruction.eContainer(arduino::Sketch).getPinId(instruction.module)/],255-([instruction.level.generateInstruction()/])); +[/if] +[/template][/comment] + + + +[template public generateInstruction(instruction : IntegerVariable)post (trim())] +[instruction.getValue()/] +[/template] + +[template public generateInstruction(instruction : BooleanVariable)post (trim())] +[instruction.getValue()/] +[/template] + +[template public generateInstruction(instruction : Sketch)post (trim())] +[/template] + +[template public generateExpression(expression : VariableRef)post (trim())] +[expression.variable.name/]; +[/template] + +[template public generateExpression(expression : BinaryIntegerExpression)post (trim())] +([expression.left.generateExpression()/] [expression.operator.getOperator()/] [expression.right.generateExpression()/]) +[/template] + +[template public generateExpression(expression : BinaryBooleanExpression)post (trim())] +([expression.left.generateExpression()/] [expression.operator.getOperator()/] [expression.right.generateExpression()/]) +[/template] + +[template public generateExpression(expression : ModuleGet)post (trim())] +[expression.module.getVariableName()/] +[/template] + +[template public generateExpression(instruction : IntegerConstant)post (trim())] +[instruction.value/] +[/template] + +[template public generateExpression(instruction : BooleanConstant)post (trim())] +[instruction.value/] +[/template] + +[template public generateExpression(expression : Expression)post (trim())] +Generation error for [expression/] +[/template] + +[template public generateInstruction(instruction : Instruction)] +Generation error for [instruction/] +[/template] + + +[query public getPinId (sketch : Sketch, mod : Module) : Integer = sketch.hardware.connectors->select(c| c.module = mod)->first().pin.id/] + +[query public getVariableName (element : NamedElement) : String = element.name.replaceAll(' ', '')/] + +[query public getRepeatInstructions (sketch : Sketch) : OrderedSet(Repeat) = sketch.eAllContents("Repeat")->asOrderedSet()/] diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/tasks/generate.xml b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/tasks/generate.xml new file mode 100644 index 00000000..1c1eee1c --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/tasks/generate.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/tasks/generateTarget.xml b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/tasks/generateTarget.xml new file mode 100644 index 00000000..a403c882 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.gen/tasks/generateTarget.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/.classpath b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/.classpath new file mode 100644 index 00000000..098194ca --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/.gitignore b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/.gitignore new file mode 100644 index 00000000..5e56e040 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/.gitignore @@ -0,0 +1 @@ +/bin diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/.project b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/.project new file mode 100644 index 00000000..54d6afb7 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/.project @@ -0,0 +1,28 @@ + + + fr.obeo.dsl.arduino.preferences + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/.settings/org.eclipse.jdt.core.prefs b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..f42de363 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/META-INF/MANIFEST.MF b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/META-INF/MANIFEST.MF new file mode 100644 index 00000000..3822afd3 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/META-INF/MANIFEST.MF @@ -0,0 +1,14 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Preferences +Bundle-SymbolicName: fr.obeo.dsl.arduino.preferences;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-Activator: fr.obeo.dsl.arduino.preferences.ArduinoPreferencesPlugin +Bundle-Vendor: Obeo +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.sirius.ui, + org.eclipse.ui.ide +Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Bundle-ActivationPolicy: lazy +Export-Package: fr.obeo.dsl.arduino.preferences diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/build.properties b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/build.properties new file mode 100644 index 00000000..e9863e28 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/build.properties @@ -0,0 +1,5 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/plugin.xml b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/plugin.xml new file mode 100644 index 00000000..11293470 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/plugin.xml @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/pom.xml b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/pom.xml new file mode 100644 index 00000000..be8bbc3a --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/pom.xml @@ -0,0 +1,42 @@ + + + + 4.0.0 + + + fr.obeo.dsl.arduino + parent + 1.0.0-SNAPSHOT + ../../releng/fr.obeo.dsl.arduino.parent + + + fr.obeo.dsl.arduino.preferences + eclipse-plugin + + Arduino Designer Preferences + + + + + org.eclipse.tycho + tycho-source-plugin + + + org.apache.maven.plugins + maven-pmd-plugin + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/src/fr/obeo/dsl/arduino/preferences/ArduinoPreferences.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/src/fr/obeo/dsl/arduino/preferences/ArduinoPreferences.java new file mode 100644 index 00000000..f7d75c44 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/src/fr/obeo/dsl/arduino/preferences/ArduinoPreferences.java @@ -0,0 +1,66 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.preferences; + +import org.eclipse.jface.preference.IPreferenceStore; + +public class ArduinoPreferences { + + /** + * Keys for user answer preference in preference store. + */ + public static final String ARDUINO_SDK_ID = "arduino_sdk_preference"; + public static final String ARDUINO_SERIAL_PORT = "arduino_serial_port_preference"; + + /** + * The preference store. + */ + private IPreferenceStore preferenceStore = ArduinoPreferencesPlugin + .getDefault().getPreferenceStore(); + + /** + * Store the Arduino SDK path. + * + * @param answerId + * The answer is a string + */ + public void storeArduinoSdk(String answerId) { + preferenceStore.setValue(ARDUINO_SDK_ID, answerId); + } + + /** + * Get Arduino sdk. + * + * @return String representing the Arduino SDK path + */ + public String getArduinoSdk() { + return preferenceStore.getString(ARDUINO_SDK_ID); + } + + /** + * Get Arduino serial port. + * + * @return String representing the Arduino serial port + */ + public String getArduinoSerialPort() { + return preferenceStore.getString(ARDUINO_SERIAL_PORT); + } + + /** + * Store the Arduino SDK path. + * + * @param answerId + * The answer is a string + */ + public void storeArduinoSerialPort(String answerPort) { + preferenceStore.setValue(ARDUINO_SERIAL_PORT, answerPort); + } +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/src/fr/obeo/dsl/arduino/preferences/ArduinoPreferencesPage.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/src/fr/obeo/dsl/arduino/preferences/ArduinoPreferencesPage.java new file mode 100644 index 00000000..78f88e16 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/src/fr/obeo/dsl/arduino/preferences/ArduinoPreferencesPage.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.preferences; + +import org.eclipse.jface.preference.DirectoryFieldEditor; +import org.eclipse.jface.preference.FieldEditorPreferencePage; +import org.eclipse.jface.preference.StringFieldEditor; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchPreferencePage; + +public class ArduinoPreferencesPage extends FieldEditorPreferencePage implements + IWorkbenchPreferencePage { + + public ArduinoPreferencesPage() { + super(GRID); + } + + @Override + protected Control createContents(Composite parent) { + Control control = super.createContents(parent); + return control; + } + + private void createArduinoSdk(Composite parent) { + DirectoryFieldEditor sdk = new DirectoryFieldEditor( + ArduinoPreferences.ARDUINO_SDK_ID, "Arduino SDK :", + getFieldEditorParent()); + addField(sdk); + + StringFieldEditor port = new StringFieldEditor( + ArduinoPreferences.ARDUINO_SERIAL_PORT, + "Arduino Serial Port :", getFieldEditorParent()); + addField(port); + } + + public void init(IWorkbench workbench) { + setPreferenceStore(ArduinoPreferencesPlugin.getDefault() + .getPreferenceStore()); + + setDescription("Give the path of the Arduino SDK installed on your computer (e.g. /home/user/path/arduino/arduino-1.0.5/) and the serial port of the Arduino linked to your computer (e.g. com3, /dev/ttyACM0, /dev/tty.usbmodem1421, ...).\n"); + } + + @Override + protected void createFieldEditors() { + createArduinoSdk((Composite) getControl()); + } +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/src/fr/obeo/dsl/arduino/preferences/ArduinoPreferencesPlugin.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/src/fr/obeo/dsl/arduino/preferences/ArduinoPreferencesPlugin.java new file mode 100644 index 00000000..e102cafc --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/src/fr/obeo/dsl/arduino/preferences/ArduinoPreferencesPlugin.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.preferences; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class ArduinoPreferencesPlugin extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "fr.obeo.dsl.arduino.preferences"; //$NON-NLS-1$ + + // The shared instance + private static ArduinoPreferencesPlugin plugin; + + /** + * The constructor + */ + public ArduinoPreferencesPlugin() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static ArduinoPreferencesPlugin getDefault() { + return plugin; + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/src/fr/obeo/dsl/arduino/preferences/ArduinoSdkDialog.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/src/fr/obeo/dsl/arduino/preferences/ArduinoSdkDialog.java new file mode 100644 index 00000000..df891aac --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.preferences/src/fr/obeo/dsl/arduino/preferences/ArduinoSdkDialog.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.preferences; + +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.dialogs.IDialogConstants; +import org.eclipse.jface.layout.GridDataFactory; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Link; +import org.eclipse.swt.widgets.Shell; + +public class ArduinoSdkDialog extends Dialog { + + public ArduinoSdkDialog(Shell parentShell) { + super(parentShell); + } + + @Override + protected void configureShell(Shell shell) { + super.configureShell(shell); + shell.setText("Arduino SDK is missing"); + } + + @Override + protected Control createDialogArea(Composite parent) { + Composite composite = (Composite) super.createDialogArea(parent); + Link link = new Link(composite, SWT.NONE); + String message = "Set the path to the Arduino SDK in the Arduino Designer Preferences to be able to compile and upload code to the target"; + link.setText(message); + + GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER) + .grab(true, false) + .hint(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH, SWT.DEFAULT) + .applyTo(link); + applyDialogFont(composite); + + return composite; + } + + @Override + protected void createButtonsForButtonBar(Composite parent) { + createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, + false); + } + + @Override + protected void buttonPressed(int buttonId) { + // Close dialog + setReturnCode(buttonId); + close(); + } +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/.classpath b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/.classpath new file mode 100644 index 00000000..eca7bdba --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/.gitignore b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/.gitignore new file mode 100644 index 00000000..5e56e040 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/.gitignore @@ -0,0 +1 @@ +/bin diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/.project b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/.project new file mode 100644 index 00000000..e6bfa593 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/.project @@ -0,0 +1,28 @@ + + + fr.obeo.dsl.arduino.ui + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/.settings/org.eclipse.jdt.core.prefs b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..0c68a61d --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/META-INF/MANIFEST.MF b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/META-INF/MANIFEST.MF new file mode 100644 index 00000000..3553ce3a --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/META-INF/MANIFEST.MF @@ -0,0 +1,31 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Menus +Bundle-SymbolicName: fr.obeo.dsl.arduino.ui;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-Activator: fr.obeo.dsl.arduino.menus.ArduinoUiActivator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + com.google.guava, + org.eclipse.core.resources, + org.eclipse.core.expressions, + fr.obeo.dsl.arduino, + org.eclipse.emf.transaction, + fr.obeo.dsl.arduino.gen, + org.eclipse.acceleo.engine, + org.eclipse.sirius.ui, + fr.obeo.dsl.arduino.build, + fr.obeo.dsl.arduino.preferences, + org.eclipse.ui.ide, + org.eclipse.sirius.common, + org.eclipse.emf.validation, + org.eclipse.sirius.ext.base, + org.eclipse.gef;bundle-version="3.9.0", + org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.7.0", + org.eclipse.sirius.diagram;bundle-version="2.0.0", + org.eclipse.sirius.diagram.ui;bundle-version="2.0.0", + org.eclipse.emf.common.ui;bundle-version="2.9.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Export-Package: fr.obeo.dsl.arduino.commands;x-friends:="fr.obeo.dsl.arduino.design", + fr.obeo.dsl.arduino.utils;x-friends:="fr.obeo.dsl.arduino.design" diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/build.properties b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/build.properties new file mode 100644 index 00000000..6c480f39 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + icons/ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/hardware.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/hardware.png new file mode 100644 index 00000000..e3c9b184 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/hardware.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/hardwareHover.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/hardwareHover.png new file mode 100644 index 00000000..1b70ba2b Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/hardwareHover.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/hardwareInvalid.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/hardwareInvalid.png new file mode 100644 index 00000000..04b41481 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/hardwareInvalid.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/hardwareInvalidHover.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/hardwareInvalidHover.png new file mode 100644 index 00000000..972434ce Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/hardwareInvalidHover.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/iconmonstr-bug-icon-128.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/iconmonstr-bug-icon-128.png new file mode 100644 index 00000000..d756baae Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/iconmonstr-bug-icon-128.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/iconmonstr-laptop-3-icon-128.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/iconmonstr-laptop-3-icon-128.png new file mode 100644 index 00000000..9fd6a153 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/iconmonstr-laptop-3-icon-128.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/newProject.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/newProject.png new file mode 100644 index 00000000..21bd99df Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/newProject.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/newProjectHover.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/newProjectHover.png new file mode 100644 index 00000000..b2897477 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/newProjectHover.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/openProject.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/openProject.png new file mode 100644 index 00000000..cba2d9e1 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/openProject.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/openProjectHover.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/openProjectHover.png new file mode 100644 index 00000000..0463cc73 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/openProjectHover.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/preferences.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/preferences.png new file mode 100644 index 00000000..df11a7b7 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/preferences.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/preferencesHover.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/preferencesHover.png new file mode 100644 index 00000000..3850be82 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/preferencesHover.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/sketch.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/sketch.png new file mode 100644 index 00000000..c04bcd02 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/sketch.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/sketchHover.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/sketchHover.png new file mode 100644 index 00000000..8f43e8e1 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/sketchHover.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/sketchInvalid.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/sketchInvalid.png new file mode 100644 index 00000000..ec6e4046 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/sketchInvalid.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/sketchInvalidHover.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/sketchInvalidHover.png new file mode 100644 index 00000000..6d2ba1a5 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/sketchInvalidHover.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/upload.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/upload.png new file mode 100644 index 00000000..a32a9dbe Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/upload.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/uploadHover.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/uploadHover.png new file mode 100644 index 00000000..fe10284a Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/128x128/uploadHover.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/32x32/hardware.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/32x32/hardware.png new file mode 100644 index 00000000..eaa4172c Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/32x32/hardware.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/32x32/newHardwareKit.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/32x32/newHardwareKit.png new file mode 100644 index 00000000..7c1fc36e Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/32x32/newHardwareKit.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/32x32/project.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/32x32/project.png new file mode 100644 index 00000000..228e82e9 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/32x32/project.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/32x32/simulator.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/32x32/simulator.png new file mode 100644 index 00000000..1eb0ad23 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/32x32/simulator.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/32x32/sketch.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/32x32/sketch.png new file mode 100644 index 00000000..a6f4f0e6 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/32x32/sketch.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/32x32/upload.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/32x32/upload.png new file mode 100644 index 00000000..a0b84138 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/32x32/upload.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/svg/README b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/svg/README new file mode 100644 index 00000000..9b7f9796 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/svg/README @@ -0,0 +1,25 @@ +All the icons are coming from : http://iconmonstr.com/ +Licence : http://iconmonstr.com/license/ +"License Agreement + +By copying or downloading any icons from iconmonstr, you automatically agree to the following terms and conditions: + +All ownership and copyright of the icons remain the property of iconmonstr. +All icons from iconmonstr are provided as-is without any express or implied warranty. +All trademarks of social icons are copyright of their respective trademark owners. +You are allowed to ... + + +Use in both personal and commercial projects with no attribution required. + +Use in a website or presentation template or application as part of your design with no attribution required. + +Modify in shape, color, size or otherwise manipulate for your needs. + +Up to 50 icons embed in a font or regenerate as web font via 3rd party tools. +You are not allowed to ... + + +The icons may not be sub-licensed, resold, rented, redistributed or detached from a template, application or web page. + +The icons may not be included in any online or offline archive or archived downloadable format." \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/svg/hardware.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/svg/hardware.svg new file mode 100644 index 00000000..dc1e865d --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/svg/hardware.svg @@ -0,0 +1,27 @@ + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/svg/hardware2.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/svg/hardware2.svg new file mode 100644 index 00000000..150b627c --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/svg/hardware2.svg @@ -0,0 +1,53 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/svg/newProject.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/svg/newProject.svg new file mode 100644 index 00000000..4bb93949 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/svg/newProject.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/svg/openProject.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/svg/openProject.svg new file mode 100644 index 00000000..6aaf50c7 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/svg/openProject.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/svg/preferences.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/svg/preferences.svg new file mode 100644 index 00000000..369df827 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/svg/preferences.svg @@ -0,0 +1,16 @@ + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/svg/sketch.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/svg/sketch.svg new file mode 100644 index 00000000..c7a188ed --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/svg/sketch.svg @@ -0,0 +1,14 @@ + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/svg/upload.svg b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/svg/upload.svg new file mode 100644 index 00000000..817192a5 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/icons/svg/upload.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/plugin.xml b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/plugin.xml new file mode 100644 index 00000000..4b55ee8a --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/plugin.xml @@ -0,0 +1,286 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Arduino Designer perspective + + + + + Arduino Designer Debug perspective + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/pom.xml b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/pom.xml new file mode 100644 index 00000000..0354c975 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/pom.xml @@ -0,0 +1,42 @@ + + + + 4.0.0 + + + fr.obeo.dsl.arduino + parent + 1.0.0-SNAPSHOT + ../../releng/fr.obeo.dsl.arduino.parent + + + fr.obeo.dsl.arduino.ui + eclipse-plugin + + Arduino Designer UI + + + + + org.eclipse.tycho + tycho-source-plugin + + + org.apache.maven.plugins + maven-pmd-plugin + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/DeleteProjectHandler.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/DeleteProjectHandler.java new file mode 100644 index 00000000..4f878c20 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/DeleteProjectHandler.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.commands; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.Status; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.operation.IRunnableWithProgress; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.ui.ISelectionService; +import org.eclipse.ui.PlatformUI; + +import fr.obeo.dsl.arduino.menus.ArduinoUiActivator; +import fr.obeo.dsl.arduino.utils.ArduinoServices; +import fr.obeo.dsl.arduino.utils.ProjectServices; + +public class DeleteProjectHandler extends AbstractHandler { + ArduinoServices service = new ArduinoServices(); + ProjectServices projectService = new ProjectServices(); + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + final IProject project = service.getWorkspaceProject(); + + boolean confirmation = MessageDialog.openConfirm(PlatformUI + .getWorkbench().getActiveWorkbenchWindow().getShell(), + "Confirm", + "Do you want to delete the project " + project.getName() + + " ? (cannot be undone)"); + if (confirmation) { + projectService.closeOpenedEditors(); + + try { + PlatformUI.getWorkbench().getActiveWorkbenchWindow() + .run(false, false, new IRunnableWithProgress() { + + @Override + public void run(IProgressMonitor monitor) + throws InvocationTargetException, + InterruptedException { + try { + project.delete(true, true, monitor); + } catch (CoreException e) { + ArduinoUiActivator.log(Status.ERROR, + "Delete project failed", e); + } + } + }); + } catch (InvocationTargetException e) { + ArduinoUiActivator + .log(Status.ERROR, "Delete project failed", e); + } catch (InterruptedException e) { + ArduinoUiActivator + .log(Status.ERROR, "Delete project failed", e); + } + + } + return null; + } + + public static IProject getCurrentSelectedProject() { + IProject project = null; + ISelectionService selectionService = PlatformUI.getWorkbench() + .getActiveWorkbenchWindow().getSelectionService(); + + ISelection selection = selectionService.getSelection(); + + if (selection instanceof IStructuredSelection) { + Object element = ((IStructuredSelection) selection) + .getFirstElement(); + + if (element instanceof IResource) { + project = ((IResource) element).getProject(); + } + } + return project; + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/DeleteSketchHandler.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/DeleteSketchHandler.java new file mode 100644 index 00000000..68dcf607 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/DeleteSketchHandler.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.commands; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; + +public class DeleteSketchHandler extends AbstractHandler { + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + System.out.println("Delete Sketch"); + return null; + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/NewProjectHandler.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/NewProjectHandler.java new file mode 100644 index 00000000..da9a93f8 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/NewProjectHandler.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.commands; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.jface.wizard.WizardDialog; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.handlers.HandlerUtil; + +import fr.obeo.dsl.arduino.wizard.ArduinoProjectWizard; + +public class NewProjectHandler extends AbstractHandler { + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + Shell shell = HandlerUtil.getActiveShell(event); + WizardDialog wizard = new WizardDialog(shell, + new ArduinoProjectWizard()); + wizard.open(); + + return null; + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/OpenDashboardHandler.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/OpenDashboardHandler.java new file mode 100644 index 00000000..d95e95f2 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/OpenDashboardHandler.java @@ -0,0 +1,39 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.commands; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.Status; +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.handlers.HandlerUtil; + +import fr.obeo.dsl.arduino.menus.ArduinoUiActivator; +import fr.obeo.dsl.arduino.utils.ArduinoServices; +import fr.obeo.dsl.arduino.utils.ProjectServices; +import fr.obeo.dsl.arduino.views.DashboardView; + +public class OpenDashboardHandler extends AbstractHandler { + ArduinoServices service = new ArduinoServices(); + ProjectServices projectServices = new ProjectServices(); + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + try { + HandlerUtil.getActiveWorkbenchWindow(event).getActivePage() + .showView(DashboardView.VIEW_ID); + } catch (PartInitException e) { + ArduinoUiActivator.log(Status.ERROR, "Open dashboard failed", e); + } + return null; + } +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/OpenHardwareHandler.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/OpenHardwareHandler.java new file mode 100644 index 00000000..238ee03f --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/OpenHardwareHandler.java @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.commands; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.sirius.business.api.session.Session; +import org.eclipse.sirius.ui.business.api.dialect.DialectUIManager; + +import fr.obeo.dsl.arduino.utils.ArduinoServices; + +public class OpenHardwareHandler extends AbstractHandler { + ArduinoServices service = new ArduinoServices(); + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + System.out.println("Open hardware"); + Session session = service.getSession(); + DialectUIManager.INSTANCE.openEditor(session, + service.getDiagram(session, "Hardware"), new NullProgressMonitor()); + return null; + } +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/OpenHardwareKitHandler.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/OpenHardwareKitHandler.java new file mode 100644 index 00000000..5471c733 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/OpenHardwareKitHandler.java @@ -0,0 +1,41 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.commands; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.sirius.business.api.session.Session; + +import fr.obeo.dsl.arduino.utils.ArduinoServices; +import fr.obeo.dsl.arduino.utils.ProjectServices; + +public class OpenHardwareKitHandler extends AbstractHandler { + ArduinoServices service = new ArduinoServices(); + ProjectServices projectServices = new ProjectServices(); + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + Session session = service.getSession(); + if (session != null) { + if (ProjectServices.isViewpointEnabled(session, + ProjectServices.HARDWARE_KIT_VP)) { + projectServices + .unActivateHardwareKitDefinition(new NullProgressMonitor()); + } else { + projectServices + .activateHardwareKitDefinition(new NullProgressMonitor()); + } + } + return null; + } +} \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/OpenProjectHandler.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/OpenProjectHandler.java new file mode 100644 index 00000000..086d3556 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/OpenProjectHandler.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.commands; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.jface.wizard.WizardDialog; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.handlers.HandlerUtil; + +import fr.obeo.dsl.arduino.utils.ArduinoServices; +import fr.obeo.dsl.arduino.utils.ProjectServices; +import fr.obeo.dsl.arduino.wizard.ArduinoExternalProjectImportWizard; + +public class OpenProjectHandler extends AbstractHandler { + ArduinoServices service = new ArduinoServices(); + ProjectServices projectServices = new ProjectServices(); + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + Shell shell = HandlerUtil.getActiveShell(event); + WizardDialog wizard = new WizardDialog(shell, + new ArduinoExternalProjectImportWizard()); + wizard.open(); + return null; + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/OpenSketchHandler.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/OpenSketchHandler.java new file mode 100644 index 00000000..a218a24e --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/OpenSketchHandler.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.commands; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.sirius.business.api.session.Session; +import org.eclipse.sirius.ui.business.api.dialect.DialectUIManager; + +import fr.obeo.dsl.arduino.utils.ArduinoServices; + +public class OpenSketchHandler extends AbstractHandler { + ArduinoServices service = new ArduinoServices(); + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + System.out.println("Open sketch"); + Session session = service.getSession(); + DialectUIManager.INSTANCE.openEditor(session, + service.getDiagram(session, "Sketch"), + new NullProgressMonitor()); + return null; + } +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/PreferencesHandler.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/PreferencesHandler.java new file mode 100644 index 00000000..73adbc9a --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/PreferencesHandler.java @@ -0,0 +1,37 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.commands; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.jface.preference.IPreferencePage; +import org.eclipse.jface.preference.PreferenceDialog; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.dialogs.PreferencesUtil; +import org.eclipse.ui.handlers.HandlerUtil; + +import fr.obeo.dsl.arduino.preferences.ArduinoPreferencesPage; + +public class PreferencesHandler extends AbstractHandler { + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + IPreferencePage page = new ArduinoPreferencesPage(); + Shell shell = HandlerUtil.getActiveWorkbenchWindowChecked(event) + .getShell(); + PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn( + shell, "fr.obeo.dsl.arduino.preferences.ArduinoPreferencePage", + new String[] {}, null); + if (dialog != null) + dialog.open(); + return null; + } +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/UploadSketchHandler.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/UploadSketchHandler.java new file mode 100644 index 00000000..ee4f9018 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/commands/UploadSketchHandler.java @@ -0,0 +1,34 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.commands; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; + +import fr.obeo.dsl.arduino.Project; +import fr.obeo.dsl.arduino.utils.ArduinoServices; + +public class UploadSketchHandler extends AbstractHandler { + ArduinoServices service = new ArduinoServices(); + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + System.out.println("Upload sketch"); + + Project project = service.getArduinoProject(); + if (project != null) { + service.upload(project.getSketch()); + } + + return null; + } +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/menus/ArduinoUiActivator.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/menus/ArduinoUiActivator.java new file mode 100644 index 00000000..36182aef --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/menus/ArduinoUiActivator.java @@ -0,0 +1,98 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.menus; + +import org.eclipse.core.runtime.Status; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class ArduinoUiActivator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "fr.obeo.dsl.arduino.ui"; //$NON-NLS-1$ + + // The shared instance + private static ArduinoUiActivator plugin; + + /** + * The constructor + */ + public ArduinoUiActivator() { + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext + * ) + */ + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + // SiriusDiagramEditorPlugin.getInstance().getPreferenceStore().setValue(org.eclipse.sirius.diagram.tools.api.preferences.SiriusDiagramPreferencesKeys.PREF_OLD_UI.name(), + // Boolean.TRUE); + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext + * ) + */ + @Override + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static ArduinoUiActivator getDefault() { + return plugin; + } + + /** + * A helper to log plugin errors. + * + * @param severity + * the error severity. + * @param message + * the error message. + * @param exception + * the error exception. + */ + public static void log(int severity, String message, Throwable exception) { + getDefault().getLog().log( + new Status(severity, PLUGIN_ID, message, exception)); + } + + /** + * Returns an image descriptor for the image file at the given plug-in + * relative path + * + * @param path + * the path + * @return the image descriptor + */ + public static ImageDescriptor getImageDescriptor(String path) { + return imageDescriptorFromPlugin(PLUGIN_ID, path); + } +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/perspective/ArduinoPerspectiveFactory.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/perspective/ArduinoPerspectiveFactory.java new file mode 100644 index 00000000..31113900 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/perspective/ArduinoPerspectiveFactory.java @@ -0,0 +1,24 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.perspective; + +import org.eclipse.ui.IPageLayout; +import org.eclipse.ui.IPerspectiveFactory; + +public class ArduinoPerspectiveFactory implements IPerspectiveFactory { + + @Override + public void createInitialLayout(IPageLayout layout) { + layout.setEditorAreaVisible(true); + layout.setFixed(true); + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/properties/ArduinoPropertyTester.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/properties/ArduinoPropertyTester.java new file mode 100644 index 00000000..589ccbd7 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/properties/ArduinoPropertyTester.java @@ -0,0 +1,46 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.properties; + +import org.eclipse.core.expressions.PropertyTester; + +import fr.obeo.dsl.arduino.Project; +import fr.obeo.dsl.arduino.utils.ArduinoServices; + +public class ArduinoPropertyTester extends PropertyTester { + ArduinoServices service = new ArduinoServices(); + + public ArduinoPropertyTester() { + } + + @Override + public boolean test(Object receiver, String property, Object[] args, + Object expectedValue) { + Project project = service.getArduinoProject(); + if (project == null) { + return false; + } + + if ("existHardware".equals(property) && project.getBoards() != null) { + return true; + } + + if ("validHardware".equals(property) && service.isValidHardware()) { + return true; + } + + if ("validSketch".equals(property) + && service.isValidSketch(project.getSketch())) { + return true; + } + return false; + } +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/utils/ArduinoServices.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/utils/ArduinoServices.java new file mode 100644 index 00000000..07711780 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/utils/ArduinoServices.java @@ -0,0 +1,235 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.utils; + +import java.io.File; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.eclipse.acceleo.common.preference.AcceleoPreferences; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IFolder; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.Status; +import org.eclipse.emf.common.util.BasicMonitor; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.dialogs.ProgressMonitorDialog; +import org.eclipse.jface.operation.IRunnableWithProgress; +import org.eclipse.sirius.business.api.dialect.DialectManager; +import org.eclipse.sirius.business.api.session.Session; +import org.eclipse.sirius.business.api.session.SessionManager; +import org.eclipse.sirius.viewpoint.DRepresentation; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.PlatformUI; + +import fr.obeo.dsl.arduino.Project; +import fr.obeo.dsl.arduino.Sketch; +import fr.obeo.dsl.arduino.build.ArduinoBuilder; +import fr.obeo.dsl.arduino.gen.main.Generate; +import fr.obeo.dsl.arduino.menus.ArduinoUiActivator; +import fr.obeo.dsl.arduino.preferences.ArduinoPreferences; +import fr.obeo.dsl.arduino.preferences.ArduinoSdkDialog; + +public class ArduinoServices { + private ArduinoPreferences preferences = new ArduinoPreferences(); + + public IProject getWorkspaceProject() { + IProject[] projects = ResourcesPlugin.getWorkspace().getRoot() + .getProjects(); + + if (projects.length > 0) { + return projects[0]; + } + return null; + } + + public Session getSession() { + Collection sessions = SessionManager.INSTANCE.getSessions(); + if (sessions.size() > 0) { + return (Session) sessions.toArray()[0]; + } + return null; + } + + public Project getArduinoProject() { + Session session = getSession(); + if (session == null) { + return null; + } + Collection resources = session.getSemanticResources(); + if (resources.size() == 0) { + return null; + } + Resource resource = (Resource) resources.toArray()[0]; + + List contents = resource.getContents(); + if (contents == null || contents.size() == 0) { + return null; + } + return (Project) contents.get(0); + } + + public boolean isInvalidSketch(Sketch sketch) { + return !isValidSketch(sketch); + } + + public boolean isValidSketch(Sketch sketch) { + if (sketch != null) { + return true; + } + return false; + } + + public void upload(final Sketch sketch) { + if (preferences.getArduinoSdk() == null + || preferences.getArduinoSdk().length() == 0) { + askUser(); + return; + } + final ProgressMonitorDialog dialog = new ProgressMonitorDialog( + PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell()); + try { + dialog.run(true, true, new IRunnableWithProgress() { + @Override + public void run(IProgressMonitor monitor) { + monitor.beginTask("Upload sketch to arduino platform...", + 100); + monitor.subTask("Generate code"); + File genFolder = generateCode(sketch); + monitor.worked(33); + monitor.subTask("Compile code"); + + String arduinoSdk = preferences.getArduinoSdk(); + String serialPort = preferences.getArduinoSerialPort(); + String boardTag = sketch.getProject().getBoards().get(0).getName(); + String workingDirectory = genFolder.toString(); + ArduinoBuilder builder = new ArduinoBuilder(arduinoSdk, + boardTag, workingDirectory, serialPort); + List libraries = getLibraries(sketch); + final IStatus compileStatus = builder.compile("Sketch", + libraries); + if (compileStatus.getSeverity() != IStatus.OK) { + Display.getDefault().syncExec(new Runnable() { + public void run() { + MessageDialog.openError( + dialog.getShell(), + "Compilation Fail", + "Compilation fail : " + + compileStatus.getMessage()); + } + }); + return; + } + + monitor.worked(33); + monitor.subTask("Upload code"); + final IStatus uploadStatus = builder.upload(); + if (uploadStatus.getSeverity() != IStatus.OK) { + Display.getDefault().syncExec(new Runnable() { + public void run() { + MessageDialog.openError(dialog.getShell(), + "Upload Fail", "Upload fail : " + + uploadStatus.getMessage()); + } + }); + } + monitor.done(); + } + }); + } catch (InvocationTargetException e) { + ArduinoUiActivator.log(Status.ERROR, "Upload failed", e); + } catch (InterruptedException e) { + ArduinoUiActivator.log(Status.ERROR, "Upload failed", e); + } + } + + protected List getLibraries(Sketch sketch) { + final List libraries = new ArrayList<>(); + return libraries; + } + + private void askUser() { + Shell shell = PlatformUI.getWorkbench().getModalDialogShellProvider() + .getShell(); + + ArduinoSdkDialog dialog = new ArduinoSdkDialog(shell); + dialog.open(); + } + + private File generateCode(Sketch sketch) { + boolean oldNotificationsPref = AcceleoPreferences + .areNotificationsForcedDisabled(); + AcceleoPreferences.switchForceDeactivationNotifications(true); + IFile file = ResourcesPlugin + .getWorkspace() + .getRoot() + .getFile( + new Path(sketch.eResource().getURI() + .toPlatformString(true))); + IFolder folder = file.getProject().getFolder("code"); + File genFolder = folder.getRawLocation().makeAbsolute().toFile(); + + try { + Generate generator = new Generate(sketch.eResource().getURI(), + genFolder, new ArrayList()); + generator.doGenerate(new BasicMonitor()); + } catch (IOException e) { + ArduinoUiActivator.log(Status.ERROR, "Code generation failed", e); + } + AcceleoPreferences + .switchForceDeactivationNotifications(oldNotificationsPref); + + return genFolder; + } + + public DRepresentation getDiagram(Session session, String diagramName) { + Collection representations = DialectManager.INSTANCE + .getAllRepresentations(session); + DRepresentation diagram = null; + for (DRepresentation representation : representations) { + if (diagramName.equals(representation.getName())) { + diagram = representation; + } + } + return diagram; + } + + public boolean isProjectOpened() { + return getWorkspaceProject() != null; + } + + public boolean isValidSketch() { + Project project = getArduinoProject(); + if (project == null) { + return false; + } + Sketch sketch = project.getSketch(); + if (sketch == null) { + return false; + } + return isValidSketch(sketch); + } + + public boolean isValidHardware() { + Project project = getArduinoProject(); + return !(project == null || project.getBoards() == null); + } +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/utils/ProjectServices.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/utils/ProjectServices.java new file mode 100644 index 00000000..76929069 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/utils/ProjectServices.java @@ -0,0 +1,340 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.utils; + +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.util.Collection; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IProjectDescription; +import org.eclipse.core.resources.IWorkspaceRoot; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.Status; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.emf.transaction.RecordingCommand; +import org.eclipse.jface.operation.IRunnableWithProgress; +import org.eclipse.sirius.business.api.componentization.ViewpointRegistry; +import org.eclipse.sirius.business.api.dialect.DialectManager; +import org.eclipse.sirius.business.api.modelingproject.ModelingProject; +import org.eclipse.sirius.business.api.session.DefaultLocalSessionCreationOperation; +import org.eclipse.sirius.business.api.session.Session; +import org.eclipse.sirius.business.api.session.SessionCreationOperation; +import org.eclipse.sirius.ext.base.Option; +import org.eclipse.sirius.ui.business.api.dialect.DialectUIManager; +import org.eclipse.sirius.ui.business.api.viewpoint.ViewpointSelectionCallback; +import org.eclipse.sirius.ui.tools.api.project.ModelingProjectManager; +import org.eclipse.sirius.viewpoint.DRepresentation; +import org.eclipse.sirius.viewpoint.description.Viewpoint; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IEditorReference; +import org.eclipse.ui.PlatformUI; + +import com.google.common.collect.Maps; + +import fr.obeo.dsl.arduino.ArduinoFactory; +import fr.obeo.dsl.arduino.Board; +import fr.obeo.dsl.arduino.Project; +import fr.obeo.dsl.arduino.Sketch; +import fr.obeo.dsl.arduino.menus.ArduinoUiActivator; + +public class ProjectServices { + ArduinoServices service = new ArduinoServices(); + public static final String ARDUINO_VP = "Arduino"; + public static final String HARDWARE_KIT_VP = "Hardware Kit"; + + public void createProject(IProgressMonitor monitor, IProject project) { + try { + project.create(monitor); + project.open(monitor); + ModelingProjectManager.INSTANCE.convertToModelingProject(project, monitor); + } catch (CoreException e) { + ArduinoUiActivator.log(Status.ERROR, "Open project failed", e); + } + + String modelPath = '/' + project.getName(); //$NON-NLS-1$ + final Session session = createAird( + project, + URI.createPlatformResourceURI(modelPath + + "/representations.aird", true), monitor); + + final String semanticModelPath = getSemanticModelPath(session); + initSemanticModel(session, semanticModelPath, monitor); + + final String[] viewpointsToActivate = { ARDUINO_VP }; + enableViewpoints(session, viewpointsToActivate); + + openHardware(session); + } + + private Session createAird(IProject project, URI representationsURI, + IProgressMonitor monitor) { + final Session session; + Option modelingProject = ModelingProject + .asModelingProject(project); + if (modelingProject.some()) { + session = modelingProject.get().getSession(); + } else { + Session tempSession = null; + SessionCreationOperation sessionCreationOperation = new DefaultLocalSessionCreationOperation( + representationsURI, monitor); + try { + sessionCreationOperation.execute(); + tempSession = sessionCreationOperation.getCreatedSession(); + } catch (CoreException e) { + ArduinoUiActivator.log(Status.ERROR, + "Create representations file failed", e); + } + if (tempSession != null) { + session = tempSession; + } else { + session = null; + } + } + return session; + } + + public void openProject(final String projectPath) { + try { + ProjectServices service = new ProjectServices(); + service.closeOpenedEditors(); + PlatformUI.getWorkbench().getActiveWorkbenchWindow() + .run(true, true, new IRunnableWithProgress() { + @Override + public void run(IProgressMonitor monitor) { + monitor.beginTask("Open project" + projectPath, 100); + ProjectServices service = new ProjectServices(); + service.closeProjects(monitor); + + monitor.worked(25); + + IProjectDescription description; + try { + description = ResourcesPlugin.getWorkspace() + .loadProjectDescription( + new Path(projectPath)); + IProject project = ResourcesPlugin + .getWorkspace().getRoot() + .getProject(description.getName()); + monitor.subTask("Open project : " + + description.getName()); + project.create(description, null); + monitor.worked(25); + project.open(null); + monitor.worked(25); + } catch (CoreException e) { + ArduinoUiActivator.log(Status.ERROR, + "Open project failed", e); + } + monitor.done(); + } + }); + } catch (InvocationTargetException e1) { + ArduinoUiActivator.log(Status.ERROR, "Open project failed", e1); + } catch (InterruptedException e1) { + ArduinoUiActivator.log(Status.ERROR, "Open project failed", e1); + } + Session session = service.getSession(); + while (session == null) { + session = service.getSession(); + } +// openHardware(session); + // openDashboard(session); + } + + public void openHardware(final Session session) { + Collection representations = DialectManager.INSTANCE + .getAllRepresentations(session); + for (DRepresentation representation : representations) { + if ("Hardware".equals(representation.getName())) { + DialectUIManager.INSTANCE.openEditor(session, representation, + new NullProgressMonitor()); + return; + } + } + } + + private String getSemanticModelPath(final Session session) { + Resource aird = (Resource) session.getAllSessionResources().toArray()[0]; + String airdUri = aird.getURI().toPlatformString(true); + final String semanticModelPath = airdUri.substring(0, + airdUri.lastIndexOf("/") + 1) + + "model.arduino"; + return semanticModelPath; + } + + private void initSemanticModel(final Session session, + final String semanticModelPath, final IProgressMonitor monitor) { + session.getTransactionalEditingDomain() + .getCommandStack() + .execute( + new RecordingCommand(session + .getTransactionalEditingDomain()) { + @Override + protected void doExecute() { + + final URI semanticModelURI = URI + .createPlatformResourceURI( + semanticModelPath, true); + Resource res = new ResourceSetImpl() + .createResource(semanticModelURI); + // Add the initial model object to the contents. + final Project rootObject = ArduinoFactory.eINSTANCE + .createProject(); + + if (rootObject != null) { + res.getContents().add(rootObject); + final Board board = ArduinoFactory.eINSTANCE + .createArduinoBoard(); + board.setName("Hardware"); + rootObject.getBoards().add(board); + final Sketch sketch = ArduinoFactory.eINSTANCE + .createSketch(); + sketch.setName("Sketch"); + rootObject.setSketch(sketch); + + } + try { + res.save(Maps.newHashMap()); + } catch (IOException e) { + ArduinoUiActivator.log(Status.ERROR, + "Init semantic model failed", e); + } + + session.addSemanticResource(semanticModelURI, + monitor); + + // Add ardublock kit +// final URI defaultKitModelURI = URI +// .createPlatformPluginURI( +// "/fr.obeo.dsl.arduino.design/resources/ArdublockKit.arduino", +// true); +// session.addSemanticResource(defaultKitModelURI, +// monitor); + + + session.save(monitor); + } + }); + } + + public static void enableViewpoints(final Session session, + final String... viewpointsToActivate) { + if (session != null) { + session.getTransactionalEditingDomain() + .getCommandStack() + .execute( + new RecordingCommand(session + .getTransactionalEditingDomain()) { + @Override + protected void doExecute() { + ViewpointSelectionCallback callback = new ViewpointSelectionCallback(); + + for (Viewpoint vp : ViewpointRegistry + .getInstance().getViewpoints()) { + for (String viewpoint : viewpointsToActivate) { + if (viewpoint.equals(vp.getName())) + callback.selectViewpoint( + vp, + session, + new NullProgressMonitor()); + } + } + } + }); + } + } + + public static void disableViewpoints(final Session session, + final String... viewpointsToActivate) { + if (session != null) { + session.getTransactionalEditingDomain() + .getCommandStack() + .execute( + new RecordingCommand(session + .getTransactionalEditingDomain()) { + @Override + protected void doExecute() { + ViewpointSelectionCallback callback = new ViewpointSelectionCallback(); + + for (Viewpoint vp : ViewpointRegistry + .getInstance().getViewpoints()) { + for (String viewpoint : viewpointsToActivate) { + if (viewpoint.equals(vp.getName())) + callback.deselectViewpoint( + vp, + session, + new NullProgressMonitor()); + } + } + } + }); + } + } + + public static boolean isViewpointEnabled(final Session session, + final String viewpointToCheck) { + if (session != null) { + for (Viewpoint vp : session.getSelectedViewpoints(false)) { + if (viewpointToCheck.equals(vp.getName())) + return true; + } + } + return false; + } + + public void closeProjects(IProgressMonitor monitor) { + monitor.subTask("Close projects"); + + IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); + for (IProject project : root.getProjects()) { + try { + project.close(monitor); + project.delete(false, false, monitor); + monitor.worked(25); + } catch (CoreException e) { + ArduinoUiActivator.log(Status.ERROR, "Close project failed", e); + } + } + } + + public void closeOpenedEditors() { + for (IEditorReference editorRef : PlatformUI.getWorkbench() + .getActiveWorkbenchWindow().getActivePage() + .getEditorReferences()) { + IEditorPart editor = editorRef.getEditor(false); + editor.doSave(new NullProgressMonitor()); + DialectUIManager.INSTANCE.closeEditor(editor, false); + } + } + + public void activateHardwareKitDefinition(IProgressMonitor monitor) { + final Session session = service.getSession(); + final String[] viewpointsToActivate = { HARDWARE_KIT_VP }; + enableViewpoints(session, viewpointsToActivate); + + // openHardware(session); + } + + public void unActivateHardwareKitDefinition(IProgressMonitor monitor) { + final Session session = service.getSession(); + final String[] viewpointsToActivate = { HARDWARE_KIT_VP }; + disableViewpoints(session, viewpointsToActivate); + + // openHardware(session); + } +} \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/views/DashboardView.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/views/DashboardView.java new file mode 100644 index 00000000..0517fdce --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/views/DashboardView.java @@ -0,0 +1,376 @@ +package fr.obeo.dsl.arduino.views; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceChangeEvent; +import org.eclipse.core.resources.IResourceChangeListener; +import org.eclipse.core.resources.IResourceDelta; +import org.eclipse.core.resources.IResourceDeltaVisitor; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.Status; +import org.eclipse.jface.preference.PreferenceDialog; +import org.eclipse.jface.wizard.WizardDialog; +import org.eclipse.sirius.business.api.session.Session; +import org.eclipse.sirius.ui.business.api.dialect.DialectUIManager; +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IPartListener2; +import org.eclipse.ui.IWorkbenchPartReference; +import org.eclipse.ui.dialogs.PreferencesUtil; +import org.eclipse.ui.forms.events.HyperlinkAdapter; +import org.eclipse.ui.forms.events.HyperlinkEvent; +import org.eclipse.ui.forms.widgets.FormToolkit; +import org.eclipse.ui.forms.widgets.ImageHyperlink; +import org.eclipse.ui.forms.widgets.ScrolledForm; +import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin; +import org.eclipse.ui.part.ViewPart; + +import fr.obeo.dsl.arduino.Project; +import fr.obeo.dsl.arduino.menus.ArduinoUiActivator; +import fr.obeo.dsl.arduino.utils.ArduinoServices; +import fr.obeo.dsl.arduino.wizard.ArduinoExternalProjectImportWizard; +import fr.obeo.dsl.arduino.wizard.ArduinoProjectWizard; + +public class DashboardView extends ViewPart implements IPartListener2, + IResourceChangeListener { + private static final String SKETCH_MSG = "Open the sketch"; + private static final String SKETCH_INVALID_MSG = "The sketch is invalid. You must define a loop."; + private static final String UPLOAD_MSG = "Upload the sketch on the arduino board"; + private static final String HARDWARE_MSG = "Open the hardware"; + private static final String HARDWARE_INVALID_MSG = "The hardware is invalid. You must define a platform and connect at least one module."; + public final static String VIEW_ID = "fr.obeo.dsl.arduino.ui.dashboard"; + private static final String HARDWARE_IMAGE = "icons/128x128/hardware.png"; + private static final String HARDWARE_HOVER_IMAGE = "icons/128x128/hardwareHover.png"; + private static final String HARDWARE_INVALID_IMAGE = "icons/128x128/hardwareInvalid.png"; + private static final String HARDWARE_INVALID_HOVER_IMAGE = "icons/128x128/hardwareInvalidHover.png"; + private static final String SKETCH_IMAGE = "icons/128x128/sketch.png"; + private static final String SKETCH_HOVER_IMAGE = "icons/128x128/sketchHover.png"; + private static final String SKETCH_INVALID_IMAGE = "icons/128x128/sketchInvalid.png"; + private static final String SKETCH_INVALID_HOVER_IMAGE = "icons/128x128/sketchInvalidHover.png"; + private static final String UPLOAD_IMAGE = "icons/128x128/upload.png"; + private static final String UPLOAD_HOVER_IMAGE = "icons/128x128/uploadHover.png"; + private FormToolkit toolkit; + private ScrolledForm form; + private List images = new ArrayList(); + private ArduinoServices service = new ArduinoServices(); + private ImageHyperlink hardwareLink; + private ImageHyperlink sketchLink; + private ImageHyperlink uploadLink; + + public DashboardView() { + } + + Shell shell; + + @Override + public void createPartControl(final Composite parent) { + + shell = parent.getShell(); + + // Create the form + toolkit = new FormToolkit(parent.getDisplay()); + form = toolkit.createScrolledForm(parent); + setFormText(); + GridLayout formLayout = new GridLayout(); + formLayout.numColumns = 3; + formLayout.horizontalSpacing = 100; + formLayout.verticalSpacing = 50; + formLayout.marginWidth = 100; + formLayout.marginHeight = 100; + form.getBody().setLayout(formLayout); + + // Create all the hyperlinks + createNewProjectHyperLink(parent, shell); + createOpenProjectHyperLink(parent, shell); + createPreferencesHyperLink(shell); + createHardwareHyperLink(parent, shell); + createSketchHyperLink(parent, shell); + createUploadHyperLink(parent, shell); + + this.getSite().getPage().addPartListener(this); + ResourcesPlugin.getWorkspace().addResourceChangeListener(this); + } + + private void setFormText() { + String text = "Arduino Designer - "; + if (!service.isProjectOpened()) { + text += "Select or create a project!"; + } else { + text += "You are working on the project : " + + service.getWorkspaceProject().getName() + "!"; + } + form.setText(text); + } + + private void createUploadHyperLink(final Composite parent, final Shell shell) { + uploadLink = createImageHyperlink(form.getBody(), UPLOAD_IMAGE, + UPLOAD_HOVER_IMAGE, UPLOAD_MSG); + setUploadLinkEnablement(); + uploadLink.addHyperlinkListener(new HyperlinkAdapter() { + public void linkActivated(HyperlinkEvent e) { + upload(shell); + } + }); + } + + private void setUploadLinkEnablement() { + if (service.isValidSketch()) { + uploadLink.setEnabled(true); + uploadLink.setToolTipText(UPLOAD_MSG); + } else { + uploadLink.setEnabled(false); + } + } + + private void createSketchHyperLink(final Composite parent, final Shell shell) { + sketchLink = createImageHyperlink(form.getBody(), SKETCH_IMAGE, + SKETCH_HOVER_IMAGE, SKETCH_MSG); + setSketchLinkEnablement(); + sketchLink.addHyperlinkListener(new HyperlinkAdapter() { + public void linkActivated(HyperlinkEvent e) { + Session session = service.getSession(); + DialectUIManager.INSTANCE.openEditor(session, + service.getDiagram(session, "Sketch"), + new NullProgressMonitor()); + } + }); + } + + private void setSketchLinkEnablement() { + if (service.isValidHardware()) { + sketchLink.setEnabled(true); + if (service.isValidSketch()) { + sketchLink.setToolTipText(SKETCH_MSG); + sketchLink.setImage(getImage(SKETCH_IMAGE)); + sketchLink.setHoverImage(getImage(SKETCH_HOVER_IMAGE)); + } else { + sketchLink.setToolTipText(SKETCH_INVALID_MSG); + sketchLink.setImage(getImage(SKETCH_INVALID_IMAGE)); + sketchLink.setHoverImage(getImage(SKETCH_INVALID_HOVER_IMAGE)); + } + } else { + sketchLink.setEnabled(false); + } + } + + private void createHardwareHyperLink(final Composite parent, + final Shell shell) { + hardwareLink = createImageHyperlink(form.getBody(), HARDWARE_IMAGE, + HARDWARE_HOVER_IMAGE, HARDWARE_MSG); + setHardwareLinkEnablement(); + hardwareLink.addHyperlinkListener(new HyperlinkAdapter() { + public void linkActivated(HyperlinkEvent e) { + Session session = service.getSession(); + DialectUIManager.INSTANCE.openEditor(session, + service.getDiagram(session, "Hardware"), + new NullProgressMonitor()); + } + }); + } + + private void setHardwareLinkEnablement() { + if (service.isProjectOpened()) { + hardwareLink.setEnabled(true); + if (service.isValidHardware()) { + hardwareLink.setToolTipText(HARDWARE_MSG); + hardwareLink.setImage(getImage(HARDWARE_IMAGE)); + hardwareLink.setHoverImage(getImage(HARDWARE_HOVER_IMAGE)); + } else { + hardwareLink.setImage(getImage(HARDWARE_INVALID_IMAGE)); + hardwareLink + .setHoverImage(getImage(HARDWARE_INVALID_HOVER_IMAGE)); + hardwareLink.setToolTipText(HARDWARE_INVALID_MSG); + } + } else { + hardwareLink.setEnabled(false); + } + } + + private void createPreferencesHyperLink(final Shell shell) { + ImageHyperlink preferencesLink = createImageHyperlink(form.getBody(), + "icons/128x128/preferences.png", "icons/128x128/preferencesHover.png", + "Set the preferences (arduino SDK ,serial port...)"); + preferencesLink.addHyperlinkListener(new HyperlinkAdapter() { + public void linkActivated(HyperlinkEvent e) { + preferencesDialog(shell); + } + }); + } + + private void createOpenProjectHyperLink(final Composite parent, + final Shell shell) { + ImageHyperlink openProjectLink = createImageHyperlink(form.getBody(), + "icons/128x128/openProject.png", "icons/128x128/openProjectHover.png", + "Open an existing project"); + openProjectLink.addHyperlinkListener(new HyperlinkAdapter() { + public void linkActivated(HyperlinkEvent e) { + openProjectDialog(shell); + } + }); + } + + private void createNewProjectHyperLink(final Composite parent, + final Shell shell) { + ImageHyperlink newProjectLink = createImageHyperlink(form.getBody(), + "icons/128x128/newProject.png", "icons/128x128/newProjectHover.png", + "Create a new project"); + newProjectLink.addHyperlinkListener(new HyperlinkAdapter() { + public void linkActivated(HyperlinkEvent e) { + newProjectDialog(shell); + } + }); + } + + private void upload(Shell shell) { + Project project = service.getArduinoProject(); + if (project != null) { + service.upload(project.getSketch()); + } + } + + private void refreshForm() { + Display.getDefault().syncExec(new Runnable() { + + @Override + public void run() { + setFormText(); + setHardwareLinkEnablement(); + setSketchLinkEnablement(); + setUploadLinkEnablement(); + form.getParent().update(); + + } + }); + + } + + private ImageHyperlink createImageHyperlink(Composite parent, + String imagePath, String hoverImagePath, String toolTipText) { + ImageHyperlink imageLink = toolkit.createImageHyperlink(parent, + SWT.WRAP); + Image image = getImage(imagePath); + imageLink.setImage(image); + Image hoverImage = getImage(hoverImagePath); + imageLink.setHoverImage(hoverImage); + imageLink.setToolTipText(toolTipText); + return imageLink; + } + + private Image getImage(String relativePath) { + return ArduinoUiActivator.getImageDescriptor(relativePath) + .createImage(); + } + + private void openProjectDialog(Shell shell) { + WizardDialog wizard = new WizardDialog(shell, + new ArduinoExternalProjectImportWizard(IDEWorkbenchPlugin + .getPluginWorkspace().getRoot().getLocation() + .toOSString())); + wizard.open(); + } + + private void preferencesDialog(final Composite parent) { + Shell shell = parent.getShell(); + PreferenceDialog dialog = PreferencesUtil.createPreferenceDialogOn( + shell, "fr.obeo.dsl.arduino.preferences.ArduinoPreferencePage", + new String[] {}, null); + if (dialog != null) { + dialog.open(); + } + } + + private void newProjectDialog(final Shell shell) { + WizardDialog wizard = new WizardDialog(shell, + new ArduinoProjectWizard()); + wizard.open(); + } + + @Override + public void setFocus() { + form.setFocus(); + } + + /** + * Disposes the toolkit + */ + public void dispose() { + toolkit.dispose(); + for (Image image : images) { + image.dispose(); + } + getSite().getPage().removePartListener(this); + ResourcesPlugin.getWorkspace().removeResourceChangeListener(this); + super.dispose(); + } + + @Override + public void partActivated(IWorkbenchPartReference partRef) { + + } + + @Override + public void partBroughtToTop(IWorkbenchPartReference partRef) { + refreshForm(); + } + + @Override + public void partClosed(IWorkbenchPartReference partRef) { + + } + + @Override + public void partDeactivated(IWorkbenchPartReference partRef) { + + } + + @Override + public void partOpened(IWorkbenchPartReference partRef) { + + } + + @Override + public void partHidden(IWorkbenchPartReference partRef) { + + } + + @Override + public void partVisible(IWorkbenchPartReference partRef) { + + } + + @Override + public void partInputChanged(IWorkbenchPartReference partRef) { + + } + + @Override + public void resourceChanged(IResourceChangeEvent event) { + if (event == null || event.getDelta() == null) + return; + try { + event.getDelta().accept(new IResourceDeltaVisitor() { + public boolean visit(IResourceDelta delta) throws CoreException { + if (delta.getKind() == IResourceDelta.OPEN) { + final IResource resource = delta.getResource(); + if (!(resource instanceof IProject)) { + return false; + } + } + refreshForm(); + return true; + } + }); + } catch (CoreException e) { + ArduinoUiActivator.log(Status.ERROR, "Refresh dashboard failed", e); + } + } +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/wizard/ArduinoExternalProjectImportWizard.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/wizard/ArduinoExternalProjectImportWizard.java new file mode 100644 index 00000000..d8ff50b3 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/wizard/ArduinoExternalProjectImportWizard.java @@ -0,0 +1,81 @@ +package fr.obeo.dsl.arduino.wizard; + +import org.eclipse.jface.dialogs.IDialogSettings; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.ui.IImportWizard; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin; + +public class ArduinoExternalProjectImportWizard extends Wizard implements + IImportWizard { + private static final String EXTERNAL_PROJECT_SECTION = "ExternalProjectImportWizard";//$NON-NLS-1$ + private ArduinoWizardProjectsImportPage mainPage; + private IStructuredSelection currentSelection = null; + private String initialPath = null; + + /** + * Constructor for ExternalProjectImportWizard. + */ + public ArduinoExternalProjectImportWizard() { + this(null); + } + + /** + * Constructor for ExternalProjectImportWizard. + * + * @param initialPath + * Default path for wizard to import + * @since 3.5 + */ + public ArduinoExternalProjectImportWizard(String initialPath) { + super(); + this.initialPath = initialPath; + setNeedsProgressMonitor(true); + IDialogSettings workbenchSettings = IDEWorkbenchPlugin.getDefault() + .getDialogSettings(); + + IDialogSettings wizardSettings = workbenchSettings + .getSection(EXTERNAL_PROJECT_SECTION); + if (wizardSettings == null) { + wizardSettings = workbenchSettings + .addNewSection(EXTERNAL_PROJECT_SECTION); + } + setDialogSettings(wizardSettings); + } + + /* + * (non-Javadoc) Method declared on IWizard. + */ + public void addPages() { + super.addPages(); + mainPage = new ArduinoWizardProjectsImportPage( + "wizardExternalProjectsPage", initialPath, currentSelection); //$NON-NLS-1$ + addPage(mainPage); + } + + /* + * (non-Javadoc) Method declared on IWorkbenchWizard. + */ + public void init(IWorkbench workbench, IStructuredSelection currentSelection) { + setWindowTitle("Open"); + setDefaultPageImageDescriptor(IDEWorkbenchPlugin + .getIDEImageDescriptor("wizban/importproj_wiz.png")); //$NON-NLS-1$ + this.currentSelection = currentSelection; + } + + /* + * (non-Javadoc) Method declared on IWizard. + */ + public boolean performCancel() { + mainPage.performCancel(); + return true; + } + + /* + * (non-Javadoc) Method declared on IWizard. + */ + public boolean performFinish() { + return mainPage.createProjects(); + } +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/wizard/ArduinoModelingProjectCreationOperation.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/wizard/ArduinoModelingProjectCreationOperation.java new file mode 100644 index 00000000..d15c3cf0 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/wizard/ArduinoModelingProjectCreationOperation.java @@ -0,0 +1,48 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.wizard; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.ui.actions.WorkspaceModifyOperation; + +import fr.obeo.dsl.arduino.utils.ProjectServices; + +public class ArduinoModelingProjectCreationOperation extends + WorkspaceModifyOperation { + + private IProject project; + + public ArduinoModelingProjectCreationOperation(IProject project) { + this.project = project; + } + + @Override + protected void execute(IProgressMonitor monitor) throws CoreException, + InvocationTargetException, InterruptedException { + try { + final ProjectServices service = new ProjectServices(); + + monitor.beginTask("Load project", 100); + monitor.subTask("Close project"); + service.closeProjects(monitor); + monitor.worked(50); + monitor.subTask("Create project"); + service.createProject(monitor, project); + monitor.worked(50); + } finally { + monitor.done(); + } + } +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/wizard/ArduinoProjectWizard.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/wizard/ArduinoProjectWizard.java new file mode 100644 index 00000000..5ccbc240 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/wizard/ArduinoProjectWizard.java @@ -0,0 +1,89 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino.wizard; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.core.runtime.Status; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.sirius.common.tools.api.util.ReflectionHelper; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.dialogs.WizardNewProjectCreationPage; +import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard; + +import fr.obeo.dsl.arduino.menus.ArduinoUiActivator; + +public class ArduinoProjectWizard extends BasicNewProjectResourceWizard { + private WizardNewProjectCreationPage wizardNewProjectCreationPage; + protected IWorkbench workbench; + + public ArduinoProjectWizard() { + super(); + } + + @Override + public void init(IWorkbench workbench, IStructuredSelection selection) { + super.init(workbench, selection); + this.workbench = workbench; + this.selection = selection; + setWindowTitle("New Arduino Project"); //$NON-NLS-1$ + setNeedsProgressMonitor(true); + } + + /** + * {@inheritDoc} + */ + @Override + public void addPages() { + wizardNewProjectCreationPage = new WizardNewProjectCreationPage( + "Create a new Arduino project") { + + @Override + public void createControl(Composite parent) { + super.createControl(parent); + + Composite control = (Composite) getControl(); + GridLayout layout = new GridLayout(); + control.setLayout(layout); + Dialog.applyDialogFont(control); + } + }; + + wizardNewProjectCreationPage.setInitialProjectName("NewArduinoProject");//$NON-NLS-1$ + wizardNewProjectCreationPage.setTitle("Create a new Arduino project"); //$NON-NLS-1$ + wizardNewProjectCreationPage.setDescription("Enter a project name"); //$NON-NLS-1$ + + // Fix for VP-3711 to avoid a NPE on 3.8 + ReflectionHelper.setFieldValueWithoutException(this, + "newProjectCreationPage", wizardNewProjectCreationPage); + + addPage(wizardNewProjectCreationPage); + } + + @Override + public boolean performFinish() { + final ArduinoModelingProjectCreationOperation arduinoModelingProjectCreationOperation = new ArduinoModelingProjectCreationOperation( + wizardNewProjectCreationPage.getProjectHandle()); + + try { + getContainer().run(true, false, + arduinoModelingProjectCreationOperation); + } catch (InvocationTargetException e) { + ArduinoUiActivator.log(Status.ERROR, "Create project failed", e); + } catch (InterruptedException e) { + ArduinoUiActivator.log(Status.ERROR, "Create project failed", e); + } + return true; + } +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/wizard/ArduinoWizardProjectsImportPage.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/wizard/ArduinoWizardProjectsImportPage.java new file mode 100644 index 00000000..26dd5cb6 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/wizard/ArduinoWizardProjectsImportPage.java @@ -0,0 +1,1056 @@ +package fr.obeo.dsl.arduino.wizard; + +import java.io.File; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Set; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IProjectDescription; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IWorkspace; +import org.eclipse.core.resources.IWorkspaceRoot; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.OperationCanceledException; +import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.SubProgressMonitor; +import org.eclipse.gef.EditPartViewer; +import org.eclipse.gmf.runtime.diagram.ui.parts.DiagramEditor; +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.dialogs.ErrorDialog; +import org.eclipse.jface.dialogs.IDialogSettings; +import org.eclipse.jface.layout.PixelConverter; +import org.eclipse.jface.operation.IRunnableWithProgress; +import org.eclipse.jface.viewers.IColorProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.ITreeContentProvider; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.jface.viewers.ViewerComparator; +import org.eclipse.sirius.ui.business.api.dialect.DialectEditor; +import org.eclipse.sirius.ui.business.api.dialect.DialectUIManager; +import org.eclipse.sirius.ui.business.api.session.IEditingSession; +import org.eclipse.sirius.ui.business.api.session.SessionUIManager; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.FocusAdapter; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.TraverseEvent; +import org.eclipse.swt.events.TraverseListener; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.DirectoryDialog; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Label; +import org.eclipse.ui.actions.WorkspaceModifyOperation; +import org.eclipse.ui.dialogs.WizardDataTransferPage; +import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin; +import org.eclipse.ui.internal.ide.StatusUtil; +import org.eclipse.ui.internal.wizards.datatransfer.ILeveledImportStructureProvider; +import org.eclipse.ui.statushandlers.StatusManager; + +import fr.obeo.dsl.arduino.menus.ArduinoUiActivator; + +/** + * The WizardProjectsImportPage is the page that allows the user to import + * projects from a particular location. + */ +public class ArduinoWizardProjectsImportPage extends WizardDataTransferPage { + + /** + * The name of the folder containing metadata information for the workspace. + */ + public static final String METADATA_FOLDER = ".metadata"; //$NON-NLS-1$ + + /** + * The import structure provider. + * + * @since 3.4 + */ + private ILeveledImportStructureProvider structureProvider; + + /** + * @since 3.5 + * + */ + private final class ProjectLabelProvider extends LabelProvider implements + IColorProvider { + + public String getText(Object element) { + return ((ProjectRecord) element).getProjectLabel(); + } + + public Color getBackground(Object element) { + return null; + } + + public Color getForeground(Object element) { + ProjectRecord projectRecord = (ProjectRecord) element; + if (projectRecord.hasConflicts) + return getShell().getDisplay().getSystemColor(SWT.COLOR_GRAY); + return null; + } + } + + /** + * Class declared public only for test suite. + * + */ + public class ProjectRecord { + File projectSystemFile; + + String projectName; + + Object parent; + + int level; + + boolean hasConflicts; + + IProjectDescription description; + + /** + * Create a record for a project based on the info in the file. + * + * @param file + */ + ProjectRecord(File file) { + projectSystemFile = file; + setProjectName(); + } + + /** + * @param file + * The Object representing the .project file + * @param parent + * The parent folder of the .project file + * @param level + * The number of levels deep in the provider the file is + */ + ProjectRecord(Object file, Object parent, int level) { + this.parent = parent; + this.level = level; + setProjectName(); + } + + /** + * Set the name of the project based on the projectFile. + */ + private void setProjectName() { + try { + + // If we don't have the project name try again + if (projectName == null) { + IPath path = new Path(projectSystemFile.getPath()); + // if the file is in the default location, use the directory + // name as the project name + if (isDefaultLocation(path)) { + projectName = path.segment(path.segmentCount() - 2); + description = IDEWorkbenchPlugin.getPluginWorkspace() + .newProjectDescription(projectName); + } else { + description = IDEWorkbenchPlugin.getPluginWorkspace() + .loadProjectDescription(path); + projectName = description.getName(); + } + + } + } catch (CoreException e) { + // no good couldn't get the name + } + } + + /** + * Returns whether the given project description file path is in the + * default location for a project + * + * @param path + * The path to examine + * @return Whether the given path is the default location for a project + */ + private boolean isDefaultLocation(IPath path) { + // The project description file must at least be within the project, + // which is within the workspace location + if (path.segmentCount() < 2) + return false; + return path.removeLastSegments(2).toFile() + .equals(Platform.getLocation().toFile()); + } + + /** + * Get the name of the project + * + * @return String + */ + public String getProjectName() { + return projectName; + } + + /** + * Gets the label to be used when rendering this project record in the + * UI. + * + * @return String the label + * @since 3.4 + */ + public String getProjectLabel() { + return projectName; + } + + /** + * @return Returns the hasConflicts. + */ + public boolean hasConflicts() { + return hasConflicts; + } + } + + // dialog store id constants + private final static String STORE_DIRECTORIES = "WizardProjectsImportPage.STORE_DIRECTORIES";//$NON-NLS-1$ + + private Combo directoryPathField; + + private TreeViewer projectsList; + private ProjectRecord selectedProject = null; + + private ProjectRecord[] selectedProjects = new ProjectRecord[0]; + + // Keep track of the directory that we browsed to last time + // the wizard was invoked. + private static String previouslyBrowsedDirectory = ""; //$NON-NLS-1$ + + private Label projectFromDirectoryRadio; + + private Button browseDirectoriesButton; + + private IProject[] wsProjects; + + // The initial path to set + private String initialPath; + + // The last selected path to minimize searches + private String lastPath; + // The last time that the file or folder at the selected path was modified + // to mimize searches + private long lastModified; + + /** + * Creates a new project creation wizard page. + * + */ + public ArduinoWizardProjectsImportPage() { + this("wizardExternalProjectsPage", null, null); //$NON-NLS-1$ + } + + /** + * Create a new instance of the receiver. + * + * @param pageName + */ + public ArduinoWizardProjectsImportPage(String pageName) { + this(pageName, null, null); + } + + /** + * More (many more) parameters. + * + * @param pageName + * @param initialPath + * @param currentSelection + * @since 3.5 + */ + public ArduinoWizardProjectsImportPage(String pageName, String initialPath, + IStructuredSelection currentSelection) { + super(pageName); + this.initialPath = initialPath; + setPageComplete(false); + setTitle("Open project"); + setDescription("Open an existing project."); + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets + * .Composite) + */ + public void createControl(Composite parent) { + + initializeDialogUnits(parent); + + Composite workArea = new Composite(parent, SWT.NONE); + setControl(workArea); + + workArea.setLayout(new GridLayout()); + workArea.setLayoutData(new GridData(GridData.FILL_BOTH + | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL)); + + createProjectsRoot(workArea); + createProjectsList(workArea); + restoreWidgetValues(); + Dialog.applyDialogFont(workArea); + + } + + /** + * Create the checkbox list for the found projects. + * + * @param workArea + */ + private void createProjectsList(Composite workArea) { + + Label title = new Label(workArea, SWT.NONE); + title.setText("Projects:"); + + Composite listComposite = new Composite(workArea, SWT.NONE); + GridLayout layout = new GridLayout(); + layout.numColumns = 2; + layout.marginWidth = 0; + layout.makeColumnsEqualWidth = false; + listComposite.setLayout(layout); + + listComposite.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL + | GridData.GRAB_VERTICAL | GridData.FILL_BOTH)); + + projectsList = new TreeViewer(listComposite, SWT.BORDER); + projectsList.getTree().addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + selectedProject = (ProjectRecord) e.item.getData(); + if (selectedProject != null) { + setPageComplete(true); + } + } + }); + GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true); + gridData.widthHint = new PixelConverter(projectsList.getControl()) + .convertWidthInCharsToPixels(25); + gridData.heightHint = new PixelConverter(projectsList.getControl()) + .convertHeightInCharsToPixels(10); + projectsList.getControl().setLayoutData(gridData); + projectsList.setContentProvider(new ITreeContentProvider() { + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java + * .lang.Object) + */ + public Object[] getChildren(Object parentElement) { + return null; + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.jface.viewers.IStructuredContentProvider#getElements + * (java.lang.Object) + */ + public Object[] getElements(Object inputElement) { + return getProjectRecords(); + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java + * .lang.Object) + */ + public boolean hasChildren(Object element) { + return false; + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.jface.viewers.ITreeContentProvider#getParent(java + * .lang.Object) + */ + public Object getParent(Object element) { + return null; + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.jface.viewers.IContentProvider#dispose() + */ + public void dispose() { + + } + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse + * .jface.viewers.Viewer, java.lang.Object, java.lang.Object) + */ + public void inputChanged(Viewer viewer, Object oldInput, + Object newInput) { + } + + }); + + projectsList.setLabelProvider(new ProjectLabelProvider()); + + projectsList.setInput(this); + projectsList.setComparator(new ViewerComparator()); + } + + /** + * Create the area where you select the root directory for the projects. + * + * @param workArea + * Composite + */ + private void createProjectsRoot(Composite workArea) { + + // project specification group + Composite projectGroup = new Composite(workArea, SWT.NONE); + GridLayout layout = new GridLayout(); + layout.numColumns = 3; + layout.makeColumnsEqualWidth = false; + layout.marginWidth = 0; + projectGroup.setLayout(layout); + projectGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + + // new project from directory radio button + projectFromDirectoryRadio = new Label(projectGroup, SWT.NORMAL); + projectFromDirectoryRadio.setText("Select directory:"); + + // project location entry combo + this.directoryPathField = new Combo(projectGroup, SWT.BORDER); + + GridData directoryPathData = new GridData( + GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL); + directoryPathData.widthHint = new PixelConverter(directoryPathField) + .convertWidthInCharsToPixels(25); + directoryPathField.setLayoutData(directoryPathData); + + // browse button + browseDirectoriesButton = new Button(projectGroup, SWT.PUSH); + browseDirectoriesButton.setText("Browse..."); + setButtonLayoutData(browseDirectoriesButton); + + browseDirectoriesButton.addSelectionListener(new SelectionAdapter() { + /* + * (non-Javadoc) + * + * @see org.eclipse.swt.events.SelectionAdapter#widgetS + * elected(org.eclipse.swt.events.SelectionEvent) + */ + public void widgetSelected(SelectionEvent e) { + handleLocationDirectoryButtonPressed(); + } + + }); + + directoryPathField.addTraverseListener(new TraverseListener() { + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.swt.events.TraverseListener#keyTraversed(org.eclipse + * .swt.events.TraverseEvent) + */ + public void keyTraversed(TraverseEvent e) { + if (e.detail == SWT.TRAVERSE_RETURN) { + e.doit = false; + updateProjectsList(directoryPathField.getText().trim()); + } + } + + }); + + directoryPathField.addFocusListener(new FocusAdapter() { + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.swt.events.FocusListener#focusLost(org.eclipse.swt + * .events.FocusEvent) + */ + public void focusLost(org.eclipse.swt.events.FocusEvent e) { + updateProjectsList(directoryPathField.getText().trim()); + } + + }); + + directoryPathField.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + updateProjectsList(directoryPathField.getText().trim()); + } + }); + } + + private void directoryRadioSelected() { + directoryPathField.setEnabled(true); + browseDirectoriesButton.setEnabled(true); + updateProjectsList(directoryPathField.getText()); + directoryPathField.setFocus(); + } + + /* + * (non-Javadoc) Method declared on IDialogPage. Set the focus on path + * fields when page becomes visible. + */ + public void setVisible(boolean visible) { + super.setVisible(visible); + if (visible) { + this.directoryPathField.setFocus(); + } + } + + /** + * Update the list of projects based on path. Method declared public only + * for test suite. + * + * @param path + */ + public void updateProjectsList(final String path) { + // on an empty path empty selectedProjects + if (path == null || path.length() == 0) { + setMessage("Select a directory to search for existing Arduino Designer projects."); + selectedProjects = new ProjectRecord[0]; + projectsList.refresh(true); + setPageComplete(selectedProject != null); + lastPath = path; + return; + } + + final File directory = new File(path); + long modified = directory.lastModified(); + if (path.equals(lastPath) && lastModified == modified) { + // since the file/folder was not modified and the path did not + // change, no refreshing is required + return; + } + + lastPath = path; + lastModified = modified; + + // We can't access the radio button from the inner class so get the + // status beforehand + try { + getContainer().run(true, true, new IRunnableWithProgress() { + + /* + * (non-Javadoc) + * + * @see + * org.eclipse.jface.operation.IRunnableWithProgress#run(org + * .eclipse.core.runtime.IProgressMonitor) + */ + public void run(IProgressMonitor monitor) { + + monitor.beginTask("Searching for projects", 100); + selectedProjects = new ProjectRecord[0]; + Collection files = new ArrayList(); + monitor.worked(10); + if (directory.isDirectory()) { + + if (!collectProjectFilesFromDirectory(files, directory, + null, monitor)) { + return; + } + Iterator filesIterator = files.iterator(); + selectedProjects = new ProjectRecord[files.size()]; + int index = 0; + monitor.worked(50); + monitor.subTask("Pocessing results"); + while (filesIterator.hasNext()) { + File file = (File) filesIterator.next(); + selectedProjects[index] = new ProjectRecord(file); + index++; + } + } else { + monitor.worked(60); + } + monitor.done(); + } + + }); + } catch (InvocationTargetException e) { + IDEWorkbenchPlugin.log(e.getMessage(), e); + } catch (InterruptedException e) { + // Nothing to do if the user interrupts. + } + + projectsList.refresh(true); + ProjectRecord[] projects = getProjectRecords(); + boolean displayWarning = false; + for (int i = 0; i < projects.length; i++) { + if (projects[i].hasConflicts) { + displayWarning = true; + } + } + + if (displayWarning) { + setMessage( + "Some projects cannot be imported because they already exist in the workspace", + WARNING); + } else { + setMessage("Select a directory to search for existing Arduino Designer projects."); + } + setPageComplete(selectedProject != null); + if (selectedProjects.length == 0) { + setMessage("No projects are found, select another directory", + WARNING); + } + } + + /** + * Collect the list of .project files that are under directory into files. + * + * @param files + * @param directory + * @param directoriesVisited + * Set of canonical paths of directories, used as recursion guard + * @param monitor + * The monitor to report to + * @return boolean true if the operation was completed. + */ + private boolean collectProjectFilesFromDirectory(Collection files, + File directory, Set directoriesVisited, IProgressMonitor monitor) { + + if (monitor.isCanceled()) { + return false; + } + monitor.subTask("Checking:" + directory.getPath()); + File[] contents = directory.listFiles(); + if (contents == null) + return false; + + // Initialize recursion guard for recursive symbolic links + if (directoriesVisited == null) { + directoriesVisited = new HashSet(); + try { + directoriesVisited.add(directory.getCanonicalPath()); + } catch (IOException exception) { + StatusManager.getManager().handle( + StatusUtil.newStatus(IStatus.ERROR, + exception.getLocalizedMessage(), exception)); + } + } + + // first look for project description files + final String dotProject = IProjectDescription.DESCRIPTION_FILE_NAME; + for (int i = 0; i < contents.length; i++) { + File file = contents[i]; + if (file.isFile() && file.getName().equals(dotProject)) { + files.add(file); + } + } + // no project description found or search for nested projects enabled, + // so recurse into sub-directories + for (int i = 0; i < contents.length; i++) { + if (contents[i].isDirectory()) { + if (!contents[i].getName().equals(METADATA_FOLDER)) { + try { + String canonicalPath = contents[i].getCanonicalPath(); + if (!directoriesVisited.add(canonicalPath)) { + // already been here --> do not recurse + continue; + } + } catch (IOException exception) { + StatusManager.getManager().handle( + StatusUtil.newStatus(IStatus.ERROR, + exception.getLocalizedMessage(), + exception)); + + } + collectProjectFilesFromDirectory(files, contents[i], + directoriesVisited, monitor); + } + } + } + return true; + } + + /** + * The browse button has been selected. Select the location. + */ + protected void handleLocationDirectoryButtonPressed() { + + DirectoryDialog dialog = new DirectoryDialog( + directoryPathField.getShell(), SWT.SHEET); + dialog.setMessage("Select directory of the project to open"); + + String dirName = directoryPathField.getText().trim(); + if (dirName.length() == 0) { + dirName = previouslyBrowsedDirectory; + } + + if (dirName.length() == 0) { + dialog.setFilterPath(IDEWorkbenchPlugin.getPluginWorkspace() + .getRoot().getLocation().toOSString()); + } else { + File path = new File(dirName); + if (path.exists()) { + dialog.setFilterPath(new Path(dirName).toOSString()); + } + } + + String selectedDirectory = dialog.open(); + if (selectedDirectory != null) { + previouslyBrowsedDirectory = selectedDirectory; + directoryPathField.setText(previouslyBrowsedDirectory); + updateProjectsList(selectedDirectory); + } + } + + /** + * Create the selected projects + * + * @return boolean true if all project creations were + * successful. + */ + public boolean createProjects() { + saveWidgetValues(); + + final Object selected = selectedProject; + createdProjects = new ArrayList(); + WorkspaceModifyOperation op = new WorkspaceModifyOperation() { + protected void execute(IProgressMonitor monitor) + throws InvocationTargetException, InterruptedException { + try { + monitor.beginTask("", 1); //$NON-NLS-1$ + if (monitor.isCanceled()) { + throw new OperationCanceledException(); + } + if (selectedProject != null) + createExistingProject((ProjectRecord) selectedProject, + new SubProgressMonitor(monitor, 1)); + } finally { + monitor.done(); + } + } + }; + // run the new project creation operation + try { + getContainer().run(true, true, op); + } catch (InterruptedException e) { + return false; + } catch (InvocationTargetException e) { + // one of the steps resulted in a core exception + Throwable t = e.getTargetException(); + String message = "Creation Problems"; + IStatus status; + if (t instanceof CoreException) { + status = ((CoreException) t).getStatus(); + } else { + status = new Status(IStatus.ERROR, + IDEWorkbenchPlugin.IDE_WORKBENCH, 1, message, t); + } + ErrorDialog.openError(getShell(), message, null, status); + return false; + } + + return true; + } + + List createdProjects; + + /** + * Performs clean-up if the user cancels the wizard without doing anything + */ + public void performCancel() { + } + + /** + * Create the project described in record. If it is successful return true. + * + * @param record + * @return boolean true if successful + * @throws InterruptedException + */ + private boolean createExistingProject(final ProjectRecord record, + final IProgressMonitor monitor) throws InvocationTargetException, + InterruptedException { + final String projectName = record.getProjectName(); + final IWorkspace workspace = ResourcesPlugin.getWorkspace(); + final IProject project = workspace.getRoot().getProject(projectName); + + for (IEditingSession uiSession : SessionUIManager.INSTANCE + .getUISessions()) { + for (DialectEditor editor : uiSession.getEditors()) { + if (editor instanceof DiagramEditor) { + final EditPartViewer graphicalViewer = ((DiagramEditor) editor) + .getDiagramGraphicalViewer(); + + if (graphicalViewer != null) { + graphicalViewer.setSelection(new StructuredSelection()); + Display.getDefault().syncExec(new Runnable() { + + @Override + public void run() { + graphicalViewer.flush(); + + } + }); + /* + * We need to spin the ui thread so that the editor has + * the change to update its action enablement before we + * close and unload everything. + * + * We just hope to be lucky and to be scheduled after + * the runnables launched by the arrange action in + * particular. + */ + SWTThreadingUtils.waitForAsyncExecsToFinish(Display + .getDefault()); + } + } else { + DialectUIManager.INSTANCE.setSelection(editor, + Collections.EMPTY_LIST); + } + } + SWTThreadingUtils.waitForAsyncExecsToFinish(Display.getDefault()); + } + + SWTThreadingUtils.waitForAsyncExecsToFinish(Display.getDefault()); + + // for (Session openedSession : SessionManager.INSTANCE.getSessions()) { + // openedSession.save(monitor); + // openedSession.close(monitor); + // } + + IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); + for (IProject projectToClose : root.getProjects()) { + try { + if (projectToClose.isOpen()) { + System.out.println("Closing : " + projectToClose.getName()); + projectToClose.close(monitor); + projectToClose.delete(false, false, monitor); + } + monitor.worked(25); + } catch (CoreException e) { + ArduinoUiActivator.log(Status.ERROR, "Close project failed", e); + } + } + + createdProjects.add(project); + if (record.description == null) { + // error case + record.description = workspace.newProjectDescription(projectName); + IPath locationPath = new Path( + record.projectSystemFile.getAbsolutePath()); + + // If it is under the root use the default location + if (Platform.getLocation().isPrefixOf(locationPath)) { + record.description.setLocation(null); + } else { + record.description.setLocation(locationPath); + } + } else { + record.description.setName(projectName); + } + + // import from file system + try { + monitor.beginTask("Creating Projects", 100); + project.create(record.description, new SubProgressMonitor(monitor, + 30)); + project.open(IResource.BACKGROUND_REFRESH, new SubProgressMonitor( + monitor, 70)); + } catch (CoreException e) { + } finally { + monitor.done(); + } + + return true; + } + + /** + * Method used for test suite. + * + * @return TreeViewer the viewer containing all the projects found + */ + public TreeViewer getProjectsList() { + return projectsList; + } + + /** + * Retrieve all the projects in the current workspace. + * + * @return IProject[] array of IProject in the current workspace + */ + private IProject[] getProjectsInWorkspace() { + if (wsProjects == null) { + wsProjects = IDEWorkbenchPlugin.getPluginWorkspace().getRoot() + .getProjects(); + } + return wsProjects; + } + + /** + * Get the array of project records that can be imported from the source + * workspace or archive, selected by the user. If a project with the same + * name exists in both the source workspace and the current workspace, then + * the hasConflicts flag would be set on that project record. + * + * Method declared public for test suite. + * + * @return ProjectRecord[] array of projects that can be imported into the + * workspace + */ + public ProjectRecord[] getProjectRecords() { + List projectRecords = new ArrayList(); + for (int i = 0; i < selectedProjects.length; i++) { + if (isProjectInWorkspace(selectedProjects[i].getProjectName())) { + selectedProjects[i].hasConflicts = true; + } + projectRecords.add(selectedProjects[i]); + } + return (ProjectRecord[]) projectRecords + .toArray(new ProjectRecord[projectRecords.size()]); + } + + /** + * Determine if there is a directory with the project name in the workspace + * path. + * + * @param projectName + * the name of the project + * @return true if there is a directory with the same name of the imported + * project + */ + private boolean isProjectInWorkspacePath(String projectName) { + final IWorkspace workspace = ResourcesPlugin.getWorkspace(); + IPath wsPath = workspace.getRoot().getLocation(); + IPath localProjectPath = wsPath.append(projectName); + return localProjectPath.toFile().exists(); + } + + /** + * Determine if the project with the given name is in the current workspace. + * + * @param projectName + * String the project name to check + * @return boolean true if the project with the given name is in this + * workspace + */ + private boolean isProjectInWorkspace(String projectName) { + if (projectName == null) { + return false; + } + IProject[] workspaceProjects = getProjectsInWorkspace(); + for (int i = 0; i < workspaceProjects.length; i++) { + if (projectName.equals(workspaceProjects[i].getName())) { + return true; + } + } + return false; + } + + /** + * Use the dialog store to restore widget values to the values that they + * held last time this wizard was used to completion, or alternatively, if + * an initial path is specified, use it to select values. + * + * Method declared public only for use of tests. + */ + public void restoreWidgetValues() { + + // First, check to see if we have resore settings, and + // take care of the checkbox + IDialogSettings settings = getDialogSettings(); + if (settings != null) { + restoreFromHistory(settings, STORE_DIRECTORIES, directoryPathField); + } + + // Second, check to see if we don't have an initial path, + // and if we do have restore settings. If so, set the + // radio selection properly to restore settings + + if (initialPath == null && settings != null) { + directoryRadioSelected(); + } + // Third, if we do have an initial path, set the proper + // path and radio buttons to the initial value. Move + // cursor to the end of the path so user can see the + // most relevant part (directory / archive name) + else if (initialPath != null) { + boolean dir = new File(initialPath).isDirectory(); + + if (dir) { + directoryPathField.setText(initialPath); + directoryPathField.setSelection(new Point(initialPath.length(), + initialPath.length())); + directoryRadioSelected(); + } + } + } + + private void restoreFromHistory(IDialogSettings settings, String key, + Combo combo) { + String[] sourceNames = settings.getArray(key); + if (sourceNames == null) { + return; // ie.- no values stored, so stop + } + + for (int i = 0; i < sourceNames.length; i++) { + combo.add(sourceNames[i]); + } + } + + /** + * Since Finish was pressed, write widget values to the dialog store so that + * they will persist into the next invocation of this wizard page. + * + * Method declared public only for use of tests. + */ + public void saveWidgetValues() { + IDialogSettings settings = getDialogSettings(); + if (settings != null) { + saveInHistory(settings, STORE_DIRECTORIES, + directoryPathField.getText()); + } + } + + private void saveInHistory(IDialogSettings settings, String key, + String value) { + String[] sourceNames = settings.getArray(key); + if (sourceNames == null) { + sourceNames = new String[0]; + } + sourceNames = addToHistory(sourceNames, value); + settings.put(key, sourceNames); + } + + public void handleEvent(Event event) { + } + + protected boolean allowNewContainerName() { + return true; + } + +} diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/wizard/SWTThreadingUtils.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/wizard/SWTThreadingUtils.java new file mode 100644 index 00000000..53aa141c --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino.ui/src/fr/obeo/dsl/arduino/wizard/SWTThreadingUtils.java @@ -0,0 +1,44 @@ +package fr.obeo.dsl.arduino.wizard; + +import org.eclipse.swt.widgets.Display; + +public class SWTThreadingUtils +{ + + public static void waitForAsyncExecsToFinish(Display display) + { + Object waitObj = new Object(); + + display.asyncExec(new DummyRunnable(waitObj)); + synchronized (waitObj) + { + try { + waitObj.wait(); + + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + } + } + + + private static class DummyRunnable implements Runnable + { + private Object waitObj; + + public DummyRunnable(Object waitObj) + { + this.waitObj = waitObj; + } + + @Override + public void run() + { + synchronized (waitObj) + { + waitObj.notify(); + } + } + } + +} \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/.classpath b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/.classpath new file mode 100644 index 00000000..f9f04ed5 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/.gitignore b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/.gitignore new file mode 100644 index 00000000..5e56e040 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/.gitignore @@ -0,0 +1 @@ +/bin diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/.project b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/.project new file mode 100644 index 00000000..11ccea89 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/.project @@ -0,0 +1,29 @@ + + + fr.obeo.dsl.arduino + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + fr.obeo.dsl.viewpoint.nature.modelingproject + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/META-INF/MANIFEST.MF b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/META-INF/MANIFEST.MF new file mode 100644 index 00000000..04804ce6 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/META-INF/MANIFEST.MF @@ -0,0 +1,15 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: fr.obeo.dsl.arduino;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Export-Package: fr.obeo.dsl.arduino, + fr.obeo.dsl.arduino.impl, + fr.obeo.dsl.arduino.util +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport +Bundle-ActivationPolicy: lazy diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/build.properties b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/build.properties new file mode 100644 index 00000000..7f0c2ffc --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/build.properties @@ -0,0 +1,11 @@ +# + +bin.includes = .,\ + model/,\ + META-INF/,\ + plugin.xml,\ + plugin.properties +jars.compile.order = . +source.. = src-gen/,\ + src/ +output.. = bin/ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/model/arduino class diagram.png b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/model/arduino class diagram.png new file mode 100644 index 00000000..c08a4263 Binary files /dev/null and b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/model/arduino class diagram.png differ diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/model/arduino.aird b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/model/arduino.aird new file mode 100644 index 00000000..4f553dbf --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/model/arduino.aird @@ -0,0 +1,11331 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + KEEP_LOCATION + KEEP_SIZE + KEEP_RATIO + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + routingStyle + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/model/arduino.ecore b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/model/arduino.ecore new file mode 100644 index 00000000..0a619840 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/model/arduino.ecore @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/model/arduino.genmodel b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/model/arduino.genmodel new file mode 100644 index 00000000..a800983b --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/model/arduino.genmodel @@ -0,0 +1,376 @@ + + + arduino.ecore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/plugin.properties b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/plugin.properties new file mode 100644 index 00000000..5aa1087d --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = Arduino Model +providerName = www.example.org diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/plugin.xml b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/plugin.xml new file mode 100644 index 00000000..d9cba2eb --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/plugin.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/pom.xml b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/pom.xml new file mode 100644 index 00000000..85d293f4 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/pom.xml @@ -0,0 +1,42 @@ + + + + 4.0.0 + + + fr.obeo.dsl.arduino + parent + 1.0.0-SNAPSHOT + ../../releng/fr.obeo.dsl.arduino.parent + + + fr.obeo.dsl.arduino + eclipse-plugin + + Arduino Language + + + + + org.eclipse.tycho + tycho-source-plugin + + + org.apache.maven.plugins + maven-pmd-plugin + + + + + diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/refactoring.txt b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/refactoring.txt new file mode 100644 index 00000000..f4141e2a --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/refactoring.txt @@ -0,0 +1,21 @@ +Here are the changes I did to the metamodel and associated tooling + + +renamed: + + MathOperator -> MathExpression + + NumericalOperator -> NumericalExpression + + BooleanOperator -> BooleanExpression + + Status -> ModuleSet + + Sensor -> ModuleGet + + InputModule -> Sensor + + OutputModule -> Actuator + +added: + + make Constant abstract and add two specializations: IntegerConstant and BooleanConstant + +removed: + + Function, Parameter and co have been removed since it was strangely done and named and not very useful. Could be re-introduced if needed (after cleaning). + + Level -> I understood that Level was a specific IntegerSetter while Status was a boolean Setter or something like that. I removed them to create a ModuleSet instruction +modified: + + ModuleSet (ex Status) is now pointing to an expression for the value to set and the link to sensor is removed. All this stuff between Status and Sensor was so strange In prefered to remove all. + + ModuleGet is now an Expression pointing to a module \ No newline at end of file diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/AbstractInstructionBlock.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/AbstractInstructionBlock.java new file mode 100644 index 00000000..2ed18749 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/AbstractInstructionBlock.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Abstract Instruction Block'. + * + * + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getAbstractInstructionBlock() + * @model + * @generated + */ +public interface AbstractInstructionBlock extends NamedElement { +} // AbstractInstructionBlock diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/AmbientLightSensor.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/AmbientLightSensor.java new file mode 100644 index 00000000..d02de1db --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/AmbientLightSensor.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Ambient Light Sensor'. + * + * + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getAmbientLightSensor() + * @model + * @generated + */ +public interface AmbientLightSensor extends ArduinoAnalogModule { +} // AmbientLightSensor diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/AnalogPin.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/AnalogPin.java new file mode 100644 index 00000000..cc8fa7a8 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/AnalogPin.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Analog Pin'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.AnalogPin#getModule Module}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getAnalogPin() + * @model + * @generated + */ +public interface AnalogPin extends Pin { + /** + * Returns the value of the 'Module' containment reference. + * + *

+ * If the meaning of the 'Module' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Module' containment reference. + * @see #setModule(ArduinoAnalogModule) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getAnalogPin_Module() + * @model containment="true" + * @generated + */ + ArduinoAnalogModule getModule(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.AnalogPin#getModule Module}' containment reference. + * + * + * @param value the new value of the 'Module' containment reference. + * @see #getModule() + * @generated + */ + void setModule(ArduinoAnalogModule value); + +} // AnalogPin diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ArduinoAnalogModule.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ArduinoAnalogModule.java new file mode 100644 index 00000000..6fa42b57 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ArduinoAnalogModule.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Analog Module'. + * + * + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getArduinoAnalogModule() + * @model abstract="true" + * @generated + */ +public interface ArduinoAnalogModule extends ArduinoModule { +} // ArduinoAnalogModule diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ArduinoBoard.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ArduinoBoard.java new file mode 100644 index 00000000..c0706e5d --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ArduinoBoard.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Board'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.ArduinoBoard#getDigitalPins Digital Pins}
  • + *
  • {@link fr.obeo.dsl.arduino.ArduinoBoard#getAnalogPins Analog Pins}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getArduinoBoard() + * @model + * @generated + */ +public interface ArduinoBoard extends Board { + /** + * Returns the value of the 'Digital Pins' containment reference list. + * The list contents are of type {@link fr.obeo.dsl.arduino.DigitalPin}. + * + *

+ * If the meaning of the 'Digital Pins' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Digital Pins' containment reference list. + * @see fr.obeo.dsl.arduino.ArduinoPackage#getArduinoBoard_DigitalPins() + * @model containment="true" + * @generated + */ + EList getDigitalPins(); + + /** + * Returns the value of the 'Analog Pins' containment reference list. + * The list contents are of type {@link fr.obeo.dsl.arduino.AnalogPin}. + * + *

+ * If the meaning of the 'Analog Pins' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Analog Pins' containment reference list. + * @see fr.obeo.dsl.arduino.ArduinoPackage#getArduinoBoard_AnalogPins() + * @model containment="true" + * @generated + */ + EList getAnalogPins(); + +} // ArduinoBoard diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ArduinoDigitalModule.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ArduinoDigitalModule.java new file mode 100644 index 00000000..cf838bd9 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ArduinoDigitalModule.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Digital Module'. + * + * + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getArduinoDigitalModule() + * @model abstract="true" + * @generated + */ +public interface ArduinoDigitalModule extends ArduinoModule { +} // ArduinoDigitalModule diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ArduinoFactory.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ArduinoFactory.java new file mode 100644 index 00000000..cea9954a --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ArduinoFactory.java @@ -0,0 +1,383 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see fr.obeo.dsl.arduino.ArduinoPackage + * @generated + */ +public interface ArduinoFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + ArduinoFactory eINSTANCE = fr.obeo.dsl.arduino.impl.ArduinoFactoryImpl.init(); + + /** + * Returns a new object of class 'Digital Pin'. + * + * + * @return a new object of class 'Digital Pin'. + * @generated + */ + DigitalPin createDigitalPin(); + + /** + * Returns a new object of class 'Analog Pin'. + * + * + * @return a new object of class 'Analog Pin'. + * @generated + */ + AnalogPin createAnalogPin(); + + /** + * Returns a new object of class 'Sketch'. + * + * + * @return a new object of class 'Sketch'. + * @generated + */ + Sketch createSketch(); + + /** + * Returns a new object of class 'Project'. + * + * + * @return a new object of class 'Project'. + * @generated + */ + Project createProject(); + + /** + * Returns a new object of class 'Module Assignment'. + * + * + * @return a new object of class 'Module Assignment'. + * @generated + */ + ModuleAssignment createModuleAssignment(); + + /** + * Returns a new object of class 'Delay'. + * + * + * @return a new object of class 'Delay'. + * @generated + */ + Delay createDelay(); + + /** + * Returns a new object of class 'Repeat'. + * + * + * @return a new object of class 'Repeat'. + * @generated + */ + Repeat createRepeat(); + + /** + * Returns a new object of class 'While'. + * + * + * @return a new object of class 'While'. + * @generated + */ + While createWhile(); + + /** + * Returns a new object of class 'Variable Assignment'. + * + * + * @return a new object of class 'Variable Assignment'. + * @generated + */ + VariableAssignment createVariableAssignment(); + + /** + * Returns a new object of class 'Binary Integer Expression'. + * + * + * @return a new object of class 'Binary Integer Expression'. + * @generated + */ + BinaryIntegerExpression createBinaryIntegerExpression(); + + /** + * Returns a new object of class 'Binary Boolean Expression'. + * + * + * @return a new object of class 'Binary Boolean Expression'. + * @generated + */ + BinaryBooleanExpression createBinaryBooleanExpression(); + + /** + * Returns a new object of class 'If'. + * + * + * @return a new object of class 'If'. + * @generated + */ + If createIf(); + + /** + * Returns a new object of class 'Integer Constant'. + * + * + * @return a new object of class 'Integer Constant'. + * @generated + */ + IntegerConstant createIntegerConstant(); + + /** + * Returns a new object of class 'Boolean Constant'. + * + * + * @return a new object of class 'Boolean Constant'. + * @generated + */ + BooleanConstant createBooleanConstant(); + + /** + * Returns a new object of class 'Integer Variable'. + * + * + * @return a new object of class 'Integer Variable'. + * @generated + */ + IntegerVariable createIntegerVariable(); + + /** + * Returns a new object of class 'Boolean Variable'. + * + * + * @return a new object of class 'Boolean Variable'. + * @generated + */ + BooleanVariable createBooleanVariable(); + + /** + * Returns a new object of class 'Boolean Module Get'. + * + * + * @return a new object of class 'Boolean Module Get'. + * @generated + */ + BooleanModuleGet createBooleanModuleGet(); + + /** + * Returns a new object of class 'Integer Module Get'. + * + * + * @return a new object of class 'Integer Module Get'. + * @generated + */ + IntegerModuleGet createIntegerModuleGet(); + + /** + * Returns a new object of class 'Unary Boolean Expression'. + * + * + * @return a new object of class 'Unary Boolean Expression'. + * @generated + */ + UnaryBooleanExpression createUnaryBooleanExpression(); + + /** + * Returns a new object of class 'Unary Integer Expression'. + * + * + * @return a new object of class 'Unary Integer Expression'. + * @generated + */ + UnaryIntegerExpression createUnaryIntegerExpression(); + + /** + * Returns a new object of class 'Variable Declaration'. + * + * + * @return a new object of class 'Variable Declaration'. + * @generated + */ + VariableDeclaration createVariableDeclaration(); + + /** + * Returns a new object of class 'Variable Ref'. + * + * + * @return a new object of class 'Variable Ref'. + * @generated + */ + VariableRef createVariableRef(); + + /** + * Returns a new object of class 'LED'. + * + * + * @return a new object of class 'LED'. + * @generated + */ + LED createLED(); + + /** + * Returns a new object of class 'Push Button'. + * + * + * @return a new object of class 'Push Button'. + * @generated + */ + PushButton createPushButton(); + + /** + * Returns a new object of class 'Buzzer'. + * + * + * @return a new object of class 'Buzzer'. + * @generated + */ + Buzzer createBuzzer(); + + /** + * Returns a new object of class 'Rotation Sensor'. + * + * + * @return a new object of class 'Rotation Sensor'. + * @generated + */ + RotationSensor createRotationSensor(); + + /** + * Returns a new object of class 'Micro Servo'. + * + * + * @return a new object of class 'Micro Servo'. + * @generated + */ + MicroServo createMicroServo(); + + /** + * Returns a new object of class 'Infra Red Sensor'. + * + * + * @return a new object of class 'Infra Red Sensor'. + * @generated + */ + InfraRedSensor createInfraRedSensor(); + + /** + * Returns a new object of class 'Ambient Light Sensor'. + * + * + * @return a new object of class 'Ambient Light Sensor'. + * @generated + */ + AmbientLightSensor createAmbientLightSensor(); + + /** + * Returns a new object of class 'Sound Sensor'. + * + * + * @return a new object of class 'Sound Sensor'. + * @generated + */ + SoundSensor createSoundSensor(); + + /** + * Returns a new object of class 'Fan'. + * + * + * @return a new object of class 'Fan'. + * @generated + */ + Fan createFan(); + + /** + * Returns a new object of class 'Music Player'. + * + * + * @return a new object of class 'Music Player'. + * @generated + */ + MusicPlayer createMusicPlayer(); + + /** + * Returns a new object of class 'Board'. + * + * + * @return a new object of class 'Board'. + * @generated + */ + ArduinoBoard createArduinoBoard(); + + /** + * Returns a new object of class 'Thread'. + * + * + * @return a new object of class 'Thread'. + * @generated + */ + Thread createThread(); + + /** + * Returns a new object of class 'Channel'. + * + * + * @return a new object of class 'Channel'. + * @generated + */ + Channel createChannel(); + + /** + * Returns a new object of class 'Link'. + * + * + * @return a new object of class 'Link'. + * @generated + */ + Link createLink(); + + /** + * Returns a new object of class 'Synchronization Block'. + * + * + * @return a new object of class 'Synchronization Block'. + * @generated + */ + SynchronizationBlock createSynchronizationBlock(); + + /** + * Returns a new object of class 'Instruction Block'. + * + * + * @return a new object of class 'Instruction Block'. + * @generated + */ + InstructionBlock createInstructionBlock(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + ArduinoPackage getArduinoPackage(); + +} //ArduinoFactory diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ArduinoModule.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ArduinoModule.java new file mode 100644 index 00000000..c6b4f641 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ArduinoModule.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Module'. + * + * + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getArduinoModule() + * @model abstract="true" + * @generated + */ +public interface ArduinoModule extends Module { +} // ArduinoModule diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ArduinoPackage.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ArduinoPackage.java new file mode 100644 index 00000000..2c0d0ea5 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ArduinoPackage.java @@ -0,0 +1,5034 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see fr.obeo.dsl.arduino.ArduinoFactory + * @model kind="package" + * @generated + */ +public interface ArduinoPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "arduino"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "http://www.obeo.fr/arduino"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "arduino"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + ArduinoPackage eINSTANCE = fr.obeo.dsl.arduino.impl.ArduinoPackageImpl.init(); + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.NamedElementImpl Named Element}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.NamedElementImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getNamedElement() + * @generated + */ + int NAMED_ELEMENT = 13; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int NAMED_ELEMENT__NAME = 0; + + /** + * The number of structural features of the 'Named Element' class. + * + * + * @generated + * @ordered + */ + int NAMED_ELEMENT_FEATURE_COUNT = 1; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.BoardImpl Board}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.BoardImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getBoard() + * @generated + */ + int BOARD = 0; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int BOARD__NAME = NAMED_ELEMENT__NAME; + + /** + * The feature id for the 'Project' container reference. + * + * + * @generated + * @ordered + */ + int BOARD__PROJECT = NAMED_ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Threads' reference list. + * + * + * @generated + * @ordered + */ + int BOARD__THREADS = NAMED_ELEMENT_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Board' class. + * + * + * @generated + * @ordered + */ + int BOARD_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.Module Module}' class. + * + * + * @see fr.obeo.dsl.arduino.Module + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getModule() + * @generated + */ + int MODULE = 1; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int MODULE__NAME = NAMED_ELEMENT__NAME; + + /** + * The feature id for the 'Level' attribute. + * + * + * @generated + * @ordered + */ + int MODULE__LEVEL = NAMED_ELEMENT_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Module' class. + * + * + * @generated + * @ordered + */ + int MODULE_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.PinImpl Pin}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.PinImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getPin() + * @generated + */ + int PIN = 3; + + /** + * The feature id for the 'Id' attribute. + * + * + * @generated + * @ordered + */ + int PIN__ID = 0; + + /** + * The feature id for the 'Level' attribute. + * + * + * @generated + * @ordered + */ + int PIN__LEVEL = 1; + + /** + * The number of structural features of the 'Pin' class. + * + * + * @generated + * @ordered + */ + int PIN_FEATURE_COUNT = 2; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.DigitalPinImpl Digital Pin}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.DigitalPinImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getDigitalPin() + * @generated + */ + int DIGITAL_PIN = 2; + + /** + * The feature id for the 'Id' attribute. + * + * + * @generated + * @ordered + */ + int DIGITAL_PIN__ID = PIN__ID; + + /** + * The feature id for the 'Level' attribute. + * + * + * @generated + * @ordered + */ + int DIGITAL_PIN__LEVEL = PIN__LEVEL; + + /** + * The feature id for the 'Module' containment reference. + * + * + * @generated + * @ordered + */ + int DIGITAL_PIN__MODULE = PIN_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Digital Pin' class. + * + * + * @generated + * @ordered + */ + int DIGITAL_PIN_FEATURE_COUNT = PIN_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.AnalogPinImpl Analog Pin}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.AnalogPinImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getAnalogPin() + * @generated + */ + int ANALOG_PIN = 4; + + /** + * The feature id for the 'Id' attribute. + * + * + * @generated + * @ordered + */ + int ANALOG_PIN__ID = PIN__ID; + + /** + * The feature id for the 'Level' attribute. + * + * + * @generated + * @ordered + */ + int ANALOG_PIN__LEVEL = PIN__LEVEL; + + /** + * The feature id for the 'Module' containment reference. + * + * + * @generated + * @ordered + */ + int ANALOG_PIN__MODULE = PIN_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Analog Pin' class. + * + * + * @generated + * @ordered + */ + int ANALOG_PIN_FEATURE_COUNT = PIN_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.SketchImpl Sketch}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.SketchImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getSketch() + * @generated + */ + int SKETCH = 5; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SKETCH__NAME = NAMED_ELEMENT__NAME; + + /** + * The feature id for the 'Project' container reference. + * + * + * @generated + * @ordered + */ + int SKETCH__PROJECT = NAMED_ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Threads' containment reference list. + * + * + * @generated + * @ordered + */ + int SKETCH__THREADS = NAMED_ELEMENT_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Channels' containment reference list. + * + * + * @generated + * @ordered + */ + int SKETCH__CHANNELS = NAMED_ELEMENT_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Sketch' class. + * + * + * @generated + * @ordered + */ + int SKETCH_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 3; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.ProjectImpl Project}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ProjectImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getProject() + * @generated + */ + int PROJECT = 6; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int PROJECT__NAME = NAMED_ELEMENT__NAME; + + /** + * The feature id for the 'Boards' containment reference list. + * + * + * @generated + * @ordered + */ + int PROJECT__BOARDS = NAMED_ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Sketch' containment reference. + * + * + * @generated + * @ordered + */ + int PROJECT__SKETCH = NAMED_ELEMENT_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Links' containment reference list. + * + * + * @generated + * @ordered + */ + int PROJECT__LINKS = NAMED_ELEMENT_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Project' class. + * + * + * @generated + * @ordered + */ + int PROJECT_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 3; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.InstructionImpl Instruction}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.InstructionImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getInstruction() + * @generated + */ + int INSTRUCTION = 7; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int INSTRUCTION__NAME = NAMED_ELEMENT__NAME; + + /** + * The feature id for the 'Owned Block' container reference. + * + * + * @generated + * @ordered + */ + int INSTRUCTION__OWNED_BLOCK = NAMED_ELEMENT_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Instruction' class. + * + * + * @generated + * @ordered + */ + int INSTRUCTION_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.ModuleInstructionImpl Module Instruction}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ModuleInstructionImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getModuleInstruction() + * @generated + */ + int MODULE_INSTRUCTION = 9; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int MODULE_INSTRUCTION__NAME = INSTRUCTION__NAME; + + /** + * The feature id for the 'Owned Block' container reference. + * + * + * @generated + * @ordered + */ + int MODULE_INSTRUCTION__OWNED_BLOCK = INSTRUCTION__OWNED_BLOCK; + + /** + * The feature id for the 'Module' reference. + * + * + * @generated + * @ordered + */ + int MODULE_INSTRUCTION__MODULE = INSTRUCTION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Module Instruction' class. + * + * + * @generated + * @ordered + */ + int MODULE_INSTRUCTION_FEATURE_COUNT = INSTRUCTION_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.ModuleAssignmentImpl Module Assignment}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ModuleAssignmentImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getModuleAssignment() + * @generated + */ + int MODULE_ASSIGNMENT = 8; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int MODULE_ASSIGNMENT__NAME = MODULE_INSTRUCTION__NAME; + + /** + * The feature id for the 'Owned Block' container reference. + * + * + * @generated + * @ordered + */ + int MODULE_ASSIGNMENT__OWNED_BLOCK = MODULE_INSTRUCTION__OWNED_BLOCK; + + /** + * The feature id for the 'Module' reference. + * + * + * @generated + * @ordered + */ + int MODULE_ASSIGNMENT__MODULE = MODULE_INSTRUCTION__MODULE; + + /** + * The feature id for the 'Operand' containment reference. + * + * + * @generated + * @ordered + */ + int MODULE_ASSIGNMENT__OPERAND = MODULE_INSTRUCTION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Module Assignment' class. + * + * + * @generated + * @ordered + */ + int MODULE_ASSIGNMENT_FEATURE_COUNT = MODULE_INSTRUCTION_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.ControlImpl Control}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ControlImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getControl() + * @generated + */ + int CONTROL = 10; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CONTROL__NAME = INSTRUCTION__NAME; + + /** + * The feature id for the 'Owned Block' container reference. + * + * + * @generated + * @ordered + */ + int CONTROL__OWNED_BLOCK = INSTRUCTION__OWNED_BLOCK; + + /** + * The feature id for the 'Block' containment reference. + * + * + * @generated + * @ordered + */ + int CONTROL__BLOCK = INSTRUCTION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Control' class. + * + * + * @generated + * @ordered + */ + int CONTROL_FEATURE_COUNT = INSTRUCTION_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.UtilitiesImpl Utilities}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.UtilitiesImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getUtilities() + * @generated + */ + int UTILITIES = 11; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int UTILITIES__NAME = INSTRUCTION__NAME; + + /** + * The feature id for the 'Owned Block' container reference. + * + * + * @generated + * @ordered + */ + int UTILITIES__OWNED_BLOCK = INSTRUCTION__OWNED_BLOCK; + + /** + * The number of structural features of the 'Utilities' class. + * + * + * @generated + * @ordered + */ + int UTILITIES_FEATURE_COUNT = INSTRUCTION_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.DelayImpl Delay}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.DelayImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getDelay() + * @generated + */ + int DELAY = 12; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int DELAY__NAME = UTILITIES__NAME; + + /** + * The feature id for the 'Owned Block' container reference. + * + * + * @generated + * @ordered + */ + int DELAY__OWNED_BLOCK = UTILITIES__OWNED_BLOCK; + + /** + * The feature id for the 'Unit' attribute. + * + * + * @generated + * @ordered + */ + int DELAY__UNIT = UTILITIES_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int DELAY__VALUE = UTILITIES_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Delay' class. + * + * + * @generated + * @ordered + */ + int DELAY_FEATURE_COUNT = UTILITIES_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.RepeatImpl Repeat}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.RepeatImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getRepeat() + * @generated + */ + int REPEAT = 14; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int REPEAT__NAME = CONTROL__NAME; + + /** + * The feature id for the 'Owned Block' container reference. + * + * + * @generated + * @ordered + */ + int REPEAT__OWNED_BLOCK = CONTROL__OWNED_BLOCK; + + /** + * The feature id for the 'Block' containment reference. + * + * + * @generated + * @ordered + */ + int REPEAT__BLOCK = CONTROL__BLOCK; + + /** + * The feature id for the 'Iteration' attribute. + * + * + * @generated + * @ordered + */ + int REPEAT__ITERATION = CONTROL_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Repeat' class. + * + * + * @generated + * @ordered + */ + int REPEAT_FEATURE_COUNT = CONTROL_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.ExpressionImpl Expression}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ExpressionImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getExpression() + * @generated + */ + int EXPRESSION = 22; + + /** + * The number of structural features of the 'Expression' class. + * + * + * @generated + * @ordered + */ + int EXPRESSION_FEATURE_COUNT = 0; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.ModuleGetImpl Module Get}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ModuleGetImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getModuleGet() + * @generated + */ + int MODULE_GET = 15; + + /** + * The feature id for the 'Module' reference. + * + * + * @generated + * @ordered + */ + int MODULE_GET__MODULE = EXPRESSION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Module Get' class. + * + * + * @generated + * @ordered + */ + int MODULE_GET_FEATURE_COUNT = EXPRESSION_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.WhileImpl While}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.WhileImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getWhile() + * @generated + */ + int WHILE = 16; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int WHILE__NAME = CONTROL__NAME; + + /** + * The feature id for the 'Owned Block' container reference. + * + * + * @generated + * @ordered + */ + int WHILE__OWNED_BLOCK = CONTROL__OWNED_BLOCK; + + /** + * The feature id for the 'Block' containment reference. + * + * + * @generated + * @ordered + */ + int WHILE__BLOCK = CONTROL__BLOCK; + + /** + * The feature id for the 'Condition' containment reference. + * + * + * @generated + * @ordered + */ + int WHILE__CONDITION = CONTROL_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'While' class. + * + * + * @generated + * @ordered + */ + int WHILE_FEATURE_COUNT = CONTROL_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.BinaryExpressionImpl Binary Expression}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.BinaryExpressionImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getBinaryExpression() + * @generated + */ + int BINARY_EXPRESSION = 17; + + /** + * The feature id for the 'Left' containment reference. + * + * + * @generated + * @ordered + */ + int BINARY_EXPRESSION__LEFT = EXPRESSION_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Right' containment reference. + * + * + * @generated + * @ordered + */ + int BINARY_EXPRESSION__RIGHT = EXPRESSION_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Binary Expression' class. + * + * + * @generated + * @ordered + */ + int BINARY_EXPRESSION_FEATURE_COUNT = EXPRESSION_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.VariableImpl Variable}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.VariableImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getVariable() + * @generated + */ + int VARIABLE = 18; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int VARIABLE__NAME = EXPRESSION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Variable' class. + * + * + * @generated + * @ordered + */ + int VARIABLE_FEATURE_COUNT = EXPRESSION_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.VariableAssignmentImpl Variable Assignment}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.VariableAssignmentImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getVariableAssignment() + * @generated + */ + int VARIABLE_ASSIGNMENT = 19; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int VARIABLE_ASSIGNMENT__NAME = INSTRUCTION__NAME; + + /** + * The feature id for the 'Owned Block' container reference. + * + * + * @generated + * @ordered + */ + int VARIABLE_ASSIGNMENT__OWNED_BLOCK = INSTRUCTION__OWNED_BLOCK; + + /** + * The feature id for the 'Operand' containment reference. + * + * + * @generated + * @ordered + */ + int VARIABLE_ASSIGNMENT__OPERAND = INSTRUCTION_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Variable' reference. + * + * + * @generated + * @ordered + */ + int VARIABLE_ASSIGNMENT__VARIABLE = INSTRUCTION_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Variable Assignment' class. + * + * + * @generated + * @ordered + */ + int VARIABLE_ASSIGNMENT_FEATURE_COUNT = INSTRUCTION_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.BinaryIntegerExpressionImpl Binary Integer Expression}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.BinaryIntegerExpressionImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getBinaryIntegerExpression() + * @generated + */ + int BINARY_INTEGER_EXPRESSION = 20; + + /** + * The feature id for the 'Left' containment reference. + * + * + * @generated + * @ordered + */ + int BINARY_INTEGER_EXPRESSION__LEFT = BINARY_EXPRESSION__LEFT; + + /** + * The feature id for the 'Right' containment reference. + * + * + * @generated + * @ordered + */ + int BINARY_INTEGER_EXPRESSION__RIGHT = BINARY_EXPRESSION__RIGHT; + + /** + * The feature id for the 'Operator' attribute. + * + * + * @generated + * @ordered + */ + int BINARY_INTEGER_EXPRESSION__OPERATOR = BINARY_EXPRESSION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Binary Integer Expression' class. + * + * + * @generated + * @ordered + */ + int BINARY_INTEGER_EXPRESSION_FEATURE_COUNT = BINARY_EXPRESSION_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.BinaryBooleanExpressionImpl Binary Boolean Expression}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.BinaryBooleanExpressionImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getBinaryBooleanExpression() + * @generated + */ + int BINARY_BOOLEAN_EXPRESSION = 21; + + /** + * The feature id for the 'Left' containment reference. + * + * + * @generated + * @ordered + */ + int BINARY_BOOLEAN_EXPRESSION__LEFT = BINARY_EXPRESSION__LEFT; + + /** + * The feature id for the 'Right' containment reference. + * + * + * @generated + * @ordered + */ + int BINARY_BOOLEAN_EXPRESSION__RIGHT = BINARY_EXPRESSION__RIGHT; + + /** + * The feature id for the 'Operator' attribute. + * + * + * @generated + * @ordered + */ + int BINARY_BOOLEAN_EXPRESSION__OPERATOR = BINARY_EXPRESSION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Binary Boolean Expression' class. + * + * + * @generated + * @ordered + */ + int BINARY_BOOLEAN_EXPRESSION_FEATURE_COUNT = BINARY_EXPRESSION_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.ConstantImpl Constant}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ConstantImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getConstant() + * @generated + */ + int CONSTANT = 23; + + /** + * The number of structural features of the 'Constant' class. + * + * + * @generated + * @ordered + */ + int CONSTANT_FEATURE_COUNT = EXPRESSION_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.IfImpl If}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.IfImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getIf() + * @generated + */ + int IF = 24; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int IF__NAME = CONTROL__NAME; + + /** + * The feature id for the 'Owned Block' container reference. + * + * + * @generated + * @ordered + */ + int IF__OWNED_BLOCK = CONTROL__OWNED_BLOCK; + + /** + * The feature id for the 'Block' containment reference. + * + * + * @generated + * @ordered + */ + int IF__BLOCK = CONTROL__BLOCK; + + /** + * The feature id for the 'Condition' containment reference. + * + * + * @generated + * @ordered + */ + int IF__CONDITION = CONTROL_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Else Block' containment reference. + * + * + * @generated + * @ordered + */ + int IF__ELSE_BLOCK = CONTROL_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'If' class. + * + * + * @generated + * @ordered + */ + int IF_FEATURE_COUNT = CONTROL_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.IntegerConstantImpl Integer Constant}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.IntegerConstantImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getIntegerConstant() + * @generated + */ + int INTEGER_CONSTANT = 25; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int INTEGER_CONSTANT__VALUE = CONSTANT_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Integer Constant' class. + * + * + * @generated + * @ordered + */ + int INTEGER_CONSTANT_FEATURE_COUNT = CONSTANT_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.BooleanConstantImpl Boolean Constant}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.BooleanConstantImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getBooleanConstant() + * @generated + */ + int BOOLEAN_CONSTANT = 26; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int BOOLEAN_CONSTANT__VALUE = CONSTANT_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Boolean Constant' class. + * + * + * @generated + * @ordered + */ + int BOOLEAN_CONSTANT_FEATURE_COUNT = CONSTANT_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.BooleanExpressionImpl Boolean Expression}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.BooleanExpressionImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getBooleanExpression() + * @generated + */ + int BOOLEAN_EXPRESSION = 27; + + /** + * The number of structural features of the 'Boolean Expression' class. + * + * + * @generated + * @ordered + */ + int BOOLEAN_EXPRESSION_FEATURE_COUNT = EXPRESSION_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.IntegerExpressionImpl Integer Expression}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.IntegerExpressionImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getIntegerExpression() + * @generated + */ + int INTEGER_EXPRESSION = 28; + + /** + * The number of structural features of the 'Integer Expression' class. + * + * + * @generated + * @ordered + */ + int INTEGER_EXPRESSION_FEATURE_COUNT = EXPRESSION_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.AssignmentImpl Assignment}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.AssignmentImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getAssignment() + * @generated + */ + int ASSIGNMENT = 29; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int ASSIGNMENT__NAME = INSTRUCTION__NAME; + + /** + * The feature id for the 'Owned Block' container reference. + * + * + * @generated + * @ordered + */ + int ASSIGNMENT__OWNED_BLOCK = INSTRUCTION__OWNED_BLOCK; + + /** + * The feature id for the 'Operand' containment reference. + * + * + * @generated + * @ordered + */ + int ASSIGNMENT__OPERAND = INSTRUCTION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Assignment' class. + * + * + * @generated + * @ordered + */ + int ASSIGNMENT_FEATURE_COUNT = INSTRUCTION_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.IntegerVariableImpl Integer Variable}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.IntegerVariableImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getIntegerVariable() + * @generated + */ + int INTEGER_VARIABLE = 30; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int INTEGER_VARIABLE__NAME = VARIABLE__NAME; + + /** + * The feature id for the 'Initial Value' attribute. + * + * + * @generated + * @ordered + */ + int INTEGER_VARIABLE__INITIAL_VALUE = VARIABLE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int INTEGER_VARIABLE__VALUE = VARIABLE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Integer Variable' class. + * + * + * @generated + * @ordered + */ + int INTEGER_VARIABLE_FEATURE_COUNT = VARIABLE_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.BooleanVariableImpl Boolean Variable}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.BooleanVariableImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getBooleanVariable() + * @generated + */ + int BOOLEAN_VARIABLE = 31; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int BOOLEAN_VARIABLE__NAME = VARIABLE__NAME; + + /** + * The feature id for the 'Initial Value' attribute. + * + * + * @generated + * @ordered + */ + int BOOLEAN_VARIABLE__INITIAL_VALUE = VARIABLE_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int BOOLEAN_VARIABLE__VALUE = VARIABLE_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Boolean Variable' class. + * + * + * @generated + * @ordered + */ + int BOOLEAN_VARIABLE_FEATURE_COUNT = VARIABLE_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.BooleanModuleGetImpl Boolean Module Get}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.BooleanModuleGetImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getBooleanModuleGet() + * @generated + */ + int BOOLEAN_MODULE_GET = 32; + + /** + * The feature id for the 'Module' reference. + * + * + * @generated + * @ordered + */ + int BOOLEAN_MODULE_GET__MODULE = MODULE_GET__MODULE; + + /** + * The number of structural features of the 'Boolean Module Get' class. + * + * + * @generated + * @ordered + */ + int BOOLEAN_MODULE_GET_FEATURE_COUNT = MODULE_GET_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.IntegerModuleGetImpl Integer Module Get}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.IntegerModuleGetImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getIntegerModuleGet() + * @generated + */ + int INTEGER_MODULE_GET = 33; + + /** + * The feature id for the 'Module' reference. + * + * + * @generated + * @ordered + */ + int INTEGER_MODULE_GET__MODULE = MODULE_GET__MODULE; + + /** + * The number of structural features of the 'Integer Module Get' class. + * + * + * @generated + * @ordered + */ + int INTEGER_MODULE_GET_FEATURE_COUNT = MODULE_GET_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.UnaryExpressionImpl Unary Expression}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.UnaryExpressionImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getUnaryExpression() + * @generated + */ + int UNARY_EXPRESSION = 34; + + /** + * The feature id for the 'Operand' containment reference. + * + * + * @generated + * @ordered + */ + int UNARY_EXPRESSION__OPERAND = EXPRESSION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Unary Expression' class. + * + * + * @generated + * @ordered + */ + int UNARY_EXPRESSION_FEATURE_COUNT = EXPRESSION_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.UnaryBooleanExpressionImpl Unary Boolean Expression}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.UnaryBooleanExpressionImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getUnaryBooleanExpression() + * @generated + */ + int UNARY_BOOLEAN_EXPRESSION = 35; + + /** + * The feature id for the 'Operand' containment reference. + * + * + * @generated + * @ordered + */ + int UNARY_BOOLEAN_EXPRESSION__OPERAND = UNARY_EXPRESSION__OPERAND; + + /** + * The feature id for the 'Operator' attribute. + * + * + * @generated + * @ordered + */ + int UNARY_BOOLEAN_EXPRESSION__OPERATOR = UNARY_EXPRESSION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Unary Boolean Expression' class. + * + * + * @generated + * @ordered + */ + int UNARY_BOOLEAN_EXPRESSION_FEATURE_COUNT = UNARY_EXPRESSION_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.UnaryIntegerExpressionImpl Unary Integer Expression}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.UnaryIntegerExpressionImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getUnaryIntegerExpression() + * @generated + */ + int UNARY_INTEGER_EXPRESSION = 36; + + /** + * The feature id for the 'Operand' containment reference. + * + * + * @generated + * @ordered + */ + int UNARY_INTEGER_EXPRESSION__OPERAND = UNARY_EXPRESSION__OPERAND; + + /** + * The feature id for the 'Operator' attribute. + * + * + * @generated + * @ordered + */ + int UNARY_INTEGER_EXPRESSION__OPERATOR = UNARY_EXPRESSION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Unary Integer Expression' class. + * + * + * @generated + * @ordered + */ + int UNARY_INTEGER_EXPRESSION_FEATURE_COUNT = UNARY_EXPRESSION_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.VariableDeclarationImpl Variable Declaration}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.VariableDeclarationImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getVariableDeclaration() + * @generated + */ + int VARIABLE_DECLARATION = 37; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int VARIABLE_DECLARATION__NAME = INSTRUCTION__NAME; + + /** + * The feature id for the 'Owned Block' container reference. + * + * + * @generated + * @ordered + */ + int VARIABLE_DECLARATION__OWNED_BLOCK = INSTRUCTION__OWNED_BLOCK; + + /** + * The feature id for the 'Variable' containment reference. + * + * + * @generated + * @ordered + */ + int VARIABLE_DECLARATION__VARIABLE = INSTRUCTION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Variable Declaration' class. + * + * + * @generated + * @ordered + */ + int VARIABLE_DECLARATION_FEATURE_COUNT = INSTRUCTION_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.VariableRefImpl Variable Ref}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.VariableRefImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getVariableRef() + * @generated + */ + int VARIABLE_REF = 38; + + /** + * The feature id for the 'Variable' reference. + * + * + * @generated + * @ordered + */ + int VARIABLE_REF__VARIABLE = EXPRESSION_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Variable Ref' class. + * + * + * @generated + * @ordered + */ + int VARIABLE_REF_FEATURE_COUNT = EXPRESSION_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.ArduinoModuleImpl Module}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ArduinoModuleImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getArduinoModule() + * @generated + */ + int ARDUINO_MODULE = 49; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int ARDUINO_MODULE__NAME = MODULE__NAME; + + /** + * The feature id for the 'Level' attribute. + * + * + * @generated + * @ordered + */ + int ARDUINO_MODULE__LEVEL = MODULE__LEVEL; + + /** + * The number of structural features of the 'Module' class. + * + * + * @generated + * @ordered + */ + int ARDUINO_MODULE_FEATURE_COUNT = MODULE_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.ArduinoDigitalModuleImpl Digital Module}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ArduinoDigitalModuleImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getArduinoDigitalModule() + * @generated + */ + int ARDUINO_DIGITAL_MODULE = 51; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int ARDUINO_DIGITAL_MODULE__NAME = ARDUINO_MODULE__NAME; + + /** + * The feature id for the 'Level' attribute. + * + * + * @generated + * @ordered + */ + int ARDUINO_DIGITAL_MODULE__LEVEL = ARDUINO_MODULE__LEVEL; + + /** + * The number of structural features of the 'Digital Module' class. + * + * + * @generated + * @ordered + */ + int ARDUINO_DIGITAL_MODULE_FEATURE_COUNT = ARDUINO_MODULE_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.LEDImpl LED}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.LEDImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getLED() + * @generated + */ + int LED = 39; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int LED__NAME = ARDUINO_DIGITAL_MODULE__NAME; + + /** + * The feature id for the 'Level' attribute. + * + * + * @generated + * @ordered + */ + int LED__LEVEL = ARDUINO_DIGITAL_MODULE__LEVEL; + + /** + * The number of structural features of the 'LED' class. + * + * + * @generated + * @ordered + */ + int LED_FEATURE_COUNT = ARDUINO_DIGITAL_MODULE_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.PushButtonImpl Push Button}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.PushButtonImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getPushButton() + * @generated + */ + int PUSH_BUTTON = 40; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int PUSH_BUTTON__NAME = ARDUINO_DIGITAL_MODULE__NAME; + + /** + * The feature id for the 'Level' attribute. + * + * + * @generated + * @ordered + */ + int PUSH_BUTTON__LEVEL = ARDUINO_DIGITAL_MODULE__LEVEL; + + /** + * The number of structural features of the 'Push Button' class. + * + * + * @generated + * @ordered + */ + int PUSH_BUTTON_FEATURE_COUNT = ARDUINO_DIGITAL_MODULE_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.BuzzerImpl Buzzer}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.BuzzerImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getBuzzer() + * @generated + */ + int BUZZER = 41; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int BUZZER__NAME = ARDUINO_DIGITAL_MODULE__NAME; + + /** + * The feature id for the 'Level' attribute. + * + * + * @generated + * @ordered + */ + int BUZZER__LEVEL = ARDUINO_DIGITAL_MODULE__LEVEL; + + /** + * The number of structural features of the 'Buzzer' class. + * + * + * @generated + * @ordered + */ + int BUZZER_FEATURE_COUNT = ARDUINO_DIGITAL_MODULE_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.ArduinoAnalogModuleImpl Analog Module}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ArduinoAnalogModuleImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getArduinoAnalogModule() + * @generated + */ + int ARDUINO_ANALOG_MODULE = 52; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int ARDUINO_ANALOG_MODULE__NAME = ARDUINO_MODULE__NAME; + + /** + * The feature id for the 'Level' attribute. + * + * + * @generated + * @ordered + */ + int ARDUINO_ANALOG_MODULE__LEVEL = ARDUINO_MODULE__LEVEL; + + /** + * The number of structural features of the 'Analog Module' class. + * + * + * @generated + * @ordered + */ + int ARDUINO_ANALOG_MODULE_FEATURE_COUNT = ARDUINO_MODULE_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.RotationSensorImpl Rotation Sensor}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.RotationSensorImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getRotationSensor() + * @generated + */ + int ROTATION_SENSOR = 42; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int ROTATION_SENSOR__NAME = ARDUINO_ANALOG_MODULE__NAME; + + /** + * The feature id for the 'Level' attribute. + * + * + * @generated + * @ordered + */ + int ROTATION_SENSOR__LEVEL = ARDUINO_ANALOG_MODULE__LEVEL; + + /** + * The number of structural features of the 'Rotation Sensor' class. + * + * + * @generated + * @ordered + */ + int ROTATION_SENSOR_FEATURE_COUNT = ARDUINO_ANALOG_MODULE_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.MicroServoImpl Micro Servo}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.MicroServoImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getMicroServo() + * @generated + */ + int MICRO_SERVO = 43; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int MICRO_SERVO__NAME = ARDUINO_DIGITAL_MODULE__NAME; + + /** + * The feature id for the 'Level' attribute. + * + * + * @generated + * @ordered + */ + int MICRO_SERVO__LEVEL = ARDUINO_DIGITAL_MODULE__LEVEL; + + /** + * The number of structural features of the 'Micro Servo' class. + * + * + * @generated + * @ordered + */ + int MICRO_SERVO_FEATURE_COUNT = ARDUINO_DIGITAL_MODULE_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.InfraRedSensorImpl Infra Red Sensor}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.InfraRedSensorImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getInfraRedSensor() + * @generated + */ + int INFRA_RED_SENSOR = 44; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int INFRA_RED_SENSOR__NAME = ARDUINO_DIGITAL_MODULE__NAME; + + /** + * The feature id for the 'Level' attribute. + * + * + * @generated + * @ordered + */ + int INFRA_RED_SENSOR__LEVEL = ARDUINO_DIGITAL_MODULE__LEVEL; + + /** + * The number of structural features of the 'Infra Red Sensor' class. + * + * + * @generated + * @ordered + */ + int INFRA_RED_SENSOR_FEATURE_COUNT = ARDUINO_DIGITAL_MODULE_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.AmbientLightSensorImpl Ambient Light Sensor}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.AmbientLightSensorImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getAmbientLightSensor() + * @generated + */ + int AMBIENT_LIGHT_SENSOR = 45; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int AMBIENT_LIGHT_SENSOR__NAME = ARDUINO_ANALOG_MODULE__NAME; + + /** + * The feature id for the 'Level' attribute. + * + * + * @generated + * @ordered + */ + int AMBIENT_LIGHT_SENSOR__LEVEL = ARDUINO_ANALOG_MODULE__LEVEL; + + /** + * The number of structural features of the 'Ambient Light Sensor' class. + * + * + * @generated + * @ordered + */ + int AMBIENT_LIGHT_SENSOR_FEATURE_COUNT = ARDUINO_ANALOG_MODULE_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.SoundSensorImpl Sound Sensor}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.SoundSensorImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getSoundSensor() + * @generated + */ + int SOUND_SENSOR = 46; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SOUND_SENSOR__NAME = ARDUINO_ANALOG_MODULE__NAME; + + /** + * The feature id for the 'Level' attribute. + * + * + * @generated + * @ordered + */ + int SOUND_SENSOR__LEVEL = ARDUINO_ANALOG_MODULE__LEVEL; + + /** + * The number of structural features of the 'Sound Sensor' class. + * + * + * @generated + * @ordered + */ + int SOUND_SENSOR_FEATURE_COUNT = ARDUINO_ANALOG_MODULE_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.FanImpl Fan}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.FanImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getFan() + * @generated + */ + int FAN = 47; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int FAN__NAME = ARDUINO_DIGITAL_MODULE__NAME; + + /** + * The feature id for the 'Level' attribute. + * + * + * @generated + * @ordered + */ + int FAN__LEVEL = ARDUINO_DIGITAL_MODULE__LEVEL; + + /** + * The number of structural features of the 'Fan' class. + * + * + * @generated + * @ordered + */ + int FAN_FEATURE_COUNT = ARDUINO_DIGITAL_MODULE_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.MusicPlayerImpl Music Player}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.MusicPlayerImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getMusicPlayer() + * @generated + */ + int MUSIC_PLAYER = 48; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int MUSIC_PLAYER__NAME = ARDUINO_ANALOG_MODULE__NAME; + + /** + * The feature id for the 'Level' attribute. + * + * + * @generated + * @ordered + */ + int MUSIC_PLAYER__LEVEL = ARDUINO_ANALOG_MODULE__LEVEL; + + /** + * The number of structural features of the 'Music Player' class. + * + * + * @generated + * @ordered + */ + int MUSIC_PLAYER_FEATURE_COUNT = ARDUINO_ANALOG_MODULE_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.ArduinoBoardImpl Board}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ArduinoBoardImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getArduinoBoard() + * @generated + */ + int ARDUINO_BOARD = 50; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int ARDUINO_BOARD__NAME = BOARD__NAME; + + /** + * The feature id for the 'Project' container reference. + * + * + * @generated + * @ordered + */ + int ARDUINO_BOARD__PROJECT = BOARD__PROJECT; + + /** + * The feature id for the 'Threads' reference list. + * + * + * @generated + * @ordered + */ + int ARDUINO_BOARD__THREADS = BOARD__THREADS; + + /** + * The feature id for the 'Digital Pins' containment reference list. + * + * + * @generated + * @ordered + */ + int ARDUINO_BOARD__DIGITAL_PINS = BOARD_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Analog Pins' containment reference list. + * + * + * @generated + * @ordered + */ + int ARDUINO_BOARD__ANALOG_PINS = BOARD_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Board' class. + * + * + * @generated + * @ordered + */ + int ARDUINO_BOARD_FEATURE_COUNT = BOARD_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.ThreadImpl Thread}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ThreadImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getThread() + * @generated + */ + int THREAD = 53; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int THREAD__NAME = NAMED_ELEMENT__NAME; + + /** + * The feature id for the 'Blocks' containment reference list. + * + * + * @generated + * @ordered + */ + int THREAD__BLOCKS = NAMED_ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Channels' reference list. + * + * + * @generated + * @ordered + */ + int THREAD__CHANNELS = NAMED_ELEMENT_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Current Instruction' reference. + * + * + * @generated + * @ordered + */ + int THREAD__CURRENT_INSTRUCTION = NAMED_ELEMENT_FEATURE_COUNT + 2; + + /** + * The feature id for the 'First' reference. + * + * + * @generated + * @ordered + */ + int THREAD__FIRST = NAMED_ELEMENT_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Last' reference. + * + * + * @generated + * @ordered + */ + int THREAD__LAST = NAMED_ELEMENT_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Nb Cycle' attribute. + * + * + * @generated + * @ordered + */ + int THREAD__NB_CYCLE = NAMED_ELEMENT_FEATURE_COUNT + 5; + + /** + * The number of structural features of the 'Thread' class. + * + * + * @generated + * @ordered + */ + int THREAD_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 6; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.ChannelImpl Channel}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ChannelImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getChannel() + * @generated + */ + int CHANNEL = 54; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int CHANNEL__NAME = NAMED_ELEMENT__NAME; + + /** + * The feature id for the 'Source' reference. + * + * + * @generated + * @ordered + */ + int CHANNEL__SOURCE = NAMED_ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Target' reference. + * + * + * @generated + * @ordered + */ + int CHANNEL__TARGET = NAMED_ELEMENT_FEATURE_COUNT + 1; + + /** + * The feature id for the 'In Rate' attribute. + * + * + * @generated + * @ordered + */ + int CHANNEL__IN_RATE = NAMED_ELEMENT_FEATURE_COUNT + 2; + + /** + * The feature id for the 'Out Rate' attribute. + * + * + * @generated + * @ordered + */ + int CHANNEL__OUT_RATE = NAMED_ELEMENT_FEATURE_COUNT + 3; + + /** + * The feature id for the 'Capacity' attribute. + * + * + * @generated + * @ordered + */ + int CHANNEL__CAPACITY = NAMED_ELEMENT_FEATURE_COUNT + 4; + + /** + * The feature id for the 'Current Size' attribute. + * + * + * @generated + * @ordered + */ + int CHANNEL__CURRENT_SIZE = NAMED_ELEMENT_FEATURE_COUNT + 5; + + /** + * The number of structural features of the 'Channel' class. + * + * + * @generated + * @ordered + */ + int CHANNEL_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 6; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.LinkImpl Link}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.LinkImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getLink() + * @generated + */ + int LINK = 55; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int LINK__NAME = NAMED_ELEMENT__NAME; + + /** + * The feature id for the 'In Board' reference. + * + * + * @generated + * @ordered + */ + int LINK__IN_BOARD = NAMED_ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Out Board' reference. + * + * + * @generated + * @ordered + */ + int LINK__OUT_BOARD = NAMED_ELEMENT_FEATURE_COUNT + 1; + + /** + * The feature id for the 'Channels' reference list. + * + * + * @generated + * @ordered + */ + int LINK__CHANNELS = NAMED_ELEMENT_FEATURE_COUNT + 2; + + /** + * The number of structural features of the 'Link' class. + * + * + * @generated + * @ordered + */ + int LINK_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 3; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.ThreadInstructionBlockImpl Thread Instruction Block}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ThreadInstructionBlockImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getThreadInstructionBlock() + * @generated + */ + int THREAD_INSTRUCTION_BLOCK = 58; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int THREAD_INSTRUCTION_BLOCK__NAME = NAMED_ELEMENT__NAME; + + /** + * The feature id for the 'Thread' reference. + * + * + * @generated + * @ordered + */ + int THREAD_INSTRUCTION_BLOCK__THREAD = NAMED_ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Next' reference. + * + * + * @generated + * @ordered + */ + int THREAD_INSTRUCTION_BLOCK__NEXT = NAMED_ELEMENT_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Thread Instruction Block' class. + * + * + * @generated + * @ordered + */ + int THREAD_INSTRUCTION_BLOCK_FEATURE_COUNT = NAMED_ELEMENT_FEATURE_COUNT + 2; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.SynchronizationBlockImpl Synchronization Block}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.SynchronizationBlockImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getSynchronizationBlock() + * @generated + */ + int SYNCHRONIZATION_BLOCK = 56; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int SYNCHRONIZATION_BLOCK__NAME = THREAD_INSTRUCTION_BLOCK__NAME; + + /** + * The feature id for the 'Thread' reference. + * + * + * @generated + * @ordered + */ + int SYNCHRONIZATION_BLOCK__THREAD = THREAD_INSTRUCTION_BLOCK__THREAD; + + /** + * The feature id for the 'Next' reference. + * + * + * @generated + * @ordered + */ + int SYNCHRONIZATION_BLOCK__NEXT = THREAD_INSTRUCTION_BLOCK__NEXT; + + /** + * The number of structural features of the 'Synchronization Block' class. + * + * + * @generated + * @ordered + */ + int SYNCHRONIZATION_BLOCK_FEATURE_COUNT = THREAD_INSTRUCTION_BLOCK_FEATURE_COUNT + 0; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.impl.InstructionBlockImpl Instruction Block}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.InstructionBlockImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getInstructionBlock() + * @generated + */ + int INSTRUCTION_BLOCK = 57; + + /** + * The feature id for the 'Name' attribute. + * + * + * @generated + * @ordered + */ + int INSTRUCTION_BLOCK__NAME = THREAD_INSTRUCTION_BLOCK__NAME; + + /** + * The feature id for the 'Thread' reference. + * + * + * @generated + * @ordered + */ + int INSTRUCTION_BLOCK__THREAD = THREAD_INSTRUCTION_BLOCK__THREAD; + + /** + * The feature id for the 'Next' reference. + * + * + * @generated + * @ordered + */ + int INSTRUCTION_BLOCK__NEXT = THREAD_INSTRUCTION_BLOCK__NEXT; + + /** + * The feature id for the 'Instructions' containment reference list. + * + * + * @generated + * @ordered + */ + int INSTRUCTION_BLOCK__INSTRUCTIONS = THREAD_INSTRUCTION_BLOCK_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Instruction Block' class. + * + * + * @generated + * @ordered + */ + int INSTRUCTION_BLOCK_FEATURE_COUNT = THREAD_INSTRUCTION_BLOCK_FEATURE_COUNT + 1; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.Time Time}' enum. + * + * + * @see fr.obeo.dsl.arduino.Time + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getTime() + * @generated + */ + int TIME = 59; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.BinaryIntegerOperatorKind Binary Integer Operator Kind}' enum. + * + * + * @see fr.obeo.dsl.arduino.BinaryIntegerOperatorKind + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getBinaryIntegerOperatorKind() + * @generated + */ + int BINARY_INTEGER_OPERATOR_KIND = 60; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.BinaryBooleanOperatorKind Binary Boolean Operator Kind}' enum. + * + * + * @see fr.obeo.dsl.arduino.BinaryBooleanOperatorKind + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getBinaryBooleanOperatorKind() + * @generated + */ + int BINARY_BOOLEAN_OPERATOR_KIND = 61; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.UnaryIntegerOperatorKind Unary Integer Operator Kind}' enum. + * + * + * @see fr.obeo.dsl.arduino.UnaryIntegerOperatorKind + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getUnaryIntegerOperatorKind() + * @generated + */ + int UNARY_INTEGER_OPERATOR_KIND = 62; + + /** + * The meta object id for the '{@link fr.obeo.dsl.arduino.UnaryBooleanOperatorKind Unary Boolean Operator Kind}' enum. + * + * + * @see fr.obeo.dsl.arduino.UnaryBooleanOperatorKind + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getUnaryBooleanOperatorKind() + * @generated + */ + int UNARY_BOOLEAN_OPERATOR_KIND = 63; + + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.Board Board}'. + * + * + * @return the meta object for class 'Board'. + * @see fr.obeo.dsl.arduino.Board + * @generated + */ + EClass getBoard(); + + /** + * Returns the meta object for the container reference '{@link fr.obeo.dsl.arduino.Board#getProject Project}'. + * + * + * @return the meta object for the container reference 'Project'. + * @see fr.obeo.dsl.arduino.Board#getProject() + * @see #getBoard() + * @generated + */ + EReference getBoard_Project(); + + /** + * Returns the meta object for the reference list '{@link fr.obeo.dsl.arduino.Board#getThreads Threads}'. + * + * + * @return the meta object for the reference list 'Threads'. + * @see fr.obeo.dsl.arduino.Board#getThreads() + * @see #getBoard() + * @generated + */ + EReference getBoard_Threads(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.Module Module}'. + * + * + * @return the meta object for class 'Module'. + * @see fr.obeo.dsl.arduino.Module + * @generated + */ + EClass getModule(); + + /** + * Returns the meta object for the attribute '{@link fr.obeo.dsl.arduino.Module#isLevel Level}'. + * + * + * @return the meta object for the attribute 'Level'. + * @see fr.obeo.dsl.arduino.Module#isLevel() + * @see #getModule() + * @generated + */ + EAttribute getModule_Level(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.DigitalPin Digital Pin}'. + * + * + * @return the meta object for class 'Digital Pin'. + * @see fr.obeo.dsl.arduino.DigitalPin + * @generated + */ + EClass getDigitalPin(); + + /** + * Returns the meta object for the containment reference '{@link fr.obeo.dsl.arduino.DigitalPin#getModule Module}'. + * + * + * @return the meta object for the containment reference 'Module'. + * @see fr.obeo.dsl.arduino.DigitalPin#getModule() + * @see #getDigitalPin() + * @generated + */ + EReference getDigitalPin_Module(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.Pin Pin}'. + * + * + * @return the meta object for class 'Pin'. + * @see fr.obeo.dsl.arduino.Pin + * @generated + */ + EClass getPin(); + + /** + * Returns the meta object for the attribute '{@link fr.obeo.dsl.arduino.Pin#getId Id}'. + * + * + * @return the meta object for the attribute 'Id'. + * @see fr.obeo.dsl.arduino.Pin#getId() + * @see #getPin() + * @generated + */ + EAttribute getPin_Id(); + + /** + * Returns the meta object for the attribute '{@link fr.obeo.dsl.arduino.Pin#getLevel Level}'. + * + * + * @return the meta object for the attribute 'Level'. + * @see fr.obeo.dsl.arduino.Pin#getLevel() + * @see #getPin() + * @generated + */ + EAttribute getPin_Level(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.AnalogPin Analog Pin}'. + * + * + * @return the meta object for class 'Analog Pin'. + * @see fr.obeo.dsl.arduino.AnalogPin + * @generated + */ + EClass getAnalogPin(); + + /** + * Returns the meta object for the containment reference '{@link fr.obeo.dsl.arduino.AnalogPin#getModule Module}'. + * + * + * @return the meta object for the containment reference 'Module'. + * @see fr.obeo.dsl.arduino.AnalogPin#getModule() + * @see #getAnalogPin() + * @generated + */ + EReference getAnalogPin_Module(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.Sketch Sketch}'. + * + * + * @return the meta object for class 'Sketch'. + * @see fr.obeo.dsl.arduino.Sketch + * @generated + */ + EClass getSketch(); + + /** + * Returns the meta object for the container reference '{@link fr.obeo.dsl.arduino.Sketch#getProject Project}'. + * + * + * @return the meta object for the container reference 'Project'. + * @see fr.obeo.dsl.arduino.Sketch#getProject() + * @see #getSketch() + * @generated + */ + EReference getSketch_Project(); + + /** + * Returns the meta object for the containment reference list '{@link fr.obeo.dsl.arduino.Sketch#getThreads Threads}'. + * + * + * @return the meta object for the containment reference list 'Threads'. + * @see fr.obeo.dsl.arduino.Sketch#getThreads() + * @see #getSketch() + * @generated + */ + EReference getSketch_Threads(); + + /** + * Returns the meta object for the containment reference list '{@link fr.obeo.dsl.arduino.Sketch#getChannels Channels}'. + * + * + * @return the meta object for the containment reference list 'Channels'. + * @see fr.obeo.dsl.arduino.Sketch#getChannels() + * @see #getSketch() + * @generated + */ + EReference getSketch_Channels(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.Project Project}'. + * + * + * @return the meta object for class 'Project'. + * @see fr.obeo.dsl.arduino.Project + * @generated + */ + EClass getProject(); + + /** + * Returns the meta object for the containment reference list '{@link fr.obeo.dsl.arduino.Project#getBoards Boards}'. + * + * + * @return the meta object for the containment reference list 'Boards'. + * @see fr.obeo.dsl.arduino.Project#getBoards() + * @see #getProject() + * @generated + */ + EReference getProject_Boards(); + + /** + * Returns the meta object for the containment reference '{@link fr.obeo.dsl.arduino.Project#getSketch Sketch}'. + * + * + * @return the meta object for the containment reference 'Sketch'. + * @see fr.obeo.dsl.arduino.Project#getSketch() + * @see #getProject() + * @generated + */ + EReference getProject_Sketch(); + + /** + * Returns the meta object for the containment reference list '{@link fr.obeo.dsl.arduino.Project#getLinks Links}'. + * + * + * @return the meta object for the containment reference list 'Links'. + * @see fr.obeo.dsl.arduino.Project#getLinks() + * @see #getProject() + * @generated + */ + EReference getProject_Links(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.Instruction Instruction}'. + * + * + * @return the meta object for class 'Instruction'. + * @see fr.obeo.dsl.arduino.Instruction + * @generated + */ + EClass getInstruction(); + + /** + * Returns the meta object for the container reference '{@link fr.obeo.dsl.arduino.Instruction#getOwnedBlock Owned Block}'. + * + * + * @return the meta object for the container reference 'Owned Block'. + * @see fr.obeo.dsl.arduino.Instruction#getOwnedBlock() + * @see #getInstruction() + * @generated + */ + EReference getInstruction_OwnedBlock(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.ModuleAssignment Module Assignment}'. + * + * + * @return the meta object for class 'Module Assignment'. + * @see fr.obeo.dsl.arduino.ModuleAssignment + * @generated + */ + EClass getModuleAssignment(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.ModuleInstruction Module Instruction}'. + * + * + * @return the meta object for class 'Module Instruction'. + * @see fr.obeo.dsl.arduino.ModuleInstruction + * @generated + */ + EClass getModuleInstruction(); + + /** + * Returns the meta object for the reference '{@link fr.obeo.dsl.arduino.ModuleInstruction#getModule Module}'. + * + * + * @return the meta object for the reference 'Module'. + * @see fr.obeo.dsl.arduino.ModuleInstruction#getModule() + * @see #getModuleInstruction() + * @generated + */ + EReference getModuleInstruction_Module(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.Control Control}'. + * + * + * @return the meta object for class 'Control'. + * @see fr.obeo.dsl.arduino.Control + * @generated + */ + EClass getControl(); + + /** + * Returns the meta object for the containment reference '{@link fr.obeo.dsl.arduino.Control#getBlock Block}'. + * + * + * @return the meta object for the containment reference 'Block'. + * @see fr.obeo.dsl.arduino.Control#getBlock() + * @see #getControl() + * @generated + */ + EReference getControl_Block(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.Utilities Utilities}'. + * + * + * @return the meta object for class 'Utilities'. + * @see fr.obeo.dsl.arduino.Utilities + * @generated + */ + EClass getUtilities(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.Delay Delay}'. + * + * + * @return the meta object for class 'Delay'. + * @see fr.obeo.dsl.arduino.Delay + * @generated + */ + EClass getDelay(); + + /** + * Returns the meta object for the attribute '{@link fr.obeo.dsl.arduino.Delay#getUnit Unit}'. + * + * + * @return the meta object for the attribute 'Unit'. + * @see fr.obeo.dsl.arduino.Delay#getUnit() + * @see #getDelay() + * @generated + */ + EAttribute getDelay_Unit(); + + /** + * Returns the meta object for the attribute '{@link fr.obeo.dsl.arduino.Delay#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see fr.obeo.dsl.arduino.Delay#getValue() + * @see #getDelay() + * @generated + */ + EAttribute getDelay_Value(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.NamedElement Named Element}'. + * + * + * @return the meta object for class 'Named Element'. + * @see fr.obeo.dsl.arduino.NamedElement + * @generated + */ + EClass getNamedElement(); + + /** + * Returns the meta object for the attribute '{@link fr.obeo.dsl.arduino.NamedElement#getName Name}'. + * + * + * @return the meta object for the attribute 'Name'. + * @see fr.obeo.dsl.arduino.NamedElement#getName() + * @see #getNamedElement() + * @generated + */ + EAttribute getNamedElement_Name(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.Repeat Repeat}'. + * + * + * @return the meta object for class 'Repeat'. + * @see fr.obeo.dsl.arduino.Repeat + * @generated + */ + EClass getRepeat(); + + /** + * Returns the meta object for the attribute '{@link fr.obeo.dsl.arduino.Repeat#getIteration Iteration}'. + * + * + * @return the meta object for the attribute 'Iteration'. + * @see fr.obeo.dsl.arduino.Repeat#getIteration() + * @see #getRepeat() + * @generated + */ + EAttribute getRepeat_Iteration(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.ModuleGet Module Get}'. + * + * + * @return the meta object for class 'Module Get'. + * @see fr.obeo.dsl.arduino.ModuleGet + * @generated + */ + EClass getModuleGet(); + + /** + * Returns the meta object for the reference '{@link fr.obeo.dsl.arduino.ModuleGet#getModule Module}'. + * + * + * @return the meta object for the reference 'Module'. + * @see fr.obeo.dsl.arduino.ModuleGet#getModule() + * @see #getModuleGet() + * @generated + */ + EReference getModuleGet_Module(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.While While}'. + * + * + * @return the meta object for class 'While'. + * @see fr.obeo.dsl.arduino.While + * @generated + */ + EClass getWhile(); + + /** + * Returns the meta object for the containment reference '{@link fr.obeo.dsl.arduino.While#getCondition Condition}'. + * + * + * @return the meta object for the containment reference 'Condition'. + * @see fr.obeo.dsl.arduino.While#getCondition() + * @see #getWhile() + * @generated + */ + EReference getWhile_Condition(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.BinaryExpression Binary Expression}'. + * + * + * @return the meta object for class 'Binary Expression'. + * @see fr.obeo.dsl.arduino.BinaryExpression + * @generated + */ + EClass getBinaryExpression(); + + /** + * Returns the meta object for the containment reference '{@link fr.obeo.dsl.arduino.BinaryExpression#getLeft Left}'. + * + * + * @return the meta object for the containment reference 'Left'. + * @see fr.obeo.dsl.arduino.BinaryExpression#getLeft() + * @see #getBinaryExpression() + * @generated + */ + EReference getBinaryExpression_Left(); + + /** + * Returns the meta object for the containment reference '{@link fr.obeo.dsl.arduino.BinaryExpression#getRight Right}'. + * + * + * @return the meta object for the containment reference 'Right'. + * @see fr.obeo.dsl.arduino.BinaryExpression#getRight() + * @see #getBinaryExpression() + * @generated + */ + EReference getBinaryExpression_Right(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.Variable Variable}'. + * + * + * @return the meta object for class 'Variable'. + * @see fr.obeo.dsl.arduino.Variable + * @generated + */ + EClass getVariable(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.VariableAssignment Variable Assignment}'. + * + * + * @return the meta object for class 'Variable Assignment'. + * @see fr.obeo.dsl.arduino.VariableAssignment + * @generated + */ + EClass getVariableAssignment(); + + /** + * Returns the meta object for the reference '{@link fr.obeo.dsl.arduino.VariableAssignment#getVariable Variable}'. + * + * + * @return the meta object for the reference 'Variable'. + * @see fr.obeo.dsl.arduino.VariableAssignment#getVariable() + * @see #getVariableAssignment() + * @generated + */ + EReference getVariableAssignment_Variable(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.BinaryIntegerExpression Binary Integer Expression}'. + * + * + * @return the meta object for class 'Binary Integer Expression'. + * @see fr.obeo.dsl.arduino.BinaryIntegerExpression + * @generated + */ + EClass getBinaryIntegerExpression(); + + /** + * Returns the meta object for the attribute '{@link fr.obeo.dsl.arduino.BinaryIntegerExpression#getOperator Operator}'. + * + * + * @return the meta object for the attribute 'Operator'. + * @see fr.obeo.dsl.arduino.BinaryIntegerExpression#getOperator() + * @see #getBinaryIntegerExpression() + * @generated + */ + EAttribute getBinaryIntegerExpression_Operator(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.BinaryBooleanExpression Binary Boolean Expression}'. + * + * + * @return the meta object for class 'Binary Boolean Expression'. + * @see fr.obeo.dsl.arduino.BinaryBooleanExpression + * @generated + */ + EClass getBinaryBooleanExpression(); + + /** + * Returns the meta object for the attribute '{@link fr.obeo.dsl.arduino.BinaryBooleanExpression#getOperator Operator}'. + * + * + * @return the meta object for the attribute 'Operator'. + * @see fr.obeo.dsl.arduino.BinaryBooleanExpression#getOperator() + * @see #getBinaryBooleanExpression() + * @generated + */ + EAttribute getBinaryBooleanExpression_Operator(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.Expression Expression}'. + * + * + * @return the meta object for class 'Expression'. + * @see fr.obeo.dsl.arduino.Expression + * @generated + */ + EClass getExpression(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.Constant Constant}'. + * + * + * @return the meta object for class 'Constant'. + * @see fr.obeo.dsl.arduino.Constant + * @generated + */ + EClass getConstant(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.If If}'. + * + * + * @return the meta object for class 'If'. + * @see fr.obeo.dsl.arduino.If + * @generated + */ + EClass getIf(); + + /** + * Returns the meta object for the containment reference '{@link fr.obeo.dsl.arduino.If#getCondition Condition}'. + * + * + * @return the meta object for the containment reference 'Condition'. + * @see fr.obeo.dsl.arduino.If#getCondition() + * @see #getIf() + * @generated + */ + EReference getIf_Condition(); + + /** + * Returns the meta object for the containment reference '{@link fr.obeo.dsl.arduino.If#getElseBlock Else Block}'. + * + * + * @return the meta object for the containment reference 'Else Block'. + * @see fr.obeo.dsl.arduino.If#getElseBlock() + * @see #getIf() + * @generated + */ + EReference getIf_ElseBlock(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.IntegerConstant Integer Constant}'. + * + * + * @return the meta object for class 'Integer Constant'. + * @see fr.obeo.dsl.arduino.IntegerConstant + * @generated + */ + EClass getIntegerConstant(); + + /** + * Returns the meta object for the attribute '{@link fr.obeo.dsl.arduino.IntegerConstant#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see fr.obeo.dsl.arduino.IntegerConstant#getValue() + * @see #getIntegerConstant() + * @generated + */ + EAttribute getIntegerConstant_Value(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.BooleanConstant Boolean Constant}'. + * + * + * @return the meta object for class 'Boolean Constant'. + * @see fr.obeo.dsl.arduino.BooleanConstant + * @generated + */ + EClass getBooleanConstant(); + + /** + * Returns the meta object for the attribute '{@link fr.obeo.dsl.arduino.BooleanConstant#isValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see fr.obeo.dsl.arduino.BooleanConstant#isValue() + * @see #getBooleanConstant() + * @generated + */ + EAttribute getBooleanConstant_Value(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.BooleanExpression Boolean Expression}'. + * + * + * @return the meta object for class 'Boolean Expression'. + * @see fr.obeo.dsl.arduino.BooleanExpression + * @generated + */ + EClass getBooleanExpression(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.IntegerExpression Integer Expression}'. + * + * + * @return the meta object for class 'Integer Expression'. + * @see fr.obeo.dsl.arduino.IntegerExpression + * @generated + */ + EClass getIntegerExpression(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.Assignment Assignment}'. + * + * + * @return the meta object for class 'Assignment'. + * @see fr.obeo.dsl.arduino.Assignment + * @generated + */ + EClass getAssignment(); + + /** + * Returns the meta object for the containment reference '{@link fr.obeo.dsl.arduino.Assignment#getOperand Operand}'. + * + * + * @return the meta object for the containment reference 'Operand'. + * @see fr.obeo.dsl.arduino.Assignment#getOperand() + * @see #getAssignment() + * @generated + */ + EReference getAssignment_Operand(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.IntegerVariable Integer Variable}'. + * + * + * @return the meta object for class 'Integer Variable'. + * @see fr.obeo.dsl.arduino.IntegerVariable + * @generated + */ + EClass getIntegerVariable(); + + /** + * Returns the meta object for the attribute '{@link fr.obeo.dsl.arduino.IntegerVariable#getInitialValue Initial Value}'. + * + * + * @return the meta object for the attribute 'Initial Value'. + * @see fr.obeo.dsl.arduino.IntegerVariable#getInitialValue() + * @see #getIntegerVariable() + * @generated + */ + EAttribute getIntegerVariable_InitialValue(); + + /** + * Returns the meta object for the attribute '{@link fr.obeo.dsl.arduino.IntegerVariable#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see fr.obeo.dsl.arduino.IntegerVariable#getValue() + * @see #getIntegerVariable() + * @generated + */ + EAttribute getIntegerVariable_Value(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.BooleanVariable Boolean Variable}'. + * + * + * @return the meta object for class 'Boolean Variable'. + * @see fr.obeo.dsl.arduino.BooleanVariable + * @generated + */ + EClass getBooleanVariable(); + + /** + * Returns the meta object for the attribute '{@link fr.obeo.dsl.arduino.BooleanVariable#isInitialValue Initial Value}'. + * + * + * @return the meta object for the attribute 'Initial Value'. + * @see fr.obeo.dsl.arduino.BooleanVariable#isInitialValue() + * @see #getBooleanVariable() + * @generated + */ + EAttribute getBooleanVariable_InitialValue(); + + /** + * Returns the meta object for the attribute '{@link fr.obeo.dsl.arduino.BooleanVariable#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see fr.obeo.dsl.arduino.BooleanVariable#getValue() + * @see #getBooleanVariable() + * @generated + */ + EAttribute getBooleanVariable_Value(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.BooleanModuleGet Boolean Module Get}'. + * + * + * @return the meta object for class 'Boolean Module Get'. + * @see fr.obeo.dsl.arduino.BooleanModuleGet + * @generated + */ + EClass getBooleanModuleGet(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.IntegerModuleGet Integer Module Get}'. + * + * + * @return the meta object for class 'Integer Module Get'. + * @see fr.obeo.dsl.arduino.IntegerModuleGet + * @generated + */ + EClass getIntegerModuleGet(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.UnaryExpression Unary Expression}'. + * + * + * @return the meta object for class 'Unary Expression'. + * @see fr.obeo.dsl.arduino.UnaryExpression + * @generated + */ + EClass getUnaryExpression(); + + /** + * Returns the meta object for the containment reference '{@link fr.obeo.dsl.arduino.UnaryExpression#getOperand Operand}'. + * + * + * @return the meta object for the containment reference 'Operand'. + * @see fr.obeo.dsl.arduino.UnaryExpression#getOperand() + * @see #getUnaryExpression() + * @generated + */ + EReference getUnaryExpression_Operand(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.UnaryBooleanExpression Unary Boolean Expression}'. + * + * + * @return the meta object for class 'Unary Boolean Expression'. + * @see fr.obeo.dsl.arduino.UnaryBooleanExpression + * @generated + */ + EClass getUnaryBooleanExpression(); + + /** + * Returns the meta object for the attribute '{@link fr.obeo.dsl.arduino.UnaryBooleanExpression#getOperator Operator}'. + * + * + * @return the meta object for the attribute 'Operator'. + * @see fr.obeo.dsl.arduino.UnaryBooleanExpression#getOperator() + * @see #getUnaryBooleanExpression() + * @generated + */ + EAttribute getUnaryBooleanExpression_Operator(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.UnaryIntegerExpression Unary Integer Expression}'. + * + * + * @return the meta object for class 'Unary Integer Expression'. + * @see fr.obeo.dsl.arduino.UnaryIntegerExpression + * @generated + */ + EClass getUnaryIntegerExpression(); + + /** + * Returns the meta object for the attribute '{@link fr.obeo.dsl.arduino.UnaryIntegerExpression#getOperator Operator}'. + * + * + * @return the meta object for the attribute 'Operator'. + * @see fr.obeo.dsl.arduino.UnaryIntegerExpression#getOperator() + * @see #getUnaryIntegerExpression() + * @generated + */ + EAttribute getUnaryIntegerExpression_Operator(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.VariableDeclaration Variable Declaration}'. + * + * + * @return the meta object for class 'Variable Declaration'. + * @see fr.obeo.dsl.arduino.VariableDeclaration + * @generated + */ + EClass getVariableDeclaration(); + + /** + * Returns the meta object for the containment reference '{@link fr.obeo.dsl.arduino.VariableDeclaration#getVariable Variable}'. + * + * + * @return the meta object for the containment reference 'Variable'. + * @see fr.obeo.dsl.arduino.VariableDeclaration#getVariable() + * @see #getVariableDeclaration() + * @generated + */ + EReference getVariableDeclaration_Variable(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.VariableRef Variable Ref}'. + * + * + * @return the meta object for class 'Variable Ref'. + * @see fr.obeo.dsl.arduino.VariableRef + * @generated + */ + EClass getVariableRef(); + + /** + * Returns the meta object for the reference '{@link fr.obeo.dsl.arduino.VariableRef#getVariable Variable}'. + * + * + * @return the meta object for the reference 'Variable'. + * @see fr.obeo.dsl.arduino.VariableRef#getVariable() + * @see #getVariableRef() + * @generated + */ + EReference getVariableRef_Variable(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.LED LED}'. + * + * + * @return the meta object for class 'LED'. + * @see fr.obeo.dsl.arduino.LED + * @generated + */ + EClass getLED(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.PushButton Push Button}'. + * + * + * @return the meta object for class 'Push Button'. + * @see fr.obeo.dsl.arduino.PushButton + * @generated + */ + EClass getPushButton(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.Buzzer Buzzer}'. + * + * + * @return the meta object for class 'Buzzer'. + * @see fr.obeo.dsl.arduino.Buzzer + * @generated + */ + EClass getBuzzer(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.RotationSensor Rotation Sensor}'. + * + * + * @return the meta object for class 'Rotation Sensor'. + * @see fr.obeo.dsl.arduino.RotationSensor + * @generated + */ + EClass getRotationSensor(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.MicroServo Micro Servo}'. + * + * + * @return the meta object for class 'Micro Servo'. + * @see fr.obeo.dsl.arduino.MicroServo + * @generated + */ + EClass getMicroServo(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.InfraRedSensor Infra Red Sensor}'. + * + * + * @return the meta object for class 'Infra Red Sensor'. + * @see fr.obeo.dsl.arduino.InfraRedSensor + * @generated + */ + EClass getInfraRedSensor(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.AmbientLightSensor Ambient Light Sensor}'. + * + * + * @return the meta object for class 'Ambient Light Sensor'. + * @see fr.obeo.dsl.arduino.AmbientLightSensor + * @generated + */ + EClass getAmbientLightSensor(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.SoundSensor Sound Sensor}'. + * + * + * @return the meta object for class 'Sound Sensor'. + * @see fr.obeo.dsl.arduino.SoundSensor + * @generated + */ + EClass getSoundSensor(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.Fan Fan}'. + * + * + * @return the meta object for class 'Fan'. + * @see fr.obeo.dsl.arduino.Fan + * @generated + */ + EClass getFan(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.MusicPlayer Music Player}'. + * + * + * @return the meta object for class 'Music Player'. + * @see fr.obeo.dsl.arduino.MusicPlayer + * @generated + */ + EClass getMusicPlayer(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.ArduinoModule Module}'. + * + * + * @return the meta object for class 'Module'. + * @see fr.obeo.dsl.arduino.ArduinoModule + * @generated + */ + EClass getArduinoModule(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.ArduinoBoard Board}'. + * + * + * @return the meta object for class 'Board'. + * @see fr.obeo.dsl.arduino.ArduinoBoard + * @generated + */ + EClass getArduinoBoard(); + + /** + * Returns the meta object for the containment reference list '{@link fr.obeo.dsl.arduino.ArduinoBoard#getDigitalPins Digital Pins}'. + * + * + * @return the meta object for the containment reference list 'Digital Pins'. + * @see fr.obeo.dsl.arduino.ArduinoBoard#getDigitalPins() + * @see #getArduinoBoard() + * @generated + */ + EReference getArduinoBoard_DigitalPins(); + + /** + * Returns the meta object for the containment reference list '{@link fr.obeo.dsl.arduino.ArduinoBoard#getAnalogPins Analog Pins}'. + * + * + * @return the meta object for the containment reference list 'Analog Pins'. + * @see fr.obeo.dsl.arduino.ArduinoBoard#getAnalogPins() + * @see #getArduinoBoard() + * @generated + */ + EReference getArduinoBoard_AnalogPins(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.ArduinoDigitalModule Digital Module}'. + * + * + * @return the meta object for class 'Digital Module'. + * @see fr.obeo.dsl.arduino.ArduinoDigitalModule + * @generated + */ + EClass getArduinoDigitalModule(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.ArduinoAnalogModule Analog Module}'. + * + * + * @return the meta object for class 'Analog Module'. + * @see fr.obeo.dsl.arduino.ArduinoAnalogModule + * @generated + */ + EClass getArduinoAnalogModule(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.Thread Thread}'. + * + * + * @return the meta object for class 'Thread'. + * @see fr.obeo.dsl.arduino.Thread + * @generated + */ + EClass getThread(); + + /** + * Returns the meta object for the containment reference list '{@link fr.obeo.dsl.arduino.Thread#getBlocks Blocks}'. + * + * + * @return the meta object for the containment reference list 'Blocks'. + * @see fr.obeo.dsl.arduino.Thread#getBlocks() + * @see #getThread() + * @generated + */ + EReference getThread_Blocks(); + + /** + * Returns the meta object for the reference list '{@link fr.obeo.dsl.arduino.Thread#getChannels Channels}'. + * + * + * @return the meta object for the reference list 'Channels'. + * @see fr.obeo.dsl.arduino.Thread#getChannels() + * @see #getThread() + * @generated + */ + EReference getThread_Channels(); + + /** + * Returns the meta object for the reference '{@link fr.obeo.dsl.arduino.Thread#getCurrentInstruction Current Instruction}'. + * + * + * @return the meta object for the reference 'Current Instruction'. + * @see fr.obeo.dsl.arduino.Thread#getCurrentInstruction() + * @see #getThread() + * @generated + */ + EReference getThread_CurrentInstruction(); + + /** + * Returns the meta object for the reference '{@link fr.obeo.dsl.arduino.Thread#getFirst First}'. + * + * + * @return the meta object for the reference 'First'. + * @see fr.obeo.dsl.arduino.Thread#getFirst() + * @see #getThread() + * @generated + */ + EReference getThread_First(); + + /** + * Returns the meta object for the reference '{@link fr.obeo.dsl.arduino.Thread#getLast Last}'. + * + * + * @return the meta object for the reference 'Last'. + * @see fr.obeo.dsl.arduino.Thread#getLast() + * @see #getThread() + * @generated + */ + EReference getThread_Last(); + + /** + * Returns the meta object for the attribute '{@link fr.obeo.dsl.arduino.Thread#getNbCycle Nb Cycle}'. + * + * + * @return the meta object for the attribute 'Nb Cycle'. + * @see fr.obeo.dsl.arduino.Thread#getNbCycle() + * @see #getThread() + * @generated + */ + EAttribute getThread_NbCycle(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.Channel Channel}'. + * + * + * @return the meta object for class 'Channel'. + * @see fr.obeo.dsl.arduino.Channel + * @generated + */ + EClass getChannel(); + + /** + * Returns the meta object for the reference '{@link fr.obeo.dsl.arduino.Channel#getSource Source}'. + * + * + * @return the meta object for the reference 'Source'. + * @see fr.obeo.dsl.arduino.Channel#getSource() + * @see #getChannel() + * @generated + */ + EReference getChannel_Source(); + + /** + * Returns the meta object for the reference '{@link fr.obeo.dsl.arduino.Channel#getTarget Target}'. + * + * + * @return the meta object for the reference 'Target'. + * @see fr.obeo.dsl.arduino.Channel#getTarget() + * @see #getChannel() + * @generated + */ + EReference getChannel_Target(); + + /** + * Returns the meta object for the attribute '{@link fr.obeo.dsl.arduino.Channel#getInRate In Rate}'. + * + * + * @return the meta object for the attribute 'In Rate'. + * @see fr.obeo.dsl.arduino.Channel#getInRate() + * @see #getChannel() + * @generated + */ + EAttribute getChannel_InRate(); + + /** + * Returns the meta object for the attribute '{@link fr.obeo.dsl.arduino.Channel#getOutRate Out Rate}'. + * + * + * @return the meta object for the attribute 'Out Rate'. + * @see fr.obeo.dsl.arduino.Channel#getOutRate() + * @see #getChannel() + * @generated + */ + EAttribute getChannel_OutRate(); + + /** + * Returns the meta object for the attribute '{@link fr.obeo.dsl.arduino.Channel#getCapacity Capacity}'. + * + * + * @return the meta object for the attribute 'Capacity'. + * @see fr.obeo.dsl.arduino.Channel#getCapacity() + * @see #getChannel() + * @generated + */ + EAttribute getChannel_Capacity(); + + /** + * Returns the meta object for the attribute '{@link fr.obeo.dsl.arduino.Channel#getCurrentSize Current Size}'. + * + * + * @return the meta object for the attribute 'Current Size'. + * @see fr.obeo.dsl.arduino.Channel#getCurrentSize() + * @see #getChannel() + * @generated + */ + EAttribute getChannel_CurrentSize(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.Link Link}'. + * + * + * @return the meta object for class 'Link'. + * @see fr.obeo.dsl.arduino.Link + * @generated + */ + EClass getLink(); + + /** + * Returns the meta object for the reference '{@link fr.obeo.dsl.arduino.Link#getInBoard In Board}'. + * + * + * @return the meta object for the reference 'In Board'. + * @see fr.obeo.dsl.arduino.Link#getInBoard() + * @see #getLink() + * @generated + */ + EReference getLink_InBoard(); + + /** + * Returns the meta object for the reference '{@link fr.obeo.dsl.arduino.Link#getOutBoard Out Board}'. + * + * + * @return the meta object for the reference 'Out Board'. + * @see fr.obeo.dsl.arduino.Link#getOutBoard() + * @see #getLink() + * @generated + */ + EReference getLink_OutBoard(); + + /** + * Returns the meta object for the reference list '{@link fr.obeo.dsl.arduino.Link#getChannels Channels}'. + * + * + * @return the meta object for the reference list 'Channels'. + * @see fr.obeo.dsl.arduino.Link#getChannels() + * @see #getLink() + * @generated + */ + EReference getLink_Channels(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.SynchronizationBlock Synchronization Block}'. + * + * + * @return the meta object for class 'Synchronization Block'. + * @see fr.obeo.dsl.arduino.SynchronizationBlock + * @generated + */ + EClass getSynchronizationBlock(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.InstructionBlock Instruction Block}'. + * + * + * @return the meta object for class 'Instruction Block'. + * @see fr.obeo.dsl.arduino.InstructionBlock + * @generated + */ + EClass getInstructionBlock(); + + /** + * Returns the meta object for the containment reference list '{@link fr.obeo.dsl.arduino.InstructionBlock#getInstructions Instructions}'. + * + * + * @return the meta object for the containment reference list 'Instructions'. + * @see fr.obeo.dsl.arduino.InstructionBlock#getInstructions() + * @see #getInstructionBlock() + * @generated + */ + EReference getInstructionBlock_Instructions(); + + /** + * Returns the meta object for class '{@link fr.obeo.dsl.arduino.ThreadInstructionBlock Thread Instruction Block}'. + * + * + * @return the meta object for class 'Thread Instruction Block'. + * @see fr.obeo.dsl.arduino.ThreadInstructionBlock + * @generated + */ + EClass getThreadInstructionBlock(); + + /** + * Returns the meta object for the reference '{@link fr.obeo.dsl.arduino.ThreadInstructionBlock#getThread Thread}'. + * + * + * @return the meta object for the reference 'Thread'. + * @see fr.obeo.dsl.arduino.ThreadInstructionBlock#getThread() + * @see #getThreadInstructionBlock() + * @generated + */ + EReference getThreadInstructionBlock_Thread(); + + /** + * Returns the meta object for the reference '{@link fr.obeo.dsl.arduino.ThreadInstructionBlock#getNext Next}'. + * + * + * @return the meta object for the reference 'Next'. + * @see fr.obeo.dsl.arduino.ThreadInstructionBlock#getNext() + * @see #getThreadInstructionBlock() + * @generated + */ + EReference getThreadInstructionBlock_Next(); + + /** + * Returns the meta object for enum '{@link fr.obeo.dsl.arduino.Time Time}'. + * + * + * @return the meta object for enum 'Time'. + * @see fr.obeo.dsl.arduino.Time + * @generated + */ + EEnum getTime(); + + /** + * Returns the meta object for enum '{@link fr.obeo.dsl.arduino.BinaryIntegerOperatorKind Binary Integer Operator Kind}'. + * + * + * @return the meta object for enum 'Binary Integer Operator Kind'. + * @see fr.obeo.dsl.arduino.BinaryIntegerOperatorKind + * @generated + */ + EEnum getBinaryIntegerOperatorKind(); + + /** + * Returns the meta object for enum '{@link fr.obeo.dsl.arduino.BinaryBooleanOperatorKind Binary Boolean Operator Kind}'. + * + * + * @return the meta object for enum 'Binary Boolean Operator Kind'. + * @see fr.obeo.dsl.arduino.BinaryBooleanOperatorKind + * @generated + */ + EEnum getBinaryBooleanOperatorKind(); + + /** + * Returns the meta object for enum '{@link fr.obeo.dsl.arduino.UnaryIntegerOperatorKind Unary Integer Operator Kind}'. + * + * + * @return the meta object for enum 'Unary Integer Operator Kind'. + * @see fr.obeo.dsl.arduino.UnaryIntegerOperatorKind + * @generated + */ + EEnum getUnaryIntegerOperatorKind(); + + /** + * Returns the meta object for enum '{@link fr.obeo.dsl.arduino.UnaryBooleanOperatorKind Unary Boolean Operator Kind}'. + * + * + * @return the meta object for enum 'Unary Boolean Operator Kind'. + * @see fr.obeo.dsl.arduino.UnaryBooleanOperatorKind + * @generated + */ + EEnum getUnaryBooleanOperatorKind(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + ArduinoFactory getArduinoFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.BoardImpl Board}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.BoardImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getBoard() + * @generated + */ + EClass BOARD = eINSTANCE.getBoard(); + + /** + * The meta object literal for the 'Project' container reference feature. + * + * + * @generated + */ + EReference BOARD__PROJECT = eINSTANCE.getBoard_Project(); + + /** + * The meta object literal for the 'Threads' reference list feature. + * + * + * @generated + */ + EReference BOARD__THREADS = eINSTANCE.getBoard_Threads(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.Module Module}' class. + * + * + * @see fr.obeo.dsl.arduino.Module + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getModule() + * @generated + */ + EClass MODULE = eINSTANCE.getModule(); + + /** + * The meta object literal for the 'Level' attribute feature. + * + * + * @generated + */ + EAttribute MODULE__LEVEL = eINSTANCE.getModule_Level(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.DigitalPinImpl Digital Pin}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.DigitalPinImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getDigitalPin() + * @generated + */ + EClass DIGITAL_PIN = eINSTANCE.getDigitalPin(); + + /** + * The meta object literal for the 'Module' containment reference feature. + * + * + * @generated + */ + EReference DIGITAL_PIN__MODULE = eINSTANCE.getDigitalPin_Module(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.PinImpl Pin}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.PinImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getPin() + * @generated + */ + EClass PIN = eINSTANCE.getPin(); + + /** + * The meta object literal for the 'Id' attribute feature. + * + * + * @generated + */ + EAttribute PIN__ID = eINSTANCE.getPin_Id(); + + /** + * The meta object literal for the 'Level' attribute feature. + * + * + * @generated + */ + EAttribute PIN__LEVEL = eINSTANCE.getPin_Level(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.AnalogPinImpl Analog Pin}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.AnalogPinImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getAnalogPin() + * @generated + */ + EClass ANALOG_PIN = eINSTANCE.getAnalogPin(); + + /** + * The meta object literal for the 'Module' containment reference feature. + * + * + * @generated + */ + EReference ANALOG_PIN__MODULE = eINSTANCE.getAnalogPin_Module(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.SketchImpl Sketch}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.SketchImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getSketch() + * @generated + */ + EClass SKETCH = eINSTANCE.getSketch(); + + /** + * The meta object literal for the 'Project' container reference feature. + * + * + * @generated + */ + EReference SKETCH__PROJECT = eINSTANCE.getSketch_Project(); + + /** + * The meta object literal for the 'Threads' containment reference list feature. + * + * + * @generated + */ + EReference SKETCH__THREADS = eINSTANCE.getSketch_Threads(); + + /** + * The meta object literal for the 'Channels' containment reference list feature. + * + * + * @generated + */ + EReference SKETCH__CHANNELS = eINSTANCE.getSketch_Channels(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.ProjectImpl Project}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ProjectImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getProject() + * @generated + */ + EClass PROJECT = eINSTANCE.getProject(); + + /** + * The meta object literal for the 'Boards' containment reference list feature. + * + * + * @generated + */ + EReference PROJECT__BOARDS = eINSTANCE.getProject_Boards(); + + /** + * The meta object literal for the 'Sketch' containment reference feature. + * + * + * @generated + */ + EReference PROJECT__SKETCH = eINSTANCE.getProject_Sketch(); + + /** + * The meta object literal for the 'Links' containment reference list feature. + * + * + * @generated + */ + EReference PROJECT__LINKS = eINSTANCE.getProject_Links(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.InstructionImpl Instruction}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.InstructionImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getInstruction() + * @generated + */ + EClass INSTRUCTION = eINSTANCE.getInstruction(); + + /** + * The meta object literal for the 'Owned Block' container reference feature. + * + * + * @generated + */ + EReference INSTRUCTION__OWNED_BLOCK = eINSTANCE.getInstruction_OwnedBlock(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.ModuleAssignmentImpl Module Assignment}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ModuleAssignmentImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getModuleAssignment() + * @generated + */ + EClass MODULE_ASSIGNMENT = eINSTANCE.getModuleAssignment(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.ModuleInstructionImpl Module Instruction}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ModuleInstructionImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getModuleInstruction() + * @generated + */ + EClass MODULE_INSTRUCTION = eINSTANCE.getModuleInstruction(); + + /** + * The meta object literal for the 'Module' reference feature. + * + * + * @generated + */ + EReference MODULE_INSTRUCTION__MODULE = eINSTANCE.getModuleInstruction_Module(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.ControlImpl Control}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ControlImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getControl() + * @generated + */ + EClass CONTROL = eINSTANCE.getControl(); + + /** + * The meta object literal for the 'Block' containment reference feature. + * + * + * @generated + */ + EReference CONTROL__BLOCK = eINSTANCE.getControl_Block(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.UtilitiesImpl Utilities}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.UtilitiesImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getUtilities() + * @generated + */ + EClass UTILITIES = eINSTANCE.getUtilities(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.DelayImpl Delay}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.DelayImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getDelay() + * @generated + */ + EClass DELAY = eINSTANCE.getDelay(); + + /** + * The meta object literal for the 'Unit' attribute feature. + * + * + * @generated + */ + EAttribute DELAY__UNIT = eINSTANCE.getDelay_Unit(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute DELAY__VALUE = eINSTANCE.getDelay_Value(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.NamedElementImpl Named Element}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.NamedElementImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getNamedElement() + * @generated + */ + EClass NAMED_ELEMENT = eINSTANCE.getNamedElement(); + + /** + * The meta object literal for the 'Name' attribute feature. + * + * + * @generated + */ + EAttribute NAMED_ELEMENT__NAME = eINSTANCE.getNamedElement_Name(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.RepeatImpl Repeat}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.RepeatImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getRepeat() + * @generated + */ + EClass REPEAT = eINSTANCE.getRepeat(); + + /** + * The meta object literal for the 'Iteration' attribute feature. + * + * + * @generated + */ + EAttribute REPEAT__ITERATION = eINSTANCE.getRepeat_Iteration(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.ModuleGetImpl Module Get}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ModuleGetImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getModuleGet() + * @generated + */ + EClass MODULE_GET = eINSTANCE.getModuleGet(); + + /** + * The meta object literal for the 'Module' reference feature. + * + * + * @generated + */ + EReference MODULE_GET__MODULE = eINSTANCE.getModuleGet_Module(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.WhileImpl While}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.WhileImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getWhile() + * @generated + */ + EClass WHILE = eINSTANCE.getWhile(); + + /** + * The meta object literal for the 'Condition' containment reference feature. + * + * + * @generated + */ + EReference WHILE__CONDITION = eINSTANCE.getWhile_Condition(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.BinaryExpressionImpl Binary Expression}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.BinaryExpressionImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getBinaryExpression() + * @generated + */ + EClass BINARY_EXPRESSION = eINSTANCE.getBinaryExpression(); + + /** + * The meta object literal for the 'Left' containment reference feature. + * + * + * @generated + */ + EReference BINARY_EXPRESSION__LEFT = eINSTANCE.getBinaryExpression_Left(); + + /** + * The meta object literal for the 'Right' containment reference feature. + * + * + * @generated + */ + EReference BINARY_EXPRESSION__RIGHT = eINSTANCE.getBinaryExpression_Right(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.VariableImpl Variable}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.VariableImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getVariable() + * @generated + */ + EClass VARIABLE = eINSTANCE.getVariable(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.VariableAssignmentImpl Variable Assignment}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.VariableAssignmentImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getVariableAssignment() + * @generated + */ + EClass VARIABLE_ASSIGNMENT = eINSTANCE.getVariableAssignment(); + + /** + * The meta object literal for the 'Variable' reference feature. + * + * + * @generated + */ + EReference VARIABLE_ASSIGNMENT__VARIABLE = eINSTANCE.getVariableAssignment_Variable(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.BinaryIntegerExpressionImpl Binary Integer Expression}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.BinaryIntegerExpressionImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getBinaryIntegerExpression() + * @generated + */ + EClass BINARY_INTEGER_EXPRESSION = eINSTANCE.getBinaryIntegerExpression(); + + /** + * The meta object literal for the 'Operator' attribute feature. + * + * + * @generated + */ + EAttribute BINARY_INTEGER_EXPRESSION__OPERATOR = eINSTANCE.getBinaryIntegerExpression_Operator(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.BinaryBooleanExpressionImpl Binary Boolean Expression}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.BinaryBooleanExpressionImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getBinaryBooleanExpression() + * @generated + */ + EClass BINARY_BOOLEAN_EXPRESSION = eINSTANCE.getBinaryBooleanExpression(); + + /** + * The meta object literal for the 'Operator' attribute feature. + * + * + * @generated + */ + EAttribute BINARY_BOOLEAN_EXPRESSION__OPERATOR = eINSTANCE.getBinaryBooleanExpression_Operator(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.ExpressionImpl Expression}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ExpressionImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getExpression() + * @generated + */ + EClass EXPRESSION = eINSTANCE.getExpression(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.ConstantImpl Constant}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ConstantImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getConstant() + * @generated + */ + EClass CONSTANT = eINSTANCE.getConstant(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.IfImpl If}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.IfImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getIf() + * @generated + */ + EClass IF = eINSTANCE.getIf(); + + /** + * The meta object literal for the 'Condition' containment reference feature. + * + * + * @generated + */ + EReference IF__CONDITION = eINSTANCE.getIf_Condition(); + + /** + * The meta object literal for the 'Else Block' containment reference feature. + * + * + * @generated + */ + EReference IF__ELSE_BLOCK = eINSTANCE.getIf_ElseBlock(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.IntegerConstantImpl Integer Constant}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.IntegerConstantImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getIntegerConstant() + * @generated + */ + EClass INTEGER_CONSTANT = eINSTANCE.getIntegerConstant(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute INTEGER_CONSTANT__VALUE = eINSTANCE.getIntegerConstant_Value(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.BooleanConstantImpl Boolean Constant}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.BooleanConstantImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getBooleanConstant() + * @generated + */ + EClass BOOLEAN_CONSTANT = eINSTANCE.getBooleanConstant(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute BOOLEAN_CONSTANT__VALUE = eINSTANCE.getBooleanConstant_Value(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.BooleanExpressionImpl Boolean Expression}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.BooleanExpressionImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getBooleanExpression() + * @generated + */ + EClass BOOLEAN_EXPRESSION = eINSTANCE.getBooleanExpression(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.IntegerExpressionImpl Integer Expression}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.IntegerExpressionImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getIntegerExpression() + * @generated + */ + EClass INTEGER_EXPRESSION = eINSTANCE.getIntegerExpression(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.AssignmentImpl Assignment}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.AssignmentImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getAssignment() + * @generated + */ + EClass ASSIGNMENT = eINSTANCE.getAssignment(); + + /** + * The meta object literal for the 'Operand' containment reference feature. + * + * + * @generated + */ + EReference ASSIGNMENT__OPERAND = eINSTANCE.getAssignment_Operand(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.IntegerVariableImpl Integer Variable}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.IntegerVariableImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getIntegerVariable() + * @generated + */ + EClass INTEGER_VARIABLE = eINSTANCE.getIntegerVariable(); + + /** + * The meta object literal for the 'Initial Value' attribute feature. + * + * + * @generated + */ + EAttribute INTEGER_VARIABLE__INITIAL_VALUE = eINSTANCE.getIntegerVariable_InitialValue(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute INTEGER_VARIABLE__VALUE = eINSTANCE.getIntegerVariable_Value(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.BooleanVariableImpl Boolean Variable}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.BooleanVariableImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getBooleanVariable() + * @generated + */ + EClass BOOLEAN_VARIABLE = eINSTANCE.getBooleanVariable(); + + /** + * The meta object literal for the 'Initial Value' attribute feature. + * + * + * @generated + */ + EAttribute BOOLEAN_VARIABLE__INITIAL_VALUE = eINSTANCE.getBooleanVariable_InitialValue(); + + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute BOOLEAN_VARIABLE__VALUE = eINSTANCE.getBooleanVariable_Value(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.BooleanModuleGetImpl Boolean Module Get}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.BooleanModuleGetImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getBooleanModuleGet() + * @generated + */ + EClass BOOLEAN_MODULE_GET = eINSTANCE.getBooleanModuleGet(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.IntegerModuleGetImpl Integer Module Get}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.IntegerModuleGetImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getIntegerModuleGet() + * @generated + */ + EClass INTEGER_MODULE_GET = eINSTANCE.getIntegerModuleGet(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.UnaryExpressionImpl Unary Expression}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.UnaryExpressionImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getUnaryExpression() + * @generated + */ + EClass UNARY_EXPRESSION = eINSTANCE.getUnaryExpression(); + + /** + * The meta object literal for the 'Operand' containment reference feature. + * + * + * @generated + */ + EReference UNARY_EXPRESSION__OPERAND = eINSTANCE.getUnaryExpression_Operand(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.UnaryBooleanExpressionImpl Unary Boolean Expression}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.UnaryBooleanExpressionImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getUnaryBooleanExpression() + * @generated + */ + EClass UNARY_BOOLEAN_EXPRESSION = eINSTANCE.getUnaryBooleanExpression(); + + /** + * The meta object literal for the 'Operator' attribute feature. + * + * + * @generated + */ + EAttribute UNARY_BOOLEAN_EXPRESSION__OPERATOR = eINSTANCE.getUnaryBooleanExpression_Operator(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.UnaryIntegerExpressionImpl Unary Integer Expression}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.UnaryIntegerExpressionImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getUnaryIntegerExpression() + * @generated + */ + EClass UNARY_INTEGER_EXPRESSION = eINSTANCE.getUnaryIntegerExpression(); + + /** + * The meta object literal for the 'Operator' attribute feature. + * + * + * @generated + */ + EAttribute UNARY_INTEGER_EXPRESSION__OPERATOR = eINSTANCE.getUnaryIntegerExpression_Operator(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.VariableDeclarationImpl Variable Declaration}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.VariableDeclarationImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getVariableDeclaration() + * @generated + */ + EClass VARIABLE_DECLARATION = eINSTANCE.getVariableDeclaration(); + + /** + * The meta object literal for the 'Variable' containment reference feature. + * + * + * @generated + */ + EReference VARIABLE_DECLARATION__VARIABLE = eINSTANCE.getVariableDeclaration_Variable(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.VariableRefImpl Variable Ref}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.VariableRefImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getVariableRef() + * @generated + */ + EClass VARIABLE_REF = eINSTANCE.getVariableRef(); + + /** + * The meta object literal for the 'Variable' reference feature. + * + * + * @generated + */ + EReference VARIABLE_REF__VARIABLE = eINSTANCE.getVariableRef_Variable(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.LEDImpl LED}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.LEDImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getLED() + * @generated + */ + EClass LED = eINSTANCE.getLED(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.PushButtonImpl Push Button}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.PushButtonImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getPushButton() + * @generated + */ + EClass PUSH_BUTTON = eINSTANCE.getPushButton(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.BuzzerImpl Buzzer}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.BuzzerImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getBuzzer() + * @generated + */ + EClass BUZZER = eINSTANCE.getBuzzer(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.RotationSensorImpl Rotation Sensor}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.RotationSensorImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getRotationSensor() + * @generated + */ + EClass ROTATION_SENSOR = eINSTANCE.getRotationSensor(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.MicroServoImpl Micro Servo}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.MicroServoImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getMicroServo() + * @generated + */ + EClass MICRO_SERVO = eINSTANCE.getMicroServo(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.InfraRedSensorImpl Infra Red Sensor}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.InfraRedSensorImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getInfraRedSensor() + * @generated + */ + EClass INFRA_RED_SENSOR = eINSTANCE.getInfraRedSensor(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.AmbientLightSensorImpl Ambient Light Sensor}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.AmbientLightSensorImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getAmbientLightSensor() + * @generated + */ + EClass AMBIENT_LIGHT_SENSOR = eINSTANCE.getAmbientLightSensor(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.SoundSensorImpl Sound Sensor}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.SoundSensorImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getSoundSensor() + * @generated + */ + EClass SOUND_SENSOR = eINSTANCE.getSoundSensor(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.FanImpl Fan}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.FanImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getFan() + * @generated + */ + EClass FAN = eINSTANCE.getFan(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.MusicPlayerImpl Music Player}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.MusicPlayerImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getMusicPlayer() + * @generated + */ + EClass MUSIC_PLAYER = eINSTANCE.getMusicPlayer(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.ArduinoModuleImpl Module}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ArduinoModuleImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getArduinoModule() + * @generated + */ + EClass ARDUINO_MODULE = eINSTANCE.getArduinoModule(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.ArduinoBoardImpl Board}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ArduinoBoardImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getArduinoBoard() + * @generated + */ + EClass ARDUINO_BOARD = eINSTANCE.getArduinoBoard(); + + /** + * The meta object literal for the 'Digital Pins' containment reference list feature. + * + * + * @generated + */ + EReference ARDUINO_BOARD__DIGITAL_PINS = eINSTANCE.getArduinoBoard_DigitalPins(); + + /** + * The meta object literal for the 'Analog Pins' containment reference list feature. + * + * + * @generated + */ + EReference ARDUINO_BOARD__ANALOG_PINS = eINSTANCE.getArduinoBoard_AnalogPins(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.ArduinoDigitalModuleImpl Digital Module}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ArduinoDigitalModuleImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getArduinoDigitalModule() + * @generated + */ + EClass ARDUINO_DIGITAL_MODULE = eINSTANCE.getArduinoDigitalModule(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.ArduinoAnalogModuleImpl Analog Module}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ArduinoAnalogModuleImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getArduinoAnalogModule() + * @generated + */ + EClass ARDUINO_ANALOG_MODULE = eINSTANCE.getArduinoAnalogModule(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.ThreadImpl Thread}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ThreadImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getThread() + * @generated + */ + EClass THREAD = eINSTANCE.getThread(); + + /** + * The meta object literal for the 'Blocks' containment reference list feature. + * + * + * @generated + */ + EReference THREAD__BLOCKS = eINSTANCE.getThread_Blocks(); + + /** + * The meta object literal for the 'Channels' reference list feature. + * + * + * @generated + */ + EReference THREAD__CHANNELS = eINSTANCE.getThread_Channels(); + + /** + * The meta object literal for the 'Current Instruction' reference feature. + * + * + * @generated + */ + EReference THREAD__CURRENT_INSTRUCTION = eINSTANCE.getThread_CurrentInstruction(); + + /** + * The meta object literal for the 'First' reference feature. + * + * + * @generated + */ + EReference THREAD__FIRST = eINSTANCE.getThread_First(); + + /** + * The meta object literal for the 'Last' reference feature. + * + * + * @generated + */ + EReference THREAD__LAST = eINSTANCE.getThread_Last(); + + /** + * The meta object literal for the 'Nb Cycle' attribute feature. + * + * + * @generated + */ + EAttribute THREAD__NB_CYCLE = eINSTANCE.getThread_NbCycle(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.ChannelImpl Channel}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ChannelImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getChannel() + * @generated + */ + EClass CHANNEL = eINSTANCE.getChannel(); + + /** + * The meta object literal for the 'Source' reference feature. + * + * + * @generated + */ + EReference CHANNEL__SOURCE = eINSTANCE.getChannel_Source(); + + /** + * The meta object literal for the 'Target' reference feature. + * + * + * @generated + */ + EReference CHANNEL__TARGET = eINSTANCE.getChannel_Target(); + + /** + * The meta object literal for the 'In Rate' attribute feature. + * + * + * @generated + */ + EAttribute CHANNEL__IN_RATE = eINSTANCE.getChannel_InRate(); + + /** + * The meta object literal for the 'Out Rate' attribute feature. + * + * + * @generated + */ + EAttribute CHANNEL__OUT_RATE = eINSTANCE.getChannel_OutRate(); + + /** + * The meta object literal for the 'Capacity' attribute feature. + * + * + * @generated + */ + EAttribute CHANNEL__CAPACITY = eINSTANCE.getChannel_Capacity(); + + /** + * The meta object literal for the 'Current Size' attribute feature. + * + * + * @generated + */ + EAttribute CHANNEL__CURRENT_SIZE = eINSTANCE.getChannel_CurrentSize(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.LinkImpl Link}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.LinkImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getLink() + * @generated + */ + EClass LINK = eINSTANCE.getLink(); + + /** + * The meta object literal for the 'In Board' reference feature. + * + * + * @generated + */ + EReference LINK__IN_BOARD = eINSTANCE.getLink_InBoard(); + + /** + * The meta object literal for the 'Out Board' reference feature. + * + * + * @generated + */ + EReference LINK__OUT_BOARD = eINSTANCE.getLink_OutBoard(); + + /** + * The meta object literal for the 'Channels' reference list feature. + * + * + * @generated + */ + EReference LINK__CHANNELS = eINSTANCE.getLink_Channels(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.SynchronizationBlockImpl Synchronization Block}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.SynchronizationBlockImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getSynchronizationBlock() + * @generated + */ + EClass SYNCHRONIZATION_BLOCK = eINSTANCE.getSynchronizationBlock(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.InstructionBlockImpl Instruction Block}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.InstructionBlockImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getInstructionBlock() + * @generated + */ + EClass INSTRUCTION_BLOCK = eINSTANCE.getInstructionBlock(); + + /** + * The meta object literal for the 'Instructions' containment reference list feature. + * + * + * @generated + */ + EReference INSTRUCTION_BLOCK__INSTRUCTIONS = eINSTANCE.getInstructionBlock_Instructions(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.impl.ThreadInstructionBlockImpl Thread Instruction Block}' class. + * + * + * @see fr.obeo.dsl.arduino.impl.ThreadInstructionBlockImpl + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getThreadInstructionBlock() + * @generated + */ + EClass THREAD_INSTRUCTION_BLOCK = eINSTANCE.getThreadInstructionBlock(); + + /** + * The meta object literal for the 'Thread' reference feature. + * + * + * @generated + */ + EReference THREAD_INSTRUCTION_BLOCK__THREAD = eINSTANCE.getThreadInstructionBlock_Thread(); + + /** + * The meta object literal for the 'Next' reference feature. + * + * + * @generated + */ + EReference THREAD_INSTRUCTION_BLOCK__NEXT = eINSTANCE.getThreadInstructionBlock_Next(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.Time Time}' enum. + * + * + * @see fr.obeo.dsl.arduino.Time + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getTime() + * @generated + */ + EEnum TIME = eINSTANCE.getTime(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.BinaryIntegerOperatorKind Binary Integer Operator Kind}' enum. + * + * + * @see fr.obeo.dsl.arduino.BinaryIntegerOperatorKind + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getBinaryIntegerOperatorKind() + * @generated + */ + EEnum BINARY_INTEGER_OPERATOR_KIND = eINSTANCE.getBinaryIntegerOperatorKind(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.BinaryBooleanOperatorKind Binary Boolean Operator Kind}' enum. + * + * + * @see fr.obeo.dsl.arduino.BinaryBooleanOperatorKind + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getBinaryBooleanOperatorKind() + * @generated + */ + EEnum BINARY_BOOLEAN_OPERATOR_KIND = eINSTANCE.getBinaryBooleanOperatorKind(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.UnaryIntegerOperatorKind Unary Integer Operator Kind}' enum. + * + * + * @see fr.obeo.dsl.arduino.UnaryIntegerOperatorKind + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getUnaryIntegerOperatorKind() + * @generated + */ + EEnum UNARY_INTEGER_OPERATOR_KIND = eINSTANCE.getUnaryIntegerOperatorKind(); + + /** + * The meta object literal for the '{@link fr.obeo.dsl.arduino.UnaryBooleanOperatorKind Unary Boolean Operator Kind}' enum. + * + * + * @see fr.obeo.dsl.arduino.UnaryBooleanOperatorKind + * @see fr.obeo.dsl.arduino.impl.ArduinoPackageImpl#getUnaryBooleanOperatorKind() + * @generated + */ + EEnum UNARY_BOOLEAN_OPERATOR_KIND = eINSTANCE.getUnaryBooleanOperatorKind(); + + } + +} //ArduinoPackage diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Assignment.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Assignment.java new file mode 100644 index 00000000..a8fca7a1 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Assignment.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Assignment'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.Assignment#getOperand Operand}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getAssignment() + * @model abstract="true" + * @generated + */ +public interface Assignment extends Instruction { + /** + * Returns the value of the 'Operand' containment reference. + * + *

+ * If the meaning of the 'Operand' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Operand' containment reference. + * @see #setOperand(Expression) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getAssignment_Operand() + * @model containment="true" required="true" + * @generated + */ + Expression getOperand(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Assignment#getOperand Operand}' containment reference. + * + * + * @param value the new value of the 'Operand' containment reference. + * @see #getOperand() + * @generated + */ + void setOperand(Expression value); + +} // Assignment diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BinaryBooleanExpression.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BinaryBooleanExpression.java new file mode 100644 index 00000000..d2e4eff6 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BinaryBooleanExpression.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Binary Boolean Expression'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.BinaryBooleanExpression#getOperator Operator}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getBinaryBooleanExpression() + * @model + * @generated + */ +public interface BinaryBooleanExpression extends BinaryExpression, BooleanExpression { + /** + * Returns the value of the 'Operator' attribute. + * The literals are from the enumeration {@link fr.obeo.dsl.arduino.BinaryBooleanOperatorKind}. + * + *

+ * If the meaning of the 'Operator' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Operator' attribute. + * @see fr.obeo.dsl.arduino.BinaryBooleanOperatorKind + * @see #setOperator(BinaryBooleanOperatorKind) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getBinaryBooleanExpression_Operator() + * @model + * @generated + */ + BinaryBooleanOperatorKind getOperator(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.BinaryBooleanExpression#getOperator Operator}' attribute. + * + * + * @param value the new value of the 'Operator' attribute. + * @see fr.obeo.dsl.arduino.BinaryBooleanOperatorKind + * @see #getOperator() + * @generated + */ + void setOperator(BinaryBooleanOperatorKind value); + +} // BinaryBooleanExpression diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BinaryBooleanOperatorKind.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BinaryBooleanOperatorKind.java new file mode 100644 index 00000000..363dabb2 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BinaryBooleanOperatorKind.java @@ -0,0 +1,378 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Binary Boolean Operator Kind', + * and utility methods for working with them. + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getBinaryBooleanOperatorKind() + * @model + * @generated + */ +public enum BinaryBooleanOperatorKind implements Enumerator { + /** + * The 'Inf' literal object. + * + * + * @see #INF_VALUE + * @generated + * @ordered + */ + INF(0, "inf", "inf"), + + /** + * The 'Sup' literal object. + * + * + * @see #SUP_VALUE + * @generated + * @ordered + */ + SUP(1, "sup", "sup"), + + /** + * The 'Inf Or Equal' literal object. + * + * + * @see #INF_OR_EQUAL_VALUE + * @generated + * @ordered + */ + INF_OR_EQUAL(2, "infOrEqual", "infOrEqual"), + + /** + * The 'Sup Or Equal' literal object. + * + * + * @see #SUP_OR_EQUAL_VALUE + * @generated + * @ordered + */ + SUP_OR_EQUAL(3, "supOrEqual", "supOrEqual"), + + /** + * The 'Equal' literal object. + * + * + * @see #EQUAL_VALUE + * @generated + * @ordered + */ + EQUAL(4, "equal", "equal"), + + /** + * The 'And' literal object. + * + * + * @see #AND_VALUE + * @generated + * @ordered + */ + AND(5, "and", "and"), + + /** + * The 'Or' literal object. + * + * + * @see #OR_VALUE + * @generated + * @ordered + */ + OR(6, "or", "or"), + + /** + * The 'Different' literal object. + * + * + * @see #DIFFERENT_VALUE + * @generated + * @ordered + */ + DIFFERENT(7, "Different", "Different"); + + /** + * The 'Inf' literal value. + * + *

+ * If the meaning of 'Inf' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #INF + * @model name="inf" + * @generated + * @ordered + */ + public static final int INF_VALUE = 0; + + /** + * The 'Sup' literal value. + * + *

+ * If the meaning of 'Sup' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #SUP + * @model name="sup" + * @generated + * @ordered + */ + public static final int SUP_VALUE = 1; + + /** + * The 'Inf Or Equal' literal value. + * + *

+ * If the meaning of 'Inf Or Equal' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #INF_OR_EQUAL + * @model name="infOrEqual" + * @generated + * @ordered + */ + public static final int INF_OR_EQUAL_VALUE = 2; + + /** + * The 'Sup Or Equal' literal value. + * + *

+ * If the meaning of 'Sup Or Equal' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #SUP_OR_EQUAL + * @model name="supOrEqual" + * @generated + * @ordered + */ + public static final int SUP_OR_EQUAL_VALUE = 3; + + /** + * The 'Equal' literal value. + * + *

+ * If the meaning of 'Equal' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #EQUAL + * @model name="equal" + * @generated + * @ordered + */ + public static final int EQUAL_VALUE = 4; + + /** + * The 'And' literal value. + * + *

+ * If the meaning of 'And' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #AND + * @model name="and" + * @generated + * @ordered + */ + public static final int AND_VALUE = 5; + + /** + * The 'Or' literal value. + * + *

+ * If the meaning of 'Or' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #OR + * @model name="or" + * @generated + * @ordered + */ + public static final int OR_VALUE = 6; + + /** + * The 'Different' literal value. + * + *

+ * If the meaning of 'Different' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #DIFFERENT + * @model name="Different" + * @generated + * @ordered + */ + public static final int DIFFERENT_VALUE = 7; + + /** + * An array of all the 'Binary Boolean Operator Kind' enumerators. + * + * + * @generated + */ + private static final BinaryBooleanOperatorKind[] VALUES_ARRAY = + new BinaryBooleanOperatorKind[] { + INF, + SUP, + INF_OR_EQUAL, + SUP_OR_EQUAL, + EQUAL, + AND, + OR, + DIFFERENT, + }; + + /** + * A public read-only list of all the 'Binary Boolean Operator Kind' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Binary Boolean Operator Kind' literal with the specified literal value. + * + * + * @generated + */ + public static BinaryBooleanOperatorKind get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + BinaryBooleanOperatorKind result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Binary Boolean Operator Kind' literal with the specified name. + * + * + * @generated + */ + public static BinaryBooleanOperatorKind getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + BinaryBooleanOperatorKind result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Binary Boolean Operator Kind' literal with the specified integer value. + * + * + * @generated + */ + public static BinaryBooleanOperatorKind get(int value) { + switch (value) { + case INF_VALUE: return INF; + case SUP_VALUE: return SUP; + case INF_OR_EQUAL_VALUE: return INF_OR_EQUAL; + case SUP_OR_EQUAL_VALUE: return SUP_OR_EQUAL; + case EQUAL_VALUE: return EQUAL; + case AND_VALUE: return AND; + case OR_VALUE: return OR; + case DIFFERENT_VALUE: return DIFFERENT; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private BinaryBooleanOperatorKind(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //BinaryBooleanOperatorKind diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BinaryExpression.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BinaryExpression.java new file mode 100644 index 00000000..3a72c0a8 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BinaryExpression.java @@ -0,0 +1,84 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Binary Expression'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.BinaryExpression#getLeft Left}
  • + *
  • {@link fr.obeo.dsl.arduino.BinaryExpression#getRight Right}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getBinaryExpression() + * @model abstract="true" + * @generated + */ +public interface BinaryExpression extends Expression { + /** + * Returns the value of the 'Left' containment reference. + * + *

+ * If the meaning of the 'Left' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Left' containment reference. + * @see #setLeft(Expression) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getBinaryExpression_Left() + * @model containment="true" required="true" + * @generated + */ + Expression getLeft(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.BinaryExpression#getLeft Left}' containment reference. + * + * + * @param value the new value of the 'Left' containment reference. + * @see #getLeft() + * @generated + */ + void setLeft(Expression value); + + /** + * Returns the value of the 'Right' containment reference. + * + *

+ * If the meaning of the 'Right' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Right' containment reference. + * @see #setRight(Expression) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getBinaryExpression_Right() + * @model containment="true" + * @generated + */ + Expression getRight(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.BinaryExpression#getRight Right}' containment reference. + * + * + * @param value the new value of the 'Right' containment reference. + * @see #getRight() + * @generated + */ + void setRight(Expression value); + +} // BinaryExpression diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BinaryIntegerExpression.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BinaryIntegerExpression.java new file mode 100644 index 00000000..84d0b6f5 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BinaryIntegerExpression.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Binary Integer Expression'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.BinaryIntegerExpression#getOperator Operator}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getBinaryIntegerExpression() + * @model + * @generated + */ +public interface BinaryIntegerExpression extends BinaryExpression, IntegerExpression { + /** + * Returns the value of the 'Operator' attribute. + * The literals are from the enumeration {@link fr.obeo.dsl.arduino.BinaryIntegerOperatorKind}. + * + *

+ * If the meaning of the 'Operator' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Operator' attribute. + * @see fr.obeo.dsl.arduino.BinaryIntegerOperatorKind + * @see #setOperator(BinaryIntegerOperatorKind) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getBinaryIntegerExpression_Operator() + * @model + * @generated + */ + BinaryIntegerOperatorKind getOperator(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.BinaryIntegerExpression#getOperator Operator}' attribute. + * + * + * @param value the new value of the 'Operator' attribute. + * @see fr.obeo.dsl.arduino.BinaryIntegerOperatorKind + * @see #getOperator() + * @generated + */ + void setOperator(BinaryIntegerOperatorKind value); + +} // BinaryIntegerExpression diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BinaryIntegerOperatorKind.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BinaryIntegerOperatorKind.java new file mode 100644 index 00000000..5f142250 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BinaryIntegerOperatorKind.java @@ -0,0 +1,351 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Binary Integer Operator Kind', + * and utility methods for working with them. + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getBinaryIntegerOperatorKind() + * @model + * @generated + */ +public enum BinaryIntegerOperatorKind implements Enumerator { + /** + * The 'Minus' literal object. + * + * + * @see #MINUS_VALUE + * @generated + * @ordered + */ + MINUS(0, "minus", "minus"), + + /** + * The 'Plus' literal object. + * + * + * @see #PLUS_VALUE + * @generated + * @ordered + */ + PLUS(1, "plus", "plus"), + + /** + * The 'Mul' literal object. + * + * + * @see #MUL_VALUE + * @generated + * @ordered + */ + MUL(2, "mul", "mul"), + + /** + * The 'Div' literal object. + * + * + * @see #DIV_VALUE + * @generated + * @ordered + */ + DIV(3, "div", "div"), + + /** + * The 'Min' literal object. + * + * + * @see #MIN_VALUE + * @generated + * @ordered + */ + MIN(4, "min", "min"), + + /** + * The 'Max' literal object. + * + * + * @see #MAX_VALUE + * @generated + * @ordered + */ + MAX(5, "max", "max"), + + /** + * The 'Pourcent' literal object. + * + * + * @see #POURCENT_VALUE + * @generated + * @ordered + */ + POURCENT(6, "pourcent", "pourcent"); + + /** + * The 'Minus' literal value. + * + *

+ * If the meaning of 'Minus' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #MINUS + * @model name="minus" + * @generated + * @ordered + */ + public static final int MINUS_VALUE = 0; + + /** + * The 'Plus' literal value. + * + *

+ * If the meaning of 'Plus' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #PLUS + * @model name="plus" + * @generated + * @ordered + */ + public static final int PLUS_VALUE = 1; + + /** + * The 'Mul' literal value. + * + *

+ * If the meaning of 'Mul' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #MUL + * @model name="mul" + * @generated + * @ordered + */ + public static final int MUL_VALUE = 2; + + /** + * The 'Div' literal value. + * + *

+ * If the meaning of 'Div' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #DIV + * @model name="div" + * @generated + * @ordered + */ + public static final int DIV_VALUE = 3; + + /** + * The 'Min' literal value. + * + *

+ * If the meaning of 'Min' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #MIN + * @model name="min" + * @generated + * @ordered + */ + public static final int MIN_VALUE = 4; + + /** + * The 'Max' literal value. + * + *

+ * If the meaning of 'Max' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #MAX + * @model name="max" + * @generated + * @ordered + */ + public static final int MAX_VALUE = 5; + + /** + * The 'Pourcent' literal value. + * + *

+ * If the meaning of 'Pourcent' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #POURCENT + * @model name="pourcent" + * @generated + * @ordered + */ + public static final int POURCENT_VALUE = 6; + + /** + * An array of all the 'Binary Integer Operator Kind' enumerators. + * + * + * @generated + */ + private static final BinaryIntegerOperatorKind[] VALUES_ARRAY = + new BinaryIntegerOperatorKind[] { + MINUS, + PLUS, + MUL, + DIV, + MIN, + MAX, + POURCENT, + }; + + /** + * A public read-only list of all the 'Binary Integer Operator Kind' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Binary Integer Operator Kind' literal with the specified literal value. + * + * + * @generated + */ + public static BinaryIntegerOperatorKind get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + BinaryIntegerOperatorKind result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Binary Integer Operator Kind' literal with the specified name. + * + * + * @generated + */ + public static BinaryIntegerOperatorKind getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + BinaryIntegerOperatorKind result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Binary Integer Operator Kind' literal with the specified integer value. + * + * + * @generated + */ + public static BinaryIntegerOperatorKind get(int value) { + switch (value) { + case MINUS_VALUE: return MINUS; + case PLUS_VALUE: return PLUS; + case MUL_VALUE: return MUL; + case DIV_VALUE: return DIV; + case MIN_VALUE: return MIN; + case MAX_VALUE: return MAX; + case POURCENT_VALUE: return POURCENT; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private BinaryIntegerOperatorKind(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //BinaryIntegerOperatorKind diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Block.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Block.java new file mode 100644 index 00000000..39314e34 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Block.java @@ -0,0 +1,79 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Block'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.Block#getAbstractInstructionBlocks Abstract Instruction Blocks}
  • + *
  • {@link fr.obeo.dsl.arduino.Block#getThread Thread}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getBlock() + * @model + * @generated + */ +public interface Block extends EObject { + /** + * Returns the value of the 'Abstract Instruction Blocks' containment reference list. + * The list contents are of type {@link fr.obeo.dsl.arduino.AbstractInstructionBlock}. + * + *

+ * If the meaning of the 'Abstract Instruction Blocks' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Abstract Instruction Blocks' containment reference list. + * @see fr.obeo.dsl.arduino.ArduinoPackage#getBlock_AbstractInstructionBlocks() + * @model containment="true" + * @generated + */ + EList getAbstractInstructionBlocks(); + + /** + * Returns the value of the 'Thread' container reference. + * It is bidirectional and its opposite is '{@link fr.obeo.dsl.arduino.Thread#getBlock Block}'. + * + *

+ * If the meaning of the 'Thread' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Thread' container reference. + * @see #setThread(fr.obeo.dsl.arduino.Thread) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getBlock_Thread() + * @see fr.obeo.dsl.arduino.Thread#getBlock + * @model opposite="block" transient="false" + * @generated + */ + fr.obeo.dsl.arduino.Thread getThread(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Block#getThread Thread}' container reference. + * + * + * @param value the new value of the 'Thread' container reference. + * @see #getThread() + * @generated + */ + void setThread(fr.obeo.dsl.arduino.Thread value); + +} // Block diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Board.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Board.java new file mode 100644 index 00000000..72ed33c9 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Board.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + +import org.eclipse.emf.common.util.EList; + + +/** + * + * A representation of the model object 'Board'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.Board#getProject Project}
  • + *
  • {@link fr.obeo.dsl.arduino.Board#getThreads Threads}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getBoard() + * @model abstract="true" + * @generated + */ +public interface Board extends NamedElement { + /** + * Returns the value of the 'Project' container reference. + * It is bidirectional and its opposite is '{@link fr.obeo.dsl.arduino.Project#getBoards Boards}'. + * + *

+ * If the meaning of the 'Project' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Project' container reference. + * @see #setProject(Project) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getBoard_Project() + * @see fr.obeo.dsl.arduino.Project#getBoards + * @model opposite="boards" required="true" transient="false" + * @generated + */ + Project getProject(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Board#getProject Project}' container reference. + * + * + * @param value the new value of the 'Project' container reference. + * @see #getProject() + * @generated + */ + void setProject(Project value); + + /** + * Returns the value of the 'Threads' reference list. + * The list contents are of type {@link fr.obeo.dsl.arduino.Thread}. + * + *

+ * If the meaning of the 'Threads' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Threads' reference list. + * @see fr.obeo.dsl.arduino.ArduinoPackage#getBoard_Threads() + * @model + * @generated + */ + EList getThreads(); + +} // Board diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BooleanConstant.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BooleanConstant.java new file mode 100644 index 00000000..42095930 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BooleanConstant.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Boolean Constant'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.BooleanConstant#isValue Value}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getBooleanConstant() + * @model + * @generated + */ +public interface BooleanConstant extends Constant, BooleanExpression { + /** + * Returns the value of the 'Value' attribute. + * The default value is "false". + * + *

+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(boolean) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getBooleanConstant_Value() + * @model default="false" + * @generated + */ + boolean isValue(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.BooleanConstant#isValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #isValue() + * @generated + */ + void setValue(boolean value); + +} // BooleanConstant diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BooleanExpression.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BooleanExpression.java new file mode 100644 index 00000000..5be9ca59 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BooleanExpression.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Boolean Expression'. + * + * + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getBooleanExpression() + * @model abstract="true" + * @generated + */ +public interface BooleanExpression extends Expression { +} // BooleanExpression diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BooleanModuleGet.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BooleanModuleGet.java new file mode 100644 index 00000000..401e4a91 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BooleanModuleGet.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Boolean Module Get'. + * + * + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getBooleanModuleGet() + * @model + * @generated + */ +public interface BooleanModuleGet extends ModuleGet, BooleanExpression { +} // BooleanModuleGet diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BooleanVariable.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BooleanVariable.java new file mode 100644 index 00000000..e4cb0068 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/BooleanVariable.java @@ -0,0 +1,86 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Boolean Variable'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.BooleanVariable#isInitialValue Initial Value}
  • + *
  • {@link fr.obeo.dsl.arduino.BooleanVariable#getValue Value}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getBooleanVariable() + * @model + * @generated + */ +public interface BooleanVariable extends Variable, BooleanExpression { + /** + * Returns the value of the 'Initial Value' attribute. + * The default value is "false". + * + *

+ * If the meaning of the 'Initial Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Initial Value' attribute. + * @see #setInitialValue(boolean) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getBooleanVariable_InitialValue() + * @model default="false" + * @generated + */ + boolean isInitialValue(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.BooleanVariable#isInitialValue Initial Value}' attribute. + * + * + * @param value the new value of the 'Initial Value' attribute. + * @see #isInitialValue() + * @generated + */ + void setInitialValue(boolean value); + + /** + * Returns the value of the 'Value' attribute. + * The default value is "false". + * + *

+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(Boolean) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getBooleanVariable_Value() + * @model default="false" + * @generated + */ + Boolean getValue(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.BooleanVariable#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(Boolean value); + +} // BooleanVariable diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Buzzer.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Buzzer.java new file mode 100644 index 00000000..7e06c4f6 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Buzzer.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Buzzer'. + * + * + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getBuzzer() + * @model + * @generated + */ +public interface Buzzer extends ArduinoDigitalModule { +} // Buzzer diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Channel.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Channel.java new file mode 100644 index 00000000..452ffc5c --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Channel.java @@ -0,0 +1,194 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Channel'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.Channel#getSource Source}
  • + *
  • {@link fr.obeo.dsl.arduino.Channel#getTarget Target}
  • + *
  • {@link fr.obeo.dsl.arduino.Channel#getInRate In Rate}
  • + *
  • {@link fr.obeo.dsl.arduino.Channel#getOutRate Out Rate}
  • + *
  • {@link fr.obeo.dsl.arduino.Channel#getCapacity Capacity}
  • + *
  • {@link fr.obeo.dsl.arduino.Channel#getCurrentSize Current Size}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getChannel() + * @model + * @generated + */ +public interface Channel extends NamedElement { + /** + * Returns the value of the 'Source' reference. + * It is bidirectional and its opposite is '{@link fr.obeo.dsl.arduino.Thread#getChannels Channels}'. + * + *

+ * If the meaning of the 'Source' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Source' reference. + * @see #setSource(fr.obeo.dsl.arduino.Thread) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getChannel_Source() + * @see fr.obeo.dsl.arduino.Thread#getChannels + * @model opposite="channels" required="true" + * @generated + */ + fr.obeo.dsl.arduino.Thread getSource(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Channel#getSource Source}' reference. + * + * + * @param value the new value of the 'Source' reference. + * @see #getSource() + * @generated + */ + void setSource(fr.obeo.dsl.arduino.Thread value); + + /** + * Returns the value of the 'Target' reference. + * + *

+ * If the meaning of the 'Target' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Target' reference. + * @see #setTarget(fr.obeo.dsl.arduino.Thread) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getChannel_Target() + * @model required="true" + * @generated + */ + fr.obeo.dsl.arduino.Thread getTarget(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Channel#getTarget Target}' reference. + * + * + * @param value the new value of the 'Target' reference. + * @see #getTarget() + * @generated + */ + void setTarget(fr.obeo.dsl.arduino.Thread value); + + /** + * Returns the value of the 'In Rate' attribute. + * + *

+ * If the meaning of the 'In Rate' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'In Rate' attribute. + * @see #setInRate(int) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getChannel_InRate() + * @model + * @generated + */ + int getInRate(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Channel#getInRate In Rate}' attribute. + * + * + * @param value the new value of the 'In Rate' attribute. + * @see #getInRate() + * @generated + */ + void setInRate(int value); + + /** + * Returns the value of the 'Out Rate' attribute. + * + *

+ * If the meaning of the 'Out Rate' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Out Rate' attribute. + * @see #setOutRate(int) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getChannel_OutRate() + * @model + * @generated + */ + int getOutRate(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Channel#getOutRate Out Rate}' attribute. + * + * + * @param value the new value of the 'Out Rate' attribute. + * @see #getOutRate() + * @generated + */ + void setOutRate(int value); + + /** + * Returns the value of the 'Capacity' attribute. + * + *

+ * If the meaning of the 'Capacity' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Capacity' attribute. + * @see #setCapacity(int) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getChannel_Capacity() + * @model + * @generated + */ + int getCapacity(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Channel#getCapacity Capacity}' attribute. + * + * + * @param value the new value of the 'Capacity' attribute. + * @see #getCapacity() + * @generated + */ + void setCapacity(int value); + + /** + * Returns the value of the 'Current Size' attribute. + * + *

+ * If the meaning of the 'Current Size' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Current Size' attribute. + * @see #setCurrentSize(int) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getChannel_CurrentSize() + * @model + * @generated + */ + int getCurrentSize(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Channel#getCurrentSize Current Size}' attribute. + * + * + * @param value the new value of the 'Current Size' attribute. + * @see #getCurrentSize() + * @generated + */ + void setCurrentSize(int value); + +} // Channel diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Constant.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Constant.java new file mode 100644 index 00000000..c3f4d7e8 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Constant.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Constant'. + * + * + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getConstant() + * @model abstract="true" + * @generated + */ +public interface Constant extends Expression { +} // Constant diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Control.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Control.java new file mode 100644 index 00000000..b2e2b6c9 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Control.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Control'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.Control#getBlock Block}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getControl() + * @model abstract="true" + * @generated + */ +public interface Control extends Instruction { + + /** + * Returns the value of the 'Block' containment reference. + * + *

+ * If the meaning of the 'Block' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Block' containment reference. + * @see #setBlock(InstructionBlock) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getControl_Block() + * @model containment="true" required="true" + * @generated + */ + InstructionBlock getBlock(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Control#getBlock Block}' containment reference. + * + * + * @param value the new value of the 'Block' containment reference. + * @see #getBlock() + * @generated + */ + void setBlock(InstructionBlock value); +} // Control diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Delay.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Delay.java new file mode 100644 index 00000000..499b0b7f --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Delay.java @@ -0,0 +1,87 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Delay'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.Delay#getUnit Unit}
  • + *
  • {@link fr.obeo.dsl.arduino.Delay#getValue Value}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getDelay() + * @model + * @generated + */ +public interface Delay extends Utilities { + /** + * Returns the value of the 'Unit' attribute. + * The literals are from the enumeration {@link fr.obeo.dsl.arduino.Time}. + * + *

+ * If the meaning of the 'Unit' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Unit' attribute. + * @see fr.obeo.dsl.arduino.Time + * @see #setUnit(Time) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getDelay_Unit() + * @model + * @generated + */ + Time getUnit(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Delay#getUnit Unit}' attribute. + * + * + * @param value the new value of the 'Unit' attribute. + * @see fr.obeo.dsl.arduino.Time + * @see #getUnit() + * @generated + */ + void setUnit(Time value); + + /** + * Returns the value of the 'Value' attribute. + * + *

+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(int) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getDelay_Value() + * @model + * @generated + */ + int getValue(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Delay#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(int value); + +} // Delay diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/DigitalPin.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/DigitalPin.java new file mode 100644 index 00000000..16258aca --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/DigitalPin.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Digital Pin'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.DigitalPin#getModule Module}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getDigitalPin() + * @model + * @generated + */ +public interface DigitalPin extends Pin { + /** + * Returns the value of the 'Module' containment reference. + * + *

+ * If the meaning of the 'Module' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Module' containment reference. + * @see #setModule(ArduinoDigitalModule) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getDigitalPin_Module() + * @model containment="true" + * @generated + */ + ArduinoDigitalModule getModule(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.DigitalPin#getModule Module}' containment reference. + * + * + * @param value the new value of the 'Module' containment reference. + * @see #getModule() + * @generated + */ + void setModule(ArduinoDigitalModule value); + +} // DigitalPin diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Expression.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Expression.java new file mode 100644 index 00000000..eb4c9738 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Expression.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Expression'. + * + * + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getExpression() + * @model abstract="true" + * @generated + */ +public interface Expression extends EObject { +} // Expression diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Fan.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Fan.java new file mode 100644 index 00000000..fb7c81bd --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Fan.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Fan'. + * + * + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getFan() + * @model + * @generated + */ +public interface Fan extends ArduinoDigitalModule { +} // Fan diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/If.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/If.java new file mode 100644 index 00000000..0a27cf52 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/If.java @@ -0,0 +1,84 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'If'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.If#getCondition Condition}
  • + *
  • {@link fr.obeo.dsl.arduino.If#getElseBlock Else Block}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getIf() + * @model + * @generated + */ +public interface If extends Control { + /** + * Returns the value of the 'Condition' containment reference. + * + *

+ * If the meaning of the 'Condition' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Condition' containment reference. + * @see #setCondition(BooleanExpression) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getIf_Condition() + * @model containment="true" required="true" + * @generated + */ + BooleanExpression getCondition(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.If#getCondition Condition}' containment reference. + * + * + * @param value the new value of the 'Condition' containment reference. + * @see #getCondition() + * @generated + */ + void setCondition(BooleanExpression value); + + /** + * Returns the value of the 'Else Block' containment reference. + * + *

+ * If the meaning of the 'Else Block' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Else Block' containment reference. + * @see #setElseBlock(InstructionBlock) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getIf_ElseBlock() + * @model containment="true" + * @generated + */ + InstructionBlock getElseBlock(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.If#getElseBlock Else Block}' containment reference. + * + * + * @param value the new value of the 'Else Block' containment reference. + * @see #getElseBlock() + * @generated + */ + void setElseBlock(InstructionBlock value); + +} // If diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/InfraRedSensor.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/InfraRedSensor.java new file mode 100644 index 00000000..0c281185 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/InfraRedSensor.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Infra Red Sensor'. + * + * + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getInfraRedSensor() + * @model + * @generated + */ +public interface InfraRedSensor extends ArduinoDigitalModule { +} // InfraRedSensor diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Instruction.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Instruction.java new file mode 100644 index 00000000..af402144 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Instruction.java @@ -0,0 +1,68 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Instruction'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.Instruction#getOwnedBlock Owned Block}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getInstruction() + * @model abstract="true" + * @generated + */ +public interface Instruction extends NamedElement { + /** + * Returns the value of the 'Owned Block' container reference. + * It is bidirectional and its opposite is '{@link fr.obeo.dsl.arduino.InstructionBlock#getInstructions Instructions}'. + * + *

+ * If the meaning of the 'Owned Block' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Owned Block' container reference. + * @see #setOwnedBlock(InstructionBlock) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getInstruction_OwnedBlock() + * @see fr.obeo.dsl.arduino.InstructionBlock#getInstructions + * @model opposite="instructions" transient="false" + * @generated + */ + InstructionBlock getOwnedBlock(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Instruction#getOwnedBlock Owned Block}' container reference. + * + * + * @param value the new value of the 'Owned Block' container reference. + * @see #getOwnedBlock() + * @generated + */ + void setOwnedBlock(InstructionBlock value); + + /** + * + * + * @model + * @generated + */ + void execute(); + +} // Instruction diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/InstructionBlock.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/InstructionBlock.java new file mode 100644 index 00000000..2d5a864f --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/InstructionBlock.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Instruction Block'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.InstructionBlock#getInstructions Instructions}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getInstructionBlock() + * @model + * @generated + */ +public interface InstructionBlock extends ThreadInstructionBlock { + /** + * Returns the value of the 'Instructions' containment reference list. + * The list contents are of type {@link fr.obeo.dsl.arduino.Instruction}. + * It is bidirectional and its opposite is '{@link fr.obeo.dsl.arduino.Instruction#getOwnedBlock Owned Block}'. + * + *

+ * If the meaning of the 'Instructions' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Instructions' containment reference list. + * @see fr.obeo.dsl.arduino.ArduinoPackage#getInstructionBlock_Instructions() + * @see fr.obeo.dsl.arduino.Instruction#getOwnedBlock + * @model opposite="ownedBlock" containment="true" + * @generated + */ + EList getInstructions(); + +} // InstructionBlock diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/IntegerConstant.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/IntegerConstant.java new file mode 100644 index 00000000..389106d4 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/IntegerConstant.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Integer Constant'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.IntegerConstant#getValue Value}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getIntegerConstant() + * @model + * @generated + */ +public interface IntegerConstant extends Constant, IntegerExpression { + /** + * Returns the value of the 'Value' attribute. + * The default value is "0". + * + *

+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(int) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getIntegerConstant_Value() + * @model default="0" + * @generated + */ + int getValue(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.IntegerConstant#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(int value); + +} // IntegerConstant diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/IntegerExpression.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/IntegerExpression.java new file mode 100644 index 00000000..a205ccd0 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/IntegerExpression.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Integer Expression'. + * + * + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getIntegerExpression() + * @model abstract="true" + * @generated + */ +public interface IntegerExpression extends Expression { +} // IntegerExpression diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/IntegerModuleGet.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/IntegerModuleGet.java new file mode 100644 index 00000000..d7da3f85 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/IntegerModuleGet.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Integer Module Get'. + * + * + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getIntegerModuleGet() + * @model + * @generated + */ +public interface IntegerModuleGet extends ModuleGet, IntegerExpression { +} // IntegerModuleGet diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/IntegerVariable.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/IntegerVariable.java new file mode 100644 index 00000000..cc27101d --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/IntegerVariable.java @@ -0,0 +1,86 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Integer Variable'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.IntegerVariable#getInitialValue Initial Value}
  • + *
  • {@link fr.obeo.dsl.arduino.IntegerVariable#getValue Value}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getIntegerVariable() + * @model + * @generated + */ +public interface IntegerVariable extends Variable, IntegerExpression { + /** + * Returns the value of the 'Initial Value' attribute. + * The default value is "0". + * + *

+ * If the meaning of the 'Initial Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Initial Value' attribute. + * @see #setInitialValue(int) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getIntegerVariable_InitialValue() + * @model default="0" + * @generated + */ + int getInitialValue(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.IntegerVariable#getInitialValue Initial Value}' attribute. + * + * + * @param value the new value of the 'Initial Value' attribute. + * @see #getInitialValue() + * @generated + */ + void setInitialValue(int value); + + /** + * Returns the value of the 'Value' attribute. + * The default value is "0". + * + *

+ * If the meaning of the 'Value' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(Integer) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getIntegerVariable_Value() + * @model default="0" + * @generated + */ + Integer getValue(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.IntegerVariable#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(Integer value); + +} // IntegerVariable diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/LED.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/LED.java new file mode 100644 index 00000000..c8b5b235 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/LED.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'LED'. + * + * + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getLED() + * @model + * @generated + */ +public interface LED extends ArduinoDigitalModule { +} // LED diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Link.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Link.java new file mode 100644 index 00000000..9e3fe64d --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Link.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + +import org.eclipse.emf.common.util.EList; + + +/** + * + * A representation of the model object 'Link'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.Link#getInBoard In Board}
  • + *
  • {@link fr.obeo.dsl.arduino.Link#getOutBoard Out Board}
  • + *
  • {@link fr.obeo.dsl.arduino.Link#getChannels Channels}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getLink() + * @model + * @generated + */ +public interface Link extends NamedElement { + /** + * Returns the value of the 'In Board' reference. + * + *

+ * If the meaning of the 'In Board' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'In Board' reference. + * @see #setInBoard(Board) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getLink_InBoard() + * @model required="true" + * @generated + */ + Board getInBoard(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Link#getInBoard In Board}' reference. + * + * + * @param value the new value of the 'In Board' reference. + * @see #getInBoard() + * @generated + */ + void setInBoard(Board value); + + /** + * Returns the value of the 'Out Board' reference. + * + *

+ * If the meaning of the 'Out Board' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Out Board' reference. + * @see #setOutBoard(Board) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getLink_OutBoard() + * @model required="true" + * @generated + */ + Board getOutBoard(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Link#getOutBoard Out Board}' reference. + * + * + * @param value the new value of the 'Out Board' reference. + * @see #getOutBoard() + * @generated + */ + void setOutBoard(Board value); + + /** + * Returns the value of the 'Channels' reference list. + * The list contents are of type {@link fr.obeo.dsl.arduino.Channel}. + * + *

+ * If the meaning of the 'Channels' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Channels' reference list. + * @see fr.obeo.dsl.arduino.ArduinoPackage#getLink_Channels() + * @model + * @generated + */ + EList getChannels(); + +} // Link diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/MicroServo.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/MicroServo.java new file mode 100644 index 00000000..a9fe2bc0 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/MicroServo.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Micro Servo'. + * + * + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getMicroServo() + * @model + * @generated + */ +public interface MicroServo extends ArduinoDigitalModule { +} // MicroServo diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Module.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Module.java new file mode 100644 index 00000000..f300291f --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Module.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Module'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.Module#isLevel Level}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getModule() + * @model interface="true" abstract="true" + * @generated + */ +public interface Module extends NamedElement { + /** + * Returns the value of the 'Level' attribute. + * + *

+ * If the meaning of the 'Level' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Level' attribute. + * @see #setLevel(boolean) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getModule_Level() + * @model + * @generated + */ + boolean isLevel(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Module#isLevel Level}' attribute. + * + * + * @param value the new value of the 'Level' attribute. + * @see #isLevel() + * @generated + */ + void setLevel(boolean value); + +} // Module diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ModuleAssignment.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ModuleAssignment.java new file mode 100644 index 00000000..0187daec --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ModuleAssignment.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Module Assignment'. + * + * + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getModuleAssignment() + * @model + * @generated + */ +public interface ModuleAssignment extends ModuleInstruction, Assignment { +} // ModuleAssignment diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ModuleGet.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ModuleGet.java new file mode 100644 index 00000000..6f8a2e75 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ModuleGet.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Module Get'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.ModuleGet#getModule Module}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getModuleGet() + * @model abstract="true" + * @generated + */ +public interface ModuleGet extends Expression { + /** + * Returns the value of the 'Module' reference. + * + *

+ * If the meaning of the 'Module' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Module' reference. + * @see #setModule(Module) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getModuleGet_Module() + * @model required="true" + * @generated + */ + Module getModule(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.ModuleGet#getModule Module}' reference. + * + * + * @param value the new value of the 'Module' reference. + * @see #getModule() + * @generated + */ + void setModule(Module value); + +} // ModuleGet diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ModuleInstruction.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ModuleInstruction.java new file mode 100644 index 00000000..de8eac2c --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ModuleInstruction.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Module Instruction'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.ModuleInstruction#getModule Module}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getModuleInstruction() + * @model abstract="true" + * @generated + */ +public interface ModuleInstruction extends Instruction { + /** + * Returns the value of the 'Module' reference. + * + *

+ * If the meaning of the 'Module' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Module' reference. + * @see #setModule(Module) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getModuleInstruction_Module() + * @model required="true" + * @generated + */ + Module getModule(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.ModuleInstruction#getModule Module}' reference. + * + * + * @param value the new value of the 'Module' reference. + * @see #getModule() + * @generated + */ + void setModule(Module value); + +} // ModuleInstruction diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/MusicPlayer.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/MusicPlayer.java new file mode 100644 index 00000000..a3b13a28 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/MusicPlayer.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Music Player'. + * + * + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getMusicPlayer() + * @model + * @generated + */ +public interface MusicPlayer extends ArduinoAnalogModule { +} // MusicPlayer diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/NamedElement.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/NamedElement.java new file mode 100644 index 00000000..ec6e7077 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/NamedElement.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Named Element'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.NamedElement#getName Name}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getNamedElement() + * @model abstract="true" + * @generated + */ +public interface NamedElement extends EObject { + /** + * Returns the value of the 'Name' attribute. + * + *

+ * If the meaning of the 'Name' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Name' attribute. + * @see #setName(String) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getNamedElement_Name() + * @model + * @generated + */ + String getName(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.NamedElement#getName Name}' attribute. + * + * + * @param value the new value of the 'Name' attribute. + * @see #getName() + * @generated + */ + void setName(String value); + +} // NamedElement diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Pin.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Pin.java new file mode 100644 index 00000000..dba582de --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Pin.java @@ -0,0 +1,85 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Pin'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.Pin#getId Id}
  • + *
  • {@link fr.obeo.dsl.arduino.Pin#getLevel Level}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getPin() + * @model abstract="true" + * @generated + */ +public interface Pin extends EObject { + /** + * Returns the value of the 'Id' attribute. + * + *

+ * If the meaning of the 'Id' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Id' attribute. + * @see #setId(int) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getPin_Id() + * @model + * @generated + */ + int getId(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Pin#getId Id}' attribute. + * + * + * @param value the new value of the 'Id' attribute. + * @see #getId() + * @generated + */ + void setId(int value); + + /** + * Returns the value of the 'Level' attribute. + * + *

+ * If the meaning of the 'Level' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Level' attribute. + * @see #setLevel(Integer) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getPin_Level() + * @model + * @generated + */ + Integer getLevel(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Pin#getLevel Level}' attribute. + * + * + * @param value the new value of the 'Level' attribute. + * @see #getLevel() + * @generated + */ + void setLevel(Integer value); + +} // Pin diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Project.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Project.java new file mode 100644 index 00000000..402c122c --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Project.java @@ -0,0 +1,97 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Project'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.Project#getBoards Boards}
  • + *
  • {@link fr.obeo.dsl.arduino.Project#getSketch Sketch}
  • + *
  • {@link fr.obeo.dsl.arduino.Project#getLinks Links}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getProject() + * @model + * @generated + */ +public interface Project extends NamedElement { + /** + * Returns the value of the 'Boards' containment reference list. + * The list contents are of type {@link fr.obeo.dsl.arduino.Board}. + * It is bidirectional and its opposite is '{@link fr.obeo.dsl.arduino.Board#getProject Project}'. + * + *

+ * If the meaning of the 'Boards' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Boards' containment reference list. + * @see fr.obeo.dsl.arduino.ArduinoPackage#getProject_Boards() + * @see fr.obeo.dsl.arduino.Board#getProject + * @model opposite="project" containment="true" + * @generated + */ + EList getBoards(); + + /** + * Returns the value of the 'Sketch' containment reference. + * It is bidirectional and its opposite is '{@link fr.obeo.dsl.arduino.Sketch#getProject Project}'. + * + *

+ * If the meaning of the 'Sketch' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Sketch' containment reference. + * @see #setSketch(Sketch) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getProject_Sketch() + * @see fr.obeo.dsl.arduino.Sketch#getProject + * @model opposite="project" containment="true" + * @generated + */ + Sketch getSketch(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Project#getSketch Sketch}' containment reference. + * + * + * @param value the new value of the 'Sketch' containment reference. + * @see #getSketch() + * @generated + */ + void setSketch(Sketch value); + + /** + * Returns the value of the 'Links' containment reference list. + * The list contents are of type {@link fr.obeo.dsl.arduino.Link}. + * + *

+ * If the meaning of the 'Links' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Links' containment reference list. + * @see fr.obeo.dsl.arduino.ArduinoPackage#getProject_Links() + * @model containment="true" + * @generated + */ + EList getLinks(); + +} // Project diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/PushButton.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/PushButton.java new file mode 100644 index 00000000..165ba88b --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/PushButton.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Push Button'. + * + * + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getPushButton() + * @model + * @generated + */ +public interface PushButton extends ArduinoDigitalModule { +} // PushButton diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Repeat.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Repeat.java new file mode 100644 index 00000000..f6aed6cd --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Repeat.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Repeat'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.Repeat#getIteration Iteration}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getRepeat() + * @model + * @generated + */ +public interface Repeat extends Control { + /** + * Returns the value of the 'Iteration' attribute. + * The default value is "5". + * + *

+ * If the meaning of the 'Iteration' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Iteration' attribute. + * @see #setIteration(int) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getRepeat_Iteration() + * @model default="5" + * @generated + */ + int getIteration(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Repeat#getIteration Iteration}' attribute. + * + * + * @param value the new value of the 'Iteration' attribute. + * @see #getIteration() + * @generated + */ + void setIteration(int value); + +} // Repeat diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/RotationSensor.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/RotationSensor.java new file mode 100644 index 00000000..00edc3bc --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/RotationSensor.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Rotation Sensor'. + * + * + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getRotationSensor() + * @model + * @generated + */ +public interface RotationSensor extends ArduinoAnalogModule { +} // RotationSensor diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Sketch.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Sketch.java new file mode 100644 index 00000000..21ff371f --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Sketch.java @@ -0,0 +1,94 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Sketch'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.Sketch#getProject Project}
  • + *
  • {@link fr.obeo.dsl.arduino.Sketch#getThreads Threads}
  • + *
  • {@link fr.obeo.dsl.arduino.Sketch#getChannels Channels}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getSketch() + * @model + * @generated + */ +public interface Sketch extends NamedElement { + /** + * Returns the value of the 'Project' container reference. + * It is bidirectional and its opposite is '{@link fr.obeo.dsl.arduino.Project#getSketch Sketch}'. + * + *

+ * If the meaning of the 'Project' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Project' container reference. + * @see #setProject(Project) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getSketch_Project() + * @see fr.obeo.dsl.arduino.Project#getSketch + * @model opposite="sketch" required="true" transient="false" + * @generated + */ + Project getProject(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Sketch#getProject Project}' container reference. + * + * + * @param value the new value of the 'Project' container reference. + * @see #getProject() + * @generated + */ + void setProject(Project value); + + /** + * Returns the value of the 'Threads' containment reference list. + * The list contents are of type {@link fr.obeo.dsl.arduino.Thread}. + * + *

+ * If the meaning of the 'Threads' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Threads' containment reference list. + * @see fr.obeo.dsl.arduino.ArduinoPackage#getSketch_Threads() + * @model containment="true" + * @generated + */ + EList getThreads(); + + /** + * Returns the value of the 'Channels' containment reference list. + * The list contents are of type {@link fr.obeo.dsl.arduino.Channel}. + * + *

+ * If the meaning of the 'Channels' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Channels' containment reference list. + * @see fr.obeo.dsl.arduino.ArduinoPackage#getSketch_Channels() + * @model containment="true" + * @generated + */ + EList getChannels(); + +} // Sketch diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/SoundSensor.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/SoundSensor.java new file mode 100644 index 00000000..f53ddbd4 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/SoundSensor.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Sound Sensor'. + * + * + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getSoundSensor() + * @model + * @generated + */ +public interface SoundSensor extends ArduinoAnalogModule { +} // SoundSensor diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Synchonization.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Synchonization.java new file mode 100644 index 00000000..f564f110 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Synchonization.java @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Synchonization'. + * + * + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getSynchonization() + * @model + * @generated + */ +public interface Synchonization extends Instruction { + /** + * + * + * @model + * @generated + */ + void fire(); + +} // Synchonization diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Synchronization.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Synchronization.java new file mode 100644 index 00000000..f1056e27 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Synchronization.java @@ -0,0 +1,33 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Synchronization'. + * + * + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getSynchronization() + * @model + * @generated + */ +public interface Synchronization extends Instruction { + /** + * + * + * @model + * @generated + */ + void fire(); + +} // Synchronization diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/SynchronizationBlock.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/SynchronizationBlock.java new file mode 100644 index 00000000..7cd3f668 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/SynchronizationBlock.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Synchronization Block'. + * + * + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getSynchronizationBlock() + * @model + * @generated + */ +public interface SynchronizationBlock extends ThreadInstructionBlock { + +} // SynchronizationBlock diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Thread.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Thread.java new file mode 100644 index 00000000..3d5b63a1 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Thread.java @@ -0,0 +1,175 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Thread'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.Thread#getBlocks Blocks}
  • + *
  • {@link fr.obeo.dsl.arduino.Thread#getChannels Channels}
  • + *
  • {@link fr.obeo.dsl.arduino.Thread#getCurrentInstruction Current Instruction}
  • + *
  • {@link fr.obeo.dsl.arduino.Thread#getFirst First}
  • + *
  • {@link fr.obeo.dsl.arduino.Thread#getLast Last}
  • + *
  • {@link fr.obeo.dsl.arduino.Thread#getNbCycle Nb Cycle}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getThread() + * @model + * @generated + */ +public interface Thread extends NamedElement { + /** + * Returns the value of the 'Blocks' containment reference list. + * The list contents are of type {@link fr.obeo.dsl.arduino.ThreadInstructionBlock}. + * + *

+ * If the meaning of the 'Blocks' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Blocks' containment reference list. + * @see fr.obeo.dsl.arduino.ArduinoPackage#getThread_Blocks() + * @model containment="true" + * @generated + */ + EList getBlocks(); + + /** + * Returns the value of the 'Channels' reference list. + * The list contents are of type {@link fr.obeo.dsl.arduino.Channel}. + * It is bidirectional and its opposite is '{@link fr.obeo.dsl.arduino.Channel#getSource Source}'. + * + *

+ * If the meaning of the 'Channels' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Channels' reference list. + * @see fr.obeo.dsl.arduino.ArduinoPackage#getThread_Channels() + * @see fr.obeo.dsl.arduino.Channel#getSource + * @model opposite="source" + * @generated + */ + EList getChannels(); + + /** + * Returns the value of the 'Current Instruction' reference. + * + *

+ * If the meaning of the 'Current Instruction' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Current Instruction' reference. + * @see #setCurrentInstruction(Instruction) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getThread_CurrentInstruction() + * @model + * @generated + */ + Instruction getCurrentInstruction(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Thread#getCurrentInstruction Current Instruction}' reference. + * + * + * @param value the new value of the 'Current Instruction' reference. + * @see #getCurrentInstruction() + * @generated + */ + void setCurrentInstruction(Instruction value); + + /** + * Returns the value of the 'First' reference. + * + *

+ * If the meaning of the 'First' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'First' reference. + * @see #setFirst(ThreadInstructionBlock) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getThread_First() + * @model + * @generated + */ + ThreadInstructionBlock getFirst(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Thread#getFirst First}' reference. + * + * + * @param value the new value of the 'First' reference. + * @see #getFirst() + * @generated + */ + void setFirst(ThreadInstructionBlock value); + + /** + * Returns the value of the 'Last' reference. + * + *

+ * If the meaning of the 'Last' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Last' reference. + * @see #setLast(ThreadInstructionBlock) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getThread_Last() + * @model + * @generated + */ + ThreadInstructionBlock getLast(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Thread#getLast Last}' reference. + * + * + * @param value the new value of the 'Last' reference. + * @see #getLast() + * @generated + */ + void setLast(ThreadInstructionBlock value); + + /** + * Returns the value of the 'Nb Cycle' attribute. + * + *

+ * If the meaning of the 'Nb Cycle' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Nb Cycle' attribute. + * @see #setNbCycle(int) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getThread_NbCycle() + * @model + * @generated + */ + int getNbCycle(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.Thread#getNbCycle Nb Cycle}' attribute. + * + * + * @param value the new value of the 'Nb Cycle' attribute. + * @see #getNbCycle() + * @generated + */ + void setNbCycle(int value); + +} // Thread diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ThreadInstructionBlock.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ThreadInstructionBlock.java new file mode 100644 index 00000000..73516cd5 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/ThreadInstructionBlock.java @@ -0,0 +1,92 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + + +/** + * + * A representation of the model object 'Thread Instruction Block'. + * + * + *

+ * The following features are supported: + *

    + *
  • {@link fr.obeo.dsl.arduino.ThreadInstructionBlock#getThread Thread}
  • + *
  • {@link fr.obeo.dsl.arduino.ThreadInstructionBlock#getNext Next}
  • + *
+ *

+ * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getThreadInstructionBlock() + * @model abstract="true" + * @generated + */ +public interface ThreadInstructionBlock extends NamedElement { + /** + * Returns the value of the 'Thread' reference. + * + *

+ * If the meaning of the 'Thread' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Thread' reference. + * @see #setThread(fr.obeo.dsl.arduino.Thread) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getThreadInstructionBlock_Thread() + * @model + * @generated + */ + fr.obeo.dsl.arduino.Thread getThread(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.ThreadInstructionBlock#getThread Thread}' reference. + * + * + * @param value the new value of the 'Thread' reference. + * @see #getThread() + * @generated + */ + void setThread(fr.obeo.dsl.arduino.Thread value); + + /** + * Returns the value of the 'Next' reference. + * + *

+ * If the meaning of the 'Next' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Next' reference. + * @see #setNext(ThreadInstructionBlock) + * @see fr.obeo.dsl.arduino.ArduinoPackage#getThreadInstructionBlock_Next() + * @model + * @generated + */ + ThreadInstructionBlock getNext(); + + /** + * Sets the value of the '{@link fr.obeo.dsl.arduino.ThreadInstructionBlock#getNext Next}' reference. + * + * + * @param value the new value of the 'Next' reference. + * @see #getNext() + * @generated + */ + void setNext(ThreadInstructionBlock value); + + /** + * + * + * @model + * @generated + */ + void execute(); + +} // ThreadInstructionBlock diff --git a/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Time.java b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Time.java new file mode 100644 index 00000000..3ea77021 --- /dev/null +++ b/dev/language_workbench_concurrency_demo/fr.obeo.dsl.arduino/src-gen/fr/obeo/dsl/arduino/Time.java @@ -0,0 +1,215 @@ +/** + * Copyright (c) 2013 Obeo. + * 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: + * Obeo - initial API and implementation + */ +package fr.obeo.dsl.arduino; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Time', + * and utility methods for working with them. + * + * @see fr.obeo.dsl.arduino.ArduinoPackage#getTime() + * @model + * @generated + */ +public enum Time implements Enumerator { + /** + * The 'Milli Second' literal object. + * + * + * @see #MILLI_SECOND_VALUE + * @generated + * @ordered + */ + MILLI_SECOND(0, "MilliSecond", "MilliSecond"), + + /** + * The 'Micro Second' literal object. + * + * + * @see #MICRO_SECOND_VALUE + * @generated + * @ordered + */ + MICRO_SECOND(0, "MicroSecond", "MicroSecond"); + + /** + * The 'Milli Second' literal value. + * + *

+ * If the meaning of 'Milli Second' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #MILLI_SECOND + * @model name="MilliSecond" + * @generated + * @ordered + */ + public static final int MILLI_SECOND_VALUE = 0; + + /** + * The 'Micro Second' literal value. + * + *

+ * If the meaning of 'Micro Second' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #MICRO_SECOND + * @model name="MicroSecond" + * @generated + * @ordered + */ + public static final int MICRO_SECOND_VALUE = 0; + + /** + * An array of all the 'Time' enumerators. + * + * + * @generated + */ + private static final Time[] VALUES_ARRAY = + new Time[] { + MILLI_SECOND, + MICRO_SECOND, + }; + + /** + * A public read-only list of all the 'Time' enumerators. + * + * + * @generated + */ + public static final List