mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Builtins highlighting: fixed a regression, added a test.
This commit is contained in:
@@ -64,12 +64,12 @@ public class PyBuiltinAnnotator extends PyAnnotator {
|
||||
if (tgt != null) {
|
||||
Annotation ann = getHolder().createInfoAnnotation(tgt, null);
|
||||
ann.setTextAttributes(PyHighlighter.PY_PREDEFINED_USAGE);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@
|
||||
# func decl: red bold
|
||||
# class decl: blue bold
|
||||
# predefined decl: green bold
|
||||
# predefined usage: yellow bold
|
||||
|
||||
<info descr="null" type="INFORMATION" foreground="0x00ff00" background="0x000000" effectcolor="0xffffff" effecttype="BOXED" fonttype="1">len</info>("")
|
||||
len = [] # redefine
|
||||
len # no highlight
|
||||
|
||||
class <info descr="null" type="INFORMATION">A</info>(<info descr="null" type="INFORMATION" foreground="0x00ff00" background="0x000000" effectcolor="0xffffff" effecttype="BOXED" fonttype="1">object</info>):
|
||||
<info descr="null" type="INFORMATION_ATTRIBUTES" foreground="0xffff00" background="0x000000" effectcolor="0xffffff" effecttype="BOXED" fonttype="1">__metaclass__</info> = M # assignment target
|
||||
|
||||
<info descr="null" type="INFORMATION" foreground="0x00ff00" background="0x000000" effectcolor="0xffffff" effecttype="BOXED" fonttype="1">@</info><info descr="null" type="INFORMATION">classmethod</info>
|
||||
def <info descr="null" type="INFORMATION">foo</info>(cls):
|
||||
|
||||
Reference in New Issue
Block a user