Hi Félix,
you don’t miss anything, that is a bug. The inner if needs to be moved outside.
I have created
https://bugs.eclipse.org/bugs/show_bug.cgi?id=416708 for this.
Regards,
Michael
From: graphiti-dev-bounces@xxxxxxxxxxx [mailto:graphiti-dev-bounces@xxxxxxxxxxx]
On Behalf Of Felix Velasco
Sent: Donnerstag, 5. September 2013 19:00
To: Discuss development topics on Graphiti
Subject: [graphiti-dev] IDPattern
Hi,
I've been playing with the new IdPattern for a new project at $DAYJOB, and, basically, I'm loving it. However, looking at the code, I've noticed a weird thing that I'm not sure whether it's a bug, or just something I don't understand.
In the IdPattern#canDirectEdit method, I've fount there's this code:
String id = getId(pictogramElement);
id = getId(context.getGraphicsAlgorithm());
return canDirectEdit(context, id);
My directEditing works, but I can't stop wondering if it's not working by chance. If I had put the id to the pe instead of the ga, it would return false, and the directEditing wouldn't work. Or maybe it's just that I'm missing something,
since I've used the IdPattern just for a couple of days.
|