Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] problem add nature project to a plugin cdt

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
   }


Back to the top