Subversion Repositories general

Compare Revisions

Ignore whitespace Rev 874 → Rev 875

/sun/xmleditor/trunk/src/plugins/PluginManagerInterface.java
4,10 → 4,10
* Coded by: Group 5, software practice summer 2003
* University of Bielefeld, Germany
*
* @version $Revision: 1.10 $
* @version $Revision: 1.11 $
*
* Last modification: $Date: 2003/07/26 11:39:28 $
* $Id: PluginManagerInterface.java,v 1.10 2003/07/26 11:39:28 swalkenh Exp $
* Last modification: $Date: 2003/07/28 12:27:32 $
* $Id: PluginManagerInterface.java,v 1.11 2003/07/28 12:27:32 swalkenh Exp $
*/
 
package src.plugins;
24,7 → 24,7
*
* @author Sascha Walkenhorst
*
* @version $Revision: 1.10 $ Last modification: $Date: 2003/07/26 11:39:28 $
* @version $Revision: 1.11 $ Last modification: $Date: 2003/07/28 12:27:32 $
*/
public interface PluginManagerInterface {
60,5 → 60,13
* Last revision: 26-Jul-2003 by S. Walkenhorst
*/
public void saveConfiguration();
 
/**
* Updates the document with the content of the plugin
*
* author Christian Stollenwerk
*
* Last revision: 28-Jul-2003 by Christian S.
*/
public void forcePluginReport();
}
/sun/xmleditor/trunk/src/gui/UpdateView.java
4,10 → 4,10
* Coded by: Group 5, software practice summer 2003
* University of Bielefeld, Germany
*
* @version $Revision: 1.55 $
* @version $Revision: 1.57 $
*
* Last modification: $Date: 2003/07/26 10:49:32 $
* $Id: UpdateView.java,v 1.55 2003/07/26 10:49:32 smcsporr Exp $
* Last modification: $Date: 2003/07/28 13:20:45 $
* $Id: UpdateView.java,v 1.57 2003/07/28 13:20:45 smcsporr Exp $
*/
 
package src.gui;
39,6 → 39,7
import src.control.DocumentManagerInterface;
import src.document.ViewFilter;
import src.parser.AdapterDomToTreeModel;
import src.parser.Validator;
import src.plugins.PluginManagerInterface;
 
/**
46,7 → 47,7
*
* @author Christian Stollenwerk
*
* @version $Revision: 1.55 $ Last modification: $Date: 2003/07/26 10:49:32 $
* @version $Revision: 1.57 $ Last modification: $Date: 2003/07/28 13:20:45 $
*/
public class UpdateView implements ActionListener, UpdateViewInterface,
OurEventListener, TreeModelListener, TreeExpansionListener, TreeSelectionListener {
66,6 → 67,12
private LinkedList treeVisibleList;
private boolean makeTreeView = false;
/** A validator is needed to check, if the current document confirms to it's grammar. */
private Validator validator = new Validator(logInterface, gui.getStatusInterface());
/**
* Empty constructor.
*/
public UpdateView() {
}
379,23 → 386,34
 
}
// TODO comments
/**
* <code>validate</code> checks, if a document confirms to it's grammar.
*
* A document doesn't confirm to it's grammar, if an error or fatal error
* occurs during validation. The <code>Validator</code> class supplies
* functionality to process a document, if a grammar has been specified.
*
* @see src.parser.Validator
*/
private void validate() {
/* Check if the document is valid. */
src.parser.Validator validator = new src.parser.Validator(logInterface, gui.getStatusInterface());
/* Update the document with the content of the plugin */
pluginManagerInterface.forcePluginReport();
/* Check, if a grammar has been specified. */
if ((documentManagerInterface.getActualDocument().getDocumentElement().hasAttribute("xsi:schemaLocation")) ||
(documentManagerInterface.getActualDocument().getDoctype() != null)) {
/* Check, if the current document is valid. */
if (validator.validateDocument(documentManagerInterface.getActualDocument(),
documentManagerInterface.getActualDocumentFile())) {
logInterface.log(LogInterface.TYPE_INFO, "The document is valid");
logInterface.log(LogInterface.TYPE_INFO, "The document is valid");
}
/* Not valid -> Print an error message. */
else {
logInterface.log(LogInterface.TYPE_ERROR, "The document does not fit to the specified grammar");
logInterface.log(LogInterface.TYPE_ERROR,
"The document does not fit to the specified grammar");
}
/* No grammar -> Print an error message. */