Examples of PhpSourceParser


Examples of org.eclipse.php.internal.core.compiler.ast.parser.php5.PhpSourceParser

   * @param str
   * @throws Exception
   */
  public void parseAndTest(Reader reader, String declarationName, String str,
      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();

View Full Code Here

Examples of org.eclipse.php.internal.core.documentModel.parser.PhpSourceParser

          this.fViewer.setError(fLeg, ex.getMessage());
        }

        //        newDoc= new Document(s != null ? s : ""); //$NON-NLS-1$
        newDoc = StructuredDocumentFactory
            .getNewStructuredDocumentInstance(new PhpSourceParser());
        newDoc.set(s != null ? s : ""); //$NON-NLS-1$
        // newDoc= new Document(s != null ? s : ""); //$NON-NLS-1$
        IDocumentPartitioner partitioner = getDocumentPartitioner();
        if (partitioner != null) {
          if (newDoc instanceof JobSafeStructuredDocument) {
View Full Code Here

Examples of org.eclipse.php.internal.core.documentModel.parser.PhpSourceParser

      }
    } catch (BadLocationException e) {
      PHPUiPlugin.log(e);
    }
    JobSafeStructuredDocument newdocument = new JobSafeStructuredDocument(
        new PhpSourceParser());
    String start = "<?php"; //$NON-NLS-1$
    newdocument.set(start + newline + tempsb.toString());
    PhpFormatter formatter = new PhpFormatter(0, newdocument.getLength(),
        true, indentationObject);
    formatter.format(newdocument.getFirstStructuredDocumentRegion());
View Full Code Here

Examples of org.eclipse.php.internal.core.documentModel.parser.PhpSourceParser

    // doc.setPreferredLineDelimiter( "\n" );
    return doc;
  }

  public RegionParser getParser() {
    PhpSourceParser parser = new PhpSourceParser();
    // for the "static HTML" case, we need to initialize
    // Blocktags here.
    addHTMLishTag(parser, "script"); //$NON-NLS-1$
    addHTMLishTag(parser, "style"); //$NON-NLS-1$
    return parser;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.