Examples of Dict


Examples of com.redcareditor.plist.Dict

  }

  private void loadSettings(Dict dict) {
    List<PlistNode<?>> dictSettings = dict.getArray("settings");
    for (PlistNode<?> node : dictSettings) {
      Dict nodeDict = (Dict) node;
      if (!nodeDict.containsElement("scope")) {
        loadGlobalSetting(nodeDict);
      } else {
        settings.add(new ThemeSetting(nodeDict));
      }
    }
View Full Code Here

Examples of com.redcareditor.plist.Dict

      }
    }
  }

  private void loadGlobalSetting(Dict nodeDict) {
    Dict settingsDict = nodeDict.getDictionary("settings");
    for (String key : settingsDict.value.keySet()) {
      globalSettings.put(key, settingsDict.getString(key));
    }
  }
View Full Code Here

Examples of com.redcareditor.plist.Dict

    loadSettings(dict);
    compileScopeMatchers();
  }

  private void loadSettings(Dict dict) {
    Dict settingsDict = dict.getDictionary("settings");
   
    background = getSetting(settingsDict, "background");
    foreground = getSetting(settingsDict, "foreground");
    fontStyle  = getSetting(settingsDict, "fontStyle");
  }
View Full Code Here

Examples of com.redcareditor.plist.Dict

  public static void loadThemes(String textmateDir) {
    if (themes == null) {
        themes = new ArrayList<Theme>();
    }
        for (String themeName : themeNames(textmateDir)) {
      Dict dict = Dict.parseFile(textmateDir + "/Themes/" + themeName);
      if (dict != null) {
        Theme theme = new Theme(dict);
        themes.add(theme);
      }
    }
View Full Code Here

Examples of com.redcareditor.plist.Dict

public class RailsCastThemeTest {
  private Theme theme;

  @Before
  public void setup(){
    Dict themeDict = Dict.parseFile("input/Themes/Railscasts.tmTheme");
    theme = new Theme(themeDict);
  }
View Full Code Here

Examples of com.redcareditor.plist.Dict

    }
  }

  private void loadRepository() {
    repository = new HashMap<String, List<Pattern>>();
    Dict plistRepo = plist.getDictionary("repository");
    if (plistRepo == null)
      return;
    Dict plistRepoEntry;
    for (String key : plistRepo.keys()) {
//      System.out.printf("loading repository entry: %s\n", key);
      List<Pattern> repoArray = new ArrayList<Pattern>();
      plistRepoEntry = plistRepo.getDictionary(key);
      if (plistRepoEntry.containsElement("begin") || plistRepoEntry.containsElement("match")) {
//        System.out.printf("    contains begin or match\n");
        Pattern pattern = Pattern.createPattern(this.allPatterns, plistRepoEntry);
        if (pattern != null) {
          pattern.grammar = this;
          repoArray.add(pattern);
        }
      }
      else if (plistRepoEntry.containsElement("patterns")) {
//        System.out.printf("    contains patterns\n");
        for (PlistNode<?> plistPattern : plistRepoEntry.getArray("patterns")) {
          Pattern pattern = Pattern.createPattern(this.allPatterns, (Dict) plistPattern);
          if (pattern != null) {
            pattern.grammar = this;
            repoArray.add(pattern);
          }
View Full Code Here

Examples of com.redcareditor.plist.Dict

  }

  public static Map<Integer, String> makeCapturesFromPlist(Dict pd) {
    if (pd == null)
      return new HashMap<Integer, String>();
    Dict pcd;
    String ns;
    Map<Integer, String> captures = new HashMap<Integer, String>();
    for (String sCapnum : pd.value.keySet()) {
      int capnum = Integer.parseInt(sCapnum);
      pcd = pd.getDictionary(sCapnum);
      ns = pcd.getString("name");
//      System.out.printf("capture: %d, %s\n", capnum, ns);
      captures.put((Integer) capnum, ns);
    }
    return captures;
  }
View Full Code Here

Examples of com.thinkgem.jeesite.modules.sys.entity.Dict

  @ModelAttribute
  public Dict get(@RequestParam(required=false) String id) {
    if (StringUtils.isNotBlank(id)){
      return dictService.get(id);
    }else{
      return new Dict();
    }
  }
View Full Code Here

Examples of jfun.util.dict.Dict

    final Stmt[] deps = new Stmt[dependencies.length];
   
    for(int i=0; i<dependencies.length; i++){
      deps[i] = new Bound(dependencies[i], loc);
    }
    Dict ctxt = interpreter.getInitialCompileContext()
      .puts(dependencies, deps);
    ctxt = seedImports(ctxt, imports);
    return compileBody(module_id, nuts, tag, idchecker,
        ctxt);
  }
View Full Code Here

Examples of jfun.util.dict.Dict

    final Object[] keys = imported.keySet().toArray();
    final Object[] vals = new Object[keys.length];
    for(int i=0; i<keys.length; i++){
      vals[i] = imported.get(keys[i]);
    }
    final Dict with_deps = withDependencies(initial_frame);
    Dict myframe = with_deps.puts(keys, vals);
    final Body body = BodyCompiler.evaluate(
        stmts.getKeys(), stmts.getStmts(),
        runtime, //new FilteringRegistry(exported, reg),
        myframe);
    return new SimpleModule(module_id, name, description,
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.