Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » New Project Action
New Project Action [message #235295] Mon, 06 July 2009 07:13 Go to next message
Gilod is currently offline GilodFriend
Messages: 25
Registered: July 2009
Junior Member
Hello,
I created a new diagram called "foom" which support IS analysis projects.
When a user creates a project, I want that 2 new diagram files will be
created automatically - "foom" diagram and uml-class diagram.
They both appear in the plug-in but I want to ensure that the user
will create those 2 files with specific names,
So I want to do this automatically once the user open a new project.
Is it possible?
Thanks
Gilod
Re: New Project Action [message #235300 is a reply to message #235295] Mon, 06 July 2009 08:36 Go to previous messageGo to next message
Gilod is currently offline GilodFriend
Messages: 25
Registered: July 2009
Junior Member
I found an extension that should help me with this custom project:
<extension
point="org.eclipse.team.core.projectSets">
<projectSets
class="testing.ProjectSetSerializer2"
id="TESTING.projectSets2">
</projectSets>
</extension>

And this is the class that was automatically created:
package testing;

import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.core.IProjectSetSerializer;
import org.eclipse.team.core.TeamException;

public class ProjectSetSerializer2 implements IProjectSetSerializer {

@Override
public IProject[] addToWorkspace(String[] referenceStrings,
String filename, Object context, IProgressMonitor monitor)
throws TeamException {
// TODO Auto-generated method stub
return null;
}

@Override
public String[] asReference(IProject[] providerProjects, Object context,
IProgressMonitor monitor) throws TeamException {
// TODO Auto-generated method stub
return null;
}

}


How should I modify the code so it will create the 2 diagrams that I need
inside?
Thanks in advance!!!
Gilod
Re: New Project Action [message #235364 is a reply to message #235300] Mon, 06 July 2009 09:56 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Gilod,

See generated ???CreationWizard - this is a way to create domain model/diagram
files in a proper way. You can steal some code from there and put in into
the place where you are initialising new project.

-----------------
Alex Shatalin
Previous Topic:Using OCL to map an association
Next Topic:Use separate diagram file, or not?
Goto Forum:
  


Current Time: Wed Apr 01 12:45:17 GMT 2020

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

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

Back to the top