I'm trying to create a language plugin for intellij idea, for sweet js.
Is there any way i can get the syntax highlighting and other javascript language support for my project from existing javascript language support in intellij idea?
I don't think this would be possible. The JavaScript plugin works with a syntax tree that has a certain structure, and sweet.js allows to change the structure in all sorts of ways that the plugin will not be able to work with.
Also, the plugin is not open-source and does not expose any documented APIs, so it's very challenging to build something on top of it even for the tasks which do fit well with the plugin's design.
Related
I love Jetbrain's Idea IDE and its ergonomics. One of my favorite tools is idea's rearrange code 'action'(you can bring it up by hitting ctrl+shift+a). It rearranges the code in the java file to put methods in alphabetical order and order the fields in an organized fashion that the user defines. For whatever reason, it doesn't work with Jetbrain's own language, kotlin :(. This sucks even more with the fact that kotlin quickfixes the fields right above the method instead of the beginning of the file like most java files. When is Idea going to support rearrange code for kotlin files?
The reason why the feature does not work is simple: because it has not been implemented. IntelliJ's current Java support feature set has been developed over more than 15 years, and replicating all of Java support features in a new language plugin takes time. We're prioritizing features in the Kotlin plugin for IntelliJ IDEA based on user feedback and language evolution requirements, and so far we haven't seen an indication that code rearranging is in high demand.
Specifically the issue of placing properties by the Create from Usage fix can be fixed with relatively little effort, and doesn't require a full rearrange implementation. I've filed an issue for it.
I am making a eclipse plugin. I began with the default MultiPageEditor wizard and implemented the specific functionality that I wanted. Now, I wanted to get features like Java syntax highlighting, error detection etc. that comes with the standard JDT plugin, in the custom editor that I have written.
Questions:
1. Is this even feasible ?
2. If yes, what will be quickest way to achieve this.
Why not just sub-class the JavaEditor or the CompilationUnitEditor and add it as a page to your MultiPageEditor?
I have a question for you. My teacher proposed a couple of thesis to me. Basically to develop a plugin for eclipse. There are 2 options:
1)An editor for A-SPL language with syntax highlighting, auto completation of the cose, errors detection and so on........to help people that need to use S-APL
2)An editor to help people to design GUI in S-APL......something like a framework where you can drag widgets and there is a kind of automatic completation of the code....
The thesis should last 4 months......i should not implement everything but make a kind of prototype that maybe in the future someone will finish and make properly work.
I never did something like this so i would like to know if it is difficult, which skills are needed, which languages i should know to create eclipse plugins (for example i know java and python) and so on......to figure out if it is something i can do.
I'd suggest to look into the Xtext (for a textual editor) and Graphiti (for a graphical editor) projects.
You'll need Java for Eclipse plugins.
You need to read a book / the eclipse plugin wiki about Eclipse architecture as it's critical to know the paradigms in use.
There's an example XML plugin editor that you can create from the 'New Plugin' wizard which would be a good starting point for the first option.
good luck. :)
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.
I'm working on a project that requires me to create a series of editors for languages that are quite different. The syntaxes are defined by us.
I'm looking for a solution for this.
Is there a shortcut to take in this problem?
You could use XText:
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.
Alternatives to XText are Rascal or Spoofax, both less popular than XText but interesting for they support more general context-free grammars, among other things. Nice to check out.
If you are looking for a more low level, programmable solution, then Eclipse's IDE Meta-tooling platform is a good choice (IMP).
What IMP gives you is API to connect your existing parsers to Eclipse without much hassle. You need to implement an IParseController interface, to call your parser and ITokenIterator to produce tokens and some other interface to assign fonts to each kind of token.
The aforementioned Rascal and Spoofax are both build on top of IMP.
Not mentioned is DLTK (proposed also in Tutorial regarding the development of a custom Eclipse editor)
There are Ruby, bash that are implemented with it.