summaryrefslogtreecommitdiffstats
path: root/scilab/modules
diff options
context:
space:
mode:
Diffstat (limited to 'scilab/modules')
-rw-r--r--scilab/modules/xcos/src/java/org/scilab/modules/xcos/port/PortCheck.java26
1 files changed, 2 insertions, 24 deletions
diff --git a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/port/PortCheck.java b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/port/PortCheck.java
index 9bdb1f2..cae1e85 100644
--- a/scilab/modules/xcos/src/java/org/scilab/modules/xcos/port/PortCheck.java
+++ b/scilab/modules/xcos/src/java/org/scilab/modules/xcos/port/PortCheck.java
@@ -43,35 +43,13 @@ public class PortCheck extends mxMultiplicity {
43 43
44 public String check(mxGraph graph, Object edge, Object source, Object target, int sourceOut, int targetIn) 44 public String check(mxGraph graph, Object edge, Object source, Object target, int sourceOut, int targetIn)
45 { 45 {
46 //System.err.println("errorMessage : "+errorMessage); 46 //System.err.println("Calling check : "+source.getClass().getSimpleName()+" -> "+target.getClass().getSimpleName());
47 System.err.println("Calling check : "+source.getClass().getSimpleName()+" -> "+target.getClass().getSimpleName()); 47 //System.err.println("Versus : "+sourceTemplate.getClass().getSimpleName()+" -> "+targetTemplate.getClass().getSimpleName());
48 System.err.println("Versus : "+sourceTemplate.getClass().getSimpleName()+" -> "+targetTemplate.getClass().getSimpleName());
49 if (isTypeCompatible(source, target)) { return null; } 48 if (isTypeCompatible(source, target)) { return null; }
50 49
51 return errorMessage; 50 return errorMessage;
52 } 51 }
53 52
54 // public boolean checkType(mxGraph graph, Object value, String type)
55 // {
56 // System.err.println("Calling checkType (3)");
57 // return false;
58 // }
59 //
60 // public boolean checkType(mxGraph graph, Object value, String type,
61 // String attr, String attrValue)
62 // {
63 // System.err.println("Calling checktype(5)");
64 // return false;
65 // }
66 // public boolean isUnlimited() {
67 // System.err.println("Calling isunlimited()");
68 // return false;
69 // }
70 // public int getMaxValue() {
71 // System.err.println("Calling getMaxValue()");
72 // return 2;
73 // }
74
75 private boolean isTypeCompatible(Object firstPort, Object secondPort) { 53 private boolean isTypeCompatible(Object firstPort, Object secondPort) {
76 54
77 if (sourceTemplate.getClass().getSimpleName().compareTo(firstPort.getClass().getSimpleName()) == 0) { 55 if (sourceTemplate.getClass().getSimpleName().compareTo(firstPort.getClass().getSimpleName()) == 0) {