[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.ajdt] Re: Aspectj export fails because IMessageHandler cannot be found

Hello Ivica,

It seems that AJModelBuildScriptGenerator#bundleToCP doesn't export
required
dependencies:
BundleDescription[] prereqs = bundle.getResolvedRequires();
returns nothing, but
bundle.getRequiredBundles()
contains [Require-Bundle: org.apache.ant; bundle-version="0.0.0",
Require-Bundle: org.eclipse.core.resources; bundle-version="0.0.0",
Require-Bundle: org.eclipse.core.runtime; bundle-version="0.0.0",
Require-Bundle: org.eclipse.core.runtime.compatibility;
bundle-version="0.0.0", Require-Bundle: org.eclipse.text;
bundle-version="0.0.0", Require-Bundle: org.aspectj.weaver;
bundle-version="92.2.29"]
Shouldn't those bundles be included when calculating ajde.classpath?

Hmm.. ajde bundle is not resolved.

Should ajde bundle be resolved before
org.eclipse.ajdt.core.exports.AJModelBuildScriptGenerator.bundleToCP(B
undleDescription)

is called?

The problem occurs only when I use custom target platform.
It seems that ajde is not resolved when ajde.classpath is generated, and it's causing the problem.


I don't think bundles have to be resolved in order to be added to ajde.classpath, so I have replaced:

		// now add prerequisite bundles
		BundleDescription[] prereqs = bundle.getResolvedRequires();
		for (int i = 0; i < prereqs.length; i++) {
			String[] pcp = bundleToCP(prereqs[i]);
			pathList.addAll(Arrays.asList(pcp));
		}
with:

		BundleSpecification[] prereqs = bundle.getRequiredBundles();
		for (int i = 0; i < prereqs.length; i++) {
			BundleDescription prereqBundle = getModel(prereqs[i].getName(), null);
			if (prereqBundle != null ) {
				String[] pcp = bundleToCP(prereqBundle);
				pathList.addAll(Arrays.asList(pcp));
			}
		}

I'm not sure if this has more implications.


-- Ivica Loncar