private String getDocumentation(/* @NonNull */EObject object) { if (object.eContainer() == null) { // if a comment is at the beginning of the file it will be returned for // the root element (e.g. Script in N4JS) as well -> avoid this! return null; } ICompositeNode node = NodeModelUtils.getNode(object); if (node != null) { // get the last multi line comment before a non hidden leaf node for (ILeafNode leafNode : node.getLeafNodes()) { if (!leafNode.isHidden()) break; EObject grammarElem = leafNode.getGrammarElement(); if (grammarElem instanceof TerminalRule && "ML_COMMENT".equalsIgnoreCase(((TerminalRule) grammarElem).getName())) { String comment = leafNode.getText(); if (commentStartTagRegex.matcher(comment).matches()) { return leafNode.getText(); } } } } return null; }
public TerminalRule getSL_COMMENT_FRAGMENTRule() { return gaUnicode.getSL_COMMENT_FRAGMENTRule(); }
@Override protected void processElement(AbstractElement element, AbstractRule rule, Builder<String> result) { if (element instanceof RuleCall) { AbstractRule calledRule = ((RuleCall) element).getRule(); if (calledRule instanceof TerminalRule) { super.processElement(element, rule, result); } else { processElement(calledRule.getAlternatives(), rule, result); } } else { super.processElement(element, rule, result); } }
public TerminalRule getSL_COMMENTRule() { return gaTerminals.getSL_COMMENTRule(); }
public TerminalRule getBOOLEANRule() { return tBOOLEAN; }
public TerminalRule getML_COMMENTRule() { return gaTerminals.getML_COMMENTRule(); }
public TerminalRule getBOMRule() { return gaUnicode.getBOMRule(); }
public TerminalRule getWSRule() { return gaTerminals.getWSRule(); }
public TerminalRule getLEGACY_OCTAL_INTRule() { return tLEGACY_OCTAL_INT; }
@Inject public TypesGrammarAccess(GrammarProvider grammarProvider, TypeExpressionsGrammarAccess gaTypeExpressions, UnicodeGrammarAccess gaUnicode) { this.grammar = internalFindGrammar(grammarProvider); this.gaTypeExpressions = gaTypeExpressions; this.gaUnicode = gaUnicode; this.pTypeDefs = new TypeDefsElements(); this.tSTRING = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.n4js.ts.Types.STRING"); this.tSINGLE_STRING_CHAR = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.n4js.ts.Types.SINGLE_STRING_CHAR"); this.pTAnnotation = new TAnnotationElements(); this.pTAnnotationArgument = new TAnnotationArgumentElements(); this.pTAnnotationStringArgument = new TAnnotationStringArgumentElements(); this.pTAnnotationTypeRefArgument = new TAnnotationTypeRefArgumentElements(); this.eTypeAccessModifier = new TypeAccessModifierElements(); this.eMemberAccessModifier = new MemberAccessModifierElements(); this.pType = new TypeElements(); this.pTypeRef = new TypeRefElements(); this.pPrimitiveType = new PrimitiveTypeElements(); this.pTypeReferenceName = new TypeReferenceNameElements(); this.pAnyType = new AnyTypeElements(); this.pVoidType = new VoidTypeElements(); this.pUndefinedType = new UndefinedTypeElements(); this.pNullType = new NullTypeElements(); this.pTypesIdentifier = new TypesIdentifierElements(); this.pBindingTypesIdentifier = new BindingTypesIdentifierElements(); this.pVoidOrBindingIdentifier = new VoidOrBindingIdentifierElements(); this.pTypesSpecificKeywords = new TypesSpecificKeywordsElements(); this.pTypesComputedPropertyName = new TypesComputedPropertyNameElements(); this.pTypesSymbolLiteralComputedName = new TypesSymbolLiteralComputedNameElements(); this.pTypesStringLiteralComputedName = new TypesStringLiteralComputedNameElements(); this.pTObjectPrototype = new TObjectPrototypeElements(); this.pVirtualBaseType = new VirtualBaseTypeElements(); this.pTClass = new TClassElements(); this.pTInterface = new TInterfaceElements(); this.pTypeVariable = new TypeVariableElements(); this.pTClassOrInterfaceHeader = new TClassOrInterfaceHeaderElements(); this.pCallableCtor = new CallableCtorElements(); this.pTFormalParameters = new TFormalParametersElements(); this.pTMember = new TMemberElements(); this.pTMethod = new TMethodElements(); this.pTField = new TFieldElements(); this.pTGetter = new TGetterElements(); this.pTSetter = new TSetterElements(); this.pTFunction = new TFunctionElements(); this.pTEnum = new TEnumElements(); this.pTEnumLiteral = new TEnumLiteralElements(); }
public TerminalRule getSTRINGRule() { return tSTRING; }
public TerminalRule getSL_COMMENTRule() { return tSL_COMMENT; }
public TerminalRule getSTRUCTMODSUFFIXRule() { return gaTypeExpressions.getSTRUCTMODSUFFIXRule(); }
public TerminalRule getIDENTIFIERRule() { return gaTypeExpressions.getIDENTIFIERRule(); }
public TerminalRule getIDRule() { return gaTerminals.getIDRule(); }
public TerminalRule getIDRule() { return gaXtype.getIDRule(); }
public TerminalRule getUNICODE_COMBINING_MARK_FRAGMENTRule() { return gaUnicode.getUNICODE_COMBINING_MARK_FRAGMENTRule(); }
@Inject public LcDslGrammarAccess(GrammarProvider grammarProvider, TerminalsGrammarAccess gaTerminals) { this.grammar = internalFindGrammar(grammarProvider); this.gaTerminals = gaTerminals; this.pLCModel = new LCModelElements(); this.pLaunchConfig = new LaunchConfigElements(); this.pWorkspace = new WorkspaceElements(); this.pWorkingDir = new WorkingDirElements(); this.pMainProject = new MainProjectElements(); this.pMainType = new MainTypeElements(); this.pAddPlugin = new AddPluginElements(); this.pAddFeature = new AddFeatureElements(); this.pContentProviderProduct = new ContentProviderProductElements(); this.pIgnorePlugin = new IgnorePluginElements(); this.pVmArgument = new VmArgumentElements(); this.pProgramArgument = new ProgramArgumentElements(); this.pEnvironmentVariable = new EnvironmentVariableElements(); this.pApplicationExtPoint = new ApplicationExtPointElements(); this.pProductExtPoint = new ProductExtPointElements(); this.pFavorites = new FavoritesElements(); this.pRedirect = new RedirectElements(); this.pExecutionEnvironment = new ExecutionEnvironmentElements(); this.pConfigIniTemplate = new ConfigIniTemplateElements(); this.pTraceEnablement = new TraceEnablementElements(); this.pJavaMainSearch = new JavaMainSearchElements(); this.pRapServletConfig = new RapServletConfigElements(); this.pPath = new PathElements(); this.pExistingPath = new ExistingPathElements(); this.pAnyPath = new AnyPathElements(); this.pPluginWithVersionAndStartLevel = new PluginWithVersionAndStartLevelElements(); this.pPluginWithVersion = new PluginWithVersionElements(); this.pFeatureWithVersion = new FeatureWithVersionElements(); this.pProject = new ProjectElements(); this.pJavaMainType = new JavaMainTypeElements(); this.pClearOption = new ClearOptionElements(); this.pMemoryOption = new MemoryOptionElements(); this.pGroupMember = new GroupMemberElements(); this.pGroupPostLaunchAction = new GroupPostLaunchActionElements(); this.pGroupPostLaunchDelay = new GroupPostLaunchDelayElements(); this.pGroupPostLaunchRegex = new GroupPostLaunchRegexElements(); this.pGroupPostLaunchWait = new GroupPostLaunchWaitElements(); this.pStringWithVariables = new StringWithVariablesElements(); this.pFQName = new FQNameElements(); this.eBrowserLaunchMode = new BrowserLaunchModeElements(); this.eLaunchConfigType = new LaunchConfigTypeElements(); this.eLaunchModeType = new LaunchModeTypeElements(); this.eMemoryUnit = new MemoryUnitElements(); this.eOutputStream = new OutputStreamElements(); this.eInputStream = new InputStreamElements(); this.tINT = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.wamas.ide.launching.LcDsl.INT"); this.tBOOLEAN = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.wamas.ide.launching.LcDsl.BOOLEAN"); this.tID = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.wamas.ide.launching.LcDsl.ID"); this.tQUALIFIER = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.wamas.ide.launching.LcDsl.QUALIFIER"); this.tVERSION = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.wamas.ide.launching.LcDsl.VERSION"); this.tEQ = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.wamas.ide.launching.LcDsl.EQ"); this.tBLOCK_BEGIN = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.wamas.ide.launching.LcDsl.BLOCK_BEGIN"); this.tBLOCK_END = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.wamas.ide.launching.LcDsl.BLOCK_END"); this.tBRACKET_OPEN = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.wamas.ide.launching.LcDsl.BRACKET_OPEN"); this.tBRACKET_CLOSE = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "com.wamas.ide.launching.LcDsl.BRACKET_CLOSE"); }
public TerminalRule getFECHARule() { return tFECHA; }
public TerminalRule getBINARY_INTRule() { return tBINARY_INT; }
public TerminalRule getIDENTIFIER_PARTRule() { return gaTypeExpressions.getIDENTIFIER_PARTRule(); }
public TerminalRule getVERSIONRule() { return tVERSION; }
public TerminalRule getHEX_DIGITRule() { return gaUnicode.getHEX_DIGITRule(); }
public TerminalRule getDECIMAL_INTEGER_LITERAL_FRAGMENTRule() { return gaUnicode.getDECIMAL_INTEGER_LITERAL_FRAGMENTRule(); }
public TerminalRule getID_WITHOUT_CARETRule() { return tID_WITHOUT_CARET; }
public TerminalRule getZWJRule() { return gaUnicode.getZWJRule(); }
public TerminalRule getZWNJRule() { return gaUnicode.getZWNJRule(); }
public TerminalRule getURLRule() { return tURL; }
public TerminalRule getUNICODE_LETTER_FRAGMENTRule() { return gaUnicode.getUNICODE_LETTER_FRAGMENTRule(); }
public TerminalRule getLINE_TERMINATOR_SEQUENCE_FRAGMENTRule() { return gaUnicode.getLINE_TERMINATOR_SEQUENCE_FRAGMENTRule(); }
public TerminalRule getUNICODE_SPACE_SEPARATOR_FRAGMENTRule() { return gaUnicode.getUNICODE_SPACE_SEPARATOR_FRAGMENTRule(); }
public TerminalRule getIDRule() { return tID; }
public TerminalRule getWHITESPACE_FRAGMENTRule() { return gaUnicode.getWHITESPACE_FRAGMENTRule(); }
public TerminalRule getML_COMMENT_FRAGMENTRule() { return gaUnicode.getML_COMMENT_FRAGMENTRule(); }
public TerminalRule getANY_OTHERRule() { return gaXtype.getANY_OTHERRule(); }