Skip to content
Snippets Groups Projects
Commit f226fed2 authored by Raphael GIRARDOT's avatar Raphael GIRARDOT
Browse files

No more use of ProxyFactory and classes linked to it (TangoAttribute,...

No more use of ProxyFactory and classes linked to it (TangoAttribute, TangoCommand, etc.) in TangoDataSouce
parent af417ad1
No related branches found
No related tags found
No related merge requests found
...@@ -129,7 +129,8 @@ public class TangoCommandSourceDevice extends AbstractTangoDeviceSource { ...@@ -129,7 +129,8 @@ public class TangoCommandSourceDevice extends AbstractTangoDeviceSource {
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.append(NUMBER_VALUE).append(STRING_VALUE).append(RESULT_SEP); builder.append(NUMBER_VALUE).append(STRING_VALUE).append(RESULT_SEP);
for (int i = 0; i < stringMixArrayArgout.length; i++) { for (int i = 0; i < stringMixArrayArgout.length; i++) {
builder.append(numMixArrayArgout[i] + TABULATION + stringMixArrayArgout[i] + RESULT_SEP); builder.append(
numMixArrayArgout[i] + TABULATION + stringMixArrayArgout[i] + RESULT_SEP);
} }
result = builder.toString(); result = builder.toString();
} }
...@@ -160,7 +161,9 @@ public class TangoCommandSourceDevice extends AbstractTangoDeviceSource { ...@@ -160,7 +161,9 @@ public class TangoCommandSourceDevice extends AbstractTangoDeviceSource {
tangoCommand = commandMap.get(command.toLowerCase()); tangoCommand = commandMap.get(command.toLowerCase());
// If it is not created // If it is not created
if (tangoCommand == null) { if (tangoCommand == null) {
tangoCommand = TangoCommandHelper.getTangoCommand(controller.getDeviceName(), command); // tangoCommand = TangoCommandHelper.getTangoCommand(controller.getDeviceName(), command);
// XXX The use of TangoCommand should be avoided
tangoCommand = new TangoCommand(controller.getDeviceName(), command);
if (tangoCommand != null) { if (tangoCommand != null) {
// Add to the commandMap // Add to the commandMap
commandMap.put(command.toLowerCase(), tangoCommand); commandMap.put(command.toLowerCase(), tangoCommand);
...@@ -172,11 +175,11 @@ public class TangoCommandSourceDevice extends AbstractTangoDeviceSource { ...@@ -172,11 +175,11 @@ public class TangoCommandSourceDevice extends AbstractTangoDeviceSource {
throw exc; throw exc;
} }
if (tangoCommand == null) { // if (tangoCommand == null) {
Exception ex = new Exception(COMMAND_NOT_FOUND_ERROR + " " + controller.getDeviceName() + "/" + command); // Exception ex = new Exception(COMMAND_NOT_FOUND_ERROR + " " + controller.getDeviceName() + "/" + command);
controller.traceError(ex.getMessage(), ex); // controller.traceError(ex.getMessage(), ex);
throw ex; // throw ex;
} // }
return tangoCommand; return tangoCommand;
} }
...@@ -262,8 +265,8 @@ public class TangoCommandSourceDevice extends AbstractTangoDeviceSource { ...@@ -262,8 +265,8 @@ public class TangoCommandSourceDevice extends AbstractTangoDeviceSource {
currentCommand = commandInfo.cmd_name; currentCommand = commandInfo.cmd_name;
boolean add = (!expertLevel && commandInfo.level == DispLevel.OPERATOR) || expertLevel; boolean add = (!expertLevel && commandInfo.level == DispLevel.OPERATOR) || expertLevel;
if (add) { if (add) {
commandListNode.add(COMMANDS_NODE + TangoDeviceExplorerUtilities.PATH_SEPARATOR commandListNode
+ currentCommand); .add(COMMANDS_NODE + TangoDeviceExplorerUtilities.PATH_SEPARATOR + currentCommand);
commandList.add(currentCommand.toLowerCase()); commandList.add(currentCommand.toLowerCase());
} }
commandInfoMap.put(currentCommand.toLowerCase(), commandInfo); commandInfoMap.put(currentCommand.toLowerCase(), commandInfo);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment