📄 gfmprogdictionary.java
字号:
package com.cmspad.dmp.bundles.gfm;import java.io.BufferedReader;import java.io.IOException;import java.io.StringReader;import java.util.LinkedHashMap;import java.util.Map;import java.util.Set;import com.cmspad.dmp.DMPBundle;import com.cmspad.dmp.util.DMPUtil;/** * 新旧字典 * * @author yipsilon * */public class GFMProgDictionary { private static Map<String, String> chars = new LinkedHashMap<String, String>(); static { refresh(); } private GFMProgDictionary() {} public static void refresh() { chars.clear(); String charPref = DMPBundle.getPreference(GFMActivator.ID, GFMActivator.PREFS_PROG_DICTIONARY); if(charPref != null){ try { BufferedReader reader = new BufferedReader(new StringReader(charPref)); for (String line = reader.readLine(); line != null; line = reader.readLine()) { String[] worda = DMPUtil.split(line, '='); if (worda.length == 2) { chars.put(worda[0], worda[1]); } } reader.close(); } catch (IOException e) {} } } public static Set<String> keys() { return chars.keySet(); } public static String value(String key) { return chars.get(key); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -