Examples of CFSyntaxDictionary


Examples of org.cfeclipse.cfml.editors.CFSyntaxDictionary

    rules[1] = new MultiLineRule("'","'",string);
    rules[2] = new NumberRule(cfnumber);
   
    //TODO: Point this to the correct dictionary now.
    //Needs to get the current dictionary for THIS project
    CFSyntaxDictionary cfd = (CFSyntaxDictionary)DictionaryManager.getDictionary(DictionaryManager.CFDIC);
   
    Set set = cfd.getOperators();
    String allkeys[] = new String[set.size()<<1];
   
    int i=0;
    Iterator it = set.iterator();
    while(it.hasNext())
View Full Code Here

Examples of org.cfeclipse.cfml.editors.CFSyntaxDictionary

    typeLabel.setLayoutData(data);
   
    propertyTypes = new Combo(container, SWT.BORDER);
   
    //get the proper properties types
    CFSyntaxDictionary cfmldic = (CFSyntaxDictionary)DictionaryManager.getDictionary(
      DictionaryManager.CFDIC
    );
    TreeSet cftypes = new TreeSet(cfmldic.getFilteredAttributeValues("cfproperty", "type", ""));
    Iterator i = cftypes.iterator();
    String[] str = new String[cftypes.size()];
    int q=0;
    while(i.hasNext()){
      str[q++] = ((Value)i.next()).getValue();
    }
   
    propertyTypes.setItems(str);
   
    propertyTypes.addSelectionListener(new SelectionListener() {
      public void widgetSelected(SelectionEvent e) {
        propertyChanged();
      }
      public void widgetDefaultSelected(SelectionEvent e){;}
    });
   
    propertyTypes.addFocusListener(new FocusListener(){
      public void focusGained(FocusEvent e){  ;}
      public void focusLost(FocusEvent e){
        propertyChanged();
      }
    });
   
    propertyTypes.setEnabled(false);
    data = new GridData ();
    data.horizontalIndent = 5;
    data.horizontalAlignment = GridData.BEGINNING;
    data.verticalAlignment = GridData.BEGINNING;
    data.widthHint = 295;
    propertyTypes.setLayoutData(data);
       
    ///////////////////////////////////////////////////////////// WRITE GETTER
    Label blankLabel2 = new Label(container, SWT.NULL);
    blankLabel2.setText("");
    data = new GridData();
    data.horizontalAlignment = GridData.BEGINNING;
    data.verticalAlignment = GridData.BEGINNING;
    blankLabel2.setLayoutData(data);
   
    propertyWriteGetter = new Button(container, SWT.CHECK);
    propertyWriteGetter.setText("Write &Getter");
    data = new GridData();
    data.horizontalIndent = 5;
    data.horizontalAlignment = GridData.BEGINNING;
    propertyWriteGetter.setLayoutData(data);
   
    propertyWriteGetter.addSelectionListener(new SelectionListener() {
      public void widgetSelected(SelectionEvent e) {
          setGetterAccessEnabled(propertyWriteGetter.getSelection());
          propertyChanged();
      }
      public void widgetDefaultSelected(SelectionEvent e) {;}
    });
   
    Label getterAccessLabel = new Label (container, SWT.NONE | SWT.READ_ONLY);
    getterAccessLabel.setText ("&access:");
    data = new GridData();
    data.horizontalIndent = 5;
    data.verticalAlignment = GridData.BEGINNING;
    data.horizontalAlignment = GridData.END;
    getterAccessLabel.setLayoutData(data);
   
    getterAccessValues = new Combo(container, SWT.BORDER);
   
    //get the proper access types
    TreeSet accessTypes = new TreeSet(cfmldic.getFilteredAttributeValues("cffunction", "access", ""));
    i = accessTypes.iterator();
    str = new String[accessTypes.size()];
    q=0;
    while(i.hasNext()){
      str[q++] = ((Value)i.next()).getValue();
View Full Code Here

Examples of org.cfeclipse.cfml.editors.CFSyntaxDictionary

    rules.add(new MultiLineRule("/**", "*/", javadoc, (char) 0, true));
    rules.add(new MultiLineRule("/*", "*/", cfcommentBlock, (char) 0, true));
    rules.add(new EndOfLineRule("//", cfcomment));
    rules.add(new NumberRule(cfnumber));
   
    CFSyntaxDictionary dic = (CFSyntaxDictionary)DictionaryManager.getDictionary(DictionaryManager.CFDIC);
   
    //do any keywords
    //get any needed operators (or, and et cetra)
   
    //Set set = dic.getOperators();
   
    //get any script specific keywords (if, case, while, et cetra)   
    //set.addAll(dic.getScriptKeywords());
   
    Set set = dic.getScriptKeywords();
   
    String allkeys[] = new String[set.size()];
    int i=0;
    Iterator it = set.iterator();
    while(it.hasNext())
    {
      String opname = (String)it.next();
      allkeys[i++] = opname.toUpperCase();
    }
   
    //build the word highlighter
    CFKeywordDetector cfkd = new CFKeywordDetector();
    PredicateWordRule words = new PredicateWordRule(
      cfkd,
      cfdefault,
      allkeys,
      cfkeyword
    );
    words.setCaseSensitive(false);

    //now do the opperators
    set = dic.getOperators();
    it = set.iterator();
    while(it.hasNext())
    {
      String opp = (String)it.next().toString().toLowerCase();
      words.addWord(opp, cfopperators);
    }

    //now do the cffuntions so they look pretty too :)
    set = dic.getFunctions();
    it = set.iterator();
    while(it.hasNext())
    {
      String fun = (String)it.next().toString().toLowerCase();
      words.addWord(fun, cffunction);
    }
    rules.add(words);
   
    //now do the scopes so they look pretty too :)
    set = dic.getAllScopes();
    it = set.iterator();
    while(it.hasNext())
    {
      String scope = (String)it.next().toString().toLowerCase();
      words.addWord(scope, cfscope);
View Full Code Here

Examples of org.cfeclipse.cfml.editors.CFSyntaxDictionary

    accessLabel.setLayoutData(data);
   
    argumentType = new Combo(container, SWT.BORDER);
   
    //get the proper return types
    CFSyntaxDictionary cfmldic = (CFSyntaxDictionary)DictionaryManager.getDictionary(
      DictionaryManager.CFDIC
    );
    TreeSet cfitems = new TreeSet(
      cfmldic.getFilteredAttributeValues("cfargument", "type", "")
    );
    Iterator i = cfitems.iterator();
    String[] str = new String[cfitems.size()];
    int q=0;
    while(i.hasNext()){
View Full Code Here

Examples of org.cfeclipse.cfml.editors.CFSyntaxDictionary

    data.horizontalIndent = 5;
    data.horizontalAlignment = GridData.END;
    accessLabel.setLayoutData(data);
   
    // Get access types
    CFSyntaxDictionary cfmldic = (CFSyntaxDictionary)DictionaryManager.getDictionary(
        DictionaryManager.CFDIC
      );
    TreeSet accessTypes = new TreeSet(cfmldic.getFilteredAttributeValues("cffunction", "access", ""));
    Iterator i = accessTypes.iterator();
    String[] str = new String[accessTypes.size()];
    int q=0;
    while(i.hasNext()){
      str[q++] = ((Value)i.next()).getValue();
    }
   

    this.functionAccess = new Combo(container, SWT.BORDER);
    this.functionAccess.setItems(str);
    data = new GridData ();
    data.horizontalIndent = 5;
    data.horizontalAlignment = GridData.BEGINNING;
    data.verticalAlignment = GridData.BEGINNING;
    data.widthHint = 295;
    functionAccess.setLayoutData(data);
    /* functionAccess.addModifyListener(new ModifyListener() {
      public void modifyText(ModifyEvent e) {
        propertyChanged();
      }
    }); */
    functionAccess.addSelectionListener(new SelectionListener() {
      public void widgetSelected(SelectionEvent e) {
        propertyChanged();
      }
      public void widgetDefaultSelected(SelectionEvent e){;}
    });
   
    functionAccess.addFocusListener(new FocusListener(){
      public void focusGained(FocusEvent e){  ;}
      public void focusLost(FocusEvent e){
        propertyChanged();
      }
    });
   
   
    //////////////////////////////////////////////////////// RETURNTYPE DROPDOWN
    Label typeLabel = new Label (container, SWT.NONE);
    typeLabel.setText ("&Return Type");
    data = new GridData();
    data.horizontalIndent = 5;
    data.horizontalAlignment = GridData.END;
    typeLabel.setLayoutData(data);
   
    functionReturnType = new Combo(container, SWT.BORDER);
   
    //get the proper return types
    TreeSet cfitems = new TreeSet(
      cfmldic.getFilteredAttributeValues("cffunction", "returntype", "")
    );
    i = cfitems.iterator();
    str = new String[cfitems.size()];
    q=0;
    while(i.hasNext()){
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.