Community
Participate
Working Groups
Build Identifier: 20100917-0705 I find it very useful to colorizes interfaces and abstract classes with the same color with JDT built in syntax coloring. Unfortunately, it isn't possible to assign different colors for classes and abstract classes in preferences->java->syntax coloring->element->java. Reproducible: Always Steps to Reproduce: Open a java source file containing references to classes and abstract classes and try to assign different colors.
Created attachment 184559 [details] 3.7 HEAD patch Support for syntax coloring of abstract classes.
Created attachment 184560 [details] mylyn/context/zip
Thanks for the patch! I'll take a look during M5.
Thanks for the patch Björn. It's looks quite good. There are only some minor issues: - I don't like to use the same color as for interfaces. Please choose a new, not yet used color. - In the preview: use "AbstractClassName" instead of "AbstractClass". - The comment on the following line: new ClassHighlighting(), // includes abstract classes - fallback is misleading: it will not include abstract classes if the class is detected as abstract and the abstract SHL is enabled. - Please add a tests to org.eclipse.jdt.text.tests.SemanticHighlightingTest (in org.eclipse.jdt.text.tests). - Fill out this template and add it to the header comment of each changed file: Your Name <email@example.com> - Bug Title - https://bugs.eclipse.org/BUG_NUMBER
Created attachment 185504 [details] 3.7 HEAD patch with a test Thanks for reviewing the patch. (In reply to comment #4) > - I don't like to use the same color as for interfaces. Please choose a > new, not yet used color. Done - I set it to 139,136,22. I assigned the same color as for interfaces because abstract classes and interfaces are often used quite interchangeably. > - In the preview: use "AbstractClassName" instead of "AbstractClass". Done. > - The comment on the following line: > new ClassHighlighting(), // includes abstract classes - fallback > is misleading: it will not include abstract classes if the class is detected > as abstract and the abstract SHL is enabled. Done. Set it to: // before classes > - Please add a tests to org.eclipse.jdt.text.tests.SemanticHighlightingTest > (in org.eclipse.jdt.text.tests). org.eclipse.jdt.text.tests.SemanticHighlightingTest.testAbstractClassHighlighting() adopted. > - Fill out this template and add it to the header comment of each changed file: > Your Name <email@example.com> - Bug Title - https://bugs.eclipse.org/BUG_NUMBER Done.
Thanks! Committed the patch to HEAD with updated copyright date (2011).
Björn, the properties file does not like 'ö' in it. Do you prefer "Bjorn" or "Bjoern"? I used "Bjoern" for now.
Bjoern is ok.