Effort Required in Porting a Plugin from Eclipse to Intellij

I developed a plugin (Simplifide) which supports hardware languages (Verilog/VHDL) for the eclipse platform. I strongly prefer Intellij for a number of reasons, and would potentially like to port this to Intellij. The parser and the majority of the data structures are not integrated with eclipse APIs so it should be easy to seperate from this point of view but I have a few concerns.

1. Eclipse has a build function which is called based on file changes. Is there a similar api in intellij?
2. Is there a configurable project structure in intellij?
3. The parsing is based on antlr which I read is problematic. Is this a serious issue or are there potential solutions?
4. I would like to integrate scala as a scripting language, and make my project support both scala and the hardware languages. Is it difficult to programmatically setup a scala project and potentially use some of the internals.

Is there any other reasons why this might be a difficult task?

Thanks  

5 comments
Comment actions Permalink

Hello Andy,

I developed a plugin (Simplifide) which supports hardware languages
(Verilog/VHDL) for the eclipse platform. I strongly prefer Intellij
for a number of reasons, and would potentially like to port this to
Intellij. The parser and the majority of the data structures are not
integrated with eclipse APIs so it should be easy to seperate from
this point of view but I have a few concerns.

1. Eclipse has a build function which is called based on file changes.
Is there a similar api in intellij?


IntelliJ IDEA itself does not run any kind of build process on file changes.
However, it does let you listen to file changes and perform any actions that
you would like to.

2. Is there a configurable project structure in intellij?


I don't quite understand the question. All the project structure configuration
actions that are exposed through the UI can also be performed via the plugin
API.

3. The parsing is based on antlr which I read is problematic. Is this
a serious issue or are there potential solutions?


Our own parsers don't use antlr; we use hand-written recursive descent parsers
based on our own parsing API. Some third-party plugin developers may have
achieved some success integrating antlr-based parsers, but unfortunately
I can't really provide any pointers.

4. I would like to integrate scala as a scripting language, and make
my project support both scala and the hardware languages. Is it
difficult to programmatically setup a scala project and potentially
use some of the internals.


No, it's not difficult to programmatically set up a Scala project. As for
using the internals, this depends on what you would like to achieve.


Is there any other reasons why this might be a difficult task?


You should view the task not as a port but as a development of a completely
new plugin based on the top of our APIs. However, the APIs are there and
well supported, and you'll get much more stuff for free from the IntelliJ
custom language API compared to what you get in Eclipse (at least, that's
my understanding).

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Hello Dmitry,

I am pretty close to attempting this. The real question is where it fits into my schedule. I am in the process of doing some major refactoring and adding a few features. It would be great to do this at the same time. If I could easily get to the point of being able to add simple features for a single file (coloring, completion, hyperlinks, folding) I might want to make the attempt now.

Is there an easy way I can get to this point?
Eclipse has lots of tutorials and examples of how to do things. I haven't seen any for intellij. Is there a good source for this?
Are there any good open source plugins I could use as an example?
I want to move to Scala for development. Am I going to have any issues with using Scala for this plugin?

Thanks for the help,
Andy

0
Comment actions Permalink

Have you seen http://confluence.jetbrains.net/display/IDEADEV/PluginDevelopment
especially "Developing Custom Language Plugins for IntelliJ IDEA"?

However Eclipse probably has more and more complete documentation.
Otherwise: The source code is your friend ;)

On 21.05.2011 01:05, Andy Wagner wrote:

Hello Dmitry,

>

I am pretty close to attempting this. The real question is where it fits into my schedule. I am in the process of doing some major refactoring and adding a few features. It would be great to do this at the same time. If I could easily get to the point of being able to add simple features for a single file (coloring, completion, hyperlinks, folding) I might want to make the attempt now.

>

Is there an easy way I can get to this point?
Eclipse has lots of tutorials and examples of how to do things. I haven't seen any for intellij. Is there a good source for this?
Are there any good open source plugins I could use as an example?
I want to move to Scala for development. Am I going to have any issues with using Scala for this plugin?

>

Thanks for the help,
Andy

>

---
Original message URL: http://devnet.jetbrains.net/message/5303822#5303822


0
Comment actions Permalink

Hello Andy,

I am pretty close to attempting this. The real question is where it
fits into my schedule. I am in the process of doing some major
refactoring and adding a few features. It would be great to do this at
the same time. If I could easily get to the point of being able to add
simple features for a single file (coloring, completion, hyperlinks,
folding) I might want to make the attempt now.


Syntax coloring is the easiest part - it only needs a lexer. For code folding,
you need also the basic parser to be functional. Hyperlinks (reference resolve)
can be built once you have the fully complete parser; once you have that,
you'll also get find usages and rename essentially for free. Code completion
can be implemented in different ways; keyword completion is one, identifier
completion is another. See the custom languages document (linked by Stephen
Friedrich above) for more details.

Are there any good open source plugins I could use as an example?


The source code of IntelliJ IDEA Community Edition contains many parts that
can be used as examples. Also, a very large percentage of the community-developed
plugins are open-source.

I want to move to Scala for development. Am I going to have any issues
with using Scala for this plugin?


Most likely not. Our own Scala plugin is developed in Scala, and is also
open-source.
http://git.jetbrains.org/?p=idea/scala-plugin.git;a=summary

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Hello Dmitry,

As a preface to this, I just want to say that Intellij is by far the best development environment I have ever used and from the user interface side probably the best software I have used for any purpose. This truly is a great design.

I briefly looked into the APIs on Friday as well as the source code, and came to the same conclusion. From what it looked like once the parser was integrated most of the features came for free or relatively easily. The interfaces for your ASTNodes are very similar to what I already have and am using for most of the editting features. I also have ways to deal with the parser failing due to errors although admittedly not optimally. Hopefully this may easy integration. The amount of effort required in building 2 new parsers is far beyond what I want to do.

Long term I am definitely going to create a plugin for Intellij, but it looks like to get things working quickly would require getting the parser integrated which I am guessing would be a substantial effort. Eclipse has seperate interfaces for all these features which allows an easier incremental addition of features. It appears that your approach is tie the parser in and get the other features for free. In truth I prefer your approach, but don't have the time to transition now unless I can have the basics workign quickly.

Thanks,
Andy

0

Please sign in to leave a comment.