Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Anderson2014-01-29 04:20:39 +0000
committerCarl Anderson2014-01-29 04:20:39 +0000
commitb255f13493313554e1f622c08f3d52ebf4b9aaaf (patch)
tree05dfb8b46cbea2593ad8aec6f64d72826b32ed01 /plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse
parentb8d27017c5a7fbd6773deedf74e60c2a1e7be27d (diff)
downloadwebtools.javaee-b255f13493313554e1f622c08f3d52ebf4b9aaaf.tar.gz
webtools.javaee-b255f13493313554e1f622c08f3d52ebf4b9aaaf.tar.xz
webtools.javaee-b255f13493313554e1f622c08f3d52ebf4b9aaaf.zip
[426508] Support Servlet 3.1 Listeners in new Listener wizardv201401290400
Diffstat (limited to 'plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse')
-rw-r--r--plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/plugin/WEBUIMessages.java2
-rw-r--r--plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/AddListenerWizardPage.java24
-rw-r--r--plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/IWebWizardConstants.java3
3 files changed, 28 insertions, 1 deletions
diff --git a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/plugin/WEBUIMessages.java b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/plugin/WEBUIMessages.java
index 2ac066c31..f34c07561 100644
--- a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/plugin/WEBUIMessages.java
+++ b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/plugin/WEBUIMessages.java
@@ -152,6 +152,8 @@ public class WEBUIMessages extends NLS {
public static String ADD_LISTENER_WIZARD_CHANGES_TO_ATTRIBUTES_G;
public static String ADD_LISTENER_WIZARD_SESSION_MIGRATION;
public static String ADD_LISTENER_WIZARD_OBJECT_BINDING;
+ public static String ADD_LISTENER_WIZARD_OBJECT_SESSION_ID;
+ public static String ADD_LISTENER_WIZARD_ASYNC_EVENTS;
public static String DISPATCHER_REQUEST;
public static String DISPATCHER_FORWARD;
diff --git a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/AddListenerWizardPage.java b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/AddListenerWizardPage.java
index 057b5e8ba..12d8119fe 100644
--- a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/AddListenerWizardPage.java
+++ b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/AddListenerWizardPage.java
@@ -20,6 +20,8 @@ import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_CONTE
import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_CONTEXT_LISTENER;
import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_REQUEST_ATTRIBUTE_LISTENER;
import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_REQUEST_LISTENER;
+import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_HTTP_SESSION_ID_LISTENER;
+import static org.eclipse.jst.j2ee.web.IServletConstants.QUALIFIED_SERVLET_REQUEST_ASYNC_EVENT_LISTENER;
import static org.eclipse.jst.servlet.ui.internal.wizard.IWebWizardConstants.*;
import java.util.ArrayList;
@@ -28,6 +30,7 @@ import java.util.List;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jst.j2ee.internal.web.operations.INewServletClassDataModelProperties;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
@@ -127,6 +130,17 @@ public class AddListenerWizardPage extends DataModelWizardPage {
ADD_LISTENER_WIZARD_OBJECT_BINDING,
QUALIFIED_HTTP_SESSION_BINDING_LISTENER,
INTERFACES);
+
+ String javaEEVersion = model.getStringProperty(INewServletClassDataModelProperties.JAVA_EE_VERSION);
+ if("3.1".equals(javaEEVersion)){ //$NON-NLS-1$
+ createEventListenerRow(group,
+ ADD_LISTENER_WIZARD_OBJECT_SESSION_ID,
+ QUALIFIED_HTTP_SESSION_ID_LISTENER,
+ INTERFACES);
+ }
+
+
+
}
private void createServletRequestEvents(Composite parent) {
@@ -141,8 +155,18 @@ public class AddListenerWizardPage extends DataModelWizardPage {
ADD_LISTENER_WIZARD_CHANGES_TO_ATTRIBUTES_G,
QUALIFIED_SERVLET_REQUEST_ATTRIBUTE_LISTENER,
INTERFACES);
+
+ String javaEEVersion = model.getStringProperty(INewServletClassDataModelProperties.JAVA_EE_VERSION);
+ if("3.1".equals(javaEEVersion)){ //$NON-NLS-1$
+ createEventListenerRow(group,
+ ADD_LISTENER_WIZARD_ASYNC_EVENTS,
+ QUALIFIED_SERVLET_REQUEST_ASYNC_EVENT_LISTENER,
+ INTERFACES);
+ }
+
}
+
private Group createGroup(Composite parent, String text) {
Group group = new Group(parent, SWT.NONE);
diff --git a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/IWebWizardConstants.java b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/IWebWizardConstants.java
index d38886165..e534e0a77 100644
--- a/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/IWebWizardConstants.java
+++ b/plugins/org.eclipse.jst.servlet.ui/servlet_ui/org/eclipse/jst/servlet/ui/internal/wizard/IWebWizardConstants.java
@@ -81,7 +81,8 @@ public interface IWebWizardConstants {
public final static String ADD_LISTENER_WIZARD_CHANGES_TO_ATTRIBUTES_G = WEBUIMessages.ADD_LISTENER_WIZARD_CHANGES_TO_ATTRIBUTES_G;
public final static String ADD_LISTENER_WIZARD_SESSION_MIGRATION = WEBUIMessages.ADD_LISTENER_WIZARD_SESSION_MIGRATION;
public final static String ADD_LISTENER_WIZARD_OBJECT_BINDING = WEBUIMessages.ADD_LISTENER_WIZARD_OBJECT_BINDING;
-
+ public final static String ADD_LISTENER_WIZARD_OBJECT_SESSION_ID = WEBUIMessages.ADD_LISTENER_WIZARD_OBJECT_SESSION_ID;
+ public final static String ADD_LISTENER_WIZARD_ASYNC_EVENTS = WEBUIMessages.ADD_LISTENER_WIZARD_ASYNC_EVENTS;
// common
public final static String ADD_BUTTON_LABEL = WEBUIMessages.ADD_BUTTON_LABEL;
public final static String ADD_BUTTON_LABEL_A = WEBUIMessages.ADD_BUTTON_LABEL_A;

Back to the top