User: ko5tik
Date: 02/03/17 09:12:54
Modified: src/java/xdocletgui/swing Main.java MainPanel.java
TagParameterComponentFactory.java
Log:
made xdocletgui to compile and run with new
xjavadoc.
loading classes yet to be fixed
Revision Changes Path
1.6 +37 -33 xdocletgui/src/java/xdocletgui/swing/Main.java
Index: Main.java
===================================================================
RCS file: /cvsroot/xdoclet/xdocletgui/src/java/xdocletgui/swing/Main.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -r1.5 -r1.6
--- Main.java 24 Feb 2002 14:53:20 -0000 1.5
+++ Main.java 17 Mar 2002 17:12:54 -0000 1.6
@@ -45,7 +45,7 @@
import java.awt.event.WindowAdapter;
import xjavadoc.ant.XJavadocTask;
-import xjavadoc.XJavaDoclet;
+import xjavadoc.ant.XJavaDocMain;
import xjavadoc.XJavaDocRoot;
import xjavadoc.XJavaDoc;
import xjavadoc.XJavaDocException;
@@ -67,7 +67,7 @@
* @created 21. desember 2001
* @todo-javadoc Write javadocs
*/
-public class Main implements XJavaDoclet {
+public class Main extends XJavaDocMain {
/**
* array of parsed classes
*/
@@ -233,26 +233,6 @@
/**
- * Describe what the method does
- *
- * @param xjavadoc Describe what the parameter does
- * @exception XJavaDocException Describe the exception
- * @todo-javadoc Write javadocs for method
- * @todo-javadoc Write javadocs for method parameter
- * @todo-javadoc Write javadocs for exception
- */
- public void start(XJavaDocRoot xjavadoc) throws XJavaDocException {
- _xJavaDocRoot = xjavadoc;
-
- // make the tree to the left
- _classes = xjavadoc.classes();
- _mainPanel.loadClasses(_classes);
- _frame.setVisible(true);
-
- }
-
-
- /**
* exit application. maybe save...
*/
public void exit() {
@@ -272,30 +252,54 @@
* @todo-javadoc Write javadocs for exception
*/
public void load() {
- System.out.println("loading");
+ _log.debug("loading");
int result = _fileChooser.showDialog(null, "Select");
if (result == JFileChooser.APPROVE_OPTION) {
_loadSource = _fileChooser.getSelectedFile();
- System.out.println("loading from " + _loadSource);
+ _log.debug("loading from " + _loadSource);
if (_loadSource.isFile()) {
// load from file
}
else {
// load from directory
- // try {
- // XJavaDoc xjd = new XJavaDoc(_loadSource, null);
- // xjd.scan();
- // _xJavaDocRoot = xjd;
- // _classes = _xJavaDocRoot.classes();
- // _mainPanel.loadClasses(_classes);
- // } catch (XJavaDocException e) {
- // _log.error("Fatal error", e);
- //}
+ try {
+ _xJavaDocRoot =XJavaDoc.getInstance();
+
+ xjd.reset();
+ // do whatever necessary to feed
+ // xjavadoc with files
+ // did not figured yet what exactly
+ _classes = _xJavaDocRoot.sourceClasses();
+ _mainPanel.loadClasses(_classes);
+ } catch (XJavaDocException e) {
+ _log.error("Fatal error", e);
+ }
}
}
+ }
+
+
+ /**
+ * invioked when xjavadoc is ready.
+ *
+ * @exception java.lanf.Exception Describe the exception
+ * @todo-javadoc Write javadocs for exception
+ * @todo-javadoc Write javadocs for method
+ * @todo-javadoc Write javadocs for method parameter
+ * @todo-javadoc Write javadocs for exception
+ */
+ protected void start(String extraContextFileName) throws java.lang.Exception {
+
+
+ // make the tree to the left
+ _xJavaDocRoot = XJavaDoc.getInstance();
+ _classes = _xJavaDocRoot.sourceClasses();
+ _mainPanel.loadClasses(_classes);
+ _frame.setVisible(true);
+
}
1.4 +0 -1 xdocletgui/src/java/xdocletgui/swing/MainPanel.java
Index: MainPanel.java
===================================================================
RCS file: /cvsroot/xdoclet/xdocletgui/src/java/xdocletgui/swing/MainPanel.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -r1.3 -r1.4
--- MainPanel.java 22 Feb 2002 18:28:09 -0000 1.3
+++ MainPanel.java 17 Mar 2002 17:12:54 -0000 1.4
@@ -41,7 +41,6 @@
import java.awt.*;
import xjavadoc.ant.XJavadocTask;
-import xjavadoc.XJavaDoclet;
import xjavadoc.XJavaDocRoot;
import xjavadoc.XJavaDocException;
import xjavadoc.XClass;
1.2 +465 -465
xdocletgui/src/java/xdocletgui/swing/TagParameterComponentFactory.java
Index: TagParameterComponentFactory.java
===================================================================
RCS file:
/cvsroot/xdoclet/xdocletgui/src/java/xdocletgui/swing/TagParameterComponentFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -r1.1 -r1.2
--- TagParameterComponentFactory.java 25 Jan 2002 00:50:18 -0000 1.1
+++ TagParameterComponentFactory.java 17 Mar 2002 17:12:54 -0000 1.2
@@ -128,7 +128,7 @@
*/
private static void setTagParameterInGuiImpl(XDoc doc, String tagName, String
tagParameterName, Valuable valuable) {
// try to set the current value
- String parameterValue = doc.tagValue(tagName, tagParameterName);
+ String parameterValue = doc.tagAttributeValue(tagName,
tagParameterName);
if (parameterValue != null) {
valuable.setValue(parameterValue);
}
_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel