Commits

Anonymous committed 22711de

Comments (0)

Files changed (63)

src/editor/com/opensymphony/xworkeditor/OnChooseDocumentOk.java

+/*
+ * @(#)OnChooseDocumentOk.java
+ *
+ * Copyright (c) 2003 Jon Lipsky
+ * All rights reserved.
+ */
+package com.opensymphony.xworkeditor;
+
+import com.xe.xface.core.Showable;
+import com.xe.xface.core.XDialog;
+import com.xe.xface.core.XFace;
+import com.xe.xface.core.XMap;
+import com.xe.xface.core.adapter.XAbstractAdapter;
+import com.xe.xface.core.event.ElementEvent;
+
+import java.io.File;
+
+/**
+ * This adapter will ...
+ *
+ * @author <a href="mailto:jon.lipsky@xesoft.com">Jon Lipsky</a>
+ * @created September 22, 2003
+ * @version $Revision$
+ *
+ * @xelement.name on-choose-document-ok-adapter
+ * @xelement.namespace xwork-editor
+ */
+public class OnChooseDocumentOk extends XAbstractAdapter
+{
+	public OnChooseDocumentOk()
+	{
+		super.setParentEventIds(new int[]{XFace.OK});
+	}
+
+	public void handleElementEvent(ElementEvent aElementEvent)
+	{
+		// Do nothing
+	}
+
+	public void handleParentEvent(ElementEvent aElementEvent)
+	{
+		try
+		{
+			XDialog vParent = (XDialog)getParent();
+			File vFile = vParent.getFile();
+			String vPath = vFile.getCanonicalPath();
+			XMap vMap = (XMap)findElement("../../editor/variables");
+			vMap.put("file",vPath);
+			((Showable)findElement("../../editor")).show();
+		}
+		catch (Throwable e)
+		{
+			throw new RuntimeException(e.getMessage(),e);
+		}
+
+	}
+}

src/editor/com/opensymphony/xworkeditor/OnEditorShowAdapter.java

+/*
+ * @(#)OnEditorShowAdapter.java
+ *
+ * Copyright (c) 2003 Jon Lipsky
+ * All rights reserved.
+ */
+package com.opensymphony.xworkeditor;
+
+import com.xe.xface.core.adapter.XAbstractAdapter;
+import com.xe.xface.core.event.ElementEvent;
+import com.xe.xface.core.XFace;
+import com.xe.xface.core.Showable;
+import com.xe.xface.core.XApplication;
+import com.xe.xface.core.XMap;
+import com.xe.xface.core.model.data.XDataModel;
+import com.xe.xface.core.document.XMLDocument;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+
+/**
+ * This adapter will decide which panel to show depending on if the user
+ * has agreed to the license or not.
+ *
+ * @author <a href="mailto:jon.lipsky@xesoft.com">Jon Lipsky</a>
+ * @created September 22, 2003
+ * @version $Revision$
+ *
+ * @xelement.name on-editor-show-adapter
+ * @xelement.namespace xwork-editor
+ */
+public class OnEditorShowAdapter extends XAbstractAdapter
+{
+	public OnEditorShowAdapter()
+	{
+		super.setParentEventIds(new int[]{XFace.SHOW});
+	}
+
+	public void handleElementEvent(ElementEvent aElementEvent)
+	{
+		// Do nothing
+	}
+
+	public void handleParentEvent(ElementEvent aElementEvent)
+	{
+		try
+		{
+			XMap vVariables = (XMap)findElement("../variables");
+			String vPath = (String)vVariables.get("file");
+			XMLDocument vDocument = new XMLDocument(new FileInputStream(vPath));
+			vDocument.setPath(vPath);
+			XDataModel vModel = (XDataModel)findElement("../editor/model");
+			vDocument.setModel(vModel);
+			vVariables.put("document",vDocument);
+		}
+		catch (FileNotFoundException e)
+		{
+			throw new RuntimeException(e.getMessage(),e);
+		}
+	}
+}

src/editor/com/opensymphony/xworkeditor/OnStartupAdapter.java

+/*
+ * @(#)OnStartupAdapter.java
+ *
+ * Copyright (c) 2003 Jon Lipsky
+ * All rights reserved.
+ */
+package com.opensymphony.xworkeditor;
+
+import com.xe.xface.core.adapter.XAbstractAdapter;
+import com.xe.xface.core.event.ElementEvent;
+import com.xe.xface.core.XFace;
+import com.xe.xface.core.Showable;
+import com.xe.xface.core.XApplication;
+
+/**
+ * This adapter will decide which panel to show depending on if the user
+ * has agreed to the license or not.
+ *
+ * @author <a href="mailto:jon.lipsky@xesoft.com">Jon Lipsky</a>
+ * @created September 22, 2003
+ * @version $Revision$
+ *
+ * @xelement.name on-startup-adapter
+ * @xelement.namespace xwork-editor
+ */
+public class OnStartupAdapter extends XAbstractAdapter
+{
+	public OnStartupAdapter()
+	{
+		super.setParentEventIds(new int[]{XFace.STARTUP});
+	}
+
+	public void handleElementEvent(ElementEvent aElementEvent)
+	{
+		// Do nothing
+	}
+
+	public void handleParentEvent(ElementEvent aElementEvent)
+	{
+		if (XApplication.getPreferences().getBoolean("xwork-editor/accept_license", false) == false)
+		{
+			((Showable) findElement("../license")).show();
+		}
+		else
+		{
+			((Showable) findElement("../choose_document")).show();
+		}
+	}
+}

src/editor/com/opensymphony/xworkeditor/SaveChangesAdapter.java

+/*
+ * @(#)SaveChangesAdapter.java
+ *
+ * Copyright (c) 2003 Jon Lipsky
+ * All rights reserved.
+ */
+package com.opensymphony.xworkeditor;
+
+import com.xe.xface.core.XFace;
+import com.xe.xface.core.XMap;
+import com.xe.xface.core.adapter.XAbstractAdapter;
+import com.xe.xface.core.document.XDocument;
+import com.xe.xface.core.event.ElementEvent;
+
+/**
+ * This adapter will decide which panel to show depending on if the user
+ * has agreed to the license or not.
+ *
+ * @author <a href="mailto:jon.lipsky@xesoft.com">Jon Lipsky</a>
+ * @created September 22, 2003
+ * @version $Revision$
+ *
+ * @xelement.name save-changes-adapter
+ * @xelement.namespace xwork-editor
+ */
+public class SaveChangesAdapter extends XAbstractAdapter
+{
+	public SaveChangesAdapter()
+	{
+		super.setParentEventIds(new int[]{XFace.YES});
+	}
+
+	public void handleElementEvent(ElementEvent aElementEvent)
+	{
+		// Do nothing
+	}
+
+	public void handleParentEvent(ElementEvent aElementEvent)
+	{
+		try
+		{
+			XMap vVariables = (XMap)findElement("../../variables");
+			XDocument vDocument = (XDocument)vVariables.get("document");
+			vDocument.save();
+			System.exit(0);
+		}
+		catch (Exception e)
+		{
+			throw new RuntimeException(e.getMessage(),e);
+		}
+	}
+}

src/editor/xwork-editor/action/actiontab.xfm.xml

+<xface:tab
+	xmlns:xface="http://www.xesoft.com/xmlns/xface"
+	xmlns:xprocess="http://www.xesoft.com/xmlns/xprocess"
+	id="actions">
+
+	<xface:split-panel id="split" weight="30">
+		<xface:panel id="left">
+
+			<xface:relative-layout constraints="/xwork-editor/xwork-panel-right2.layout.xml"/>
+
+			<xface:toolbar id="toolbar">
+				<xface:toolbar-button id="create_action" image="xwork-editor/images/add_action.gif"/>
+				<xface:toolbar-button id="delete_action" image="xwork-editor/images/delete.gif">
+					<xface:selected-list-enabled-adapter element="../../../table" selection="both"/>
+				</xface:toolbar-button>
+			</xface:toolbar>
+
+			<xface:table id="table">
+				<xface:xml-tablemodel id="model" xpath="action"/>
+				<xface:column id="name" property="@name"/>
+			</xface:table>
+
+		</xface:panel>
+		<xface:panel id="right">
+
+			<xface:selected-list-enabled-adapter element="../../left/table" selection="both"/>
+
+			<xface:relative-layout constraints="/xwork-editor/xwork-panel-right3.layout.xml"/>
+
+			<xface:panel id="header">
+
+				<xface:input-panel-layout/>
+
+				<xface:label id="label_name" label="name"/>
+				<xface:text-input id="name" editable="false"/>
+				<xface:label id="label_class" label="class"/>
+				<xface:text-input id="class" editable="false"/>
+			</xface:panel>
+
+			<xface:tab-panel id="tabpanel">
+				<xface:include src="/xwork-editor/parameter/parametertab.xfm.xml" />
+				<xface:include src="resulttab.xfm.xml" />
+				<xface:include src="interceptorreftab.xfm.xml" />
+			</xface:tab-panel>
+
+			<xface:xml-datamodel id="model">
+				<xface:adapter modelProperty="@name" element="../../header/name" elementProperty="value"/>
+				<xface:adapter modelProperty="@class" element="../../header/class" elementProperty="value"/>
+
+				<xface:adapter element="../../tabpanel/params/table/model" elementProperty="data"/>
+				<xface:adapter element="../../tabpanel/results/split/top/table/model" elementProperty="data"/>
+				<xface:adapter element="../../tabpanel/interceptors/split/top/table/model" elementProperty="data"/>
+
+				<xface:selected-table-item-adapter element="../../../left/table"/>
+			</xface:xml-datamodel>
+
+		</xface:panel>
+
+	</xface:split-panel>
+
+	<!--
+		Panel Includes
+   -->
+	<xface:include src="createaction.xfm.xml" />
+	<xface:include src="deleteaction.xfm.xml" />
+
+</xface:tab>

src/editor/xwork-editor/action/createaction.xfm.xml

+<xface:window
+	xmlns:xface="http://www.xesoft.com/xmlns/xface"
+	xmlns:xprocess="http://www.xesoft.com/xmlns/xprocess"
+	id="create_action"
+	width="400"
+	height="200"
+	location="center_on_screen"
+	modal="application"
+	resizable="false">
+
+	<xface:relative-layout constraints="/xwork-editor/edit.layout.xml" />
+
+	<xface:label id="label_message" label="create_action_message" />
+
+	<xface:panel id="inputs">
+		<xface:input-panel-layout />
+
+		<xface:label id="label_name" label="name" />
+		<xface:text-input id="name" />
+
+		<xface:label id="label_class" label="class" />
+		<xface:text-input id="class" />
+
+	</xface:panel>
+
+	<xface:button id="ok" label="ok" />
+	<xface:button id="cancel" label="cancel" />
+
+	<!-- Hide the window when cancel is pressed -->
+	<xface:hide-adapter element="../cancel" event="ACTION" />
+
+	<!-- Show the window when add_package button is pressed -->
+	<xface:show-adapter element="../../split/left/toolbar/create_action" event="ACTION" />
+
+	<!-- Clear the inputs when the window is shown -->
+	<xface:action>
+		<xface:action-adapter element="../.." event="SHOW" />
+		<xprocess:script>
+			<xface:param id="script"><![CDATA[
+				parent.findElement("../inputs/name").setValue("");
+				parent.findElement("../inputs/class").setValue("");
+			]]></xface:param>
+		</xprocess:script>
+	</xface:action>
+
+	<!-- Create the package when the OK button is pressed -->
+	<xface:action>
+		<xface:action-adapter element="../../ok" event="ACTION" />
+		<xprocess:script>
+			<xface:param id="script"><![CDATA[
+				var vName = parent.findElement("../inputs/name").getValue();
+				var vClass = parent.findElement("../inputs/class").getValue();
+				var vModel = parent.findElement("../../split/left/table/model");
+				var vRoot = vModel.getData();
+				var vDocument = vRoot.getOwnerDocument();
+
+				/* First check to see that a real action name was entered */
+				if (vName.trim().length() == 0)
+				{
+					throw "A valid name was not entered";
+				}
+
+				/* First check to see that a real class was entered */
+				if (vClass.trim().length() == 0)
+				{
+					throw "A valid class name was not entered";
+				}
+
+				/* Second check to see if the interceptor (or interceptor stack) exists */
+				var vExistingElement = Packages.com.xe.xface.xml.XPathGetter.getElement(vRoot,"action[@name='"+vName+"']");
+				if (vExistingElement != null)
+				{
+					throw "An action with the name '"+vName+"' already exists";
+				}
+
+				/* Now, create the element and add it to the model */
+				var vElement = vDocument.createElement("action");
+				vElement.setAttribute("name",vName);
+				vElement.setAttribute("class",vClass);
+				vModel.addObject(vElement);
+			]]></xface:param>
+		</xprocess:script>
+		<xprocess:hide object="../.." />
+	</xface:action>
+
+</xface:window>

src/editor/xwork-editor/action/createinterceptorref.xfm.xml

+<xface:window
+	xmlns:xface="http://www.xesoft.com/xmlns/xface"
+	xmlns:xprocess="http://www.xesoft.com/xmlns/xprocess"
+	id="create_interceptor_ref"
+	width="400"
+	height="400"
+	location="center_on_screen"
+	modal="application">
+
+	<xface:relative-layout constraints="/xwork-editor/select.layout.xml" />
+
+	<xface:multi-line-label id="label_message" label="create_interceptor_ref_message" />
+
+	<xface:list id="list">
+		<xface:xml-tablemodel id="model" xpath="*[self::interceptor-stack or self::interceptor]"/>
+		<xface:column id="name" property="@name">
+			<xface:script-decision id="imageDecision">
+				<xface:param id="script"><![CDATA[
+					function chooseParameterImage(aObject)
+					{
+						var vName = aObject.getLocalName();
+
+						if (vName.equals("interceptor"))
+						{
+							return "xwork-editor/images/interceptor.gif";
+						}
+						else
+						{
+							return "xwork-editor/images/interceptor_stack.gif";
+						}
+					}
+
+					chooseParameterImage(object);
+			]]></xface:param>
+			</xface:script-decision>
+		</xface:column>
+	</xface:list>
+
+	<xface:panel id="inputs">
+		<xface:input-panel-layout />
+
+		<xface:label id="label_name" label="name" />
+		<xface:text-input id="name" />
+
+	</xface:panel>
+
+	<xface:button id="ok" label="ok" />
+	<xface:button id="cancel" label="cancel" />
+
+	<!-- Hide the window when cancel is pressed -->
+	<xface:hide-adapter element="../cancel" event="ACTION" />
+
+	<!-- Show the window when add_package button is pressed -->
+	<xface:show-adapter element="../../split/top/toolbar/create_interceptor_ref" event="ACTION" />
+
+	<!-- Clear the inputs when the window is shown -->
+	<xface:action>
+		<xface:action-adapter element="../.." event="SHOW" />
+		<xprocess:script>
+			<xface:param id="script"><![CDATA[
+				parent.findElement("../inputs/name").setValue("");
+
+				var vModel = parent.findElement("../../split/top/table/model");
+				var vRoot = vModel.getData();
+
+				var vPackageElement = vRoot.getParentNode();
+				var vInterceptorsElement = Packages.com.xe.xface.xml.XPathGetter.getElement(vPackageElement,"interceptors");
+				parent.findElement("../list/model").setData(vInterceptorsElement);
+			]]></xface:param>
+		</xprocess:script>
+	</xface:action>
+
+	<!-- Create the package when the OK button is pressed -->
+	<xface:action>
+		<xface:action-adapter element="../../ok" event="ACTION" />
+		<xprocess:script>
+			<xface:param id="script"><![CDATA[
+				var vName = parent.findElement("../inputs/name").getValue();
+				var vModel = parent.findElement("../../split/top/table/model");
+				var vRoot = vModel.getData();
+				var vDocument = vRoot.getOwnerDocument();
+
+				/* First check to see that a real package name was entered */
+				if (vName.trim().length() == 0)
+				{
+					throw "A valid name was not entered";
+				}
+
+				/* Second check to see if the interceptor stack (or interceptor) exists */
+				var vExistingElement = Packages.com.xe.xface.xml.XPathGetter.getElement(vRoot,"interceptor-ref[@name='"+vName+"']");
+				if (vExistingElement != null)
+				{
+					throw "A reference to the interceptor '"+vName+"' already exists";
+				}
+
+				/* Now, create the element and add it to the model */
+				var vElement = vDocument.createElement("interceptor-ref");
+				vElement.setAttribute("name",vName);
+				vModel.addObject(vElement);
+			]]></xface:param>
+		</xprocess:script>
+		<xprocess:hide object="../.." />
+	</xface:action>
+
+	<xface:action>
+		<xface:action-adapter element="../../list" event="SELECT_ROW" />
+		<xprocess:script>
+			<xface:input id="row" type="variable" value="arg0" />
+			<xface:param id="script"><![CDATA[
+			   var vList = parent.findElement("../list");
+				var vName = vList.getModel().getPropertyAsString(row,"@name");
+				parent.findElement("../inputs/name").setValue(vName);
+			]]></xface:param>
+		</xprocess:script>
+	</xface:action>
+
+</xface:window>

src/editor/xwork-editor/action/createresult.xfm.xml

+<xface:window
+	xmlns:xface="http://www.xesoft.com/xmlns/xface"
+	xmlns:xprocess="http://www.xesoft.com/xmlns/xprocess"
+	id="create_result"
+	width="400"
+	height="200"
+	location="center_on_screen"
+	modal="application"
+	resizable="false">
+
+	<xface:relative-layout constraints="/xwork-editor/edit.layout.xml" />
+
+	<xface:label id="label_message" label="create_result_message" />
+
+	<xface:panel id="inputs">
+		<xface:input-panel-layout />
+
+		<xface:label id="label_name" label="name" />
+		<xface:text-input id="name" />
+
+		<xface:label id="label_type" label="type" />
+		<xface:text-input id="type" />
+
+	</xface:panel>
+
+	<xface:button id="ok" label="ok" />
+	<xface:button id="cancel" label="cancel" />
+
+	<!-- Hide the window when cancel is pressed -->
+	<xface:hide-adapter element="../cancel" event="ACTION" />
+
+	<!-- Show the window when add_package button is pressed -->
+	<xface:show-adapter element="../../split/top/toolbar/create_result" event="ACTION" />
+
+	<!-- Clear the inputs when the window is shown -->
+	<xface:action>
+		<xface:action-adapter element="../.." event="SHOW" />
+		<xprocess:script>
+			<xface:param id="script"><![CDATA[
+				parent.findElement("../inputs/name").setValue("");
+				parent.findElement("../inputs/type").setValue("");
+			]]></xface:param>
+		</xprocess:script>
+	</xface:action>
+
+	<!-- Create the package when the OK button is pressed -->
+	<xface:action>
+		<xface:action-adapter element="../../ok" event="ACTION" />
+		<xprocess:script>
+			<xface:param id="script"><![CDATA[
+				var vName = parent.findElement("../inputs/name").getValue();
+				var vType = parent.findElement("../inputs/type").getValue();
+				var vModel = parent.findElement("../../split/top/table/model");
+				var vRoot = vModel.getData();
+				var vDocument = vRoot.getOwnerDocument();
+
+				/* First check to see that a real parameter name was entered */
+				if (vName.trim().length() == 0)
+				{
+					throw "A valid name was not entered";
+				}
+
+				/* Second check to see if the interceptor (or interceptor stack) exists */
+				var vExistingElement = Packages.com.xe.xface.xml.XPathGetter.getElement(vRoot,"result[@name='"+vName+"']");
+				if (vExistingElement != null)
+				{
+					throw "A result with the name '"+vName+"' already exists";
+				}
+
+				/* Now, create the element and add it to the model */
+				var vElement = vDocument.createElement("result");
+				vElement.setAttribute("name",vName);
+				if (vType.trim().length() > 0)
+				{
+					vElement.setAttribute("type",vType);
+				}
+				vModel.addObject(vElement);
+			]]></xface:param>
+		</xprocess:script>
+		<xprocess:hide object="../.." />
+	</xface:action>
+
+</xface:window>

src/editor/xwork-editor/action/deleteaction.xfm.xml

+<xface:dialog
+	xmlns:xface="http://www.xesoft.com/xmlns/xface"
+	xmlns:xprocess="http://www.xesoft.com/xmlns/xprocess"
+	id="delete_action"
+	type="question">
+
+
+	<!-- Show the dialog when delete package button is pressed -->
+	<xface:selected-list-delete-adapter element="../../split/left/table" event="OK" />
+
+	<!-- Show the dialog when delete package button is pressed -->
+	<xface:show-adapter element="../../split/left/toolbar/delete_action" event="ACTION" />
+
+</xface:dialog>

src/editor/xwork-editor/action/deleteinterceptorref.xfm.xml

+<xface:dialog
+	xmlns:xface="http://www.xesoft.com/xmlns/xface"
+	xmlns:xprocess="http://www.xesoft.com/xmlns/xprocess"
+	id="delete_interceptor_ref"
+	type="question">
+
+
+	<!-- Show the dialog when delete package button is pressed -->
+	<xface:selected-list-delete-adapter element="../../split/top/table" event="OK" />
+
+	<!-- Show the dialog when delete package button is pressed -->
+	<xface:show-adapter element="../../split/top/toolbar/delete_interceptor_ref" event="ACTION" />
+
+</xface:dialog>

src/editor/xwork-editor/action/deleteresult.xfm.xml

+<xface:dialog
+	xmlns:xface="http://www.xesoft.com/xmlns/xface"
+	xmlns:xprocess="http://www.xesoft.com/xmlns/xprocess"
+	id="delete_result"
+	type="question">
+
+
+	<!-- Show the dialog when delete package button is pressed -->
+	<xface:selected-list-delete-adapter element="../../split/top/table" event="OK" />
+
+	<!-- Show the dialog when delete package button is pressed -->
+	<xface:show-adapter element="../../split/top/toolbar/delete_result" event="ACTION" />
+
+</xface:dialog>

src/editor/xwork-editor/action/interceptorreftab.xfm.xml

+<xface:tab
+	xmlns:xface="http://www.xesoft.com/xmlns/xface"
+	xmlns:xprocess="http://www.xesoft.com/xmlns/xprocess"
+	id="interceptors">
+
+	<xface:split-panel id="split" orientation="horizontal" weight="50">
+		<xface:panel id="top">
+			<xface:relative-layout constraints="/xwork-editor/xwork-panel-right2.layout.xml"/>
+
+			<xface:toolbar id="toolbar">
+				<xface:toolbar-button id="create_interceptor_ref" image="xwork-editor/images/add_interceptor.gif"/>
+				<xface:toolbar-button id="delete_interceptor_ref" image="xwork-editor/images/delete.gif">
+					<xface:selected-list-enabled-adapter element="../../../table" selection="both"/>
+				</xface:toolbar-button>
+				<xface:toolbar-button id="move_up" image="xwork-editor/images/step_up.gif">
+					<xface:selected-list-enabled-adapter element="../../../table" selection="not_first"/>
+					<xface:selected-list-move-adapter element="../../../table" direction="up" />
+				</xface:toolbar-button>
+				<xface:toolbar-button id="move_down" image="xwork-editor/images/step_down.gif">
+					<xface:selected-list-enabled-adapter element="../../../table" selection="not_last"/>
+					<xface:selected-list-move-adapter element="../../../table" direction="down" />
+				</xface:toolbar-button>
+			</xface:toolbar>
+
+			<xface:table id="table">
+				<xface:xml-tablemodel id="model" xpath="interceptor-ref"/>
+				<xface:column id="name" property="@name"/>
+			</xface:table>
+		</xface:panel>
+		<xface:panel id="bottom">
+			<xface:selected-list-enabled-adapter element="../../top/table" selection="both"/>
+
+			<xface:inset-layout constraints="tabpanel,5,5,5,5" />
+
+			<xface:tab-panel id="tabpanel">
+				<xface:include src="/xwork-editor/parameter/parametertab.xfm.xml" />
+			</xface:tab-panel>
+
+			<xface:xml-datamodel id="model">
+				<xface:adapter element="../../tabpanel/params/table/model" elementProperty="data"/>
+				<xface:selected-table-item-adapter element="../../../top/table"/>
+			</xface:xml-datamodel>
+
+		</xface:panel>
+	</xface:split-panel>
+
+	<!--
+		Panel Includes
+   -->
+	<xface:include src="createinterceptorref.xfm.xml" />
+	<xface:include src="deleteinterceptorref.xfm.xml" />
+
+</xface:tab>

src/editor/xwork-editor/action/resulttab.xfm.xml

+<xface:tab
+	xmlns:xface="http://www.xesoft.com/xmlns/xface"
+	xmlns:xprocess="http://www.xesoft.com/xmlns/xprocess"
+	id="results">
+
+	<xface:split-panel id="split" orientation="horizontal" weight="50">
+		<xface:panel id="top">
+			<xface:relative-layout constraints="/xwork-editor/xwork-panel-right2.layout.xml"/>
+
+			<xface:toolbar id="toolbar">
+				<xface:toolbar-button id="create_result" image="xwork-editor/images/add_result.gif"/>
+				<xface:toolbar-button id="delete_result" image="xwork-editor/images/delete.gif">
+					<xface:selected-list-enabled-adapter element="../../../table" selection="both"/>
+				</xface:toolbar-button>
+			</xface:toolbar>
+
+			<xface:table id="table">
+				<xface:xml-tablemodel id="model" xpath="result"/>
+				<xface:column id="name" property="@name"/>
+				<xface:column id="type" property="@type"/>
+			</xface:table>
+		</xface:panel>
+		<xface:panel id="bottom">
+			<xface:selected-list-enabled-adapter element="../../top/table" selection="both"/>
+
+			<xface:inset-layout constraints="tabpanel,5,5,5,5" />
+
+			<xface:tab-panel id="tabpanel">
+				<xface:include src="/xwork-editor/parameter/parametertab.xfm.xml" />
+			</xface:tab-panel>
+
+			<xface:xml-datamodel id="model">
+				<xface:adapter element="../../tabpanel/params/table/model" elementProperty="data"/>
+				<xface:selected-table-item-adapter element="../../../top/table"/>
+			</xface:xml-datamodel>
+
+		</xface:panel>
+	</xface:split-panel>
+
+	<!--
+		Panel Includes
+   -->
+	<xface:include src="createresult.xfm.xml" />
+	<xface:include src="deleteresult.xfm.xml" />
+
+</xface:tab>

src/editor/xwork-editor/edit.layout.xml

+<?xml version="1.0"?>
+<constraint-set>
+	<constrain name="label_message">
+		<left>
+			<toAttribute reference="_container" attribute="left" offset="10" />
+		</left>
+		<right>
+			<toAttribute reference="_container" attribute="right" offset="-10" />
+		</right>
+		<top>
+			<toAttribute reference="_container" attribute="top" offset="10" />
+		</top>
+	</constrain>
+
+	<constrain name="inputs">
+		<left>
+			<toAttribute reference="_container" attribute="left" offset="10" />
+		</left>
+		<top>
+			<toAttribute reference="label_message" attribute="bottom" offset="10" />
+		</top>
+		<right>
+			<toAttribute reference="_container" attribute="right" offset="-10" />
+		</right>
+	</constrain>
+
+	<constrain name="ok">
+		<top>
+			<toAttribute reference="_container" attribute="bottom" offset="-34" />
+		</top>
+		<right>
+			<toAttribute reference="cancel" attribute="left" offset="-10" />
+		</right>
+		<bottom>
+			<toAttribute reference="_container" attribute="bottom" offset="-10" />
+		</bottom>
+		<left>
+			<toAttribute reference="cancel" attribute="left" offset="-85" />
+		</left>
+	</constrain>
+
+	<constrain name="cancel">
+		<top>
+			<toAttribute reference="_container" attribute="bottom" offset="-34" />
+		</top>
+		<left>
+			<toAttribute reference="_container" attribute="right" offset="-85" />
+		</left>
+		<right>
+			<toAttribute reference="_container" attribute="right" offset="-10" />
+		</right>
+		<bottom>
+			<toAttribute reference="_container" attribute="bottom" offset="-10" />
+		</bottom>
+	</constrain>
+
+</constraint-set>
Add a comment to this file

src/editor/xwork-editor/images/action.gif

Added
New image
Add a comment to this file

src/editor/xwork-editor/images/add_action.gif

Added
New image
Add a comment to this file

src/editor/xwork-editor/images/add_include.gif

Added
New image
Add a comment to this file

src/editor/xwork-editor/images/add_interceptor.gif

Added
New image
Add a comment to this file

src/editor/xwork-editor/images/add_interceptor_stack.gif

Added
New image
Add a comment to this file

src/editor/xwork-editor/images/add_package.gif

Added
New image
Add a comment to this file

src/editor/xwork-editor/images/add_param.gif

Added
New image
Add a comment to this file

src/editor/xwork-editor/images/add_result.gif

Added
New image
Add a comment to this file

src/editor/xwork-editor/images/delete.gif

Added
New image
Add a comment to this file

src/editor/xwork-editor/images/include.gif

Added
New image
Add a comment to this file

src/editor/xwork-editor/images/interceptor.gif

Added
New image
Add a comment to this file

src/editor/xwork-editor/images/interceptor_stack.gif

Added
New image
Add a comment to this file

src/editor/xwork-editor/images/opensymphony.gif

Added
New image
Add a comment to this file

src/editor/xwork-editor/images/result.gif

Added
New image
Add a comment to this file

src/editor/xwork-editor/images/step_down.gif

Added
New image
Add a comment to this file

src/editor/xwork-editor/images/step_up.gif

Added
New image

src/editor/xwork-editor/includes/createinclude.xfm.xml

+<xface:window
+	xmlns:xface="http://www.xesoft.com/xmlns/xface"
+	xmlns:xprocess="http://www.xesoft.com/xmlns/xprocess"
+	id="create_include"
+	width="400"
+	height="200"
+	location="center_on_screen"
+	modal="application"
+	resizable="false">
+
+	<xface:relative-layout constraints="/xwork-editor/edit.layout.xml" />
+
+	<xface:label id="label_message" label="create_include_message" />
+
+	<xface:panel id="inputs">
+		<xface:input-panel-layout />
+
+		<xface:label id="label_file" label="file" />
+		<xface:text-input id="file" />
+
+	</xface:panel>
+
+	<xface:button id="ok" label="ok" />
+	<xface:button id="cancel" label="cancel" />
+
+	<!-- Hide the window when cancel is pressed -->
+	<xface:hide-adapter element="../cancel" event="ACTION" />
+
+	<!-- Show the window when add_package button is pressed -->
+	<xface:show-adapter element="../../toolbar/create_include" event="ACTION" />
+
+	<!-- Clear the inputs when the window is shown -->
+	<xface:action>
+		<xface:action-adapter element="../.." event="SHOW" />
+		<xprocess:script>
+			<xface:param id="script"><![CDATA[
+				parent.findElement("../inputs/file").setValue("");
+			]]></xface:param>
+		</xprocess:script>
+	</xface:action>
+
+	<!-- Create the package when the OK button is pressed -->
+	<xface:action>
+		<xface:action-adapter element="../../ok" event="ACTION" />
+		<xprocess:script>
+			<xface:param id="script"><![CDATA[
+				var vFile = parent.findElement("../inputs/file").getValue();
+				var vModel = parent.findElement("../../table/model");
+				var vRoot = vModel.getData();
+				var vDocument = vRoot.getOwnerDocument();
+
+				/* First check to see that a real package name was entered */
+				if (vFile.trim().length() == 0)
+				{
+					throw "A valid file name was not entered";
+				}
+
+				/* Second check to see if the package exists */
+				var vExistingElement = Packages.com.xe.xface.xml.XPathGetter.getElement(vRoot,"include[@file='"+vFile+"']");
+				if (vExistingElement != null)
+				{
+					throw "A include with the file '"+vFile+"' already exists";
+				}
+
+				/* Now, create the element and add it to the model */
+				var vElement = vDocument.createElement("include");
+				vElement.setAttribute("file",vFile);
+
+				vModel.addObject(vElement);
+			]]></xface:param>
+		</xprocess:script>
+		<xprocess:hide object="../.." />
+	</xface:action>
+
+</xface:window>

src/editor/xwork-editor/includes/deleteinclude.xfm.xml

+<xface:dialog
+	xmlns:xface="http://www.xesoft.com/xmlns/xface"
+	xmlns:xprocess="http://www.xesoft.com/xmlns/xprocess"
+	id="delete_include"
+	type="question">
+
+
+	<!-- Show the dialog when delete package button is pressed -->
+	<xface:selected-list-delete-adapter element="../../table" event="OK" />
+
+	<!-- Show the dialog when delete package button is pressed -->
+	<xface:show-adapter element="../../toolbar/delete_include" event="ACTION" />
+
+</xface:dialog>

src/editor/xwork-editor/includes/includes.xfm.xml

+<xface:window
+	xmlns:xface="http://www.xesoft.com/xmlns/xface"
+	xmlns:xprocess="http://www.xesoft.com/xmlns/xprocess"
+	id="includes"
+	width="400"
+	height="500"
+	location="center_on_screen"
+	modal="application"
+	resizable="false">
+
+
+	<xface:relative-layout constraints="/xwork-editor/xwork-panel-right2.layout.xml"/>
+
+	<xface:toolbar id="toolbar">
+		<xface:toolbar-button id="create_include" image="xwork-editor/images/add_include.gif"/>
+		<xface:toolbar-button id="delete_include" image="xwork-editor/images/delete.gif">
+			<xface:selected-list-enabled-adapter element="../../../table" selection="both"/>
+		</xface:toolbar-button>
+	</xface:toolbar>
+
+	<xface:table id="table">
+		<xface:xml-tablemodel id="model" xpath="include"/>
+		<xface:column id="file" property="@file"/>
+	</xface:table>
+
+	<!-- Show the window when add_package button is pressed -->
+	<xface:show-adapter element="../../split/left/toolbar/edit_includes" event="ACTION" />
+
+	<!--
+		Panel Includes
+   -->
+	<xface:include src="createinclude.xfm.xml" />
+	<xface:include src="deleteinclude.xfm.xml" />
+
+</xface:window>

src/editor/xwork-editor/interceptor/createinterceptor.xfm.xml

+<xface:window
+	xmlns:xface="http://www.xesoft.com/xmlns/xface"
+	xmlns:xprocess="http://www.xesoft.com/xmlns/xprocess"
+	id="createinterceptor"
+	label="create_interceptor"
+	width="400"
+	height="200"
+	location="center_on_screen"
+	modal="application"
+	resizable="false">
+
+	<xface:relative-layout constraints="/xwork-editor/edit.layout.xml" />
+
+	<xface:label id="label_message" label="create_interceptor_message" />
+
+	<xface:panel id="inputs">
+		<xface:input-panel-layout />
+
+		<xface:label id="label_name" label="name" />
+		<xface:text-input id="name" />
+
+		<xface:label id="label_class" label="class" />
+		<xface:text-input id="class" />
+
+	</xface:panel>
+
+	<xface:button id="ok" label="ok" />
+	<xface:button id="cancel" label="cancel" />
+
+	<!-- Hide the window when cancel is pressed -->
+	<xface:hide-adapter element="../cancel" event="ACTION" />
+
+	<!-- Show the window when add_package button is pressed -->
+	<xface:show-adapter element="../../split/left/toolbar/create_interceptor" event="ACTION" />
+
+	<!-- Clear the inputs when the window is shown -->
+	<xface:action>
+		<xface:action-adapter element="../.." event="SHOW" />
+		<xprocess:script>
+			<xface:param id="script"><![CDATA[
+				parent.findElement("../inputs/name").setValue("");
+			]]></xface:param>
+		</xprocess:script>
+	</xface:action>
+
+	<!-- Create the package when the OK button is pressed -->
+	<xface:action>
+		<xface:action-adapter element="../../ok" event="ACTION" />
+		<xprocess:script>
+			<xface:param id="script"><![CDATA[
+				var vName = parent.findElement("../inputs/name").getValue();
+				var vClass = parent.findElement("../inputs/class").getValue();
+				var vModel = parent.findElement("../../split/left/table/model");
+				var vRoot = vModel.getData();
+				var vDocument = null;
+
+				/* In some cases the interceptors node will not exist, so we may need to create it */
+				if (vRoot == null)
+				{
+					var vPackagesTable = parent.findElement("../../../../../left/table");
+					var vPackagesModel = vPackagesTable.getModel();
+					var vPackageRoot = vPackagesModel.getObject(vPackagesTable.getSelectedRow());
+					vDocument = vPackageRoot.getOwnerDocument();
+					vRoot = vDocument.createElement("interceptors");
+					vPackageRoot.appendChild(vRoot);
+					vModel.setData(vRoot);
+				}
+				else
+				{
+					vDocument = vRoot.getOwnerDocument();
+				}
+
+				/* First check to see that a real package name was entered */
+				if (vName.trim().length() == 0)
+				{
+					throw "A valid name was not entered";
+				}
+
+				/* First check to see that a real package name was entered */
+				if (vClass.trim().length() == 0)
+				{
+					throw "A valid class name was not entered";
+				}
+
+				/* Second check to see if the interceptor (or interceptor stack) exists */
+				var vExistingElement = Packages.com.xe.xface.xml.XPathGetter.getElement(vRoot,"interceptor[@name='"+vName+"']");
+				if (vExistingElement != null)
+				{
+					throw "A interceptor with the name '"+vName+"' already exists";
+				}
+
+				vExistingElement = Packages.com.xe.xface.xml.XPathGetter.getElement(vRoot,"interceptor-stack[@name='"+vName+"']");
+				if (vExistingElement != null)
+				{
+					throw "A interceptor stack with the name '"+vName+"' already exists";
+				}
+
+				/* Now, create the element and add it to the model */
+				var vElement = vDocument.createElement("interceptor");
+				vElement.setAttribute("name",vName);
+				vElement.setAttribute("class",vClass);
+				vModel.addObject(vElement);
+			]]></xface:param>
+		</xprocess:script>
+		<xprocess:hide object="../.." />
+	</xface:action>
+
+</xface:window>

src/editor/xwork-editor/interceptor/deleteinterceptor.xfm.xml

+<xface:dialog
+	xmlns:xface="http://www.xesoft.com/xmlns/xface"
+	xmlns:xprocess="http://www.xesoft.com/xmlns/xprocess"
+	id="delete_interceptor"
+	type="question">
+
+
+	<!-- Show the dialog when delete package button is pressed -->
+	<xface:selected-list-delete-adapter element="../../split/left/table" event="OK" />
+
+	<!-- Show the dialog when delete package button is pressed -->
+	<xface:show-adapter element="../../split/left/toolbar/delete_interceptor" event="ACTION" />
+
+</xface:dialog>

src/editor/xwork-editor/interceptor/interceptortab.xfm.xml

+<xface:tab
+	xmlns:xface="http://www.xesoft.com/xmlns/xface"
+	xmlns:xprocess="http://www.xesoft.com/xmlns/xprocess"
+	id="interceptors">
+
+	<xface:split-panel id="split" weight="30">
+		<xface:panel id="left">
+
+			<xface:relative-layout constraints="/xwork-editor/xwork-panel-right2.layout.xml"/>
+
+			<xface:toolbar id="toolbar">
+				<xface:toolbar-button id="create_interceptor" image="xwork-editor/images/add_interceptor.gif"/>
+				<xface:toolbar-button id="delete_interceptor" image="xwork-editor/images/delete.gif">
+					<xface:selected-list-enabled-adapter element="../../../table" selection="both"/>
+				</xface:toolbar-button>
+			</xface:toolbar>
+
+			<xface:table id="table">
+				<xface:xml-tablemodel id="model" xpath="interceptor"/>
+				<xface:column id="name" property="@name"/>
+			</xface:table>
+
+		</xface:panel>
+		<xface:panel id="right">
+
+			<xface:xml-datamodel id="model">
+				<xface:adapter modelProperty="@name" element="../../header/name" elementProperty="value"/>
+				<xface:adapter modelProperty="@class" element="../../header/class" elementProperty="value"/>
+
+				<xface:adapter element="../../tabpanel/params/table/model" elementProperty="data"/>
+				<xface:selected-table-item-adapter element="../../../left/table"/>
+			</xface:xml-datamodel>
+
+			<xface:selected-list-enabled-adapter element="../../left/table" selection="both"/>
+
+			<xface:relative-layout constraints="/xwork-editor/xwork-panel-right3.layout.xml"/>
+
+			<xface:panel id="header">
+
+				<xface:input-panel-layout/>
+
+				<xface:label id="label_name" label="name"/>
+				<xface:text-input id="name" editable="false"/>
+				<xface:label id="label_class" label="class"/>
+				<xface:text-input id="class" editable="false"/>
+			</xface:panel>
+
+			<xface:tab-panel id="tabpanel">
+				<xface:include src="/xwork-editor/parameter/parametertab.xfm.xml" />
+				<xface:tab id="usages">
+
+					<xface:inset-layout constraints="list,5,5,5,5" />
+
+					<xface:list id="list">
+						<xface:xml-tablemodel id="model" xpath="xxxxxxx" />
+						<xface:column id="name" property="@name">
+							<xface:script-decision id="imageDecision">
+								<xface:param id="script"><![CDATA[
+									function chooseParameterImage(aObject)
+									{
+										var vName = aObject.getLocalName();
+
+										if (vName.equals("interceptor-stack"))
+										{
+											return "xwork-editor/images/interceptor_stack.gif";
+										}
+										else if (vName.equals("action"))
+										{
+											return "xwork-editor/images/action.gif";
+										}
+
+										return null;
+									}
+
+									chooseParameterImage(object);
+							]]></xface:param>
+							</xface:script-decision>
+						</xface:column>
+					</xface:list>
+
+					<xface:action>
+						<xface:action-adapter element="../../../../model" event="MODEL_DATA_UPDATED"/>
+						<xface:action-adapter element="../.." event="SHOW" />
+						<xprocess:script>
+							<xface:param id="script"><![CDATA[
+								var vName = parent.findElement("../../../header/name").getValue();
+								var vPackageModel = parent.findElement("../../../../../../../model");
+								var vPackageRoot = vPackageModel.getData();
+
+								var vModel = parent.findElement("../list/model");
+								vModel.setData(vPackageRoot);
+
+								var vXPath = "descendant::node()/interceptor-ref[@name='"+vName+"']/parent::*"
+
+								vModel.setXpath(vXPath);
+							]]></xface:param>
+						</xprocess:script>
+					</xface:action>
+
+				</xface:tab>
+			</xface:tab-panel>
+
+		</xface:panel>
+
+	</xface:split-panel>
+
+	<!--
+		Panel Includes
+   -->
+	<xface:include src="createinterceptor.xfm.xml" />
+	<xface:include src="deleteinterceptor.xfm.xml" />
+
+</xface:tab>

src/editor/xwork-editor/license/license.layout.xml

+<?xml version="1.0"?>
+<constraint-set>
+
+	<constrain name="header">
+		<left>
+			<toAttribute reference="_container" attribute="left" offset="0" />
+		</left>
+		<right>
+			<toAttribute reference="_container" attribute="right" offset="0" />
+		</right>
+		<top>
+			<toAttribute reference="_container" attribute="top" offset="0" />
+		</top>
+		<bottom>
+			<toAttribute reference="_container" attribute="top" offset="80" />
+		</bottom>
+	</constrain>
+
+	<constrain name="license">
+		<left>
+			<toAttribute reference="_container" attribute="left" offset="10" />
+		</left>
+		<top>
+			<toAttribute reference="header" attribute="bottom" offset="10" />
+		</top>
+		<right>
+			<toAttribute reference="_container" attribute="right" offset="-10" />
+		</right>
+		<bottom>
+			<toAttribute reference="accept" attribute="top" offset="-10" />
+		</bottom>
+	</constrain>
+
+	<constrain name="accept">
+		<left>
+			<toAttribute reference="_container" attribute="left" offset="10" />
+		</left>
+		<bottom>
+			<toAttribute reference="deny" attribute="top" offset="-5" />
+		</bottom>
+	</constrain>
+
+	<constrain name="deny">
+		<left>
+			<toAttribute reference="_container" attribute="left" offset="10" />
+		</left>
+		<bottom>
+			<toAttribute reference="ok" attribute="top" offset="-10" />
+		</bottom>
+	</constrain>
+
+	<constrain name="ok">
+		<top>
+			<toAttribute reference="_container" attribute="bottom" offset="-34" />
+		</top>
+		<right>
+			<toAttribute reference="cancel" attribute="left" offset="-10" />
+		</right>
+		<bottom>
+			<toAttribute reference="_container" attribute="bottom" offset="-10" />
+		</bottom>
+		<left>
+			<toAttribute reference="cancel" attribute="left" offset="-85" />
+		</left>
+	</constrain>
+
+	<constrain name="cancel">
+		<top>
+			<toAttribute reference="_container" attribute="bottom" offset="-34" />
+		</top>
+		<left>
+			<toAttribute reference="_container" attribute="right" offset="-85" />
+		</left>
+		<right>
+			<toAttribute reference="_container" attribute="right" offset="-10" />
+		</right>
+		<bottom>
+			<toAttribute reference="_container" attribute="bottom" offset="-10" />
+		</bottom>
+	</constrain>
+
+</constraint-set>

src/editor/xwork-editor/license/license.properties

+license=XWork Editor License Agreement
+header=License Agreement
+header.message=Please read the following license agreement carefully.
+accept=I accept the terms in the license agreement.
+deny=I do not accept the terms in the license agreement.
+ok=OK
+cancel=Cancel

src/editor/xwork-editor/license/license.txt

+XWork Editor Binary Software License Agreement
+Copyright 2003 Jon Lipsky.  All rights reserved.
+
+------------------------------------------------------------
+
+This software is provided 'as-is', without any express or
+implied warranty.  In no event will Jon Lipsky be held
+liable for any damages arising from the use of this
+software.
+
+Permission is granted to anyone to use this software, to
+copy it and redistibute it freely, subject to the following
+restrictions:
+
+1) The origin of this software must not be misrepresented;
+   you must not claim that you wrote the software.
+
+2) You may not modify or create derivative works of this
+   software, or reverse engineer, or decompile binary
+   portions of it, or otherwise attempt to derive the source
+   code from such portions.
+
+3) You may not sell, rent, loan or otherwise encumber this
+   software in whole or in part, to any third party.
+
+4) This notice may not be removed or altered from
+   redistributions.

src/editor/xwork-editor/license/license.xfm.xml

+<xface:window
+	xmlns:xface="http://www.xesoft.com/xmlns/xface"
+	xmlns:xprocess="http://www.xesoft.com/xmlns/xprocess"
+	id="license"
+	bundle="xwork-editor/license/license"
+	width="600"
+	height="500"
+	location="center_on_screen"
+	modal="application"
+	resizable="false">
+
+	<xface:relative-layout constraints="license.layout.xml" />
+
+	<xface:header-panel id="header" />
+
+	<xface:text-area id="license" editable="false" fontFace="Courier" fontSize="12" fontStyle="PLAIN">
+		<xface:resource-dataloader path="license.txt" />
+	</xface:text-area>
+
+	<xface:button-group id="group"/>
+	<xface:radio-button id="accept" group="../group" />
+	<xface:radio-button id="deny" group="../group" selected="true" />
+
+	<xface:button id="ok" label="ok" enabled="false" />
+	<xface:button id="cancel" label="cancel" />
+
+	<!-- Exit the application when cancel is pressed -->
+	<xface:action>
+		<xface:action-adapter element="../../cancel" event="ACTION" />
+		<xprocess:exit />
+	</xface:action>
+
+	<!-- Create the package when the OK button is pressed -->
+	<xface:action>
+		<xface:action-adapter element="../../ok" event="ACTION" />
+		<xprocess:script>
+			<xface:param id="script"><![CDATA[
+				preferences.putBoolean("xwork-editor/accept_license",true);
+			]]></xface:param>
+		</xprocess:script>
+		<xprocess:hide object="../.." />
+	</xface:action>
+
+	<xface:action>
+		<xface:action-adapter element="../../accept" event="ACTION" />
+		<xface:action-adapter element="../../deny" event="ACTION" />
+		<xprocess:script>
+			<xface:param id="script"><![CDATA[
+				if (parent.findElement("../accept").isSelected())
+				{
+					parent.findElement("../ok").setEnabled(true);
+				}
+				else
+				{
+					parent.findElement("../ok").setEnabled(false);
+				}
+			]]></xface:param>
+		</xprocess:script>
+	</xface:action>
+
+</xface:window>

src/editor/xwork-editor/package/createpackage.xfm.xml

+<xface:window
+	xmlns:xface="http://www.xesoft.com/xmlns/xface"
+	xmlns:xprocess="http://www.xesoft.com/xmlns/xprocess"
+	id="createpackage"
+	label="create_package"
+	width="400"
+	height="200"
+	location="center_on_screen"
+	modal="application"
+	resizable="false">
+
+	<xface:relative-layout constraints="/xwork-editor/edit.layout.xml" />
+
+	<xface:label id="label_message" label="create_package_message" />
+
+	<xface:panel id="inputs">
+		<xface:input-panel-layout />
+
+		<xface:label id="package_name" />
+		<xface:text-input id="package" />
+
+		<xface:label id="label_extends" label="extends" />
+		<xface:text-input id="extends" />
+
+	</xface:panel>
+
+	<xface:button id="ok" label="ok" />
+	<xface:button id="cancel" label="cancel" />
+
+	<!-- Hide the window when cancel is pressed -->
+	<xface:hide-adapter element="../cancel" event="ACTION" />
+
+	<!-- Show the window when add_package button is pressed -->
+	<xface:show-adapter element="../../split/left/toolbar/create_package" event="ACTION" />
+
+	<!-- Clear the inputs when the window is shown -->
+	<xface:action>
+		<xface:action-adapter element="../.." event="SHOW" />
+		<xprocess:script>
+			<xface:param id="script"><![CDATA[
+				parent.findElement("../inputs/package").setValue("");
+				parent.findElement("../inputs/extends").setValue("");
+			]]></xface:param>
+		</xprocess:script>
+	</xface:action>
+
+	<!-- Create the package when the OK button is pressed -->
+	<xface:action>
+		<xface:action-adapter element="../../ok" event="ACTION" />
+		<xprocess:script>
+			<xface:param id="script"><![CDATA[
+				var vPackage = parent.findElement("../inputs/package").getValue();
+				var vExtends = parent.findElement("../inputs/extends").getValue();
+				var vModel = parent.findElement("../../split/left/table/model");
+				var vRoot = vModel.getData();
+				var vDocument = vRoot.getOwnerDocument();
+
+				/* First check to see that a real package name was entered */
+				if (vPackage.trim().length() == 0)
+				{
+					throw "A valid package name was not entered";
+				}
+
+				/* Second check to see if the package exists */
+				var vExistingElement = Packages.com.xe.xface.xml.XPathGetter.getElement(vRoot,"package[@name='"+vPackage+"']");
+				if (vExistingElement != null)
+				{
+					throw "A package with the name '"+vPackage+"' already exists";
+				}
+
+				/* Now, create the element and add it to the model */
+				var vElement = vDocument.createElement("package");
+				vElement.setAttribute("name",vPackage);
+
+				if (vExtends.trim().length() > 0)
+				{
+					vElement.setAttribute("extends",vExtends);
+				}
+
+				vModel.addObject(vElement);
+			]]></xface:param>
+		</xprocess:script>
+		<xprocess:hide object="../.." />
+	</xface:action>
+
+</xface:window>

src/editor/xwork-editor/package/deletepackage.xfm.xml

+<xface:dialog
+	xmlns:xface="http://www.xesoft.com/xmlns/xface"
+	xmlns:xprocess="http://www.xesoft.com/xmlns/xprocess"
+	id="delete_package"
+	type="question">
+
+
+	<!-- Show the dialog when delete package button is pressed -->
+	<xface:selected-list-delete-adapter element="../../split/left/table" event="OK" />
+
+	<!-- Show the dialog when delete package button is pressed -->
+	<xface:show-adapter element="../../split/left/toolbar/delete_package" event="ACTION" />
+
+</xface:dialog>

src/editor/xwork-editor/parameter/createparameter.xfm.xml

+<xface:window
+	xmlns:xface="http://www.xesoft.com/xmlns/xface"
+	xmlns:xprocess="http://www.xesoft.com/xmlns/xprocess"
+	id="create_param"
+	width="400"
+	height="200"
+	location="center_on_screen"
+	modal="application"
+	resizable="false">
+
+	<xface:relative-layout constraints="/xwork-editor/edit.layout.xml" />
+
+	<xface:label id="label_message" label="create_param_message" />
+
+	<xface:panel id="inputs">
+		<xface:input-panel-layout />
+
+		<xface:label id="label_name" label="name" />
+		<xface:text-input id="name" />
+
+		<xface:label id="label_value" label="value" />
+		<xface:text-input id="value" />
+
+	</xface:panel>
+
+	<xface:button id="ok" label="ok" />
+	<xface:button id="cancel" label="cancel" />
+
+	<!-- Hide the window when cancel is pressed -->
+	<xface:hide-adapter element="../cancel" event="ACTION" />
+
+	<!-- Show the window when add_package button is pressed -->
+	<xface:show-adapter element="../../toolbar/create_param" event="ACTION" />
+
+	<!-- Clear the inputs when the window is shown -->
+	<xface:action>
+		<xface:action-adapter element="../.." event="SHOW" />
+		<xprocess:script>
+			<xface:param id="script"><![CDATA[
+				parent.findElement("../inputs/name").setValue("");
+				parent.findElement("../inputs/value").setValue("");
+			]]></xface:param>
+		</xprocess:script>
+	</xface:action>
+
+	<!-- Create the package when the OK button is pressed -->
+	<xface:action>
+		<xface:action-adapter element="../../ok" event="ACTION" />
+		<xprocess:script>
+			<xface:param id="script"><![CDATA[
+				var vName = parent.findElement("../inputs/name").getValue();
+				var vValue = parent.findElement("../inputs/value").getValue();
+				var vModel = parent.findElement("../../table/model");
+				var vRoot = vModel.getData();
+				var vDocument = vRoot.getOwnerDocument();
+
+				/* First check to see that a real parameter name was entered */
+				if (vName.trim().length() == 0)
+				{
+					throw "A valid name was not entered";
+				}
+
+				/* Second check to see if the interceptor (or interceptor stack) exists */
+				var vExistingElement = Packages.com.xe.xface.xml.XPathGetter.getElement(vRoot,"param[@name='"+vName+"']");
+				if (vExistingElement != null)
+				{
+					throw "A parameter with the name '"+vName+"' already exists";
+				}
+
+				/* Now, create the element and add it to the model */
+				var vElement = vDocument.createElement("param");
+				vElement.setAttribute("name",vName);
+				var vTextNode = vDocument.createTextNode(vValue);
+				vElement.appendChild(vTextNode);
+				vModel.addObject(vElement);
+			]]></xface:param>
+		</xprocess:script>
+		<xprocess:hide object="../.." />
+	</xface:action>
+
+</xface:window>

src/editor/xwork-editor/parameter/deleteparameter.xfm.xml

+<xface:dialog
+	xmlns:xface="http://www.xesoft.com/xmlns/xface"
+	xmlns:xprocess="http://www.xesoft.com/xmlns/xprocess"
+	id="delete_param"
+	type="question">
+
+
+	<!-- Show the dialog when delete package button is pressed -->
+	<xface:selected-list-delete-adapter element="../../table" event="OK" />
+
+	<!-- Show the dialog when delete package button is pressed -->
+	<xface:show-adapter element="../../toolbar/delete_param" event="ACTION" />
+
+</xface:dialog>

src/editor/xwork-editor/parameter/editparameter.xfm.xml

+<xface:window
+	xmlns:xface="http://www.xesoft.com/xmlns/xface"
+	xmlns:xprocess="http://www.xesoft.com/xmlns/xprocess"
+	id="edit_param"
+	width="400"
+	height="200"
+	location="center_on_screen"
+	modal="application"
+	resizable="false">
+
+	<xface:relative-layout constraints="/xwork-editor/edit.layout.xml" />
+
+	<xface:label id="label_message" label="edit_param_message" />
+
+	<xface:panel id="inputs">
+		<xface:input-panel-layout />
+
+		<xface:label id="label_name" label="name" />
+		<xface:text-input id="name" />
+
+		<xface:label id="label_value" label="value" />
+		<xface:text-input id="value" />
+
+	</xface:panel>
+
+	<xface:button id="ok" label="ok" />
+	<xface:button id="cancel" label="cancel" />
+
+	<!-- Hide the window when cancel is pressed -->
+	<xface:hide-adapter element="../cancel" event="ACTION" />
+
+	<!-- Show the window when add_package button is pressed -->
+	<xface:show-adapter element="../../table" event="DOUBLE_CLICK" />
+
+	<!-- Clear the inputs when the window is shown -->
+	<xface:action>
+		<xface:action-adapter element="../.." event="SHOW" />
+		<xprocess:script>
+			<xface:param id="script"><![CDATA[
+				var vTable = parent.findElement("../../table");
+				var vModel = vTable.getModel();
+				var vSelectedRow = vTable.getSelectedRow();
+				var vName = vModel.getPropertyAsString(vSelectedRow,"@name");
+				var vValue = vModel.getPropertyAsString(vSelectedRow,"text()");
+				parent.findElement("../inputs/name").setValue(vName);
+				parent.findElement("../inputs/value").setValue(vValue);
+			]]></xface:param>
+		</xprocess:script>
+	</xface:action>
+
+	<!-- Create the package when the OK button is pressed -->
+	<xface:action>
+		<xface:action-adapter element="../../ok" event="ACTION" />
+		<xprocess:script>
+			<xface:param id="script"><![CDATA[
+				var vTable = parent.findElement("../../table");
+				var vModel = vTable.getModel();
+				var vSelectedRow = vTable.getSelectedRow();
+				var vOriginalName = vModel.getPropertyAsString(vSelectedRow,"@name");
+				var vOriginalValue = vModel.getPropertyAsString(vSelectedRow,"text()");
+
+				var vName = parent.findElement("../inputs/name").getValue();
+				var vValue = parent.findElement("../inputs/value").getValue();
+
+				var vRoot = vModel.getData();
+				var vDocument = vRoot.getOwnerDocument();
+				var vElement = vModel.getObject(vSelectedRow);
+
+				/* First check to see that a real parameter name was entered */
+				if (vName.trim().length() == 0)
+				{
+					throw "A valid name was not entered";
+				}
+
+				/* Second check to see if the parameter name exists */
+				if (!vOriginalName.equals(vName))
+				{
+					var vExistingElement = Packages.com.xe.xface.xml.XPathGetter.getElement(vRoot,"param[@name='"+vName+"']");
+					if (vExistingElement != null)
+					{
+						throw "A parameter with the name '"+vName+"' already exists";
+					}
+
+					/* Change the name of the param */
+					vModel.setProperty(vSelectedRow,"@name",vName);
+				}
+
+				/* Set the value */
+				vModel.setProperty(vSelectedRow,"text()",vValue);
+			]]></xface:param>
+		</xprocess:script>
+		<xprocess:hide object="../.." />
+	</xface:action>
+
+</xface:window>

src/editor/xwork-editor/parameter/parametertab.xfm.xml

+<xface:tab
+	xmlns:xface="http://www.xesoft.com/xmlns/xface"
+	xmlns:xprocess="http://www.xesoft.com/xmlns/xprocess"
+	id="params">
+	<xface:relative-layout constraints="/xwork-editor/xwork-panel-right2.layout.xml"/>
+
+	<xface:toolbar id="toolbar">
+		<xface:toolbar-button id="create_param" image="xwork-editor/images/add_param.gif"/>
+		<xface:toolbar-button id="delete_param" image="xwork-editor/images/delete.gif">
+			<xface:selected-list-enabled-adapter element="../../../table" selection="both"/>
+		</xface:toolbar-button>
+	</xface:toolbar>
+
+	<xface:table id="table">
+		<xface:xml-tablemodel id="model" xpath="param"/>
+		<xface:column id="name" property="@name"/>
+		<xface:column id="value" property="text()"/>
+	</xface:table>
+
+	<!--
+		Panel Includes
+   -->
+	<xface:include src="editparameter.xfm.xml" />	
+	<xface:include src="createparameter.xfm.xml" />
+	<xface:include src="deleteparameter.xfm.xml" />
+
+</xface:tab>

src/editor/xwork-editor/resulttypes/createresulttype.xfm.xml

+<xface:window
+	xmlns:xface="http://www.xesoft.com/xmlns/xface"
+	xmlns:xprocess="http://www.xesoft.com/xmlns/xprocess"
+	id="create_result_type"
+	width="400"
+	height="200"
+	location="center_on_screen"
+	modal="application"
+	resizable="false">
+
+	<xface:relative-layout constraints="/xwork-editor/edit.layout.xml" />
+
+	<xface:label id="label_message" label="create_result_type_message" />
+
+	<xface:panel id="inputs">
+		<xface:input-panel-layout />
+
+		<xface:label id="label_name" label="name" />
+		<xface:text-input id="name" />
+
+		<xface:label id="label_class" label="class" />
+		<xface:text-input id="class" />
+
+	</xface:panel>
+
+	<xface:button id="ok" label="ok" />
+	<xface:button id="cancel" label="cancel" />
+
+	<!-- Hide the window when cancel is pressed -->
+	<xface:hide-adapter element="../cancel" event="ACTION" />
+
+	<!-- Show the window when add_package button is pressed -->
+	<xface:show-adapter element="../../toolbar/create_result_type" event="ACTION" />
+
+	<!-- Clear the inputs when the window is shown -->
+	<xface:action>
+		<xface:action-adapter element="../.." event="SHOW" />
+		<xprocess:script>
+			<xface:param id="script"><![CDATA[
+				parent.findElement("../inputs/name").setValue("");
+				parent.findElement("../inputs/class").setValue("");
+			]]></xface:param>
+		</xprocess:script>
+	</xface:action>
+
+	<!-- Create the package when the OK button is pressed -->
+	<xface:action>
+		<xface:action-adapter element="../../ok" event="ACTION" />
+		<xprocess:script>
+			<xface:param id="script"><![CDATA[