|
@@ -103,8 +103,8 @@ public final class ActionManager {
|
103
|
103
|
* @param wrapper The wrapper to be registered
|
104
|
104
|
*/
|
105
|
105
|
public static void registerWrapper(final ActionWrapper wrapper) {
|
106
|
|
- Logger.doAssertion(wrapper != null, wrapper.getGroupName() != null,
|
107
|
|
- !wrapper.getGroupName().isEmpty());
|
|
106
|
+ Logger.doAssertion(wrapper != null && wrapper.getGroupName() != null
|
|
107
|
+ && wrapper.getGroupName().isEmpty());
|
108
|
108
|
|
109
|
109
|
actionWrappers.add(wrapper);
|
110
|
110
|
}
|
|
@@ -216,7 +216,7 @@ public final class ActionManager {
|
216
|
216
|
* @return An ActionWrapper with the specified group name, or null
|
217
|
217
|
*/
|
218
|
218
|
private static ActionWrapper getWrapper(final String name) {
|
219
|
|
- Logger.doAssertion(name != null, !name.isEmpty());
|
|
219
|
+ Logger.doAssertion(name != null && !name.isEmpty());
|
220
|
220
|
|
221
|
221
|
for (ActionWrapper wrapper : actionWrappers) {
|
222
|
222
|
if (name.equals(wrapper.getGroupName())) {
|
|
@@ -235,7 +235,7 @@ public final class ActionManager {
|
235
|
235
|
* @return True if the group is part of a wrapper, false otherwise
|
236
|
236
|
*/
|
237
|
237
|
private static boolean isWrappedGroup(final String name) {
|
238
|
|
- Logger.doAssertion(name != null, !name.isEmpty());
|
|
238
|
+ Logger.doAssertion(name != null && !name.isEmpty());
|
239
|
239
|
|
240
|
240
|
return getWrapper(name) != null;
|
241
|
241
|
}
|
|
@@ -246,7 +246,7 @@ public final class ActionManager {
|
246
|
246
|
* @param dir The directory to scan.
|
247
|
247
|
*/
|
248
|
248
|
private static void loadActions(final File dir) {
|
249
|
|
- Logger.doAssertion(dir != null, dir.isDirectory());
|
|
249
|
+ Logger.doAssertion(dir != null && dir.isDirectory());
|
250
|
250
|
|
251
|
251
|
for (File file : dir.listFiles()) {
|
252
|
252
|
new Action(dir.getName(), file.getName());
|
|
@@ -324,8 +324,8 @@ public final class ActionManager {
|
324
|
324
|
*/
|
325
|
325
|
public static void processEvent(final ActionType type,
|
326
|
326
|
final StringBuffer format, final Object ... arguments) {
|
327
|
|
- Logger.doAssertion(type != null, type.getType() != null,
|
328
|
|
- type.getType().getArity() == arguments.length);
|
|
327
|
+ Logger.doAssertion(type != null &&type.getType() != null
|
|
328
|
+ && type.getType().getArity() == arguments.length);
|
329
|
329
|
|
330
|
330
|
PluginManager.getPluginManager().processEvent(type, format, arguments);
|
331
|
331
|
|
|
@@ -368,8 +368,8 @@ public final class ActionManager {
|
368
|
368
|
* @param group The group to be created
|
369
|
369
|
*/
|
370
|
370
|
public static void makeGroup(final String group) {
|
371
|
|
- Logger.doAssertion(group != null, !group.isEmpty(),
|
372
|
|
- !groups.containsKey(group));
|
|
371
|
+ Logger.doAssertion(group != null && !group.isEmpty()
|
|
372
|
+ && groups.containsKey(group));
|
373
|
373
|
|
374
|
374
|
if (new File(getDirectory() + group).mkdir()) {
|
375
|
375
|
groups.put(group, new ArrayList<Action>());
|
|
@@ -382,8 +382,8 @@ public final class ActionManager {
|
382
|
382
|
* @param group The group to be removed
|
383
|
383
|
*/
|
384
|
384
|
public static void removeGroup(final String group) {
|
385
|
|
- Logger.doAssertion(group != null, !group.isEmpty(),
|
386
|
|
- groups.containsKey(group));
|
|
385
|
+ Logger.doAssertion(group != null && !group.isEmpty()
|
|
386
|
+ && groups.containsKey(group));
|
387
|
387
|
|
388
|
388
|
for (Action action : new ArrayList<Action>(groups.get(group))) {
|
389
|
389
|
unregisterAction(action);
|
|
@@ -415,9 +415,9 @@ public final class ActionManager {
|
415
|
415
|
* @param newName The new name of the group
|
416
|
416
|
*/
|
417
|
417
|
public static void renameGroup(final String oldName, final String newName) {
|
418
|
|
- Logger.doAssertion(oldName != null, !oldName.isEmpty(),
|
419
|
|
- newName != null, !newName.isEmpty(), groups.containsKey(oldName),
|
420
|
|
- !groups.containsKey(newName), !newName.equals(oldName));
|
|
418
|
+ Logger.doAssertion(oldName != null && !oldName.isEmpty()
|
|
419
|
+ && newName != null && !newName.isEmpty() && groups.containsKey(oldName)
|
|
420
|
+ &&!groups.containsKey(newName) && !newName.equals(oldName));
|
421
|
421
|
|
422
|
422
|
makeGroup(newName);
|
423
|
423
|
|
|
@@ -439,7 +439,7 @@ public final class ActionManager {
|
439
|
439
|
* @return The actioncomparison with the specified name, or null on failure
|
440
|
440
|
*/
|
441
|
441
|
public static ActionType getActionType(final String type) {
|
442
|
|
- Logger.doAssertion(type != null, !type.isEmpty());
|
|
442
|
+ Logger.doAssertion(type != null && !type.isEmpty());
|
443
|
443
|
|
444
|
444
|
for (ActionType target : actionTypes) {
|
445
|
445
|
if (((Enum) target).name().equals(type)) {
|
|
@@ -536,7 +536,7 @@ public final class ActionManager {
|
536
|
536
|
* @return The actioncomponent with the specified name, or null on failure
|
537
|
537
|
*/
|
538
|
538
|
public static ActionComponent getActionComponent(final String type) {
|
539
|
|
- Logger.doAssertion(type != null, !type.isEmpty());
|
|
539
|
+ Logger.doAssertion(type != null && !type.isEmpty());
|
540
|
540
|
|
541
|
541
|
for (ActionComponent target : actionComponents) {
|
542
|
542
|
if (((Enum) target).name().equals(type)) {
|
|
@@ -555,7 +555,7 @@ public final class ActionManager {
|
555
|
555
|
* @return The actiontype with the specified name, or null on failure
|
556
|
556
|
*/
|
557
|
557
|
public static ActionComparison getActionComparison(final String type) {
|
558
|
|
- Logger.doAssertion(type != null, !type.isEmpty());
|
|
558
|
+ Logger.doAssertion(type != null && !type.isEmpty());
|
559
|
559
|
|
560
|
560
|
for (ActionComparison target : actionComparisons) {
|
561
|
561
|
if (((Enum) target).name().equals(type)) {
|