Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Help with tutorial
Help with tutorial [message #1860914] Fri, 08 September 2023 13:52 Go to next message
Leonard Theisler is currently offline Leonard TheislerFriend
Messages: 16
Registered: September 2023
Junior Member
Hi everyone

I am a complete beginner with graphiti and I am currently trying to do the tutorial (https://help.eclipse.org/latest/index.jsp?topic=%2Forg.eclipse.graphiti.doc%2Fresources%2Fdocu%2Fgfw%2Fadd-feature.htm).

I am completely lost within the first few steps of the tutorial. I have created a class for the diagram type provider and copy pasted the implementation, and I have edited the plugin.xml file. When I create a class for TutorialAddEClassFeature and copy paste the code, there are errors on nearly every line. Most of the errors are just a matter of importing some libraries, but many still remain. For instance, it does not recognize the add and canAdd methods and suggests to rename them to add1 and canAdd1. It is also unable to resolve DiagramtargetDiagram to a type. These are just a few examples, there are many more. I have the same problem when doing the next step (overriding getAddFeature in the feature provider). Could anyone help me with this or have any tips on how to solve it?

Thank you
Re: Help with tutorial [message #1860916 is a reply to message #1860914] Fri, 08 September 2023 14:34 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Hi Leonard,

this sounds as if you do not have the plugin dependencies to Graphiti defined. Your plugin must define at least dependencies to org.eclipse.graphiti, org.eclipse.graphiti.ui and org.eclipse.graphiti.mm.

You can also have a look at the complete example project org.eclipse.graphiti.examples.tutorial that is part of the Graphiti SDK to see how things should look like.

Hope that help,
- Michael
Re: Help with tutorial [message #1860943 is a reply to message #1860916] Mon, 11 September 2023 09:32 Go to previous messageGo to next message
Leonard Theisler is currently offline Leonard TheislerFriend
Messages: 16
Registered: September 2023
Junior Member
Hi Michael,

I apologize for my complete ignorance, but how can I run the complete example project? I believe that I have downloaded the Graphiti SDK but I don't have the example project when I click on File->New->Example.

Also, I'm pretty sure that I have all of the plugin dependencies defined properly, could you have a look at the attached screenshot? I still have the same issues that I metioned in the previous post.

Thank you
Re: Help with tutorial [message #1860953 is a reply to message #1860943] Mon, 11 September 2023 15:18 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Hi Leonard,

from the screenshot this looks ok.

The File -> New -> Example will just allow you to create a Graphiti diagram using the example, but cannot be used to have a look at the project itself.

The easiest way to get the project when you have the Graphiti SDK installed in your IDE is probably to do Import -> Plug-in Development-> Plug-ins and Fragments

On the next page of the wizard select "Projects with source folders" under "Import as" (leave the rest as default, then on the next page bring "org.eclipse.graphiti.examples.tutorial" into the right column and press finish. You should then get the complete project with sources in your workspace.

-Michael
Previous Topic:Automated Test for Graphiti Diagrams
Goto Forum:
  


Current Time: Wed Feb 21 19:51:15 GMT 2024

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

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

Back to the top