geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From de...@apache.org
Subject svn commit: r952535 [25/26] - in /geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins: org.apache.geronimo.j2ee.v11.jaxbmodel/ org.apache.geronimo.j2ee.v11.jaxbmodel/META-INF/ org.apache.geronimo.j2ee.v11.jaxbmodel/src/main/java/org/apache/geronimo...
Date Tue, 08 Jun 2010 04:40:28 GMT
Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/AbstractGeronimoDeploymentPlanEditor.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/AbstractGeronimoDeploymentPlanEditor.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/AbstractGeronimoDeploymentPlanEditor.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/AbstractGeronimoDeploymentPlanEditor.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,272 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v21.ui.editors;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+
+import org.apache.geronimo.st.v21.core.operations.ImportDeploymentPlanDataModelProvider;
+import org.apache.geronimo.st.v21.core.operations.ImportDeploymentPlanOperation;
+import org.apache.geronimo.st.ui.internal.Messages;
+import org.apache.geronimo.st.ui.internal.Trace;
+import org.apache.geronimo.st.v21.ui.pages.AbstractGeronimoFormPage;
+import org.apache.geronimo.st.v21.ui.pages.DeploymentPlanSourcePage;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.editor.IFormPage;
+import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
+import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetProjectCreationDataModelProperties;
+import org.eclipse.wst.common.frameworks.datamodel.DataModelFactory;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
+import org.eclipse.wst.common.frameworks.datamodel.IDataModelOperation;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+
+/**
+ * @version $Rev: 819870 $ $Date: 2009-09-29 17:44:09 +0800 (Tue, 29 Sep 2009) $
+ */
+public abstract class AbstractGeronimoDeploymentPlanEditor extends FormEditor {
+
+    protected JAXBElement deploymentPlan;
+
+    public AbstractGeronimoDeploymentPlanEditor() {
+        super();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.part.EditorPart#doSave(org.eclipse.core.runtime.IProgressMonitor)
+     */
+    public void doSave(IProgressMonitor monitor) {
+        InputStream is = null;
+        try {
+            IEditorInput input = getEditorInput();
+            if (input instanceof IFileEditorInput) {
+                IFileEditorInput fei = (IFileEditorInput) input;
+                if (deploymentPlan != null) {
+                    saveDeploymentPlan(fei.getFile());
+                    commitFormPages(true);
+                }
+
+                if (getActiveEditor() == null) {
+                    editorDirtyStateChanged();
+                } else {
+                    getActiveEditor().doSave(monitor);
+                    if (deploymentPlan != null) {
+//                        if (deploymentPlan.eResource() != null) {
+//                            deploymentPlan.eResource().unload();
+//                        }
+                        // TODO not sure if this is the best way to refresh
+                        // model
+                        deploymentPlan = loadDeploymentPlan(fei.getFile());
+                    }
+                }
+            }
+        } catch (Exception e) {
+            Trace.trace(Trace.SEVERE, "Error saving", e);
+            MessageDialog.openError(Display.getCurrent().getActiveShell(), "Error saving", e.getMessage());
+        } finally {
+            try {
+                if (is != null)
+                    is.close();
+            } catch (Exception e) {
+            	Trace.trace(Trace.SEVERE, "Error saving", e);
+            	MessageDialog.openError(Display.getCurrent().getActiveShell(), "Error saving", e.getMessage());
+            }
+        }
+    }
+
+//    private void saveEditors(IFile file) throws IOException, JAXBException {
+//        JAXBContext jb = JAXBContext.newInstance( "org.apache.geronimo.xml.ns.j2ee.web_2_0:org.apache.geronimo.xml.ns.j2ee.application_2:org.apache.geronimo.xml.ns.deployment_1:org.apache.geronimo.xml.ns.naming_1", Activator.class.getClassLoader() );
+//        jb.createMarshaller().marshal( deploymentPlan, new File( file.getLocationURI().toURL().getFile()) );
+//        commitFormPages(true);
+//    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.forms.editor.FormEditor#addPages()
+     */
+    protected void addPages() {
+        try {
+            doAddPages();
+        } catch (PartInitException e1) {
+            e1.printStackTrace();
+        }
+    }
+
+    abstract public void doAddPages() throws PartInitException;
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.part.EditorPart#doSaveAs()
+     */
+    public final void doSaveAs() {
+        // do nothing
+    }
+
+    protected void addSourcePage() throws PartInitException {
+        DeploymentPlanSourcePage source = new DeploymentPlanSourcePage(this);
+        int index = addPage(source, getEditorInput());
+        setPageText(index, Messages.editorTabSource);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.part.EditorPart#isSaveAsAllowed()
+     */
+    public boolean isSaveAsAllowed() {
+        return false;
+    }
+
+    public void commitFormPages(boolean onSave) {
+        IFormPage[] pages = getPages();
+        for (int i = 0; i < pages.length; i++) {
+            IFormPage page = pages[i];
+            IManagedForm mform = page.getManagedForm();
+            if (mform != null && mform.isDirty())
+                mform.commit(true);
+        }
+    }
+
+    public IFormPage[] getPages() {
+        ArrayList formPages = new ArrayList();
+        for (int i = 0; i < pages.size(); i++) {
+            Object page = pages.get(i);
+            if (page instanceof IFormPage)
+                formPages.add(page);
+        }
+        return (IFormPage[]) formPages.toArray(new IFormPage[formPages.size()]);
+    }
+
+    public JAXBElement getDeploymentPlan() {
+        return deploymentPlan;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.IEditorPart#init(org.eclipse.ui.IEditorSite,
+     *      org.eclipse.ui.IEditorInput)
+     */
+    public void init(IEditorSite site, IEditorInput input) throws PartInitException {
+        super.init(site, input);
+        if (input instanceof IFileEditorInput) {
+            IFileEditorInput fei = (IFileEditorInput) input;
+            try {
+				deploymentPlan = loadDeploymentPlan(fei.getFile());
+			} catch (Exception e1) {
+				// throw new PartInitException("Error in loading deployment plan");
+				// if catching an exception , it will try to correct the plan 
+				// or open the plan with default editor
+				e1.printStackTrace();
+			}
+            
+            boolean fix = false;
+            if(deploymentPlan == null) {
+                fix = MessageDialog.openQuestion(Display.getDefault().getActiveShell(), Messages.errorOpenDialog, Messages.editorCorrect);
+            }
+            
+            if(fix) {
+                IProject project = fei.getFile().getProject();
+                IDataModel model = DataModelFactory.createDataModel(new ImportDeploymentPlanDataModelProvider());
+                model.setProperty(IFacetDataModelProperties.FACET_PROJECT_NAME, project.getName());
+                try {
+                    IFacetedProject facetedProject = ProjectFacetsManager.create(project);
+                    model.setProperty(IFacetProjectCreationDataModelProperties.FACET_RUNTIME, facetedProject.getPrimaryRuntime());
+                    IDataModelOperation op = new ImportDeploymentPlanOperation(model);
+                    op.execute(new NullProgressMonitor(), null);
+                } catch (Exception e) {
+                   throw new PartInitException(e.getMessage());
+                }
+                
+                try {
+					deploymentPlan = loadDeploymentPlan(fei.getFile());
+				} catch (Exception e) {
+					throw new PartInitException("Error in loading deployment plan");
+				}
+                
+                if (deploymentPlan == null) {    
+                    MessageDialog.openInformation(Display.getDefault().getActiveShell(), Messages.errorOpenDialog, Messages.editorDefault);
+                }
+            }
+        }
+    }
+
+    public void reloadDeploymentPlan() throws Exception {
+        IEditorInput input = getEditorInput();
+        if (input instanceof IFileEditorInput) {
+            IFileEditorInput fei = (IFileEditorInput) input;
+            if (deploymentPlan != null) {
+                deploymentPlan = loadDeploymentPlan(fei.getFile());
+                IFormPage[] pages = getPages();
+                for (int i = 0; i < pages.length; i++) {
+                    IFormPage page = pages[i];
+                    IManagedForm mform = page.getManagedForm();
+                    if (mform != null) {
+                        if (page instanceof AbstractGeronimoFormPage) {
+                            AbstractGeronimoFormPage geronimoPage = (AbstractGeronimoFormPage)page;
+                            geronimoPage.refresh();
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    @Override
+    protected void pageChange(int newPageIndex) {
+        if (isDirty()) {
+            IFormPage[] pages = getPages();
+            IFormPage active = getActivePageInstance();
+            int curr = getCurrentPage();
+            if (getCurrentPage() == newPageIndex) {
+                return;
+            }
+            // if the old or the new page are the source page, don't allow the page change 
+            if (newPageIndex == pages.length || getCurrentPage() == pages.length) {
+                setActivePage(curr);
+                MessageDialog.openInformation(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), Messages.savePageTitle, Messages.savePageMessage);
+                return;
+            }
+        }
+        super.pageChange(newPageIndex);
+    }
+
+    abstract public JAXBElement loadDeploymentPlan(IFile file) throws Exception;
+    abstract public void saveDeploymentPlan(IFile file) throws Exception;
+
+}

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/AbstractGeronimoFormContentLoader.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/AbstractGeronimoFormContentLoader.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/AbstractGeronimoFormContentLoader.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/AbstractGeronimoFormContentLoader.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v21.ui.editors;
+
+import java.io.IOException;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+
+import org.apache.geronimo.st.ui.editors.IGeronimoFormContentLoader;
+import org.apache.geronimo.st.v21.core.GeronimoUtils;
+import org.apache.geronimo.st.core.jaxb.JAXBUtils;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.forms.editor.FormEditor;
+
+/**
+ * @version $Rev: 817996 $ $Date: 2009-09-23 16:04:12 +0800 (Wed, 23 Sep 2009) $
+ */
+public abstract class AbstractGeronimoFormContentLoader implements IGeronimoFormContentLoader {
+
+	/* (non-Javadoc)
+	 * @see org.apache.geronimo.st.ui.editors.IGeronimoFormContentLoader#doAddPages(org.eclipse.ui.forms.editor.FormEditor)
+	 */
+	public void doAddPages(FormEditor editor) throws PartInitException{
+        triggerGeronimoServerInfoUpdate();
+		IEditorInput input = editor.getEditorInput();
+		if(input instanceof IFileEditorInput) {
+			String planFileName = ((IFileEditorInput) input).getFile().getName();
+			if(GeronimoUtils.WEB_PLAN_NAME.equals(planFileName)) {
+				addWebPlanPages(editor);
+			} else if(GeronimoUtils.OPENEJB_PLAN_NAME.equals(planFileName)) {
+				addOpenEjbPlanPages(editor);
+			} else if(GeronimoUtils.CONNECTOR_PLAN_NAME.equals(planFileName)) {
+				addConnectorPlanPages(editor);
+			} else if(GeronimoUtils.APP_PLAN_NAME.equals(planFileName)) {
+				addApplicationPlanPages(editor);
+			} else if(GeronimoUtils.APP_CLIENT_PLAN_NAME.equals(planFileName)) {
+				addApplicationClientPlanPages(editor);
+			}
+		}
+	}
+	
+	abstract public void triggerGeronimoServerInfoUpdate() throws PartInitException;
+	
+	abstract public void addWebPlanPages(FormEditor editor) throws PartInitException;
+	
+	abstract public void addOpenEjbPlanPages(FormEditor editor) throws PartInitException;
+	
+	abstract public void addConnectorPlanPages(FormEditor editor) throws PartInitException;
+	
+	abstract public void addApplicationPlanPages(FormEditor editor) throws PartInitException;
+
+	abstract public void addApplicationClientPlanPages(FormEditor editor) throws PartInitException;
+
+	public void saveDeploymentPlan(JAXBElement deploymentPlan, IFile file) throws Exception {
+		JAXBUtils.marshalDeploymentPlan(deploymentPlan, file);
+	}
+
+}

Modified: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/GeronimoFormContentLoader.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/GeronimoFormContentLoader.java?rev=952535&r1=952534&r2=952535&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/GeronimoFormContentLoader.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/GeronimoFormContentLoader.java Tue Jun  8 04:40:16 2010
@@ -23,8 +23,8 @@ import javax.xml.bind.JAXBException;
 
 import org.apache.geronimo.st.core.jaxb.JAXBUtils;
 import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.editors.AbstractGeronimoDeploymentPlanEditor;
-import org.apache.geronimo.st.ui.editors.AbstractGeronimoFormContentLoader;
+import org.apache.geronimo.st.v21.ui.editors.AbstractGeronimoDeploymentPlanEditor;
+import org.apache.geronimo.st.v21.ui.editors.AbstractGeronimoFormContentLoader;
 import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
 import org.apache.geronimo.st.v21.core.GeronimoV21Utils;
 import org.apache.geronimo.st.v21.ui.pages.AppClientGeneralPage;

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/SharedDeploymentPlanEditor.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/SharedDeploymentPlanEditor.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/SharedDeploymentPlanEditor.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/editors/SharedDeploymentPlanEditor.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,140 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v21.ui.editors;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.JAXBException;
+
+import org.apache.geronimo.st.v21.ui.Activator;
+import org.apache.geronimo.st.ui.editors.IGeronimoFormContentLoader;
+import org.apache.geronimo.st.ui.internal.Trace;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jst.server.core.FacetUtil;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.server.core.IRuntime;
+
+/**
+ * @version $Rev: 817996 $ $Date: 2009-09-23 16:04:12 +0800 (Wed, 23 Sep 2009) $
+ */
+public class SharedDeploymentPlanEditor extends AbstractGeronimoDeploymentPlanEditor {
+
+	private static Map loaders = new HashMap();
+
+	private IGeronimoFormContentLoader currentLoader = null;
+
+	static {
+		loadExtensionPoints();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.st.ui.editors.AbstractGeronimoDeploymentPlanEditor#doAddPages()
+	 */
+	public void doAddPages() throws PartInitException {
+        Trace.tracePoint("ENTRY", "SharedDeploymentPlanEditor.doAddPages");
+
+		if (getDeploymentPlan() != null && getLoader() != null) {
+			currentLoader.doAddPages(this);
+		}
+		addSourcePage();
+
+        Trace.tracePoint("EXIT", "SharedDeploymentPlanEditor.doAddPages");
+	}
+
+	private static synchronized void loadExtensionPoints() {
+        Trace.tracePoint("ENTRY", "SharedDeploymentPlanEditor.loadExtensionPoints");
+
+		IExtensionRegistry registry = Platform.getExtensionRegistry();
+		IConfigurationElement[] cf = registry.getConfigurationElementsFor(Activator.PLUGIN_ID, "loader");
+		for (int i = 0; i < cf.length; i++) {
+			IConfigurationElement element = cf[i];
+			if ("loader".equals(element.getName())) {
+				try {
+					IGeronimoFormContentLoader loader = (IGeronimoFormContentLoader) element.createExecutableExtension("class");
+					String version = element.getAttribute("version");
+					loaders.put(version, loader);
+				} catch (CoreException e) {
+                    Trace.tracePoint("CoreException", "SharedDeploymentPlanEditor.loadExtensionPoints");
+					e.printStackTrace();
+				}
+			}
+		}
+
+        Trace.tracePoint("EXIT", "SharedDeploymentPlanEditor.loadExtensionPoints");
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.apache.geronimo.st.ui.editors.AbstractGeronimoDeploymentPlanEditor#loadDeploymentPlan(org.eclipse.core.resources.IFile)
+	 */
+	public JAXBElement loadDeploymentPlan(IFile file) throws Exception {
+        Trace.tracePoint("ENTRY", "SharedDeploymentPlanEditor.loadDeploymentPlan", file);
+        JAXBElement jaxbElement = getLoader() != null ? currentLoader.loadDeploymentPlan(file) : null;
+        Trace.tracePoint("EXIT", "SharedDeploymentPlanEditor.loadDeploymentPlan", jaxbElement);
+		return jaxbElement;
+	}
+	
+	public void saveDeploymentPlan(IFile file) throws Exception {
+		if (getLoader() != null) {
+			getLoader().saveDeploymentPlan(deploymentPlan, file);
+		}
+	}
+
+	private IGeronimoFormContentLoader getLoader() {
+        Trace.tracePoint("ENTRY", "SharedDeploymentPlanEditor.getLoader");
+
+		if (currentLoader == null) {
+			IEditorInput input = getEditorInput();
+			if (input instanceof IFileEditorInput) {
+				IProject project = ((IFileEditorInput) input).getFile().getProject();
+				try {
+					IFacetedProject fp = ProjectFacetsManager.create(project);
+					if (fp == null) return null;
+					IRuntime runtime = FacetUtil.getRuntime(fp.getPrimaryRuntime());
+					if (runtime == null) return null;
+					String version = runtime.getRuntimeType().getVersion();
+					currentLoader = (IGeronimoFormContentLoader) loaders.get(version);
+				} catch (CoreException e) {
+                    Trace.tracePoint("CoreException", "SharedDeploymentPlanEditor.getLoader");
+					e.printStackTrace();
+				} catch (IllegalArgumentException ie) {
+                    Trace.tracePoint("IllegalArgumentException", "SharedDeploymentPlanEditor.getLoader");
+				    throw new IllegalArgumentException("The project [" + project.getName() + "] does not have a Targeted Runtime specified.");
+                }
+			}
+		}
+
+        Trace.tracePoint("EXIT", "SharedDeploymentPlanEditor.getLoader", currentLoader);
+		return currentLoader;
+	}
+
+}

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/internal/GeronimoServerWizardFragment.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/internal/GeronimoServerWizardFragment.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/internal/GeronimoServerWizardFragment.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/internal/GeronimoServerWizardFragment.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,248 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v21.ui.internal;
+
+import org.apache.geronimo.st.v21.core.GeronimoServerDelegate;
+import org.apache.geronimo.st.ui.Activator;
+import org.apache.geronimo.st.ui.internal.Messages;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.ICellModifier;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Item;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.eclipse.wst.server.core.ServerPort;
+import org.eclipse.wst.server.core.TaskModel;
+import org.eclipse.wst.server.ui.wizard.IWizardHandle;
+import org.eclipse.wst.server.ui.wizard.WizardFragment;
+
+/**
+ * @version $Rev: 471551 $ $Date: 2006-11-06 06:47:11 +0800 (Mon, 06 Nov 2006) $
+ */
+public class GeronimoServerWizardFragment extends WizardFragment {
+
+	protected Text hostName;
+
+	protected Text adminId;
+
+	protected Text password;
+
+	protected Table ports;
+
+	protected TableViewer viewer;
+
+	/* (non-Javadoc)
+	 * @see org.eclipse.wst.server.ui.wizard.WizardFragment#hasComposite()
+	 */
+	public boolean hasComposite() {
+		return true;
+	}
+
+	public Composite createComposite(Composite parent, IWizardHandle handle) {
+		Composite container = new Composite(parent, SWT.NONE);
+		GridLayout grid = new GridLayout(2, false);
+		grid.marginWidth = 0;
+		container.setLayout(grid);
+		container.setLayoutData(new GridData(GridData.FILL_BOTH));
+		handle.setImageDescriptor(Activator.getImageDescriptor(Activator.IMG_WIZ_GERONIMO));
+		handle.setTitle(Messages.bind(Messages.newServerWizardTitle, getServerName()));
+		handle.setDescription(Messages.bind(Messages.newServerWizardTitle, getServerName()));
+		createContent(container, handle);
+		return container;
+	}
+
+	public void createContent(Composite parent, IWizardHandle handle) {
+		Label label = new Label(parent, SWT.NONE);
+		label.setText(Messages.hostName);
+		label.setLayoutData(new GridData());
+
+		hostName = new Text(parent, SWT.BORDER);
+		hostName.setLayoutData(createTextGridData());
+		hostName.setText(getServer().getHost());
+
+		hostName.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				getServer().setHost(hostName.getText());
+			}
+		});
+
+		label = new Label(parent, SWT.NONE);
+		label.setText(Messages.adminId);
+		label.setLayoutData(new GridData());
+
+		adminId = new Text(parent, SWT.BORDER);
+		adminId.setLayoutData(createTextGridData());
+		adminId.setText(getGeronimoServer().getAdminID());
+
+		adminId.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				getGeronimoServer().setAdminID(adminId.getText());
+			}
+		});
+
+		label = new Label(parent, SWT.NONE);
+		label.setText(Messages.adminPassword);
+		label.setLayoutData(new GridData());
+
+		password = new Text(parent, SWT.BORDER | SWT.PASSWORD);
+		password.setLayoutData(createTextGridData());
+		password.setText(getGeronimoServer().getAdminPassword());
+
+		password.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				getGeronimoServer().setAdminPassword(password.getText());
+			}
+		});
+
+		label = new Label(parent, SWT.NONE);
+		label.setText(Messages.specifyPorts);
+		GridData data = createTextGridData();
+		data.verticalIndent = 15;
+		data.horizontalSpan = 2;
+		label.setLayoutData(data);
+
+		// ports
+		ports = new Table(parent, SWT.V_SCROLL | SWT.H_SCROLL
+				| SWT.FULL_SELECTION);
+		ports.setHeaderVisible(true);
+		ports.setLinesVisible(false);
+
+		TableColumn col = new TableColumn(ports, SWT.NONE);
+		col.setText(Messages.portName);
+		col.setResizable(false);
+		ColumnWeightData colData = new ColumnWeightData(15, 150, false);
+		TableLayout tableLayout = new TableLayout();
+		tableLayout.addColumnData(colData);
+
+		col = new TableColumn(ports, SWT.NONE);
+		col.setText(Messages.portValue);
+		col.setResizable(false);
+		colData = new ColumnWeightData(8, 80, false);
+		tableLayout.addColumnData(colData);
+
+		data = new GridData(GridData.FILL_HORIZONTAL
+				| GridData.VERTICAL_ALIGN_FILL);
+		data.horizontalSpan = 2;
+		data.heightHint = 100;
+		ports.setLayoutData(data);
+		ports.setLayout(tableLayout);
+
+		viewer = new TableViewer(ports);
+		viewer.setColumnProperties(new String[] { "name", "port" });
+
+		fillTable(ports);
+		addCellEditor(ports);
+	}
+
+	private void addCellEditor(Table ports) {
+		viewer.setCellEditors(new CellEditor[] { null,
+				new TextCellEditor(ports) });
+
+		ICellModifier cellModifier = new ICellModifier() {
+			public Object getValue(Object element, String property) {
+				ServerPort sp = (ServerPort) element;
+				return sp.getPort() + "";
+			}
+
+			public boolean canModify(Object element, String property) {
+				return "port".equals(property);
+			}
+
+			public void modify(Object element, String property, Object value) {
+				Item item = (Item) element;
+				ServerPort sp = (ServerPort) item.getData();
+				GeronimoServerDelegate gs = getGeronimoServer();
+				gs.setInstanceProperty(sp.getId(), (String) value);
+				changePortNumber(sp.getId(), Integer.parseInt((String) value));
+			}
+		};
+
+		viewer.setCellModifier(cellModifier);
+	}
+
+	private void fillTable(Table ports) {
+		ServerPort[] serverPorts = getServer().getServerPorts(null);
+		if (serverPorts != null) {
+			for (int i = 0; i < serverPorts.length; i++) {
+				ServerPort port = serverPorts[i];
+				TableItem item = new TableItem(ports, SWT.NONE);
+				String[] s = new String[] { port.getName(),
+						Integer.toString(port.getPort()) };
+				item.setText(s);
+				item.setImage(Activator.getImage(Activator.IMG_PORT));
+				item.setData(port);
+			}
+		}
+	}
+
+	protected void changePortNumber(String id, int port) {
+		TableItem[] items = ports.getItems();
+		int size = items.length;
+		for (int i = 0; i < size; i++) {
+			ServerPort sp = (ServerPort) items[i].getData();
+			if (sp.getId().equals(id)) {
+				items[i].setData(new ServerPort(id, sp.getName(), port, sp.getProtocol()));
+				items[i].setText(1, port + "");
+				return;
+			}
+		}
+	}
+
+	private String getServerName() {
+		if (getServer() != null && getServer().getRuntime() != null)
+			return getServer().getRuntime().getRuntimeType().getName();
+		return null;
+	}
+
+	private IServerWorkingCopy getServer() {
+		return (IServerWorkingCopy) getTaskModel().getObject(TaskModel.TASK_SERVER);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.server.ui.wizard.WizardFragment#isComplete()
+	 */
+	public boolean isComplete() {
+		//TODO
+		return true;
+	}
+
+	private GeronimoServerDelegate getGeronimoServer() {
+		GeronimoServerDelegate gs = (GeronimoServerDelegate) getServer().getAdapter(GeronimoServerDelegate.class);
+		if (gs == null)
+			gs = (GeronimoServerDelegate) getServer().loadAdapter(GeronimoServerDelegate.class, null);
+		return gs;
+	}
+
+	private GridData createTextGridData() {
+		return new GridData(GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL);
+	}
+}

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AbstractGeronimoFormPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AbstractGeronimoFormPage.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AbstractGeronimoFormPage.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AbstractGeronimoFormPage.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,178 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v21.ui.pages;
+
+import javax.xml.bind.JAXBElement;
+
+import org.apache.geronimo.st.core.DeploymentDescriptorUtils;
+import org.apache.geronimo.st.core.descriptor.AbstractDeploymentDescriptor;
+import org.apache.geronimo.st.v21.ui.Activator;
+import org.apache.geronimo.st.v21.ui.editors.AbstractGeronimoDeploymentPlanEditor;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.editor.FormPage;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.Section;
+
+/**
+ * @version $Rev: 718691 $ $Date: 2008-11-19 03:45:11 +0800 (Wed, 19 Nov 2008) $
+ */
+public abstract class AbstractGeronimoFormPage extends FormPage {
+
+    JAXBElement deploymentPlan;
+    
+    AbstractDeploymentDescriptor deploymentDescriptor;
+
+    protected FormToolkit toolkit;
+
+    protected Composite body;
+
+    /**
+     * @param editor
+     * @param id
+     * @param title
+     */
+    public AbstractGeronimoFormPage(FormEditor editor, String id, String title) {
+        super(editor, id, title);
+    }
+
+    /**
+     * @param id
+     * @param title
+     */
+    public AbstractGeronimoFormPage(String id, String title) {
+        super(id, title);
+    }
+
+    public void refresh() {
+        // clear the old composite and tool bar
+        Control[] controls = body.getChildren();
+        for (int i = 0; i < controls.length; i++) {
+            controls[i].dispose();
+        }
+        getManagedForm().getForm().getToolBarManager().removeAll();
+        createFormContent(getManagedForm());
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.forms.editor.FormPage#createFormContent(org.eclipse.ui.forms.IManagedForm)
+     */
+    protected void createFormContent(IManagedForm managedForm) {
+        deploymentPlan = ((AbstractGeronimoDeploymentPlanEditor) getEditor()).getDeploymentPlan();
+        deploymentDescriptor = (AbstractDeploymentDescriptor) DeploymentDescriptorUtils
+                .getDeploymentDescriptor(getProject());
+        body = managedForm.getForm().getBody();
+        toolkit = managedForm.getToolkit();
+        final ScrolledForm form = managedForm.getForm();
+        form.setText(getFormTitle());
+        // managedForm.addPart(new BannerPart(form.getBody(), toolkit,
+        // SWT.NONE));
+        form.getBody().setLayout(getLayout());
+        fillBody(managedForm);
+
+        // header with help button
+        toolkit.decorateFormHeading(form.getForm());
+        IToolBarManager manager = form.getToolBarManager();
+
+        Action serverInfoRefresh = new Action("serverInfo") { //$NON-NLS-1$
+            public void run() {
+                BusyIndicator.showWhile(form.getDisplay(), new Runnable() {
+                    public void run() {
+                        triggerGeronimoServerInfoUpdate();
+                    }
+                });
+            }
+        };
+        serverInfoRefresh.setToolTipText("Trigger update of GeronimoServerInfo");
+        serverInfoRefresh.setImageDescriptor(Activator.imageDescriptorFromPlugin("org.apache.geronimo.st.ui",
+                "icons/obj16/update.gif"));
+        manager.add(serverInfoRefresh);
+
+        Action helpAction = new Action("help") { //$NON-NLS-1$
+            public void run() {
+                BusyIndicator.showWhile(form.getDisplay(), new Runnable() {
+                    public void run() {
+                        PlatformUI.getWorkbench().getHelpSystem().displayHelpResource(getHelpResource());
+                    }
+                });
+            }
+        };
+        helpAction.setToolTipText("help");
+        helpAction.setImageDescriptor(Activator.imageDescriptorFromPlugin("org.apache.geronimo.st.ui",
+                "icons/obj16/help.gif"));
+        manager.add(helpAction);
+
+        manager.update(true);
+        form.reflow(true);
+    }
+
+    protected abstract void triggerGeronimoServerInfoUpdate();
+
+    protected String getHelpResource() {
+        return "http://geronimo.apache.org/development-tools.html";
+    }
+
+    protected GridLayout getLayout() {
+        GridLayout layout = new GridLayout();
+        layout.numColumns = 2;
+        layout.horizontalSpacing = 20;
+        layout.makeColumnsEqualWidth = true;
+        return layout;
+    }
+
+    protected int getStyle() {
+        return ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED
+                | ExpandableComposite.TITLE_BAR | Section.DESCRIPTION
+                | ExpandableComposite.FOCUS_TITLE;
+    }
+
+    abstract protected void fillBody(IManagedForm managedForm);
+
+    public JAXBElement getDeploymentPlan() {
+        return deploymentPlan;
+    }
+
+    protected IProject getProject() {
+        IEditorInput editorInput = getEditorInput();
+        if (editorInput instanceof IFileEditorInput) {
+            return ((IFileEditorInput) editorInput).getFile().getProject();
+        }
+        return null;
+    }
+
+    public AbstractDeploymentDescriptor getDeploymentDescriptor() {
+        return deploymentDescriptor;
+    }
+
+    public String getFormTitle() {
+        return getTitle();
+    }
+}

Modified: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppClientGeneralPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppClientGeneralPage.java?rev=952535&r1=952534&r2=952535&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppClientGeneralPage.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppClientGeneralPage.java Tue Jun  8 04:40:16 2010
@@ -17,7 +17,7 @@
 package org.apache.geronimo.st.v21.ui.pages;
 
 import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
+import org.apache.geronimo.st.v21.ui.pages.AbstractGeronimoFormPage;
 import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
 import org.apache.geronimo.st.v21.ui.sections.AppClientClientGeneralSection;
 import org.apache.geronimo.st.v21.ui.sections.AppClientServerGeneralSection;

Modified: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppClientSecurityPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppClientSecurityPage.java?rev=952535&r1=952534&r2=952535&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppClientSecurityPage.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppClientSecurityPage.java Tue Jun  8 04:40:16 2010
@@ -17,7 +17,7 @@
 package org.apache.geronimo.st.v21.ui.pages;
 
 import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
+import org.apache.geronimo.st.v21.ui.pages.AbstractGeronimoFormPage;
 import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
 import org.apache.geronimo.st.v21.ui.sections.AppClientSecuritySection;
 import org.eclipse.swt.layout.GridLayout;

Modified: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppGeneralPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppGeneralPage.java?rev=952535&r1=952534&r2=952535&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppGeneralPage.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/AppGeneralPage.java Tue Jun  8 04:40:16 2010
@@ -17,7 +17,7 @@
 package org.apache.geronimo.st.v21.ui.pages;
 
 import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
+import org.apache.geronimo.st.v21.ui.pages.AbstractGeronimoFormPage;
 import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
 import org.apache.geronimo.st.v21.ui.sections.AppGeneralSection;
 import org.eclipse.ui.forms.IManagedForm;

Modified: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/ConnectorOverviewPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/ConnectorOverviewPage.java?rev=952535&r1=952534&r2=952535&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/ConnectorOverviewPage.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/ConnectorOverviewPage.java Tue Jun  8 04:40:16 2010
@@ -17,7 +17,7 @@
 package org.apache.geronimo.st.v21.ui.pages;
 
 import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
+import org.apache.geronimo.st.v21.ui.pages.AbstractGeronimoFormPage;
 import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
 import org.apache.geronimo.st.v21.ui.sections.ConnectorGeneralSection;
 import org.eclipse.ui.forms.IManagedForm;

Modified: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/ConnectorPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/ConnectorPage.java?rev=952535&r1=952534&r2=952535&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/ConnectorPage.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/ConnectorPage.java Tue Jun  8 04:40:16 2010
@@ -18,8 +18,8 @@ package org.apache.geronimo.st.v21.ui.pa
 
 import org.apache.geronimo.jee.application.Application;
 import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.editors.AbstractGeronimoDeploymentPlanEditor;
-import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
+import org.apache.geronimo.st.v21.ui.editors.AbstractGeronimoDeploymentPlanEditor;
+import org.apache.geronimo.st.v21.ui.pages.AbstractGeronimoFormPage;
 
 import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
 import org.apache.geronimo.st.v21.ui.sections.DBPoolSection;

Modified: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/DeploymentPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/DeploymentPage.java?rev=952535&r1=952534&r2=952535&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/DeploymentPage.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/DeploymentPage.java Tue Jun  8 04:40:16 2010
@@ -20,8 +20,8 @@ import org.apache.geronimo.jee.applicati
 import org.apache.geronimo.jee.applicationclient.ApplicationClient;
 import org.apache.geronimo.jee.connector.Connector;
 import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.editors.AbstractGeronimoDeploymentPlanEditor;
-import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
+import org.apache.geronimo.st.v21.ui.editors.AbstractGeronimoDeploymentPlanEditor;
+import org.apache.geronimo.st.v21.ui.pages.AbstractGeronimoFormPage;
 import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
 import org.apache.geronimo.st.v21.core.jaxb.JAXBModelUtils;
 import org.apache.geronimo.st.v21.ui.sections.AdminObjectSection;

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/DeploymentPlanSourcePage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/DeploymentPlanSourcePage.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/DeploymentPlanSourcePage.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/DeploymentPlanSourcePage.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v21.ui.pages;
+
+import org.apache.geronimo.st.v21.ui.editors.AbstractGeronimoDeploymentPlanEditor;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+
+/**
+ * @version $Rev: 817996 $ $Date: 2009-09-23 16:04:12 +0800 (Wed, 23 Sep 2009) $
+ */
+public class DeploymentPlanSourcePage extends StructuredTextEditor {
+    
+    protected AbstractGeronimoDeploymentPlanEditor editor;
+
+    public DeploymentPlanSourcePage (AbstractGeronimoDeploymentPlanEditor editor) {
+        super();
+        this.editor = editor;
+    }
+    
+    @Override
+    public void doSave(IProgressMonitor progressMonitor) {
+        super.doSave(progressMonitor);
+        try {
+			editor.reloadDeploymentPlan();
+		} catch (Exception e) {
+			MessageDialog.openError(Display.getCurrent().getActiveShell(),"Error", e.getMessage());
+		}
+    }
+}

Modified: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/EjbOverviewPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/EjbOverviewPage.java?rev=952535&r1=952534&r2=952535&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/EjbOverviewPage.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/EjbOverviewPage.java Tue Jun  8 04:40:16 2010
@@ -16,7 +16,7 @@
  */
 package org.apache.geronimo.st.v21.ui.pages;
 
-import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
+import org.apache.geronimo.st.v21.ui.pages.AbstractGeronimoFormPage;
 import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
 import org.apache.geronimo.st.v21.ui.sections.OpenEjbJarCMPSection;
 import org.apache.geronimo.st.v21.ui.sections.OpenEjbJarGeneralSection;

Modified: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/NamingFormPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/NamingFormPage.java?rev=952535&r1=952534&r2=952535&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/NamingFormPage.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/NamingFormPage.java Tue Jun  8 04:40:16 2010
@@ -20,8 +20,8 @@ import org.apache.geronimo.jee.applicati
 import org.apache.geronimo.jee.openejb.OpenejbJar;
 import org.apache.geronimo.jee.web.WebApp;
 import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.editors.AbstractGeronimoDeploymentPlanEditor;
-import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
+import org.apache.geronimo.st.v21.ui.editors.AbstractGeronimoDeploymentPlanEditor;
+import org.apache.geronimo.st.v21.ui.pages.AbstractGeronimoFormPage;
 import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
 import org.apache.geronimo.st.v21.ui.sections.EjbLocalRefSection;
 import org.apache.geronimo.st.v21.ui.sections.EjbRefSection;

Modified: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/SecurityPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/SecurityPage.java?rev=952535&r1=952534&r2=952535&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/SecurityPage.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/SecurityPage.java Tue Jun  8 04:40:16 2010
@@ -17,7 +17,7 @@
 package org.apache.geronimo.st.v21.ui.pages;
 
 import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
+import org.apache.geronimo.st.v21.ui.pages.AbstractGeronimoFormPage;
 import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
 import org.apache.geronimo.st.v21.core.jaxb.JAXBModelUtils;
 import org.apache.geronimo.st.v21.ui.sections.SecurityAdvancedSection;

Modified: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/WebGeneralPage.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/WebGeneralPage.java?rev=952535&r1=952534&r2=952535&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/WebGeneralPage.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/pages/WebGeneralPage.java Tue Jun  8 04:40:16 2010
@@ -17,7 +17,7 @@
 package org.apache.geronimo.st.v21.ui.pages;
 
 import org.apache.geronimo.st.ui.CommonMessages;
-import org.apache.geronimo.st.ui.pages.AbstractGeronimoFormPage;
+import org.apache.geronimo.st.v21.ui.pages.AbstractGeronimoFormPage;
 import org.apache.geronimo.st.v21.core.GeronimoServerInfo;
 import org.apache.geronimo.st.v21.ui.sections.WebContainerSection;
 import org.apache.geronimo.st.v21.ui.sections.WebGeneralSection;

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AbstractServerEditorSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AbstractServerEditorSection.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AbstractServerEditorSection.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/AbstractServerEditorSection.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v21.ui.sections;
+
+import org.apache.geronimo.st.v21.core.GeronimoServerDelegate;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.forms.IFormColors;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.wst.server.ui.editor.ServerEditorSection;
+
+/**
+ * @version $Rev: 732518 $ $Date: 2009-01-08 05:50:54 +0800 (Thu, 08 Jan 2009) $
+ */
+public class AbstractServerEditorSection extends ServerEditorSection {
+
+	protected GeronimoServerDelegate gs;
+
+	public AbstractServerEditorSection() {
+		super();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.server.ui.editor.ServerEditorSection#init(org.eclipse.ui.IEditorSite,
+	 *      org.eclipse.ui.IEditorInput)
+	 */
+	public void init(IEditorSite site, IEditorInput input) {
+		super.init(site, input);
+		gs = (GeronimoServerDelegate) server.getAdapter(GeronimoServerDelegate.class);
+		if (gs == null) {
+			gs = (GeronimoServerDelegate) server.loadAdapter(GeronimoServerDelegate.class,
+					new NullProgressMonitor());
+		}
+	}
+
+    protected Label createLabel(Composite parent, String text,
+            FormToolkit toolkit) {
+        Label label = toolkit.createLabel(parent, text);
+        label.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
+        label.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false));
+        return label;
+    }
+}

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ServerEditorLogLevelSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ServerEditorLogLevelSection.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ServerEditorLogLevelSection.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ServerEditorLogLevelSection.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v21.ui.sections;
+
+import org.apache.geronimo.st.v21.core.GeronimoServerDelegate;
+import org.apache.geronimo.st.v21.ui.commands.SetConsoleLogLevelCommand;
+import org.apache.geronimo.st.ui.internal.Messages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.wst.server.ui.editor.ServerEditorSection;
+
+/**
+ * @version $Rev: 732518 $ $Date: 2009-01-08 05:50:54 +0800 (Thu, 08 Jan 2009) $
+ */
+public class ServerEditorLogLevelSection extends AbstractServerEditorSection {
+
+	Button info;
+
+	Button debug;
+
+	public ServerEditorLogLevelSection() {
+		super();
+	}
+
+	public void createSection(Composite parent) {
+		super.createSection(parent);
+
+		FormToolkit toolkit = getFormToolkit(parent.getDisplay());
+
+		Section section = toolkit.createSection(parent, ExpandableComposite.TWISTIE
+				| ExpandableComposite.EXPANDED
+				| ExpandableComposite.TITLE_BAR
+				| Section.DESCRIPTION | ExpandableComposite.FOCUS_TITLE);
+
+		section.setText(Messages.editorSectionLogLevelTitle);
+		section.setDescription(Messages.editorSectionLogLevelDescription);
+		section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+
+		Composite composite = toolkit.createComposite(section);
+		GridLayout layout = new GridLayout();
+		layout.numColumns = 1;
+		layout.marginHeight = 5;
+		layout.marginWidth = 10;
+		layout.verticalSpacing = 5;
+		layout.horizontalSpacing = 15;
+		composite.setLayout(layout);
+		composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+		section.setClient(composite);
+
+		info = toolkit.createButton(composite, Messages.info, SWT.RADIO);
+		debug = toolkit.createButton(composite, Messages.debug, SWT.RADIO);
+		
+		String currentValue = ((GeronimoServerDelegate)server.getAdapter(GeronimoServerDelegate.class)).getConsoleLogLevel();
+		if(GeronimoServerDelegate.CONSOLE_DEBUG.equals(currentValue)) {
+			debug.setSelection(true);
+		} else {
+			info.setSelection(true);
+		}
+
+		info.addSelectionListener(new SelectionListener() {
+
+			public void widgetSelected(SelectionEvent e) {
+				if (info.getSelection()) {
+					execute(new SetConsoleLogLevelCommand(server, GeronimoServerDelegate.CONSOLE_INFO));
+				}
+			}
+
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+
+		debug.addSelectionListener(new SelectionListener() {
+
+			public void widgetSelected(SelectionEvent e) {
+				if (debug.getSelection()) {
+					execute(new SetConsoleLogLevelCommand(server, GeronimoServerDelegate.CONSOLE_DEBUG));
+				}
+			}
+
+			public void widgetDefaultSelected(SelectionEvent e) {
+			}
+		});
+	}
+}

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ServerEditorPortsSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ServerEditorPortsSection.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ServerEditorPortsSection.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ServerEditorPortsSection.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v21.ui.sections;
+
+import org.apache.geronimo.st.v21.ui.commands.SetHTTPPortCommand;
+import org.apache.geronimo.st.v21.ui.commands.SetRMIPortCommand;
+import org.apache.geronimo.st.ui.internal.Messages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+
+/**
+ * @version $Rev: 732518 $ $Date: 2009-01-08 05:50:54 +0800 (Thu, 08 Jan 2009) $
+ */
+public class ServerEditorPortsSection extends AbstractServerEditorSection {
+
+	Text httpPort;
+
+	Text rmiPort;
+
+	public ServerEditorPortsSection() {
+		super();
+	}
+
+	public void createSection(Composite parent) {
+		super.createSection(parent);
+
+		FormToolkit toolkit = getFormToolkit(parent.getDisplay());
+
+		Section section = toolkit.createSection(parent,
+				ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED
+						| ExpandableComposite.TITLE_BAR | Section.DESCRIPTION
+						| ExpandableComposite.FOCUS_TITLE);
+
+		section.setText(Messages.editorSectionPortsTitle);
+		section.setDescription(Messages.editorSectionPortsDescription);
+		section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+
+		Composite composite = toolkit.createComposite(section);
+		GridLayout layout = new GridLayout();
+		layout.numColumns = 2;
+		layout.marginHeight = 5;
+		layout.marginWidth = 10;
+		layout.verticalSpacing = 5;
+		layout.horizontalSpacing = 15;
+		composite.setLayout(layout);
+		composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+		section.setClient(composite);
+
+		// ------- Label and text field for the http port -------
+		createLabel(composite, Messages.httpPort, toolkit);
+
+		httpPort = toolkit.createText(composite, getHTTPPort(), SWT.BORDER);
+		httpPort.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+		httpPort.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				execute(new SetHTTPPortCommand(server, httpPort.getText()));
+			}
+		});
+
+		// ------- Label and text field for the rmi port -------
+		createLabel(composite, Messages.rmiPort, toolkit);
+
+		rmiPort = toolkit.createText(composite, getRMIPort(), SWT.BORDER);
+		rmiPort.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
+		rmiPort.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				execute(new SetRMIPortCommand(server, rmiPort.getText()));
+			}
+		});
+	}
+
+	private String getHTTPPort() {
+		if (gs != null) {
+			return gs.getHTTPPort();
+		}
+		return "";
+	}
+
+	private String getRMIPort() {
+		if (gs != null) {
+			return gs.getRMINamingPort();
+		}
+		return "";
+	}
+
+}

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ServerEditorPublishAdvancedSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ServerEditorPublishAdvancedSection.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ServerEditorPublishAdvancedSection.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ServerEditorPublishAdvancedSection.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v21.ui.sections;
+
+import org.apache.geronimo.st.v21.core.GeronimoServerDelegate;
+import org.apache.geronimo.st.v21.ui.commands.SetPublishTimeoutCommand;
+import org.apache.geronimo.st.ui.internal.Messages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Spinner;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+
+/**
+ * @version $Rev: 732518 $ $Date: 2009-01-08 05:50:54 +0800 (Thu, 08 Jan 2009) $
+ */
+public class ServerEditorPublishAdvancedSection extends AbstractServerEditorSection {
+
+    protected Spinner publishTimeout;
+
+    public ServerEditorPublishAdvancedSection() {
+        super();
+    }
+
+    public void createSection(Composite parent) {
+        super.createSection(parent);
+
+        FormToolkit toolkit = getFormToolkit(parent.getDisplay());
+
+        Section section = toolkit.createSection(parent,
+                ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED
+                        | ExpandableComposite.TITLE_BAR | Section.DESCRIPTION
+                        | ExpandableComposite.FOCUS_TITLE);
+
+        section.setText(Messages.editorSectionPublishAdvancedTitle);
+        section.setDescription(Messages.editorSectionPublishAdvancedDescription);
+        section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+
+        Composite composite = toolkit.createComposite(section);
+        GridLayout layout = new GridLayout();
+        layout.numColumns = 2;
+        layout.marginHeight = 5;
+        layout.marginWidth = 10;
+        layout.verticalSpacing = 5;
+        layout.horizontalSpacing = 15;
+        composite.setLayout(layout);
+        composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+        section.setClient(composite);
+
+        // ------- Label and text field for the http port -------
+        createLabel(composite, Messages.publishingTimeout, toolkit);
+
+        publishTimeout = new Spinner(composite, SWT.BORDER);
+        publishTimeout.setMinimum(0);
+        publishTimeout.setIncrement(5);
+        publishTimeout.setMaximum(900000);
+        publishTimeout.setSelection(getPublishTimeout());
+
+        publishTimeout.addModifyListener(new ModifyListener() {
+            public void modifyText(ModifyEvent e) {
+                execute(new SetPublishTimeoutCommand(server, publishTimeout.getSelection()));
+            }
+        });
+    }
+
+    private int getPublishTimeout() {
+        if (gs != null) {
+            return (int)gs.getPublishTimeout();
+        }
+        return 0;
+    }
+}

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ServerEditorSecuritySection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ServerEditorSecuritySection.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ServerEditorSecuritySection.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ServerEditorSecuritySection.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,179 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v21.ui.sections;
+
+import org.apache.geronimo.st.v21.core.IGeronimoServer;
+import org.apache.geronimo.st.core.operations.GeronimoAccountManager;
+import org.apache.geronimo.st.ui.CommonMessages;
+import org.apache.geronimo.st.v21.ui.commands.SetPasswordCommand;
+import org.apache.geronimo.st.v21.ui.commands.SetUsernameCommand;
+import org.apache.geronimo.st.ui.internal.Messages;
+import org.apache.geronimo.st.ui.internal.Trace;
+import org.apache.geronimo.st.ui.wizards.ManageAccountWizard;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.util.SocketUtil;
+
+/**
+ * @version $Rev: 815596 $ $Date: 2009-09-16 11:12:55 +0800 (Wed, 16 Sep 2009) $
+ */
+public class ServerEditorSecuritySection extends AbstractServerEditorSection {
+
+	Text username;
+
+	Text password;
+	
+	Button manageAccountButton;
+
+	public ServerEditorSecuritySection() {
+		super();
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.server.ui.editor.ServerEditorSection#createSection(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createSection(Composite parent) {
+		super.createSection(parent);
+
+		FormToolkit toolkit = getFormToolkit(parent.getDisplay());
+
+		Section section = toolkit.createSection(parent,
+				ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED
+						| ExpandableComposite.TITLE_BAR 
+						| ExpandableComposite.FOCUS_TITLE);
+
+		section.setText(Messages.editorSectionSecurityTitle);
+	//	section.setDescription(Messages.editorSectionSecurityDescription);
+		section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+
+		Composite textComposite = toolkit.createComposite(section);
+        GridLayout gridLayout = new GridLayout();
+        gridLayout.numColumns = 2;
+        textComposite.setLayout(gridLayout);
+        textComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+        section.setDescriptionControl(textComposite);
+        //text
+        Label label = toolkit.createLabel(textComposite, Messages.editorSectionSecurityDescription);
+        
+		// Button for managing account
+        Button manageAccountButton = toolkit.createButton(textComposite, CommonMessages.manageAccount, SWT.PUSH);
+        GridData buttonData = new GridData(SWT.LEFT, SWT.CENTER, false, false);
+        manageAccountButton.setLayoutData(buttonData);
+        manageAccountButton.addSelectionListener(new SelectionAdapter() {
+            public void widgetSelected(SelectionEvent e) {
+                // if the server is started and local host, then we can bring up the dialog
+                if (!isLocalHost())
+                    MessageDialog.openError(Display.getCurrent().getActiveShell(), CommonMessages.errorOpenWizard, CommonMessages.isNotLocalHost);
+                else 
+                {
+                    GeronimoAccountManager manager = new GeronimoAccountManager(server.getRuntime());
+                    try {
+                        manager.init();
+                    } catch (Exception e1) {
+                        MessageDialog.openError(Display.getCurrent().getActiveShell(), CommonMessages.errorOpenWizard, CommonMessages.cannotRead);
+                        Trace.trace(Trace.SEVERE, "Properties file containing user information can't be read!", e1);
+                        return;
+                    }
+                    ManageAccountWizard wizard = new ManageAccountWizard(manager);
+                    WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard);
+                    dialog.open();
+                    if (dialog.getReturnCode() == Dialog.OK) {
+                    }
+                } 
+            }
+
+        });
+		
+		Composite composite = toolkit.createComposite(section);
+		GridLayout layout = new GridLayout();
+		layout.numColumns = 2;
+		layout.marginHeight = 5;
+		layout.marginWidth = 10;
+		layout.verticalSpacing = 5;
+		layout.horizontalSpacing = 15;
+		composite.setLayout(layout);
+		composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+		section.setClient(composite);
+
+		// ------- Label and text field for the username -------
+		createLabel(composite, Messages.username, toolkit);
+		username = toolkit.createText(composite, getUserName(), SWT.BORDER);
+		username.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+		username.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				execute(new SetUsernameCommand(server, username.getText()));
+			}
+		});
+
+		// ------- Label and text field for the password -------
+		createLabel(composite, Messages.password, toolkit);
+
+		password = toolkit.createText(composite, getPassword(), SWT.BORDER | SWT.PASSWORD);
+		password.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
+		password.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				execute(new SetPasswordCommand(server, password.getText()));
+			}
+		});
+	}
+
+	private String getUserName() {
+		if (gs != null) {
+			return gs.getAdminID();
+		}
+		return "";
+	}
+
+	private String getPassword() {
+		if (gs != null) {
+			return gs.getAdminPassword();
+		}
+		return "";
+	}
+	
+	private boolean isLocalHost(){
+	    return !(server.getServerType().supportsRemoteHosts()
+                && !SocketUtil.isLocalhost(server.getHost()));
+	}
+	
+    private boolean isServerRunning () {
+        if (gs == null || gs.getServer() == null)
+            return false;
+        
+        return gs.getServer().getServerState() == IServer.STATE_STARTED;
+    }
+}

Added: geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ServerEditorStartupSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ServerEditorStartupSection.java?rev=952535&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ServerEditorStartupSection.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.2.1/plugins/org.apache.geronimo.st.v21.ui/src/main/java/org/apache/geronimo/st/v21/ui/sections/ServerEditorStartupSection.java Tue Jun  8 04:40:16 2010
@@ -0,0 +1,135 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v21.ui.sections;
+
+import org.apache.geronimo.st.v21.core.IGeronimoServer;
+import org.apache.geronimo.st.ui.commands.SetServerInstancePropertyCommand;
+import org.apache.geronimo.st.ui.internal.Messages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+
+/**
+ * @version $Rev: 732518 $ $Date: 2009-01-08 05:50:54 +0800 (Thu, 08 Jan 2009) $
+ */
+public class ServerEditorStartupSection extends AbstractServerEditorSection {
+	
+	Text pingDelay;
+
+	Text pingInterval;
+	
+	Text maxPings;
+	
+	public ServerEditorStartupSection() {
+		super();
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see org.eclipse.wst.server.ui.editor.ServerEditorSection#createSection(org.eclipse.swt.widgets.Composite)
+	 */
+	public void createSection(Composite parent) {
+		super.createSection(parent);
+
+		FormToolkit toolkit = getFormToolkit(parent.getDisplay());
+
+		Section section = toolkit.createSection(parent,
+				ExpandableComposite.TWISTIE | ExpandableComposite.EXPANDED
+						| ExpandableComposite.TITLE_BAR | Section.DESCRIPTION
+						| ExpandableComposite.FOCUS_TITLE);
+
+		section.setText(Messages.editorSectionStartupTitle);
+		section.setDescription(Messages.editorSectionStartupDescription);
+		section.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+
+		Composite composite = toolkit.createComposite(section);
+		GridLayout layout = new GridLayout();
+		layout.numColumns = 2;
+		layout.marginHeight = 5;
+		layout.marginWidth = 10;
+		layout.verticalSpacing = 5;
+		layout.horizontalSpacing = 15;
+		composite.setLayout(layout);
+		composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+		section.setClient(composite);
+
+		// ------- Label and text field for the ping delay -------
+		createLabel(composite, Messages.pingDelay, toolkit);
+		pingDelay = toolkit.createText(composite, getPingDelay(), SWT.BORDER);
+		pingDelay.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+		pingDelay.setToolTipText(Messages.pingDelayTooltip);
+		pingDelay.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				Integer value = Integer.valueOf(pingDelay.getText());
+				execute(new SetServerInstancePropertyCommand(server, value, "setPingDelay", Integer.class, IGeronimoServer.class));
+			}
+		});
+
+		// ------- Label and text field for the ping interval -------
+		createLabel(composite, Messages.pingInterval, toolkit);
+		pingInterval = toolkit.createText(composite, getPingInterval(), SWT.BORDER);
+		pingInterval.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+		pingInterval.setToolTipText(Messages.pingIntervalTooltip);
+		pingInterval.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				Integer value = Integer.valueOf(pingInterval.getText());
+				execute(new SetServerInstancePropertyCommand(server, value, "setPingInterval", Integer.class, IGeronimoServer.class));
+			}
+		});
+		
+		// ------- Label and text field for the max pings -------
+		createLabel(composite, Messages.maxPings, toolkit);
+		maxPings = toolkit.createText(composite, getMaxPings(), SWT.BORDER);
+		maxPings.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
+		maxPings.setToolTipText(Messages.maxPingsTooltip);
+		maxPings.addModifyListener(new ModifyListener() {
+			public void modifyText(ModifyEvent e) {
+				Integer value = Integer.valueOf(maxPings.getText());
+				execute(new SetServerInstancePropertyCommand(server, value, "setMaxPings", Integer.class, IGeronimoServer.class));
+			}
+		});
+	}
+
+	public String getMaxPings() {
+		if (gs != null) {
+			return Integer.toString(gs.getMaxPings());
+		}
+		return "";
+	}
+
+	public String getPingDelay() {
+		if (gs != null) {
+			return Integer.toString(gs.getPingDelay());
+		}
+		return "";
+	}
+
+	public String getPingInterval() {
+		if (gs != null) {
+			return Integer.toString(gs.getPingInterval());
+		}
+		return "";
+	}
+}



Mime
View raw message