Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Why does plugin validation complain about missing constraint that isn't missing?
Why does plugin validation complain about missing constraint that isn't missing? [message #519202] Mon, 08 March 2010 00:38 Go to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 813
Registered: July 2009
Senior Member
I'm stepping through the exercises in "Creating Eclipse Plugins". My unit tests are working fine (even in debug mode), but I'm having trouble with the regular run configuration. When I run it, the test instance comes up, but the plugin I've written doesn't appear to be available. There's nothing in the error log or problems view. In the "Plug-Ins" tab of the run configuration, I have both the main plugin and the test plugin enabled in the "Workspace" section. They're not enabled in the "Target Platform" section, and the only plugins enabled in "Target Platform" are the ones that I got from "Add Required Plug-Ins".

Then I noticed the "Validate Plug-Ins" button in the "Plug-Ins" tab of the run configuration. When I clicked that, it gave me the following complaint:

org.qualityeclipse.favorites:
Missing Constraint: Require-Bundle: org.eclipse.jdt.core; bundle-version="3.5.2"
org.qualityeclipse.favorites.test:
Missing Constraint: Require-Bundle: org.junit4; bundle-version="4.5.0"

Here's the MANIFEST.MF files:
-------org.qualityeclipse.favorites-------
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Favorites Plug-In
Bundle-SymbolicName: com.qualityeclipse.favorites; singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: com.qualityeclipse.favorites.FavoritesActivator
Bundle-Vendor: QUALITYECLIPSE
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.jdt.core;bundle-version="3.5.2",
org.eclipse.core.resources;bundle-version="3.5.2",
org.eclipse.core.expressions
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Export-Package: com.qualityeclipse.favorites.actions,
com.qualityeclipse.favorites.views
----------------

------org.qualityeclipse.favorites.test------
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Test
Bundle-SymbolicName: com.qualityeclipse.favorites.test
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: com.qualityeclipse.favorites.test.Activator
Bundle-Vendor: QUALITYECLIPSE
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
com.qualityeclipse.favorites;bundle-version="1.0.0",
org.junit4;bundle-version="4.5.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
--------------

As you can see, both of them have a "Require-Bundle" property which includes the value that it says is missing.

This could just be a red herring, but I can't find anything else wrong that might cause the run configuration to not run the plugin.
Re: Why does plugin validation complain about missing constraint that isn't missing? [message #519344 is a reply to message #519202] Mon, 08 March 2010 14:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Hi,

It's not trying to say that the constraint "Required-Bundle" is missing
from the manifest. It is trying to say that there is no compatible
org.eclipse.jdt.core (one that is 3.5.2 or greater) in the running Eclipse.

Now I don't know if this is true or not, but that is what it is trying
to say.

Do a Help->About->Configuration Details to see what org.eclipse.jdt.core
and org.junit4 ARE installed in the running eclipse.

>
> org.qualityeclipse.favorites:
> Missing Constraint: Require-Bundle: org.eclipse.jdt.core;
> bundle-version="3.5.2"
> org.qualityeclipse.favorites.test:
> Missing Constraint: Require-Bundle: org.junit4; bundle-version="4.5.0"
>
> Here's the MANIFEST.MF files:

--
Thanks,
Rich Kulp
Re: Why does plugin validation complain about missing constraint that isn't missing? [message #519455 is a reply to message #519344] Mon, 08 March 2010 21:07 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 813
Registered: July 2009
Senior Member
When I go to "Installed Software" and search for this, I find:

Eclipse Java Development Tools 3.5.2.r352_v20100108-7r88FEwFI0WTuoBl0iaG0tyhfZH6 org.eclipse.jdt.feature.group

Is that what this is referring to?
Re: Why does plugin validation complain about missing constraint that isn't missing? [message #519692 is a reply to message #519202] Tue, 09 March 2010 17:17 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 813
Registered: July 2009
Senior Member
I figured this out.

What I realized is that I really did think that the "Add Required Plug-Ins" button on the "Plug-Ins" tab of the run configuration would ACTUALLY add all the required plug-ins. When I finally thought to look at the list in the "Target Platform" section that weren't checked, I found that these weren't checked. I also found that there were other implicit dependencies that were hit once I checked the "first level". I'm not sure anymore what that button refers to as "required" plug-ins.
Re: Why does plugin validation complain about missing constraint that isn't missing? [message #520022 is a reply to message #519692] Wed, 10 March 2010 20:57 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Hi,

It only does a one-level search. In other words if you "require" a
plugin, and that plugin requires another plugin, that other plugin won't
be pulled in. I think it works better with required features instead of
plugins.

The new p2 format will actually pull in all of the requirements.

David M. Karr wrote:
> I figured this out.
>
> What I realized is that I really did think that the "Add Required
> Plug-Ins" button on the "Plug-Ins" tab of the run configuration would
> ACTUALLY add all the required plug-ins. When I finally thought to look
> at the list in the "Target Platform" section that weren't checked, I
> found that these weren't checked. I also found that there were other
> implicit dependencies that were hit once I checked the "first level".
> I'm not sure anymore what that button refers to as "required" plug-ins.

--
Thanks,
Rich Kulp
Previous Topic:Dependency problem
Next Topic:Bad menu fonts on 32 bit Eclipse RHEL 5.2
Goto Forum:
  


Current Time: Tue Dec 10 14:41:36 GMT 2024

Powered by FUDForum. Page generated in 0.25890 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top