mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-21 04:50:58 +07:00
Efficient doc string annotator; tests.
This commit is contained in:
@@ -11,6 +11,7 @@ import com.intellij.openapi.editor.markup.EffectType;
|
||||
import java.awt.*;
|
||||
|
||||
/**
|
||||
* Test highlighting added by annotators.
|
||||
* @author yole
|
||||
*/
|
||||
public class PythonHighlightingTest extends DaemonAnalyzerTestCase {
|
||||
@@ -39,6 +40,19 @@ public class PythonHighlightingTest extends DaemonAnalyzerTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testDocStrings() throws Exception {
|
||||
EditorColorsManager manager = EditorColorsManager.getInstance();
|
||||
EditorColorsScheme scheme = (EditorColorsScheme)manager.getGlobalScheme().clone();
|
||||
manager.addColorsScheme(scheme);
|
||||
EditorColorsManager.getInstance().setGlobalScheme(scheme);
|
||||
|
||||
TextAttributesKey xKey = TextAttributesKey.find("PY.DOC_COMMENT");
|
||||
TextAttributes xAttributes = new TextAttributes(Color.blue, Color.black, Color.white, EffectType.BOXED, Font.BOLD);
|
||||
scheme.setAttributes(xKey, xAttributes);
|
||||
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testReturnOutsideOfFunction() throws Exception {
|
||||
doTest();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user