1 | private String shortcut;↵ | | 1 | private String shortcut;↵
|
2 | private String action;↵ | | 2 | private String action;↵
|
3 | //}}}↵ | | 3 | //}}}↵
|
|
4 | //{{{ getShortcut() method↵ | | 4 | //{{{ getShortcut() method↵
|
5 | private String getShortcut()↵ | | 5 | private String getShortcut()↵
|
6 | {↵ | | 6 | {↵
|
7 | if(action == null)↵ | | 7 | if(action == null)↵
|
8 | return null;↵ | | 8 | return null;↵
|
9 | else↵ | | 9 | else↵
|
10 | {↵ | | 10 | {↵
|
11 | String shortcut1 = jEdit.getProperty(action + ".shortcut");↵ | | 11 | String shortcut1 = jEdit.getProperty(action + ".shortcut");↵
|
12 | String shortcut2 = jEdit.getProperty(action + ".shortcut2");↵ | | 12 | String shortcut2 = jEdit.getProperty(action + ".shortcut2");↵
|
|
13 | if(shortcut1 == null || shortcut1.length() == 0)↵ | | 13 | if(shortcut1 == null || shortcut1.length() == 0)↵
|
14 | {↵ | | 14 | {↵
|
15 | if(shortcut2 == null || shortcut2.length() == 0)↵ | | 15 | if(shortcut2 == null || shortcut2.length() == 0)↵
|
16 | return null;↵ | | 16 | return null;↵
|
17 | else↵ | | 17 | else↵
|
18 | return shortcut2;↵ | | 18 | return shortcut2;↵
|
19 | }↵ | | 19 | }↵
|
20 | else↵ | | 20 | else↵
|
21 | {↵ | | 21 | {↵
|
22 | if(shortcut2 == null || shortcut2.length() == 0)↵ | | 22 | if(shortcut2 == null || shortcut2.length() == 0)↵
|
23 | return shortcut1;↵ | | 23 | return shortcut1;↵
|
24 | else↵ | | 24 | else↵
|
25 | return shortcut1 + " or " + shortcut2; | | 25 | return shortcut1 + " or " + shortcut2;
|