Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » SVG(Installing GMF Experimental SVG)
SVG [message #1016062] Mon, 04 March 2013 18:57 Go to next message
Joshua Nwokeji is currently offline Joshua NwokejiFriend
Messages: 94
Registered: January 2013
Member
Dear All,

I am trying to install "GMF Experimental SDK" in my ecllipse, and I did the following: Help->install new software->all available sites->GMF: But I only saw GMF Runtime SDK, and GMF notation SDK. are they the same with GMF Experimental SDK? If No how do I install GMF Experimental SDK?

I also need some help on how to place my.svg SVG file into my.plugin, so that I can refer it as "figure="svg", svg.uri="platform:/plugin/my.plugin/path/to/my.svg". Which steps should I follow to do these?

Regards

Joshua
Re: SVG [message #1016087 is a reply to message #1016062] Mon, 04 March 2013 22:17 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

The experimental SDK is not available in the main Juno update site, I'm afraid. You'll have to download it from the GMF Tooling update site:

http://download.eclipse.org/modeling/gmp/emf/updates/releases/

As for the .svg file, these steps should be enough:

1. Place "your.svg" directly inside the project for the "my.plugin" plugin.

2. Double-click on the build.properties file in the main folder of the plugin project and check the "your.svg" file in the "Binary Build" section. This will ensure that "your.svg" is redistributed with all binary builds of your plug-in.

3. Refer to it from the .emf model using 'svg.uri="platform:/plugin/my.plugin/your.svg"'.

Alternatively, if you place "your.svg" inside the "svg" subfolder of the project, you may want to check the entire "svg" folder in the "Binary Build" section. You'll need to refer to your .svg file as 'svg.uri="platform:/plugin/my.plugin/svg/your.svg"'.

Hope that helps Smile.

[Updated on: Mon, 04 March 2013 22:18]

Report message to a moderator

Re: SVG [message #1016142 is a reply to message #1016087] Tue, 05 March 2013 08:35 Go to previous messageGo to next message
Joshua Nwokeji is currently offline Joshua NwokejiFriend
Messages: 94
Registered: January 2013
Member
Dear Antonio,

Thanks for your reply, but I am still unable to resolve this. I have taken the following steps, though I am not sure if what I did is correct: Help->install new software->add->I pasted the link you sent to me into location: Then it gave me the following message: " could not find http://download.eclipse.org/modeling/gmp/emf/updates/releases/".

I am really sorry for asking these very basic questions, I know they might be annoying, but on which of the project folders can I find the My.Plugin, and the SVG sub folder? I have the following folders and sub folders in the project:
Eclipse.org.epsilon.eugenia.exercise1. Inside this I have the following subfolders:SRC, JRE System Library, Plugin dependencies, META-INF, and Model.
Then when I run Eugenia other folders such as .test, .edit, .diagram, and .editor will be generated.

Regards
Joshua
Re: SVG [message #1016151 is a reply to message #1016142] Tue, 05 March 2013 09:22 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

Joshua Nwokeji wrote on Tue, 05 March 2013 03:35

Thanks for your reply, but I am still unable to resolve this. I have taken the following steps, though I am not sure if what I did is correct: Help->install new software->add->I pasted the link you sent to me into location: Then it gave me the following message: " could not find http://download.eclipse.org/modeling/gmp/emf/updates/releases/".


Oh, I gave you the wrong address, sorry! It's this one:

http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/releases/

(Edit: I've added a link to this update site to the official docs.)

Joshua Nwokeji wrote on Tue, 05 March 2013 03:35

I am really sorry for asking these very basic questions, I know they might be annoying, but on which of the project folders can I find the My.Plugin, and the SVG sub folder? I have the following folders and sub folders in the project:
Eclipse.org.epsilon.eugenia.exercise1. Inside this I have the following subfolders:SRC, JRE System Library, Plugin dependencies, META-INF, and Model.
Then when I run Eugenia other folders such as .test, .edit, .diagram, and .editor will be generated.


"my.plugin" is just a placeholder name for documentation Smile. You should probably create the "svg" folder inside your ".diagram" plugin. To refer to "svg/your.svg" inside the ".diagram" plugin, you'd want to use this annotation in your .emf file:

@gmf.node(figure="svg", svg.uri="platform:/plugin/Eclipse.org.epsilon.eugenia.exercise1.diagram/svg/your.svg")

[Updated on: Tue, 05 March 2013 09:32]

Report message to a moderator

Re: SVG [message #1016187 is a reply to message #1016151] Tue, 05 March 2013 11:57 Go to previous messageGo to next message
Joshua Nwokeji is currently offline Joshua NwokejiFriend
Messages: 94
Registered: January 2013
Member
Dear Antonio,

Once again thanks for your help, I have installed GMF Experimental SDK, but I still have some problem with SVG. I have done the following.
I created a new project called : "eclipse.org.epsilon.eugenia.exercise6".
Step2: I created a new plugin project as follows: New->Project->Plugin Project, I named it myplugin. Then I created a new folder in "myplugin" called SVG: as follows: New->Folder.

Step 3: I pasted Goal.svg file inside the SVG folder in my plugin (myplugin/SVG/GOAL.svg).

Step 4: Below is the .emf code

@namespace(uri="http://paper/1.0", prefix="paper")
package paper;

@gmf.diagram(foo="bar")
class UseCaseD {
val link[+] gg;
val node[+] has;
}

@gmf.node(label= "name")
abstract class node {
attr String name;
}

@gmf.link( target.decoration = "arrow", source="from", target="to")
class link {
ref node[1] from;
ref node[1] to;
}

@gmf.node( label = "name", figure="rectangle", size="1,1")
class Actor extends node {
}

@gmf.node( label = "name", figure="svg", svg.uri="platform:/plugin/Eclipse.org.epsilon.eugenia.exercise6.myplugin/SVG/GOL.svg")
class UseCaseWithSVGFigure extends node {
}

@gmf.link( target.decoration = "arrow", source="from", target="to", label = "include")
class Include extends link {
attr String name;
}

@gmf.link( target.decoration = "arrow", source="from", target="to", label = "extend")
class Extend extends link {
attr String title;
}

Step 5: I ran the .emf file, and I got the error below:

"An internal error occurred during: "Generating all GMF models".
org/eclipse/gmf/internal/bridge/genmodel/DefaultViewmapProducer$LayoutTypeSwitch"

Please how do I resolve this. If you send me your e-mail address I can attach the core diagram to you. mine is J.Nwokeji@mdx.ac.uk

Regards

Joshua

[Updated on: Tue, 05 March 2013 17:40]

Report message to a moderator

Re: SVG [message #1016307 is a reply to message #1016187] Tue, 05 March 2013 23:49 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

I've pasted your .emf file into my Eclipse instance and then generated the GMF editor by right clicking on it in the Package Explorer and selecting "Eugenia > Generate GMF editor". It works fine for me, though.

Could you try removing all the automatically generated models and code and trying again?

By the way, I was suggesting you put the 'svg' file in the '.diagram' plugin, not in the 'my.plugin' plugin. You can use a different plugin other than the '.diagram' one, but then you'll need to add the appropriate dependency from the '.diagram' plugin to the 'my.plugin' plugin, either manually or using a polishing transformation.

Re: SVG [message #1016358 is a reply to message #1016307] Wed, 06 March 2013 08:16 Go to previous messageGo to next message
Joshua Nwokeji is currently offline Joshua NwokejiFriend
Messages: 94
Registered: January 2013
Member
Dear Antonio,

Thanks for the reply. But does it mean that I have to run Eugenia first (i.e. generate the GMF editor first) before I can add any SVG figure? Remember .diagram plugin is not generated until you run Eugenia. Can it be possible for me to include svg figure before generating the GMF editor?

Regards
Joshua
Re: SVG [message #1016472 is a reply to message #1016358] Wed, 06 March 2013 15:17 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

Yes, you can put it in the eclipse.org.epsilon.eugenia.exercise6 plugin as well, before running EuGENia Smile.
Re: SVG [message #1016477 is a reply to message #1016472] Wed, 06 March 2013 15:31 Go to previous messageGo to next message
Joshua Nwokeji is currently offline Joshua NwokejiFriend
Messages: 94
Registered: January 2013
Member
Dear Antonio,

Thanks for your help, but I am still unable to add svg figure in my GMF editor. I am trying to develope a tool to draw Usecase diagrams: Thus I will need a stick-like figure to model an Actor.

I took the following steps:

(1) -> I generated GMF Editor from Eugenia with default figures, this worked fine.
Next
(2) -> I drew the svg figure using Inkscape.

(3) -> I right clicked the .diagram plugin i.e (org.eclipse.epsilon.eugenia.example1.diagram, and pasted the GOAL.svg file in it. Please see the screen shot.

Then I refer to it in .emf file as :

"@gmf.node( label = "name", figure = "svg", svg.uri="platform:/plugin/org.eclipse.epsilon.eugenia.example1.diagram/GOAL.svg")
class Actor extends Node {
}"

This gave me an error:
Please see the screen shot attached.
Are these steps corrects? If not what can I do to resolve the problem?

Regards

Joshua
Re: SVG [message #1016646 is a reply to message #1016477] Thu, 07 March 2013 09:11 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

I can't see the full error log from the screenshot, sorry. Could you paste the exception trace instead?
Re: SVG [message #1016669 is a reply to message #1016646] Thu, 07 March 2013 10:11 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

I have committed a set of example projects for using a SVG-based figure to the Epsilon SVN repository:

http://dev.eclipse.org/svnroot/modeling/org.eclipse.epsilon/trunk/examples/

Could you try out the projects starting with "org.eclipse.epsilon.eugenia.examples.svg"?
Re: SVG [message #1016940 is a reply to message #1016062] Fri, 08 March 2013 09:42 Go to previous messageGo to next message
Joshua Nwokeji is currently offline Joshua NwokejiFriend
Messages: 94
Registered: January 2013
Member
Dear Antonio,

Sorry for replying late, I was down with flu throughout yesterday, so I couldnt work.

Eugenia runs normally without throwing any exceptions, and pops out the message "code genertion completed successfully" but after succesful completions, it gives me the error sign in the .diagram plugin. If I expand it the error signs appear in src and Meta-INF sub folders. May be there is something I am not doing right.

If its okay with you, I can upload the project in my dropbox folder and share the folder with you (if you give me an e-mail address). This might make it easier for you to find out any mistakes I made.

Please how do I upload those examples in Epsilon? I mean the examples in http://dev.eclipse.org/svnroot/modeling/org.eclipse.epsilon/trunk/examples/

Regards

Joshua
Re: SVG [message #1016964 is a reply to message #1016940] Fri, 08 March 2013 11:21 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

Joshua Nwokeji wrote on Fri, 08 March 2013 04:42

Sorry for replying late, I was down with flu throughout yesterday, so I couldnt work.


That's OK. Health always comes first Smile.

Joshua Nwokeji wrote on Fri, 08 March 2013 04:42

Eugenia runs normally without throwing any exceptions, and pops out the message "code genertion completed successfully" but after succesful completions, it gives me the error sign in the .diagram plugin. If I expand it the error signs appear in src and Meta-INF sub folders. May be there is something I am not doing right.

If its okay with you, I can upload the project in my dropbox folder and share the folder with you (if you give me an e-mail address). This might make it easier for you to find out any mistakes I made.


No problem. This article has our email address for private examples (right at the end):

http://eclipse.org/epsilon/doc/articles/minimal-examples/

Joshua Nwokeji wrote on Fri, 08 March 2013 04:42

Please how do I upload those examples in Epsilon? I mean the examples in http://dev.eclipse.org/svnroot/modeling/org.eclipse.epsilon/trunk/examples/


You can download these examples using a regular Subversion client. I use TortoiseSVN in Windows and the command-line tool in Linux, but I don't have a Mac, so I can't really recommend you a good client there. You need to use the "checkout" command on that URL.

If you don't know Subversion, read chapters 1 and 2 of the official book. They're a quick read, and everyone should be using some version control system anyway Smile.

http://svnbook.red-bean.com/nightly/en/index.html
Re: SVG [message #1017005 is a reply to message #1016964] Fri, 08 March 2013 14:44 Go to previous messageGo to next message
Joshua Nwokeji is currently offline Joshua NwokejiFriend
Messages: 94
Registered: January 2013
Member
Dear Antonio,

I can't stop thanking you for all your support.

I have now shared my project folder with this e-mail address "epsilon.devs@gmail.com". Hope I got the e-mail correctly? The project is in workspace of the projet folder (eclipse-epsilon-1). I believe this can help you take a closer look on the erros I made in the svg plugin, and possibly suggest some corrections.

I am still tyring to figure out how Subversion works (I just heard of it from you today for the first time), I am a MAC user, so It might take me a long time to go through the tutorials and figure out how I can use it to open the examples in mac.

I was thinking if it will be possible to open the examples directly into eclipse epsilon.

Once agian thanks for your help as I wait for your reply.

Regards

Joshua
Re: SVG [message #1017289 is a reply to message #1017005] Mon, 11 March 2013 13:46 Go to previous messageGo to next message
Joshua Nwokeji is currently offline Joshua NwokejiFriend
Messages: 94
Registered: January 2013
Member
Dear Antonio,
I was just wondering if, you got my last post, and the folder I shared with you on dropbox. I can re-share the folder with you in dropbox, incase you didnt get the previous ones. I still have not find a way to include svg figure in my project.

Regards
Joshua
Re: SVG [message #1017369 is a reply to message #1017289] Mon, 11 March 2013 17:32 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

Sorry for the delay: I wasn't able to look at your projects during the weekend. I'm looking at them right now Smile.
Re: SVG [message #1017382 is a reply to message #1017369] Mon, 11 March 2013 18:04 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

Joshua, I imported your projects into a new workspace. They had some compilation problems, but these were solved by simply cleaning the projects (using "Project > Clean...") and then rebuilding the editor by right-clicking on the .emf file and running "Eugenia > Generate GMF editor".

After that, I was able to run a nested workspace with your plugins, create a diagram, place an Actor in it and see its SVG figure. I've attached a screenshot of the resulting diagram.
Re: SVG [message #1017419 is a reply to message #1017382] Mon, 11 March 2013 19:42 Go to previous messageGo to next message
Joshua Nwokeji is currently offline Joshua NwokejiFriend
Messages: 94
Registered: January 2013
Member
Dear Antonio,

Thanks for taking out time to look at my project, much appreciated. But I still need some more clarifications:

I am bit confused on your statement in the second paragraph:

"After that, I was able to run a nested workspace with your plugins, create a diagram, place an Actor in it and see its SVG figure. I've attached a screenshot of the resulting diagram."

Please can you shade more light on this?

How exactly can I use SVG figure in Eugenia? Could the compilation problems possibly affect the svg plugin? If yes how do I use the project clean to solve this problem?

Regards

Joshua
Re: SVG [message #1017452 is a reply to message #1017419] Mon, 11 March 2013 21:20 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

Which part would you like me to illustrate more? Are you referring to how to write the .emf file, how to generate the plugins or how to use the generated plugins? I believe I already explained what you needed to do with the .emf file Confused.

As for the "svg plugin" (the plugin with the .svg file, I guess): yes, if it doesn't compile it won't work, just like any other Java program Smile.

Sometimes, Eclipse's automatic compilation gets confused and doesn't update the class files. In these cases, using "Project > Clean..." and regenerating the editors from the .emf file does the trick.

[Updated on: Mon, 11 March 2013 21:20]

Report message to a moderator

Re: SVG [message #1017645 is a reply to message #1017452] Tue, 12 March 2013 09:05 Go to previous messageGo to next message
Joshua Nwokeji is currently offline Joshua NwokejiFriend
Messages: 94
Registered: January 2013
Member
Dear Antonio,

Thanks very much this is quite helpful.
Regards
Joshua

[Updated on: Tue, 12 March 2013 09:09]

Report message to a moderator

Re: SVG [message #1017647 is a reply to message #1017645] Tue, 12 March 2013 09:08 Go to previous messageGo to next message
Joshua Nwokeji is currently offline Joshua NwokejiFriend
Messages: 94
Registered: January 2013
Member
No Message Body

[Updated on: Tue, 12 March 2013 09:10]

Report message to a moderator

Re: SVG [message #1017649 is a reply to message #1017645] Tue, 12 March 2013 09:09 Go to previous messageGo to next message
Joshua Nwokeji is currently offline Joshua NwokejiFriend
Messages: 94
Registered: January 2013
Member
No Message Body

[Updated on: Tue, 12 March 2013 09:11]

Report message to a moderator

Re: SVG [message #1017707 is a reply to message #1017649] Tue, 12 March 2013 11:35 Go to previous messageGo to next message
Joshua Nwokeji is currently offline Joshua NwokejiFriend
Messages: 94
Registered: January 2013
Member
Dear Antonio,

I have copied the my project into a new workspace, cleaned it up using project clean, run eugenia again, yet its still gives me the error sign in the .diagram plugin after generating the code successfully. I have tried this in both eclipse epsilon (Juno), and Helios, yet it didnt work. Please what else can I do to get the svg figure work, I really need this to happen. How do I use the nested workspace you talked about earlier.

It is possible to upload (in dropbox) the workspace you used to get the previous svg working? Further help will be much appreciated.

Thanks

Joshua
Re: SVG [message #1018031 is a reply to message #1017707] Wed, 13 March 2013 01:43 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

Dear Joshua,

I've prepared a 6-minute screencast explaining the process involved from start for finish. I hope you will find it useful Smile.

http://www.youtube.com/watch?v=PPaf2s_VyKg

Don't forget to use the HD quality setting, as it may be a bit hard to read otherwise. Please excuse some random Spanish here and there: I did tell my system to switch to English, but some programs did not fully honor the setting Confused.
Re: SVG [message #1018937 is a reply to message #1018031] Thu, 14 March 2013 18:23 Go to previous messageGo to next message
Joshua Nwokeji is currently offline Joshua NwokejiFriend
Messages: 94
Registered: January 2013
Member
Dear Antonio,

Thanks very much, you are a Genius. This video is the best, and its really very helpful.

I will need further help on how to get run EVL. I followed the tutorial online but it didnt work for me. A Similar video on EVL might help.

Cheers

Joshua
Re: SVG [message #1019021 is a reply to message #1018937] Thu, 14 March 2013 22:36 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

Hi Joshua,

I'm glad you got it working Smile. We do have a screencast about EVL. Here:

http://eclipse.org/epsilon/cinema/#EVLGMFValidation

Please have a look and let us know how it goes. We'd prefer it if you started a different thread for it, though, to help future users Smile.
Re: SVG [message #1022354 is a reply to message #1019021] Thu, 21 March 2013 18:16 Go to previous messageGo to next message
Joshua Nwokeji is currently offline Joshua NwokejiFriend
Messages: 94
Registered: January 2013
Member
Dear Antonio,
Just a quick question on SVG. Does Eugenia support the declaration of canvas height and width attributes in svg figure? E.g. svg.canvas height="false".

Regards
Joshua
Re: SVG [message #1022375 is a reply to message #1022354] Thu, 21 March 2013 19:14 Go to previous messageGo to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 594
Registered: January 2010
Location: Birmingham, UK
Senior Member

EuGENia doesn't directly support that (we're limited by what can be done with the GMF models), but we do have the "size" attribute for the @gmf.node annotation. Have you tried it out?
problemas generando GMF editor con Eugenia [message #1490157 is a reply to message #1022375] Fri, 28 November 2014 00:54 Go to previous message
Amaury Glez is currently offline Amaury GlezFriend
Messages: 1
Registered: November 2014
Junior Member
Hola Antonio,
Disculpe que me dirija a usted en español, es que en inglés me costaría un poco más de tiempo y ando muy corto de él. Resulta que estoy haciendo un modelo para graficar UML. Realmente el metamodelo es mejorable pero a mi entender no tiene ningún tipo de error, tampoco contiene svg. El error surge al generar el GMF editor con Eugenia, me retorna este error luego de generar algunos archivos:
An internal error occurred during: "Generating all GMF models".
Could not initialize class UML_DIAGRAM.UML_DIAGRAMPackage

Luego creé un nuevo proyecto y solo copié el .ecore y traté de generarlo a partir de ahí y me pasa lo mismo. A mi entender sucede que cuando se compila por primera vez con errores graves (como me pasó) se crean algunos plugins o archivos temporales en el eclipse que entran en contradicción cuando vas a generar de nuevo aunque lo hagas en un proyecto nuevo.
Desde ya agradecido,
Saludos
  • Attachment: UML.ecore
    (Size: 7.67KB, Downloaded 182 times)
Previous Topic:EMF Resource loading
Next Topic:[EWL] EMF proxies resolving
Goto Forum:
  


Current Time: Thu Mar 28 23:10:14 GMT 2024

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

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

Back to the top