How to patch an eclipse plugin? - java

I'd like to fix a bug in an eclipse plugin (an official plugin of the WTP).
I locally changed the source code, debugged it - everything is fine.
Now I'd like to propagate this change to my eclipse installation, but I am facing problems.
There seems to be more than one way to achieve this, e.g.:
This site recommended fragments, but the Eclipse FAQ disadvises that.
But I am stuck and no way seems to work for me.
UPDATE:
I tried to create and install a feature patch, as suggested.
After this installation the feature patch is installed, but not the containing patched plugin.
The previous/existing version of the plugin is still present and active.
I'd like to know why this is the case?
Does this something have to do with signing of the official plugins?
Is there a log to see why the patched plugin has not been installed?
FINAL UPDATE:
The problem was that I patched a parent feature (which has been shown in the eclipse installation details), not the direct feature which directly contained the plugin.
After specifying the correct/"lowest-level" feature for patching, everything worked as expected.

The best approach is to create what's known as a "feature patch". A feature patch consists of the entire new version of the plugin you are patching along with a feature that describes what's being patched. See this useful blog post:
http://aniefer.blogspot.com/2009/06/patching-features-with-p2.html

Related

My SVN Connector in Eclipse 2022-03 (4.23.0) doesn't work

My SVN Connector in Eclipse shows the following message:
Picture of the error message
Can someone help me solve this error? I have Subclipse and Subversive installed.
You need to install only 1 I think. Not sure if installing both causes new problems.
There are several issues with both subclipse and subsersive.
Both I think can use a java library called " SVNKit" or use a native library "JavaHL" to access SVN.
The error complains about javahl missing. You manually hjave to install javahl in your system, eg How to upgrade JavaHL on Ubuntu?. But even then it often does not work. I think this is due to version conflicts or so...
The alternative, svnkit, is less prone to such version conflicts. Adapters are not used by default however, apparently nobody has time to fix the libraries to use them properly. So they sometimes work, sometimes not. There also is a problem with java >9 because the svnkit library (at least the usual version) uses some java calls that have been restricted/security-walled in newer java. Not sure how/why/which versions, it also depends on the OS. You need to dig down in the preferences/settings to disable the JavaHL and turn on the SVNKit.
Overall both adapters need a lot of massaging and it's totally unclear to me which adapter works on which system and eclipse version.

How to use Esapi 1.4.4 package in web application

I am currently working on a project that uses JDK 1.4. So its just turned out to be that we have to use ESAPI 1.4.4 which is the only version compatible with JDK 1.4 . I downloaded it from the following path https://github.com/esapi/esapi-java-legacy but it doesnt seem to be a jar file . I couldnt figure out how to include this in my eclipse project or how to bring it into my classpath. Is it possible to get the JAR ??? Someone please guide me how to use it or any sample project for reference is sufficient .Thanks in advance
Ditching JDK 1.4 is my top recommendation as well. But if that is not an option for some reason, then I would try pulling down the ESAPI code base from GitHub (https://github.com/ESAPI/esapi-java-legacy), changing the tag under the maven-compiler-plugin plugin from 1.7 to 1.4 and see if it compiles. Much of it probably will be fine, but you likely will have some huge 3rd party FOSS dependency issues so you will have to adjust those. So, before you go down that route, figure out what exactly it is that you need. If you only need ESAPI's output encoding, use the OWASP Java Encoder Project instead. Various other substitutes are described here: https://www.owasp.org/index.php/Category:OWASP_Enterprise_Security_API#tab=Should_I_use_ESAPI_3F
Good luck.
-kevin

When update eclipse, it turns to another version

I was using eclipse IDE for java Developers, then a notification for update comes through, I've accepted it, everything is ok, restart needed, ok.
after opening, I've shocked that it became IDE for Web Developers, and all my projects became full of errors, and can't make a new java project.
I can't just download another version of eclipse for java ee, because I have a lot of plugins installed, and many configurations made.
How I can return back to the previous version?
Any suggestions please
You should be able to download and install the older version of Eclipse again:
Don't try to reinstall on top of your existing installation. Move or copy the existing Eclipse installation directory somewhere else before you start.
I would also advise making a backup of your workspaces before you do anything else. It is unlikely that the upgrade / downgrade will do any damage, but you can't be too cautious.
The errors that you are seeing are likely to be due to a simple Eclipse configuration problem, or maybe a problem with versions of third-party plugins. If you told us what the errors were, someone would be able to tell you how to fix them. Then you can use the newer version of Eclipse.
I can't just download another version of eclipse for java ee, because I have a lot of plugins installed, and many configurations made.
Actually, neither of those things prevent you from doing that. Downloading and reinstalling will be inconvenient ... but it is probably your best option.
Note that you could either download and install the new version of Eclipse, or you could download and install the version you were using previously.
I think it's no matter. I suggest to you use Spring Tool Suite based on Eclipse 3.**; You don't have to deal.

'API Tools Javadoc Proposals' issue in eclipse

So I was working on eclipse when I received this issue
The 'API Tools Javadoc Proposals' proposal computer from the
'org.eclipse.pde.api.tools.ui' plug-in did not complete normally.
The extension has thrown a runtime exception.
This happened directly after I installed Java-8 into eclipse.
Now my understanding that this is a comparability issue so I tried multiple things as shown below, however I still face the same issue
1- I have tried help->Check for Updates
So it performed some updates normally but the same issue remained as it is
2- I have tried help->Install new Software to install JAutodoc
So I got the link for their website and installed the latest update I believe, however the same issue remained.
Website: http://jautodoc.sourceforge.net/
Update link: http://jautodoc.sourceforge.net/update/
As for someone not familiar with this tool, I believe that I might have forgot something. However searching through the internet did not help me.
Any suggestions ?
See this bug report: https://bugs.eclipse.org/bugs/show_bug.cgi?id=433918
Like the poster in the bug report, I was able to fix this (in Kepler) by uninstalling everything to do with the Groovy plugin. After uninstalling the groovy pieces I had to reinstall java 8 support from this Kepler-specific link, and then I was able to reinstall the Groovy plugin using the J8-specific groovy eclipse link in the bug report: http://dist.springsource.org/snapshot/GRECLIPSE/e4.3-j8
Then once I fixed the compiler compliance level in my project to 1.8, things were working again.
(Took me a while to find how to uninstall things: Help -> Install new software, and then click the little "already installed" link at the bottom.)
From the bug report, it sounds like this bug wouldn't happen in a newer Eclipse (Luna or Mars.)
I just ran into the same problem today.
I solved it as follow (I have a mac, instructions for other operating systems might differ)
Open Eclipse
About Eclipse
Installation Details
*Find org.eclipse.pde.api.tool.ui
*click update.
Updating the plugin solved my issues. I am not sure if this solution works for everyone but it works for me.

Do Eclipse workspaces depend on a specific Eclipse version?

Perhaps a newbie question, but I could not find an answer on this one.
Question: Do Eclipse workspaces depend on a specific Eclipse version (and analgously: do Eclipse projects depend on a specific Eclipse version)?
For Example, on a workspace created with Eclipse 3.x, should I only work with Eclipse 3.x or can I also work on this workspace with Eclipse 4.x.
The answer is: it depends.
It depends on the plug-ins you're using, on how well they've each been written to deal with this case, and how prone they are to migrating metadata without your consent rather than simply using what's there.
Yes it depends. See this link Plugin Migration Guide.
Here you find some guidelines to migrate.
There is always a chance of something happening, so it's a good idea to back up your workspace in case you need to fall back to an older version of eclipse. However, in most cases you shouldn't have an issue, provided you don't have your workspace inside your Eclipse installation directory. You can find more information about upgrading and workspaces from help.eclipse.org:
http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Ftasks%2Ftasks-2.htm
Hope this helps.

Categories