Update of /cvsroot/xdoclet/xdoclet2/src/java/xdoclet
In directory sc8-pr-cvs1:/tmp/cvs-serv14848/src/java/xdoclet
Modified Files:
Plugin.java
Log Message:
Added File editor for output directory
Index: Plugin.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet2/src/java/xdoclet/Plugin.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** Plugin.java 20 Mar 2003 18:52:33 -0000 1.16
--- Plugin.java 23 Mar 2003 13:30:43 -0000 1.17
***************
*** 62,66 ****
/** The directory where plugin will write the files. */
! private File _destination;
public Plugin() {
--- 62,66 ----
/** The directory where plugin will write the files. */
! private File _destinationDir;
public Plugin() {
***************
*** 91,99 ****
/**
* Returns the destination directory (without package directory).
* @return the destination directory
*/
! protected File getDestination() {
! return _destination;
}
--- 91,135 ----
/**
+ * Gets the XML encoding.
+ *
+ * @see #setEncoding
+ * @return the XML encoding.
+ */
+ public String getEncoding() {
+ return _encoding;
+ }
+
+ /**
+ * Sets the encoding to use. Only applies to generation of XML files.
+ * Default is "ISO-8859-1"
+ *
+ * @bean.property
+ * shortDescription="Encoding of generated file(s). Applies to XML generation
only."
+ * displayName="Encoding"
+ * @param encoding the encoding to use.
+ */
+ public void setEncoding(String encoding) {
+ _encoding = encoding;
+ }
+
+ /**
* Returns the destination directory (without package directory).
* @return the destination directory
*/
! public File getDestinationDir() {
! return _destinationDir;
! }
!
! /**
! * Sets the destination directory.
! *
! * @bean.property
! * shortDescription="Directory where files will be written."
! * displayName="Destination Directory"
! * editor="xdoclet.beans.FilePropertyEditor"
! * @param destinationDir the directory where the plugin will write its files.
! */
! public void setDestinationDir(File destinationDir) {
! _destinationDir = destinationDir;
}
***************
*** 105,115 ****
* an IDE wrapper), make sure the destination is an absolute path.
*
- * @bean.property
- * shortDescription="Directory where files will be written."
- * displayName="Destination Directory"
* @param destination the directory where the plugin will write its files.
*/
public void setDestination(String destination) {
! _destination = new File(destination);
}
--- 141,167 ----
* an IDE wrapper), make sure the destination is an absolute path.
*
* @param destination the directory where the plugin will write its files.
*/
public void setDestination(String destination) {
! setDestinationDir( new File(destination) );
! }
!
! /**
! * Sets the file name of the generated file(s). The value should be a plain
! * a pattern such as Foo{0}.java or a plain String such as Bar.txt
! * The occurrance of {0} will be substituted by the name of the class
! * the file is generated from.
! *
! * @bean.property
! * shortDescription="Name of generated file. If multiple files should be
generated, use {0} in the name."
! * displayName="Generated File"
! * @param fileName the name of the generated file(s).
! */
! public void setFileName(String fileName) {
! _fileName = fileName;
! }
!
! public final String getFileName() {
! return _fileName;
}
***************
*** 276,298 ****
/**
- * Sets the file name of the generated file(s). The value should be a plain
- * a pattern such as Foo{0}.java or a plain String such as Bar.txt
- * The occurrance of {0} will be substituted by the name of the class
- * the file is generated from.
- *
- * @bean.property
- * shortDescription="Name of generated file. If multiple files should be
generated, use {0} in the name."
- * displayName="Generated File"
- * @param fileName the name of the generated file(s).
- */
- public void setFileName(String fileName) {
- _fileName = fileName;
- }
-
- public final String getFileName() {
- return _fileName;
- }
-
- /**
* Sets the package name of the generated files. This will be converted
* to a path and appended to destinationDir. Only specify this if no
--- 328,331 ----
***************
*** 383,392 ****
private final File getAndCreateRealDestDir(String packageName)
throws XDocletException {
! if (getDestination() == null) {
throw new XDocletException("destination was not specified for plugin \""
+ getName() + "\"");
}
String packageNameAsPath = packageName.replace('.', File.separatorChar);
! File dir = new File(getDestination(), packageNameAsPath);
dir.mkdirs();
--- 416,425 ----
private final File getAndCreateRealDestDir(String packageName)
throws XDocletException {
! if (getDestinationDir() == null) {
throw new XDocletException("destination was not specified for plugin \""
+ getName() + "\"");
}
String packageNameAsPath = packageName.replace('.', File.separatorChar);
! File dir = new File(getDestinationDir(), packageNameAsPath);
dir.mkdirs();
***************
*** 437,460 ****
return new File(destinationDir, fileName);
- }
-
- /**
- * Sets the encoding to use. Only applies to generation of XML files.
- * Default is "ISO-8859-1"
- *
- * @param encoding the encoding to use.
- */
- public void setEncoding(String encoding) {
- _encoding = encoding;
- }
-
- /**
- * Gets the XML encoding.
- *
- * @see #setEncoding
- * @return the XML encoding.
- */
- public String getEncoding() {
- return _encoding;
}
--- 470,473 ----
-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open!
Get cracking and register here for some mind boggling fun and
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel