Changeset 7510
- Timestamp:
- 05/07/08 13:45:49 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
ossiedev/branches/jsnyder/ComponentProject/src/edu/vt/ossie/wavedev/Port.java
r7494 r7510 80 80 return getString(TYPE); 81 81 } 82 83 public String connect(Port remotePort) 84 { 85 String result = null; 86 87 if(this.getType() == remotePort.getType()) 88 result = "Both ports are " + this.getType() + " ports."; 89 else 90 { 91 Connection connection = (Connection) factory().create(Connection.PYTHON_CLASS, 92 this, remotePort, remotePort.getOwner()); 93 94 if(!connection.checkConnection(connection)) 95 result = "Duplicate Connection."; 96 else 97 getOwner().getConnections().append(connection.deepcopy()); 98 } 99 return result; 100 } 82 101 83 102 … … 90 109 { 91 110 put(ECLIPSE_OWNER, Py.None); 111 put(ECLIPSE_CONNECTIONS, Py.None); 92 112 } 113 93 114 } 94 115 … … 101 122 // Augmented attributes added by Eclipse tools 102 123 private static final String ECLIPSE_OWNER = "xOwner"; 124 private static final String ECLIPSE_CONNECTIONS = "xConnections"; 103 125 }