views:

53

answers:

2

Hullo,

I am looking to create an editor and I was wondering if there was a swing library which Eclipse uses for its main editor. It may be something quite basic, but I am looking for the drop down menus which come when you press full stop. Strings become symbols rather than just text.

Many thanks

+1  A: 

Eclipse is rather SWT-based than Swing-based.

As for a custom editor, you could look into an eclipse-GMF-EMF-based editor with XText

Xtext is a framework for development of textual domain specific languages (DSLs).
Just describe your very own DSL using Xtext's simple EBNF grammar language and the generator will create a parser, an AST-meta model (implemented in EMF) as well as a full-featured Eclipse text editor from that.

alt text

The Framework integrates with technology from Eclipse Modeling such as EMF, GMF, M2T and parts of EMFT.
Development with Xtext is optimized for short turn-arounds, so that adding new features to an existing DSL is a matter of minutes. Still sophisticated programming languages can be implemented.

VonC
+1  A: 

Actually I think you want to consider developing an Eclipse RCP application which involves using SWT, JFace and other parts of the Eclipse platform. There are many layers of editor support which are in the Platform Text component, this is what the Eclipse JDT editors are based on. The modelling stuff (GMF, EMF, etc) is probably much more than what you want. The AbstractTextEditor class in org.eclipse.ui.texteditor is a good place to start. RCP gets you a lot of other stuff as far as helping you to manage the objects you are editing, but you don't necessarily need to use this.

There are likely Eclipse corner (on eclipse.org) articles on how to do this, but the specific one escapes me now. I always just look at the code.

Francis Upton