colorTable.add(new Color(display, 214, 179, 74));
colorTable.add(new Color(display, 204, 74, 214));
}
private void createShortcutsMenu(IMenuManager mgr) {
IMenuManager submenu = new MenuManager("Shortcuts");
mgr.add(submenu);
Action shortcut;
try {
InputStream is = getClass().getResourceAsStream(SHORTCUTS_FILE);
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line;
while ((line = br.readLine()) != null) {
StringTokenizer st = new StringTokenizer(line, "\t");
if (st.countTokens() == 2) {
final String shortc = st.nextToken();
String descr = st.nextToken();
shortcut = new Action() {
public void run() {
insertShortcut(shortc);
}
};
shortcut.setText(shortc + " - " + descr);
submenu.add(shortcut);
//}
mgr.update(true);
} else if (st.countTokens() == 1) {
String token = st.nextToken();
if (token.equals("<DEL>")) {
submenu.add(new Separator());
}
}
}
} catch (IOException e) {
e.printStackTrace();