Adding different versions of same plugin in Feature file - eclipse-plugin

While trying to generate build we get some plugin dependencies. When trying to add them in .product file, It shows plugin version as 0.0.0 by default. We have a situation to add more than one version of same plugins.
We tried to manually change 0.0.0 to the required version from the dependencies. We are successfully able to launch the application. But while trying to generate a build we get some errors.We have the required plugins installed.
If anyone knows how to add different versions, the help is much appreciated.
Edit:
Image showing the problem
This is the problem we are facing
The solution we tried
We tried manually changing version number but creates error during build generation

I'm not sure that this scenario is supported by PDE Build, because it sounds exotic a bit.
You can try to use different features to introduce different version of bundle.
But I think that more promissing strategy will be to "align" your dependencies, i.e. in your case it is better to select the version of GMF that uses the right Batik version.
Otherwise sooner or later you will get "blocking" bundle with singleton:true in your dependency tree, as #greg-449 mentioned.
Also, please have a look at this question: Tycho | How to build multiple version of same plugin using tycho

See my answer there:
https://stackoverflow.com/a/62426443/9062163
In fact the details I mentioned in my other answer where the result of a successful integration of Sirius 6.0.1 in an Eclipse RCP based on Photon. The troubles came from the integration of Batik 1.7 and 1.6 in the same product, the latter version being forced by the GMF version I use. I also needed some batik plugins of versions 1.8.0 and 1.9.1 for other reasons.

Related

Add two plugins of same version

How to add two plugins of same name with different version in eclipse product file?
For example - lua editor plugins has a plugin named com.naef.jnlua which has two versions 0.9.1 and 1.0.3 both the versions are needed to be added.
I am developing an eclipse plugin product and I want to add both the plugins to my .product file but my file is considering only the latest version of the plugin com.naef.jnlua.
Note: Eclipse IDE is accepting both versions.
Help me to solve the issue.
I use Eclipse Photon and could observe the following:
In the product editor, the "validate..." button might indicate a problem for each plugin with at least 2 versions in the current target that is referenced by the product.
e.g. Missing constraint: Require-Bundle: org.apache.batik.css; bundle-version="[1.6.0,1.7.0)"
BUT this does not prevent from exporting the product! This is just misleading and it took me hours to understand this.
I managed to include 2 versions of some plugins of the org.apache.batik framework in one product
In the product I had only one line, it specified the version that was not found during a previous build (try without version first, it worked also for me sometimes)
<plugin id="org.apache.batik.css" version="1.6.0.v201011041432"/>
I found as expected the 2 jars in the generated p2 repository\plugins folder created by the product export wizard:
org.apache.batik.css_1.6.0.v201011041432.jar
org.apache.batik.css_1.9.1.v20180313-1559.jar

Create a old Play 2.3.1 framework (current is 2.4.3)

Problem
I'm trying to create a Play 2.3.1 framework, because the lack of info on how to get started with 2.4.3. So much has changed apparently that the tutorials on youtube is useless and I can't get it to work.
Question
How do I do this?
I have tried to go to https://www.playframework.com/download#older-versions but all versions yield the same link to https://downloads.typesafe.com/typesafe-activator/1.3.6/typesafe-activator-1.3.6-minimal.zip
which installs the newest playframework 2.4.3.
Please say that someone knows how to do this?
Also, why should I bother using 2.4.3 > 2.3.1 if I'm only creating a simple mobile app w/database? Security reasons or just "easier"?
Same question for IntelliJ 14 > IntelliJ 13 ?
https://www.playframework.com/download#older-versions is the link you need.
When you're new to Play! it can be quite confusing so I think a bit of terminology is needed.
SBT - Scala build tool. This is a build tool that is baked into every Play! project but totally independent of Play! framework, ie. many Scala projects use this to manage their builds without ever using Play! It's just the Scala equivilient of a Maven, Gradle or Ant. Nothing special.
Activator - This is Play!'s commandline, like a build-tool++. It's commandline tool with a superset of the SBT commands clean compile etc etc, with Play! specific ones like 'new', 'run'. It actually just amounts to not much more than a script (.sh/.bat) which bootstraps SBT and some extra goodness for running play commands. In earlier versions like 1.x this command was named play. Version 2.x was a practically a re-write so you can ignore all related advice.
Play - the playframework itself is just a regular jar (and all its dependencies). It is declared in the project/plugins.sbt
So the reason all the download links point to activator-1.3.6 is because that is just the version of the commandline tool. This will default to latest: 2.4.x.
When you perform an activator new you get a choice of templates. If you REALLY REALLY want to use 2.3.x you could choose this template when prompted hello-play-2_3-scala.
But I don't suggest you do that because:
The documentation for 2.4.x is comprehensive and there are walkthrough guides, it won't take any longer than a youtube video.
There are bug fixes and new features in 2.4.x
2.4.x introduced dependency injection which means it will be harder to upgrade once you'ved developed everything in 2.3x.
Apart from dependency injection most stuff works the same in 2.4.x
Intellij:
Use 14. Play support is improving all the time. If you can use the Early Access Program and the latest version of the Scala plugin.
Don't run 'activator idea' - this is deprecated. File -> open project from Intellij should be enough.

go lang plugin for Intellij IDEA 14.0.x

Is it possible to setup go language pluing for Intellij IDEA 14.0.3 version?
I tried to download the binary plugin (jar) from https://plugins.jetbrains.com/plugin/5047?pr=idea but the version 0.9.15.3 listed here is old and does not recognize GOROOT and GOPATH.
I tried to build the latest plugin using sources from https://github.com/go-lang-plugin-org/go-lang-idea-plugin using Intellij but failed to setup the SDK.
Is there a latest binary version of the go lang plugin available?
Update to IDEA 14.1+ or use the IntelliJ Community.
Original answer:
You can use the free version of IntelliJ Community with the latest version of the plugin and everything should work fine. Also, Android Studio for example is compatible with the plugin as well.
Unfortunately the plugin has some internal dependencies which makes it hard to port back and maintain for multiple IDEA versions. Hope this helps
It might be not the exact answer your are looking for but their is a separate IDE for go developer . it has some unique features you must try GOLAND First month is free.
I also faced up this problem couple days ago. You can download nightly version of go plugin from this link.
You must install this plugin via browse your download folder not repository

How do I get a plugin with platform specific code to deploy to the correct platform using an eclipse p2 repository?

I have an Eclipse Feature that I'm building that contains a few plugins. One of the plugins uses the import package statement to declare a dependency on another plugin.
The other plugin has platform specific code and exists in another feature that I'm building. I have two plugins in this feature that have the platform specific code. One for os=win32 arch=x86 and the other for os=win32 arch=x86_64
Both features are being built and using Tycho and they both have p2 repositories that are successfully available.
So, I made a composite repository that points to both of these repositories, and then I use the "Install New Software..." command in my RCP app and point to the composite repository to install the first feature I mentioned.
The issue is that when the installation is done, the plugin that has the platform specific code has failed to install correctly. Specifically, the plugin for the x86 system shows up on my 64bit machine.
In your feature.xml, choose the plugin with platform specific code and add a platform filter. the filters are available on the right side (once you select the plugin). You can choose filters such as:
OS
WS
Language
Architecture
When your feature is published, p2 will generate the appropriate filters.
I found the answer.
I needed a p2.inf file sitting next to my feature.xml file in the first feature I mentioned in the question.
And in that p2.inf file, I needed this text...
requires.1.namespace=org.eclipse.equinox.p2.iu
requires.1.name=com.myplatform.specfic.bundle.win32.x86
requires.1.filter=(&(osgi.os=win32) (osgi.arch=x86))
requires.1.namespace=org.eclipse.equinox.p2.iu
requires.1.name=com.myplatform.specfic.bundle.win32.x86_64
requires.1.filter=(&(osgi.os=win32) (osgi.arch=x86_64))
I added this file to the build.properties as well to make sure it was included in the deployed feature
Then when I deployed the p2 repository and performed the install into my RCP application, the correct plugin was placed onto my 64 bit machine.
UPDATE: I was wrong here. This is NOT the correct answer. The incorrect plugin still gets installed on some machines.

The best way to clean your plugins out of eclipse 3.2

Since the configuration manager and update manager for eclipse 3.2 is devoid of nice options for REMOVING or DELETING all my plugins it can be cumbersome to deal with needing to get your plugins in order. Just getting your dependencies worked out can be a nightmare when you have installed one version too high than you needed depending on the jdk version you are developing for.
Other than trashing the files in the plugins and features directory (which sometimes works) what other options do we have in a M$ environment?
In the situation where you are using RAD 7 you have to deal with the shared SDP70Shared folder too which is a bit ethereal as well.
I want to see a fool proof way to clean house for regular eclipse 3.x, RAD, or any all in one package that will work.
Eclipse 3.2 has "uninstall" feature for plugins under Help->Software updates->Manage configuration.
Eclipse 3.4 has the same functionality under Help->Software updates->Installed software
You could do a complete uninstall of eclipse and use a custom eclipse builder like http://www.yoxos.com/ondemand/]1 to create a build with the base set of plugins you use. I don't recall how eclipse is configured in Windows, but in Linux there's usually a hidden project directory in your work space that you may want to remove just in case. I'm not sure if there's any registry settings you need to worry about though.
The best solution I have found thus far is to uninstall and rebuild from scratch. Sometimes you can delete files in the plugins dir and run CCleaner on the registry and that might fix issues but it is problematic depending on the situation. If there were an application that really could make sense of eclipse plugins everyone would use it but there isn't.
Though it's not recommended to manually remove plugins managed by p2,
I find a regular plugin cleanup greatly improves performance and postability,
especially if you have a master eclipse configuration copied and shared
with multiple developers. In that case it's better to just archive the
master eclipse install instead of relying on everyone to update their
configs in synch.
see
How to remove old versions of Eclipse plugins?