Embedding a language in Java comments/annotations [message #778391] |
Thu, 12 January 2012 18:04 |
Aleksandar Milicevic Messages: 2 Registered: January 2012 |
Junior Member |
|
|
Hi,
I admit I haven't done much research on XText, but I figured I'd ask a simple question here first, just to see if my problem is solvable with XText.
I want to embed my own language inside certain Java annotations. Currently, I pass small programs written in my domain specific language to those annotations as plain strings, so that everything is just plain old Java. Now what I want to do is, I want to keep everything as is (i.e. everything is still plain Java), but I would like to get all the goodies for my language inside those special strings (custom syntax highlighting, type checking, code completion, etc.). Is it possible use XText to alter the Eclipse editor for ".java" files?
Thanks.
|
|
|
Re: Embedding a language in Java comments/annotations [message #778540 is a reply to message #778391] |
Fri, 13 January 2012 07:46 |
Sebastian Zarnekow Messages: 3118 Registered: July 2009 |
Senior Member |
|
|
Hi Aleksandar,
this is not possible with Xtext and I'm not sure whether the JDT
provides the necessary abstractions to accomplish this. You may want to
ask in the JDT newsgroup for custom highlighting and content assist for
strings in annotations. ObjectTeams may help to hook into some internal
stuff of the JDT, too.
Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 12.01.12 19:04, schrieb Aleksandar Milicevic:
> Hi,
> I admit I haven't done much research on XText, but I figured I'd ask a
> simple question here first, just to see if my problem is solvable with
> XText.
> I want to embed my own language inside certain Java annotations.
> Currently, I pass small programs written in my domain specific language
> to those annotations as plain strings, so that everything is just plain
> old Java. Now what I want to do is, I want to keep everything as is
> (i.e. everything is still plain Java), but I would like to get all the
> goodies for my language inside those special strings (custom syntax
> highlighting, type checking, code completion, etc.). Is it possible use
> XText to alter the Eclipse editor for ".java" files?
>
> Thanks.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03082 seconds