You can create a patch and make it work for you in the following four steps:
Phase 1 : Create a plug-in project for the plug-in you need to patch.
- Create a new workspace (recommended) or open an existing one.
- Choose
File → Import - Expand
Plug-in Development , select Plug-ins and Fragments , then click Next - Under
Import As select Projects with source folders and then click Next . - Type (or copy and paste, no quotes)
org.eclipse.wst.server.preview.adapter in the ID field at the top and click Add All . This should move this one plugin to the right pane. - Click
Finish to import the org.eclipse.wst.server.preview.adapter file. plug-in to the project. - Expand the root of the project and make sure that it contains a folder named "CSI". You will only get the "src" folder if you have the "WST server" Adapter Plug-in Developer Resources ".
Phase 2 : Apply the changes needed to update the plug-in. Since there is a bug with a patch attached that can be used to apply the changes, the following steps will take advantage of that Phase 2 : Apply the changes needed to update the plug-in. Since there is a bug with a patch attached that can be used to apply the changes, the following steps will take advantage of that .
- Open Error 402848 in the browser.
- Click on the
Patch v1.0 for 3.4.2p binding link to open the patch. - Starting with the second appearance of the line starting with
--- , select this line at the end of the text and copy it to the clipboard. This contains changes to the PreviewLaunchConfigurationDelegate.java file in which a fix is needed. You do not need the top of the patch, as this will change the version of the plugin, and this will complicate the situation. - In Eclipse, right-click the project "org.eclipse.wst.server.preview.adapter". Select
Team and click Apply Patch . - Leave the clipboard selected and click
Next . - Make sure the project is "org.eclipse.wst.server.preview.adapter" and click
Next . - Set
Ignore leading path name segments to 3. The Patch Content "should change to the blue arrow on the left instead of the red x indicators. - Click
Finish to apply the changes.
Phase 3: Create the replacement jar. Due to the approach in Phase 1, the name of this jar will be identical to your current jar, which simplifies updating the Eclipse installation.
- Right-click on the project
org.eclipse.wst.server.preview.adapter in Project Explorer or another navigation view and select Export - Expand
Plug-in Development , select Deployable plug-ins and fragments , then click Next - Click the
Browse button next to the Directory option on the Destination tab, and then OK. This will set the output directory to the same as your workspace. - Click
Finish to create a replacement plugin. It will appear in the “plugins” folder under the root of your workspace.
Phase 4: Replace the installed plug-in jar with the fixed version.
- Close Eclipse if it is running.
- In the plugins folder of your Eclipse installation, move or rename org.eclipse.wst.server.preview.adapter_1.1.101.v20121107_1651.jar if you do not want to overwrite it with the corrected version (mentioned in step 3 below). If you have a different version, it means that you are not using Juno SR2, and I hope you have installed the "Plugin Developer Resources for WST Server Adapters" that match your version.
- Copy org.eclipse.wst.server.preview.adapter_1.1.101.v20121107_1651.jar from the plugins folder under your workspace and paste it into the plugins folder of your Eclipse installation.
You can now start Eclipse using a fixed plug-in. Since the corrected jar had the same version number, no further changes are required.
Hope this helps!
source share