[jboss-cvs] JBossAS SVN: r78749 - in projects/aop/trunk/aophelper: src/main/java/org/jboss/aophelper/core and 8 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Sep 22 07:32:24 EDT 2008


Author: stalep
Date: 2008-09-22 07:32:23 -0400 (Mon, 22 Sep 2008)
New Revision: 78749

Added:
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/AopHelperMediator.java
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/AopHelperMenuBar.java
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/RunMediator.java
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/RunOutputPane.java
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/RunPane.java
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/classpath/
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/classpath/RunClasspathEditPane.java
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/classpath/RunClasspathPane.java
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/classpath/RunClasspathTableModel.java
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/classpath/RunClasspathTablePane.java
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/options/
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/options/RunOptionsPane.java
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/xml/
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/xml/RunXmlEditPane.java
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/xml/RunXmlPane.java
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/xml/RunXmlTableModel.java
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/xml/RunXmlTablePane.java
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/util/AopRunCommand.java
Modified:
   projects/aop/trunk/aophelper/.classpath
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/core/AopCompile.java
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/core/AopOption.java
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/core/AopRun.java
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/core/SettingInterceptor.java
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/AopHelperFrame.java
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/compile/CompileMediator.java
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/compile/CompilerPane.java
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/compile/OutputPane.java
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/compile/options/CompileOptionsPane.java
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/util/AopCompileCommand.java
   projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/util/CommandUtil.java
Log:
[JBAOP-538]
Implemented run mode.



Modified: projects/aop/trunk/aophelper/.classpath
===================================================================
--- projects/aop/trunk/aophelper/.classpath	2008-09-22 11:13:14 UTC (rev 78748)
+++ projects/aop/trunk/aophelper/.classpath	2008-09-22 11:32:23 UTC (rev 78749)
@@ -29,5 +29,6 @@
 	<classpathentry kind="var" path="M2_REPO/jboss/jboss-logging-spi/2.0.3.GA/jboss-logging-spi-2.0.3.GA.jar"/>
 	<classpathentry kind="var" path="M2_REPO/jboss/jboss-common-logging-spi/2.0.4.GA/jboss-common-logging-spi-2.0.4.GA.jar"/>
 	<classpathentry kind="var" path="M2_REPO/trove/trove/2.1.1/trove-2.1.1.jar"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/aop"/>
 	<classpathentry kind="output" path="target/classes"/>
 </classpath>

Modified: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/core/AopCompile.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/core/AopCompile.java	2008-09-22 11:13:14 UTC (rev 78748)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/core/AopCompile.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -58,6 +58,7 @@
       classpath =  new ArrayList<String>();
       transformPath =  new ArrayList<String>();
       aopClasspath =  new ArrayList<String>();
+      setVerbose(true);
    }
  
    /**

Modified: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/core/AopOption.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/core/AopOption.java	2008-09-22 11:13:14 UTC (rev 78748)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/core/AopOption.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -35,6 +35,8 @@
    VERBOSE,
    SUPPRESS,
    NOOPT,
+   LOADTIME,
    REPORT,
+   EXECLASS,
    UNSPECIFIED;
 }

Modified: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/core/AopRun.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/core/AopRun.java	2008-09-22 11:13:14 UTC (rev 78748)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/core/AopRun.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -21,6 +21,9 @@
   */
 package org.jboss.aophelper.core;
 
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * A AopRun.
  * 
@@ -29,5 +32,282 @@
  */
 public class AopRun
 {
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+   private List<String> aopXml;
+   private List<String> classpath;
+   private List<String> transformPath;
+   private List<String> aopClasspath;
+   
+   /** Set the verbose level of the compiler */ 
+   private boolean verbose;
+   
+   private boolean suppress;
+   
+   private boolean noopt;
+   
+   private boolean report;
+   
+   private boolean loadtime;
+   
+   private String workingdir;
+   
+   private String executionClass;
 
+   public AopRun()
+   {
+      aopXml = new ArrayList<String>();
+      classpath =  new ArrayList<String>();
+      transformPath =  new ArrayList<String>();
+      aopClasspath =  new ArrayList<String>();
+      setVerbose(true);
+   }
+ 
+   /**
+    * Get the aopXml.
+    * 
+    * @return the aopXml.
+    */
+   public List<String> getAopXml()
+   {
+      return aopXml;
+   }
+
+   /**
+    * Set the aopXml.
+    * 
+    * @param aopXml The aopXml to set.
+    */
+   public void setAopXml(List<String> aopXml)
+   {
+      this.aopXml = aopXml;
+   }
+
+   /**
+    * Get the classpath.
+    * 
+    * @return the classpath.
+    */
+   public List<String> getClasspath()
+   {
+      return classpath;
+   }
+
+   /**
+    * Set the classpath.
+    * 
+    * @param classpath The classpath to set.
+    */
+   public void setClasspath(List<String> classpath)
+   {
+      this.classpath = classpath;
+   }
+   
+   public void removeClasspath(String cp)
+   {
+      if(classpath.contains(cp))
+         classpath.remove(cp);
+   }
+   
+   public void addClasspath(String cp)
+   {
+      if(!classpath.contains(cp))
+         classpath.add(cp);
+   }
+
+   
+   public void removeXml(String cp)
+   {
+      if(aopXml.contains(cp))
+         aopXml.remove(cp);
+   }
+   
+   public void addXml(String cp)
+   {
+      if(!aopXml.contains(cp))
+         aopXml.add(cp);
+   }
+
+   /**
+    * Get the transformPath.
+    * 
+    * @return the transformPath.
+    */
+   public List<String> getTransformPath()
+   {
+      return transformPath;
+   }
+
+   /**
+    * Set the transformPath.
+    * 
+    * @param transformPath The transformPath to set.
+    */
+   public void setTransformPath(List<String> transformPath)
+   {
+      this.transformPath = transformPath;
+   }
+
+   /**
+    * Get the aopClasspath.
+    * 
+    * @return the aopClasspath.
+    */
+   public List<String> getAopClasspath()
+   {
+      return aopClasspath;
+   }
+
+   /**
+    * Set the aopClasspath.
+    * 
+    * @param aopClasspath The aopClasspath to set.
+    */
+   public void setAopClasspath(List<String> aopClasspath)
+   {
+      this.aopClasspath = aopClasspath;
+   }
+
+   /**
+    * Get the verbose.
+    * 
+    * @return the verbose.
+    */
+   public boolean isVerbose()
+   {
+      return verbose;
+   }
+
+   /**
+    * Set the verbose.
+    * 
+    * @param verbose The verbose to set.
+    */
+   public void setVerbose(boolean verbose)
+   {
+      this.verbose = verbose;
+   }
+
+   /**
+    * Get the suppress.
+    * 
+    * @return the suppress.
+    */
+   public boolean isSuppress()
+   {
+      return suppress;
+   }
+
+   /**
+    * Set the suppress.
+    * 
+    * @param suppress The suppress to set.
+    */
+   public void setSuppress(boolean suppress)
+   {
+      this.suppress = suppress;
+   }
+
+   /**
+    * Get the noopt.
+    * 
+    * @return the noopt.
+    */
+   public boolean isNoopt()
+   {
+      return noopt;
+   }
+
+   /**
+    * Set the noopt.
+    * 
+    * @param noopt The noopt to set.
+    */
+   public void setNoopt(boolean noopt)
+   {
+      System.out.println("setting noopt to: "+noopt);
+      this.noopt = noopt;
+   }
+
+   /**
+    * Get the report.
+    * 
+    * @return the report.
+    */
+   public boolean isReport()
+   {
+      return report;
+   }
+
+   /**
+    * Set the report.
+    * 
+    * @param report The report to set.
+    */
+   public void setReport(boolean report)
+   {
+      this.report = report;
+   }
+
+   /**
+    * Get the workingdir.
+    * 
+    * @return the workingdir.
+    */
+   public String getWorkingdir()
+   {
+      return workingdir;
+   }
+
+   /**
+    * Set the workingdir.
+    * 
+    * @param workingdir The workingdir to set.
+    */
+   public void setWorkingdir(String workingdir)
+   {
+      this.workingdir = workingdir;
+   }
+
+   /**
+    * Get the executionClass.
+    * 
+    * @return the executionClass.
+    */
+   public final String getExecutionClass()
+   {
+      return executionClass;
+   }
+
+   /**
+    * Set the executionClass.
+    * 
+    * @param executionClass The executionClass to set.
+    */
+   public final void setExecutionClass(String executionClass)
+   {
+      this.executionClass = executionClass;
+   }
+
+   /**
+    * Get the runtime.
+    * 
+    * @return the runtime.
+    */
+   public final boolean isLoadtime()
+   {
+      return loadtime;
+   }
+
+   /**
+    * Set the runtime.
+    * 
+    * @param runtime The runtime to set.
+    */
+   public final void setLoadtime(boolean runtime)
+   {
+      this.loadtime = runtime;
+   }
+   
+   
 }

Modified: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/core/SettingInterceptor.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/core/SettingInterceptor.java	2008-09-22 11:13:14 UTC (rev 78748)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/core/SettingInterceptor.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -24,7 +24,8 @@
 import org.jboss.aop.advice.Interceptor;
 import org.jboss.aop.joinpoint.Invocation;
 import org.jboss.aophelper.annotation.AopHelperAction;
-import org.jboss.aophelper.compile.CompileManager;
+import org.jboss.aophelper.manager.CompileManager;
+import org.jboss.aophelper.manager.RunManager;
 
 /**
  * A ClasspathInterceptor.
@@ -52,6 +53,10 @@
       {
          new CompileManager().performAction(helperAction.action(), helperAction.option());
       }
+      if(helperAction.state().equals(AopState.RUN))
+      {
+         new RunManager().performAction(helperAction.action(), helperAction.option());
+      }
       
       return invocation.invokeNext();
    }

Modified: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/AopHelperFrame.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/AopHelperFrame.java	2008-09-22 11:13:14 UTC (rev 78748)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/AopHelperFrame.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -24,14 +24,16 @@
 import java.awt.Dimension;
 import java.awt.Point;
 import java.awt.Toolkit;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
 import java.io.File;
 
 import javax.swing.JFileChooser;
 import javax.swing.JFrame;
 import javax.swing.WindowConstants;
 
-import org.jboss.aophelper.ui.compile.CompileMediator;
 import org.jboss.aophelper.ui.compile.CompilerPane;
+import org.jboss.aophelper.ui.run.RunPane;
 
 /**
  * A AopHelperFrame.
@@ -45,36 +47,46 @@
    /** The serialVersionUID */
    private static final long serialVersionUID = 1L;
    private JFileChooser fc;
+   private CompilerPane compilerPane;
+   private RunPane runPane;
    
+   
    public AopHelperFrame()
    {
-      super("AopHelper");
+      super("JBoss AOP Helper");
+      AopHelperMediator.instance().setMainPane(this);
+      
       setup();
    }
    
    private void setup()
    {
-      // set an icon on the main widget
-//    setIconImage(Toolkit.getDefaultToolkit().getImage(this.getClass().getResource("/gicon.jpg")));
+      // override the default, and call mediator's quit()
+      setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
+      addWindowListener(new WindowAdapter() {
+         @Override
+         public void windowClosing(WindowEvent e) {
+            AopHelperMediator.instance().quit();
+         }
+      });
 
-      setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
-
-//      getContentPane().setLayout(new FlowLayout());
-//      getContentPane().add(new CompilerPane());
-      setContentPane(new CompilerPane());
+      compilerPane = new CompilerPane();
+      runPane = new RunPane();
+//      setContentPane(compilerPane);
+      AopHelperMediator.instance().setMenuBar(new AopHelperMenuBar());
+      setJMenuBar(AopHelperMediator.instance().getMenuBar());
       
       setSize(1024, 768);
-//      setSize(600, 400);
       
       setLocation();
       setVisible(true);
 
-      CompileMediator.instance().setHelperFrame(this);
+      AopHelperMediator.instance().setMainPane(this);
       fc = new JFileChooser();
       fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
       fc.setMultiSelectionEnabled(true);
       
-      
+      setCompilerMode();
    }
    
    public void setLocation() {
@@ -112,8 +124,6 @@
        if (returnVal == JFileChooser.APPROVE_OPTION) 
        {
            File[] files = fc.getSelectedFiles();
-           //This is where a real application would save the file.
-          System.out.println("Saving: " + files[0].getAbsolutePath());
           return files;
        } 
        else 
@@ -123,6 +133,20 @@
        }
     }
 
+    public void setRunMode()
+    {
+       setContentPane(runPane);
+       AopHelperMediator.instance().getMenuBar().setRunMode();
+       pack();
+    }
+    
+    public void setCompilerMode()
+    {
+       setContentPane(compilerPane);
+       AopHelperMediator.instance().getMenuBar().setCompileMode();
+       pack();
+    }
+    
     public static void main(String[] args)
     {
        new AopHelperFrame();

Added: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/AopHelperMediator.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/AopHelperMediator.java	                        (rev 0)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/AopHelperMediator.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -0,0 +1,90 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.aophelper.ui;
+
+/**
+ * A AopHelperMediator.
+ * 
+ * @author <a href="stalep at gmail.com">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public class AopHelperMediator
+{
+
+   private static final AopHelperMediator mediator = new AopHelperMediator();
+   private AopHelperMenuBar menuBar;
+   private AopHelperFrame mainPane;
+   
+   private AopHelperMediator()
+   {
+   }
+   
+   public static AopHelperMediator instance()
+   {
+      return mediator;
+   }
+   
+   public void quit()
+   {
+      System.exit(0);
+   }
+
+   /**
+    * Get the menuBar.
+    * 
+    * @return the menuBar.
+    */
+   public AopHelperMenuBar getMenuBar()
+   {
+      return menuBar;
+   }
+
+   /**
+    * Set the menuBar.
+    * 
+    * @param menuBar The menuBar to set.
+    */
+   public void setMenuBar(AopHelperMenuBar menuBar)
+   {
+      this.menuBar = menuBar;
+   }
+
+   /**
+    * Get the mainPane.
+    * 
+    * @return the mainPane.
+    */
+   public AopHelperFrame getMainPane()
+   {
+      return mainPane;
+   }
+
+   /**
+    * Set the mainPane.
+    * 
+    * @param mainPane The mainPane to set.
+    */
+   public void setMainPane(AopHelperFrame mainPane)
+   {
+      this.mainPane = mainPane;
+   }
+}

Added: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/AopHelperMenuBar.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/AopHelperMenuBar.java	                        (rev 0)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/AopHelperMenuBar.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -0,0 +1,152 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.aophelper.ui;
+
+import java.awt.Toolkit;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.Box;
+import javax.swing.JMenu;
+import javax.swing.JMenuBar;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
+import javax.swing.KeyStroke;
+
+/**
+ * A HelperMenuBar.
+ * 
+ * @author <a href="stalep at gmail.com">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public class AopHelperMenuBar extends JMenuBar
+{
+
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+   private JMenuItem compile, run;
+   private JMenuItem about;
+
+   public AopHelperMenuBar()
+   {
+      init();
+   }
+   
+   private void init()
+   {
+      add(createFileMenu());
+      add(Box.createHorizontalGlue());
+      add(createHelpMenu());
+      
+   }
+   
+   /**
+    * 
+    * @return
+    */
+   private JMenu createHelpMenu()
+   {
+     JMenu helpMenu = new JMenu("Help");
+     helpMenu.setMnemonic('H');
+     
+      about = new JMenuItem("About", 'A');
+     about.setAccelerator(KeyStroke.getKeyStroke('A',
+           Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
+     helpMenu.add(about);
+     about.addActionListener(new ActionListener() {
+        @SuppressWarnings("deprecation")
+      public void actionPerformed(ActionEvent event) 
+        {
+           System.out.println("About..");
+          showDialog();
+        }
+     });
+     
+     return helpMenu;
+   }
+   
+   private void showDialog()
+   {
+      JOptionPane.showConfirmDialog(this, "more info will come....", "JBoss AOP Helper", JOptionPane.OK_OPTION);
+   }
+
+   private JMenu createFileMenu()
+   {
+      JMenu fileMenu = new JMenu("File");
+      fileMenu.setMnemonic('F');
+
+      compile = new JMenuItem("AOP Compile mode", 'C');
+      compile.setAccelerator(KeyStroke.getKeyStroke('C',
+            Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
+      fileMenu.add(compile);
+
+      run = new JMenuItem( "AOP Run mode", 'R');
+      run.setAccelerator(KeyStroke.getKeyStroke('R',
+            Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
+      fileMenu.add(run);
+//      run.setEnabled(false);
+
+      final JMenuItem exit = new JMenuItem( "Exit", 'Q');
+      exit.setAccelerator(KeyStroke.getKeyStroke('Q',
+            Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
+      fileMenu.add(exit);
+
+      fileMenu.insertSeparator(2);
+      
+      
+      ActionListener menuListener = new ActionListener() 
+      {
+        public void actionPerformed(ActionEvent event) 
+        {
+          if(event.getSource() == exit) {
+            AopHelperMediator.instance().quit();
+          }
+          if(event.getSource() == compile) 
+          {
+             AopHelperMediator.instance().getMainPane().setCompilerMode();
+          }
+
+          if(event.getSource() == run) 
+          {
+             AopHelperMediator.instance().getMainPane().setRunMode();
+          }
+        }
+      };
+
+      compile.addActionListener(menuListener);
+      run.addActionListener(menuListener);
+      exit.addActionListener(menuListener);
+      
+      return fileMenu;
+   }
+   
+   public void setCompileMode()
+   {
+      compile.setEnabled(false);
+      run.setEnabled(true);
+   }
+   public void setRunMode()
+   {
+      run.setEnabled(false);
+      compile.setEnabled(true);
+   }
+}

Modified: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/compile/CompileMediator.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/compile/CompileMediator.java	2008-09-22 11:13:14 UTC (rev 78748)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/compile/CompileMediator.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -21,7 +21,6 @@
   */
 package org.jboss.aophelper.ui.compile;
 
-import org.jboss.aophelper.ui.AopHelperFrame;
 import org.jboss.aophelper.ui.compile.classpath.ClasspathTableModel;
 import org.jboss.aophelper.ui.compile.classpath.ClasspathTablePane;
 import org.jboss.aophelper.ui.compile.options.CompileOptionsPane;
@@ -40,12 +39,12 @@
    
    private ClasspathTablePane classpathTable;
    private ClasspathTableModel classpathModel;
+  
    private XmlTablePane xmlTable;
    private XmlTableModel xmlModel;
+   
    private CompileOptionsPane compileOptionsPane;
    private OutputPane outputPane;
-
-   private AopHelperFrame helperFrame;
    
    private CompileMediator()
    {
@@ -66,18 +65,6 @@
    {
       return classpathTable;
    }
-   
-   
-   
-   public void setHelperFrame(AopHelperFrame ahf)
-   {
-      helperFrame = ahf;
-   }
-   
-   public AopHelperFrame getHelperFrame()
-   {
-      return helperFrame;
-   }
 
    /**
     * Get the classpathModel.
@@ -100,7 +87,6 @@
    }
 
    /**
-    * FIXME Comment this
     * 
     * @param tableModel
     */
@@ -164,4 +150,6 @@
       this.outputPane = outputPane;
    }
 
+
+
 }

Modified: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/compile/CompilerPane.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/compile/CompilerPane.java	2008-09-22 11:13:14 UTC (rev 78748)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/compile/CompilerPane.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -25,7 +25,6 @@
 import java.awt.Dimension;
 import java.awt.FlowLayout;
 
-import javax.swing.JLabel;
 import javax.swing.JPanel;
 import javax.swing.JSplitPane;
 

Modified: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/compile/OutputPane.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/compile/OutputPane.java	2008-09-22 11:13:14 UTC (rev 78748)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/compile/OutputPane.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -26,7 +26,6 @@
 import java.awt.Dimension;
 import java.awt.FlowLayout;
 
-import javax.swing.JLabel;
 import javax.swing.JPanel;
 import javax.swing.JScrollPane;
 import javax.swing.JTextArea;

Modified: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/compile/options/CompileOptionsPane.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/compile/options/CompileOptionsPane.java	2008-09-22 11:13:14 UTC (rev 78748)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/compile/options/CompileOptionsPane.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -72,6 +72,7 @@
 //      add(heading, BorderLayout.NORTH);
       
       verbose = new JCheckBox("Verbose");
+      verbose.setSelected(true);
       suppress = new JCheckBox("Suppress");
       noopt = new JCheckBox("Not optimize");
       verbose.addItemListener(new ItemListener() {
@@ -128,7 +129,7 @@
      JPanel workingdirPanel = new JPanel(new FlowLayout());
      workingdir = new JTextField("must select the working director", 20);
      workingdir.setEditable(false);
-     JLabel workingLabel = new JLabel("Set the working directory from where aop should compile the classes");
+     JLabel workingLabel = new JLabel("Set the working directory");
      workingLabel.setLabelFor(workingdir);
      workingdirPanel.add(workingLabel);
      workingdirPanel.add(workingdir);

Added: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/RunMediator.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/RunMediator.java	                        (rev 0)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/RunMediator.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -0,0 +1,168 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.aophelper.ui.run;
+
+import org.jboss.aophelper.ui.run.classpath.RunClasspathTableModel;
+import org.jboss.aophelper.ui.run.classpath.RunClasspathTablePane;
+import org.jboss.aophelper.ui.run.options.RunOptionsPane;
+import org.jboss.aophelper.ui.run.xml.RunXmlTableModel;
+import org.jboss.aophelper.ui.run.xml.RunXmlTablePane;
+
+/**
+ * A RunMediator.
+ * 
+ * @author <a href="stalep at gmail.com">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public class RunMediator
+{
+   private static final RunMediator mediator = new RunMediator();
+
+   private RunClasspathTablePane runClasspathTable;
+   private RunClasspathTableModel runClasspathModel;
+   
+   private RunXmlTablePane runXmlTable;
+   private RunXmlTableModel runXmlModel;
+   
+   private RunOptionsPane runOptionsPane;
+   private RunOutputPane runOutputPane;
+   
+   private RunMediator()
+   {
+      
+   }
+   
+   public static RunMediator instance()
+   {
+      return mediator;
+   }
+   
+   /**
+    * FIXME Comment this
+    * 
+    * @param tableModel
+    */
+   public void setRunClasspathModel(RunClasspathTableModel tableModel)
+   {
+      runClasspathModel = tableModel;
+   }
+   
+   public RunClasspathTableModel getRunClasspathModel()
+   {
+      return runClasspathModel;
+   }
+
+   /**
+    * FIXME Comment this
+    * 
+    * @param runClasspathTablePane
+    */
+   public void setRunClasspathTable(RunClasspathTablePane classpathTablePane)
+   {
+      runClasspathTable = classpathTablePane;
+   }
+   
+   public RunClasspathTablePane getRunClasspathTable()
+   {
+      return runClasspathTable;
+   }
+
+   /**
+    * Get the runXmlTable.
+    * 
+    * @return the runXmlTable.
+    */
+   public RunXmlTablePane getRunXmlTable()
+   {
+      return runXmlTable;
+   }
+
+   /**
+    * Set the runXmlTable.
+    * 
+    * @param runXmlTable The runXmlTable to set.
+    */
+   public void setRunXmlTable(RunXmlTablePane runXmlTable)
+   {
+      this.runXmlTable = runXmlTable;
+   }
+
+   /**
+    * Get the runXmlModel.
+    * 
+    * @return the runXmlModel.
+    */
+   public RunXmlTableModel getRunXmlModel()
+   {
+      return runXmlModel;
+   }
+
+   /**
+    * Set the runXmlModel.
+    * 
+    * @param runXmlModel The runXmlModel to set.
+    */
+   public void setRunXmlModel(RunXmlTableModel runXmlModel)
+   {
+      this.runXmlModel = runXmlModel;
+   }
+
+   /**
+    * Get the runOptionsPane.
+    * 
+    * @return the runOptionsPane.
+    */
+   public final RunOptionsPane getRunOptionsPane()
+   {
+      return runOptionsPane;
+   }
+
+   /**
+    * Set the runOptionsPane.
+    * 
+    * @param runOptionsPane The runOptionsPane to set.
+    */
+   public final void setRunOptionsPane(RunOptionsPane runOptionsPane)
+   {
+      this.runOptionsPane = runOptionsPane;
+   }
+
+   /**
+    * Get the runOutputPane.
+    * 
+    * @return the runOutputPane.
+    */
+   public final RunOutputPane getRunOutputPane()
+   {
+      return runOutputPane;
+   }
+
+   /**
+    * Set the runOutputPane.
+    * 
+    * @param runOutputPane The runOutputPane to set.
+    */
+   public final void setRunOutputPane(RunOutputPane runOutputPane)
+   {
+      this.runOutputPane = runOutputPane;
+   }
+}

Added: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/RunOutputPane.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/RunOutputPane.java	                        (rev 0)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/RunOutputPane.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -0,0 +1,79 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.aophelper.ui.run;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+
+import javax.swing.JPanel;
+import javax.swing.JScrollPane;
+import javax.swing.JTextArea;
+
+import org.jboss.aophelper.ui.run.RunMediator;
+
+/**
+ * A RunOutputPane.
+ * 
+ * @author <a href="stalep at gmail.com">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public class RunOutputPane extends JPanel
+{
+   
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+
+   private JTextArea outputArea;
+   public RunOutputPane()
+   {
+      init();
+   }
+   
+   private void init()
+   {
+      RunMediator.instance().setRunOutputPane(this);
+      
+      setBackground(Color.white);
+      setLayout(new FlowLayout());
+      
+      outputArea = new JTextArea();
+      outputArea.setText("logs from the execution will be seen here");
+      outputArea.setLineWrap(true);
+      outputArea.setWrapStyleWord(true);
+      outputArea.setEditable(false);
+      JScrollPane longScroll = new JScrollPane(outputArea);
+      longScroll.setVisible(true);
+      longScroll.setPreferredSize(new Dimension(1020, 270));
+      
+      add(longScroll, BorderLayout.CENTER);
+
+   }
+   
+   public void setText(String text)
+   {
+      outputArea.setText(text);
+   }
+
+
+}

Added: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/RunPane.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/RunPane.java	                        (rev 0)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/RunPane.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -0,0 +1,75 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.aophelper.ui.run;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+import java.awt.FlowLayout;
+
+import javax.swing.JPanel;
+import javax.swing.JSplitPane;
+
+import org.jboss.aophelper.ui.run.classpath.RunClasspathPane;
+import org.jboss.aophelper.ui.run.options.RunOptionsPane;
+import org.jboss.aophelper.ui.run.xml.RunXmlPane;
+
+/**
+ * A RunPane.
+ * 
+ * @author <a href="stalep at gmail.com">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public class RunPane extends JPanel
+{
+
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+
+   public RunPane()
+   {
+//      Dimension size = new Dimension(1024, 768);
+//      this.setPreferredSize(size);
+//      this.setLayout(new FlowLayout());
+
+      Dimension size = new Dimension(1024, 768);
+      this.setPreferredSize(size);
+      this.setLayout(new FlowLayout());
+      
+      JPanel setupPanel = new JPanel();
+      setupPanel.setPreferredSize(new Dimension(1024,450));
+      
+    
+      JSplitPane mainSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, setupPanel, new RunOutputPane());
+      mainSplitPane.setPreferredSize(size);
+      
+      //setupPanel
+      JPanel tablePane = new JPanel(new BorderLayout());
+      JSplitPane setupSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, tablePane, new RunOptionsPane());
+      setupPanel.add(setupSplit, BorderLayout.NORTH);
+      setupSplit.setPreferredSize(new Dimension(1024, 450));
+      JSplitPane tableSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT, new RunClasspathPane(), new RunXmlPane());
+      tablePane.add(tableSplit, BorderLayout.NORTH);
+      tableSplit.setPreferredSize(new Dimension(500, 450));
+      
+      add(mainSplitPane);
+   }
+}

Added: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/classpath/RunClasspathEditPane.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/classpath/RunClasspathEditPane.java	                        (rev 0)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/classpath/RunClasspathEditPane.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -0,0 +1,105 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.aophelper.ui.run.classpath;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.JPanel;
+
+import org.jboss.aophelper.annotation.AopHelperAction;
+import org.jboss.aophelper.core.Action;
+import org.jboss.aophelper.core.AopOption;
+import org.jboss.aophelper.core.AopState;
+
+/**
+ * A RunClasspathEditPane.
+ * 
+ * @author <a href="stalep at gmail.com">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public class RunClasspathEditPane extends JPanel
+{
+
+   private JButton addButton;
+   private JButton removeButton;
+   
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+
+   public RunClasspathEditPane()
+   {
+      init();
+   }
+
+
+   private void init()
+   {
+//      setLayout(new BorderLayout());
+      addButton = new JButton("Add to Classpath");
+      removeButton = new JButton("Remove from Classpath");
+      
+      
+      ActionListener action = new ActionListener() 
+      { 
+         public void actionPerformed(ActionEvent event) 
+         {
+            if(event.getSource() == addButton) 
+            {
+               System.out.println("We need to add");
+               add();
+
+            }
+            else if(event.getSource() == removeButton)
+            {
+               System.out.println("remove");
+               remove();
+
+            }
+         }
+       };
+       addButton.addActionListener(action);
+       removeButton.addActionListener(action);
+       
+       add(addButton); //, BorderLayout.CENTER);
+       add(removeButton); //, BorderLayout.CENTER);
+
+   }
+   
+   @AopHelperAction(
+         action=Action.ADD, 
+         state=AopState.RUN, 
+         option=AopOption.CLASSPATH)
+   public void add()
+   {
+   }
+   
+   @AopHelperAction(
+         action=Action.REMOVE, 
+         state=AopState.RUN, 
+         option=AopOption.CLASSPATH)
+   public void remove()
+   {
+      
+   }
+}

Added: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/classpath/RunClasspathPane.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/classpath/RunClasspathPane.java	                        (rev 0)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/classpath/RunClasspathPane.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -0,0 +1,61 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.aophelper.ui.run.classpath;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+
+import javax.swing.JPanel;
+
+/**
+ * A RunClasspathPane.
+ * 
+ * @author <a href="stalep at gmail.com">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public class RunClasspathPane extends JPanel
+{
+
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+   
+   public RunClasspathPane()
+   {
+      init();
+   }
+
+
+   private void init()
+   {
+      setLayout(new BorderLayout());
+      
+      RunClasspathTablePane classpathTable = new RunClasspathTablePane();
+      RunClasspathEditPane classpathEditPane = new RunClasspathEditPane();
+      
+      add(classpathEditPane, BorderLayout.NORTH);
+      add(classpathTable, BorderLayout.CENTER);
+      
+      Dimension size = new Dimension(500, 200);
+      setPreferredSize(size);
+      
+   }
+}

Added: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/classpath/RunClasspathTableModel.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/classpath/RunClasspathTableModel.java	                        (rev 0)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/classpath/RunClasspathTableModel.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -0,0 +1,61 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.aophelper.ui.run.classpath;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.aophelper.ui.GenericEditTableModel;
+
+/**
+ * A RunClasspathTableModel.
+ * 
+ * @author <a href="stalep at gmail.com">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public class RunClasspathTableModel extends GenericEditTableModel
+{
+
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+  
+   
+   private List<String> data;
+   
+   public RunClasspathTableModel()
+   {
+      data = new ArrayList<String>();
+   }
+   
+   @Override
+   public List<String> getData()
+   {
+      return data;
+   }
+   
+   @Override
+   public String getColumnName(int column) 
+   {
+      return "Classpath";
+   } 
+
+}

Added: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/classpath/RunClasspathTablePane.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/classpath/RunClasspathTablePane.java	                        (rev 0)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/classpath/RunClasspathTablePane.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -0,0 +1,80 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.aophelper.ui.run.classpath;
+
+import org.jboss.aophelper.annotation.AopHelperAction;
+import org.jboss.aophelper.core.Action;
+import org.jboss.aophelper.core.AopOption;
+import org.jboss.aophelper.core.AopState;
+import org.jboss.aophelper.ui.GenericEditTableModel;
+import org.jboss.aophelper.ui.GenericEditTablePane;
+import org.jboss.aophelper.ui.run.RunMediator;
+
+/**
+ * A RunClasspathTablePane.
+ * 
+ * @author <a href="stalep at gmail.com">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public class RunClasspathTablePane extends GenericEditTablePane
+{
+
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+
+   private RunClasspathTableModel tableModel;
+
+   public RunClasspathTablePane()
+   {
+      init();
+   }
+
+   
+   @Override
+   public void setMediatorTableModel()
+   {
+      if(tableModel == null)
+         tableModel = new RunClasspathTableModel();
+      System.out.println("setting tablemodel to the mediator: "+tableModel.getClass().getName());
+      RunMediator.instance().setRunClasspathModel(tableModel);
+   }
+   
+   @Override
+   public void setMediatorJPanel()
+   {
+      RunMediator.instance().setRunClasspathTable(this);
+   }
+   
+   @Override
+   public GenericEditTableModel getTableModel()
+   {
+      return tableModel;
+   }
+   
+   @Override
+   @AopHelperAction(action=Action.SET, state=AopState.RUN, option=AopOption.CLASSPATH)
+   public void notifyAction()
+   {
+      
+   }
+
+}

Added: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/options/RunOptionsPane.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/options/RunOptionsPane.java	                        (rev 0)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/options/RunOptionsPane.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -0,0 +1,282 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.aophelper.ui.run.options;
+
+import java.awt.BorderLayout;
+import java.awt.Color;
+import java.awt.FlowLayout;
+import java.awt.GridLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.ItemEvent;
+import java.awt.event.ItemListener;
+
+import javax.swing.BorderFactory;
+import javax.swing.JButton;
+import javax.swing.JCheckBox;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+
+import org.jboss.aophelper.annotation.AopHelperAction;
+import org.jboss.aophelper.core.Action;
+import org.jboss.aophelper.core.AopOption;
+import org.jboss.aophelper.core.AopState;
+import org.jboss.aophelper.ui.run.RunMediator;
+
+/**
+ * A RunOptionsPane.
+ * 
+ * @author <a href="stalep at gmail.com">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public class RunOptionsPane extends JPanel
+{
+
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+
+   private JCheckBox verbose, suppress, noopt, loadtime;
+   private JTextField workingdir, executionClass;
+   public RunOptionsPane()
+   {
+      init();
+   }
+   
+   private void init()
+   {
+      RunMediator.instance().setRunOptionsPane(this);
+      setLayout(new BorderLayout());
+      
+//      JLabel heading = new JLabel("Settings");
+//      heading.setFont(new Font("SansSerif", 1, 24));
+//      add(heading, BorderLayout.NORTH);
+      
+      verbose = new JCheckBox("Verbose");
+      verbose.setSelected(true);
+      suppress = new JCheckBox("Suppress");
+      noopt = new JCheckBox("Not optimize");
+      loadtime = new JCheckBox("Instrument classes loadtime");
+      verbose.addItemListener(new ItemListener() {
+         public void itemStateChanged(ItemEvent ie)
+         {
+            if(ie.getStateChange() == ItemEvent.SELECTED)
+               addVerbose();
+            else
+               removeVerbose();
+         }
+      });
+      
+      suppress.addItemListener(new ItemListener() {
+         public void itemStateChanged(ItemEvent ie)
+         {
+            if(ie.getStateChange() == ItemEvent.SELECTED)
+               addSuppress();
+            else
+               removeSuppress();
+         }
+      });
+      
+      noopt.addItemListener(new ItemListener() {
+         public void itemStateChanged(ItemEvent ie)
+         {
+            if(ie.getStateChange() == ItemEvent.SELECTED)
+               addNoopt();
+            else
+               removeNoopt();
+         }
+      });
+      
+      loadtime.addItemListener(new ItemListener() {
+         public void itemStateChanged(ItemEvent ie)
+         {
+            if(ie.getStateChange() == ItemEvent.SELECTED)
+               setLoadtime();
+            else
+               clearLoadtime();
+         }
+      });
+      
+     JPanel checkBoxPanel = new JPanel(new GridLayout(0,1));
+     JLabel checkHeading = new JLabel("Optional Settings:");
+     checkBoxPanel.setBorder(BorderFactory.createLineBorder(Color.black));
+     checkBoxPanel.add(checkHeading);
+     checkBoxPanel.add(verbose);
+     checkBoxPanel.add(suppress);
+     checkBoxPanel.add(noopt);
+     checkBoxPanel.add(loadtime);
+      
+     add(checkBoxPanel, BorderLayout.NORTH);
+//     Dimension minSize = new Dimension(300, 300);
+//     setMinimumSize(minSize);
+     
+     JButton compile = new JButton("Run!");
+     compile.addActionListener(new ActionListener() {
+        public void actionPerformed(ActionEvent event) 
+        {
+           System.out.println("RUNNING!");
+           run();
+        }
+     });
+     
+     JPanel workingdirPanel = new JPanel(new FlowLayout());
+     workingdir = new JTextField("must set the working directory", 20);
+     workingdir.setEditable(false);
+     JLabel workingLabel = new JLabel("Set the working directory ");
+     workingLabel.setLabelFor(workingdir);
+     workingdirPanel.add(workingLabel);
+     workingdirPanel.add(workingdir);
+     JButton workingdirButton = new JButton("Select working directory");
+     workingdirButton.addActionListener(new ActionListener() {
+        public void actionPerformed(ActionEvent event)
+        {
+           setWorkingDir();
+        }
+     });
+     workingdirPanel.add(workingdirButton);
+     
+     JPanel exeClassPanel = new JPanel(new FlowLayout());
+     executionClass = new JTextField("must set the execution class", 20);
+     executionClass.setEditable(false);
+     JLabel executionLabel = new JLabel("Set the execution class");
+     executionLabel.setLabelFor(executionClass);
+     exeClassPanel.add(executionLabel);
+     exeClassPanel.add(executionClass);
+     JButton executionButton = new JButton("Set execution class");
+     executionButton.addActionListener(new ActionListener() {
+        public void actionPerformed(ActionEvent event)
+        {
+           setExecutionClass();
+        }
+     });
+     exeClassPanel.add(executionButton);
+     
+     JPanel settingPanel = new JPanel(new FlowLayout());
+     settingPanel.add(workingdirPanel);
+     settingPanel.add(exeClassPanel);
+     
+     add(settingPanel, BorderLayout.CENTER);
+     
+     
+     add(compile, BorderLayout.SOUTH);
+   }
+   
+   @AopHelperAction(
+         action=Action.ADD, 
+         state=AopState.RUN, 
+         option=AopOption.VERBOSE)
+   private void addVerbose()
+   {
+   }
+   
+   @AopHelperAction(
+         action=Action.REMOVE, 
+         state=AopState.RUN, 
+         option=AopOption.VERBOSE)
+   private void removeVerbose()
+   {
+   }
+   
+   @AopHelperAction(
+         action=Action.ADD, 
+         state=AopState.RUN, 
+         option=AopOption.SUPPRESS)
+   private void addSuppress()
+   {
+   }
+   
+   @AopHelperAction(
+         action=Action.REMOVE, 
+         state=AopState.RUN, 
+         option=AopOption.SUPPRESS)
+   private void removeSuppress()
+   {
+   }
+   
+   @AopHelperAction(
+         action=Action.ADD, 
+         state=AopState.RUN, 
+         option=AopOption.NOOPT)
+   private void addNoopt()
+   {
+   }
+   
+   @AopHelperAction(
+         action=Action.REMOVE, 
+         state=AopState.RUN, 
+         option=AopOption.NOOPT)
+   private void removeNoopt()
+   {
+   }
+   
+
+   @AopHelperAction(
+         action=Action.ADD, 
+         state=AopState.RUN, 
+         option=AopOption.LOADTIME)
+   private void setLoadtime()
+   {
+   }
+   
+   @AopHelperAction(
+         action=Action.REMOVE, 
+         state=AopState.RUN, 
+         option=AopOption.LOADTIME)
+   private void clearLoadtime()
+   {
+   }
+   
+   @AopHelperAction(
+         action=Action.SET, 
+         state=AopState.RUN, 
+         option=AopOption.WORKINGDIR)
+   private void setWorkingDir()
+   {
+   }
+   
+   @AopHelperAction(
+         action=Action.RUN, 
+         state=AopState.RUN,
+         option=AopOption.UNSPECIFIED)
+   private void run()
+   {
+   }
+   
+   @AopHelperAction(
+         action=Action.SET, 
+         state=AopState.RUN, 
+         option=AopOption.EXECLASS)
+   private void setExecutionClass()
+   {
+   }
+   
+   public void setWorkingDir(String dir)
+   {
+      workingdir.setText(dir);
+   }
+   
+   public void setExecutionClass(String exeClass)
+   {
+      executionClass.setText(exeClass);
+   }
+
+}

Added: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/xml/RunXmlEditPane.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/xml/RunXmlEditPane.java	                        (rev 0)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/xml/RunXmlEditPane.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -0,0 +1,103 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.aophelper.ui.run.xml;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+
+import javax.swing.JButton;
+import javax.swing.JPanel;
+
+import org.jboss.aophelper.annotation.AopHelperAction;
+import org.jboss.aophelper.core.Action;
+import org.jboss.aophelper.core.AopOption;
+import org.jboss.aophelper.core.AopState;
+
+/**
+ * A RunXmlEditPane.
+ * 
+ * @author <a href="stalep at gmail.com">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public class RunXmlEditPane extends JPanel
+{
+
+   private JButton addButton;
+   private JButton removeButton;
+   
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+
+   public RunXmlEditPane()
+   {
+      init();
+   }
+   
+   private void init()
+   {
+//      setLayout(new BorderLayout());
+      addButton = new JButton("Add XML file");
+      removeButton = new JButton("Remove XML file");
+      
+      
+      ActionListener action = new ActionListener() 
+      { 
+         public void actionPerformed(ActionEvent event) 
+         {
+            if(event.getSource() == addButton) 
+            {
+               add();
+
+            }
+            else if(event.getSource() == removeButton)
+            {
+               remove();
+            }
+         }
+       };
+       addButton.addActionListener(action);
+       removeButton.addActionListener(action);
+       
+       add(addButton); //, BorderLayout.CENTER);
+       add(removeButton); //, BorderLayout.CENTER);
+
+   }
+   
+   @AopHelperAction(
+         action=Action.ADD, 
+         state=AopState.RUN, 
+         option=AopOption.AOPXML)
+   private void add()
+   {
+   }
+   
+   @AopHelperAction(
+         action=Action.REMOVE, 
+         state=AopState.RUN, 
+         option=AopOption.AOPXML)
+   private void remove()
+   {
+      
+   }
+
+
+}

Added: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/xml/RunXmlPane.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/xml/RunXmlPane.java	                        (rev 0)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/xml/RunXmlPane.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -0,0 +1,60 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.aophelper.ui.run.xml;
+
+import java.awt.BorderLayout;
+import java.awt.Dimension;
+
+import javax.swing.JPanel;
+
+/**
+ * A RunXmlPane.
+ * 
+ * @author <a href="stalep at gmail.com">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public class RunXmlPane extends JPanel
+{
+
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+   
+   public RunXmlPane()
+   {
+      init();
+   }
+   
+   private void init()
+   {
+      setLayout(new BorderLayout());
+      
+      RunXmlTablePane xmlTable = new RunXmlTablePane();
+      RunXmlEditPane xmlEditPane = new RunXmlEditPane();
+      
+      add(xmlEditPane, BorderLayout.NORTH);
+      add(xmlTable, BorderLayout.CENTER);
+
+      Dimension size = new Dimension(500, 200);
+      setPreferredSize(size);
+   }
+
+}

Added: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/xml/RunXmlTableModel.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/xml/RunXmlTableModel.java	                        (rev 0)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/xml/RunXmlTableModel.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -0,0 +1,61 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.aophelper.ui.run.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.aophelper.ui.GenericEditTableModel;
+
+/**
+ * A RunXmlTableModel.
+ * 
+ * @author <a href="stalep at gmail.com">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public class RunXmlTableModel extends GenericEditTableModel
+{
+
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+  
+   
+   private List<String> data;
+   
+   public RunXmlTableModel()
+   {
+      data = new ArrayList<String>();
+   }
+   
+   @Override
+   public List<String> getData()
+   {
+      return data;
+   }
+   
+   @Override
+   public String getColumnName(int column) 
+   {
+      return "JBoss AOP Xml";
+   } 
+
+}

Added: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/xml/RunXmlTablePane.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/xml/RunXmlTablePane.java	                        (rev 0)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/ui/run/xml/RunXmlTablePane.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -0,0 +1,82 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.aophelper.ui.run.xml;
+
+import org.jboss.aophelper.annotation.AopHelperAction;
+import org.jboss.aophelper.core.Action;
+import org.jboss.aophelper.core.AopOption;
+import org.jboss.aophelper.core.AopState;
+import org.jboss.aophelper.ui.GenericEditTableModel;
+import org.jboss.aophelper.ui.GenericEditTablePane;
+import org.jboss.aophelper.ui.run.RunMediator;
+
+/**
+ * A RunXmlTablePane.
+ * 
+ * @author <a href="stalep at gmail.com">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public class RunXmlTablePane extends GenericEditTablePane
+{
+
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+
+   private RunXmlTableModel tableModel;
+
+   public RunXmlTablePane()
+   {
+      init();
+   }
+
+   
+   @Override
+   public void setMediatorTableModel()
+   {
+      if(tableModel == null)
+         tableModel = new RunXmlTableModel();
+      
+//      System.out.println("setting tablemodel to the mediator: "+tableModel.getClass().getName());
+      RunMediator.instance().setRunXmlModel(tableModel);
+   }
+   
+   @Override
+   public void setMediatorJPanel()
+   {
+      RunMediator.instance().setRunXmlTable(this);
+   }
+   
+   @Override
+   public GenericEditTableModel getTableModel()
+   {
+      return tableModel;
+   }
+   
+   @Override
+   @AopHelperAction(action=Action.SET, state=AopState.UNSPECIFIED, option=AopOption.CLASSPATH)
+   public void notifyAction()
+   {
+      
+   }
+
+
+}

Modified: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/util/AopCompileCommand.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/util/AopCompileCommand.java	2008-09-22 11:13:14 UTC (rev 78748)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/util/AopCompileCommand.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -21,10 +21,8 @@
   */
 package org.jboss.aophelper.util;
 
-import java.io.BufferedReader;
 import java.io.File;
 import java.io.IOException;
-import java.io.InputStreamReader;
 
 import org.jboss.aophelper.core.AopCompile;
 import org.jboss.aophelper.core.AopHandler;
@@ -47,7 +45,7 @@
          String[] emptyArray = new String[0];
          Process process = Runtime.getRuntime().exec( execute, emptyArray,  new File(AopHandler.instance().getCompile().getWorkingdir()));
 
-         return analyzeProcess(process);
+         return CommandUtil.analyzeProcess(process);
       }
       catch ( IOException ie )
       {
@@ -58,55 +56,12 @@
       }
    }
    
-   private String analyzeProcess(Process process)
-   {
-      BufferedReader br = new BufferedReader( new InputStreamReader( process.getInputStream() ) );
-
-      String line; 
-
-      StringBuffer output = new StringBuffer();
-
-      try
-      {
-         while ( ( line = br.readLine() ) != null )
-         {
-            System.out.println("line: "+line);
-            output.append("\n").append(line);
-         }
-      }
-      catch (IOException e)
-      {
-         // TODO Auto-generated catch block
-         e.printStackTrace();
-      }
-      
-      BufferedReader errorBr = new BufferedReader(new InputStreamReader(process.getErrorStream()));
-      try
-      {
-         while(( line = errorBr.readLine()) != null)
-         {
-            System.out.println("ERROR: "+line);
-         }
-      }
-      catch(IOException e)
-      {
-         e.printStackTrace();
-      }
-      
-      System.out.println("INPUTSTREAM: "+output.toString());
-
-      return output.toString();
-   }
-      
-    
    
    private String setup()
    {
       AopCompile compileOptions = AopHandler.instance().getCompile();
       
       StringBuilder execute = new StringBuilder();
-//      execute.append(getShell());
-//      execute.append("\"cd ").append(compileOptions.getWorkingdir()).append("; ");
       execute.append("java -cp ").append(CommandUtil.getAopPaths());
       execute.append(" org.jboss.aop.standalone.Compiler ");
       if(compileOptions.isVerbose())
@@ -140,10 +95,5 @@
       return execute.toString();
       
    }
-   
-   private String getShell()
-   {
-      return "/bin/sh -c ";
-   }
 
 }

Added: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/util/AopRunCommand.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/util/AopRunCommand.java	                        (rev 0)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/util/AopRunCommand.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -0,0 +1,136 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.aophelper.util;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.jboss.aophelper.core.AopHandler;
+import org.jboss.aophelper.core.AopRun;
+
+/**
+ * A AopRunCommand.
+ * 
+ * @author <a href="stalep at gmail.com">Stale W. Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public class AopRunCommand
+{
+
+
+   public String execute()
+   {
+      String execute = setup();
+      try
+      {
+         String[] emptyArray = new String[0];
+         Process process = Runtime.getRuntime().exec( execute, emptyArray,  new File(AopHandler.instance().getRun().getWorkingdir()));
+
+         return CommandUtil.analyzeProcess(process);
+      }
+      catch ( IOException ie )
+      {
+         System.out.println("Error while aopcompiling: "+ie.getMessage());
+         ie.printStackTrace();
+       
+         return null;
+      }
+   }
+   
+
+   private String setup()
+   {
+      AopRun runOptions = AopHandler.instance().getRun();
+      
+      StringBuilder execute = new StringBuilder();
+      execute.append("java ");
+      if(runOptions.isLoadtime())
+         execute.append(getLoadtimePath());
+      execute.append(" -cp ").append(CommandUtil.getAopPaths());
+//      execute.append(" org.jboss.aop.standalone.Compiler ");
+      execute.append(" ");
+      if(runOptions.isVerbose())
+         execute.append("-Djboss.aop.verbose=true ");
+      if(runOptions.isNoopt())
+         execute.append("-Djboss.aop.noopt=true ");
+      if(runOptions.isSuppress())
+         execute.append("-Djboss.aop.suppress=true ");
+      
+      if(runOptions.getAopXml().size() > 0)
+      {
+         execute.append("-Djboss.aop.path=");
+         String pathSep = System.getProperty("path.separator");
+         StringBuffer xmlPaths = new StringBuffer();
+         for(String xml : runOptions.getAopXml())
+         {
+            if(xmlPaths.length() > 0)
+               xmlPaths.append(pathSep);
+            System.out.println("appending xml: "+xml);
+            xmlPaths.append(xml);
+         }
+         execute.append(xmlPaths.toString()).append(" ");
+      }
+      
+      execute.append(calculateCorrectExecutionClass(runOptions));
+      
+//      execute.append("\"");
+      System.out.println("EXECUTING: "+execute.toString());
+      
+      
+      return execute.toString();
+      
+   }
+   
+   private String calculateCorrectExecutionClass(AopRun runOptions)
+   {
+      String workingdir = runOptions.getWorkingdir();
+      String exeClass = runOptions.getExecutionClass();
+      
+      if(exeClass.startsWith(workingdir))
+      {
+        String rest = exeClass.split(workingdir)[1];
+        if(rest.startsWith("/"))
+          rest = rest.substring(1);
+        rest = rest.replaceAll("/",".");
+        int index = rest.lastIndexOf(".class");
+        rest = rest.substring(0,index);
+        System.out.println("rest="+rest);
+
+        return rest;
+      }
+      else
+         return null;
+      
+   }
+   
+   private String getLoadtimePath()
+   {
+      String pathSeparator = System.getProperty("path.separator");
+      String[] paths = System.getProperty("java.class.path").split(pathSeparator);
+      for(String p : paths)
+      {
+         if(p.contains("jboss-aop-"))
+            return "-javaagent:"+p;
+      }
+      return null;
+   }
+}

Modified: projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/util/CommandUtil.java
===================================================================
--- projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/util/CommandUtil.java	2008-09-22 11:13:14 UTC (rev 78748)
+++ projects/aop/trunk/aophelper/src/main/java/org/jboss/aophelper/util/CommandUtil.java	2008-09-22 11:32:23 UTC (rev 78749)
@@ -21,6 +21,10 @@
   */
 package org.jboss.aophelper.util;
 
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
 /**
  * A CommandUtil.
  * 
@@ -61,5 +65,48 @@
       
       return aopPaths.toString();
    }
+   
 
+   public static String analyzeProcess(Process process)
+   {
+      BufferedReader br = new BufferedReader( new InputStreamReader( process.getInputStream() ) );
+
+      String line; 
+
+      StringBuffer output = new StringBuffer();
+
+      try
+      {
+         while ( ( line = br.readLine() ) != null )
+         {
+            System.out.println("line: "+line);
+            output.append("\n").append(line);
+         }
+      }
+      catch (IOException e)
+      {
+         // TODO Auto-generated catch block
+         e.printStackTrace();
+      }
+      
+      BufferedReader errorBr = new BufferedReader(new InputStreamReader(process.getErrorStream()));
+      try
+      {
+         while(( line = errorBr.readLine()) != null)
+         {
+            System.out.println("ERROR: "+line);
+         }
+      }
+      catch(IOException e)
+      {
+         e.printStackTrace();
+      }
+      
+      System.out.println("INPUTSTREAM: "+output.toString());
+
+      return output.toString();
+   }
+      
+    
+
 }




More information about the jboss-cvs-commits mailing list