Commit 7ed2b6d3 authored by Fabien Triolet's avatar Fabien Triolet
Browse files

Corrected bug with imported transmorpher

parent 35c62fa3
/** /**
* $Id: Process.java,v 1.1 2002-11-06 14:08:21 serge Exp $ * $Id: Process.java,v 1.2 2002-11-15 15:12:56 triolet Exp $
* *
* Transmorpher * Transmorpher
* *
...@@ -259,7 +259,7 @@ public class Process extends TransformationImpl { ...@@ -259,7 +259,7 @@ public class Process extends TransformationImpl {
/** Prints the XML expression of the process */ /** Prints the XML expression of the process */
public void generateXML(){ public void generateXML(){
System.out.print("<"+XMLName()+" name=\""+name+"\" type=\""+type+"\" in=\""); System.out.print("<"+XMLName()+" name=\""+name+"\" in=\"");
inPorts.generateXML(); inPorts.generateXML();
System.out.print("\" out=\""); System.out.print("\" out=\"");
outPorts.generateXML(); outPorts.generateXML();
......
/** /**
* $Id: Transmorpher.java,v 1.1 2002-11-06 14:08:21 serge Exp $ * $Id: Transmorpher.java,v 1.2 2002-11-15 15:12:56 triolet Exp $
* *
* Transmorpher * Transmorpher
* *
...@@ -202,8 +202,10 @@ public class Transmorpher extends Observable { ...@@ -202,8 +202,10 @@ public class Transmorpher extends Observable {
public final Transformation findTransformation(String name){ public final Transformation findTransformation(String name){
Transformation result = (Transformation)transformations.get(name); Transformation result = (Transformation)transformations.get(name);
if (result != null) return result; if (result != null) return result;
for (ListIterator l = imports.listIterator(0); ( l.hasNext() && (result != null ) );) { for (ListIterator l = imports.listIterator(0); ( l.hasNext() && (result == null ) );) {
result = ((Transmorpher)l.next()).findTransformation( name ); Object o = l.next();
if (o instanceof Transmorpher)
result = ((Transmorpher)o).findTransformation( name );
} //end for } //end for
return result; return result;
} }
...@@ -335,9 +337,10 @@ public class Transmorpher extends Observable { ...@@ -335,9 +337,10 @@ public class Transmorpher extends Observable {
System.out.println("<!DOCTYPE transmorpher SYSTEM \"http://transmorpher.inrialpes.fr/dtd/transmorpher.dtd\">"); System.out.println("<!DOCTYPE transmorpher SYSTEM \"http://transmorpher.inrialpes.fr/dtd/transmorpher.dtd\">");
System.out.println("<transmorpher name=\""+name+"\""); System.out.println("<transmorpher name=\""+name+"\"");
System.out.println(" version=\""+version+"\""); System.out.println(" version=\""+version+"\"");
System.out.println(" reloc=\""+reloc+"\"");
System.out.println(" optimized=\""+opt+"\""); System.out.println(" optimized=\""+opt+"\"");
System.out.println(" xmlns=\"http://transmorpher.fluxmedia.fr/1.0\""); System.out.println(" xmlns=\"http://transmorpher.fluxmedia.fr/1.0\"");
System.out.println(" xmlns:regexp=\"http://fr.fluxmedia.transmorpher.regexp.RegularExpression\">"); System.out.println(" xmlns:regexp=\"http://fr.fluxmedia.transmorpher.stdlib.RegularExpression\">");
System.out.println(); System.out.println();
Enumeration keys = defexterns.getKeys(); Enumeration keys = defexterns.getKeys();
...@@ -346,10 +349,10 @@ public class Transmorpher extends Observable { ...@@ -346,10 +349,10 @@ public class Transmorpher extends Observable {
System.out.println("<defextern name=\""+name+"\" class=\""+(String)defexterns.get(name)+"\"/>"); System.out.println("<defextern name=\""+name+"\" class=\""+(String)defexterns.get(name)+"\"/>");
} }
for (ListIterator l = imports.listIterator(0); l.hasNext();) { for (ListIterator l = imports.listIterator(0); l.hasNext();) {
System.out.println("<import href=\""+((Transmorpher)l.next()).getName()+"\"/>"); System.out.println("<import href=\""+((Transmorpher)l.next()).getFile().getPath()+"\"/>");
} //end for } //end for
for (ListIterator l = includes.listIterator(0); l.hasNext();) { for (ListIterator l = includes.listIterator(0); l.hasNext();) {
System.out.println("<include href=\""+((Transmorpher)l.next()).getName()+"\"/>"); System.out.println("<include href=\""+((Transmorpher)l.next()).getFile().getPath()+"\"/>");
} }
for (ListIterator l = transformations.listIterator(); l.hasNext();) { for (ListIterator l = transformations.listIterator(); l.hasNext();) {
Transformation t = ((Transformation)l.next()); Transformation t = ((Transformation)l.next());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment