use of com.intellij.codeInsight.daemon.GutterMark in project intellij-plugins by JetBrains.
the class DartServerOverrideMarkerProviderTest method checkGutter.
public static void checkGutter(final List<GutterMark> gutters, final String expectedText, final Icon expectedIcon) {
final List<String> textList = Lists.newArrayList();
for (GutterMark gutter : gutters) {
final String text = gutter.getTooltipText();
textList.add(text);
if (expectedText.equals(text) && expectedIcon.equals(gutter.getIcon())) {
return;
}
}
fail("Not found gutter mark: " + expectedText + " " + expectedIcon + "\nin\n" + StringUtil.join(textList, "\n"));
}
use of com.intellij.codeInsight.daemon.GutterMark in project intellij-plugins by JetBrains.
the class FlexColorAnnotatorTest method testIdea94474.
@JSTestOptions(JSTestOption.WithFlexSdk)
public void testIdea94474() throws Exception {
GutterMark r = myFixture.findGutter(getTestName(false) + '.' + "css");
assertNull(r);
}
use of com.intellij.codeInsight.daemon.GutterMark in project intellij-plugins by JetBrains.
the class ActionJavaAnnotatorTest method checkGutterTargetElements.
/**
* Checks whether the gutter target elements in the given class resolve to the given names.
*
* @param javaFile Path to class.
* @param nameResolveFunction Naming function
* @param expectedNames Expected names.
*/
private void checkGutterTargetElements(@NonNls final String javaFile, final Function<PsiElement, String> nameResolveFunction, @NonNls final String... expectedNames) {
final GutterMark renderer = myFixture.findGutter(javaFile);
assertNotNull(renderer);
AnnotatorTestUtils.checkGutterTargets(renderer, nameResolveFunction, expectedNames);
}
use of com.intellij.codeInsight.daemon.GutterMark in project intellij-community by JetBrains.
the class RangeHighlighterImpl method setGutterIconRenderer.
@Override
public void setGutterIconRenderer(GutterIconRenderer renderer) {
GutterMark old = myGutterIconRenderer;
myGutterIconRenderer = renderer;
if (!Comparing.equal(old, renderer)) {
fireChanged(true, false);
}
}
use of com.intellij.codeInsight.daemon.GutterMark in project intellij-community by JetBrains.
the class CodeInsightTestFixtureImpl method findGutters.
private void findGutters(Processor<GutterMark> processor) {
int offset = myEditor.getCaretModel().getOffset();
final Collection<HighlightInfo> infos = doHighlighting();
for (HighlightInfo info : infos) {
if (info.endOffset >= offset && info.startOffset <= offset) {
final GutterMark renderer = info.getGutterIconRenderer();
if (renderer != null && !processor.process(renderer)) {
return;
}
}
}
RangeHighlighter[] highlighters = DocumentMarkupModel.forDocument(myEditor.getDocument(), getProject(), true).getAllHighlighters();
for (RangeHighlighter highlighter : highlighters) {
if (highlighter.getEndOffset() >= offset && highlighter.getStartOffset() <= offset) {
GutterMark renderer = highlighter.getGutterIconRenderer();
if (renderer != null && !processor.process(renderer)) {
return;
}
}
}
}
Aggregations