4,10 → 4,10 |
* Coded by: Group 5, software practice summer 2003 |
* University of Bielefeld, Germany |
* |
* @version $Revision: 1.45 $ |
* @version $Revision: 1.46 $ |
* |
* Last modification: $Date: 2003/07/21 13:53:29 $ |
* $Id: PluginManager.java,v 1.45 2003/07/21 13:53:29 swalkenh Exp $ |
* Last modification: $Date: 2003/07/21 14:39:23 $ |
* $Id: PluginManager.java,v 1.46 2003/07/21 14:39:23 swalkenh Exp $ |
*/ |
|
package src.plugins; |
55,7 → 55,7 |
* |
* @author Sascha Walkenhorst |
* |
* @version $Revision: 1.45 $ Last modification: $Date: 2003/07/21 13:53:29 $ |
* @version $Revision: 1.46 $ Last modification: $Date: 2003/07/21 14:39:23 $ |
*/ |
public class PluginManager implements TreeSelectionListener, PluginManagerInterface, OurEventListener { |
|
880,7 → 880,7 |
* The <code>pluginAssociations</code>-list is used by this method. If no plugin |
* is explicitly associated with the given element the default plugin is returned. |
* |
* @param element The XML-element. |
* @param element: The XML-element. |
* |
* @return The name of the associated plugin. |
* |
908,10 → 908,10 |
/** |
* This method is called if the active document has been closed. Before it manages |
* that all instances of plugins for the given document name will be deleted, it |
* stops the active plugin fo the closed document, because it might will have a |
* stops the active plugin fo the closed document, because it might have a |
* modified node. |
* |
* @param closedDocumentName The name of the closed document. |
* @param closedDocumentName: The name of the closed document. |
* |
* author Sascha Walkenhorst |
* |
942,12 → 942,12 |
|
|
/** |
* Delivers itself as TreeSelectionListener. This method is needed to |
* deliver a TreeSelectionListener to a object which has knowledge of |
* Delivers itself as <code>TreeSelectionListener</code>. This method is needed to |
* deliver a <code>TreeSelectionListener</code> to an object which has knowledge of |
* selections made in the <code>PopUpJTree</code>. The inherited method |
* <code>valueChanged</code>, which extracts the element name depends |
* on the prior addition of this <code>PluginManager</code>-instance |
* as TreeSelectionListener. |
* as <code>TreeSelectionListener</code>. |
* This method implements <code>PluginManagerInterface</code>. |
* |
* @see src.plugins.PluginManagerInterface#getTreeSelectionListener() |
962,7 → 962,7 |
|
|
/** |
* Gives out all variables. The variables <code>pluginsPath</code>, |
* Prints out all variables. The variables <code>pluginsPath</code>, |
* <code>pluginsFound</code>, <code>pluginAssociations</code> and |
* <code>defaultPluginName</code> are given out to the console. |
* (for testing) |
1001,11 → 1001,11 |
* <code>log</code>-method it enables this class to fire messages to |
* the logging area of the XMLEditor. |
* |
* @param log The instance of the interface. |
* @param log: The instance of the interface. |
* |
* author Sascha Walkenhorst |
* |
* Last Revision: 21-Jul-2003 by Sascha W. |
* Last revision: 21-Jul-2003 by Sascha W. |
*/ |
public void setLogInterface (LogInterface log) { |
logInterfaceReference = log; |
1015,12 → 1015,12 |
/** |
* Method for logging a message with specific style. |
* |
* @param i The type of the message. |
* @param message The message. |
* @param i: The type of the message. |
* @param message: The message. |
* |
* @see src.gui.LogInterface#log(int, java.lang.String) |
* |
* Last Revision: 21-Jul-2003 by Sascha W. |
* Last revision: 21-Jul-2003 by Sascha W. |
*/ |
public void log(int i, String message) { |
logInterfaceReference.log(i,message); |
1031,11 → 1031,11 |
* Sets the internal DocumentManagerInterface-variable. Used to get the |
* selected node in method <code>valueChanged</code>. |
* |
* @param newDocumentManagerInterface |
* @param newDocumentManagerInterface: |
* |
* author Sascha Walkenhorst |
* |
* Last Revision: 12-Jul-2003 by Sascha W. |
* Last revision: 12-Jul-2003 by Sascha W. |
*/ |
public void setDocumentManagerInterface(DocumentManagerInterface newDocumentManagerInterface) { |
documentManagerInterface = newDocumentManagerInterface; |
1050,17 → 1050,14 |
* which has send the <code>OurEvent</code>-object. This event should contain as |
* the third value the name of the plugin to get its transformer for back direction. |
* If the old node has been changed by the plugin the old selected element has to |
* be changed with the changed node. Therefor is the path of the old selected |
* be changed with the changed node. Therefore is the path of the old selected |
* element needed. The listener for the fired <code>OurEvent</code> of this class |
* should be <code>UpdateView</code>. |
* should be <code>UpdateView</code>. |
* |
* @see src.gui.UpdateView |
* |
* This method implements the <code>OurEventListener</code>. |
* |
* @see src.control.OurEventListener#firedOurEvent(src.control.OurEvent) |
* |
* @param e The event from a plugin fired. |
* @param e: The event from a plugin fired. |
* |
* author Sascha Walkenhorst |
* |
1092,10 → 1089,12 |
} |
else { |
//testing output |
System.out.println("Node Type = " + ((Node) oldMessage[1]).getNodeType()); |
System.out.println("Node type old = " + ((Node) oldMessage[1]).getNodeType()); |
|
/* this node of 'unnormal' type must not be transformed */ |
retransformedNode = ((Node) oldMessage[1]).cloneNode(true); |
|
System.out.println("Retransformed NS-URI = " + retransformedNode.getNamespaceURI()); |
} |
|
/* oldIndex is set to the indexposition of the node which should be updated */ |
1117,16 → 1116,15 |
|
/* lastUpdatedNode is set to the new modified node */ |
lastUpdatedNode = retransformedNode; |
|
} |
|
|
/** |
* This method is called if the active document changes. ... |
* This method is called if the active document changes. |
* |
* @param newActivDocumentName The Name of the new active document. |
* @param newActivDocumentName The name of the new active document. |
* |
* TODO what while changing document? |
* TODO what while changing document ? |
* |
* author Sascha Walkenhorst |
* |