initial release candidate

parents
*.class
bin/
.DS_Store
.checkstyle
.svn/
xtend-gen/
.metadata/
target/
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>teetime-plugins</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
## How to use:
Import all projects into eclipse, right-click on teetime.configuration.dsl/plugin.xml
and then Run as -> Eclipse Application.
In the new eclipse instance, create a new project, than a new file with .config ending and you are ready to go.
example:
de.dsl.evaluation EvalConfiguration(File input, File output, String password){
//imports
import java.io.File
import teetime.stage.ZipByteArray.ZipMode
import teetime.stage.io.File2ByteArray
import teetime.stage.CipherStage.CipherMode
//stages
InitialElementProducer<File> init(input)
File2ByteArray f2b
active CipherStage enc(password, CipherMode.ENCRYPT)
ZipByteArray comp(ZipMode.COMP)
ZipByteArray decomp(ZipMode.DECOMP)
active teetime.stage.CipherStage decrypt(password, CipherMode.DECRYPT)
teetime.stage.io.ByteArrayFileWriter writer(output)
//connections
init.asd->enc.sfd
comp->decrypt->enc
f2b->enc
decomp->writer->enc
f2b->init
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry combineaccessrules="false" kind="src" path="/de.cau.se.teetime.configuration.dsl"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>de.cau.se.teetime.configuration.dsl.ide</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
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
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: teetime.configuration.dsl.ide
Bundle-Vendor: SE Kiel University
Bundle-Version: 0.1.0.qualifier
Bundle-SymbolicName: de.cau.se.teetime.configuration.dsl.ide;singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.xtext.ide,
org.eclipse.xtext.xbase.ide,
de.cau.se.teetime.configuration.dsl;bundle-version="0.1.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: de.cau.se.teetime.configuration.dsl.ide.contentassist.antlr,
de.cau.se.teetime.configuration.dsl.ide.contentassist.antlr.internal
Import-Package: de.cau.se.teetime.configuration.dsl.services
source.. = src/,\
src-gen/,\
xtend-gen/
bin.includes = .,\
META-INF/
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>de.cau.se.teetime</groupId>
<artifactId>bundles</artifactId>
<version>0.1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>de.cau.se.teetime</groupId>
<artifactId>de.cau.se.teetime.configuration.dsl.ide</artifactId>
<packaging>eclipse-plugin</packaging>
<version>0.1.0-SNAPSHOT</version>
</project>
\ No newline at end of file
/*
* generated by Xtext 2.9.2
*/
package de.cau.se.teetime.configuration.dsl.ide.contentassist.antlr;
import com.google.inject.Inject;
import de.cau.se.teetime.configuration.dsl.ide.contentassist.antlr.internal.InternalConfigParser;
import de.cau.se.teetime.configuration.dsl.services.ConfigGrammarAccess;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import org.antlr.runtime.RecognitionException;
import org.eclipse.xtext.AbstractElement;
import org.eclipse.xtext.ide.editor.contentassist.antlr.AbstractContentAssistParser;
import org.eclipse.xtext.ide.editor.contentassist.antlr.FollowElement;
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
public class ConfigParser extends AbstractContentAssistParser {
@Inject
private ConfigGrammarAccess grammarAccess;
private Map<AbstractElement, String> nameMappings;
@Override
protected InternalConfigParser createParser() {
InternalConfigParser result = new InternalConfigParser(null);
result.setGrammarAccess(grammarAccess);
return result;
}
@Override
protected String getRuleName(AbstractElement element) {
if (nameMappings == null) {
nameMappings = new HashMap<AbstractElement, String>() {
private static final long serialVersionUID = 1L;
{
put(grammarAccess.getConfigurationElementAccess().getAlternatives(), "rule__ConfigurationElement__Alternatives");
put(grammarAccess.getConfigurationAccess().getGroup(), "rule__Configuration__Group__0");
put(grammarAccess.getStageAccess().getGroup(), "rule__Stage__Group__0");
put(grammarAccess.getImportDeclarationAccess().getGroup(), "rule__ImportDeclaration__Group__0");
put(grammarAccess.getStageQualifierAccess().getGroup(), "rule__StageQualifier__Group__0");
put(grammarAccess.getStageQualifierAccess().getGroup_1(), "rule__StageQualifier__Group_1__0");
put(grammarAccess.getConnectionAccess().getGroup(), "rule__Connection__Group__0");
put(grammarAccess.getConnectionAccess().getGroup_1(), "rule__Connection__Group_1__0");
put(grammarAccess.getQualifiedNameAccess().getGroup(), "rule__QualifiedName__Group__0");
put(grammarAccess.getQualifiedNameAccess().getGroup_1(), "rule__QualifiedName__Group_1__0");
put(grammarAccess.getQualifiedNameListAccess().getGroup(), "rule__QualifiedNameList__Group__0");
put(grammarAccess.getQualifiedNameListAccess().getGroup_1(), "rule__QualifiedNameList__Group_1__0");
put(grammarAccess.getArgumentDeclarationListAccess().getGroup(), "rule__ArgumentDeclarationList__Group__0");
put(grammarAccess.getArgumentDeclarationListAccess().getGroup_1(), "rule__ArgumentDeclarationList__Group_1__0");
put(grammarAccess.getArgumentDeclarationAccess().getGroup(), "rule__ArgumentDeclaration__Group__0");
put(grammarAccess.getParameterAccess().getGroup(), "rule__Parameter__Group__0");
put(grammarAccess.getConfigurationAccess().getImportsAssignment_0(), "rule__Configuration__ImportsAssignment_0");
put(grammarAccess.getConfigurationAccess().getPackageAssignment_1(), "rule__Configuration__PackageAssignment_1");
put(grammarAccess.getConfigurationAccess().getTypeAssignment_2(), "rule__Configuration__TypeAssignment_2");
put(grammarAccess.getConfigurationAccess().getArgumentListAssignment_4(), "rule__Configuration__ArgumentListAssignment_4");
put(grammarAccess.getConfigurationAccess().getElementsAssignment_7(), "rule__Configuration__ElementsAssignment_7");
put(grammarAccess.getStageAccess().getPrivateAssignment_0_0(), "rule__Stage__PrivateAssignment_0_0");
put(grammarAccess.getStageAccess().getActiveAssignment_0_1(), "rule__Stage__ActiveAssignment_0_1");
put(grammarAccess.getStageAccess().getTypeAssignment_1(), "rule__Stage__TypeAssignment_1");
put(grammarAccess.getStageAccess().getParameterAssignment_2(), "rule__Stage__ParameterAssignment_2");
put(grammarAccess.getStageAccess().getNameAssignment_3(), "rule__Stage__NameAssignment_3");
put(grammarAccess.getStageAccess().getArgumentListAssignment_5(), "rule__Stage__ArgumentListAssignment_5");
put(grammarAccess.getImportDeclarationAccess().getImportedNamespaceAssignment_1(), "rule__ImportDeclaration__ImportedNamespaceAssignment_1");
put(grammarAccess.getStageQualifierAccess().getStageIdAssignment_0(), "rule__StageQualifier__StageIdAssignment_0");
put(grammarAccess.getStageQualifierAccess().getOutputPortIdAssignment_1_1(), "rule__StageQualifier__OutputPortIdAssignment_1_1");
put(grammarAccess.getConnectionAccess().getStartStageAssignment_0(), "rule__Connection__StartStageAssignment_0");
put(grammarAccess.getConnectionAccess().getMiddleStagesAssignment_1_1(), "rule__Connection__MiddleStagesAssignment_1_1");
put(grammarAccess.getConnectionAccess().getFinalStageAssignment_3(), "rule__Connection__FinalStageAssignment_3");
put(grammarAccess.getQualifiedNameListAccess().getName1Assignment_0(), "rule__QualifiedNameList__Name1Assignment_0");
put(grammarAccess.getQualifiedNameListAccess().getOthernamesAssignment_1_1(), "rule__QualifiedNameList__OthernamesAssignment_1_1");
put(grammarAccess.getArgumentDeclarationListAccess().getArg1Assignment_0(), "rule__ArgumentDeclarationList__Arg1Assignment_0");
put(grammarAccess.getArgumentDeclarationListAccess().getOtherargsAssignment_1_1(), "rule__ArgumentDeclarationList__OtherargsAssignment_1_1");
put(grammarAccess.getArgumentDeclarationAccess().getQualifiednameAssignment_0(), "rule__ArgumentDeclaration__QualifiednameAssignment_0");
put(grammarAccess.getArgumentDeclarationAccess().getIdAssignment_1(), "rule__ArgumentDeclaration__IdAssignment_1");
put(grammarAccess.getParameterAccess().getQualifiedNameListAssignment_1(), "rule__Parameter__QualifiedNameListAssignment_1");
put(grammarAccess.getStageAccess().getUnorderedGroup_0(), "rule__Stage__UnorderedGroup_0");
}
};
}
return nameMappings.get(element);
}
@Override
protected Collection<FollowElement> getFollowElements(AbstractInternalContentAssistParser parser) {
try {
InternalConfigParser typedParser = (InternalConfigParser) parser;
typedParser.entryRuleConfiguration();
return typedParser.getFollowElements();
} catch(RecognitionException ex) {
throw new RuntimeException(ex);
}
}
@Override
protected String[] getInitialHiddenTokens() {
return new String[] { "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT" };
}
public ConfigGrammarAccess getGrammarAccess() {
return this.grammarAccess;
}
public void setGrammarAccess(ConfigGrammarAccess grammarAccess) {
this.grammarAccess = grammarAccess;
}
}
/*
* generated by Xtext 2.9.2
*/
package de.cau.se.teetime.configuration.dsl.ide.contentassist.antlr;
import java.util.Collection;
import java.util.Collections;
import org.eclipse.xtext.AbstractRule;
import org.eclipse.xtext.ide.editor.contentassist.antlr.FollowElement;
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
import org.eclipse.xtext.ide.editor.partialEditing.IPartialEditingContentAssistParser;
import org.eclipse.xtext.util.PolymorphicDispatcher;
public class PartialConfigContentAssistParser extends ConfigParser implements IPartialEditingContentAssistParser {
private AbstractRule rule;
@Override
public void initializeFor(AbstractRule rule) {
this.rule = rule;
}
@Override
protected Collection<FollowElement> getFollowElements(AbstractInternalContentAssistParser parser) {
if (rule == null || rule.eIsProxy())
return Collections.emptyList();
String methodName = "entryRule" + rule.getName();
PolymorphicDispatcher<Collection<FollowElement>> dispatcher =
new PolymorphicDispatcher<Collection<FollowElement>>(methodName, 0, 0, Collections.singletonList(parser));
dispatcher.invoke();
return parser.getFollowElements();
}
}
'('=11
')'=12
','=19
'->'=18
'.'=17
';'=16
'<'=20
'>'=21
'active'=23
'import'=15
'private'=22
'{'=13
'}'=14
RULE_ANY_OTHER=10
RULE_ID=4
RULE_INT=5
RULE_ML_COMMENT=7
RULE_SL_COMMENT=8
RULE_STRING=6
RULE_WS=9
T__11=11
T__12=12
T__13=13
T__14=14
T__15=15
T__16=16
T__17=17
T__18=18
T__19=19
T__20=20
T__21=21
T__22=22
T__23=23
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="xtend-gen"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry combineaccessrules="false" kind="src" path="/de.cau.se.teetime.configuration.dsl"/>
<classpathentry kind="output" path="bin"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>de.cau.se.teetime.configuration.dsl.ui</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
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
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: teetime.configuration.dsl.ui
Bundle-Vendor: SE Kiel University
Bundle-Version: 0.1.0.qualifier
Bundle-SymbolicName: de.cau.se.teetime.configuration.dsl.ui;singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: de.cau.se.teetime.configuration.dsl,
de.cau.se.teetime.configuration.dsl.ide,
org.eclipse.xtext.ui,
org.eclipse.xtext.ui.shared,
org.eclipse.xtext.ui.codetemplates.ui,
org.eclipse.ui.editors;bundle-version="3.5.0",
org.eclipse.ui.ide;bundle-version="3.5.0",
org.eclipse.ui,
org.eclipse.compare,
org.eclipse.xtext.builder,
org.eclipse.xtend.lib;resolution:=optional,
org.eclipse.xtext.xbase.lib,
org.eclipse.jdt.ui;bundle-version="3.11.2",
org.eclipse.jdt.core;bundle-version="3.11.0"
Import-Package: org.apache.log4j
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: de.cau.se.teetime.configuration.dsl.ui.contentassist,
de.cau.se.teetime.configuration.dsl.ui.quickfix,
de.cau.se.teetime.configuration.dsl.ui.internal
Bundle-Activator: de.cau.se.teetime.configuration.dsl.ui.internal.DslActivator
source.. = src/,\
src-gen/,\
xtend-gen/
bin.includes = .,\
META-INF/,\
plugin.xml
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>de.cau.se.teetime</groupId>
<artifactId>bundles</artifactId>
<version>0.1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>de.cau.se.teetime</groupId>
<artifactId>de.cau.se.teetime.configuration.dsl.ui</artifactId>
<packaging>eclipse-plugin</packaging>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<!-- Generate Xtend code. -->
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
<version>${xtend.compiler.version}</version>
</plugin>
</plugins>
</build>
<version>0.1.0-SNAPSHOT</version>
</project>
\ No newline at end of file
/*
* generated by Xtext 2.9.2
*/
package de.cau.se.teetime.configuration.dsl.ui;
import com.google.inject.Injector;
import de.cau.se.teetime.configuration.dsl.ui.internal.DslActivator;
import org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory;
import org.osgi.framework.Bundle;
/**
* This class was generated. Customizations should only happen in a newly
* introduced subclass.
*/
public class ConfigExecutableExtensionFactory extends AbstractGuiceAwareExecutableExtensionFactory {
@Override
protected Bundle getBundle() {
return DslActivator.getInstance().getBundle();
}
@Override
protected Injector getInjector() {
return DslActivator.getInstance().getInjector(DslActivator.DE_CAU_SE_TEETIME_CONFIGURATION_DSL_CONFIG);
}
}
package de.cau.se.teetime.configuration.dsl.ui;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.text.IDocument;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.handlers.IHandlerService;
import org.eclipse.xtext.resource.XtextResource;
import org.eclipse.xtext.ui.editor.model.XtextDocumentProvider;
public class ConfigDocumentProvider extends XtextDocumentProvider {
private static final String SYNTHESIZE_DIAGRAM = "de.cau.se.teetime.configuration.viz.openConfigurationDiagram";
@Override
protected void doSaveDocument(IProgressMonitor monitor, Object element, IDocument document, boolean overwrite)
throws CoreException {
showDiagram();
// save
super.doSaveDocument(monitor, element, document, overwrite);
}
// @Override
// protected void loadResource(XtextResource resource, String document, String encoding) throws CoreException {
// System.err.println("LOOOAD");
// super.loadResource(resource, document, encoding);
//// showDiagram();
// }
private void showDiagram() {
IHandlerService service = (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class);
try {
service.executeCommand(SYNTHESIZE_DIAGRAM, null);
} catch (Exception e) {
// Viz plugin missing, do nothing
}
}
}
\ No newline at end of file
/*
* generated by Xtext 2.9.2
*/
package de.cau.se.teetime.configuration.dsl.ui
import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor
import org.eclipse.xtext.ui.editor.model.XtextDocumentProvider
/**
* Use this class to register components to be used within the Eclipse IDE.
*/
@FinalFieldsConstructor
class ConfigUiModule extends de.cau.se.teetime.configuration.dsl.ui.AbstractConfigUiModule {
def Class<? extends XtextDocumentProvider> bindDocumentProvider() {
return ConfigDocumentProvider;
}
}
/*
* generated by Xtext 2.9.2
*/
package de.cau.se.teetime.configuration.dsl.ui.contentassist
/**
* See https://www.eclipse.org/Xtext/documentation/304_ide_concepts.html#content-assist
* on how to customize the content assistant.
*/
class ConfigProposalProvider extends AbstractConfigProposalProvider {
}
/*
* generated by Xtext 2.9.2
*/
package de.cau.se.teetime.configuration.dsl.ui.outline
import org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider