Пример #1
0
 /*.................................................................................................................*/
 public Object doCommand(String commandName, String arguments, CommandChecker checker) {
   if (checker.compare(
       this.getClass(),
       "Sets module supplying characters",
       "[name of module]",
       commandName,
       "setCharacterSource")) {
     CharacterObedSource newCharacterSourceTask;
     if (hiringCondition != null)
       newCharacterSourceTask =
           (CharacterObedSource)
               replaceCompatibleEmployee(
                   CharacterObedSource.class,
                   arguments,
                   characterSourceTask,
                   hiringCondition); // , "Source of characters"
     else
       newCharacterSourceTask =
           (CharacterObedSource)
               replaceEmployee(
                   CharacterObedSource.class,
                   arguments,
                   "Source of characters",
                   characterSourceTask);
     if (newCharacterSourceTask != null) {
       characterSourceTask = newCharacterSourceTask;
       characterSourceTask.setHiringCommand(cstC);
       charSourceName.setValue(characterSourceTask.getName());
       resetContainingMenuBar();
       parametersChanged();
       return characterSourceTask;
     } else {
       discreetAlert(
           "Unable to activate character source \""
               + arguments
               + "\"  for use by "
               + employer.getName());
     }
   } else if (characterSourceTask != null) { // todo: temporary, for snapshot conversions
     return characterSourceTask.doCommand(commandName, arguments, checker);
   } else return super.doCommand(commandName, arguments, checker);
   return null;
 }