Home » Modeling » Epsilon » SVG(Installing GMF Experimental SVG)
|
Re: SVG [message #1016087 is a reply to message #1016062] |
Mon, 04 March 2013 22:17 |
|
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 .
[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 |
Joshua Nwokeji 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 |
|
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 . 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 |
Joshua Nwokeji 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 |
|
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 #1016964 is a reply to message #1016940] |
Fri, 08 March 2013 11:21 |
|
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 .
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 .
http://svnbook.red-bean.com/nightly/en/index.html
|
|
| | | |
Re: SVG [message #1017382 is a reply to message #1017369] |
Mon, 11 March 2013 18:04 |
|
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 #1018031 is a reply to message #1017707] |
Wed, 13 March 2013 01:43 |
|
Dear Joshua,
I've prepared a 6-minute screencast explaining the process involved from start for finish. I hope you will find it useful .
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 .
|
|
| | | |
Re: SVG [message #1022375 is a reply to message #1022354] |
Thu, 21 March 2013 19:14 |
|
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?
|
|
| |
Goto Forum:
Current Time: Wed Sep 25 23:24:51 GMT 2024
Powered by FUDForum. Page generated in 0.05058 seconds
|