mirror of https://github.com/dspinellis/UMLGraph
Added -output option to specify output file.
This commit is contained in:
parent
076c9442a7
commit
eb9764670f
|
|
@ -44,6 +44,7 @@ class Options implements Cloneable {
|
||||||
double nodeFontSize;
|
double nodeFontSize;
|
||||||
String nodeFillColor;
|
String nodeFillColor;
|
||||||
String bgColor;
|
String bgColor;
|
||||||
|
String outputFileName;
|
||||||
|
|
||||||
Options() {
|
Options() {
|
||||||
showQualified = false;
|
showQualified = false;
|
||||||
|
|
@ -61,6 +62,7 @@ class Options implements Cloneable {
|
||||||
nodeFontSize = 10;
|
nodeFontSize = 10;
|
||||||
nodeFillColor = null;
|
nodeFillColor = null;
|
||||||
bgColor = null;
|
bgColor = null;
|
||||||
|
outputFileName = "graph.dot";
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object clone()
|
public Object clone()
|
||||||
|
|
@ -118,6 +120,8 @@ class Options implements Cloneable {
|
||||||
nodeFontSize = Integer.parseInt(opt[1]);
|
nodeFontSize = Integer.parseInt(opt[1]);
|
||||||
} else if(opt[0].equals("-nodefillcolor")) {
|
} else if(opt[0].equals("-nodefillcolor")) {
|
||||||
nodeFillColor = opt[1];
|
nodeFillColor = opt[1];
|
||||||
|
} else if(opt[0].equals("-output")) {
|
||||||
|
outputFileName = opt[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -142,7 +146,7 @@ class Options implements Cloneable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void openFile() throws IOException, UnsupportedEncodingException {
|
public void openFile() throws IOException, UnsupportedEncodingException {
|
||||||
FileOutputStream fos = new FileOutputStream("graph.dot");
|
FileOutputStream fos = new FileOutputStream(outputFileName);
|
||||||
w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fos)));
|
w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fos)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -486,8 +490,8 @@ public class UmlGraph {
|
||||||
/** Entry point */
|
/** Entry point */
|
||||||
public static boolean start(RootDoc root)
|
public static boolean start(RootDoc root)
|
||||||
throws IOException, UnsupportedEncodingException {
|
throws IOException, UnsupportedEncodingException {
|
||||||
opt.openFile();
|
|
||||||
opt.setOptions(root.options());
|
opt.setOptions(root.options());
|
||||||
|
opt.openFile();
|
||||||
opt.setOptions(root.classNamed("UMLOptions"));
|
opt.setOptions(root.classNamed("UMLOptions"));
|
||||||
prologue();
|
prologue();
|
||||||
ClassDoc[] classes = root.classes();
|
ClassDoc[] classes = root.classes();
|
||||||
|
|
@ -518,6 +522,7 @@ public class UmlGraph {
|
||||||
option.equals("-edgecolor") ||
|
option.equals("-edgecolor") ||
|
||||||
option.equals("-edgefontsize") ||
|
option.equals("-edgefontsize") ||
|
||||||
option.equals("-edgefontname") ||
|
option.equals("-edgefontname") ||
|
||||||
|
option.equals("-output") ||
|
||||||
option.equals("-bgcolor"))
|
option.equals("-bgcolor"))
|
||||||
return 2;
|
return 2;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ class Options implements Cloneable {
|
||||||
double nodeFontSize;
|
double nodeFontSize;
|
||||||
String nodeFillColor;
|
String nodeFillColor;
|
||||||
String bgColor;
|
String bgColor;
|
||||||
|
String outputFileName;
|
||||||
|
|
||||||
Options() {
|
Options() {
|
||||||
showQualified = false;
|
showQualified = false;
|
||||||
|
|
@ -61,6 +62,7 @@ class Options implements Cloneable {
|
||||||
nodeFontSize = 10;
|
nodeFontSize = 10;
|
||||||
nodeFillColor = null;
|
nodeFillColor = null;
|
||||||
bgColor = null;
|
bgColor = null;
|
||||||
|
outputFileName = "graph.dot";
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object clone()
|
public Object clone()
|
||||||
|
|
@ -118,6 +120,8 @@ class Options implements Cloneable {
|
||||||
nodeFontSize = Integer.parseInt(opt[1]);
|
nodeFontSize = Integer.parseInt(opt[1]);
|
||||||
} else if(opt[0].equals("-nodefillcolor")) {
|
} else if(opt[0].equals("-nodefillcolor")) {
|
||||||
nodeFillColor = opt[1];
|
nodeFillColor = opt[1];
|
||||||
|
} else if(opt[0].equals("-output")) {
|
||||||
|
outputFileName = opt[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -142,7 +146,7 @@ class Options implements Cloneable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void openFile() throws IOException, UnsupportedEncodingException {
|
public void openFile() throws IOException, UnsupportedEncodingException {
|
||||||
FileOutputStream fos = new FileOutputStream("graph.dot");
|
FileOutputStream fos = new FileOutputStream(outputFileName);
|
||||||
w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fos)));
|
w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fos)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -486,8 +490,8 @@ public class UmlGraph {
|
||||||
/** Entry point */
|
/** Entry point */
|
||||||
public static boolean start(RootDoc root)
|
public static boolean start(RootDoc root)
|
||||||
throws IOException, UnsupportedEncodingException {
|
throws IOException, UnsupportedEncodingException {
|
||||||
opt.openFile();
|
|
||||||
opt.setOptions(root.options());
|
opt.setOptions(root.options());
|
||||||
|
opt.openFile();
|
||||||
opt.setOptions(root.classNamed("UMLOptions"));
|
opt.setOptions(root.classNamed("UMLOptions"));
|
||||||
prologue();
|
prologue();
|
||||||
ClassDoc[] classes = root.classes();
|
ClassDoc[] classes = root.classes();
|
||||||
|
|
@ -518,6 +522,7 @@ public class UmlGraph {
|
||||||
option.equals("-edgecolor") ||
|
option.equals("-edgecolor") ||
|
||||||
option.equals("-edgefontsize") ||
|
option.equals("-edgefontsize") ||
|
||||||
option.equals("-edgefontname") ||
|
option.equals("-edgefontname") ||
|
||||||
|
option.equals("-output") ||
|
||||||
option.equals("-bgcolor"))
|
option.equals("-bgcolor"))
|
||||||
return 2;
|
return 2;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ class Options implements Cloneable {
|
||||||
double nodeFontSize;
|
double nodeFontSize;
|
||||||
String nodeFillColor;
|
String nodeFillColor;
|
||||||
String bgColor;
|
String bgColor;
|
||||||
|
String outputFileName;
|
||||||
|
|
||||||
Options() {
|
Options() {
|
||||||
showQualified = false;
|
showQualified = false;
|
||||||
|
|
@ -61,6 +62,7 @@ class Options implements Cloneable {
|
||||||
nodeFontSize = 10;
|
nodeFontSize = 10;
|
||||||
nodeFillColor = null;
|
nodeFillColor = null;
|
||||||
bgColor = null;
|
bgColor = null;
|
||||||
|
outputFileName = "graph.dot";
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object clone()
|
public Object clone()
|
||||||
|
|
@ -118,6 +120,8 @@ class Options implements Cloneable {
|
||||||
nodeFontSize = Integer.parseInt(opt[1]);
|
nodeFontSize = Integer.parseInt(opt[1]);
|
||||||
} else if(opt[0].equals("-nodefillcolor")) {
|
} else if(opt[0].equals("-nodefillcolor")) {
|
||||||
nodeFillColor = opt[1];
|
nodeFillColor = opt[1];
|
||||||
|
} else if(opt[0].equals("-output")) {
|
||||||
|
outputFileName = opt[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -142,7 +146,7 @@ class Options implements Cloneable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void openFile() throws IOException, UnsupportedEncodingException {
|
public void openFile() throws IOException, UnsupportedEncodingException {
|
||||||
FileOutputStream fos = new FileOutputStream("graph.dot");
|
FileOutputStream fos = new FileOutputStream(outputFileName);
|
||||||
w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fos)));
|
w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fos)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -486,8 +490,8 @@ public class UmlGraph {
|
||||||
/** Entry point */
|
/** Entry point */
|
||||||
public static boolean start(RootDoc root)
|
public static boolean start(RootDoc root)
|
||||||
throws IOException, UnsupportedEncodingException {
|
throws IOException, UnsupportedEncodingException {
|
||||||
opt.openFile();
|
|
||||||
opt.setOptions(root.options());
|
opt.setOptions(root.options());
|
||||||
|
opt.openFile();
|
||||||
opt.setOptions(root.classNamed("UMLOptions"));
|
opt.setOptions(root.classNamed("UMLOptions"));
|
||||||
prologue();
|
prologue();
|
||||||
ClassDoc[] classes = root.classes();
|
ClassDoc[] classes = root.classes();
|
||||||
|
|
@ -518,6 +522,7 @@ public class UmlGraph {
|
||||||
option.equals("-edgecolor") ||
|
option.equals("-edgecolor") ||
|
||||||
option.equals("-edgefontsize") ||
|
option.equals("-edgefontsize") ||
|
||||||
option.equals("-edgefontname") ||
|
option.equals("-edgefontname") ||
|
||||||
|
option.equals("-output") ||
|
||||||
option.equals("-bgcolor"))
|
option.equals("-bgcolor"))
|
||||||
return 2;
|
return 2;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ class Options implements Cloneable {
|
||||||
double nodeFontSize;
|
double nodeFontSize;
|
||||||
String nodeFillColor;
|
String nodeFillColor;
|
||||||
String bgColor;
|
String bgColor;
|
||||||
|
String outputFileName;
|
||||||
|
|
||||||
Options() {
|
Options() {
|
||||||
showQualified = false;
|
showQualified = false;
|
||||||
|
|
@ -61,6 +62,7 @@ class Options implements Cloneable {
|
||||||
nodeFontSize = 10;
|
nodeFontSize = 10;
|
||||||
nodeFillColor = null;
|
nodeFillColor = null;
|
||||||
bgColor = null;
|
bgColor = null;
|
||||||
|
outputFileName = "graph.dot";
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object clone()
|
public Object clone()
|
||||||
|
|
@ -118,6 +120,8 @@ class Options implements Cloneable {
|
||||||
nodeFontSize = Integer.parseInt(opt[1]);
|
nodeFontSize = Integer.parseInt(opt[1]);
|
||||||
} else if(opt[0].equals("-nodefillcolor")) {
|
} else if(opt[0].equals("-nodefillcolor")) {
|
||||||
nodeFillColor = opt[1];
|
nodeFillColor = opt[1];
|
||||||
|
} else if(opt[0].equals("-output")) {
|
||||||
|
outputFileName = opt[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -142,7 +146,7 @@ class Options implements Cloneable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void openFile() throws IOException, UnsupportedEncodingException {
|
public void openFile() throws IOException, UnsupportedEncodingException {
|
||||||
FileOutputStream fos = new FileOutputStream("graph.dot");
|
FileOutputStream fos = new FileOutputStream(outputFileName);
|
||||||
w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fos)));
|
w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fos)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -486,8 +490,8 @@ public class UmlGraph {
|
||||||
/** Entry point */
|
/** Entry point */
|
||||||
public static boolean start(RootDoc root)
|
public static boolean start(RootDoc root)
|
||||||
throws IOException, UnsupportedEncodingException {
|
throws IOException, UnsupportedEncodingException {
|
||||||
opt.openFile();
|
|
||||||
opt.setOptions(root.options());
|
opt.setOptions(root.options());
|
||||||
|
opt.openFile();
|
||||||
opt.setOptions(root.classNamed("UMLOptions"));
|
opt.setOptions(root.classNamed("UMLOptions"));
|
||||||
prologue();
|
prologue();
|
||||||
ClassDoc[] classes = root.classes();
|
ClassDoc[] classes = root.classes();
|
||||||
|
|
@ -518,6 +522,7 @@ public class UmlGraph {
|
||||||
option.equals("-edgecolor") ||
|
option.equals("-edgecolor") ||
|
||||||
option.equals("-edgefontsize") ||
|
option.equals("-edgefontsize") ||
|
||||||
option.equals("-edgefontname") ||
|
option.equals("-edgefontname") ||
|
||||||
|
option.equals("-output") ||
|
||||||
option.equals("-bgcolor"))
|
option.equals("-bgcolor"))
|
||||||
return 2;
|
return 2;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ class Options implements Cloneable {
|
||||||
double nodeFontSize;
|
double nodeFontSize;
|
||||||
String nodeFillColor;
|
String nodeFillColor;
|
||||||
String bgColor;
|
String bgColor;
|
||||||
|
String outputFileName;
|
||||||
|
|
||||||
Options() {
|
Options() {
|
||||||
showQualified = false;
|
showQualified = false;
|
||||||
|
|
@ -61,6 +62,7 @@ class Options implements Cloneable {
|
||||||
nodeFontSize = 10;
|
nodeFontSize = 10;
|
||||||
nodeFillColor = null;
|
nodeFillColor = null;
|
||||||
bgColor = null;
|
bgColor = null;
|
||||||
|
outputFileName = "graph.dot";
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object clone()
|
public Object clone()
|
||||||
|
|
@ -118,6 +120,8 @@ class Options implements Cloneable {
|
||||||
nodeFontSize = Integer.parseInt(opt[1]);
|
nodeFontSize = Integer.parseInt(opt[1]);
|
||||||
} else if(opt[0].equals("-nodefillcolor")) {
|
} else if(opt[0].equals("-nodefillcolor")) {
|
||||||
nodeFillColor = opt[1];
|
nodeFillColor = opt[1];
|
||||||
|
} else if(opt[0].equals("-output")) {
|
||||||
|
outputFileName = opt[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -142,7 +146,7 @@ class Options implements Cloneable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void openFile() throws IOException, UnsupportedEncodingException {
|
public void openFile() throws IOException, UnsupportedEncodingException {
|
||||||
FileOutputStream fos = new FileOutputStream("graph.dot");
|
FileOutputStream fos = new FileOutputStream(outputFileName);
|
||||||
w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fos)));
|
w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fos)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -486,8 +490,8 @@ public class UmlGraph {
|
||||||
/** Entry point */
|
/** Entry point */
|
||||||
public static boolean start(RootDoc root)
|
public static boolean start(RootDoc root)
|
||||||
throws IOException, UnsupportedEncodingException {
|
throws IOException, UnsupportedEncodingException {
|
||||||
opt.openFile();
|
|
||||||
opt.setOptions(root.options());
|
opt.setOptions(root.options());
|
||||||
|
opt.openFile();
|
||||||
opt.setOptions(root.classNamed("UMLOptions"));
|
opt.setOptions(root.classNamed("UMLOptions"));
|
||||||
prologue();
|
prologue();
|
||||||
ClassDoc[] classes = root.classes();
|
ClassDoc[] classes = root.classes();
|
||||||
|
|
@ -518,6 +522,7 @@ public class UmlGraph {
|
||||||
option.equals("-edgecolor") ||
|
option.equals("-edgecolor") ||
|
||||||
option.equals("-edgefontsize") ||
|
option.equals("-edgefontsize") ||
|
||||||
option.equals("-edgefontname") ||
|
option.equals("-edgefontname") ||
|
||||||
|
option.equals("-output") ||
|
||||||
option.equals("-bgcolor"))
|
option.equals("-bgcolor"))
|
||||||
return 2;
|
return 2;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ class Options implements Cloneable {
|
||||||
double nodeFontSize;
|
double nodeFontSize;
|
||||||
String nodeFillColor;
|
String nodeFillColor;
|
||||||
String bgColor;
|
String bgColor;
|
||||||
|
String outputFileName;
|
||||||
|
|
||||||
Options() {
|
Options() {
|
||||||
showQualified = false;
|
showQualified = false;
|
||||||
|
|
@ -61,6 +62,7 @@ class Options implements Cloneable {
|
||||||
nodeFontSize = 10;
|
nodeFontSize = 10;
|
||||||
nodeFillColor = null;
|
nodeFillColor = null;
|
||||||
bgColor = null;
|
bgColor = null;
|
||||||
|
outputFileName = "graph.dot";
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object clone()
|
public Object clone()
|
||||||
|
|
@ -118,6 +120,8 @@ class Options implements Cloneable {
|
||||||
nodeFontSize = Integer.parseInt(opt[1]);
|
nodeFontSize = Integer.parseInt(opt[1]);
|
||||||
} else if(opt[0].equals("-nodefillcolor")) {
|
} else if(opt[0].equals("-nodefillcolor")) {
|
||||||
nodeFillColor = opt[1];
|
nodeFillColor = opt[1];
|
||||||
|
} else if(opt[0].equals("-output")) {
|
||||||
|
outputFileName = opt[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -142,7 +146,7 @@ class Options implements Cloneable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void openFile() throws IOException, UnsupportedEncodingException {
|
public void openFile() throws IOException, UnsupportedEncodingException {
|
||||||
FileOutputStream fos = new FileOutputStream("graph.dot");
|
FileOutputStream fos = new FileOutputStream(outputFileName);
|
||||||
w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fos)));
|
w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fos)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -486,8 +490,8 @@ public class UmlGraph {
|
||||||
/** Entry point */
|
/** Entry point */
|
||||||
public static boolean start(RootDoc root)
|
public static boolean start(RootDoc root)
|
||||||
throws IOException, UnsupportedEncodingException {
|
throws IOException, UnsupportedEncodingException {
|
||||||
opt.openFile();
|
|
||||||
opt.setOptions(root.options());
|
opt.setOptions(root.options());
|
||||||
|
opt.openFile();
|
||||||
opt.setOptions(root.classNamed("UMLOptions"));
|
opt.setOptions(root.classNamed("UMLOptions"));
|
||||||
prologue();
|
prologue();
|
||||||
ClassDoc[] classes = root.classes();
|
ClassDoc[] classes = root.classes();
|
||||||
|
|
@ -518,6 +522,7 @@ public class UmlGraph {
|
||||||
option.equals("-edgecolor") ||
|
option.equals("-edgecolor") ||
|
||||||
option.equals("-edgefontsize") ||
|
option.equals("-edgefontsize") ||
|
||||||
option.equals("-edgefontname") ||
|
option.equals("-edgefontname") ||
|
||||||
|
option.equals("-output") ||
|
||||||
option.equals("-bgcolor"))
|
option.equals("-bgcolor"))
|
||||||
return 2;
|
return 2;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ class Options implements Cloneable {
|
||||||
double nodeFontSize;
|
double nodeFontSize;
|
||||||
String nodeFillColor;
|
String nodeFillColor;
|
||||||
String bgColor;
|
String bgColor;
|
||||||
|
String outputFileName;
|
||||||
|
|
||||||
Options() {
|
Options() {
|
||||||
showQualified = false;
|
showQualified = false;
|
||||||
|
|
@ -61,6 +62,7 @@ class Options implements Cloneable {
|
||||||
nodeFontSize = 10;
|
nodeFontSize = 10;
|
||||||
nodeFillColor = null;
|
nodeFillColor = null;
|
||||||
bgColor = null;
|
bgColor = null;
|
||||||
|
outputFileName = "graph.dot";
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object clone()
|
public Object clone()
|
||||||
|
|
@ -118,6 +120,8 @@ class Options implements Cloneable {
|
||||||
nodeFontSize = Integer.parseInt(opt[1]);
|
nodeFontSize = Integer.parseInt(opt[1]);
|
||||||
} else if(opt[0].equals("-nodefillcolor")) {
|
} else if(opt[0].equals("-nodefillcolor")) {
|
||||||
nodeFillColor = opt[1];
|
nodeFillColor = opt[1];
|
||||||
|
} else if(opt[0].equals("-output")) {
|
||||||
|
outputFileName = opt[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -142,7 +146,7 @@ class Options implements Cloneable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void openFile() throws IOException, UnsupportedEncodingException {
|
public void openFile() throws IOException, UnsupportedEncodingException {
|
||||||
FileOutputStream fos = new FileOutputStream("graph.dot");
|
FileOutputStream fos = new FileOutputStream(outputFileName);
|
||||||
w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fos)));
|
w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fos)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -486,8 +490,8 @@ public class UmlGraph {
|
||||||
/** Entry point */
|
/** Entry point */
|
||||||
public static boolean start(RootDoc root)
|
public static boolean start(RootDoc root)
|
||||||
throws IOException, UnsupportedEncodingException {
|
throws IOException, UnsupportedEncodingException {
|
||||||
opt.openFile();
|
|
||||||
opt.setOptions(root.options());
|
opt.setOptions(root.options());
|
||||||
|
opt.openFile();
|
||||||
opt.setOptions(root.classNamed("UMLOptions"));
|
opt.setOptions(root.classNamed("UMLOptions"));
|
||||||
prologue();
|
prologue();
|
||||||
ClassDoc[] classes = root.classes();
|
ClassDoc[] classes = root.classes();
|
||||||
|
|
@ -518,6 +522,7 @@ public class UmlGraph {
|
||||||
option.equals("-edgecolor") ||
|
option.equals("-edgecolor") ||
|
||||||
option.equals("-edgefontsize") ||
|
option.equals("-edgefontsize") ||
|
||||||
option.equals("-edgefontname") ||
|
option.equals("-edgefontname") ||
|
||||||
|
option.equals("-output") ||
|
||||||
option.equals("-bgcolor"))
|
option.equals("-bgcolor"))
|
||||||
return 2;
|
return 2;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ class Options implements Cloneable {
|
||||||
double nodeFontSize;
|
double nodeFontSize;
|
||||||
String nodeFillColor;
|
String nodeFillColor;
|
||||||
String bgColor;
|
String bgColor;
|
||||||
|
String outputFileName;
|
||||||
|
|
||||||
Options() {
|
Options() {
|
||||||
showQualified = false;
|
showQualified = false;
|
||||||
|
|
@ -61,6 +62,7 @@ class Options implements Cloneable {
|
||||||
nodeFontSize = 10;
|
nodeFontSize = 10;
|
||||||
nodeFillColor = null;
|
nodeFillColor = null;
|
||||||
bgColor = null;
|
bgColor = null;
|
||||||
|
outputFileName = "graph.dot";
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object clone()
|
public Object clone()
|
||||||
|
|
@ -118,6 +120,8 @@ class Options implements Cloneable {
|
||||||
nodeFontSize = Integer.parseInt(opt[1]);
|
nodeFontSize = Integer.parseInt(opt[1]);
|
||||||
} else if(opt[0].equals("-nodefillcolor")) {
|
} else if(opt[0].equals("-nodefillcolor")) {
|
||||||
nodeFillColor = opt[1];
|
nodeFillColor = opt[1];
|
||||||
|
} else if(opt[0].equals("-output")) {
|
||||||
|
outputFileName = opt[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -142,7 +146,7 @@ class Options implements Cloneable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void openFile() throws IOException, UnsupportedEncodingException {
|
public void openFile() throws IOException, UnsupportedEncodingException {
|
||||||
FileOutputStream fos = new FileOutputStream("graph.dot");
|
FileOutputStream fos = new FileOutputStream(outputFileName);
|
||||||
w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fos)));
|
w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fos)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -486,8 +490,8 @@ public class UmlGraph {
|
||||||
/** Entry point */
|
/** Entry point */
|
||||||
public static boolean start(RootDoc root)
|
public static boolean start(RootDoc root)
|
||||||
throws IOException, UnsupportedEncodingException {
|
throws IOException, UnsupportedEncodingException {
|
||||||
opt.openFile();
|
|
||||||
opt.setOptions(root.options());
|
opt.setOptions(root.options());
|
||||||
|
opt.openFile();
|
||||||
opt.setOptions(root.classNamed("UMLOptions"));
|
opt.setOptions(root.classNamed("UMLOptions"));
|
||||||
prologue();
|
prologue();
|
||||||
ClassDoc[] classes = root.classes();
|
ClassDoc[] classes = root.classes();
|
||||||
|
|
@ -518,6 +522,7 @@ public class UmlGraph {
|
||||||
option.equals("-edgecolor") ||
|
option.equals("-edgecolor") ||
|
||||||
option.equals("-edgefontsize") ||
|
option.equals("-edgefontsize") ||
|
||||||
option.equals("-edgefontname") ||
|
option.equals("-edgefontname") ||
|
||||||
|
option.equals("-output") ||
|
||||||
option.equals("-bgcolor"))
|
option.equals("-bgcolor"))
|
||||||
return 2;
|
return 2;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ class Options implements Cloneable {
|
||||||
double nodeFontSize;
|
double nodeFontSize;
|
||||||
String nodeFillColor;
|
String nodeFillColor;
|
||||||
String bgColor;
|
String bgColor;
|
||||||
|
String outputFileName;
|
||||||
|
|
||||||
Options() {
|
Options() {
|
||||||
showQualified = false;
|
showQualified = false;
|
||||||
|
|
@ -61,6 +62,7 @@ class Options implements Cloneable {
|
||||||
nodeFontSize = 10;
|
nodeFontSize = 10;
|
||||||
nodeFillColor = null;
|
nodeFillColor = null;
|
||||||
bgColor = null;
|
bgColor = null;
|
||||||
|
outputFileName = "graph.dot";
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object clone()
|
public Object clone()
|
||||||
|
|
@ -118,6 +120,8 @@ class Options implements Cloneable {
|
||||||
nodeFontSize = Integer.parseInt(opt[1]);
|
nodeFontSize = Integer.parseInt(opt[1]);
|
||||||
} else if(opt[0].equals("-nodefillcolor")) {
|
} else if(opt[0].equals("-nodefillcolor")) {
|
||||||
nodeFillColor = opt[1];
|
nodeFillColor = opt[1];
|
||||||
|
} else if(opt[0].equals("-output")) {
|
||||||
|
outputFileName = opt[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -142,7 +146,7 @@ class Options implements Cloneable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void openFile() throws IOException, UnsupportedEncodingException {
|
public void openFile() throws IOException, UnsupportedEncodingException {
|
||||||
FileOutputStream fos = new FileOutputStream("graph.dot");
|
FileOutputStream fos = new FileOutputStream(outputFileName);
|
||||||
w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fos)));
|
w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fos)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -486,8 +490,8 @@ public class UmlGraph {
|
||||||
/** Entry point */
|
/** Entry point */
|
||||||
public static boolean start(RootDoc root)
|
public static boolean start(RootDoc root)
|
||||||
throws IOException, UnsupportedEncodingException {
|
throws IOException, UnsupportedEncodingException {
|
||||||
opt.openFile();
|
|
||||||
opt.setOptions(root.options());
|
opt.setOptions(root.options());
|
||||||
|
opt.openFile();
|
||||||
opt.setOptions(root.classNamed("UMLOptions"));
|
opt.setOptions(root.classNamed("UMLOptions"));
|
||||||
prologue();
|
prologue();
|
||||||
ClassDoc[] classes = root.classes();
|
ClassDoc[] classes = root.classes();
|
||||||
|
|
@ -518,6 +522,7 @@ public class UmlGraph {
|
||||||
option.equals("-edgecolor") ||
|
option.equals("-edgecolor") ||
|
||||||
option.equals("-edgefontsize") ||
|
option.equals("-edgefontsize") ||
|
||||||
option.equals("-edgefontname") ||
|
option.equals("-edgefontname") ||
|
||||||
|
option.equals("-output") ||
|
||||||
option.equals("-bgcolor"))
|
option.equals("-bgcolor"))
|
||||||
return 2;
|
return 2;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ class Options implements Cloneable {
|
||||||
double nodeFontSize;
|
double nodeFontSize;
|
||||||
String nodeFillColor;
|
String nodeFillColor;
|
||||||
String bgColor;
|
String bgColor;
|
||||||
|
String outputFileName;
|
||||||
|
|
||||||
Options() {
|
Options() {
|
||||||
showQualified = false;
|
showQualified = false;
|
||||||
|
|
@ -61,6 +62,7 @@ class Options implements Cloneable {
|
||||||
nodeFontSize = 10;
|
nodeFontSize = 10;
|
||||||
nodeFillColor = null;
|
nodeFillColor = null;
|
||||||
bgColor = null;
|
bgColor = null;
|
||||||
|
outputFileName = "graph.dot";
|
||||||
}
|
}
|
||||||
|
|
||||||
public Object clone()
|
public Object clone()
|
||||||
|
|
@ -118,6 +120,8 @@ class Options implements Cloneable {
|
||||||
nodeFontSize = Integer.parseInt(opt[1]);
|
nodeFontSize = Integer.parseInt(opt[1]);
|
||||||
} else if(opt[0].equals("-nodefillcolor")) {
|
} else if(opt[0].equals("-nodefillcolor")) {
|
||||||
nodeFillColor = opt[1];
|
nodeFillColor = opt[1];
|
||||||
|
} else if(opt[0].equals("-output")) {
|
||||||
|
outputFileName = opt[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -142,7 +146,7 @@ class Options implements Cloneable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void openFile() throws IOException, UnsupportedEncodingException {
|
public void openFile() throws IOException, UnsupportedEncodingException {
|
||||||
FileOutputStream fos = new FileOutputStream("graph.dot");
|
FileOutputStream fos = new FileOutputStream(outputFileName);
|
||||||
w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fos)));
|
w = new PrintWriter(new BufferedWriter(new OutputStreamWriter(fos)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -486,8 +490,8 @@ public class UmlGraph {
|
||||||
/** Entry point */
|
/** Entry point */
|
||||||
public static boolean start(RootDoc root)
|
public static boolean start(RootDoc root)
|
||||||
throws IOException, UnsupportedEncodingException {
|
throws IOException, UnsupportedEncodingException {
|
||||||
opt.openFile();
|
|
||||||
opt.setOptions(root.options());
|
opt.setOptions(root.options());
|
||||||
|
opt.openFile();
|
||||||
opt.setOptions(root.classNamed("UMLOptions"));
|
opt.setOptions(root.classNamed("UMLOptions"));
|
||||||
prologue();
|
prologue();
|
||||||
ClassDoc[] classes = root.classes();
|
ClassDoc[] classes = root.classes();
|
||||||
|
|
@ -518,6 +522,7 @@ public class UmlGraph {
|
||||||
option.equals("-edgecolor") ||
|
option.equals("-edgecolor") ||
|
||||||
option.equals("-edgefontsize") ||
|
option.equals("-edgefontsize") ||
|
||||||
option.equals("-edgefontname") ||
|
option.equals("-edgefontname") ||
|
||||||
|
option.equals("-output") ||
|
||||||
option.equals("-bgcolor"))
|
option.equals("-bgcolor"))
|
||||||
return 2;
|
return 2;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue