Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Syntax coloring
Syntax coloring [message #212577] Tue, 29 May 2007 11:39 Go to next message
Eclipse UserFriend
Originally posted by: di98mase.hotmail.com

Hi,

What I would like to do is to have a syntax coloring for a specific file
format. My files are named *.2sh and I would like to define rules for a
set of words. E.g. i the word BEGIN is used it shall be displayed in dark
blue color etc.

I have read a few FAQs in the community about how to create a text editor
and there are a few code snippets showing the basics. However, I dont
understand where to put the "code" in eclipse frame work. Do I have to
create a plug in or is there a simplier way?

How can this be done in eclipse?
Re: Syntax coloring [message #212616 is a reply to message #212577] Tue, 29 May 2007 12:50 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Sebastian wrote:

> Hi,
>
> What I would like to do is to have a syntax coloring for a specific
> file format. My files are named *.2sh and I would like to define rules
> for a set of words. E.g. i the word BEGIN is used it shall be
> displayed in dark blue color etc.
> I have read a few FAQs in the community about how to create a text
> editor and there are a few code snippets showing the basics. However,
> I dont understand where to put the "code" in eclipse frame work. Do I
> have to create a plug in or is there a simplier way?
> How can this be done in eclipse?

You have to write your own plug-in and in there you have to write your
own editor that does the syntax coloring. I suggest you go to the
Welcome page and take a look at the Java editor sample.

Dani
Re: Syntax coloring [message #212834 is a reply to message #212616] Wed, 30 May 2007 11:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: di98mase.hotmail.com

Thanks for your answer. I have read tutorials in the FAQ and other
articles found on this site however I dont understand how all pieces fit.
Where can I find information about which operations a class supports for
instance and where do I add my own code as far as I can see there is only
one file created when you do a new plugin project and that is the *.jar
file.

What I am saying is that for me the information in the FAQ and the
articles on this site is not enough I need more detailed information. Is
there someone who can give me a hint how to start? Any good web sites or
books? After all all I want to do is a syntax coloring for my file
format...

/S
Re: Syntax coloring [message #213655 is a reply to message #212834] Mon, 04 June 2007 12:54 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Sebastian wrote:

> Thanks for your answer. I have read tutorials in the FAQ and other
> articles found on this site however I dont understand how all pieces fit.

Sebastion,

did you select the Java Editor sample and look at the example code?

Dani

> Where can I find information about which operations a class supports
> for instance and where do I add my own code as far as I can see there
> is only one file created when you do a new plugin project and that is
> the *.jar file.
> What I am saying is that for me the information in the FAQ and the
> articles on this site is not enough I need more detailed information.
> Is there someone who can give me a hint how to start? Any good web
> sites or books? After all all I want to do is a syntax coloring for my
> file format...
>
> /S
>
Previous Topic:Stuck in ClassLoader.defineClass
Next Topic:[NEWBIE] Running an application in a package
Goto Forum:
  


Current Time: Sat Apr 27 04:48:03 GMT 2024

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

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

Back to the top