Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-ui-dev] Syntax coloring for "Logger-Code"

Christian,

this list is reserved for those developing JDT UI. Please ask your question
on the newsgroup.

Dani

|------------>
| From:      |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |"Oetterli Christian" <Christian.Oetterli@xxxxxxxxxxxxxxx>                                                                                         |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |<jdt-ui-dev@xxxxxxxxxxx>                                                                                                                          |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |28.04.2009 14:44                                                                                                                                  |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |[jdt-ui-dev] Syntax coloring for "Logger-Code"                                                                                                    |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|





Hi,
I’d like to extend the java editor syntax coloring to know about
“Logger-Code”. Its purpose is to better differentiate between “production”
code and “logger” code, which are mixed in the same file/method (we are
aware that this problem may be better solved i.e. using aspects, but we
simply cannot do this now). The more important production code is hard  to
read when mixed up with logger code, so we want to give it another color,
like “light-gray” so when the developer is reading the file he better can
“ignore” the logger code and focus on production code.
Logger-Code is simply an “if”-Block: It starts with “if(logger.” and ends
with “} //” or it may be a single line like “logger.entering();” - starts
with “logger.” and ends with “;”
A screenshot how this should look like is attached to this mail.

I’ve spent quite some time looking at FastJavaPartitioner, JavaCodeScanner,
IJavaColorConstants (and lots more), followed those references and
tried/error by copy/paste relevant parts but the result did not work really
well. Could you please give me hints from where to start to add such a
feature? May I can follow an existing feature and see how its implemented
and do it the same way?

Kind regards
   Christian


 [attachment "LoggingCodeColoring.png" deleted by Daniel Megert/Zurich/IBM]
_______________________________________________
jdt-ui-dev mailing list
jdt-ui-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jdt-ui-dev


Back to the top