Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » IProjectNature.configure never called when project is created with nature
IProjectNature.configure never called when project is created with nature [message #328950] Sat, 07 June 2008 20:25
Eclipse UserFriend
Originally posted by: jbarzilai.nuparadigm.com

Hi all,
I've been playing with this for a while now and now I'm turning to the
newsgroups.

I have my own IProjectNature implementation and I'd like it to do
certain operations in the configure method. However, the configure
method isn't being called when I expect it to. When I have an already
created Project and I add the nature to it, then the configure method is
called, however if I add the nature to the ProjectDescription as part of
the creation process (for instance as part of a Project Wizard) then the
configure method is never called. See the examples below.

This bit of code fails to call configure:

IWorkspace workspace = ResourcesPlugin.getWorkspace();
IProject project = workspace.getRoot().getProject(PROJECT_NAME);
IProjectDescription description =
workspace.newProjectDescription(project.getName());
description.setNatureIds(new String[] { MyProjectNature.NATURE_ID });
project.create(description, null);
project.open(null);


This bit of code correctly calls configure:

IWorkspace workspace = ResourcesPlugin.getWorkspace();
IProject project = workspace.getRoot().getProject(PROJECT_NAME);
IProjectDescription description =
workspace.newProjectDescription(project.getName());
project.create(description, null);
project.open(null);
description.setNatureIds(new String[] { MyProjectNature.NATURE_ID });
project.setDescription(description, null);


Am I doing something wrong or is this correct behavior?

Thanks,
Joe
Previous Topic:[HELP] add template formatting in javaeditor exemple(always)
Next Topic:Large Icons / Skins
Goto Forum:
  


Current Time: Wed Jul 17 19:40:40 GMT 2024

Powered by FUDForum. Page generated in 0.03130 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top