Add eclipse nemo plugin source codes in nemo-tools.
[nemo.git] / nemo-tools / eclipse-plugin-project / nemo-editor / org.opendaylight.nemo.tool.eclipse.plugin.editor.ui / src-gen / org / opendaylight / nemo / tool / eclipse / plugin / ui / contentassist / antlr / PartialEditorContentAssistParser.java
1 /*
2  * generated by Xtext
3  */
4 package org.opendaylight.nemo.tool.eclipse.plugin.ui.contentassist.antlr;
5
6 import java.util.Collection;
7 import java.util.Collections;
8
9 import org.eclipse.xtext.AbstractRule;
10 import org.eclipse.xtext.ui.codetemplates.ui.partialEditing.IPartialContentAssistParser;
11 import org.eclipse.xtext.ui.editor.contentassist.antlr.FollowElement;
12 import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
13 import org.eclipse.xtext.util.PolymorphicDispatcher;
14
15 /*
16  * Template CodetemplatesGeneratorFragment.xpt
17  */
18 public class PartialEditorContentAssistParser extends EditorParser implements IPartialContentAssistParser {
19
20         private AbstractRule rule;
21
22         @Override
23         public void initializeFor(AbstractRule rule) {
24                 this.rule = rule;
25         }
26         
27         @Override
28         protected Collection<FollowElement> getFollowElements(AbstractInternalContentAssistParser parser) {
29                 if (rule == null || rule.eIsProxy())
30                         return Collections.emptyList();
31                 String methodName = "entryRule" + rule.getName();
32                 PolymorphicDispatcher<Collection<FollowElement>> dispatcher = 
33                         new PolymorphicDispatcher<Collection<FollowElement>>(methodName, 0, 0, Collections.singletonList(parser));
34                 dispatcher.invoke();
35                 return parser.getFollowElements();
36         }
37
38 }