Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[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);
if (id == null) {
id = getId(context.getGraphicsAlgorithm());

if (id != null) {
return canDirectEdit(context, id);
}
}
return false;

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.

Regards,
FĂ©lix

Back to the top