geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bjr...@apache.org
Subject svn commit: r732518 - in /geronimo/devtools/eclipse-plugin: branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/
Date Wed, 07 Jan 2009 21:50:54 GMT
Author: bjreed
Date: Wed Jan  7 13:50:54 2009
New Revision: 732518

URL: http://svn.apache.org/viewvc?rev=732518&view=rev
Log:
move common server editor methods to new AbstractServerEditorSection class

Added:
    geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/AbstractServerEditorSection.java   (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/AbstractServerEditorSection.java   (with props)
Modified:
    geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorLogLevelSection.java
    geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorPortsSection.java
    geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorPublishAdvancedSection.java
    geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorSecuritySection.java
    geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorStartupSection.java
    geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorTestEnvSection.java
    geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerVMArgsSection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorLogLevelSection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorPortsSection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorPublishAdvancedSection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorSecuritySection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorStartupSection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorTestEnvSection.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerVMArgsSection.java

Added: geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/AbstractServerEditorSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/AbstractServerEditorSection.java?rev=732518&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/AbstractServerEditorSection.java (added)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/AbstractServerEditorSection.java Wed Jan  7 13:50:54 2009
@@ -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.ui.sections;
+
+import org.apache.geronimo.st.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$ $Date$
+ */
+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;
+    }
+}

Propchange: geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/AbstractServerEditorSection.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/AbstractServerEditorSection.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/AbstractServerEditorSection.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorLogLevelSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorLogLevelSection.java?rev=732518&r1=732517&r2=732518&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorLogLevelSection.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorLogLevelSection.java Wed Jan  7 13:50:54 2009
@@ -34,7 +34,7 @@
 /**
  * @version $Rev$ $Date$
  */
-public class ServerEditorLogLevelSection extends ServerEditorSection {
+public class ServerEditorLogLevelSection extends AbstractServerEditorSection {
 
 	Button info;
 
@@ -89,7 +89,6 @@
 
 			public void widgetDefaultSelected(SelectionEvent e) {
 			}
-
 		});
 
 		debug.addSelectionListener(new SelectionListener() {
@@ -102,9 +101,6 @@
 
 			public void widgetDefaultSelected(SelectionEvent e) {
 			}
-
 		});
-
 	}
-
 }

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorPortsSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorPortsSection.java?rev=732518&r1=732517&r2=732518&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorPortsSection.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorPortsSection.java Wed Jan  7 13:50:54 2009
@@ -16,38 +16,29 @@
  */
 package org.apache.geronimo.st.ui.sections;
 
-import org.apache.geronimo.st.core.GeronimoServerDelegate;
 import org.apache.geronimo.st.ui.commands.SetHTTPPortCommand;
 import org.apache.geronimo.st.ui.commands.SetRMIPortCommand;
 import org.apache.geronimo.st.ui.internal.Messages;
-import org.eclipse.core.runtime.NullProgressMonitor;
 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.Label;
 import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.forms.IFormColors;
 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$ $Date$
  */
-public class ServerEditorPortsSection extends ServerEditorSection {
+public class ServerEditorPortsSection extends AbstractServerEditorSection {
 
 	Text httpPort;
 
 	Text rmiPort;
 
-	GeronimoServerDelegate gs;
-
 	public ServerEditorPortsSection() {
 		super();
 	}
@@ -100,29 +91,6 @@
 		});
 	}
 
-	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;
-	}
-
-	/*
-	 * (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());
-		}
-	}
-
 	private String getHTTPPort() {
 		if (gs != null) {
 			return gs.getHTTPPort();

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorPublishAdvancedSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorPublishAdvancedSection.java?rev=732518&r1=732517&r2=732518&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorPublishAdvancedSection.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorPublishAdvancedSection.java Wed Jan  7 13:50:54 2009
@@ -19,32 +19,24 @@
 import org.apache.geronimo.st.core.GeronimoServerDelegate;
 import org.apache.geronimo.st.ui.commands.SetPublishTimeoutCommand;
 import org.apache.geronimo.st.ui.internal.Messages;
-import org.eclipse.core.runtime.NullProgressMonitor;
 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.Label;
 import org.eclipse.swt.widgets.Spinner;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.forms.IFormColors;
 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$ $Date$
  */
-public class ServerEditorPublishAdvancedSection extends ServerEditorSection {
+public class ServerEditorPublishAdvancedSection extends AbstractServerEditorSection {
 
     protected Spinner publishTimeout;
 
-    GeronimoServerDelegate gs;
-
     public ServerEditorPublishAdvancedSection() {
         super();
     }
@@ -90,29 +82,6 @@
         });
     }
 
-    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;
-    }
-
-    /*
-     * (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());
-        }
-    }
-
     private int getPublishTimeout() {
         if (gs != null) {
             return (int)gs.getPublishTimeout();

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorSecuritySection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorSecuritySection.java?rev=732518&r1=732517&r2=732518&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorSecuritySection.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorSecuritySection.java Wed Jan  7 13:50:54 2009
@@ -20,34 +20,26 @@
 import org.apache.geronimo.st.ui.commands.SetPasswordCommand;
 import org.apache.geronimo.st.ui.commands.SetUsernameCommand;
 import org.apache.geronimo.st.ui.internal.Messages;
-import org.eclipse.core.runtime.NullProgressMonitor;
 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.Label;
 import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.forms.IFormColors;
 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$ $Date$
  */
-public class ServerEditorSecuritySection extends ServerEditorSection {
+public class ServerEditorSecuritySection extends AbstractServerEditorSection {
 
 	Text username;
 
 	Text password;
 
-	IGeronimoServer gs;
-
 	public ServerEditorSecuritySection() {
 		super();
 	}
@@ -103,30 +95,6 @@
 				execute(new SetPasswordCommand(server, password.getText()));
 			}
 		});
-
-	}
-
-	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;
-	}
-
-	/*
-	 * (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 = (IGeronimoServer) server.getAdapter(IGeronimoServer.class);
-		if (gs == null) {
-			gs = (IGeronimoServer) server.loadAdapter(IGeronimoServer.class,
-					new NullProgressMonitor());
-		}
 	}
 
 	private String getUserName() {
@@ -142,5 +110,4 @@
 		}
 		return "";
 	}
-
 }

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorStartupSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorStartupSection.java?rev=732518&r1=732517&r2=732518&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorStartupSection.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorStartupSection.java Wed Jan  7 13:50:54 2009
@@ -19,27 +19,21 @@
 import org.apache.geronimo.st.core.IGeronimoServer;
 import org.apache.geronimo.st.ui.commands.SetServerInstancePropertyCommand;
 import org.apache.geronimo.st.ui.internal.Messages;
-import org.eclipse.core.runtime.NullProgressMonitor;
 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.Label;
 import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.forms.IFormColors;
 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$ $Date$
  */
-public class ServerEditorStartupSection extends ServerEditorSection {
+public class ServerEditorStartupSection extends AbstractServerEditorSection {
 	
 	Text pingDelay;
 
@@ -47,8 +41,6 @@
 	
 	Text maxPings;
 	
-	IGeronimoServer gs;
-	
 	public ServerEditorStartupSection() {
 		super();
 	}
@@ -118,31 +110,8 @@
 				execute(new SetServerInstancePropertyCommand(server, value, "setMaxPings", Integer.class, IGeronimoServer.class));
 			}
 		});
-
-	}
-
-	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;
 	}
 
-	/*
-	 * (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 = (IGeronimoServer) server.getAdapter(IGeronimoServer.class);
-		if (gs == null) {
-			gs = (IGeronimoServer) server.loadAdapter(IGeronimoServer.class, new NullProgressMonitor());
-		}
-	}
-	
 	public String getMaxPings() {
 		if (gs != null) {
 			return Integer.toString(gs.getMaxPings());
@@ -163,5 +132,4 @@
 		}
 		return "";
 	}
-
 }

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorTestEnvSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorTestEnvSection.java?rev=732518&r1=732517&r2=732518&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorTestEnvSection.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorTestEnvSection.java Wed Jan  7 13:50:54 2009
@@ -19,7 +19,6 @@
 import java.util.List;
 
 import org.apache.geronimo.st.core.ClasspathContainersHelper;
-import org.apache.geronimo.st.core.IGeronimoServer;
 import org.apache.geronimo.st.ui.commands.SetInPlaceSharedLibCommand;
 import org.apache.geronimo.st.ui.commands.SetRunFromWorkspaceCommand;
 import org.apache.geronimo.st.ui.commands.SetClasspathContainersCommand;
@@ -41,12 +40,11 @@
 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$ $Date$
  */
-public class ServerEditorTestEnvSection extends ServerEditorSection {
+public class ServerEditorTestEnvSection extends AbstractServerEditorSection {
 
     // SWT widget(s)
     private Button runFromWorkspace;
@@ -60,8 +58,6 @@
     // JFace viewer(s)
     private CheckboxTableViewer checkbox;
 
-    private IGeronimoServer gs;
-
     /*
      * (non-Javadoc)
      * 
@@ -94,9 +90,6 @@
         composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
         section.setClient(composite);
 
-        gs = (IGeronimoServer) server.getAdapter(IGeronimoServer.class);
-
-
         //
         // inPlaceSharedLib Button
         //
@@ -113,7 +106,6 @@
 
         });
 
-
         //
         // runFromWorkspace Button
         //
@@ -131,7 +123,6 @@
 
         });
 
-
         //
         // selectClasspathContainers Button
         //
@@ -164,10 +155,8 @@
 
             public void widgetDefaultSelected(SelectionEvent e) { 
             } 
-
         }); 
 
-
         //
         // checkbox CheckboxTableViewer
         //
@@ -197,7 +186,6 @@
         Trace.tracePoint("EXIT", "ServerEditorTestEnvSection.createSection");
     }
 
-
     //
     // CheckboxTableViewer: checkbox
     //
@@ -218,7 +206,6 @@
                 public void checkStateChanged(CheckStateChangedEvent event) {
                     execute(new SetClasspathContainersCommand(server, checkbox.getCheckedElements()));
                 }
-
             }); 
 
             checkbox.setLabelProvider( new LabelProvider() {
@@ -226,10 +213,8 @@
 
             checkbox.setContentProvider( new ArrayContentProvider() {
             });
-
         }
 
         Trace.tracePoint("EXIT", "ServerEditorTestEnvSection.createCheckbox");
 	}
-
-}
\ No newline at end of file
+}

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerVMArgsSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerVMArgsSection.java?rev=732518&r1=732517&r2=732518&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerVMArgsSection.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.4/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerVMArgsSection.java Wed Jan  7 13:50:54 2009
@@ -16,10 +16,8 @@
  */
 package org.apache.geronimo.st.ui.sections;
 
-import org.apache.geronimo.st.core.GeronimoServerDelegate;
 import org.apache.geronimo.st.ui.commands.SetVMArgsCommand;
 import org.apache.geronimo.st.ui.internal.Messages;
-import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.debug.ui.StringVariableSelectionDialog;
 import org.eclipse.jdt.internal.debug.ui.launcher.LauncherMessages;
@@ -33,38 +31,23 @@
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
 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$ $Date$
  */
-public class ServerVMArgsSection extends ServerEditorSection {
+public class ServerVMArgsSection extends AbstractServerEditorSection {
 	
 	protected Text fVMArgumentsText;
 	private Button fPgrmArgVariableButton;
-	GeronimoServerDelegate gs;
 
 	public ServerVMArgsSection() {
 		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());
-		}
-	}
-	
-	/* (non-Javadoc)
 	 * @see org.eclipse.wst.server.ui.editor.ServerEditorSection#createSection(org.eclipse.swt.widgets.Composite)
 	 */
 	public void createSection(Composite parent) {

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/AbstractServerEditorSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/AbstractServerEditorSection.java?rev=732518&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/AbstractServerEditorSection.java (added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/AbstractServerEditorSection.java Wed Jan  7 13:50:54 2009
@@ -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.ui.sections;
+
+import org.apache.geronimo.st.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$ $Date$
+ */
+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;
+    }
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/AbstractServerEditorSection.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/AbstractServerEditorSection.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/AbstractServerEditorSection.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorLogLevelSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorLogLevelSection.java?rev=732518&r1=732517&r2=732518&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorLogLevelSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorLogLevelSection.java Wed Jan  7 13:50:54 2009
@@ -34,7 +34,7 @@
 /**
  * @version $Rev$ $Date$
  */
-public class ServerEditorLogLevelSection extends ServerEditorSection {
+public class ServerEditorLogLevelSection extends AbstractServerEditorSection {
 
 	Button info;
 
@@ -89,7 +89,6 @@
 
 			public void widgetDefaultSelected(SelectionEvent e) {
 			}
-
 		});
 
 		debug.addSelectionListener(new SelectionListener() {
@@ -102,9 +101,6 @@
 
 			public void widgetDefaultSelected(SelectionEvent e) {
 			}
-
 		});
-
 	}
-
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorPortsSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorPortsSection.java?rev=732518&r1=732517&r2=732518&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorPortsSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorPortsSection.java Wed Jan  7 13:50:54 2009
@@ -16,38 +16,29 @@
  */
 package org.apache.geronimo.st.ui.sections;
 
-import org.apache.geronimo.st.core.GeronimoServerDelegate;
 import org.apache.geronimo.st.ui.commands.SetHTTPPortCommand;
 import org.apache.geronimo.st.ui.commands.SetRMIPortCommand;
 import org.apache.geronimo.st.ui.internal.Messages;
-import org.eclipse.core.runtime.NullProgressMonitor;
 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.Label;
 import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.forms.IFormColors;
 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$ $Date$
  */
-public class ServerEditorPortsSection extends ServerEditorSection {
+public class ServerEditorPortsSection extends AbstractServerEditorSection {
 
 	Text httpPort;
 
 	Text rmiPort;
 
-	GeronimoServerDelegate gs;
-
 	public ServerEditorPortsSection() {
 		super();
 	}
@@ -100,29 +91,6 @@
 		});
 	}
 
-	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;
-	}
-
-	/*
-	 * (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());
-		}
-	}
-
 	private String getHTTPPort() {
 		if (gs != null) {
 			return gs.getHTTPPort();

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorPublishAdvancedSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorPublishAdvancedSection.java?rev=732518&r1=732517&r2=732518&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorPublishAdvancedSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorPublishAdvancedSection.java Wed Jan  7 13:50:54 2009
@@ -19,32 +19,24 @@
 import org.apache.geronimo.st.core.GeronimoServerDelegate;
 import org.apache.geronimo.st.ui.commands.SetPublishTimeoutCommand;
 import org.apache.geronimo.st.ui.internal.Messages;
-import org.eclipse.core.runtime.NullProgressMonitor;
 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.Label;
 import org.eclipse.swt.widgets.Spinner;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.forms.IFormColors;
 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$ $Date$
  */
-public class ServerEditorPublishAdvancedSection extends ServerEditorSection {
+public class ServerEditorPublishAdvancedSection extends AbstractServerEditorSection {
 
     protected Spinner publishTimeout;
 
-    GeronimoServerDelegate gs;
-
     public ServerEditorPublishAdvancedSection() {
         super();
     }
@@ -90,29 +82,6 @@
         });
     }
 
-    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;
-    }
-
-    /*
-     * (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());
-        }
-    }
-
     private int getPublishTimeout() {
         if (gs != null) {
             return (int)gs.getPublishTimeout();

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorSecuritySection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorSecuritySection.java?rev=732518&r1=732517&r2=732518&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorSecuritySection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorSecuritySection.java Wed Jan  7 13:50:54 2009
@@ -20,34 +20,26 @@
 import org.apache.geronimo.st.ui.commands.SetPasswordCommand;
 import org.apache.geronimo.st.ui.commands.SetUsernameCommand;
 import org.apache.geronimo.st.ui.internal.Messages;
-import org.eclipse.core.runtime.NullProgressMonitor;
 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.Label;
 import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.forms.IFormColors;
 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$ $Date$
  */
-public class ServerEditorSecuritySection extends ServerEditorSection {
+public class ServerEditorSecuritySection extends AbstractServerEditorSection {
 
 	Text username;
 
 	Text password;
 
-	IGeronimoServer gs;
-
 	public ServerEditorSecuritySection() {
 		super();
 	}
@@ -103,30 +95,6 @@
 				execute(new SetPasswordCommand(server, password.getText()));
 			}
 		});
-
-	}
-
-	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;
-	}
-
-	/*
-	 * (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 = (IGeronimoServer) server.getAdapter(IGeronimoServer.class);
-		if (gs == null) {
-			gs = (IGeronimoServer) server.loadAdapter(IGeronimoServer.class,
-					new NullProgressMonitor());
-		}
 	}
 
 	private String getUserName() {
@@ -142,5 +110,4 @@
 		}
 		return "";
 	}
-
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorStartupSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorStartupSection.java?rev=732518&r1=732517&r2=732518&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorStartupSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorStartupSection.java Wed Jan  7 13:50:54 2009
@@ -19,27 +19,21 @@
 import org.apache.geronimo.st.core.IGeronimoServer;
 import org.apache.geronimo.st.ui.commands.SetServerInstancePropertyCommand;
 import org.apache.geronimo.st.ui.internal.Messages;
-import org.eclipse.core.runtime.NullProgressMonitor;
 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.Label;
 import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
-import org.eclipse.ui.forms.IFormColors;
 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$ $Date$
  */
-public class ServerEditorStartupSection extends ServerEditorSection {
+public class ServerEditorStartupSection extends AbstractServerEditorSection {
 	
 	Text pingDelay;
 
@@ -47,8 +41,6 @@
 	
 	Text maxPings;
 	
-	IGeronimoServer gs;
-	
 	public ServerEditorStartupSection() {
 		super();
 	}
@@ -118,31 +110,8 @@
 				execute(new SetServerInstancePropertyCommand(server, value, "setMaxPings", Integer.class, IGeronimoServer.class));
 			}
 		});
-
-	}
-
-	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;
 	}
 
-	/*
-	 * (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 = (IGeronimoServer) server.getAdapter(IGeronimoServer.class);
-		if (gs == null) {
-			gs = (IGeronimoServer) server.loadAdapter(IGeronimoServer.class, new NullProgressMonitor());
-		}
-	}
-	
 	public String getMaxPings() {
 		if (gs != null) {
 			return Integer.toString(gs.getMaxPings());
@@ -163,5 +132,4 @@
 		}
 		return "";
 	}
-
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorTestEnvSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorTestEnvSection.java?rev=732518&r1=732517&r2=732518&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorTestEnvSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerEditorTestEnvSection.java Wed Jan  7 13:50:54 2009
@@ -19,7 +19,6 @@
 import java.util.List;
 
 import org.apache.geronimo.st.core.ClasspathContainersHelper;
-import org.apache.geronimo.st.core.IGeronimoServer;
 import org.apache.geronimo.st.ui.commands.SetInPlaceSharedLibCommand;
 import org.apache.geronimo.st.ui.commands.SetRunFromWorkspaceCommand;
 import org.apache.geronimo.st.ui.commands.SetClasspathContainersCommand;
@@ -41,12 +40,11 @@
 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$ $Date$
  */
-public class ServerEditorTestEnvSection extends ServerEditorSection {
+public class ServerEditorTestEnvSection extends AbstractServerEditorSection {
 
     // SWT widget(s)
     private Button runFromWorkspace;
@@ -60,8 +58,6 @@
     // JFace viewer(s)
     private CheckboxTableViewer checkbox;
 
-    private IGeronimoServer gs;
-
     /*
      * (non-Javadoc)
      * 
@@ -94,9 +90,6 @@
         composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
         section.setClient(composite);
 
-        gs = (IGeronimoServer) server.getAdapter(IGeronimoServer.class);
-
-
         //
         // inPlaceSharedLib Button
         //
@@ -113,7 +106,6 @@
 
         });
 
-
         //
         // runFromWorkspace Button
         //
@@ -131,7 +123,6 @@
 
         });
 
-
         //
         // selectClasspathContainers Button
         //
@@ -164,10 +155,8 @@
 
             public void widgetDefaultSelected(SelectionEvent e) { 
             } 
-
         }); 
 
-
         //
         // checkbox CheckboxTableViewer
         //
@@ -197,7 +186,6 @@
         Trace.tracePoint("EXIT", "ServerEditorTestEnvSection.createSection");
     }
 
-
     //
     // CheckboxTableViewer: checkbox
     //
@@ -218,7 +206,6 @@
                 public void checkStateChanged(CheckStateChangedEvent event) {
                     execute(new SetClasspathContainersCommand(server, checkbox.getCheckedElements()));
                 }
-
             }); 
 
             checkbox.setLabelProvider( new LabelProvider() {
@@ -226,10 +213,8 @@
 
             checkbox.setContentProvider( new ArrayContentProvider() {
             });
-
         }
 
         Trace.tracePoint("EXIT", "ServerEditorTestEnvSection.createCheckbox");
 	}
-
-}
\ No newline at end of file
+}

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerVMArgsSection.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerVMArgsSection.java?rev=732518&r1=732517&r2=732518&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerVMArgsSection.java (original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.ui/src/main/java/org/apache/geronimo/st/ui/sections/ServerVMArgsSection.java Wed Jan  7 13:50:54 2009
@@ -16,10 +16,8 @@
  */
 package org.apache.geronimo.st.ui.sections;
 
-import org.apache.geronimo.st.core.GeronimoServerDelegate;
 import org.apache.geronimo.st.ui.commands.SetVMArgsCommand;
 import org.apache.geronimo.st.ui.internal.Messages;
-import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.debug.internal.ui.SWTFactory;
 import org.eclipse.debug.ui.StringVariableSelectionDialog;
 import org.eclipse.jdt.internal.debug.ui.launcher.LauncherMessages;
@@ -33,38 +31,23 @@
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorSite;
 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$ $Date$
  */
-public class ServerVMArgsSection extends ServerEditorSection {
+public class ServerVMArgsSection extends AbstractServerEditorSection {
 	
 	protected Text fVMArgumentsText;
 	private Button fPgrmArgVariableButton;
-	GeronimoServerDelegate gs;
 
 	public ServerVMArgsSection() {
 		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());
-		}
-	}
-	
-	/* (non-Javadoc)
 	 * @see org.eclipse.wst.server.ui.editor.ServerEditorSection#createSection(org.eclipse.swt.widgets.Composite)
 	 */
 	public void createSection(Composite parent) {



Mime
View raw message