|
|
Re: Graphiti and RAP [message #940296 is a reply to message #939466] |
Thu, 11 October 2012 14:02 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
|
I think you can't use graphiti for RAP.
Because GEF/RAP port only supports pre-defined figure in draw2d, since GEF/RAP does not render using graphics but HTML elements.
I think Graphiti uses custom figures which contains rendering code(Draw2d Graphics).
Anyway, I think GEF/RAP is fun toy, but it is pretty slow.
How about this one?
http://gefgwt.org
It is not ready to use yet, but it's demo prove it's quality enough.
|
|
|
|
|
|
Re: Graphiti and RAP [message #1699780 is a reply to message #1258639] |
Fri, 26 June 2015 14:13 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Jerome Sivadier![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=jerome.sivadier%40gmail.com) Messages: 15 Registered: May 2015 |
Junior Member |
|
|
Hello,
As the topic already exist, I'm glad to announce that I have been able to launch Graphiti on RAP . The result is not fully working, very experimental and I still have several "strange" bugs that seem to be linked with "org.eclipse.rap.rwt.internal.textsize.TextSizeUtil.getAvgCharWidth" but it's a beginning !
Still there are lots of modifications to do to launch a Graphiti editor on RAP:
- Download all the GEF + Draw2d plugins for RAP that are still under nightly development. I have used those for my demo : http://download.eclipse.org/rt/rap/incubator/nightly/gef/20141203-1509/plugins/?d
- Download "org.eclipse.graphiti.ui" from the source repository because we will have to modify a lot of stuff inside
- Remove all calls to "GraphitiUi.getUiLayoutService().calculateTextSize" in your source code because it crashes GEF (or draw2d...) -> Error "Graphic is disposed"
- Remove all calls to "*.getControl().addControlListener" in your source code because the size of the GEF diagram varies a lot, all the time... (sounds like a bug)
Then you will have to modify your cloned project "org.eclipse.graphiti.ui":
- New dependencies: org.eclipse.graphiti, org.eclipse.core.expressions, org.eclipse.rap.gef, org.eclipse.emf.transaction, org.eclipse.rap.jface,org.eclipse.rap.ui.ide, org.eclipse.rap.draw2d, org.eclipse.rap.draw2d.compatibility, org.eclipse.rap.ui.views.properties.tabbed, org.eclipse.rap.ui.workbench
- Patches might be needed to declare missing "org.eclipse.jface.viewers", "org.eclipse.swt.graphics" and "org.eclipse.swt.widgets" classes
- Fix the compile errors in org.eclipse.graphiti.ui, in my case I have just commented the bad lines, and changed some minor issues (ex: Rectangle.INSTANCE -> Rectangle.getINSTANCE())
- Remove the calls to unexisting functions such as "path.addArc"
- Remove all the "addMouseMoveListener" and when you need them replace them by "addMouseListener" because in RAP you CAN'T have messages all the time from the client to the server for the mouse position (...) -> eg: in DiagramBehavior
And you can finally LAUNCH your application, it should work as expected ![Smile](images/smiley_icons/icon_smile.gif)
As I know a picture is the best way to prove this is "working", a picture of the result is attached to this post: ![index.php/fa/22316/0/](index.php/fa/22316/0/)
Have fun !
Attachment: RAP.PNG
(Size: 112.21KB, Downloaded 968 times)
[Updated on: Fri, 26 June 2015 14:14] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03778 seconds