/*
  * @see org.argouml.cognitive.critics.Critic#initWizard(
  *         org.argouml.cognitive.ui.Wizard)
  */
 public void initWizard(Wizard w) {
   if (w instanceof WizMEName) {
     ToDoItem item = (ToDoItem) w.getToDoItem();
     Object me = item.getOffenders().get(0);
     String sug = computeSuggestion(Model.getFacade().getName(me));
     String ins = super.getInstructions();
     ((WizMEName) w).setInstructions(ins);
     ((WizMEName) w).setSuggestion(sug);
   }
 }
Ejemplo n.º 2
0
 public void initWizard(Wizard w) {
   if (w instanceof WizMEName) {
     ToDoItem item = w.getToDoItem();
     MModelElement me = (MModelElement) item.getOffenders().elementAt(0);
     String sug = me.getName();
     String ins = "Change the name to something different.";
     ((WizMEName)w).setInstructions(ins);
     ((WizMEName)w).setSuggestion(sug);
     ((WizMEName)w).setMustEdit(true);
   }
 }
Ejemplo n.º 3
0
 /*
  * @see org.argouml.cognitive.critics.Critic#initWizard(
  *         org.argouml.cognitive.ui.Wizard)
  */
 public void initWizard(Wizard w) {
   if (w instanceof WizMEName) {
     ToDoItem item = (ToDoItem) w.getToDoItem();
     Object me = item.getOffenders().get(0);
     String ins = super.getInstructions();
     String sug = super.getDefaultSuggestion();
     if (Model.getFacade().isAAttribute(me)) {
       Object a = me;
       int count = 1;
       if (Model.getFacade().getOwner(a) != null)
         count = Model.getFacade().getFeatures(Model.getFacade().getOwner(a)).size();
       sug = "attr" + (count + 1);
     }
     ((WizMEName) w).setInstructions(ins);
     ((WizMEName) w).setSuggestion(sug);
   }
 }