Lines 51-57
Link Here
|
51 |
import java.awt.Container; |
51 |
import java.awt.Container; |
52 |
import java.awt.Cursor; |
52 |
import java.awt.Cursor; |
53 |
import java.awt.Dimension; |
53 |
import java.awt.Dimension; |
54 |
import java.awt.GraphicsConfiguration; |
|
|
55 |
import java.awt.GraphicsDevice; |
54 |
import java.awt.GraphicsDevice; |
56 |
import java.awt.GraphicsEnvironment; |
55 |
import java.awt.GraphicsEnvironment; |
57 |
import java.awt.HeadlessException; |
56 |
import java.awt.HeadlessException; |
Lines 73-83
Link Here
|
73 |
import java.lang.ref.WeakReference; |
72 |
import java.lang.ref.WeakReference; |
74 |
import java.util.Arrays; |
73 |
import java.util.Arrays; |
75 |
import java.util.Collection; |
74 |
import java.util.Collection; |
76 |
import java.util.HashSet; |
|
|
77 |
import java.util.LinkedList; |
75 |
import java.util.LinkedList; |
78 |
import java.util.List; |
76 |
import java.util.List; |
79 |
import java.util.Map; |
77 |
import java.util.Map; |
80 |
import java.util.Set; |
|
|
81 |
import java.util.concurrent.atomic.AtomicBoolean; |
78 |
import java.util.concurrent.atomic.AtomicBoolean; |
82 |
import java.util.logging.Level; |
79 |
import java.util.logging.Level; |
83 |
import java.util.logging.LogRecord; |
80 |
import java.util.logging.LogRecord; |
Lines 155-174
Link Here
|
155 |
//-J-Dorg.netbeans.modules.editor.hints.HintsUI.always.show.error=true |
152 |
//-J-Dorg.netbeans.modules.editor.hints.HintsUI.always.show.error=true |
156 |
private static final boolean ALWAYS_SHOW_ERROR_MESSAGE = Boolean.getBoolean(HintsUI.class.getName() + ".always.show.error"); |
153 |
private static final boolean ALWAYS_SHOW_ERROR_MESSAGE = Boolean.getBoolean(HintsUI.class.getName() + ".always.show.error"); |
157 |
private static HintsUI INSTANCE; |
154 |
private static HintsUI INSTANCE; |
158 |
private static final Set<String> fixableAnnotations; |
|
|
159 |
private static final String POPUP_NAME = "hintsPopup"; // NOI18N |
155 |
private static final String POPUP_NAME = "hintsPopup"; // NOI18N |
160 |
private static final String SUB_POPUP_NAME = "subHintsPopup"; // NOI18N |
156 |
private static final String SUB_POPUP_NAME = "subHintsPopup"; // NOI18N |
161 |
private static final int POPUP_VERTICAL_OFFSET = 5; |
157 |
private static final int POPUP_VERTICAL_OFFSET = 5; |
162 |
private static final RequestProcessor WORKER = new RequestProcessor(HintsUI.class.getName(), 1, false, false); |
158 |
private static final RequestProcessor WORKER = new RequestProcessor(HintsUI.class.getName(), 1, false, false); |
163 |
|
159 |
|
164 |
static { |
|
|
165 |
fixableAnnotations = new HashSet<String>(3); |
166 |
|
167 |
fixableAnnotations.add("org-netbeans-spi-editor-hints-parser_annotation_err_fixable"); // NOI18N |
168 |
fixableAnnotations.add("org-netbeans-spi-editor-hints-parser_annotation_hint_fixable"); // NOI18N |
169 |
fixableAnnotations.add("org-netbeans-spi-editor-hints-parser_annotation_verifier_fixable"); // NOI18N |
170 |
fixableAnnotations.add("org-netbeans-spi-editor-hints-parser_annotation_warn_fixable"); // NOI18N |
171 |
} |
172 |
|
160 |
|
173 |
public static synchronized HintsUI getDefault() { |
161 |
public static synchronized HintsUI getDefault() { |
174 |
if (INSTANCE == null) |
162 |
if (INSTANCE == null) |
Lines 681-687
Link Here
|
681 |
return false; |
669 |
return false; |
682 |
} |
670 |
} |
683 |
String type = activeAnnotation.getAnnotationType(); |
671 |
String type = activeAnnotation.getAnnotationType(); |
684 |
if (!fixableAnnotations.contains(type) && onlyActive) { |
672 |
if (!FixAction.getFixableAnnotationTypes().contains(type) && onlyActive) { |
685 |
return false; |
673 |
return false; |
686 |
} |
674 |
} |
687 |
if (onlyActive) { |
675 |
if (onlyActive) { |