Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Java Parser/Context Assistance/Compiler exposed?
Java Parser/Context Assistance/Compiler exposed? [message #313318] Mon, 12 March 2007 22:28 Go to next message
Eclipse UserFriend
Originally posted by: arkaaito.users.sourceforge.net

Hi,

I'm in the process of writing an Eclipse plug-in to provide IDE support for
a specifications language. Specifications written in this language can be
in-lined with Java programs by being placed within comments with special
tags.

I've created an editor for this, have a partition scanner programmed to pull
it out of the Java code (so I can then do syntax highlighting and content
assist), etc.. However, I'd now like to restore the standard Eclipse Java
support for the regular Java in these documents. I'm confident that this
must be possible, probably through exposure of the built-in classes that
handle Java in the regular editor, but I'm afraid I'm stalled on actually
finding them and help.eclipse.org has failed me since I don't know what to
look for.

So... can anyone give me a pointer to where the standard Java classes for
syntax highlighting, context assistance and incremental compilation are?

-A.s.
Re: Java Parser/Context Assistance/Compiler exposed? [message #313324 is a reply to message #313318] Tue, 13 March 2007 06:48 Go to previous messageGo to next message
Eclipse UserFriend
A. Smiley wrote:

>Hi,
>
>I'm in the process of writing an Eclipse plug-in to provide IDE support for
>a specifications language. Specifications written in this language can be
>in-lined with Java programs by being placed within comments with special
>tags.
>
>I've created an editor for this, have a partition scanner programmed to pull
>it out of the Java code (so I can then do syntax highlighting and content
>assist), etc.. However, I'd now like to restore the standard Eclipse Java
>support for the regular Java in these documents. I'm confident that this
>must be possible, probably through exposure of the built-in classes that
>handle Java in the regular editor, but I'm afraid I'm stalled on actually
>finding them and help.eclipse.org has failed me since I don't know what to
>look for.
>
>So... can anyone give me a pointer to where the standard Java classes for
>syntax highlighting, context assistance and incremental compilation are?
>
>
As a start you should look at JavaSourceViewerConfiguration: it sets up
code assist, syntax coloring etc. for the source viewer.

Dani

>-A.s.
>
>
>
>
Re: Java Parser/Context Assistance/Compiler exposed? [message #313344 is a reply to message #313324] Tue, 13 March 2007 19:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: arkaaito.users.sourceforge.net

JavaSourceViewerConfiguration?

This *sounds* like what I want, but the only JavaSourceViewerConfiguration I
can find in the Eclipse documentation online is the one from the sample Java
editor, and that's not quite what I'm looking for - I need the version with
full functionality.

-A.s.
Re: Java Parser/Context Assistance/Compiler exposed? [message #313349 is a reply to message #313344] Wed, 14 March 2007 03:46 Go to previous messageGo to next message
Eclipse UserFriend
A. Smiley wrote:

>JavaSourceViewerConfiguration?
>
>This *sounds* like what I want, but the only JavaSourceViewerConfiguration I
>can find in the Eclipse documentation online is the one from the sample Java
>editor, and that's not quite what I'm looking for - I need the version with
>full functionality.
>
>
Simply install the SDK, import 'org.eclipse.jdt.ui' plug-in and browse
the code. Another alternative is to browse the API in the Help.

Dani

>-A.s.
>
>
>
>
Re: Java Parser/Context Assistance/Compiler exposed? [message #313705 is a reply to message #313349] Thu, 22 March 2007 16:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: arkaaito.users.sourceforge.net

Having found the org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration, I
think I'm starting to get somewhere... but now I'm caught in the following
trap:

To get Eclipse to give me a code scanner, a content assistant and a content
formatter in the "intended" way, I need to instantiate the
JavaSourceViewerConfiguration class. But I'm not sure this is exactly what
I want to do - I'd like to be able to just instantiate a code scanner, a
content assistant and a content formatter within my own config and then sic
them on the Java code that my partition scanner tags for them.

Even if it is, I need to give it a color manager that implements
IColorManager, and I can't find anything which purports to implement
IColorManager for the default Eclipse Java implementation. I'm working on
deciphering the necessary partitioning string by browsing through the
source, but I can't figure out where I should be looking for a color
manager.

Help?

Thanks for everything so far... hopefully this will be the last newbie
question from me. (Famous last words!)

-A.s.
Re: Java Parser/Context Assistance/Compiler exposed? [message #313922 is a reply to message #313705] Wed, 28 March 2007 05:21 Go to previous message
Eclipse UserFriend
A. Smiley wrote:

>Having found the org.eclipse.jdt.ui.text.JavaSourceViewerConfiguration, I
>think I'm starting to get somewhere... but now I'm caught in the following
>trap:
>
>To get Eclipse to give me a code scanner, a content assistant and a content
>formatter in the "intended" way, I need to instantiate the
>JavaSourceViewerConfiguration class. But I'm not sure this is exactly what
>I want to do - I'd like to be able to just instantiate a code scanner, a
>content assistant and a content formatter within my own config and then sic
>them on the Java code that my partition scanner tags for them.
>
>Even if it is, I need to give it a color manager that implements
>IColorManager, and I can't find anything which purports to implement
>IColorManager for the default Eclipse Java implementation. I'm working on
>deciphering the necessary partitioning string by browsing through the
>source, but I can't figure out where I should be looking for a color
>manager.
>
>
The class 'JavaUI' provides many useful helpers for you. One of them is
getColorManager().

Dani

>Help?
>
>Thanks for everything so far... hopefully this will be the last newbie
>question from me. (Famous last words!)
>
>-A.s.
>
>
>
>
Previous Topic:no squiggles in MultiEditor
Next Topic:[Databinding] BindSupportFactory
Goto Forum:
  


Current Time: Tue Jul 29 07:44:24 EDT 2025

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

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

Back to the top