Package org.cfeclipse.cfml.parser

Examples of org.cfeclipse.cfml.parser.CFDocument


     
      return super.isReadOnly(element);
  }

  public CFDocument getCFDocument(IEditorInput editorInput) {
    CFDocument cfdoc = new CFDocument();
    // TODO Auto-generated method stub
    return cfdoc;
  }
View Full Code Here


   
    return currState;
  }

  public static String getCFCName(String variableName, IAssistState state) {
    CFDocument doc = ((ICFDocument) state.getIDocument()).getCFDocument();
    return getCFCName(variableName, doc);
  }
View Full Code Here

    }

    CFParser parser = new CFParser();
    IPreferenceStore prefStore = CFMLPlugin.getDefault().getPreferenceStore();
    parser.setCFScriptParsing(prefStore.getBoolean(ParserPreferenceConstants.P_PARSE_DOCFSCRIPT));
    CFDocument doc = parser.parseDoc(inputString);
    if (doc == null) {
      return null;
    }
    return doc.getFunctions();
  }
View Full Code Here

     
     
     
        //need to go and get all the cffunctions
      CFParser parser = new CFParser();
          CFDocument doc = parser.parseDoc(cfdocument.get());

          // Now we just want to add the nodes!
          DocItem docroot = doc.getDocumentRoot();
         
          CFNodeList compNodes = docroot.selectNodes("/cfcomponent");
         
          CFNodeList nodes = docroot.selectNodes("//cffunction");
     
View Full Code Here

        Set params = ((ISyntaxDictionary)this.sourceDict).getFunctionParams(this.functionName);
        String helpText = ((ISyntaxDictionary)this.sourceDict).getFunctionHelp(this.functionName);
        if (params == null) {
        Set functions;
          params = new LinkedHashSet();
          CFDocument doc = ((ICFDocument) state.getIDocument()).getCFDocument();
        functions = doc.getFunctions();
        Iterator it = functions.iterator();
        while (it.hasNext()) {
          Function function = (Function) it.next();
          System.out.println(function.getName().split("\\(")[0]);
          if (function.getName().split("\\(")[0].equals(this.functionName) && function.getParameters() != null) {
View Full Code Here

 
  public Object[] getElements(Object parent) {
   
    try {
      CFDocument doc = document.getCFDocument();
      if(doc == null) {  // OBT: Added to handle when the parse fatally fails.
        return EMPTY_ARRAY;
      }
      DocItem rootItem = doc.getDocumentRoot();

      //nodes = rootItem.selectNodes("//function[#startpos>=0 and #endpos < 200]");
      nodes = rootItem.selectNodes("//cffunction");
      if (nodes.size() == 0) {
        nodes = rootItem.selectNodes("//ASTFunctionDeclaration");
View Full Code Here

      iep.addPropertyListener(this);
      getSite().getPage().addPartListener(this);

      ITextEditor ite = (ITextEditor) iep;
      ICFDocument icfd = null;
      CFDocument cfd = null;
      if (ite.getDocumentProvider().getDocument(iep.getEditorInput()) instanceof ICFDocument) {
        icfd = (ICFDocument) ite.getDocumentProvider().getDocument(iep.getEditorInput());
        cfd = icfd.getCFDocument();
      }
      // icfd.clearAllMarkers();
      // icfd.parseDocument();

      if (cfd != null) {
        docRoot = cfd.getDocumentRoot();
        // lastDocRoot = docRoot;
      }

      if (docRoot != null) {
        return docRoot;
View Full Code Here

      //Now lets parse it
      CFParser parser = new CFParser(circuitFile, cirFile);
     
     
      try{
        CFDocument elparso =  parser.parseDoc(circuitFile);
     
      //CFDocument parsedDoc = parser.getParseResult();
     
      if(elparso != null){
        DocItem rootItem = elparso.getDocumentRoot();
        //Find the CFScript Items
        CFNodeList circuitscripts = rootItem.selectNodes("//cfscript");
        if(circuitscripts != null){
          Iterator scriptIter = circuitscripts.iterator();
         
View Full Code Here

     
      //Now lets parse it
      CFParser parser = new CFParser(switchContents, switchFile);
     
      try{
        CFDocument swtichDoc =  parser.parseDoc(switchContents);
       
        if(swtichDoc != null){
          DocItem rootItem = swtichDoc.getDocumentRoot();
          CFNodeList switchItems = rootItem.selectNodes("//cfcase");
          Iterator switchIter = switchItems.iterator();
         
          while(switchIter.hasNext()){
            CfmlTagItem tag = (CfmlTagItem)switchIter.next();
View Full Code Here

   * @param e The CFML editor to get the test case from
   * @return The test case currently in the editor.
   */
  private String retrieveTestCase(CFMLEditor e) {
    ICFDocument icfd = null;
    CFDocument cfd = null;
   
    if (e.getDocumentProvider().getDocument(e.getEditorInput()) instanceof ICFDocument) {
      icfd = (ICFDocument)e.getDocumentProvider().getDocument(e.getEditorInput());
      cfd = icfd.getCFDocument();
    }
   
    org.cfeclipse.cfml.parser.docitems.DocItem docRoot = cfd.getDocumentRoot();
    CFNodeList nodes = docRoot.selectNodes("//cfcomponent");   
   
    // Check if this document is a CFC (contains a <cfcomponent> tag)
    if(nodes.size() > 0) {
      CfmlTagItem tag = (CfmlTagItem)nodes.get(0);
View Full Code Here

TOP

Related Classes of org.cfeclipse.cfml.parser.CFDocument

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.