-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adapt Xtext to be supported by theia
- Loading branch information
Showing
56 changed files
with
101,161 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
.../de.fraunhofer.ipa.rossystem.xtext.ide/src-gen/META-INF/services/org.eclipse.xtext.ISetup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
de.fraunhofer.ipa.rossystem.ide.RosSystemIdeSetup | ||
de.fraunhofer.ipa.ros.ide.RosIdeSetup |
60 changes: 60 additions & 0 deletions
60
...hofer.ipa.rossystem.xtext.ide/src-gen/de/fraunhofer/ipa/ros/ide/AbstractRosIdeModule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* generated by Xtext 2.24.0 | ||
*/ | ||
package de.fraunhofer.ipa.ros.ide; | ||
|
||
import com.google.inject.Binder; | ||
import com.google.inject.name.Names; | ||
import de.fraunhofer.ipa.ros.ide.contentassist.antlr.RosParser; | ||
import de.fraunhofer.ipa.ros.ide.contentassist.antlr.internal.InternalRosLexer; | ||
import org.eclipse.xtext.ide.DefaultIdeModule; | ||
import org.eclipse.xtext.ide.LexerIdeBindings; | ||
import org.eclipse.xtext.ide.editor.contentassist.FQNPrefixMatcher; | ||
import org.eclipse.xtext.ide.editor.contentassist.IPrefixMatcher; | ||
import org.eclipse.xtext.ide.editor.contentassist.IProposalConflictHelper; | ||
import org.eclipse.xtext.ide.editor.contentassist.antlr.AntlrProposalConflictHelper; | ||
import org.eclipse.xtext.ide.editor.contentassist.antlr.IContentAssistParser; | ||
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.Lexer; | ||
import org.eclipse.xtext.ide.refactoring.IRenameStrategy2; | ||
import org.eclipse.xtext.ide.server.rename.IRenameService2; | ||
import org.eclipse.xtext.ide.server.rename.RenameService2; | ||
|
||
/** | ||
* Manual modifications go to {@link RosIdeModule}. | ||
*/ | ||
@SuppressWarnings("all") | ||
public abstract class AbstractRosIdeModule extends DefaultIdeModule { | ||
|
||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
public void configureContentAssistLexer(Binder binder) { | ||
binder.bind(Lexer.class) | ||
.annotatedWith(Names.named(LexerIdeBindings.CONTENT_ASSIST)) | ||
.to(InternalRosLexer.class); | ||
} | ||
|
||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
public Class<? extends IContentAssistParser> bindIContentAssistParser() { | ||
return RosParser.class; | ||
} | ||
|
||
// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2 | ||
public Class<? extends IProposalConflictHelper> bindIProposalConflictHelper() { | ||
return AntlrProposalConflictHelper.class; | ||
} | ||
|
||
// contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2 | ||
public Class<? extends IPrefixMatcher> bindIPrefixMatcher() { | ||
return FQNPrefixMatcher.class; | ||
} | ||
|
||
// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2 | ||
public Class<? extends IRenameService2> bindIRenameService2() { | ||
return RenameService2.class; | ||
} | ||
|
||
// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2 | ||
public Class<? extends IRenameStrategy2> bindIRenameStrategy2() { | ||
return IRenameStrategy2.DefaultImpl.class; | ||
} | ||
|
||
} |
33 changes: 33 additions & 0 deletions
33
.../src-gen/de/fraunhofer/ipa/ros/ide/contentassist/antlr/PartialRosContentAssistParser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* generated by Xtext 2.24.0 | ||
*/ | ||
package de.fraunhofer.ipa.ros.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.util.PolymorphicDispatcher; | ||
|
||
public class PartialRosContentAssistParser extends RosParser { | ||
|
||
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(); | ||
} | ||
|
||
} |
Oops, something went wrong.