Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-ui-dev] [CDT 4] Is there a way of creating a C/C++ project without invoking the wizard?


Good tip! After a quick glance it seems like it can provide enough support - thanks!

Rgs,

/Nils K


From: "Sennikovsky, Mikhail" <mikhail.sennikovsky@xxxxxxxxx>
To: Nils Kronqvist/Sweden/IBM@IBMSE, <cdt-ui-dev@xxxxxxxxxxx>
Date: 2007-09-05 17:55
Subject: RE: [cdt-ui-dev] [CDT 4] Is there a way of creating a C/C++ project without invoking the wizard?





Hi Nils,
 
You might want to have a look at the JUnit tests to understand the general project creation flow, e.g. have a look at
IProject org.eclipse.cdt.managedbuilder.testplugin.BuildSystemTestHelper.createProject(String name, IPath location, String projTypeId) throws CoreException
 
Also looking/debugging into the New Project Wizard implementation is the right way to follow since this is a good example of the project creation logic. I agree that overall the wizard logic might seem complicated, but I guess that if you strip some parts of logic that are not required to you, e.g. template engine and custom wizard pages invocation logic (in case your tool-chain is not using it) and all UI-related stuff, you should get something similar to the above test sample.
 
Mikhail
 



From: cdt-ui-dev-bounces@xxxxxxxxxxx [mailto:cdt-ui-dev-bounces@xxxxxxxxxxx] On Behalf Of Nils Kronqvist
Sent:
Wednesday, September 05, 2007 7:02 PM
To:
cdt-ui-dev@xxxxxxxxxxx
Subject:
[cdt-ui-dev] [CDT 4] Is there a way of creating a C/C++ project without invoking the wizard?

 

Background:


I'm creating a file import wizard that will import an existing C/C++ "component" structure into CDT. Each of the components has a root directory, and contain build spec files with references to other components needed for build and browse etc. Hence the import wizard should offer to import relevant referenced projects into the workspace.


The flow of the wizard will basically be:


1. Browse to the component (directory)  to import

2a. If the component contains a CDT project definition - fine, can be read.

2b. If the component doesn't contain a CDT project - a project needs to be created ...

3. After selecting a component, the wizard will show a list of referred components, of which some needs to be created ...


Since all info for the project creating is known (i.e. name, location, toolchain etc), a gui-less invocation would be nice - also allowing it to be saved for a final page: "I will create this .. ok/cancel" instead of invoking the New Project wizard a number of times from the Import wizard which feels like bad gui design ...

There is no formal API or extension point for this, and looking at the wizard implementation (
CDTCommonProjectWizard etc), it doesn't seem trivial/possible to invoke GUI less without duplicating (ugh ..) much code.

Any tips are appreciated.


Rgs,


/Nils K


Back to the top