Is it possible to write plugin for eclipse other than Java, in Eclipse?
Can anyone help me to write a plugin for eclipse in c++?
@week开发者_开发问答ens and @celavek thanks for the information. I am going through JNI and will try to implement it.
@celavek: what kind of master/control we have to do? is it riskier to handle in C++ and java interface.
My requirement is to add my own property in Preference pages in Java they are using Propertypages package to do that. But how to do it in C++?
The Eclipse framework is written in Java and the whole plugin infrastructure is built around that, which basically means that most of the times you would have to write your plugin in Java(there are other language possibilities to work with the JVM, see comments and the note about Jython below). However there are possibilities to have some of your plugin functionality written in C++(or other languages) and then bridge the C++ interface to Java which will make it available in your plugin. For that you could try using JNI, MS COM, Mozilla XPCOM, CORBA(you could try omniORB) or Swig. I have worked with XPCOM and Swig for a previous job to make this kind of interfacing possible - we had a debugger engine written in C++ and we were exposing the interface/functionality to Eclipse Java plugins via XPCOM. I'm sure there are others alternatives out there e.g. Jython - I've been using this one to write some small scripts in Python and then expose that directly in Eclipse.
Be aware that this kind of interfacing can get very involved sometimes - you would have to have a good knowledge of different technologies and a couple of languages and maintain the interfaces/code in both worlds - at times is a pain but many times you can achieve very nice results. Have fun.
I think, this is possible only with use of JNI. So, you'll need Java anyway. Eclipse plugin infrastructure is a pure Java framework.
精彩评论