Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to create a new project programatically?
How to create a new project programatically? [message #1219489] Wed, 04 December 2013 08:35 Go to next message
Epi Liptik is currently offline Epi LiptikFriend
Messages: 8
Registered: November 2013
Junior Member

If I start my gmf application into a new workspace I have to create a new project and a new diagram (with the associated model).
I would like to do this programatically to avoid this step, how can I do that?

I tried to create a project with something like that:

IWorkspaceRoot rootWorkspace = ResourcesPlugin.getWorkspace().getRoot();       
IProject project = rootWorkspace.getProject("Project");
try {
	if (project.exists()) {
		if (!project.isAccessible()) {;
        } else {
} catch (CoreException e) {

It seems to work but then I don't know how to create a new diagram, I tried something like the function performFinish() in the class CreationWizard but it didn't work.

[Updated on: Wed, 04 December 2013 08:36]

Report message to a moderator

Re: How to create a new project programatically? [message #1220385 is a reply to message #1219489] Wed, 11 December 2013 12:13 Go to previous message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member

you should have a class generated that is called xxxCreationWizard in a package called xxx.part. This should give you all the source code that you need.

Previous Topic:Connection creation throws exception
Next Topic:Drag & Drop from TreeView to GMF Editor
Goto Forum:

Current Time: Thu Feb 25 01:36:19 GMT 2021

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

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

Back to the top