refactoring
This commit is contained in:
parent
d0c5af2eef
commit
de3e5d1d0a
|
@ -155,7 +155,7 @@ public class RecentCommands {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void add(String command) {
|
public void add(String command) {
|
||||||
if (command.startsWith(getSetCommand(CMD_DATE))) {
|
if (isBoringCommand(command)) {
|
||||||
// not useful to remember this one
|
// not useful to remember this one
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -198,6 +198,10 @@ public class RecentCommands {
|
||||||
getConfig().getRoot().setProperty(KEY, pack());
|
getConfig().getRoot().setProperty(KEY, pack());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static boolean isBoringCommand(String command) {
|
||||||
|
return command.startsWith(getSetCommand(CMD_DATE));
|
||||||
|
}
|
||||||
|
|
||||||
public static JComponent createButton(UIContext uiContext, final AtomicBoolean reentrant, final String command) {
|
public static JComponent createButton(UIContext uiContext, final AtomicBoolean reentrant, final String command) {
|
||||||
JButton button = new JButton(command);
|
JButton button = new JButton(command);
|
||||||
Icon icon = COMMAND_ICONS.get(command);
|
Icon icon = COMMAND_ICONS.get(command);
|
||||||
|
|
Loading…
Reference in New Issue