Skip to content

Commit 21cb5ce

Browse files
committed
Fixes #407
Signed-off-by: shiv12095 <[email protected]>
1 parent 2fe4a67 commit 21cb5ce

File tree

36 files changed

+1026
-341
lines changed

36 files changed

+1026
-341
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Manifest-Version: 1.0
2+
Bundle-ManifestVersion: 2
3+
Bundle-Name: org.eclipse.vorto.editor.datatype.ide
4+
Bundle-Vendor: My Company
5+
Bundle-Version: 0.9.0.qualifier
6+
Bundle-SymbolicName: org.eclipse.vorto.editor.datatype.ide;singleton:=true
7+
Bundle-ActivationPolicy: lazy
8+
Require-Bundle: org.eclipse.vorto.editor.datatype,
9+
org.eclipse.xtext.ide,
10+
org.eclipse.xtext.xbase.ide
11+
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
12+
Export-Package: org.eclipse.vorto.editor.datatype.ide.contentassist.antlr,
13+
org.eclipse.vorto.editor.datatype.ide.contentassist.antlr.internal
14+
Import-Package: org.eclipse.vorto.editor.datatype.services
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
source.. = src/,\
2+
src-gen/,\
3+
xtend-gen/
4+
bin.includes = .,\
5+
META-INF/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<parent>
6+
<groupId>org.eclipse.vorto</groupId>
7+
<artifactId>bundles</artifactId>
8+
<version>0.9.0-SNAPSHOT</version>
9+
</parent>
10+
11+
<artifactId>org.eclipse.vorto.editor.datatype.ide</artifactId>
12+
<packaging>eclipse-plugin</packaging>
13+
14+
<name>Datatype Editor Plugin IDE</name>
15+
16+
<build>
17+
<plugins>
18+
<plugin>
19+
<groupId>org.eclipse.xtend</groupId>
20+
<artifactId>xtend-maven-plugin</artifactId>
21+
</plugin>
22+
</plugins>
23+
</build>
24+
25+
</project>
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,26 @@
1-
Manifest-Version: 1.0
2-
Bundle-ManifestVersion: 2
3-
Bundle-Name: Vorto Datatype Editor Tests (Incubation)
4-
Bundle-Vendor: Eclipse.org/Vorto
5-
Bundle-Version: 0.9.0.qualifier
6-
Bundle-SymbolicName: org.eclipse.vorto.editor.datatype.tests; singleton:=true
7-
Bundle-ActivationPolicy: lazy
8-
Require-Bundle: org.eclipse.vorto.editor.datatype.ui,
9-
org.eclipse.xtext.junit4,
10-
com.google.inject,
11-
org.eclipse.xtend.lib,
12-
org.eclipse.emf.common,
13-
org.eclipse.core.runtime,
14-
org.eclipse.ui.workbench;resolution:=optional,
15-
org.objectweb.asm;bundle-version="[5.0.1,6.0.0)";resolution:=optional,
16-
org.eclipse.xtext,
17-
org.eclipse.xtext.xbase,
18-
org.eclipse.xtext.xbase.lib,
19-
org.eclipse.xtext.ui,
20-
org.eclipse.vorto.core,
21-
org.eclipse.vorto.editor.datatype
22-
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
23-
Import-Package: org.apache.log4j,
24-
org.eclipse.xtext.formatting,
25-
org.eclipse.xtext.junit.util;resolution:=optional,
26-
org.hamcrest.core,
27-
org.junit;version="4.5.0",
28-
org.junit.runner;version="4.5.0",
29-
org.junit.runner.manipulation;version="4.5.0",
30-
org.junit.runner.notification;version="4.5.0",
31-
org.junit.runners;version="4.5.0",
32-
org.junit.runners.model;version="4.5.0"
33-
Export-Package: org.eclipse.vorto.editor.datatype
1+
Manifest-Version: 1.0
2+
Bundle-ManifestVersion: 2
3+
Bundle-Name: Vorto Datatype Editor Tests (Incubation)
4+
Bundle-Vendor: Eclipse.org/Vorto
5+
Bundle-Version: 0.9.0.qualifier
6+
Bundle-SymbolicName: org.eclipse.vorto.editor.datatype.tests; singleton:=true
7+
Bundle-ActivationPolicy: lazy
8+
Require-Bundle: org.eclipse.vorto.editor.datatype.ui,
9+
org.eclipse.xtext,
10+
org.eclipse.xtext.junit4,
11+
org.junit,
12+
org.eclipse.vorto.core,
13+
org.eclipse.vorto.editor.datatype,
14+
org.eclipse.ui,
15+
org.eclipse.core.runtime,
16+
org.eclipse.ui.workbench;resolution:=optional,
17+
org.eclipse.xtext.xbase.lib
18+
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
19+
Import-Package: org.hamcrest.core,
20+
org.junit;version="4.5.0",
21+
org.junit.runner;version="4.5.0",
22+
org.junit.runner.manipulation;version="4.5.0",
23+
org.junit.runner.notification;version="4.5.0",
24+
org.junit.runners;version="4.5.0",
25+
org.junit.runners.model;version="4.5.0"
26+
Export-Package: org.eclipse.vorto.editor.datatype.tests
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
source.. = src-gen/,\
2-
src/,\
3-
xtend-gen/
1+
source.. = src/,\
2+
xtend-gen/,\
3+
src-gen/
44
bin.includes = META-INF/,\
5-
.
5+
.,\
6+
about.html

bundles/org.eclipse.vorto.editor.datatype.tests/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<artifactId>org.eclipse.vorto.editor.datatype.tests</artifactId>
1111
<packaging>eclipse-test-plugin</packaging>
1212

13-
<name>Data Type Editor Tests</name>
13+
<name>Vorto Data Type Editor Tests</name>
1414

1515
<build>
1616
<plugins>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2014 Bosch Software Innovations GmbH and others.
3+
* All rights reserved. This program and the accompanying materials
4+
* are made available under the terms of the Eclipse Public License v1.0
5+
* and Eclipse Distribution License v1.0 which accompany this distribution.
6+
*
7+
* The Eclipse Public License is available at
8+
* http://www.eclipse.org/legal/epl-v10.html
9+
* The Eclipse Distribution License is available at
10+
* http://www.eclipse.org/org/documents/edl-v10.php.
11+
*
12+
* Contributors:
13+
* Bosch Software Innovations GmbH - Please refer to git log
14+
*
15+
*******************************************************************************/
16+
/*
17+
* generated by Xtext
18+
*/
19+
package org.eclipse.vorto.editor.datatype.tests
20+
21+
import com.google.inject.Inject
22+
import org.eclipse.vorto.core.api.model.model.Model
23+
import org.eclipse.xtext.junit4.InjectWith
24+
import org.eclipse.xtext.junit4.XtextRunner
25+
import org.eclipse.xtext.junit4.util.ParseHelper
26+
import org.junit.Assert
27+
import org.junit.Ignore
28+
import org.junit.Test
29+
import org.junit.runner.RunWith
30+
31+
//@RunWith(XtextRunner)
32+
//@InjectWith(DatatypeInjectorProvider)
33+
class DatatypeParsingTest {
34+
35+
@Inject ParseHelper<Model> parseHelper;
36+
37+
@Ignore
38+
def void loadModel() {
39+
val result = parseHelper.parse('''
40+
Hello Xtext!
41+
''')
42+
Assert.assertNotNull(result)
43+
}
44+
45+
}

bundles/org.eclipse.vorto.editor.datatype.tests/src/org/eclipse/vorto/editor/datatype/tests/formatter/DatatypeModelFormatterTest.xtend

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package org.eclipse.vorto.editor.datatype.tests.formatter
1818
import com.google.inject.Inject
1919
import org.eclipse.vorto.core.api.model.datatype.Type
2020
import org.eclipse.vorto.core.api.model.datatype.impl.DatatypePackageImpl
21-
import org.eclipse.vorto.editor.datatype.DatatypeInjectorProvider
21+
import org.eclipse.vorto.editor.datatype.tests.DatatypeInjectorProvider
2222
import org.eclipse.xtext.formatting.INodeModelFormatter
2323
import org.eclipse.xtext.junit4.AbstractXtextTests
2424
import org.eclipse.xtext.junit4.InjectWith
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
1-
Manifest-Version: 1.0
2-
Bundle-ManifestVersion: 2
3-
Bundle-Name: Vorto Datatype Editor UI (Incubation)
4-
Bundle-Vendor: Eclipse.org/Vorto
5-
Bundle-Version: 0.9.0.qualifier
6-
Bundle-SymbolicName: org.eclipse.vorto.editor.datatype.ui; singleton:=true
7-
Bundle-ActivationPolicy: lazy
8-
Require-Bundle: org.eclipse.xtext.ui,
9-
org.eclipse.ui.editors;bundle-version="3.5.0",
10-
org.eclipse.ui.ide;bundle-version="3.5.0",
11-
org.eclipse.xtext.ui.shared,
12-
org.eclipse.ui,
13-
org.eclipse.xtext.builder,
14-
org.antlr.runtime,
15-
org.eclipse.xtext.common.types.ui,
16-
org.eclipse.xtext.ui.codetemplates.ui,
17-
org.eclipse.compare,
18-
org.eclipse.vorto.editor.datatype,
19-
org.eclipse.vorto.core,
20-
org.eclipse.xtext.xbase.lib,
21-
org.eclipse.vorto.core.ui
22-
Import-Package: org.apache.log4j
23-
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
24-
Export-Package: org.eclipse.vorto.editor.datatype.ui,org.eclipse.vorto
25-
.editor.datatype.ui.contentassist,org.eclipse.vorto.editor.datatype.u
26-
i.internal,org.eclipse.vorto.editor.datatype.ui.quickfix,org.eclipse.
27-
vorto.editor.datatype.ui.typecreator,org.eclipse.vorto.editor.datatyp
28-
e.ui.contentassist.antlr,org.eclipse.vorto.editor.datatype.ui.content
29-
assist.antlr.internal
30-
Bundle-Activator: org.eclipse.vorto.editor.datatype.ui.internal.DatatypeActivator
1+
Manifest-Version: 1.0
2+
Bundle-ManifestVersion: 2
3+
Bundle-Name: Vorto Datatype Editor UI (Incubation)
4+
Bundle-Vendor: Eclipse.org/Vorto
5+
Bundle-Version: 0.9.0.qualifier
6+
Bundle-SymbolicName: org.eclipse.vorto.editor.datatype.ui; singleton:=true
7+
Bundle-ActivationPolicy: lazy
8+
Require-Bundle: org.eclipse.xtext.ui,
9+
org.eclipse.ui.editors;bundle-version="3.5.0",
10+
org.eclipse.ui.ide;bundle-version="3.5.0",
11+
org.eclipse.xtext.ui.shared,
12+
org.eclipse.ui,
13+
org.eclipse.xtext.builder,
14+
org.antlr.runtime,
15+
org.eclipse.xtext.common.types.ui,
16+
org.eclipse.xtext.ui.codetemplates.ui,
17+
org.eclipse.compare,
18+
org.eclipse.vorto.editor.datatype,
19+
org.eclipse.vorto.editor.datatype.ide,
20+
org.eclipse.vorto.core,
21+
org.eclipse.xtext.xbase.lib,
22+
org.eclipse.vorto.core.ui,
23+
org.eclipse.xtend.lib;resolution:=optional
24+
Import-Package: org.apache.log4j
25+
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
26+
Export-Package: org.eclipse.vorto.editor.datatype.ui,
27+
org.eclipse.vorto.editor.datatype.ui.contentassist,
28+
org.eclipse.vorto.editor.datatype.ui.internal,
29+
org.eclipse.vorto.editor.datatype.ui.quickfix,
30+
org.eclipse.vorto.editor.datatype.ui.typecreator
31+
Bundle-Activator: org.eclipse.vorto.editor.datatype.ui.internal.DatatypeActivator
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
1-
/**
1+
/**
22
* Copyright (c) 2015-2016 Bosch Software Innovations GmbH and others.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* and Eclipse Distribution License v1.0 which accompany this distribution.
6-
*
76
* The Eclipse Public License is available at
87
* http://www.eclipse.org/legal/epl-v10.html
98
* The Eclipse Distribution License is available at
109
* http://www.eclipse.org/org/documents/edl-v10.php.
11-
*
1210
* Contributors:
1311
* Bosch Software Innovations GmbH - Please refer to git log
1412
*/
13+
package
1514
/*
1615
* generated by Xtext
1716
*/
18-
package org.eclipse.vorto.editor.datatype.ui;
17+
org.eclipse.vorto.editor.datatype.ui
1918

20-
import org.eclipse.ui.plugin.AbstractUIPlugin;
19+
import org.eclipse.ui.plugin.AbstractUIPlugin
2120

22-
/**
21+
/**
2322
* Use this class to register components to be used within the IDE.
2423
*/
25-
public class DatatypeUiModule extends
26-
org.eclipse.vorto.editor.datatype.ui.AbstractDatatypeUiModule {
27-
public DatatypeUiModule(AbstractUIPlugin plugin) {
28-
super(plugin);
24+
class DatatypeUiModule extends org.eclipse.vorto.editor.datatype.ui.AbstractDatatypeUiModule {
25+
new(AbstractUIPlugin plugin) {
26+
super(plugin)
2927
}
3028
}
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,37 @@
1-
/**
1+
/**
22
* Copyright (c) 2015-2016 Bosch Software Innovations GmbH and others.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* and Eclipse Distribution License v1.0 which accompany this distribution.
6-
*
76
* The Eclipse Public License is available at
87
* http://www.eclipse.org/legal/epl-v10.html
98
* The Eclipse Distribution License is available at
109
* http://www.eclipse.org/org/documents/edl-v10.php.
11-
*
1210
* Contributors:
1311
* Bosch Software Innovations GmbH - Please refer to git log
1412
*/
15-
package org.eclipse.vorto.editor.datatype.ui.typecreator;
13+
package org.eclipse.vorto.editor.datatype.ui.typecreator
1614

17-
public class TypeTemplate {
15+
class TypeTemplate {
16+
String name
17+
String datatype
1818

19-
private String name;
20-
private String datatype;
21-
22-
public TypeTemplate(String type, String name) {
23-
this.datatype = type;
24-
this.name = name;
19+
new(String type, String name) {
20+
this.datatype = type
21+
this.name = name
2522
}
2623

27-
public String getTemplate() {
28-
StringBuilder a = new StringBuilder();
29-
a.append("namespace");
30-
a.append(" com.mycompany");
31-
a.append("\n");
32-
a.append("version");
33-
a.append(" 1.0.0");
34-
a.append("\n");
35-
a.append(datatype).append(" ").append(name).append('{');
36-
a.append("\n");
37-
a.append("}");
38-
return a.toString();
24+
def String getTemplate() {
25+
var StringBuilder a = new StringBuilder()
26+
a.append("namespace")
27+
a.append(" com.mycompany")
28+
a.append("\n")
29+
a.append("version")
30+
a.append(" 1.0.0")
31+
a.append("\n")
32+
a.append(datatype).append(" ").append(name).append(Character.valueOf('{').charValue)
33+
a.append("\n")
34+
a.append("}")
35+
return a.toString()
3936
}
40-
41-
}
37+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/WebRoot/

0 commit comments

Comments
 (0)