JBoss Tools SVN: r27057 - trunk/ws/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2010-12-01 09:54:07 -0500 (Wed, 01 Dec 2010)
New Revision: 27057
Modified:
trunk/ws/docs/reference/en-US/Author_Group.xml
Log:
updated with corect brian f email
Modified: trunk/ws/docs/reference/en-US/Author_Group.xml
===================================================================
--- trunk/ws/docs/reference/en-US/Author_Group.xml 2010-12-01 14:47:27 UTC (rev 27056)
+++ trunk/ws/docs/reference/en-US/Author_Group.xml 2010-12-01 14:54:07 UTC (rev 27057)
@@ -5,7 +5,7 @@
<author><firstname>Grid</firstname><surname>Qian</surname><email>fqian(a)redhat.com</email></author><author>
<firstname>Brian </firstname>
<surname>Fitzpatrick</surname>
- <email>bfitzpatrick(a)redhat.com</email>
+ <email>bfitzpat(a)redhat.com</email>
</author>
<author>
<firstname>Ben </firstname>
14 years
JBoss Tools SVN: r27056 - trunk/ws/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2010-12-01 09:47:27 -0500 (Wed, 01 Dec 2010)
New Revision: 27056
Modified:
trunk/ws/docs/reference/en-US/Book_Info.xml
trunk/ws/docs/reference/en-US/overview.xml
Log:
updated number for brew
Modified: trunk/ws/docs/reference/en-US/Book_Info.xml
===================================================================
--- trunk/ws/docs/reference/en-US/Book_Info.xml 2010-12-01 14:44:43 UTC (rev 27055)
+++ trunk/ws/docs/reference/en-US/Book_Info.xml 2010-12-01 14:47:27 UTC (rev 27056)
@@ -1,4 +1,4 @@
<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE Book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
]>
-<bookinfo><title>JBoss Web Services User Guide</title><subtitle>Provides information relating to the JBoss Web Services module.</subtitle><productname>JBoss Developer Studio</productname><productnumber>4.0</productnumber><edition>4.0.0</edition><pubsnumber>16</pubsnumber><abstract><para>The JBoss Web Services User Guide explains how to use the JBoss Web Services module to implement web services in Java.</para></abstract><corpauthor><inlinemediaobject><imageobject><imagedata fileref="Common_Content/images/title_logo.svg" format="SVG"></imagedata></imageobject></inlinemediaobject></corpauthor><xi:include href="Common_Content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include><xi:include href="Author_Group.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></bookinfo>
+<bookinfo><title>JBoss Web Services User Guide</title><subtitle>Provides information relating to the JBoss Web Services module.</subtitle><productname>JBoss Developer Studio</productname><productnumber>4.0</productnumber><edition>4.0.0</edition><pubsnumber>17</pubsnumber><abstract><para>The JBoss Web Services User Guide explains how to use the JBoss Web Services module to implement web services in Java.</para></abstract><corpauthor><inlinemediaobject><imageobject><imagedata fileref="Common_Content/images/title_logo.svg" format="SVG"></imagedata></imageobject></inlinemediaobject></corpauthor><xi:include href="Common_Content/Legal_Notice.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include><xi:include href="Author_Group.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include></bookinfo>
Modified: trunk/ws/docs/reference/en-US/overview.xml
===================================================================
--- trunk/ws/docs/reference/en-US/overview.xml 2010-12-01 14:44:43 UTC (rev 27055)
+++ trunk/ws/docs/reference/en-US/overview.xml 2010-12-01 14:47:27 UTC (rev 27056)
@@ -2,7 +2,7 @@
<chapter id="overview">
<title>JBossWS Runtime Overview</title>
- <para>JBossWS is a web service framework developed as a part of the JBoss Application Server. It implements the JAX-WS specification that defines a programming model and run-time architecture for implementing web services in Java, targeted at the Java Platform, Enterprise Edition 5 (Java EE 5).</para>
+ <para>JBossWS is a web service framework developed as a part of the JBoss Application Server. It implements the JAX-WS and JAX-RS specifications. JAX-WS (Java API for XML Web Services) defines a programming model and run-time architecture for implementing web services in Java, targeted at the Java Platform, Enterprise Edition 5 (Java EE 5). JAX-RS (Java API for RESTful Web Services) is a Java API that supports the creation of Representational State Transfer (REST) web services, using annotations. </para>
<para>JBossWS integrates with most current JBoss Application Server releases as well as earlier ones, that did implement the J2EE 1.4 specifications. Even though JAX-RPC, the web service specification for J2EE 1.4, is still supported JBossWS does put a clear focus on JAX-WS.</para>
<section>
@@ -33,6 +33,16 @@
<entry><para>JBossWS implements both the JAX-WS and JAX-RPC specifications.</para></entry>
</row>
+
+ <row>
+ <entry>
+ <para>JAX-RS support</para>
+ </entry>
+ <entry>
+ <para>JBossWS implements the JAX-RS specification.</para>
+ </entry>
+
+ </row>
<row>
<entry><para>EJB 2.1, EJB3 and JSE endpoints</para></entry>
14 years
JBoss Tools SVN: r27055 - trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-01 09:44:43 -0500 (Wed, 01 Dec 2010)
New Revision: 27055
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/TestPalette.java
Log:
JBIDE-7561
https://jira.jboss.org/browse/JBIDE-7561
Added: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/TestPalette.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/TestPalette.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/TestPalette.java 2010-12-01 14:44:43 UTC (rev 27055)
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.jsf.ui.test;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.internal.ui.palette.editparts.ToolEntryEditPart;
+import org.eclipse.gef.palette.PaletteContainer;
+import org.eclipse.gef.palette.PaletteEntry;
+import org.eclipse.gef.palette.ToolEntry;
+import org.eclipse.gef.ui.views.palette.PalettePage;
+import org.eclipse.gef.ui.views.palette.PaletteView;
+import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathUpdater;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.part.IPage;
+import org.jboss.tools.common.model.ui.views.palette.IPaletteAdapter;
+import org.jboss.tools.jsf.ui.JsfUiPlugin;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.jst.jsp.jspeditor.PalettePageImpl;
+import org.jboss.tools.jst.web.ui.WebDevelopmentPerspectiveFactory;
+import org.jboss.tools.test.util.ProjectImportTestSetup;
+import org.jboss.tools.vpe.ui.palette.CustomDrawerEditPart;
+import org.jboss.tools.vpe.ui.palette.PaletteAdapter;
+import org.jboss.tools.vpe.ui.palette.PaletteViewer;
+import org.jboss.tools.vpe.ui.palette.model.PaletteModel;
+import org.jboss.tools.vpe.ui.palette.model.PaletteRoot;
+
+import junit.framework.TestCase;
+
+public class TestPalette extends TestCase {
+ static String jsfProjectName = "testJSFProject";
+ static IProject jsfProject;
+
+ protected void setUp() throws Exception {
+ loadProjects();
+ List<IProject> projectList = new ArrayList<IProject>();
+ projectList.add(jsfProject);
+ J2EEComponentClasspathUpdater.getInstance().forceUpdate(projectList);
+ loadProjects();
+ }
+
+ private void loadProjects() throws Exception {
+ jsfProject = ProjectImportTestSetup.loadProject(jsfProjectName);
+ jsfProject.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
+ }
+
+ public void testPalette() throws Exception {
+ IWorkbench w = JsfUiPlugin.getDefault().getWorkbench();
+ IWorkbenchWindow window = w.getActiveWorkbenchWindow();
+
+ //open Web Development perspective
+ w.showPerspective(WebDevelopmentPerspectiveFactory.PERSPECTIVE_ID, window);
+
+ //open file
+ IFile f = jsfProject.getFile(new Path("WebContent/pages/hello.jsp"));
+ assertNotNull(f);
+ IEditorPart editor = IDE.openEditor(window.getActivePage(), f);
+ assertNotNull(editor);
+
+ //check palette model
+ PaletteModel paletteModel = PaletteModel.getInstance(null);
+ assertNotNull(paletteModel);
+ PaletteRoot root = paletteModel.getPaletteRoot();
+ List<?> tabs = root.getChildren();
+ assertTrue(!tabs.isEmpty());
+ for (Object tab: tabs) {
+ assertTrue(tab instanceof PaletteContainer);
+ PaletteContainer c = (PaletteContainer)tab;
+ List<?> macros = c.getChildren();
+ assertTrue(!macros.isEmpty());
+ for (Object m: macros) {
+ PaletteEntry e = (PaletteEntry)m;
+ //
+ }
+ }
+
+ //get palette view
+ IViewPart part = window.getActivePage().findView("org.eclipse.gef.ui.palette_view");
+ assertNotNull(part);
+ assertTrue(part instanceof PaletteView);
+ PaletteView view = (PaletteView)part;
+ IPage page1 = view.getCurrentPage();
+
+ assertTrue(editor instanceof JSPMultiPageEditor);
+ PalettePage page = (PalettePage)editor.getAdapter(PalettePage.class);
+
+ //compare page obtained from view and editor, must be the same
+ assertTrue(page1 == page);
+ assertTrue(page instanceof PalettePageImpl);
+
+ PalettePageImpl palettePage = (PalettePageImpl)page;
+ IPaletteAdapter adapter = palettePage.getAdapter();
+ assertTrue(adapter instanceof PaletteAdapter);
+
+ //check edit parts
+ PaletteViewer viewer = ((PaletteAdapter)adapter).getViewer();
+ List<?> parts = viewer.getRootEditPart().getChildren();
+ for (Object p: parts) {
+ List<?> parts1 = ((EditPart)p).getChildren();
+ for (Object p1: parts1) {
+ List<?> parts2 = ((EditPart)p1).getChildren();
+ for (Object p2: parts2) {
+ assertTrue(p2 instanceof ToolEntryEditPart);
+ }
+ }
+ }
+
+ }
+
+}
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/TestPalette.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years
JBoss Tools SVN: r27054 - trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-01 09:33:58 -0500 (Wed, 01 Dec 2010)
New Revision: 27054
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/PaletteAdapter.java
Log:
JBIDE-7561
https://jira.jboss.org/browse/JBIDE-7561
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/PaletteAdapter.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/PaletteAdapter.java 2010-12-01 14:22:09 UTC (rev 27053)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.ui.palette/src/org/jboss/tools/vpe/ui/palette/PaletteAdapter.java 2010-12-01 14:33:58 UTC (rev 27054)
@@ -214,5 +214,12 @@
}
}
+ /**
+ * Test method
+ * @return
+ */
+ public PaletteViewer getViewer() {
+ return viewer;
+ }
}
14 years
JBoss Tools SVN: r27053 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-01 09:22:09 -0500 (Wed, 01 Dec 2010)
New Revision: 27053
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/PalettePageImpl.java
Log:
JBIDE-7561
https://jira.jboss.org/browse/JBIDE-7561
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/PalettePageImpl.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/PalettePageImpl.java 2010-12-01 14:21:01 UTC (rev 27052)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/PalettePageImpl.java 2010-12-01 14:22:09 UTC (rev 27053)
@@ -18,6 +18,7 @@
import org.eclipse.ui.part.IPageSite;
import org.eclipse.ui.part.Page;
import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.ui.views.palette.IPaletteAdapter;
import org.jboss.tools.common.model.ui.views.palette.IPalettePageAdapter;
import org.jboss.tools.common.model.ui.views.palette.PaletteCreator;
@@ -73,4 +74,8 @@
return getSite().getPage();
}
+ public IPaletteAdapter getAdapter() {
+ return paletteCreator.getAdapter();
+ }
+
}
14 years
JBoss Tools SVN: r27052 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-01 09:21:01 -0500 (Wed, 01 Dec 2010)
New Revision: 27052
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/PaletteCreator.java
Log:
JBIDE-7561
https://jira.jboss.org/browse/JBIDE-7561
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/PaletteCreator.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/PaletteCreator.java 2010-12-01 14:08:35 UTC (rev 27051)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/views/palette/PaletteCreator.java 2010-12-01 14:21:01 UTC (rev 27052)
@@ -246,4 +246,12 @@
return editor;
}
+ /**
+ * Used for test
+ * @return
+ */
+ public IPaletteAdapter getAdapter() {
+ return paletteAdapter;
+ }
+
}
14 years
JBoss Tools SVN: r27051 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-12-01 09:08:35 -0500 (Wed, 01 Dec 2010)
New Revision: 27051
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java
Log:
JBIDE-7774 - remember last used connection url at the very least
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-12-01 13:46:14 UTC (rev 27050)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-12-01 14:08:35 UTC (rev 27051)
@@ -27,6 +27,7 @@
import org.eclipse.core.databinding.validation.ValidationStatus;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.databinding.fieldassist.ControlDecorationSupport;
import org.eclipse.jface.databinding.swt.ISWTObservableValue;
import org.eclipse.jface.databinding.swt.WidgetProperties;
@@ -62,6 +63,7 @@
import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.CompositeValidator;
import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.MandatoryStringValidator;
import org.jboss.tools.internal.deltacloud.ui.common.swt.JFaceUtils;
+import org.osgi.service.prefs.Preferences;
/**
* @author Jeff Jonhston
@@ -449,6 +451,12 @@
f.top = new FormAttachment(passwordText, 5);
ec2pwLink.setLayoutData(f);
+ if( urlText.getText().equals("")) {
+ // pre-set with previously used
+ Preferences prefs = new InstanceScope().getNode(Activator.PLUGIN_ID);
+ String previousURL = prefs.get(NewCloudConnectionWizard.LAST_USED_URL, "");
+ urlText.setText(previousURL);
+ }
setControl(container);
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java 2010-12-01 13:46:14 UTC (rev 27050)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java 2010-12-01 14:08:35 UTC (rev 27051)
@@ -13,6 +13,7 @@
import java.net.MalformedURLException;
import java.text.MessageFormat;
+import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.INewWizard;
@@ -21,11 +22,15 @@
import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.core.DeltaCloudManager;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClientImpl.DeltaCloudServerType;
+import org.jboss.tools.deltacloud.ui.Activator;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
+import org.osgi.service.prefs.BackingStoreException;
+import org.osgi.service.prefs.Preferences;
public class NewCloudConnectionWizard extends Wizard implements INewWizard, CloudConnection {
private static final String MAINPAGE_NAME = "NewCloudConnection.name"; //$NON-NLS-1$
+ public static final String LAST_USED_URL = "org.jboss.tools.internal.deltacloud.ui.wizards.LAST_CREATED_URL";
private CloudConnectionPage mainPage;
protected DeltaCloud initialCloud;
private String pageTitle;
@@ -118,6 +123,19 @@
String username = mainPage.getModel().getUsername();
String password = mainPage.getModel().getPassword();
String type = getServerType();
+
+ // save URL in some plugin preference key!
+ Preferences prefs = new InstanceScope().getNode(Activator.PLUGIN_ID);
+ String previousURL = prefs.get(LAST_USED_URL, "");
+ if( previousURL == null || previousURL.equals("") || !previousURL.equals(url)) {
+ prefs.put(LAST_USED_URL, url);
+ try {
+ prefs.flush();
+ } catch( BackingStoreException bse ) {
+ // intentionally ignore, non-critical
+ }
+ }
+
try {
DeltaCloud newCloud = new DeltaCloud(name, url, username, password, type);
DeltaCloudManager.getDefault().addCloud(newCloud);
14 years
JBoss Tools SVN: r27050 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2010-12-01 08:46:14 -0500 (Wed, 01 Dec 2010)
New Revision: 27050
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java
Log:
JBIDE-7715 - duplication in classes removed. One now extends the other
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-12-01 13:31:31 UTC (rev 27049)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-12-01 13:46:14 UTC (rev 27050)
@@ -53,6 +53,7 @@
import org.eclipse.ui.ISelectionListener;
import org.eclipse.ui.PlatformUI;
import org.jboss.tools.common.log.LogHelper;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.core.DeltaCloudManager;
import org.jboss.tools.deltacloud.core.client.DeltaCloudClientImpl.DeltaCloudServerType;
@@ -270,7 +271,14 @@
this.connectionModel = new CloudConnectionModel();
this.cloudConnection = cloudConnection;
}
+
+ public CloudConnectionPage(String pageName, DeltaCloud initial, CloudConnection connection)
+ throws MalformedURLException, DeltaCloudException {
+ this(pageName, initial.getName(), initial.getURL(), initial.getUsername(),
+ initial.getPassword(), initial.getType(), connection);
+ }
+
public CloudConnectionPage(String pageName, String defaultName, String defaultUrl,
String defaultUsername, String defaultPassword, String defaultType,
CloudConnection cloudConnection) throws MalformedURLException {
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java 2010-12-01 13:31:31 UTC (rev 27049)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java 2010-12-01 13:46:14 UTC (rev 27050)
@@ -10,82 +10,19 @@
*******************************************************************************/
package org.jboss.tools.internal.deltacloud.ui.wizards;
-import java.net.MalformedURLException;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.ui.INewWizard;
-import org.eclipse.ui.IWorkbench;
-import org.jboss.tools.common.log.StatusFactory;
import org.jboss.tools.deltacloud.core.DeltaCloud;
-import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.core.DeltaCloudManager;
-import org.jboss.tools.deltacloud.core.client.DeltaCloudClientImpl.DeltaCloudServerType;
-import org.jboss.tools.deltacloud.ui.Activator;
-import org.jboss.tools.deltacloud.ui.ErrorUtils;
-public class EditCloudConnectionWizard extends Wizard implements INewWizard, CloudConnection {
+public class EditCloudConnectionWizard extends NewCloudConnectionWizard {
private static final String MAINPAGE_NAME = "EditCloudConnection.name"; //$NON-NLS-1$
private CloudConnectionPage mainPage;
- private DeltaCloud cloud;
public EditCloudConnectionWizard(DeltaCloud cloud) {
- super();
- this.cloud = cloud;
+ super(WizardMessages.getString(MAINPAGE_NAME), cloud);
}
@Override
- public void init(IWorkbench workbench, IStructuredSelection selection) {
- }
-
- @Override
- public void addPages() {
- try {
- String cloudName = cloud.getName();
- String userName = cloud.getUsername();
- String password = cloud.getPassword();
- mainPage = new CloudConnectionPage(WizardMessages.getString(MAINPAGE_NAME),
- cloudName, cloud.getURL(), userName, password, cloud.getType(), this);
- addPage(mainPage);
- } catch (MalformedURLException e) {
- ErrorUtils.handleError(WizardMessages.getString("EditCloudConnectionError.title"),
- WizardMessages.getString("EditCloudConnectionError.message"), e, getShell());
- } catch (DeltaCloudException e) {
- // TODO: internationalize strings
- ErrorUtils.handleError("Error",
- "Could not create wizard page", e, getShell());
- }
- }
-
- @Override
- public boolean canFinish() {
- return mainPage.isPageComplete();
- }
-
- public boolean performTest() {
- String name = mainPage.getName();
- String url = mainPage.getModel().getUrl();
- String username = mainPage.getModel().getUsername();
- String password = mainPage.getModel().getPassword();
- try {
- DeltaCloud newCloud = new DeltaCloud(name, url, username, password);
- return newCloud.testConnection();
- } catch (DeltaCloudException e) {
- IStatus status = StatusFactory.getInstance(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e);
- Activator.log(status);
- ErrorDialog.openError(
- getShell(),
- WizardMessages.getString("CloudConnectionAuthError.title"),
- WizardMessages.getFormattedString("CloudConnectionAuthError.message", url),
- status);
- return false;
- }
- }
-
- @Override
public boolean performFinish() {
String name = mainPage.getModel().getName();
String url = mainPage.getModel().getUrl();
@@ -93,8 +30,8 @@
String password = mainPage.getModel().getPassword();
String type = getServerType();
try {
- String oldName = cloud.getName();
- cloud.editCloud(name, url, username, password, type);
+ String oldName = initialCloud.getName();
+ initialCloud.editCloud(name, url, username, password, type);
DeltaCloudManager.getDefault().saveClouds();
if (!name.equals(oldName)) {
DeltaCloudManager.getDefault().notifyCloudRename();
@@ -103,18 +40,4 @@
}
return true;
}
-
- private String getServerType() {
- DeltaCloudServerType type = mainPage.getModel().getType();
- if (type == null) {
- return null;
- }
-
- return type.toString();
- }
-
- @Override
- public boolean needsProgressMonitor() {
- return true;
- }
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java 2010-12-01 13:31:31 UTC (rev 27049)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java 2010-12-01 13:46:14 UTC (rev 27050)
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.jboss.tools.internal.deltacloud.ui.wizards;
+import java.net.MalformedURLException;
import java.text.MessageFormat;
import org.eclipse.jface.viewers.IStructuredSelection;
@@ -22,32 +23,66 @@
import org.jboss.tools.deltacloud.core.client.DeltaCloudClientImpl.DeltaCloudServerType;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
-public class NewCloudConnectionWizard extends Wizard implements INewWizard, CloudConnection {
+public class NewCloudConnectionWizard extends Wizard implements INewWizard, CloudConnection {
private static final String MAINPAGE_NAME = "NewCloudConnection.name"; //$NON-NLS-1$
private CloudConnectionPage mainPage;
+ protected DeltaCloud initialCloud;
+ private String pageTitle;
public NewCloudConnectionWizard() {
+ this(WizardMessages.getString(MAINPAGE_NAME));
+ }
+
+ public NewCloudConnectionWizard(String pageTitle) {
super();
+ this.pageTitle = pageTitle;
}
+
+ public NewCloudConnectionWizard(String pageTitle, DeltaCloud initial) {
+ this(pageTitle);
+ this.initialCloud = initial;
+ }
+
+ protected CloudConnectionPage createCloudConnectionPage() {
+ Exception e = null;
+ try {
+ if( initialCloud == null )
+ return new CloudConnectionPage(pageTitle, this);
+ // else
+ return new CloudConnectionPage(pageTitle, initialCloud, this);
+ } catch (MalformedURLException e2) {
+ e = e2;
+ } catch (DeltaCloudException e2) {
+ e = e2;
+ }
+ if( e != null ) {
+ ErrorUtils.handleError(WizardMessages.getString("EditCloudConnectionError.title"),
+ WizardMessages.getString("EditCloudConnectionError.message"), e, getShell());
+ }
+ return null;
+ }
+
@Override
public void init(IWorkbench workbench, IStructuredSelection selection) {
}
- @Override
- public void addPages() {
- mainPage = new CloudConnectionPage(WizardMessages.getString(MAINPAGE_NAME), this);
- addPage(mainPage);
- }
@Override
public boolean canFinish() {
return mainPage.isPageComplete();
}
-
+
+ @Override
+ public void addPages() {
+ mainPage = createCloudConnectionPage();
+ if( mainPage != null )
+ addPage(mainPage);
+ }
+
public boolean performTest() {
- String name = mainPage.getModel().getName();
+ String name = mainPage.getName();
String url = mainPage.getModel().getUrl();
String username = mainPage.getModel().getUsername();
String password = mainPage.getModel().getPassword();
@@ -61,8 +96,22 @@
return true;
}
}
+
+ protected String getServerType() {
+ DeltaCloudServerType type = mainPage.getModel().getType();
+ if (type == null) {
+ return null;
+ }
+
+ return type.toString();
+ }
@Override
+ public boolean needsProgressMonitor() {
+ return true;
+ }
+
+ @Override
public boolean performFinish() {
String name = mainPage.getModel().getName();
String url = mainPage.getModel().getUrl();
@@ -80,18 +129,4 @@
}
return true;
}
-
- private String getServerType() {
- DeltaCloudServerType type = mainPage.getModel().getType();
- if (type == null) {
- return null;
- }
-
- return type.toString();
- }
-
- @Override
- public boolean needsProgressMonitor() {
- return true;
- }
}
14 years
JBoss Tools SVN: r27049 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-12-01 08:31:31 -0500 (Wed, 01 Dec 2010)
New Revision: 27049
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt
Log:
https://jira.jboss.org/browse/JBIDE-6575
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt 2010-12-01 13:28:17 UTC (rev 27048)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt 2010-12-01 13:31:31 UTC (rev 27049)
@@ -202,7 +202,13 @@
c) Primitive types cannot be proxied by the container.
d) Array types cannot be proxied by the container.
+8.3. Decorator resolution
+- If a decorator matches a managed bean, and the managed bean class is declared final, the container automatically detects
+ the problem and treats it as a deployment problem.
+- If a decorator matches a managed bean with a non-static, non-private, final method, and the decorator also implements that method,
+ the container automatically detects the problem and treats it as a deployment problem.
+
Beans.xml (all of them are deployment problems)
@@ -242,10 +248,4 @@
- All unresolvable ambiguous EL names are detected by the container when the application is initialized. Suppose two beans are both available for injection in a certain war, and either:
• the two beans have the same EL name and the name is not resolvable, or
• the EL name of one bean is of the form x.y, where y is a valid bean EL name, and x is the EL name of the other bean,
- the container automatically detects the problem and treats it as a deployment problem.
-
-8.3. Decorator resolution
-- If a decorator matches a managed bean, and the managed bean class is declared final, the container automatically detects
- the problem and treats it as a deployment problem.
-- If a decorator matches a managed bean with a non-static, non-private, final method, and the decorator also implements that method,
- the container automatically detects the problem and treats it as a deployment problem.
+ the container automatically detects the problem and treats it as a deployment problem.
\ No newline at end of file
14 years
JBoss Tools SVN: r27048 - in trunk/cdi: plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-12-01 08:28:17 -0500 (Wed, 01 Dec 2010)
New Revision: 27048
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.properties
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java
Log:
https://jira.jboss.org/browse/JBIDE-6575 Added 8.3. Decorator resolution validation rules.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java 2010-12-01 12:58:18 UTC (rev 27047)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java 2010-12-01 13:28:17 UTC (rev 27048)
@@ -49,6 +49,7 @@
defaultPreferences.put(CDIPreferences.MISSING_NONBINDING_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, CDIPreferences.WARNING);
defaultPreferences.put(CDIPreferences.ILLEGAL_CONDITIONAL_OBSERVER, CDIPreferences.WARNING);
defaultPreferences.put(CDIPreferences.MISSING_OR_INCORRECT_TARGET_OR_RETENTION_IN_ANNOTATION_TYPE, CDIPreferences.WARNING);
+ defaultPreferences.put(CDIPreferences.DECORATOR_RESOLVES_TO_FINAL_BEAN, CDIPreferences.WARNING);
defaultPreferences.putInt(SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME, SeverityPreferences.DEFAULT_MAX_NUMBER_OF_MARKERS_PER_FILE);
}
}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java 2010-12-01 12:58:18 UTC (rev 27047)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java 2010-12-01 13:28:17 UTC (rev 27048)
@@ -195,6 +195,11 @@
public static final String INJECTED_DECORATOR = INSTANCE.createSeverityOption("injectedDecorator"); //$NON-NLS-1$
// - an interceptor can not be injected
public static final String INJECTED_INTERCEPTOR = INSTANCE.createSeverityOption("injectedInterceptor"); //$NON-NLS-1$
+// 8.3. Decorator resolution
+// - If a decorator matches a managed bean, and the managed bean class is declared final, the container automatically detects
+// the problem and treats it as a deployment problem.
+// - If a decorator matches a managed bean with a non-static, non-private, final method, and the decorator also implements that method, the container automatically detects the problem and treats it as a deployment problem.
+ public static final String DECORATOR_RESOLVES_TO_FINAL_BEAN = INSTANCE.createSeverityOption("decoratorResolvesToFinalBean"); //$NON-NLS-1$
//Specialization
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-12-01 12:58:18 UTC (rev 27047)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-12-01 13:28:17 UTC (rev 27048)
@@ -1215,6 +1215,7 @@
addError(CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, CDIPreferences.AMBIGUOUS_INJECTION_POINTS, reference, injection.getResource());
} else if(beans.size()==1) {
IBean bean = beans.iterator().next();
+ getValidationContext().addLinkedCoreResource(injection.getSourcePath().toOSString(), bean.getResource().getFullPath(), false);
/*
* 5.2.4. Primitive types and null values
* - injection point of primitive type resolves to a bean that may have null values, such as a producer method with a non-primitive return type or a producer field with a non-primitive type
@@ -1273,6 +1274,47 @@
}
}
}
+ if(injection.getClassBean() instanceof IDecorator && injection.isDelegate() && bean instanceof IClassBean) {
+ try {
+ IType beanClass = bean.getBeanClass();
+ if(Flags.isFinal(beanClass.getFlags())) {
+ // 8.3. Decorator resolution
+ // - If a decorator matches a managed bean, and the managed bean class is declared final, the container automatically detects
+ // the problem and treats it as a deployment problem.
+ addError(MessageFormat.format(CDIValidationMessages.DECORATOR_RESOLVES_TO_FINAL_CLASS, bean.getSimpleJavaName()), CDIPreferences.DECORATOR_RESOLVES_TO_FINAL_BEAN, reference, injection.getResource());
+ } else {
+ // 8.3. Decorator resolution
+ // - If a decorator matches a managed bean with a non-static, non-private, final method, and the decorator also implements that method,
+ // the container automatically detects the problem and treats it as a deployment problem.
+ IType decoratorClass = injection.getClassBean().getBeanClass();
+ IMethod[] methods = decoratorClass.getMethods();
+ boolean reported = false;
+ if(methods!=null) {
+ for (IMethod method : methods) {
+ if(!Flags.isPrivate(method.getFlags()) && !Flags.isStatic(method.getFlags())) {
+ IMethod[] beanMethods = beanClass.findMethods(method);
+ if(beanMethods!=null) {
+ for (IMethod beanMethod : beanMethods) {
+ int flags = beanMethod.getFlags();
+ if(!Flags.isPrivate(flags) && !Flags.isStatic(flags) && Flags.isFinal(flags)) {
+ String methodName = Signature.toString(beanMethod.getSignature(), beanMethod.getElementName(), beanMethod.getParameterNames(), false, false);
+ addError(MessageFormat.format(CDIValidationMessages.DECORATOR_RESOLVES_TO_FINAL_METHOD, bean.getSimpleJavaName(), methodName), CDIPreferences.DECORATOR_RESOLVES_TO_FINAL_BEAN, reference, injection.getResource());
+ reported = true;
+ break;
+ }
+ }
+ if(reported) {
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
+ }
}
/*
* 5.5.7. Injection point metadata
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java 2010-12-01 12:58:18 UTC (rev 27047)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java 2010-12-01 13:28:17 UTC (rev 27048)
@@ -32,6 +32,8 @@
public static String UNPROXYABLE_BEAN_TYPE_WITH_NPC;
public static String UNPROXYABLE_BEAN_FINAL_TYPE;
public static String UNPROXYABLE_BEAN_TYPE_WITH_FM;
+ public static String DECORATOR_RESOLVES_TO_FINAL_CLASS;
+ public static String DECORATOR_RESOLVES_TO_FINAL_METHOD;
public static String ILLEGAL_TYPE_IN_TYPED_DECLARATION;
public static String ILLEGAL_TYPE_IN_TYPED_DECLARATION_IN_BEAN_CLASS;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt 2010-12-01 12:58:18 UTC (rev 27047)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt 2010-12-01 13:28:17 UTC (rev 27048)
@@ -190,11 +190,19 @@
treats it as a deployment problem.
5.2.4. Primitive types and null values
-- if an injection point of primitive type resolves to a bean that may have null values, such as a producer method
+- If an injection point of primitive type resolves to a bean that may have null values, such as a producer method
with a non-primitive return type or a producer field with a non-primitive type, the container automatically detects the problem
and treats it as a deployment problem.
+5.4.1. Unproxyable bean types
+- If an injection point whose declared type cannot be proxied by the container resolves to a bean with a normal scope,
+ the container automatically detects the problem and treats it as a deployment problem:
+a) Classes which don't have a non-private constructor with no parameters cannot be proxied by the container.
+b) Classes which are declared final or have final methods cannot be proxied by the container.
+c) Primitive types cannot be proxied by the container.
+d) Array types cannot be proxied by the container.
+
Beans.xml (all of them are deployment problems)
@@ -226,21 +234,18 @@
Unimplemented:
-5.1.3. Inconsistent specialization
-- Suppose an enabled bean X specializes a second bean Y. If there is another enabled bean that specializes Y we say that inconsistent
- specialization exists. The container automatically detects inconsistent specialization and treats it as a deployment problem.
+5.1.3. Inconsistent specialization
+- Suppose an enabled bean X specializes a second bean Y. If there is another enabled bean that specializes Y we say that inconsistent
+ specialization exists. The container automatically detects inconsistent specialization and treats it as a deployment problem.
-5.3.1. Ambiguous EL names
-- All unresolvable ambiguous EL names are detected by the container when the application is initialized. Suppose two beans are both available for injection in a certain war, and either:
- • the two beans have the same EL name and the name is not resolvable, or
- • the EL name of one bean is of the form x.y, where y is a valid bean EL name, and x is the EL name of the other bean,
- the container automatically detects the problem and treats it as a deployment problem.
-
-5.4.1. Unproxyable bean types
-- If an injection point whose declared type cannot be proxied by the container resolves to a bean with a normal scope,
- the container automatically detects the problem and treats it as a deployment problem.
-
-8.3. Decorator resolution
-- If a decorator matches a managed bean, and the managed bean class is declared final, the container automatically detects
- the problem and treats it as a deployment problem.
-
+5.3.1. Ambiguous EL names
+- All unresolvable ambiguous EL names are detected by the container when the application is initialized. Suppose two beans are both available for injection in a certain war, and either:
+ • the two beans have the same EL name and the name is not resolvable, or
+ • the EL name of one bean is of the form x.y, where y is a valid bean EL name, and x is the EL name of the other bean,
+ the container automatically detects the problem and treats it as a deployment problem.
+
+8.3. Decorator resolution
+- If a decorator matches a managed bean, and the managed bean class is declared final, the container automatically detects
+ the problem and treats it as a deployment problem.
+- If a decorator matches a managed bean with a non-static, non-private, final method, and the decorator also implements that method,
+ the container automatically detects the problem and treats it as a deployment problem.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties 2010-12-01 12:58:18 UTC (rev 27047)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties 2010-12-01 13:28:17 UTC (rev 27048)
@@ -11,6 +11,8 @@
UNPROXYABLE_BEAN_TYPE_WITH_NPC=Injection point declares a class {0} with a non-private constructor with no parameters (such a class cannot be proxied by the container) resolves to a bean {1} with a normal scope [JSR-299 �5.4.1]
UNPROXYABLE_BEAN_FINAL_TYPE=Injection point declares a final class {0} that cannot be proxied by the container resolves to a bean {1} with a normal scope [JSR-299 �5.4.1]
UNPROXYABLE_BEAN_TYPE_WITH_FM=Injection point declares a class {0} with final methods (such a class cannot be proxied by the container) resolves to a bean {1} with a normal scope [JSR-299 �5.4.1]
+DECORATOR_RESOLVES_TO_FINAL_CLASS=Decorator must not be bound to a managed bean implemented by a class {0} which is declared final [JSR-299 �8.3]
+DECORATOR_RESOLVES_TO_FINAL_METHOD=Decorator matches a managed bean {0} with a non-static, non-private, final method {1}, and the decorator also implements that method [JSR-299 �8.3]
ILLEGAL_TYPE_IN_TYPED_DECLARATION=Bean specifies a @Typed annotation, and the value member specifies a class which does not correspond to a type in the unrestricted set of bean types of a bean [JSR-299 �2.2.2]
ILLEGAL_TYPE_IN_TYPED_DECLARATION_IN_BEAN_CLASS=Bean class specifies a @Typed annotation, and the value member specifies a class which does not correspond to a type in the unrestricted set of bean types of a bean [JSR-299 �2.2.2]
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-12-01 12:58:18 UTC (rev 27047)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-12-01 13:28:17 UTC (rev 27048)
@@ -119,6 +119,7 @@
{CDIPreferences.MISSING_INTERCEPTOR_BINDING, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingInterceptorBinding_label},
{CDIPreferences.INJECTED_DECORATOR, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_injectedDecorator_label},
{CDIPreferences.INJECTED_INTERCEPTOR, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_injectedInterceptor_label},
+ {CDIPreferences.INJECTED_INTERCEPTOR, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_decoratorResolvesToFinalBean_label},
},
CDICorePlugin.PLUGIN_ID
);
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.java 2010-12-01 12:58:18 UTC (rev 27047)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.java 2010-12-01 13:28:17 UTC (rev 27048)
@@ -106,6 +106,7 @@
public static String CDIValidatorConfigurationBlock_pb_missingInterceptorBinding_label;
public static String CDIValidatorConfigurationBlock_pb_injectedDecorator_label;
public static String CDIValidatorConfigurationBlock_pb_injectedInterceptor_label;
+ public static String CDIValidatorConfigurationBlock_pb_decoratorResolvesToFinalBean_label;
// Specializing
public static String CDIValidatorConfigurationBlock_section_specializing;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.properties 2010-12-01 12:58:18 UTC (rev 27047)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.properties 2010-12-01 13:28:17 UTC (rev 27048)
@@ -95,6 +95,7 @@
CDIValidatorConfigurationBlock_pb_missingInterceptorBinding_label=Missing interceptor binding:
CDIValidatorConfigurationBlock_pb_injectedDecorator_label=Decorator can not be injected:
CDIValidatorConfigurationBlock_pb_injectedInterceptor_label=Interceptor can not be injected:
+CDIValidatorConfigurationBlock_pb_decoratorResolvesToFinalBean_label=Decorator bound to managed bean w/ final method/class:
##Specializing
CDIValidatorConfigurationBlock_section_specializing=Specializing
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java 2010-12-01 12:58:18 UTC (rev 27047)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java 2010-12-01 13:28:17 UTC (rev 27048)
@@ -133,4 +133,28 @@
IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/lookup/clientProxy/unproxyable/finalMethod/FishFarm.java");
assertMarkerIsCreated(file, MessageFormat.format(CDIValidationMessages.UNPROXYABLE_BEAN_TYPE_WITH_FM, "Tuna_Broken", "Tuna_Broken"), 23);
}
+
+ /**
+ * 8.3 - Decorator resolution
+ * - If a decorator matches a managed bean, and the managed bean class is declared final, the container automatically detects
+ * the problem and treats it as a deployment problem.
+ *
+ * @throws Exception
+ */
+ public void testAppliesToFinalManagedBeanClass() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanClass/TimestampLogger.java");
+ assertMarkerIsCreated(file, MessageFormat.format(CDIValidationMessages.DECORATOR_RESOLVES_TO_FINAL_CLASS, "MockLogger"), 31);
+ }
+
+ /**
+ * 8.3 - Decorator resolution
+ * - If a decorator matches a managed bean with a non-static, non-private, final method, and the decorator also implements that method,
+ * the container automatically detects the problem and treats it as a deployment problem.
+ *
+ * @throws Exception
+ */
+ public void testAppliesToFinalMethodOnManagedBeanClass() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/decorators/definition/broken/finalBeanMethod/TimestampLogger.java");
+ assertMarkerIsCreated(file, MessageFormat.format(CDIValidationMessages.DECORATOR_RESOLVES_TO_FINAL_METHOD, "MockLogger", "log(String string)"), 31);
+ }
}
\ No newline at end of file
14 years