no error messages, I don't think the nature is executed. In plugin.xml,
<enablement
type="ALL">
<hasNature
natureId="com.infineon.cv.NatureLinkedRessources">
</hasNature>
</enablement>
it does the same thing as the code below does, doen't it? then i commented these codes, but it doesn't work either.
try {
IProjectDescription description = project.getDescription();
String[] natures = description.getNatureIds();
String[] newNatures = new String[natures.length + 1];
System.arraycopy(natures, 0, newNatures, 0, natures.length);
newNatures[natures.length] = "com.xxx.cv.NatureLinkedRessources";
description.setNatureIds(newNatures);
project.setDescription(description, null);
} catch (CoreException e) {
// Something went wrong
}
and also, add a nature project should not be in the nature project class, does it?
From:
alex.blewitt@xxxxxxxxxSubject: Re: [cdt-dev] problem add nature project to a plugin cdt
Date: Mon, 15 Mar 2010 10:25:07 +0000
To:
cdt-dev@xxxxxxxxxxx
You're printing out when something goes wrong, huh?
On 15 Mar 2010, at 09:22, Flo Menier wrote:
@Override
public void configure() throws CoreException {
try {
IProjectDescription description = project.getDescription();
String[] natures = description.getNatureIds();
String[] newNatures = new String[natures.length + 1];
System.arraycopy(natures, 0, newNatures, 0, natures.length);
newNatures[natures.length] = "com.xxx.cv.NatureLinkedRessources";
description.setNatureIds(newNatures);
project.setDescription(description, null);
} catch (CoreException e) {
// Something went wrong
}
Votre messagerie et bien plus où que vous soyez. Passez à Windows Live Hotmail, c'est gratuit !