[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: Nature question

Hi John,

My problem was I didn't call setDescription because I added the nature to
the 
description before calling projectHandle.create(description, null);

    ...
    //add the nature to project
    String[] nature = { GuimlNature.GUIML_NATURE_ID };
    description.setNatureIds(nature);	
    ...
    projectHandle.create(description, new SubProgressMonitor(monitor,
1000));
    ...

In fact no explicit call to setDescription is done => so it was not a bug
but it would be better that it worked too.
I thought that the create will take into account all what was inside the
description.

Now I add the nature to description after the creation and do the call to
setDescription and in fact it works.

    ...
    projectHandle.create(description, new SubProgressMonitor(monitor,
1000));
    ...
    //add the nature to project
    String[] nature = { GuimlNature.GUIML_NATURE_ID };
    description.setNatureIds(nature);	
    projectHandle.setDescription(description, null);
    ...

Thank you
Jacques

John Arthorne wrote:

> All this happens when you call IProject.setDescription, and provide a 
> description with a new nature that wasn't already present in the 
> project.  If you're not seeing this happen, please enter a bug report 
> with more details.
> --

> Jacques Leclercq wrote:
> > Hi all,
> > 
> > Can somebody tell me:
> > 
> > 1) when instances of Nature are created
> > 2) which creates Nature
> > 3) which call Nature's configure method 
> > 
> > I read in the article on Builder (More on nature life cycle) that Nature
> > are only configured ... when added ... to the project description BUT when
> > I do that no instance of Nature is created and so no call to configure...
> > 
> > Thank to give me some explanation
> > Jacques
> >