"One does not simply write an Eclipse plugin" AKA the lack of documentation for newcomers #3481
Replies: 3 comments 12 replies
-
It could help to explain what you tried, maybe even share the code in a public repository and link it here, but basically PDE == Development Time, Tycho == build time even though you can use other tools as well of course.
I think most assume that you have some basic knowledge yes but this one should give a quite good first introduction for newcomers: https://www.vogella.com/tutorials/eclipseplatform.html
The easiest is using a structured layout then Tycho will find everything itself usually: Also there are some demo projects around (even though they are very basic and could need polishing):
PDE is not deprecated, only the (ant) base pde-build tool, but you wont need that at all for first steps and can do everything from your IDE, e.g. if you develop an Eclipse Plugin you don't need a target platform at all, just use your running Eclipse as a target
You usually use PDE to run/debug and maven/tycho to build/publish it with your CI
It depends, you usually have two classes of dependencies:
after that, you will import them in your manifest and can use them as you would for a regular jar based project
I think that's a bit out of scope here but basically if you have a jar somewhere around you can use it.
There are several way and the answer depends on how you define "properly" but the most common way is publishing a P2 site what usually is just an almost empty project with a
I would suggest to postpone this topic unless you have setup a basic example but this usually only requires to add some metadata to your plugin and the rest is java as usual
If you can setup the necessary toolchain and it produces a classfile in the end why not.
I can't tell about that because I don't know kotlin nor the plugins, but the developers of these plugin for sure desire feedback / enhancements from skilled users.
Its hard to give advice based on this, basically, yes and yes and maybe :-) Finally if you need any dedicated support or training regarding Eclipse/Tycho feel free to contact me or see: |
Beta Was this translation helpful? Give feedback.
-
So I created the structure as described in https://tycho.eclipseprojects.io/doc/4.0.5/StructuredBuild.html, but it seems that Tycho requires a target platform or it fails to run, but I can't see any documentation for how to create a basic target platform for developing an Eclipse plugin agains't version X of Eclipse, the default of just using the running Eclipse isn't working when running from Maven/Tycho. Also when opening the pom.xml from that doc in Eclipse, I'm getting an I guess for some shared resource that is per plugin I can start a singleton from the activator, but is there anything for per project state? Is there a more appropriate place for plugin development specific questions? |
Beta Was this translation helpful? Give feedback.
-
m2e supports it but lemminx (the editor used by m2e) seems not, this is similar to: but you probably want to open a dedicated issue.
See https://tycho.eclipseprojects.io/doc/latest/TargetPlatform.html |
Beta Was this translation helpful? Give feedback.
-
I wanted to explore what it would take to write an Eclipse plugin for the product in the company I work at (We already have a VS Code and IntelliJ plugins), I tried doing the obvious thing and simply downloading Eclipse and trying to create a plugin using the PDE wizards, but it felt like something is missing there, and reading around, and looking at the GitHub repos of core Eclipse plugins, it seems like stuff has shifted to using Tycho instead, with no indication or guidance as such in the Eclipse IDE itself, nor any obvious way to get started.
Any documentation seems strewn about random sites in the Internet, and it all feels rather incomplete, or expects that you have a lot of arcane knowledge in setting up Maven, p2, OSGi (Or maybe just be one of the guys who developed Eclipse in the first place) to actually figure out what anything does. Or maybe I just failed to find the proper docs? Doesn't seem that way though.
With the rant out of the way, I'll list a bunch of questions about stuff that I can't figure out what's the right way to do or do at all in the hopes that someone will help, and maybe also to point out what's missing from whatever documentation that does exist:
How are you supposed to create a new Eclipse plugin project? There is no obvious wizard, official arch type or anything like that to create a new project using Tycho, the wizards in Eclipse seem to use PDE/Build, which is documented as deprecated... and there seems to be a bunch of configuration that one would want to do for a proper setup that has no documentation either, such as, configuring a target platform, API Tools target?, and so on.
If PDE/Build is deprecated, how do you open a Maven/Tycho project in Eclipse, do you import it as a maven project? How do you run/debug it then?
How do you use dependencies? and publish a plugin using them? This isn't a run-of-the-mill Java classpath project, and I can't figure out what's the right way to use dependencies in either PDE/Build or Tycho, with multiple conflicting sources of information around the Internet, from copy Jars to this directory, to random Maven snippets that download Jars to a directory automatically, to assorted CLI commands, wizards, or Maven pom.xml to convert libraries to Eclipse plugins, to mysteriously adding them to the target platform, and publishing the plugin with them somehow working?!, And the whole OSGi vs non-OSGi thing... I have existing vanilla Java/Kotlin code I'd like to use which is built with Gradle and uses various libraries, no idea how to integrate such a thing into an Eclipse plugin.
How do you properly publish? There are random instructions around using either assorted Eclipse wizards, update site projects, or Tycho to build an "update site"/"repository", and I won't be surprised that some of those create legacy update sites... What's the up-to-date way? And further more, how do you publish updates to an existing such update site/repository? If you just FTP the thing it will overwrite the old versions, making them no longer available...
How would you handle native binaries/executables that you want to vendor and run from the plugin?
Can you use Kotlin in an Eclipse plugin? As we have plenty of existing Kotlin code we might want to use rather than convert to vanilla Java.. But I heard that Kotlin support in Eclipse is either bad or outright broken (The "official" plugin just breaks Eclipse)... Being a language developed by JetBrains and all, their focus is on their own IDEs after all...
I remember the Eclipse browser used to use the system browser component, e.g. IE on Windows...But I'd heard there is a way to get it to use CEF instead (Though my experience with CEF was that it is buggy to the core). How would you configure a plugin to depend on and use that?
Beta Was this translation helpful? Give feedback.
All reactions