|
|
Re: Aspectj export fails because IMessageHandler cannot be found [message #482942 is a reply to message #482871] |
Fri, 28 August 2009 15:22 |
Ivica Loncar Messages: 41 Registered: July 2009 |
Member |
|
|
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.bu ndleToCP(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
|
|
|
|
|
|
|
|
|
|
Re: Aspectj export fails because IMessageHandler cannot be found [message #600550 is a reply to message #482871] |
Fri, 28 August 2009 15:22 |
Ivica Loncar Messages: 41 Registered: July 2009 |
Member |
|
|
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.bu ndleToCP(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
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05634 seconds