Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #407 #416

Merged
merged 1 commit into from
Oct 26, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions bundles/org.eclipse.vorto.editor.datatype.ide/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.vorto.editor.datatype.ide
Bundle-Vendor: My Company
Bundle-Version: 0.9.0.qualifier
Bundle-SymbolicName: org.eclipse.vorto.editor.datatype.ide;singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.vorto.editor.datatype,
org.eclipse.xtext.ide,
org.eclipse.xtext.xbase.ide
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: org.eclipse.vorto.editor.datatype.ide.contentassist.antlr,
org.eclipse.vorto.editor.datatype.ide.contentassist.antlr.internal
Import-Package: org.eclipse.vorto.editor.datatype.services
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source.. = src/,\
src-gen/,\
xtend-gen/
bin.includes = .,\
META-INF/
25 changes: 25 additions & 0 deletions bundles/org.eclipse.vorto.editor.datatype.ide/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.eclipse.vorto</groupId>
<artifactId>bundles</artifactId>
<version>0.9.0-SNAPSHOT</version>
</parent>

<artifactId>org.eclipse.vorto.editor.datatype.ide</artifactId>
<packaging>eclipse-plugin</packaging>

<name>Datatype Editor Plugin IDE</name>

<build>
<plugins>
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -1,33 +1,26 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Vorto Datatype Editor Tests (Incubation)
Bundle-Vendor: Eclipse.org/Vorto
Bundle-Version: 0.9.0.qualifier
Bundle-SymbolicName: org.eclipse.vorto.editor.datatype.tests; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.vorto.editor.datatype.ui,
org.eclipse.xtext.junit4,
com.google.inject,
org.eclipse.xtend.lib,
org.eclipse.emf.common,
org.eclipse.core.runtime,
org.eclipse.ui.workbench;resolution:=optional,
org.objectweb.asm;bundle-version="[5.0.1,6.0.0)";resolution:=optional,
org.eclipse.xtext,
org.eclipse.xtext.xbase,
org.eclipse.xtext.xbase.lib,
org.eclipse.xtext.ui,
org.eclipse.vorto.core,
org.eclipse.vorto.editor.datatype
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: org.apache.log4j,
org.eclipse.xtext.formatting,
org.eclipse.xtext.junit.util;resolution:=optional,
org.hamcrest.core,
org.junit;version="4.5.0",
org.junit.runner;version="4.5.0",
org.junit.runner.manipulation;version="4.5.0",
org.junit.runner.notification;version="4.5.0",
org.junit.runners;version="4.5.0",
org.junit.runners.model;version="4.5.0"
Export-Package: org.eclipse.vorto.editor.datatype
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Vorto Datatype Editor Tests (Incubation)
Bundle-Vendor: Eclipse.org/Vorto
Bundle-Version: 0.9.0.qualifier
Bundle-SymbolicName: org.eclipse.vorto.editor.datatype.tests; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.vorto.editor.datatype.ui,
org.eclipse.xtext,
org.eclipse.xtext.junit4,
org.junit,
org.eclipse.vorto.core,
org.eclipse.vorto.editor.datatype,
org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.ui.workbench;resolution:=optional,
org.eclipse.xtext.xbase.lib
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Import-Package: org.hamcrest.core,
org.junit;version="4.5.0",
org.junit.runner;version="4.5.0",
org.junit.runner.manipulation;version="4.5.0",
org.junit.runner.notification;version="4.5.0",
org.junit.runners;version="4.5.0",
org.junit.runners.model;version="4.5.0"
Export-Package: org.eclipse.vorto.editor.datatype.tests
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
source.. = src-gen/,\
src/,\
xtend-gen/
source.. = src/,\
xtend-gen/,\
src-gen/
bin.includes = META-INF/,\
.
.,\
about.html
2 changes: 1 addition & 1 deletion bundles/org.eclipse.vorto.editor.datatype.tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<artifactId>org.eclipse.vorto.editor.datatype.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>

<name>Data Type Editor Tests</name>
<name>Vorto Data Type Editor Tests</name>

<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*******************************************************************************
* Copyright (c) 2014 Bosch Software Innovations GmbH and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v1.0 which accompany this distribution.
*
* The Eclipse Public License is available at
* http://www.eclipse.org/legal/epl-v10.html
* The Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
* Bosch Software Innovations GmbH - Please refer to git log
*
*******************************************************************************/
/*
* generated by Xtext
*/
package org.eclipse.vorto.editor.datatype.tests

import com.google.inject.Inject
import org.eclipse.vorto.core.api.model.model.Model
import org.eclipse.xtext.junit4.InjectWith
import org.eclipse.xtext.junit4.XtextRunner
import org.eclipse.xtext.junit4.util.ParseHelper
import org.junit.Assert
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith

//@RunWith(XtextRunner)
//@InjectWith(DatatypeInjectorProvider)
class DatatypeParsingTest {

@Inject ParseHelper<Model> parseHelper;

@Ignore
def void loadModel() {
val result = parseHelper.parse('''
Hello Xtext!
''')
Assert.assertNotNull(result)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package org.eclipse.vorto.editor.datatype.tests.formatter
import com.google.inject.Inject
import org.eclipse.vorto.core.api.model.datatype.Type
import org.eclipse.vorto.core.api.model.datatype.impl.DatatypePackageImpl
import org.eclipse.vorto.editor.datatype.DatatypeInjectorProvider
import org.eclipse.vorto.editor.datatype.tests.DatatypeInjectorProvider
import org.eclipse.xtext.formatting.INodeModelFormatter
import org.eclipse.xtext.junit4.AbstractXtextTests
import org.eclipse.xtext.junit4.InjectWith
Expand Down
61 changes: 31 additions & 30 deletions bundles/org.eclipse.vorto.editor.datatype.ui/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Vorto Datatype Editor UI (Incubation)
Bundle-Vendor: Eclipse.org/Vorto
Bundle-Version: 0.9.0.qualifier
Bundle-SymbolicName: org.eclipse.vorto.editor.datatype.ui; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.xtext.ui,
org.eclipse.ui.editors;bundle-version="3.5.0",
org.eclipse.ui.ide;bundle-version="3.5.0",
org.eclipse.xtext.ui.shared,
org.eclipse.ui,
org.eclipse.xtext.builder,
org.antlr.runtime,
org.eclipse.xtext.common.types.ui,
org.eclipse.xtext.ui.codetemplates.ui,
org.eclipse.compare,
org.eclipse.vorto.editor.datatype,
org.eclipse.vorto.core,
org.eclipse.xtext.xbase.lib,
org.eclipse.vorto.core.ui
Import-Package: org.apache.log4j
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: org.eclipse.vorto.editor.datatype.ui,org.eclipse.vorto
.editor.datatype.ui.contentassist,org.eclipse.vorto.editor.datatype.u
i.internal,org.eclipse.vorto.editor.datatype.ui.quickfix,org.eclipse.
vorto.editor.datatype.ui.typecreator,org.eclipse.vorto.editor.datatyp
e.ui.contentassist.antlr,org.eclipse.vorto.editor.datatype.ui.content
assist.antlr.internal
Bundle-Activator: org.eclipse.vorto.editor.datatype.ui.internal.DatatypeActivator
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Vorto Datatype Editor UI (Incubation)
Bundle-Vendor: Eclipse.org/Vorto
Bundle-Version: 0.9.0.qualifier
Bundle-SymbolicName: org.eclipse.vorto.editor.datatype.ui; singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.eclipse.xtext.ui,
org.eclipse.ui.editors;bundle-version="3.5.0",
org.eclipse.ui.ide;bundle-version="3.5.0",
org.eclipse.xtext.ui.shared,
org.eclipse.ui,
org.eclipse.xtext.builder,
org.antlr.runtime,
org.eclipse.xtext.common.types.ui,
org.eclipse.xtext.ui.codetemplates.ui,
org.eclipse.compare,
org.eclipse.vorto.editor.datatype,
org.eclipse.vorto.editor.datatype.ide,
org.eclipse.vorto.core,
org.eclipse.xtext.xbase.lib,
org.eclipse.vorto.core.ui,
org.eclipse.xtend.lib;resolution:=optional
Import-Package: org.apache.log4j
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: org.eclipse.vorto.editor.datatype.ui,
org.eclipse.vorto.editor.datatype.ui.contentassist,
org.eclipse.vorto.editor.datatype.ui.internal,
org.eclipse.vorto.editor.datatype.ui.quickfix,
org.eclipse.vorto.editor.datatype.ui.typecreator
Bundle-Activator: org.eclipse.vorto.editor.datatype.ui.internal.DatatypeActivator
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
/**
/**
* Copyright (c) 2015-2016 Bosch Software Innovations GmbH and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v1.0 which accompany this distribution.
*
* The Eclipse Public License is available at
* http://www.eclipse.org/legal/epl-v10.html
* The Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
* Bosch Software Innovations GmbH - Please refer to git log
*/
package
/*
* generated by Xtext
*/
package org.eclipse.vorto.editor.datatype.ui;
org.eclipse.vorto.editor.datatype.ui

import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.ui.plugin.AbstractUIPlugin

/**
/**
* Use this class to register components to be used within the IDE.
*/
public class DatatypeUiModule extends
org.eclipse.vorto.editor.datatype.ui.AbstractDatatypeUiModule {
public DatatypeUiModule(AbstractUIPlugin plugin) {
super(plugin);
class DatatypeUiModule extends org.eclipse.vorto.editor.datatype.ui.AbstractDatatypeUiModule {
new(AbstractUIPlugin plugin) {
super(plugin)
}
}
Original file line number Diff line number Diff line change
@@ -1,41 +1,37 @@
/**
/**
* Copyright (c) 2015-2016 Bosch Software Innovations GmbH and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* and Eclipse Distribution License v1.0 which accompany this distribution.
*
* The Eclipse Public License is available at
* http://www.eclipse.org/legal/epl-v10.html
* The Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
* Bosch Software Innovations GmbH - Please refer to git log
*/
package org.eclipse.vorto.editor.datatype.ui.typecreator;
package org.eclipse.vorto.editor.datatype.ui.typecreator

public class TypeTemplate {
class TypeTemplate {
String name
String datatype

private String name;
private String datatype;

public TypeTemplate(String type, String name) {
this.datatype = type;
this.name = name;
new(String type, String name) {
this.datatype = type
this.name = name
}

public String getTemplate() {
StringBuilder a = new StringBuilder();
a.append("namespace");
a.append(" com.mycompany");
a.append("\n");
a.append("version");
a.append(" 1.0.0");
a.append("\n");
a.append(datatype).append(" ").append(name).append('{');
a.append("\n");
a.append("}");
return a.toString();
def String getTemplate() {
var StringBuilder a = new StringBuilder()
a.append("namespace")
a.append(" com.mycompany")
a.append("\n")
a.append("version")
a.append(" 1.0.0")
a.append("\n")
a.append(datatype).append(" ").append(name).append(Character.valueOf('{').charValue)
a.append("\n")
a.append("}")
return a.toString()
}

}
}
1 change: 1 addition & 0 deletions bundles/org.eclipse.vorto.editor.datatype.web/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/WebRoot/
Loading