Skip to main content

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

Hi Neil,

The IProjectType.createConfiguration() does not create the tool-chain for the configuration, though the javaDoc comment for that method says that it should :~()

So currently you should explicitly create the tool-chain in case you are creating a new configuration with the IProjectType.createConfiguration().
E.g. see IConfiguration.createToolChain().

Thanks,
Mikhail



-----Original Message-----
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Neil Rickards
Sent: Tuesday, February 21, 2006 5:00 PM
To: CDT General developers list.
Subject: [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.


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top