Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Polyline Decorator
Polyline Decorator [message #517489] Sun, 28 February 2010 17:14 Go to next message
Markus Krallinger is currently offline Markus KrallingerFriend
Messages: 2
Registered: February 2010
Junior Member
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 17:15]

Report message to a moderator

Re: Polyline Decorator [message #517510 is a reply to message #517489] Sun, 28 February 2010 23:02 Go to previous message
Markus Krallinger is currently offline Markus KrallingerFriend
Messages: 2
Registered: February 2010
Junior Member
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
Previous Topic:Constraint number of elements in a compartment
Next Topic:Resize constraints - how to customize the appearance
Goto Forum:
  


Current Time: Sun Sep 20 07:27:51 GMT 2020

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

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

Back to the top