6

As far as I understand Eclipse doesn't provide user with python bindings by default. Nor any projects of such kind was I able to find with google.

Are there any third-party plugins for that? Any tutorial? May be with Jython?..

lithuak
  • 6,028
  • 9
  • 42
  • 54

1 Answers1

7

As far as I know, you need to use Java. Eclipse is written in Java, and even the vanilla application is made up of several Java components glued together by the core plugin loader. Jython might work if:

  • you can cross-compile Python to Java bytecode (indeed you can, thanks to sayth for pointing that out), and
  • you can access the Eclipse APIs inside Jython.

So, here's more or less what your plugin's architecture might look like. If you can get at the Eclipse APIs, then you can write most of it in Jython, and then make a Java wrapper for it with the Embedding Jython instructions.

If you can't get the Eclipse functionality into your Jython, then you can still write some of your code in python, and then have the Eclipse API access happening on your Java layer. This will be annoying in proportion to how evenly split your code is between python and Java. I've worked on a project before where we embedded python into C++ (or it might have been the other way around...), and it's a major headache if you don't plan it out right.

andronikus
  • 4,125
  • 2
  • 29
  • 46
  • Do you think that IPOPO or Pelix could make it easier to write Eclipse Plugins in Python? https://www.eclipsecon.org/europe2013/sites/eclipsecon.org.europe2013/files/osgi2013-pelix-prez.pdf – Stefan Feb 20 '16 at 13:40
  • Related question: http://stackoverflow.com/questions/1765802/using-jython-from-eclipse-plugin – Stefan Feb 20 '16 at 13:48