Package org.eclipse.dltk.ast.declarations

Examples of org.eclipse.dltk.ast.declarations.Declaration


      boolean positiveTest) throws Exception {
    IModuleDeclaration program = new PhpSourceParser().parse(reader, null,
        ProjectOptions.useShortTags((IProject) null));
    DeclarationSearcher searcher = new DeclarationSearcher(declarationName);
    ((PHPModuleDeclaration) program).traverse(searcher);
    Declaration declaration = searcher.getResult();

    Assert.assertNotNull("Can't find declaration AST node for: "
        + declarationName, declaration);
    Assert.assertTrue(
        "Declaration is not PHPDoc aware: " + declarationName,
View Full Code Here


    // find function arguments
    ISourceModule sourceModule = abstractContext.getSourceModule();
    ModuleDeclaration moduleDeclaration = SourceParserUtil.getModuleDeclaration(sourceModule, null);

    Declaration declaration = ASTUtils.findDeclarationAfterPHPdoc(moduleDeclaration, offset);
    if (declaration instanceof MethodDeclaration) {

      String prefix = abstractContext.getPrefix();
      SourceRange replaceRange = getReplacementRange(abstractContext);
      String suffix = ""; //$NON-NLS-1$
View Full Code Here

    parameters.put("start", Integer.toString(s.sourceStart())); //$NON-NLS-1$
    parameters.put("end", Integer.toString(s.sourceEnd())); //$NON-NLS-1$

    // Print modifiers:
    if (s instanceof Declaration) {
      Declaration declaration = (Declaration) s;
      StringBuilder buf = new StringBuilder();
      if (declaration.isAbstract()) {
        buf.append(",abstract"); //$NON-NLS-1$
      }
      if (declaration.isFinal()) {
        buf.append(",final"); //$NON-NLS-1$
      }
      if (declaration.isPrivate()) {
        buf.append(",private"); //$NON-NLS-1$
      }
      if (declaration.isProtected()) {
        buf.append(",protected"); //$NON-NLS-1$
      }
      if (declaration.isPublic()) {
        buf.append(",public"); //$NON-NLS-1$
      }
      if (declaration.isStatic()) {
        buf.append(",static"); //$NON-NLS-1$
      }
      String modifiers = buf.toString();
      parameters
          .put("modifiers", //$NON-NLS-1$
View Full Code Here

TOP

Related Classes of org.eclipse.dltk.ast.declarations.Declaration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.