Subversion Repositories general

Rev

Rev 348 | Blame | Last modification | View Log | RSS feed

PK
–ið.        META-INF/þÊPK
–ið.­ª#META-INF/MANIFEST.MFManifest-Version: 1.0
Comment: this plugin is/was used during testing
Transform-To-File: src/plugins/dummyPlugin/DummyPluginTransform.xsl
Created-By: 1.4.0 (Sun Microsystems Inc.)
Description: ...(todo)
XMLEditor-Plugin-Name: dummy plugin
Class-Path: 
Transform-Fro-File: src/plugins/dummyPlugin/DummyPluginTransformBack.x
 sl
Main-Class: src.plugins.dummyPlugin.DummyPlugin

Name: src/plugins/dummyPlugin
Specification-Version: 0.4 (05/07/03)
Specification-Title: plugin for XMLEditor
Implementation-Version: 0.2 (05/07/03)
Implementation-Title: src.plugins.dummyPlugin
Implementation-Vendor: group5, software practice SS_2003, University B
 ielefeld, Germany
Specification-Vendor: group5, software practice SS_2003, University Bi
 elefeld, Germany

PK
hð.⪍//)src/plugins/dummyPlugin/DummyPlugin.classÊþº¾-á#src/plugins/dummyPlugin/DummyPluginjavax/swing/JPanelsrc/plugins/PluginInterfacejava/awt/event/ActionListener
pluginNameLjava/lang/String;
ConstantValuedummy pluginguiLsrc/gui/GuiInterface;ourEventListenerLsrc/control/OurEventListener;labelLjavax/swing/JLabel;originalElementLorg/w3c/dom/Node;counterI<init>()VCode
  
        javax/swing/JLabel(Ljava/lang/String;)V!
 "       $       &       (java/awt/BorderLayout*
+java/awt/Container-  setLayout(Ljava/awt/LayoutManager;)V/0
.1Center3add)(Ljava/awt/Component;Ljava/lang/Object;)V56
.7javax/swing/JComponent9
setVisible(Z)V;<
:=java/lang/System?outLjava/io/PrintStream;AB   @C,I'm a new instance of the dumb dummy-plugin!Ejava/io/PrintStreamGprintlnI!
HJLineNumberTableLocalVariableTablethis%Lsrc/plugins/dummyPlugin/DummyPlugin;init(Lsrc/gui/GuiInterface;)V      Rdummy plugin initializedTstart+(Lorg/w3c/dom/Node;Lorg/w3c/dom/Document;)Vjavax/swing/JMenuX
Y"javax/swing/JMenuItem[
dummy Item]
\"javax/swing/AbstractButton`addActionListener"(Ljava/awt/event/ActionListener;)Vbc
ad0(Ljavax/swing/JMenuItem;)Ljavax/swing/JMenuItem;5f
Ygsrc/gui/GuiInterfacei
setPluginMenu(Ljavax/swing/JMenu;)VkljmsetPluginPanel(Ljavax/swing/JPanel;)Vopjqdummy plugin has startedselementenvironmentLorg/w3c/dom/Document; dummyMenuLjavax/swing/JMenu;       dummyItemLjavax/swing/JMenuItem;stopsetOurEventListener!(Lsrc/control/OurEventListener;)V       newListenerforceStatusReportorg/w3c/dom/Nodeƒ
hasAttributes()Z…†„‡
getAttributes()Lorg/w3c/dom/NamedNodeMap;‰Š„‹nameorg/w3c/dom/NamedNodeMapremoveNamedItem&(Ljava/lang/String;)Lorg/w3c/dom/Node;‘’“url•
hasChildNodes—†„˜
getFirstChild()Lorg/w3c/dom/Node;š›„œremoveChild&(Lorg/w3c/dom/Node;)Lorg/w3c/dom/Node;žŸ„    cloneNode(Z)Lorg/w3c/dom/Node;¢£„¤appendChild¦Ÿ„§firePluginChangedElement'(Lorg/w3c/dom/Node;Lorg/w3c/dom/Node;)V©ª
«modifiedElementattrLorg/w3c/dom/NamedNodeMap;
clonedElementsrc/control/OurEvent±java/lang/Object³([Ljava/lang/Object;)Vµ
²¶src/control/OurEventListener¸
firedOurEvent(Lsrc/control/OurEvent;)Vº»¹¼oldNodechangedElementeLsrc/control/OurEvent;actionPerformed(Ljava/awt/event/ActionEvent;)Vjava/awt/event/ActionEventÄgetActionCommand()Ljava/lang/String;ÆÇ
ÅÈjava/lang/StringBufferÊdummy Item in Menu clicked Ì
Ë"append(I)Ljava/lang/StringBuffer;ÏÐ
ËÑ timesÓ,(Ljava/lang/String;)Ljava/lang/StringBuffer;ÏÕ
ËÖtoStringØÇ
ËÙNorthÛarg0Ljava/awt/event/ActionEvent;
SourceFileDummyPlugin.java!  

’D*·*
µ*» Y
·#µ%*µ'*µ)*»+Y·,¶2**´%4¶8*¶>²DF¶K±L*
(
"#%!),*6+;-C.MDNOPQJ*+µS²DU¶K±L57
8MNOVW¿I*+µ'»YY
·ZN»\Y^·_:*¶e-¶hW*´S-¹n*´S*¹r*¶>²Dt¶K±L*
?ABC D'E1G;H@JHOM4INOIuIvw:xy/z{|B*¶>*´S¹n±LVWXMNO}~>*+µ€±L
_`MNO‚ÇW*´'L+¹ˆ™+¹ŒM,Ž¹”W,–¹”W+¹™™++¹¹¡W+¹¥M+,¹¨W**´'+·¬±L.gijkl'o0p=sEtMvVwM*WNOR­®¯E°©ªt$»²Y½´Y+SY,SY
S··N*´€-¹½±L{|#}M*$NO$¾$¿ÀÁÂÃr6+¶É^¦/*» Y»ËYÍ·Î*Y´)`Zµ)¶ÒԶ׶ڷ#ܶ8±L„  …5‡M6NO6ÝÞßàPK
hð.§¶6o
o
(src/plugins/dummyPlugin/DummyPlugin.java/*
* software practice
* ss_2003
* group project: XML-Editor
* $Id: DummyPlugin.java,v 1.13 2003/07/14 15:42:46 swalkenh Exp $
*/

package src.plugins.dummyPlugin;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import org.w3c.dom.*;

import src.control.OurEvent;
import src.control.OurEventListener;
import src.gui.*;
import src.plugins.PluginInterface;


/**
 * dummy plugin used for testing
 */
public class DummyPlugin extends JPanel
                                                 implements PluginInterface, ActionListener {
        
        //added 16.07.03 Sascha W. cause method "firedOurEvent" has changed
        /** Name of the plugin, used in method <code>firePluginChangedElement</code> */
        final private String pluginName = "dummy plugin";
        
        private GuiInterface gui;
        private OurEventListener ourEventListener;
        
        private JLabel label = new JLabel("dummy plugin");
        private Node originalElement = null;
        
        private int counter = 0;


        public DummyPlugin() {
                setLayout(new BorderLayout());
                add(label, BorderLayout.CENTER);
                setVisible(false);

                System.out.println("I'm a new instance of the dumb dummy-plugin!");
        }
        

        /* (non-Javadoc)
         * @see src.gui.PluginInterface#init(src.gui.GuiInterface)
         */
        public void init(GuiInterface gui) {
                this.gui = gui;

                System.out.println("dummy plugin initialized");
        }


        /* (non-Javadoc)
         * @see src.gui.PluginInterface#start(org.w3c.dom.Node, org.w3c.dom.Document)
         */
        public void start(final Node element, final Document environment) {
                originalElement = element; 
                
                JMenu dummyMenu = new JMenu("dummy plugin");
                JMenuItem dummyItem = new JMenuItem("dummy Item");
                dummyItem.addActionListener(this);
                dummyMenu.add(dummyItem);
                gui.setPluginMenu(dummyMenu);
                
                gui.setPluginPanel(this);
                setVisible(true);

                System.out.println("dummy plugin has started");
                
//              //for testing
//              forceStatusReport();
//              System.out.println("dummy plugin has fired");
        }


        /* (non-Javadoc)
         * @see src.gui.PluginInterface#stop()
         */
        public void stop() {
                setVisible(false);
                gui.setPluginMenu(null);
        }


        /* (non-Javadoc)
         * @see src.gui.PluginInterface#setOurEventListener(src.control.OurEventListener)
         */
        public void setOurEventListener(OurEventListener newListener) {
                ourEventListener = newListener;
        }


        /* (non-Javadoc)
         * @see src.gui.PluginInterface#forceStatusReport()
         */
        public void forceStatusReport() {
                Node modifiedElement = originalElement;
                // removes all Attributes from "Image"
                if (modifiedElement.hasAttributes()) {
                        NamedNodeMap attr = modifiedElement.getAttributes();
                        attr.removeNamedItem("name");
                        attr.removeNamedItem("url");
                 }
                 // removes first Child from "Image"
                if (modifiedElement.hasChildNodes()){
                        modifiedElement.removeChild(modifiedElement.getFirstChild());
                }
                
                Node clonedElement = modifiedElement.cloneNode(true);
                modifiedElement.appendChild(clonedElement);
                                
                firePluginChangedElement(originalElement, modifiedElement);
        }
        
        
        private void firePluginChangedElement(Node oldNode, Node changedElement) {
                OurEvent e = new OurEvent(new Object[] {oldNode, changedElement, pluginName});
                ourEventListener.firedOurEvent(e);
        }


        /* (non-Javadoc)
         * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
         */
        public void actionPerformed(ActionEvent arg0) {
                if (arg0.getActionCommand() == "dummy Item") {
                        add(new JLabel("dummy Item in Menu clicked " + ++counter + " times"), BorderLayout.NORTH);
                }
        }

}PK
öhð.®*ô__0src/plugins/dummyPlugin/DummyPluginTransform.xsl<!-- for dummy plugin: simply copy the whole document -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" />

<xsl:template match="/">
        <xsl:apply-templates />
</xsl:template>

<xsl:template match="node()">
        <xsl:copy-of select="." />
</xsl:template>

</xsl:stylesheet>PK
öhð.hÃ'ii4src/plugins/dummyPlugin/DummyPluginTransformBack.xsl<!-- backwards for dummy plugin: simply copy the whole document -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" />

<xsl:template match="/">
        <xsl:apply-templates />
</xsl:template>

<xsl:template match="node()">
        <xsl:copy-of select="." />
</xsl:template>

</xsl:stylesheet>PK

–ið.        META-INF/þÊPK

–ið.­ª#+META-INF/MANIFEST.MFPK

hð.⪍//)asrc/plugins/dummyPlugin/DummyPlugin.classPK

hð.§¶6o
o
(×src/plugins/dummyPlugin/DummyPlugin.javaPK

öhð.®*ô__0Œ!src/plugins/dummyPlugin/DummyPluginTransform.xslPK

öhð.hÃ'ii49#src/plugins/dummyPlugin/DummyPluginTransformBack.xslPKêô$