protected DeltaOperation getConnectorOperation( DeltaOperation sourceOp, DeltaOperation targetOp, SimulinkSignal signal) { DeltaOperation result = DeltaOperation.UNDEFINED; matlab.setvar("TEMP_DOUBLE_VAL", signal.getSrcConnHandle()); String command = "if(exist('TEMP_DOUBLE_VAL','var')) TEMP_VAR=get_param(get_param(TEMP_DOUBLE_VAL,'SrcBlockHandle'),'UserData'); end;"; matlab.eval(command); String command2 = "a=''; if(exist('TEMP_VAR','var')) if isKey(TEMP_VAR.lineMap,getfullname(TEMP_DOUBLE_VAL)) a=TEMP_VAR.lineMap(getfullname(TEMP_DOUBLE_VAL)).opName; end; end; a;"; matlab.eval(command2); Object[] opResult = matlab.reval("a", 1); // "a=''; if isKey(TEMP_VAR.lineMap,TEMP_DOUBLE_VAL) a=TEMP_VAR.lineMap(TEMP_DOUBLE_VAL).opName; // end; a" String operation = ""; if (opResult != null && opResult.length == 1 && opResult[0] instanceof String) { operation = (String) opResult[0]; } if (operation.equals("add")) { result = DeltaOperation.ADD; } else if (operation.equals("remove")) { result = DeltaOperation.REMOVE; } else if (operation.equals("modify")) { result = DeltaOperation.MODIFY; } else if (operation.equals("replace")) { result = DeltaOperation.REPLACE; } else { result = DeltaOperation.UNDEFINED; } return result; }