Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Creating a wizard
Creating a wizard [message #1612932] Thu, 12 February 2015 09:44 Go to next message
Franck MIMET is currently offline Franck MIMETFriend
Messages: 28
Registered: August 2014
Junior Member
Hello,

I have defined an ecore model and .odesign file and I am trying to modify an existing creation wizard (from EMF) for the new project being configured programmatically.

I already modify the wizard so the modeling nature is added to the new project, but how can I associated the .aird and the viewpoints programmatically to this project?

Thank you for help!

Franck
Re: Creating a wizard [message #1613128 is a reply to message #1612932] Thu, 12 February 2015 12:29 Go to previous messageGo to next message
Franck MIMET is currently offline Franck MIMETFriend
Messages: 28
Registered: August 2014
Junior Member
I created an .aird file:

org.eclipse.emf.common.util.URI sessionResourceURI = org.eclipse.emf.common.util.URI.createPlatformResourceURI("/" + desc.getName() + "/representations.aird", true);


then, I changed the project to Modeling Nature: ModelingProject.NATURE_ID

And, open a session as above;

SessionManager sessionManager = SessionManager.INSTANCE;//got the Sirius SessionManager
Session createdSession = sessionManager.getSession(sessionResourceURI, new NullProgressMonitor());
createdSession.open(new NullProgressMonitor());


All I get is an empty Viewpoints selection list associated to the project.

Did I miss something?
Re: Creating a wizard [message #1619431 is a reply to message #1613128] Mon, 16 February 2015 15:23 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Franck,

Le 12/02/2015 13:29, Franck MIMET a écrit :
> I created an .aird file:
>
> org.eclipse.emf.common.util.URI sessionResourceURI =
> org.eclipse.emf.common.util.URI.createPlatformResourceURI("/" +
> desc.getName() + "/representations.aird", true);
> then, I changed the project to Modeling Nature: ModelingProject.NATURE_ID
>
> And, open a session as above;
>
> SessionManager sessionManager = SessionManager.INSTANCE;//got the Sirius
> SessionManager
> Session createdSession = sessionManager.getSession(sessionResourceURI,
> new NullProgressMonitor());
> createdSession.open(new NullProgressMonitor());
>
>
> All I get is an empty Viewpoints selection list associated to the project.
>
> Did I miss something?
>

Sirius will filter the registered Viewpoint by looking at the file
extension of your session semantic resources. I think your session does
not have any semantic resources.


You could also look how EcoreTools defines its
EcoreModelingProjectWizard with its ViewpointSelectionWizardPage [1]

Regards,

--
Maxime - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
--
[1]
http://git.eclipse.org/c/ecoretools/org.eclipse.ecoretools.git/tree/org.eclipse.emf.ecoretools.design/src/org/eclipse/emf/ecoretools/design/wizard/EcoreModelerWizard.java


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Creating a wizard [message #1630912 is a reply to message #1619431] Mon, 23 February 2015 13:29 Go to previous message
Franck MIMET is currently offline Franck MIMETFriend
Messages: 28
Registered: August 2014
Junior Member
Hi Maxime,

I was on holidays last week, so I am discovering your answer.

I'll have a look at the example you mentionned in ecore tools.

Thank you for your help.

Franck
Previous Topic:Needs support with LayoutProvider extension
Next Topic:Open a Sirius representation inside a View
Goto Forum:
  


Current Time: Fri Apr 19 15:55:47 GMT 2024

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

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

Back to the top