Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Problems creating an IConfiguration

Hi, I'm having problems creating an IConfiguration.

When I call
  config = projectType.createConfiguration(parent, id, name);
the returned IConfiguration has a null toolChain.  This then causes a NullPointerException when other code calls
  newManagedProject.createConfiguration(config, config.getId() + "." + id);

Am I expected to call config.createToolChain(parent.getToolChain(), ...)?
Is this even the right thing to call - should they share a toolChain?
Is there anything else I'd need to set before it can be considered a valid IConfiguration?

Perhaps I should explain what I'm trying to do in-case I'm barking up completely the wrong tree.  I'm writing an importer wizard that produces an IManagedProject.  Because this seems to take an inordinate amount of code I have extended NewManagedCCProjectWizard and override getSelectedConfigurations(), then I call doRun(monitor).  If suitable configurations already exist in projectType.getConfigurations() I return them, otherwise I try and create a new IConfiguration as described above.

Any advice would be very much appreciated.  Thanks,
-- 
  Neil 


-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.




Back to the top