Hi,
I have this code as fix:
xxxFigure figure = new xxxFigure();
RoutingStyle style = (RoutingStyle)((View)getModel()).getStyle(NotationPackage.Literals.ROUTING_STYLE);
if (! (style.getRouting() == Routing.RECTILINEAR_LITERAL)){
AbstractEMFOperation emfOp = new AbstractEMFOperation(getEditingDomain(), "routing") {
@Override
protected IStatus doExecute(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
RoutingStyle style = (RoutingStyle)((View)getModel()).getStyle(NotationPackage.Literals.ROUTING_STYLE);
style.setRouting(Routing.RECTILINEAR_LITERAL);
return Status.OK_STATUS;
}
};
try{
OperationHistoryFactory.getOperationHistory().execute(emfOp, null, null);
}catch(ExecutionException ex){
ex.printStackTrace();
}
}
return figure;
What do you think?
Ralph
[Updated on: Tue, 28 June 2011 07:42]
Report message to a moderator