Skip to content

Commit 30d1d98

Browse files
committed
Add the skelethon for the ros2 package DSL
1 parent 0dba9b7 commit 30d1d98

File tree

71 files changed

+91686
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+91686
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="src" path="src-gen"/>
5+
<classpathentry kind="src" path="xtend-gen"/>
6+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/>
7+
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
8+
<classpathentry kind="output" path="bin"/>
9+
</classpath>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>de.fraunhofer.ipa.ros2.xtext.ide</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.jdt.core.javabuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.pde.ManifestBuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
<buildCommand>
24+
<name>org.eclipse.pde.SchemaBuilder</name>
25+
<arguments>
26+
</arguments>
27+
</buildCommand>
28+
</buildSpec>
29+
<natures>
30+
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
31+
<nature>org.eclipse.jdt.core.javanature</nature>
32+
<nature>org.eclipse.pde.PluginNature</nature>
33+
</natures>
34+
</projectDescription>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
encoding/<project>=UTF-8
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
4+
org.eclipse.jdt.core.compiler.compliance=11
5+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6+
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
7+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
8+
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
9+
org.eclipse.jdt.core.compiler.release=enabled
10+
org.eclipse.jdt.core.compiler.source=11
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Manifest-Version: 1.0
2+
Automatic-Module-Name: de.fraunhofer.ipa.ros2.xtext.ide
3+
Bundle-ManifestVersion: 2
4+
Bundle-Name: de.fraunhofer.ipa.ros2.xtext.ide
5+
Bundle-Vendor: My Company
6+
Bundle-Version: 1.0.0.qualifier
7+
Bundle-SymbolicName: de.fraunhofer.ipa.ros2.xtext.ide; singleton:=true
8+
Bundle-ActivationPolicy: lazy
9+
Require-Bundle: de.fraunhofer.ipa.ros2.xtext,
10+
de.fraunhofer.ipa.ros,
11+
org.eclipse.xtext.ide,
12+
org.eclipse.xtext.xbase.ide,
13+
org.antlr.runtime;bundle-version="[3.2.0,3.2.1)",
14+
de.fraunhofer.ipa.ros.xtext;bundle-version="2.0.0",
15+
de.fraunhofer.ipa.ros.xtext.ui;bundle-version="2.0.0"
16+
Bundle-RequiredExecutionEnvironment: JavaSE-11
17+
Export-Package: de.fraunhofer.ipa.ros2.ide.contentassist.antlr.internal,
18+
de.fraunhofer.ipa.ros2.ide.contentassist.antlr,
19+
de.fraunhofer.ipa.ros2.ide.contentassist.antlr.lexer
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source.. = src/,\
2+
src-gen/,\
3+
xtend-gen/
4+
bin.includes = .,\
5+
META-INF/
6+
bin.excludes = **/*.xtend
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
de.fraunhofer.ipa.ros2.ide.Ros2IdeSetup
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/*
2+
* generated by Xtext 2.25.0
3+
*/
4+
package de.fraunhofer.ipa.ros2.ide;
5+
6+
import com.google.inject.Binder;
7+
import com.google.inject.name.Names;
8+
import de.fraunhofer.ipa.ros2.ide.contentassist.antlr.Ros2Parser;
9+
import de.fraunhofer.ipa.ros2.ide.contentassist.antlr.lexer.InternalRos2Lexer;
10+
import org.eclipse.xtext.ide.DefaultIdeModule;
11+
import org.eclipse.xtext.ide.LexerIdeBindings;
12+
import org.eclipse.xtext.ide.editor.contentassist.CompletionPrefixProvider;
13+
import org.eclipse.xtext.ide.editor.contentassist.FQNPrefixMatcher;
14+
import org.eclipse.xtext.ide.editor.contentassist.IPrefixMatcher;
15+
import org.eclipse.xtext.ide.editor.contentassist.IProposalConflictHelper;
16+
import org.eclipse.xtext.ide.editor.contentassist.IndentationAwareCompletionPrefixProvider;
17+
import org.eclipse.xtext.ide.editor.contentassist.antlr.AntlrProposalConflictHelper;
18+
import org.eclipse.xtext.ide.editor.contentassist.antlr.IContentAssistParser;
19+
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.Lexer;
20+
import org.eclipse.xtext.ide.refactoring.IRenameStrategy2;
21+
import org.eclipse.xtext.ide.server.rename.IRenameService2;
22+
import org.eclipse.xtext.ide.server.rename.RenameService2;
23+
24+
/**
25+
* Manual modifications go to {@link Ros2IdeModule}.
26+
*/
27+
@SuppressWarnings("all")
28+
public abstract class AbstractRos2IdeModule extends DefaultIdeModule {
29+
30+
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
31+
public void configureContentAssistLexer(Binder binder) {
32+
binder.bind(Lexer.class)
33+
.annotatedWith(Names.named(LexerIdeBindings.CONTENT_ASSIST))
34+
.to(InternalRos2Lexer.class);
35+
}
36+
37+
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
38+
public Class<? extends IContentAssistParser> bindIContentAssistParser() {
39+
return Ros2Parser.class;
40+
}
41+
42+
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
43+
public Class<? extends IProposalConflictHelper> bindIProposalConflictHelper() {
44+
return AntlrProposalConflictHelper.class;
45+
}
46+
47+
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
48+
public Class<? extends CompletionPrefixProvider> bindCompletionPrefixProvider() {
49+
return IndentationAwareCompletionPrefixProvider.class;
50+
}
51+
52+
// contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2
53+
public Class<? extends IPrefixMatcher> bindIPrefixMatcher() {
54+
return FQNPrefixMatcher.class;
55+
}
56+
57+
// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
58+
public Class<? extends IRenameService2> bindIRenameService2() {
59+
return RenameService2.class;
60+
}
61+
62+
// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
63+
public Class<? extends IRenameStrategy2> bindIRenameStrategy2() {
64+
return IRenameStrategy2.DefaultImpl.class;
65+
}
66+
67+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* generated by Xtext 2.25.0
3+
*/
4+
package de.fraunhofer.ipa.ros2.ide.contentassist.antlr;
5+
6+
import java.util.Collection;
7+
import java.util.Collections;
8+
import org.eclipse.xtext.AbstractRule;
9+
import org.eclipse.xtext.ide.editor.contentassist.antlr.FollowElement;
10+
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
11+
import org.eclipse.xtext.util.PolymorphicDispatcher;
12+
13+
public class PartialRos2ContentAssistParser extends Ros2Parser {
14+
15+
private AbstractRule rule;
16+
17+
@Override
18+
public void initializeFor(AbstractRule rule) {
19+
this.rule = rule;
20+
}
21+
22+
@Override
23+
protected Collection<FollowElement> getFollowElements(AbstractInternalContentAssistParser parser) {
24+
if (rule == null || rule.eIsProxy())
25+
return Collections.emptyList();
26+
String methodName = "entryRule" + rule.getName();
27+
PolymorphicDispatcher<Collection<FollowElement>> dispatcher =
28+
new PolymorphicDispatcher<Collection<FollowElement>>(methodName, 0, 0, Collections.singletonList(parser));
29+
dispatcher.invoke();
30+
return parser.getFollowElements();
31+
}
32+
33+
}

0 commit comments

Comments
 (0)