Ignore:
Timestamp:
03/12/15 15:50:28 (9 years ago)
Author:
pharms
Message:
  • extension with further smell detections
  • may not fully work. But Hudson is more happy because compile errors should be gone
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-usability/src/main/java/de/ugoe/cs/autoquest/usability/UsabilityEvaluationResult.java

    r1493 r1918  
    1919import java.util.Map; 
    2020 
     21import de.ugoe.cs.autoquest.tasktrees.treeifc.ITask; 
    2122import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    2223 
     
    3334     
    3435    /** */ 
    35     private List<UsabilityDefect> defects = new ArrayList<UsabilityDefect>(); 
     36    private List<UsabilitySmell> smells = new ArrayList<UsabilitySmell>(); 
    3637 
    3738    /** 
     
    5051        this.taskModel = taskModel; 
    5152        for (UsabilityEvaluationResult result : results) { 
    52             for (UsabilityDefect defect : result.getAllDefects()) { 
    53                 defects.add(defect); 
     53            for (UsabilitySmell smell : result.getAllSmells()) { 
     54                smells.add(smell); 
    5455            } 
    5556        } 
     
    5960     * 
    6061     */ 
    61     public void addDefect(UsabilityDefectSeverity    severity, 
    62                           UsabilityDefectDescription description, 
    63                           Map<String, Object>        parameters) 
     62    public void addSmell(UsabilitySmellIntensity   intensity, 
     63                         UsabilitySmellDescription description, 
     64                         Map<String, Object>       parameters) 
    6465    { 
    65         defects.add(new UsabilityDefect(severity, description, parameters)); 
     66        addSmell(null, intensity, description, parameters); 
    6667    } 
    6768 
     
    6970     * 
    7071     */ 
    71     public List<UsabilityDefect> getAllDefects() { 
    72         return defects; 
     72    public void addSmell(ITask                     smellingTask, 
     73                         UsabilitySmellIntensity   intensity, 
     74                         UsabilitySmellDescription description, 
     75                         Map<String, Object>       parameters) 
     76    { 
     77        smells.add(new UsabilitySmell(smellingTask, intensity, description, parameters)); 
    7378    } 
    7479 
     
    7681     * 
    7782     */ 
    78     public List<UsabilityDefect> getSevereDefects() { 
    79         List<UsabilityDefect> severeDefects = new ArrayList<UsabilityDefect>(); 
    80  
    81         for (UsabilityDefect defect : defects) { 
    82             if (defect.getSeverity() == UsabilityDefectSeverity.HIGH) { 
    83                 severeDefects.add(defect); 
    84             } 
    85         } 
    86  
    87         return severeDefects; 
     83    public List<UsabilitySmell> getAllSmells() { 
     84        return smells; 
    8885    } 
    8986 
Note: See TracChangeset for help on using the changeset viewer.