[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools] Re: Nature question
|
John,
thank you for the explanation
Jacques
John Arthorne wrote:
> It may seem a bit strange, but there's a reason for it. When a project
> gets recreated (import from file system or checkout from repository), we
> don't want to configure the nature a second time. A nature is only
> configured once in the lifetime of a project. That's why it only
> happens on setDescription.
> --
> Jacques Leclercq wrote:
> > 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
> >