Embeddable editor for scripting language - scripting

I'm looking for a good editor that is embeddable into application (using either QT or GTK toolkit if needed), and would allow editing of scripts with:
Code completion
Inline documentation / context sensitive documentation
Syntax highlighting
Any language is fine (Scheme, Lua, Python etc.) as long as I can get good - noob friendly editor for it which I can embed into my application (so licence is also a concern, I'd hate to have to licence whole project as GPL and AGPL - I'd like to keep project on MIT/BSD license)
Any suggestions?

scintilla is made to be embedded. And, as far as I remember, works with GTK and QT. But it needs probably a bit of customization in order to get Code completion and Inline documentation / context sensitive documentation to work.

I'm not sure if this would work, but http://www.ubuntugeek.com/gummi-simple-latex-editor-written-in-pythongtk.html. It seems to be an open-source, MIT-licenced LaTeX editor. I haven't used it before, nor embedded it, but in theory you could embed it (unless of course n00bs don't know latex...)

Related

an objc syntax highlighting library that supports multiple language?

I come from the ruby and python worlds where we have many libraries that can syntax highlight arbitrary code from many languages. I am looking for something similar in the objc ecosystem, but i can't seem to find such, is there one available?
The equivalent libraries in Ruby would be CodeRay and Pygments for Python,
thanks in advance!
Banister,
I myself have searched for a long time for a nice and robust Cocoa Syntax Highlighter, and since I'm currently building a code-oriented text editor myself, that would be a major part of the project.
So, I found out that there are plenty of Objective-C/Cocoa -friendly Syntax Highlighting libraries/components. For a starter (for something relatively basic, that is), I would suggest you have a look at :
OkudaKit (using CSS for styling)
UKSyntaxColoredTextDocument by Uli Kusterer (pretty nice try)
However, if you really need something POWERFUL, well-tested and still Cocoa-friendly, I would definitely suggest you to try the Scintilla component (for Cocoa). The code is great, and the community (at Scintilla-Interest Group) will gladly help you iron out any issues you may encounter.
In a few words :
I'm currently using on an about-to-be-release big project and it's working beautifully for me.
Scintilla
Scintilla is a free library that provides text-editing functions, with
an emphasis on advanced features for source code editing. SciTE
(cross-platform), Geany, Notepad++ (Windows), and Notepad2 (Windows)
are examples of standalone editors based on Scintilla.
Scintilla Editing Component in use (SciTe)
Features
Scintilla supports many features to make code editing easier in
addition to syntax highlighting. The highlighting method allows the
use of different fonts, colors, styles and background colors, and is
not limited to fixed-width fonts. The control supports error
indicators, line numbering in the margin, as well as line markers such
as code breakpoints. Other features such as code folding and
autocompletion can be added.
Download Scintilla (the Cocoa support has been integrated in the main project) : http://www.scintilla.org/SciTEDownload.html
Example project (integrating Scintilla with Cocoa) :
http://bazaar.launchpad.net/~mike-lischke/scintilla-cocoa/trunk/files/head:/cocoa/ScintillaTest/
For complete documentation, have a look at : Scintilla
Documentation
Fragaria may be useful for future reference.

Are there any text-editors/IDEs that support languages generically?

I'm looking for an editor/IDE that can provide features that are nice to have while coding (example: being able to click-through to function definitions) for languages that it is not specifically built for. By these, I have in mind languages designed for a very specific purpose and often only used by a small community. In other words, ones that would not have native support in most software.
I realize this would require a fair bit of fairy dust but I don't think it's out of the scope of what's possible. Basically, the editor would have to be smart enough to recognize the commonly used syntax and semantics that many declarative languages have in common. It's quite possible this would require some amount of configuration.
Does something like this exist? If not, what challenges do you think there would be in creating it?
If you need only the feature to jump of to the definition of a specific function or class, then VIM (and many other editors, like Emacs, Epsilon and JOE) can read the jump location from the ctags file. You just have to write a ctags file generator for your custom language.
For programmable editors (like VIM, Emacs, Epsilon, Eclipse and gedit), you can write your own plugin for your custom language, but it may quickly become time-consuming and a maintenance nightmare, because new versions of editors tend to change the plugin interface.
Please note that adding support for syntax highlighting is usually much easier than adding ctags-like support for symbol lookups. More advanced features, like refactoring and context-sensitive symbol completion (like Ctrl-Space and Tab in modern IDEs) are even harder to implement.
GNU Emacs has a pretty good infrastructure for this sort of thing. Until recently Haskell was a relatively unknown language used primarily by researchers. Nevertheless, in a few thousand lines of Emacs Lisp, we have
Syntax highlighting with colors
Automatic indentation
Package support
Automatic highlighting of type and other information when placing the cursor over library functions
Meta-dot on an identifier to jump to its definition (through the standard emacs tags mechanism)
The nice thing about Emacs is that (a) there are many models to follow, and (b) you can build up the environment gradually, starting with those aspects that are most important to you.
I'm suprised no one has mentioned Notepad++ yet:
http://notepad-plus-plus.org/
It offers syntax support for a great many languages and offers the user to add new languages, and an active community that adds many languages that are not included out-of-the-box.
Most good IDE's are language agnostic and supports several if not many programming languages. If you are talking about DSL's, eclipse has a solution that seems pretty awsome - Xtext
EditPadPro comes with a set of tools that allow you to build your own syntax highlighting, code folding and file navigation schemes, based on a very powerful regex syntax. So if your language is not among the many that have already been provided out-of-the-box or can be downloaded off the website, you can roll your own quite easily (and share it with the community).
Visual Studio is designed to allow for this, but it requires the language to add explicit support. For example, Delphi Prism will install into Visual Studio, and provide full language support.
This is far above and beyond "configuration", however, and requires quite a bit of custom development to support.
SciTE and Scintilla offer a generic editor/platform for different languages. The library contains several parsers that work with many programming languages and you can reuse one of these for your own language to add formatting and syntax highlighting.
They don't offer advanced features like click-throughs, but you could build it on top of the library.
Visual Studio and Eclipse also support language plug-ins.
Zeus is a language neutral IDE for the Windows platform and it provides this go to definition/declaration functionality for any language supported by ctags.
To make it work you just create a Zeus project/workspace and then add the files to this workspace.

Which TextEditor is easiest to customize for a new scripting language?

It's been more than an year that i'm developing a new scripting language with its own grammar rules and constructs.
I'd like to give the users of this language some minimalistic ide to work with, but i don't want/have time to make one from scratch so i'd like to take one already existing (it has to run on Linux platforms natively, so no windows-only editors plz) and customize it.
Well, which one is the easiest to customize without changing the source code and recompiling it, maybe even with plugin support?
Thank you.
UPDATE
I don't need to know which editor is the best for you, i need to know which one is the easiest to customize AND, most of it, which one has the most complete documentation about new language customization.
Ex: SciTE is good, but its documentation about custom grammars is really poor.
Have you looked into Scintilla/SciTE? I think it gets used often for this sort of thing. It's very lightweight, but from what I understand, is easy to add functionality to. It's not really an IDE, but it's more of a text-editor component that you could use as the basis for a simple IDE. I've used SciTE, which is a sort of demo text editor of Scintilla's capabilities. It's simple, but also quite fast and responsive.
I suppose another option would be to write plugins for existing IDEs such as Eclipse or Netbeans. Both of these IDEs support many languages just through 3rd-party plugins. Going this route means you don't need to build a complete UI, just the components needed to make your language work.
The downside of building plugins for an extendable IDE (such as NetBeans or Eclipse) is that you are at the mercy of the IDE developers. If they change the way the platform works, you must ensure that your plugins still work with the new versions. Sometimes this can become a major problem.
All of these options should work on Linux as well as Windows.
This sounds like a very ambitious project and I wish you luck.
I don't use linux too often, I use a Mac and my favorite text editor is called TextMate because it has snippets, code completion, and a whole mess of other features. The closest thing to it that I've found on linux is called Scribes.
There's always Emacs or Vim (I lean towards Vim, but that's just my opinion :) ). Neither are IDEs per se, but both are very extensible and it shouldn't be too hard to create settings for each that will aid people writing scripts in your language.

Alternative to Dreamweaver?

I'm tired of Dreamweaver overwriting wrong files on the server,
so I'm looking for an alternative.
I want color-coding and possibility to open/save and edit files direct from the server, so I don't need to save files on my desktop first.
I'm using Windows.
Every web developer should be hand-writing their mark-up - all forms of automated abstraction inhibit your understanding and awareness of the code and create maintenance problems for the future. I'm quite a zealot about this, you may be able to tell.
On that basis, I can heartily recommend Editplus: has code colouring, FTP and a huge amount of feature-sugar from line duplication to macros.
Notepad++ extended with some plugins is a really handy replacement. Though I can't call it IDE, it does virtually everything a developer need. In my case (a lot of repetitive code) Texter (a small app working in background) makes notepadd++ even more handy. So, my suggestion is: Notepad++ and Texter.
I switched to notepad++ when I had the same kind of problems with DreamWeaver. I tried some other programs too, but they were too complicated for my needs.
If all you need is color-coding and ftp-support, notepad++ is a good choice.
Visual Web Developer Express, which is the lightweight version of Visual Studio.
http://www.microsoft.com/express/
If you're using a Mac you should take a look at Coda
Well personally I use Programmer's Notepad but it doesn't support the facility to upload files to the server. You could get Notepad++ and this FTP plugin. I haven't tried Notepad++ but I'm sure that it isn't WYSIWYG.
Perhaps KompoZer? It has all the features you've asked for, and there's a Windows version (as well as Mac and Linux).
Dreamweaver... Not my cup of tea, because it lacks good support for modern web programming with Javascript or PHP.
For primary design, I use WeBuilder from Blumentals. Its also a good and not expensive PHP and Javascript IDE with debugging support and also has good CSS support with a built-in CSS editor.
I'm not a big fan of text editors like Notepad++ as an IDE replacement, because you often need a lot of additional plug-ins to have similar features like a IDE. But for some files or quick editing nothing can beat such editors (I like Notepad++ the most on Windows).
So for Windows I would prefer WeBuilder for all things (design & programming).
You use only Windows? For Linux there are other alternatives too ;)
When I searched an alternative for the Dreamweaver for PHP, I found some IDEs and one among them is Netbeans. Soon it became my favorite for my object oriented coding.
Here is the download page.
This has support for Zend and Symphony frameworks.
They also support File uploading.
When developping in PHP, I generally use Eclipse PDT.
If you are more oriented towards HTML/CSS/Javascript, you might be interested by Aptana, which is based on Eclipse too... Which means it can use lots of plugins, including some to work directly on a server, I suppose (see TM/RSE, for instance).
Note than Aptana can also be installed into an existing Eclipse installation, as a plugin.
Oh, also, I almost forgot : Eclipse is free, and there are both a free and a commercial version of Aptana.
(One bad thing about Eclipse being it requires a quite powerful computer -- at least 2 cores and 2 GB of RAM, if you want to use any other application at the same time...)
E Text Editor, a Textmate clone for Windows, claims to have FTP Support. But i haven't used this feature before.
I want color-coding and possibility to open/save and edit files direct from the server, so I don't need to save files on my desktop first.
The Zeus editor can highlight and fold HTML files, it integrates with HTML Tidy and can seamless edit files from the server via ftp/sftp.
It also has support for a host of other languages (i.e C/C++, C#, Java, Javascript, PHP, etc etc)

An alternative IDE for Sybase Powerbuilder

Does anyone know of an alternative IDE for Sybase Powerbuilder? It feels pretty clunky, after working with VS2008 and Eclipse.
If not, has anyone successfully worked with this language outside the IDE? I'm not against using a simple text editor, but I find edit-import-regenerate-test-export-edit is clunkier than simply using the Powerbuilder editor.
To date, the only tools I have had any success with are:
PowerGen, for builds (with NUnit and CruiseControl.NET)
ConTEXT, which has syntax highlighting for Powerbuilder
PBL Peeper, which has some interesting features not present in the IDE
EDIT: I added a bounty to draw some wider attention to the question. It would be a very nice thing to have, if it exists.
EDIT: Well that was disappointing. The bounty apparently did not cause even 1 new person to look at the question.
None that I'm aware of, although you could probably use a source control tool, edit in your source control repository, and Get Latest Version from the PB IDE to shorten your text editor cycle. Be warned that there are hacks required to edit anything over 128 ASCII. (My guess is that this is to allow everything Unicode to be source controlled in the most restrictive source control tools.)
As Paul said, PB12 is coming with based on the Visual Studio shell, and will include things like collapsible code blocks, Intellisense, etc.... However, for PB12, this will only be used for WPF targets and a few .NET-type targets (like assemblies), last I heard. Win32 targets will continue to use the "classic" IDE.
Good luck,
Terry.
P.S. Thanks for the PBL Peeper compliment.
The PowerBuilder IDE is clunky, but I don't think developing completely outside the PowerBuilder IDE is a good idea. I think there are just too many dependencies right now.
However, the IDE for PowerBuilder 12 will be built using Microsoft's Visual Studio Isolated Shell so it ought to be much better when that is released. Also, I believe they'll be doing away with the PBL format which ought to make source control much easier to work with.
Certainly something to watch.
What I do is right-click the object and edit source. Then I copy the text and paste it into Notepad++ to edit. I copy and paste back to PowerBuilder, then I can save and see any errors. I've got a fairly decent User Defined Language for PowerScript if anyone's interested.
Added:
Please be aware that I've seen the PB Source editor corrupt DataWindows. They were all large DataWindows. To be safe always export DataWindows to edit.
One tool that will most probably make your PB experience way better is Visual Expert, which provides a good source browser. Such a tool should have been integrated into the PB IDE a long time ago, IMHO. Only problem is that it's not free, as opposed to the other tools you mention.
Regarding using external source editors, you can probably take advantage of OrcaScript, which is a scripting language that lets you perform actions such as export and import of PB objects from outside of the IDE. It will require some effort, but you can setup a basic dev env using batch files with ORCA scripts and some additional external tools. However, this setup will lack any visual editing capabilities, which means no (feasible) GUI or DW work. If you're mostly into NVOs, it could work. But then if that's the case, why use PB in the first place?...
I too have heard PB12's use of VS will be limited to some .NET stuff, which will probably benefit only a very small portion of the PB programmers community. I'm afraid the rest of us are stuck with the awful IDE for years to come.
Other than exporting the source and editing it I don't know of another IDE for PB. One problem you may have is that the exported source contains a lot of syntax that is not documented in the manuals. The PB IDE generates this code but there is no support for creating it by hand. I think you are stuck with the PB IDE
In my modest five Years of experiences starting with Powerbuilder 5/6, now using PB 10, I tempt to :
build my own browser from the classdefinition object based on Powerbuilder
tried to use autohotkey in order to open datawindows comfortable (we have several thousands in the project and i am two-finger-driven)
truly investigated in the idea using an external editor/IDE suppoted by an autohotkey script which is undermined by sybase allowing only mouse-click-usage of PB
using Visual Expert which is neither a truly integration in the IDE, nor is really worth in analyzing datwindow/powerscript interaction
ending by build hopes on PB12 Visual Studio, which lacks - depending on compatibility issues - ...
... i came to the conclusion that there will be no chance in improving Powerbuilder to an state-of-the-art language
In my philosophy - I obtained during those years - I distinguish between two types of OOP-oriented languages:
the one that award using object-orientation like C#, Python, Ruby (C++) etc. and very much the Java-Eclipse/Netbeans-Universe does
the other one that punish using object-orientation like Powerbuilder and the old Visual Basic, for example (which is causative the OOP-Idea comes afterwards and is "plugged in").
Especially the demand that all object should always be compiled (regenerated) and that you could't work with ancestors and descandants concurrently makes it painful to use real OOP.
...In memory of the good old Unix(Solaris)/C++ days...
I was researching a replacement solution that would be similar to PowerBuilder and I came across two that caught my eye.
The first was 'React Studio' https://reactstudio.com/ which I found via Alternativeto.net .
And the second was from an ad at the top of some Google searches but it was similar enough and looked good enough at first glance for me to want to take a closer look at it, and it's called 'Servoy' https://servoy.com/ .
Still researching but I currently have React Studio at the top of our list.
The TextPad editor has a syntax definition file for PowerBuilder 6.x contributed by anr#aon.at that I downloaded for free and customized several years ago. It works fine for later versions (including 8), doing keyword color highlighting on PowerScript srx files. Editing large source files in PB could get it to crash so it's usually safer, faster and more convenient to export to srx file, edit outside the IDE then re-import.