View Javadoc

1   package org.mevenide.idea.synchronize;
2   
3   import com.intellij.openapi.actionSystem.AnAction;
4   import com.intellij.openapi.module.Module;
5   
6   /***
7    * @author Arik
8    */
9   public interface ProblemInfo {
10      /***
11       * Returns the description of the problem.
12       *
13       * @return string
14       */
15      String getDescription();
16  
17      /***
18       * Returns the module this problem pertains to. Can return {@code null} if this
19       * problem relates to the entire project rather than a specific module.
20       *
21       * @return module, or {@code null} if in project level
22       */
23      Module getModule();
24  
25      /***
26       * Returns the inspector that discovered this problem. This is used mainly for
27       * categorization in the problems tree.
28       *
29       * @return the problem inspector (should never return {@code null)
30       */
31      ProblemInspector getInspector();
32  
33      /***
34       * This method should check if the problem still exists.
35       *
36       * <p>When displaying multiple problems to the user, and the user fixes some, other
37       * problems might not be relevant anymore. Therefor, after each fix, this method will
38       * be called to all other problems to check if they are still relevant.</p>
39       *
40       * @return {@code true} if this problem is still relevant, {@code false} otherwise
41       */
42      boolean isValid();
43  
44      /***
45       * Returns the list of actions that can be applied/executed to fix this problem.
46       *
47       * <p>Returning an empty array, or {@code null} means that this problem cannot be
48       * automatically solved and the user needs to intervene.</p>
49       *
50       * @return can return an actions array, {@code null} or an empty array
51       */
52      AnAction[] getFixActions();
53  
54  }