This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 180367 - Python syntax coloring options problems
Summary: Python syntax coloring options problems
Status: STARTED
Alias: None
Product: python
Classification: Unclassified
Component: Options (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P4 normal (vote)
Assignee: Jenselme
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-06 00:29 UTC by mattchaput
Modified: 2015-12-05 13:59 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mattchaput 2010-02-06 00:29:28 UTC
- Some options, such as Class, do not seem to actually affect editors.
- Several categories in the list do not apply to Python, e.g. Constant, Line Comment, Regular Expression, Field, etc.
- Preview content does not contain examples of all the coloring categories
- Preview content does not update when user changes colors (or only some categories, e.g. Method?)
- "Unused Element" category is redundant and confusing, since Python plugin already supplies warnings for unused variables.
Comment 1 bpoggi 2011-05-11 13:47:10 UTC
I have the same problem.
Have you got a issue?
Comment 2 Lou Dasaro 2015-05-26 03:30:44 UTC
Referred to Julien for analysis.
Comment 3 Jenselme 2015-07-04 16:20:33 UTC
If I understand this correctly:

1. I can only think of two cases. If anyone can think of more, let me know.
  a. when defining a class, its name should not be written in normal font. I guess it should look like function/method definition and be written in bold (like in PyDev).
  b. Exceptions with a name that don't end by 'Error' are not in color. They should all behave the same way.

2. That would require clean up in PythonLexer.java or PythonTokenId.java or python.editor.resources/Bundle.properties. I don't see any thing to clean in the java files. The Bundle.properties may need it though. However, I don't know exactly how this file is used and so how modifying it would impact nbpython. If some has information about this, let me know.
It may also refer to the categories available for color (options > font & color).

3. I guess that this referees to the code sample in options > font & color. It should be updated. Moreover, the coloration is invalid in the sample: method are not written in bold.

4. The preview content is indeed never updated even if the code look is (eg for method). Moreover, sometimes, changing the color has no effect (eg for string).

5. That would go with the clean up from 2.
Comment 4 Jenselme 2015-07-04 16:42:00 UTC
2. ColoringAttributes.java would also require clean up I guess.
Comment 5 Jenselme 2015-12-05 13:59:04 UTC
changeset:   18354:1625747870fd
tag:         tip
user:        Julien Enselme <jenselme@netbeans.org>
date:        Fri Nov 27 17:13:35 2015 +0100
description:
#180367 Correct python syntax coloring options

- clean the categories
- extend the example to show more options