Changeset 502 for trunk/org.modelica.uml.sysml.diagram2/src/org
- Timestamp:
- 04/20/07 16:26:34 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/org.modelica.uml.sysml.diagram2/src/org/modelica/uml/sysml/diagram2/part/SysmlInheritanceDiagramAction.java
r501 r502 141 141 classType = result[0].trim(); 142 142 classType = classType.substring(1, classType.length()-1); 143 143 144 144 //Out of memory debugging 145 if(c reatedNodes.size()== 88){145 if(classes[i].equals("Modelica.Blocks.Interfaces.RealInput")){ 146 146 int breakp = 0; 147 147 } 148 148 149 149 createdEditPart = createEmptyNodeEditPart(classType); 150 150 createdNode = new CustomNode(classType.trim(),classes[i],createdEditPart); 151 151 152 152 createdNodes.add(createdNode); 153 153 154 154 command = "getClassNames("+ classes[i]+ ")"; 155 155 156 156 String retval=""; 157 157 … … 162 162 163 163 } 164 164 165 165 org.modelica.mdt.core.List list = null; 166 166 try{ … … 178 178 179 179 } 180 181 result = new String[list.size()]; 182 183 for(int j =0;j<list.size();j++){ 184 185 result[j] = classes[i] + "." + list.elementAt(j).toString(); 186 String tmpResult = result[j]; 187 } 188 createInheritanceNodesList(result); 189 } 190 180 181 if(list != null){ 182 result = new String[list.size()]; 183 184 for(int j =0;j<list.size();j++){ 185 186 result[j] = classes[i] + "." + list.elementAt(j).toString(); 187 String tmpResult = result[j]; 188 } 189 createInheritanceNodesList(result); 190 } 191 } 192 191 193 } 192 194 … … 213 215 214 216 for(int i=0;i<inheritanceCount;i++){ 215 omcCommand = "getNthInheritedClass("+ sourceNode.getName()+","+ i+")";217 omcCommand = "getNthInheritedClass("+ sourceNode.getName()+","+(i+1)+")"; 216 218 217 219 try{ … … 222 224 } 223 225 226 omcResult = omcResult.trim(); 227 //omcResult = omcResult.substring(1, omcResult.length()-1); 228 224 229 EditPart targetEditPart = getEditPart(omcResult); 225 230 … … 245 250 SysmlDiagramEditorPlugin.DIAGRAM_PREFERENCES_HINT); 246 251 247 Command command = connectionRequest.getCreateCommand(connectionRequest, 248 (EditPart)editPart.getChildren().get(0), 249 (EditPart)editPart.getChildren().get(1)); 252 Command command = connectionRequest.getCreateCommand(connectionRequest,source, target); 250 253 251 254 if (command == null || !(command.canExecute())) { … … 296 299 297 300 //Set the location of the node in the diagram 298 if(startPoint. y<200)301 if(startPoint.x<200) 299 302 startPoint.x += 100; 300 303 else{ 301 304 startPoint.y += 100; 302 305 startPoint.x = 0; 306 303 307 } 304 308 … … 343 347 while(listIterator.hasNext()){ 344 348 CustomNode tempNode = (CustomNode)listIterator.next(); 345 if(tempNode.getName() == name){349 if(tempNode.getName().equals(name)){ 346 350 return tempNode.getNodeEditPart(); 347 351 }
Note: See TracChangeset
for help on using the changeset viewer.