Home » Eclipse Projects » Eclipse Platform » how to create and install a feature patch
how to create and install a feature patch [message #335310] |
Tue, 31 March 2009 18:13 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Jon Barrilleaux![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=jonb%40jmbaai.com) Messages: 25 Registered: July 2009 |
Junior Member |
|
|
I developed a patch to fix a bug in the Java code formatter
(org.eclipse.jdt.core). I tested it in my local workspace, now I want to
turn it into a patch for general use by myself and others. I'm assuming
that a "CVS patch" only deals with projects in my own workspace. I think
what I need is a "feature patch" targeted to my runtime
installation/plugin target platform.
I've googled around, looked through the eclipse help, cheatsheets, wiki,
FAQs, etc., and even attempted to make a "feature patch", and then
reference it in a target platform configuration, but to no avail.
Any pointers on how to make and install a patch for the "target platform"?
|
|
| | |
Re: how to create and install a feature patch [message #335342 is a reply to message #335341] |
Thu, 02 April 2009 23:03 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: francis.oaklandsoftware.com
I don't know that much about this stuff (and this all might be wrong), but
you might be running into a version restriction on the referenced to the
plugin you are installing. in other words, the references to the plugin
might be referencing a maximum version of 3.5.0, adn 3.5.1 is outside of
that. I suggest you use 3.5.0.xxx where XXX is larger than the numeric
qualifier of the existing version of the plugin.
If you are getting ".qualifier", you should change your export so you get
a real numeric value (typically something like 20090331-4000).
HTH,
Francis
On Thu, 02 Apr 2009 14:04:42 -0700, Jon Barrilleaux <jonb@meyersound.com>
wrote:
> I tried again, by bumping the plugin version from 3.5.0.qualifier to
> 3.5.1.qualifier. When I try to install the patch the installer complains
> that the operation cannot be completed....
>
> "Java Formatter Patch" is not applicable to the current configuration and
> will not be installed.
>
>
--
Common Navigator Framework section in Platform Plugin Developer Guide
(Programmer's Guide)
http://help.eclipse.org/ganymede/topic/org.eclipse.platform. doc.isv/guide/cnf.htm
http://dev.eclipse.org/blogs/francis
http://wiki.eclipse.org/Common_Navigator_Framework
http://wiki.eclipse.org/Common_Navigator_Framework_Use_Cases
You have brains in your head.
You have feet in your shoes.
- Dr Seuss, Oh the Places You'll Go
|
|
|
Re: how to create and install a feature patch [message #335343 is a reply to message #335342] |
Fri, 03 April 2009 00:27 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Jon Barrilleaux![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=jonb%40jmbaai.com) Messages: 25 Registered: July 2009 |
Junior Member |
|
|
I changed the plugin version from the original, 3.5.0.v_944, to 3.5.0.v_999.
In the feature patch, I also changed the target feature from 3.5.0 to the
exact one that is currently installed,
3.5.0.v20090311-0800-7p86FEeFHmHunD_LjVCUTgZ.
When I went to install this new feature patch, this time the updater did not
complain, went through the motions, and asked me if I wanted to restart, to
which I said "yes".
However, nothing seems to have changed in the target Eclipse IDE. In
examining the install details I see that the old plugin is still there
(which I confirmed by actually testing the patch in the code formatter).
--jon
|
|
| |
Re: how to create and install a feature patch [message #335345 is a reply to message #335343] |
Fri, 03 April 2009 00:44 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: francis.oaklandsoftware.com
Jon, I realized that I tried something similar before with attempting to
patch an existing Eclipse plugin and the answer I found was you simply can
not do it, that is you can't prevent the original version of the plugin
from loading and once that's loaded it's all over in terms of getting your
classes in (you can have your plugin go after the original plugin in the
class loader sequence, but not before, so I will always pick up the
original version of the class and not the replacement version). This is
an OSGi issue in the way they they resolve bundles.
To get further clarification about this, I suggest you post your original
problem on the p2-dev mailing list; they should be able to confirm this.
Francis
On Thu, 02 Apr 2009 17:27:04 -0700, Jon Barrilleaux <jonb@meyersound.com>
wrote:
> I changed the plugin version from the original, 3.5.0.v_944, to
> 3.5.0.v_999.
> In the feature patch, I also changed the target feature from 3.5.0 to the
> exact one that is currently installed,
> 3.5.0.v20090311-0800-7p86FEeFHmHunD_LjVCUTgZ.
>
> When I went to install this new feature patch, this time the updater did
> not
> complain, went through the motions, and asked me if I wanted to restart,
> to
> which I said "yes".
>
> However, nothing seems to have changed in the target Eclipse IDE. In
> examining the install details I see that the old plugin is still there
> (which I confirmed by actually testing the patch in the code formatter).
>
> --jon
>
>
--
Common Navigator Framework section in Platform Plugin Developer Guide
(Programmer's Guide)
http://help.eclipse.org/ganymede/topic/org.eclipse.platform. doc.isv/guide/cnf.htm
http://dev.eclipse.org/blogs/francis
http://wiki.eclipse.org/Common_Navigator_Framework
http://wiki.eclipse.org/Common_Navigator_Framework_Use_Cases
You have brains in your head.
You have feet in your shoes.
- Dr Seuss, Oh the Places You'll Go
|
|
| |
Re: how to create and install a feature patch [message #335363 is a reply to message #335357] |
Fri, 03 April 2009 20:04 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Jon Barrilleaux![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=jonb%40jmbaai.com) Messages: 25 Registered: July 2009 |
Junior Member |
|
|
In eclipse/features is see my feature patch as a directory, containing a
manifest and a feature.xml file (included below). In the eclipse/plugins
directory I do not see my version of the plugin .jar file.
For grins, I tried manually adding it, but the system does not use it. i
then tried deleting the old plugin, leaving only my new one, but the IDE
complains a lot. I then tried modifying the org.eclipse.jdt feature.xml
file to reference my version of the plugin instead of the old version, but
the system still urps (i'm guessing there must be other dependencies on that
specific version).
The only way I have been able to get it to "work" is to replace the old
plugin jar file with the newer version, but using the old name. And, as
expected, when I run the IDE I see the effect of my new code. Obviously this
is a crude hack and not an adequate solution.
BTW: I've been delving into the whole matter of how quirky and brittle the
update cycle/system is, and described my findings in Bug 271022. Perhaps
this matter of feature patches and IDE updates should be added to that list.
--jon
==========feature.xml file for my feature patch=================
<?xml version="1.0" encoding="UTF-8" ?>
- <feature id="org.eclipse.jdt.patch" label="Java Formatter Patch"
version="1.0.5" provider-name="Meyer Sound">
<description>Patches the code formatter such that wrapped line indentation
can consist of tabs and spaces.</description>
<copyright>none</copyright>
<license>none</license>
- <requires>
<import feature="org.eclipse.jdt"
version="3.5.0.v20090311-0800-7p86FEeFHmHunD_LjVCUTgZ" patch="true" />
<import plugin="org.eclipse.core.resources" version="3.3.0"
match="compatible" />
<import plugin="org.eclipse.core.runtime" version="3.3.0"
match="compatible" />
<import plugin="org.eclipse.core.filesystem" version="1.0.0"
match="compatible" />
<import plugin="org.eclipse.text" version="3.1.0" match="compatible" />
</requires>
<plugin id="org.eclipse.jdt.core" download-size="0" install-size="0"
version="3.5.0.v_999" unpack="false" />
</feature>
|
|
| |
Re: how to create and install a feature patch [message #335410 is a reply to message #335397] |
Mon, 06 April 2009 18:19 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Jon Barrilleaux![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=jonb%40jmbaai.com) Messages: 25 Registered: July 2009 |
Junior Member |
|
|
To create my version, I simply copied the original version, and then changed
a couple source files with my fixes. (From what I have read, there seems to
be no way to simply "patch" the class files -- plugin fragment is not
intended for this use. If this is wrong, please let me know.).
Here is the manifest file....
==========
Manifest-Version: 1.0
Main-Class: org.eclipse.jdt.internal.compiler.batch.Main
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jdt.core; singleton:=true
Bundle-Version: 3.5.0.v_999
Bundle-Activator: org.eclipse.jdt.core.JavaCore
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Export-Package: org.eclipse.jdt.core,
org.eclipse.jdt.core.compiler,
org.eclipse.jdt.core.compiler.batch,
org.eclipse.jdt.core.dom,
org.eclipse.jdt.core.dom.rewrite,
org.eclipse.jdt.core.eval,
org.eclipse.jdt.core.formatter,
org.eclipse.jdt.core.jdom,
org.eclipse.jdt.core.search,
org.eclipse.jdt.core.util,
org.eclipse.jdt.internal.codeassist;x-internal:=true,
org.eclipse.jdt.internal.codeassist.complete;x-internal:=tru e,
org.eclipse.jdt.internal.codeassist.impl;x-internal:=true,
org.eclipse.jdt.internal.codeassist.select;x-internal:=true,
org.eclipse.jdt.internal.compiler;x-friends:=" org.eclipse.jdt.compiler.tool,org.eclipse.jdt.apt.pluggable. core ",
org.eclipse.jdt.internal.compiler.ast;x-friends:=" org.eclipse.jdt.compiler.tool,org.eclipse.jdt.apt.pluggable. core ",
org.eclipse.jdt.internal.compiler.batch;x-friends:=" org.eclipse.jdt.compiler.tool,org.eclipse.jdt.apt.pluggable. core ",
org.eclipse.jdt.internal.compiler.classfmt;x-friends:=" org.eclipse.jdt.compiler.tool,org.eclipse.jdt.apt.pluggable. core ",
org.eclipse.jdt.internal.compiler.codegen;x-friends:=" org.eclipse.jdt.compiler.tool,org.eclipse.jdt.apt.pluggable. core ",
org.eclipse.jdt.internal.compiler.env;x-friends:=" org.eclipse.jdt.compiler.tool,org.eclipse.jdt.apt.pluggable. core ",
org.eclipse.jdt.internal.compiler.flow;x-friends:=" org.eclipse.jdt.compiler.tool,org.eclipse.jdt.apt.pluggable. core ",
org.eclipse.jdt.internal.compiler.impl;x-friends:=" org.eclipse.jdt.compiler.tool,org.eclipse.jdt.apt.pluggable. core ",
org.eclipse.jdt.internal.compiler.lookup;x-friends:=" org.eclipse.jdt.compiler.tool,org.eclipse.jdt.apt.pluggable. core ",
org.eclipse.jdt.internal.compiler.parser;x-friends:=" org.eclipse.jdt.compiler.tool,org.eclipse.jdt.apt.pluggable. core ",
org.eclipse.jdt.internal.compiler.parser.diagnose;x-friends: = " org.eclipse.jdt.compiler.tool,org.eclipse.jdt.apt.pluggable. core ",
org.eclipse.jdt.internal.compiler.problem;x-friends:=" org.eclipse.jdt.compiler.tool,org.eclipse.jdt.apt.pluggable. core ",
org.eclipse.jdt.internal.compiler.util;x-friends:=" org.eclipse.jdt.compiler.tool,org.eclipse.jdt.apt.pluggable. core ",
org.eclipse.jdt.internal.core;x-friends:="org.eclipse.jdt.apt.pluggable.core ",
org.eclipse.jdt.internal.core.builder;x-friends:="org.eclipse.jdt.apt.pluggable.core ",
org.eclipse.jdt.internal.core.dom;x-internal:=true,
org.eclipse.jdt.internal.core.dom.rewrite;x-internal:=true,
org.eclipse.jdt.internal.core.eval;x-internal:=true,
org.eclipse.jdt.internal.core.hierarchy;x-internal:=true,
org.eclipse.jdt.internal.core.index;x-internal:=true,
org.eclipse.jdt.internal.core.jdom;x-internal:=true,
org.eclipse.jdt.internal.core.search;x-internal:=true,
org.eclipse.jdt.internal.core.search.indexing;x-internal:=tr ue,
org.eclipse.jdt.internal.core.search.matching;x-internal:=tr ue,
org.eclipse.jdt.internal.core.search.processing;x-internal:= true,
org.eclipse.jdt.internal.core.util;x-friends:="org.eclipse.jdt.apt.pluggable.core ",
org.eclipse.jdt.internal.eval;x-internal:=true,
org.eclipse.jdt.internal.formatter;x-internal:=true,
org.eclipse.jdt.internal.formatter.align;x-internal:=true,
org.eclipse.jdt.internal.formatter.comment;x-internal:=true,
org.eclipse.jdt.internal.formatter.old;x-internal:=true
Require-Bundle: org.eclipse.core.resources;bundle-version="[3.3.0,4.0.0)",
org.eclipse.core.runtime;bundle-version="[3.3.0,4.0.0)",
org.eclipse.core.filesystem;bundle-version="[1.0.0,2.0.0)",
org.eclipse.text;bundle-version="[3.1.0,4.0.0)",
org.eclipse.team.core;bundle-version="[3.1.0,4.0.0)";resolution:=optional
Bundle-RequiredExecutionEnvironment: J2SE-1.4
Eclipse-ExtensibleAPI: true
Bundle-ActivationPolicy: lazy
========================
"Paul Webster" <pwebster@ca.ibm.com> wrote in message
news:grd1ba$lvm$1@build.eclipse.org...
> If you expand your org.eclipse.jdt.core_3.5.0.v_999.jar from your update
> site, what does the MANIFEST.MF look like?
>
> PW
>
>
> --
> Paul Webster
> http://wiki.eclipse.org/Platform_Command_Framework
> http://wiki.eclipse.org/Command_Core_Expressions
> http://wiki.eclipse.org/Menu_Contributions
> http://wiki.eclipse.org/Menus_Extension_Mapping
> http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm
|
|
| | |
Goto Forum:
Current Time: Sat Aug 31 23:07:25 GMT 2024
Powered by FUDForum. Page generated in 0.03825 seconds
|