|
Re: launch an eclipse application with an editor [message #1401921 is a reply to message #1398672] |
Wed, 16 July 2014 08:55 |
|
Le 11/07/2014 22:18, mouhcine amira a écrit :
> Hello ,
Hi,
>
> One of my collegues edited a file .odesign for an editor and I'm
> building a plugin that must launch an eclipse application with this
> editor inside.
Do you have a single .odesign file ? Or did your collegue follow the
documentation and has created a Viewpoint Specification Project (VSP) ?
[1] If you have only one .odesign file, I think you should create a new
VSP and then replace the odesign file by yours (do not forget to change
the id/path referencing the file and its Viewpoints in the activator and
in plugin.xml.
>
> Is the file .odesign sufficient to do that ?
> And what java instruction(s) can launch this eclipse application ?
The Viewpoint Specification Project is a Plug-In project and is
initalized to be able to deploy the modeler and the Viewpoints defined
in the the .odesign file. [1]
>
> Thanks for your help
Regards,
Maxime
[1]
https://www.eclipse.org/sirius/doc/specifier/general/Specifying_Viewpoints.html#vsp
Maxime Porhel - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Re: launch an eclipse application with an editor [message #1403288 is a reply to message #1403107] |
Mon, 21 July 2014 12:23 |
|
Hi,
these are general Eclipse plugins question and not Sirius-related per say.
Eclipse uses a plugin-based architecture. So to make the odesign
available you must define it inside an Eclipse plugin (the Viewpoint
Specification Project) and contribute to some Eclipse extension point to
make Sirius aware that your plugin contributes a new odesign file (this
is done in the Viewpoint Specification Project's plugin.xml file). I
strongly recommand you read this Vogela tutorial [1] to understand how
Eclipse plugins work.
Every steps above are done automatically by the Sirius Wizards. Now you
have 2 ways of lauching Sirius with your odesign :
1. Launch a new runtime application, that will embeed all the plugins
defined in your workspace. Apparently you have succeeded to do so. This
is the best way to quickly test your odesign while developping it, but
as you
2. Build and package your Metamodel Plugins and the Viewpoint
Specification Project so that end-users can install them inside their
own Eclipse bundles. To do so, I invite you to have a look at this Tycho
tutorial [2] and the Ecore Tools example [3]
Once installed, the end-user will be able to activate the Viewpoints you
defined inside their own Modeling Projects.
Do not hesistate to ask further questions,
Alex
[1] http://www.vogella.com/tutorials/EclipsePlugIn/article.html
[2] http://www.vogella.com/tutorials/EclipseTycho/article.html
[3] http://git.eclipse.org/c/ecoretools/org.eclipse.ecoretools.git/tree/
Le 21/07/2014 14:05, mouhcine amira a écrit :
> Thanks Maxime, your answer is very helpful :) .
>
> So, if I correctly understood, I must do the steps in
> https://wiki.eclipse.org/Sirius/Tutorials/4MinTutorial and then replace
> the file .odesign by the one edited by my collegue.
>
> The problem is that I'm just a beginner and don't know how to do these
> steps programmatically :cry:
> how can I launch a new eclipse application ( "click on Run / Run
> Configurations and double click on Eclipse Application to get a
> New_configuration. You have to specify VM arguments in this new
> configuration as follows: ..." ) with java code ? (do I have to do this
> step even if the user of my plugin is interested in just editing
> instances of the model and not viewPoints ?)
>
> And same question for the other steps: create a new modeling project,
> import resource, create ViewPoint specification project and replace its
> .odesign file by the edited one ...
>
> All these steps must be done in the background and launch to the user an
> editor where he can edit an instance of my metamodel.
>
> Thanks again !
>
> Mouhcine
|
|
|
Powered by
FUDForum. Page generated in 0.03546 seconds