Polyline Decorator [message #517489] |
Sun, 28 February 2010 12:14  |
Eclipse User |
|
|
|
Hello!
I have a question regarding polyline decorators in eclipse gmf:
My assigment is to create a class diagram-like editor for an domain specific language. In this editor I want to have UML symbols for the connections, more specific the filled triangle for Generalisation. I tried to do that with the normal Polyline Decorator and Template Points, but the problem with this approach is that I can not fill the triangle. My next try was to create the Decorator with an polygon. The structur looks like:
- Polyline Decorator ImplementsArraw
- Polygon Triangle
- Foreground: black
- Background: white
- (-2,2)
- (0,0)
- (-2,-2)
The problem is that based on this structure the following code is generated:
/**
* @generated
*/
private RotatableDecoration createTargetDecoration()
{
PolylineDecoration df = new PolylineDecoration();
df.setFillXOR(true);
df.setLineWidth(1);
return df;
}
whats basically far away from what I want. I also tried to create the polygon programatically without success.
I tried it based on [1] and [2].
I am using eclipse 3.5.1 and eclipse modeling tools 20090920-1017.
Maybe someone had a different problem.
Thanks in advance,
Markus Krallinger
[1] http://dev.eclipse.org/newslists/news.eclipse.technology.gmf /msg03356.html
[2] http://www.eclipsezone.com/eclipse/forums/t77708.rhtml
[Updated on: Sun, 28 February 2010 12:15] by Moderator
|
|
|
Re: Polyline Decorator [message #517510 is a reply to message #517489] |
Sun, 28 February 2010 18:02  |
Eclipse User |
|
|
|
I found the solution to my problem:
Its wrong to create a polyline decorator. I assumed a polyline decorator DECORATES a polyline, buts thats wrong. A polyline decorator is a decorator CONSISTING of polylines, without filling. In my case I have to use a polygon decorator, then everything looks fine.
- Polygon Decorator ImplementsArrow
- Foreground: black
- Background: white
- (0,0)
- (-2,2)
- (-2,-2)
- (0,0)
Best regards
Markus Krallinger
|
|
|
Powered by
FUDForum. Page generated in 0.06666 seconds