Return-Path: X-Original-To: apmail-geronimo-scm-archive@www.apache.org Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 320B768A3 for ; Mon, 13 Jun 2011 20:35:41 +0000 (UTC) Received: (qmail 88108 invoked by uid 500); 13 Jun 2011 20:35:41 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 88062 invoked by uid 500); 13 Jun 2011 20:35:41 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 88055 invoked by uid 99); 13 Jun 2011 20:35:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jun 2011 20:35:41 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Jun 2011 20:35:38 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 9530B2388994; Mon, 13 Jun 2011 20:35:18 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1135267 - in /geronimo/devtools/eclipse-plugin/trunk/plugins: org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/ org.apache.geronimo.st.v30.ui/ org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/... Date: Mon, 13 Jun 2011 20:35:18 -0000 To: scm@geronimo.apache.org From: gawor@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110613203518.9530B2388994@eris.apache.org> Author: gawor Date: Mon Jun 13 20:35:17 2011 New Revision: 1135267 URL: http://svn.apache.org/viewvc?rev=1135267&view=rev Log: GERONIMODEVTOOLS-744: Part 2 - add GUI panels to configure the file includes & excludes, consolidate re-deploy options under the advanced publishing section in adapter configurtion Removed: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/commands/SetNotRedeployJSPFilesCommand.java geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerEditorRefreshOSGiBundleSection.java Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerDelegate.java geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/IGeronimoServer.java geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/plugin.xml geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/Messages.java geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/Messages.properties geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerEditorPublishAdvancedSection.java geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerEditorTestEnvSection.java geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractWizard.java Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java?rev=1135267&r1=1135266&r2=1135267&view=diff ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java (original) +++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java Mon Jun 13 20:35:17 2011 @@ -330,7 +330,7 @@ abstract public class GeronimoServerBeha return; // phase 1: see if the modified contents can copied/replaced - if (getServerDelegate().isNotRedeployJSPFiles() && !isRemote()) { + if (getServerDelegate().isNoRedeploy() && !isRemote()) { Iterator iterator = publishMap.values().iterator(); while (iterator.hasNext()) { ModuleDeltaList moduleList = iterator.next(); @@ -955,14 +955,9 @@ abstract public class GeronimoServerBeha private List findModifiedFiles(IModule[] module) { IModuleResourceDelta[] deltaArray = getPublishedResourceDelta(module); - // TODO: get the list from configuration - List includes = new ArrayList(); - includes.add("**/*.jsp"); - includes.add("**/*.html"); - - List excludes = new ArrayList(); - excludes.add("WEB-INF/web.xml"); - excludes.add("WEB-INF/geronimo-*.xml"); + GeronimoServerDelegate delegate = getServerDelegate(); + List includes = delegate.getNoRedeployFilePatternsAsList(true); + List excludes = delegate.getNoRedeployFilePatternsAsList(false); List modifiedFiles = new ArrayList(); for (IModuleResourceDelta delta : deltaArray) { Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerDelegate.java URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerDelegate.java?rev=1135267&r1=1135266&r2=1135267&view=diff ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerDelegate.java (original) +++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerDelegate.java Mon Jun 13 20:35:17 2011 @@ -67,6 +67,12 @@ import org.eclipse.wst.web.internal.depl */ abstract public class GeronimoServerDelegate extends ServerDelegate implements IGeronimoServer { + public static final List DEFAULT_NOREDEPLOY_INCLUDE_PATTERNS = + Arrays.asList("**/*.html", "**/*.xhtml", "**/*.css", "**/*.js", "**/*.jsp", "**/*.gif", "**/*.jpg", "**/*.png"); + + public static final List DEFAULT_NOREDEPLOY_EXCLUDE_PATTERNS = + Arrays.asList("WEB-INF/geronimo-*.xml", "WEB-INF/web.xml"); + public static final String PROPERTY_ADMIN_ID = "adminID"; public static final String PROPERTY_ADMIN_PW = "adminPassword"; @@ -97,7 +103,11 @@ abstract public class GeronimoServerDele public static final String PROPERTY_IN_PLACE_SHARED_LIB = "inPlaceSharedLib"; - public static final String PROPERTY_NOT_REDEPLOY_JSP_FILES = "notRedeployJSPFiles"; + public static final String PROPERTY_NOREDEPLOY = "noRedeploy"; + + public static final String PROPERTY_NOREDEPLOY_INCLUDE_PATTERNS = "noRedeploy.includePatterns"; + + public static final String PROPERTY_NOREDEPLOY_EXCLUDE_PATTERNS = "noRedeploy.excludePatterns"; public static final String PROPERTY_RUN_FROM_WORKSPACE = "runFromWorkspace"; @@ -856,16 +866,32 @@ abstract public class GeronimoServerDele // - // PROPERTY_NOT_REDEPLOY_JSP_FILES + // PROPERTY_NOREDEPLOY // - public boolean isNotRedeployJSPFiles() { - return getAttribute(PROPERTY_NOT_REDEPLOY_JSP_FILES, false); + public boolean isNoRedeploy() { + return getAttribute(PROPERTY_NOREDEPLOY, false); } - public void setNotRedeployJSPFiles(boolean enable){ - setAttribute(PROPERTY_NOT_REDEPLOY_JSP_FILES, enable); + public void setNoRedeploy(boolean enable){ + setAttribute(PROPERTY_NOREDEPLOY, enable); } - + public List getNoRedeployFilePatternsAsList(boolean includePatterns) { + String propertyName = (includePatterns) ? PROPERTY_NOREDEPLOY_INCLUDE_PATTERNS : PROPERTY_NOREDEPLOY_EXCLUDE_PATTERNS; + List defaults = (includePatterns) ? DEFAULT_NOREDEPLOY_INCLUDE_PATTERNS : DEFAULT_NOREDEPLOY_EXCLUDE_PATTERNS; + List patterns = getAttribute(propertyName, defaults); + return patterns; + } + + public String[] getNoRedeployFilePatterns(boolean includePatterns) { + List patterns = getNoRedeployFilePatternsAsList(includePatterns); + return patterns.toArray(new String [patterns.size()]); + } + + public void setNoRedeployFilePatterns(boolean includePatterns, String[] patterns) { + String propertyName = (includePatterns) ? PROPERTY_NOREDEPLOY_INCLUDE_PATTERNS : PROPERTY_NOREDEPLOY_EXCLUDE_PATTERNS; + setAttribute(propertyName, Arrays.asList(patterns)); + } + public String discoverDeploymentFactoryClassName(IPath jarPath) { try { JarFile deployerJar = new JarFile(jarPath.toFile()); Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/IGeronimoServer.java URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/IGeronimoServer.java?rev=1135267&r1=1135266&r2=1135267&view=diff ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/IGeronimoServer.java (original) +++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/IGeronimoServer.java Mon Jun 13 20:35:17 2011 @@ -47,7 +47,7 @@ public interface IGeronimoServer extends public IGeronimoVersionHandler getVersionHandler(); - public boolean isNotRedeployJSPFiles(); + public boolean isNoRedeploy(); public boolean isInPlaceSharedLib(); Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/plugin.xml URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/plugin.xml?rev=1135267&r1=1135266&r2=1135267&view=diff ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/plugin.xml (original) +++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/plugin.xml Mon Jun 13 20:35:17 2011 @@ -118,7 +118,7 @@ -
@@ -135,7 +135,7 @@
@@ -165,14 +165,6 @@
- -
-
-
-
-
Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/Messages.java URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/Messages.java?rev=1135267&r1=1135266&r2=1135267&view=diff ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/Messages.java (original) +++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/Messages.java Mon Jun 13 20:35:17 2011 @@ -47,9 +47,8 @@ public class Messages extends NLS { public static String editorSectionCleanOSGiBundleCacheDescription; public static String cleanOSGiBundleCache; - public static String editorSectionRefreshOSGiBundleTitle; - public static String editorSectionRefreshOSGiBundleDescription; public static String refreshOSGiBundle; + public static String refreshOSGiBundleDescription; public static String editorSectionKarafShellTitle; public static String editorSectionKarafShellDescription; @@ -604,4 +603,20 @@ public class Messages extends NLS { public static String supportURL; public static String console0; + public static String noRedeployOption; + public static String noRedeployOptionDescription; + public static String includeFilePatterns; + public static String excludeFilePatterns; + public static String filePattern; + public static String wizardNewTitle_IncludeFilePattern; + public static String wizardEditTitle_IncludeFilePattern; + public static String wizardPageTitle_IncludeFilePattern; + public static String wizardPageDescription_IncludeFilePattern; + public static String wizardNewTitle_ExcludeFilePattern; + public static String wizardEditTitle_ExcludeFilePattern; + public static String wizardPageTitle_ExcludeFilePattern; + public static String wizardPageDescription_ExcludeFilePattern; + + public static String restoreDefaults; + } Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/Messages.properties URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/Messages.properties?rev=1135267&r1=1135266&r2=1135267&view=diff ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/Messages.properties (original) +++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/Messages.properties Mon Jun 13 20:35:17 2011 @@ -102,9 +102,8 @@ editorSectionCleanOSGiBundleCacheTitle=C editorSectionCleanOSGiBundleCacheDescription=Select whether to clean the OSGi bundle cache. cleanOSGiBundleCache=Clean OSGi bundle cache -editorSectionRefreshOSGiBundleTitle=Refresh OSGi Bundle within OSGi Application -editorSectionRefreshOSGiBundleDescription=Select whether to refresh the modified OSGi bundle only. -refreshOSGiBundle=Refresh the modified OSGi bundle only +refreshOSGiBundle=Update modified OSGi bundle only +refreshOSGiBundleDescription=Update the modified OSGi bundle only instead of re-deploying the entire OSGi Application. editorSectionKarafShellTitle=Karaf Shell in Eclipse Console editorSectionKarafShellDescription=Select whether to enable the Karaf shell in Eclipse console window. @@ -469,7 +468,7 @@ editorSectionPublishAdvancedDescription= notRedeployJSPFilesReminder=Important notRedeployJSPFilesInformation=You must enable \"Development Mode\" of JSP compiler for this to function properly. -publishingTimeout=Publishing Timeout (ms): +publishingTimeout=Publishing Timeout (in seconds): artifactType=Artifact Type: inverseClassloading=Inverse classloading supressDefaultEnv=Suppress default environment @@ -596,6 +595,18 @@ blueprintTypeConverterSectionDescription blueprintOtherElementsSection=Blueprint Bean, Service, Reference List, Reference configuration blueprintOtherElementsSectionDescription=Specify other children elements of blueprint. - - - +noRedeployOption=Copy modified files instead of re-deploying web module +noRedeployOptionDescription=Copy the modified files matching the include patterns to the server instead of re-deploying the web module. Modified files that do not match include patters or match exclude patterns will cause the web module to be re-deployed. +includeFilePatterns=Include file patterns: +excludeFilePatterns=Exclude file patterns: +filePattern=File pattern: +wizardNewTitle_IncludeFilePattern=New Include File Pattern +wizardEditTitle_IncludeFilePattern=Edit Include File Pattern +wizardPageTitle_IncludeFilePattern=Include File Pattern +wizardPageDescription_IncludeFilePattern=Provide an include file pattern. A pattern can contain any combination\nof '*' (matches zero or more characters) or '?' (matches one character). +wizardNewTitle_ExcludeFilePattern=New Exclude File Pattern +wizardEditTitle_ExcludeFilePattern=Edit Exclude File Pattern +wizardPageTitle_ExcludeFilePattern=Exclude File Pattern +wizardPageDescription_ExcludeFilePattern=Provide an exclude file pattern. A pattern can contain any combination\nof '*' (matches zero or more characters) or '?' (matches one character). + +restoreDefaults=Restore defaults Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerEditorPublishAdvancedSection.java URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerEditorPublishAdvancedSection.java?rev=1135267&r1=1135266&r2=1135267&view=diff ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerEditorPublishAdvancedSection.java (original) +++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerEditorPublishAdvancedSection.java Mon Jun 13 20:35:17 2011 @@ -16,25 +16,42 @@ */ package org.apache.geronimo.st.v30.ui.sections; +import org.apache.geronimo.st.v30.core.GeronimoServerDelegate; +import org.apache.geronimo.st.v30.ui.commands.SetNoRedeployCommand; +import org.apache.geronimo.st.v30.ui.commands.SetNoRedeployFilePatternCommand; import org.apache.geronimo.st.v30.ui.commands.SetPublishTimeoutCommand; +import org.apache.geronimo.st.v30.ui.commands.SetRefreshOSGiBundleCommand; import org.apache.geronimo.st.v30.ui.internal.Messages; +import org.apache.geronimo.st.v30.ui.wizards.ListEditorWizard; +import org.eclipse.jface.wizard.Wizard; 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.Label; import org.eclipse.swt.widgets.Spinner; +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.core.util.SocketUtil; /** * @version $Rev$ $Date$ */ public class ServerEditorPublishAdvancedSection extends AbstractServerEditorSection { - protected Spinner publishTimeout; + private Spinner publishTimeout; + private Button refreshOSGiBundle; + private Button noRedeploy; + private ListEditor includesEditor; + private ListEditor excludesEditor; public ServerEditorPublishAdvancedSection() { super(); @@ -65,26 +82,130 @@ public class ServerEditorPublishAdvanced 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.setMaximum(900); + publishTimeout.setSelection((int) gs.getPublishTimeout() / 1000); publishTimeout.addModifyListener(new ModifyListener() { public void modifyText(ModifyEvent e) { - execute(new SetPublishTimeoutCommand(server, publishTimeout.getSelection())); + execute(new SetPublishTimeoutCommand(server, publishTimeout.getSelection() * 1000)); } }); - } + + refreshOSGiBundle = toolkit.createButton(composite, Messages.refreshOSGiBundle, SWT.CHECK); + refreshOSGiBundle.setSelection(gs.isRefreshOSGiBundle()); + refreshOSGiBundle.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + execute(new SetRefreshOSGiBundleCommand(server, refreshOSGiBundle.getSelection())); + } + }); + Label refreshOSGiLabel = toolkit.createLabel(composite, Messages.refreshOSGiBundleDescription, SWT.WRAP); + refreshOSGiLabel.setForeground(toolkit.getColors().getColor(IFormColors.TITLE)); + GridData refreshOSGiGridData = new GridData(SWT.LEFT, SWT.CENTER, true, true, 2, 5); + refreshOSGiGridData.widthHint = 350; + refreshOSGiLabel.setLayoutData(refreshOSGiGridData); + + includesEditor = (new ListEditor(toolkit) { + public void modified() { + execute(new SetNoRedeployFilePatternCommand(server, true, includesEditor.getItems())); + } + public Wizard getWizard() { + return (new ListEditorWizard(this) { + public String getWizardPageLabel() { + return Messages.filePattern; + } + + public String getAddWizardWindowTitle() { + return Messages.wizardNewTitle_IncludeFilePattern; + } + + public String getEditWizardWindowTitle() { + return Messages.wizardEditTitle_IncludeFilePattern; + } + + public String getWizardPageDescription() { + return Messages.wizardPageDescription_IncludeFilePattern; + } + + public String getWizardPageTitle() { + return Messages.wizardPageTitle_IncludeFilePattern; + } + }); + } + }); + includesEditor.setTitle(Messages.includeFilePatterns); + includesEditor.setDefaultValues(GeronimoServerDelegate.DEFAULT_NOREDEPLOY_INCLUDE_PATTERNS); + + excludesEditor = (new ListEditor(toolkit) { + public void modified() { + execute(new SetNoRedeployFilePatternCommand(server, false, excludesEditor.getItems())); + } + public Wizard getWizard() { + return (new ListEditorWizard(this) { + public String getWizardPageLabel() { + return Messages.filePattern; + } + + public String getAddWizardWindowTitle() { + return Messages.wizardNewTitle_ExcludeFilePattern; + } + + public String getEditWizardWindowTitle() { + return Messages.wizardEditTitle_ExcludeFilePattern; + } + + public String getWizardPageDescription() { + return Messages.wizardPageDescription_ExcludeFilePattern; + } + + public String getWizardPageTitle() { + return Messages.wizardPageTitle_ExcludeFilePattern; + } + }); + } + }); + excludesEditor.setTitle(Messages.excludeFilePatterns); + excludesEditor.setDefaultValues(GeronimoServerDelegate.DEFAULT_NOREDEPLOY_EXCLUDE_PATTERNS); + + noRedeploy = toolkit.createButton(composite, Messages.noRedeployOption, SWT.CHECK); + noRedeploy.setEnabled(!(server.getServerType().supportsRemoteHosts() && !SocketUtil.isLocalhost(server.getHost()))); + noRedeploy.addSelectionListener(new SelectionListener() { + public void widgetSelected(SelectionEvent e) { + execute(new SetNoRedeployCommand(server, noRedeploy.getSelection())); + includesEditor.setEnabled(noRedeploy.getSelection()); + excludesEditor.setEnabled(noRedeploy.getSelection()); + } + + public void widgetDefaultSelected(SelectionEvent e) { + } - private int getPublishTimeout() { + }); + noRedeploy.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1)); + + Label noRedeployLabel = toolkit.createLabel(composite, Messages.noRedeployOptionDescription, SWT.WRAP); + noRedeployLabel.setForeground(toolkit.getColors().getColor(IFormColors.TITLE)); + GridData noRedeployGridData = new GridData(SWT.LEFT, SWT.CENTER, true, true, 2, 5); + noRedeployGridData.widthHint = 350; + noRedeployLabel.setLayoutData(noRedeployGridData); + + includesEditor.createClient(composite); + includesEditor.getComposite().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1)); + + excludesEditor.createClient(composite); + excludesEditor.getComposite().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1)); + if (gs != null) { - return (int)gs.getPublishTimeout(); + noRedeploy.setSelection(gs.isNoRedeploy()); + includesEditor.setEnabled(noRedeploy.getSelection()); + excludesEditor.setEnabled(noRedeploy.getSelection()); + + includesEditor.setItems(gs.getNoRedeployFilePatterns(true)); + excludesEditor.setItems(gs.getNoRedeployFilePatterns(false)); } - return 0; } + } Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerEditorTestEnvSection.java URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerEditorTestEnvSection.java?rev=1135267&r1=1135266&r2=1135267&view=diff ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerEditorTestEnvSection.java (original) +++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/sections/ServerEditorTestEnvSection.java Mon Jun 13 20:35:17 2011 @@ -22,12 +22,10 @@ import org.apache.geronimo.st.v30.core.C import org.apache.geronimo.st.v30.ui.Activator; import org.apache.geronimo.st.v30.ui.commands.SetClasspathContainersCommand; import org.apache.geronimo.st.v30.ui.commands.SetInPlaceSharedLibCommand; -import org.apache.geronimo.st.v30.ui.commands.SetNotRedeployJSPFilesCommand; import org.apache.geronimo.st.v30.ui.commands.SetRunFromWorkspaceCommand; import org.apache.geronimo.st.v30.ui.commands.SetSelectClasspathContainersCommand; import org.apache.geronimo.st.v30.ui.internal.Messages; import org.apache.geronimo.st.v30.ui.internal.Trace; -import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.ArrayContentProvider; import org.eclipse.jface.viewers.CheckStateChangedEvent; import org.eclipse.jface.viewers.CheckboxTableViewer; @@ -40,12 +38,9 @@ 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.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$ $Date$ @@ -54,7 +49,6 @@ public class ServerEditorTestEnvSection // SWT widget(s) private Button runFromWorkspace; - private Button noRedeployJSPFiles; private Button inPlaceSharedLib; private Button selectClasspathContainers = null; private Composite composite = null; @@ -112,30 +106,6 @@ public class ServerEditorTestEnvSection } }); - - // - // Don't redeploy JSP files Button - // - noRedeployJSPFiles = toolkit.createButton(composite, Messages.editorSectionNotRedeployJSPFiles, SWT.CHECK); - noRedeployJSPFiles.setSelection(gs.isNotRedeployJSPFiles()); - - noRedeployJSPFiles.setEnabled(!(server.getServerType().supportsRemoteHosts() - && !SocketUtil.isLocalhost(server.getHost()))&&gs.getServer().getServerState()==IServer.STATE_STOPPED); - noRedeployJSPFiles.addSelectionListener(new SelectionListener() { - - public void widgetSelected(SelectionEvent e) { - execute(new SetNotRedeployJSPFilesCommand(server, noRedeployJSPFiles.getSelection())); - - if (noRedeployJSPFiles.getSelection()) { - MessageDialog.openInformation(Display.getCurrent().getActiveShell(), - Messages.notRedeployJSPFilesReminder, Messages.notRedeployJSPFilesInformation); - } - } - - public void widgetDefaultSelected(SelectionEvent e) { - } - - }); // // runFromWorkspace Button Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractWizard.java URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractWizard.java?rev=1135267&r1=1135266&r2=1135267&view=diff ============================================================================== --- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractWizard.java (original) +++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/wizards/AbstractWizard.java Mon Jun 13 20:35:17 2011 @@ -88,7 +88,11 @@ public abstract class AbstractWizard ext } protected Label createLabel(Composite composite, String labelString) { - Label label = new Label(composite, SWT.LEFT); + return createLabel(composite, labelString, SWT.LEFT); + } + + protected Label createLabel(Composite composite, String labelString, int mask) { + Label label = new Label(composite, mask); if (!labelString.endsWith(":") && labelString.length() > 0) { labelString = labelString.concat(":"); }