Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Driving the bus from outside....
Driving the bus from outside.... [message #48983] Wed, 06 November 2002 00:00 Go to next message
Christopher Songer is currently offline Christopher SongerFriend
Messages: 9
Registered: July 2009
Junior Member
Hi!

I am creating a different type of eclipse project (not a C project) and as
a part of the finish step for that project's creation, I would like to be
able to create a simple sample C project for the new user without him
really doing anything or going through any additional dialogs.

At a practical level that says that I want to drive CDT without the user's
interaction to create a C project with a hello world main and makefile.

Suggestions on the best way to go about this before I start flailing away?
:)

Thanks!
-Chris
Re: Driving the bus from outside.... [message #49248 is a reply to message #48983] Thu, 07 November 2002 20:07 Go to previous message
Christopher Songer is currently offline Christopher SongerFriend
Messages: 9
Registered: July 2009
Junior Member
Crickets. I hear crickets. :)

For the record, here is the magic I am using at the moment. Your mileage
may vary. Heck, my mileage may vary. You CANNOT use this code from a
forked runnable. It fails big time under those circumstances. Otherwise,
it seems to be working, but we will see.

SubProgressMonitor nm = new SubProgressMonitor(monitor, 200);
IProject cph;
cph = ResourcesPlugin.getWorkspace().getRoot().getProject("Hello
World");
IProjectDescription dsc =
ResourcesPlugin.getWorkspace().newProjectDescription(cph.get Name());
dsc.setLocation( null );

try
{
/* NOTE: The following magic string is stolen from StdMakeProjectWizard
* and can presumably change at any time */
cProject = CCorePlugin.getDefault().createCProject(dsc,
cph, nm,
CCorePlugin.getDefault().PLUGIN_ID + ".make");
}
catch( CoreException e )
{
cProject = null;
}


chris songer wrote:

> Hi!

> I am creating a different type of eclipse project (not a C project) and as
> a part of the finish step for that project's creation, I would like to be
> able to create a simple sample C project for the new user without him
> really doing anything or going through any additional dialogs.

> At a practical level that says that I want to drive CDT without the user's
> interaction to create a C project with a hello world main and makefile.

> Suggestions on the best way to go about this before I start flailing away?
> :)

> Thanks!
> -Chris
Previous Topic:Refreshing workspace hangs
Next Topic:Documentation
Goto Forum:
  


Current Time: Sat Jul 27 13:25:51 GMT 2024

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

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

Back to the top