Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsNew Modeling Project Creation Wizard
https://www.eclipse.org/forums/index.php/mv/msg/1093962/1791361/#msg_1791361
Hope you all will be in best health.
Actually my aim is to make a modeling project creation wizard, that only takes the name and location of the project from the user and on clicking finish, it should create a modeling project with a root object named "Model" being instantiated from another modeling project into it.
So far i am able to create a project wizard, that opens a new modeling project , but i don't know how to create the representation.aird file for this project and how to add an external model programmically into it, need guidance and right direction from you guys, here is the code for the project creation:
/**
* Just do the basics: create a basic project.
*
* @param location
* @param projectName
*/
private static IProject createBaseProject(String projectName, URI location) {
// it is acceptable to use the ResourcesPlugin class
IProject newProject = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
if (!newProject.exists()) {
URI projectLocation = location;
IProjectDescription desc = newProject.getWorkspace().newProjectDescription(newProject.getName());
if (location != null ) ;
{ResourcesPlugin.getWorkspace().getRoot().getLocationURI().equals(location);
projectLocation = null;
}
>>>>how to create the representation.aird for this project and how to add an external model with its root object into this model programmically]]>AbuBakar Saadat2018-06-28T11:51:18-00:00Re: New Modeling Project Creation Wizard
https://www.eclipse.org/forums/index.php/mv/msg/1093962/1791471/#msg_1791471
https://www.eclipse.org/forums/index.php/f/262/
I assume you've already looked at that project's getting started information:
In general it's typically useful to look at how existing code accomplishes a similar task. For this purpose, the plug-in spy is useful. I.e., Alt-Shift-F1 will show you information about the current active control in the workbench window; you can use it to find out what class implements that control so you can look at its source code. And Alt-Shift-F2 lets you determine how menu items are implemented.]]>Ed Merks2018-06-30T06:25:31-00:00Re: New Modeling Project Creation Wizard
https://www.eclipse.org/forums/index.php/mv/msg/1093962/1792025/#msg_1792025
The API you're looking for is probably org.eclipse.sirius.ui.tools.api.project.ModelingProjectManager.createNewModelingProject(String, boolean, IProgressMonitor) to create the project, and then org.eclipse.sirius.business.api.modelingproject.ModelingProject.asModelingProject(IProject) to manage it using its specific APIs.
]]>Pierre-Charles David2018-07-10T08:32:23-00:00Re: New Modeling Project Creation Wizard
https://www.eclipse.org/forums/index.php/mv/msg/1093962/1797151/#msg_1797151
Michael Plant2018-10-26T10:56:12-00:00