Examples of TokenMapGenerator


Examples of Coco.TokenMapGenerator

 
 
  private void createConfigFiles(Parser parser, String folderPath, String configPath, String editorSuffix, String packageName) throws IOException{
    ArrayList terminals = parser.tab.terminals;
    ArrayList productions = parser.tab.nonterminals;
    TokenMapGenerator provider = new TokenMapGenerator(terminals, productions);
   
   
    File file = new File(configPath);
    file.mkdirs();
   
    File tokenMap = new File(file.getAbsolutePath()+Path.SEPARATOR+editorSuffix+".cnfg");
    if(tokenMap.exists()){
      tokenMap.delete();
    }
    tokenMap.createNewFile();
    FileWriter writer = new FileWriter(tokenMap);

   
    provider.generateTokenMap(writer);
    writer.close();
   
    File preferenceMap = new File(file.getAbsolutePath()+Path.SEPARATOR+editorSuffix+".pref");
    if(!preferenceMap.exists()){
      preferenceMap.createNewFile();
      writer = new FileWriter(preferenceMap);
     
      provider.generatePreferenceMap(writer);
      writer.close();
    }
   
    String providerPrefix = (new String()+editorSuffix.charAt(0)).toUpperCase()+editorSuffix.substring(1);
    String proposalProviderFilePath = configPath+Path.SEPARATOR+providerPrefix+"_ProposalProvider.java";
View Full Code Here

Examples of at.ssw.coco.plEditor.model.TokenMapGenerator

//   

    String configPath = EditorPlugin.getDefault().getPreferenceStore().getString(PreferenceConstants.fieldName)+Path.SEPARATOR+editorName;
   
    //generate new Token Map
    TokenMapGenerator generator = new TokenMapGenerator(configPath+Path.SEPARATOR+editorName+".cnfg");
    tokenMap = generator.getTokenMap();
     
    presentationMap = new HashMap<String, TextAttribute>();
   
//    //genrate new Presentation Map
//    PresentationMapGenerator gen = new PresentationMapGenerator(configPath+Path.SEPARATOR+editorName+".pref", sharedColors);
View Full Code Here

Examples of at.ssw.coco.plEditor.model.TokenMapGenerator

      String editorName = editorChooser.getItem(selected);
       
        configLocation = EditorPlugin.getDefault().getPreferenceStore().getString(PreferenceConstants.fieldName);
      String configFile = configLocation+Path.SEPARATOR+editorName+Path.SEPARATOR+editorName+".cnfg";
     
      TokenMapGenerator tokenGen = new TokenMapGenerator(configFile);
      tokenMap = tokenGen.getTokenMap();
    }
   
//    Set<Entry<Integer,String>> set = tokenMap.entrySet();
   
    String filter = filterField.getText();
View Full Code Here

Examples of at.ssw.coco.plEditor.model.TokenMapGenerator

    Map<String, TextStyle> map = new HashMap<String, TextStyle>();
   
    configLocation = EditorPlugin.getDefault().getPreferenceStore().getString(PreferenceConstants.fieldName);
    String configFile = configLocation+Path.SEPARATOR+editor+Path.SEPARATOR+editor+".cnfg";
   
    TokenMapGenerator tokenGen = new TokenMapGenerator(configFile);
    tokenMap = tokenGen.getTokenMap();
   
   
    String entry = "cocoE_comment_style";
   
    int red = store.getInt(getColorPreferenceField(editor, entry, RED));
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.