How to setup a new language IDE - eclipse

At work we are using a proprietary language and to program we are using Notepad++ with a simple code highlight. That is really annoying so, what I want to do is to invest some time to setup a text editor or an existing IDE to support my language.
I've googled a lot and there are so many options and before starting to work I wanna ask to you what is the best choice.
What I want to do is to have, like an IDE, a syntax highlight, a window with the function list tree, with the local function variables inside the same subtree, maybe text autocomplete (if I type "pro" I would like to see the suggestion "procedure" and if I press enter it will write for me something like
procedure "name" {
--code--
}
with the cursor on "name" ready to change it.
etc etc...
Can you suggest me the right path to follow?
Is it to keep using Notepad++? With sourcecookifier? functionlist?
Or I have to change to another text editor?
Or there is some famous IDE like Eclipse, NetBeans etc that allow to easily add my own language?
PS. my language is pretty simple, I don't have complex structures, is Pascal-like. Something like that:
variable int xyz
PROCEDURE asd
BEGIN
END PROCEDURE asd

I would recommend you to stay with Notepad++ and extend it with some plugins and configuration. This would be fairly quick and easy to set up and still give a big win, even though you might not be able to get all the nice features of something like Eclipse. But since you already know the Notepad++ it wouldn't require learning an entirely new tool.
Some plugins that I have found useful
Function List
Light Explorer
XBrackets Lite
There are probably a lot more that can be useful to you.
Notepad++ also got some built in auto-completion functionality that can be enabled in the settings.

Have you evaluated Eclipse XTEXT ?
What is Xtext?
Xtext is a framework for development of programming languages and domain specific languages.

The only IDE I have used for the last few years is Eclipse. There are lots of other IDEs available, also notable and popular is Netbeans. There are many others. It's important to note that all IDEs have their fans, but I can only speak to Eclipse.
Eclipse is a platform, which means it is an application on which you can build other applications. Eclipse provides a framework which you can customize and extend to produce a working application. It takes care of the user interface, preferences storage, modularisation using OSGi, and lots of other things.
Eclipse has facilities to support what you're looking for:
Syntax highlighting in the editor.
The Outline View provides function and variable listing in a tree
Autocompletion and Suggestions (activated by hitting ctrl-space)
Code Templates to fill out files and procedures etc.
The disadvantage is that customising and extending Eclipse to do what you want isn't trivial. Having written a language debugger for Eclipse, I can tell you that leveraging Eclipse's platform helped enormously, but there's a learning curve. You'd essentially have to be coming up with a new set of plugins to provide your highlighting, outlining, autocomplete suggestions and templates (I'm not sure if template support is built into the platform or not).
So I would say, unless you can find some sort of extensible editor for Eclipse - I know Aptana is extensible for tag-based markup - you are probably as well staying with your existing tooling.
Do explore the other IDEs though - I've heard good things about IDEA as well as Netbeans. :)
Good luck!

I can recommend SynWrite editor. Good support for external languages, fully customizable. (Editor of new lexers is there)

Related

In the Eclipse HTML editor, is there an easy way to have custom tags available in content assist (autocomplete)?

I'm learning to use a new hosted e-commerce system at work which uses a proprietary markup/scripting language for its page templates. They are similar to JSP pages (although the server tags don't have a prefix, i.e. there is no "xsp:") and use ${expressions} similar to Expression Language. We are transitioning from a .Net system, so all of my fellow devs are very used to having thorough IntelliSense available in our editors.
So, my question is whether it is possible to make these custom tags available in content assist, and whether it is worth the hassle if there is any. (I'm aware the latter is subjective - I'm a reasonable guy and open to opinions.)
FYI, I'm more concerned with auto-completion of tags, but expressions would be great as well depending on how much work is involved. We are using eclipse for Java EE, Juno (core IDE v4.2.1) with WTP... Sorry I'm not really sure how or what to share as far as versions and components go! Let me know if any additional info would help.
Thanks in advance.
A decidedly non-hassle-free answer would be to create an Eclipse plug-in to support your proprietary template language. One place to start might be Veloeclipse, a HTML/XML/JSP/Velocity Editor for Eclipse, which claims to have the following features which you may find interesting:
Smart indentation of velocity directives (on pressing return or when using tabs)
Code folding
Code Formatting
Smart indentation of html tags (on pressing return or when using tabs)
Syntax highlighting for both html and velocity
Autocompletion and Content assist for tags, directives and references (Ctrl + space in html attribute values or when opening or closing tags)
Sources here: http://code.google.com/p/veloeclipse/source/checkout

Is it feasible to extract the code assist/completion part from Eclipse and use it in an other editor?

I often hear how good the code completion, coding assist features of Eclipse are compared to other editors which raises the question if these parts could be separated from the Eclipse code base.
If this part is separated with an API through which it can be told things it needs to know (where are the files of the project, what are the include paths, etc.) then it can return the necessary information (help for a symbol at the cursor, possible completions, etc.) and any editor (emacs, vim, etc.) can use it.
Why is it not done already? Are these code assist parts tied too tightly to Eclipse internals and they can't be sepaarated easily? Could someone who knows about the internal workings of Eclipe shed some light on this?
Edit: Here's a working setup with SharpDevelop for C#, emacs is the UI and the info comes from the SharpDevelop module. See the screenshot on this page. Eclipse's completion support could support emacs and other editors similarly.
The eclim project tries to solve this problem by interfacing directly with eclipse. Thus at least an headless running eclipse is required. While eclim's focus is afaik the vim integration, there also exist plugins for other editors (emacs, textmate, etc). The communication between eclim and an editor happens through a server interface.
Maybe not exactly what you where looking after, but imho worth a look:
http://www.eclim.org/
The content assist uses an internal model of the Java projects - without this model the content assist cannot work (that effectively).
I am not sure, how tightly is integrated to Eclipse internals, but I do know that it uses the Eclipse Resources API (file system handling) and other features such as Eclipse extensions (new completion providers can be added without modifying the code).
Alltogether, I believe to port this completion engine to other editors the mentioned editors would lose their (in some case relative) simplicity to Eclipse, thus it might not provide the smaller footprint of the mentioned editors - so I don't think, it is feasible to provide such engines effectively for other editors.

Using (Java) Eclipse abilities in other programming language

I use Eclipse mainly for LSL (linden Scripting language). The plug-in for this language does not provide things like templates or task-tag recognition. Is there any way that these kind of features in LSL-files (or any other generic file/code for that matter) can be used?
Take look at the XText project. If you can define the grammar of LSL there it will generate full Eclipse plugin for it, complete with syntax Highlighting, code Completion, validation and quick Fixes and more.
Another one to try (one i use myself) is LSL Editor
Full Syntax highlighting, code suggest, and even a off world run time environment. plus able to test multiple scripts by building test objects with prims.
Take a Look :)
LSLForge is being actively maintained, and has most of what you describe. If there's something missing, the developer is always looking for new challenges.

Editor library used in Eclipse source

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.
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 http://www.eclipse.org/Xtext/images/screenshot-title.png
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.
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.

Customizability of the IDEs

I am thinking of modifying an existing IDE (Ex : By developing a plugin) to provide support for a proprietary scripting language. I just need to implement few features like syntax highlighting, Autocompleting etc. (i.e the requirements are really simple). What would be the best IDE or Text editor to integrate the feature. As an example if I think to develop an eclipse plugin for that it would be a pain.
What do you think about Notepad ++?
You might want to give the NetBeans Generic Language Framework a try.
NetBeans project called Generic Languages Framework allows you to define a programming language and integrate it to NetBeans IDE. In the first step you should describe the language - lexical part (define tokens using regular expressions) and syntax (grammar rules). In the second step you can define how to visualize this language in NetBeans. You can define colors for tokens (syntax coloring) or folding (based on grammar rules). You can define what parts of this language should be displayed in the navigator, and how to indent this language plus many other features.
This tutorial should guide you through the process of creating new NetBeans module, adding languages support into it, describing lexical and syntax structure of your language and adding support for all standard editor # features for your language.
Notepad++ allows you to define custom syntax highlight files in a very easy way, but it's not a very good solution for auto-completion (look at this SO question).
If you want a real IDE to extend, I suggest you to use Eclipse.
Update: Tutorial on how to develop an Eclipse plugin.
In vim you can easily add your custom syntax highlighting rules by adding another file in the syntax folder; for the details it is best to look at the help.
If I remember correctly notepad++ also allows defining custom syntax files.