Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Show special code in a different way
Show special code in a different way [message #158692] Wed, 19 November 2003 02:03 Go to next message
Eclipse UserFriend
Originally posted by: hans.schwaebli.schwaebli.de

We use a plugin which generates Java files from an template. It is possible
to modify the generated Java files. But it has to be done inside special
start and end "tags" (/*<*/ and /*>*/). Then if the classes are generated
again from the template, the modifications are preserved.

It would be good if the code inside such a start and end block would be more
clearly visible as a custom code (not generated by the template). For
example the background could be baby blue instead of white inside such a
block.

Is Eclipse already supporting this or do we have to write a plugin for it?
Re: Show special code in a different way [message #158968 is a reply to message #158692] Wed, 19 November 2003 10:49 Go to previous message
Eclipse UserFriend
You may need to do the following:

1. Have the generated java files use a different file extension (say, .jav)

2. Use the Monkey-see, Monkey-do principle to copy the java editor
plugin for .jav files

3. In the CodeScanner class, add a new MultilineRule (from
org.eclipse.jface.text.rules) to highlight the text in the tags.

Hans Schwäbli wrote:

> We use a plugin which generates Java files from an template. It is possible
> to modify the generated Java files. But it has to be done inside special
> start and end "tags" (/*<*/ and /*>*/). Then if the classes are generated
> again from the template, the modifications are preserved.
>
> It would be good if the code inside such a start and end block would be more
> clearly visible as a custom code (not generated by the template). For
> example the background could be baby blue instead of white inside such a
> block.
>
> Is Eclipse already supporting this or do we have to write a plugin for it?
>
>
Previous Topic:Looking for info
Next Topic:Why can't Plugin Projects depend on Java Projects?
Goto Forum:
  


Current Time: Wed Jul 23 04:11:50 EDT 2025

Powered by FUDForum. Page generated in 0.06117 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top