JBoss Tools SVN: r29669 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2011-03-10 15:28:04 -0500 (Thu, 10 Mar 2011)
New Revision: 29669
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditorPart.java
Log:
JBIDE-5666
Visual Editor should use predefined commands for swithcing between sub-tabs: Alt+PageDown/PageUp instead of catching Ctrl+PageUp/PadeDown
The Ctrl-PgDn/PgUp tab switching is replaced by Alt-PgDn/PgUp (defined by the editors general preferences)
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditorPart.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditorPart.java 2011-03-10 20:27:17 UTC (rev 29668)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPMultiPageEditorPart.java 2011-03-10 20:28:04 UTC (rev 29669)
@@ -13,7 +13,11 @@
import java.util.ArrayList;
import java.util.Iterator;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.util.Assert;
import org.eclipse.jface.util.SafeRunnable;
import org.eclipse.jface.viewers.ISelectionProvider;
@@ -23,12 +27,15 @@
import org.eclipse.swt.custom.CTabItem;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.TraverseEvent;
+import org.eclipse.swt.events.TraverseListener;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Item;
import org.eclipse.ui.IEditorActionBarContributor;
import org.eclipse.ui.IEditorInput;
@@ -39,10 +46,12 @@
import org.eclipse.ui.IPropertyListener;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.handlers.IHandlerService;
import org.eclipse.ui.part.EditorPart;
import org.eclipse.ui.part.MultiPageEditorActionBarContributor;
import org.eclipse.ui.part.MultiPageEditorSite;
import org.eclipse.ui.part.MultiPageSelectionProvider;
+import org.eclipse.ui.part.PageSwitcher;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
import org.jboss.tools.common.core.resources.XModelObjectEditorInput;
import org.jboss.tools.jst.jsp.selection.bar.SelectionBar;
@@ -51,6 +60,8 @@
*
*/
public abstract class JSPMultiPageEditorPart extends EditorPart {
+ private static final String COMMAND_NEXT_SUB_TAB = "org.eclipse.ui.navigate.nextSubTab"; //$NON-NLS-1$
+ private static final String COMMAND_PREVIOUS_SUB_TAB = "org.eclipse.ui.navigate.previousSubTab"; //$NON-NLS-1$
private CTabFolder tabFolderContainer;
@@ -144,6 +155,20 @@
pageChange(newPageIndex);
}
});
+ newContainer.addTraverseListener(new TraverseListener() {
+ // Switching tabs by Ctrl+PageUp/PageDown must not be caught on the inner tab set
+ public void keyTraversed(TraverseEvent e) {
+ switch (e.detail) {
+ case SWT.TRAVERSE_PAGE_NEXT:
+ case SWT.TRAVERSE_PAGE_PREVIOUS:
+ int detail = e.detail;
+ e.doit = true;
+ e.detail = SWT.TRAVERSE_NONE;
+ Control control = newContainer.getParent();
+ control.traverse(detail, new Event());
+ }
+ }
+ });
return newContainer;
}
@@ -166,8 +191,93 @@
// done
if (getActivePage() == -1)
setActivePage(0);
+
+ initializePageSwitching();
+ initializeSubTabSwitching();
}
+ /*
+ * Initialize the MultiPageEditorPart to use the page switching command.
+ */
+ protected void initializePageSwitching() {
+ new PageSwitcher(this) {
+ public Object[] getPages() {
+ int pageCount = getPageCount();
+ Object[] result = new Object[pageCount];
+ for (int i = 0; i < pageCount; i++) {
+ result[i] = new Integer(i);
+ }
+ return result;
+ }
+
+ public String getName(Object page) {
+ return getPageText(((Integer) page).intValue());
+ }
+
+ public ImageDescriptor getImageDescriptor(Object page) {
+ Image image = getPageImage(((Integer) page).intValue());
+ if (image == null)
+ return null;
+
+ return ImageDescriptor.createFromImage(image);
+ }
+
+ public void activatePage(Object page) {
+ setActivePage(((Integer) page).intValue());
+ }
+
+ public int getCurrentPageIndex() {
+ return getActivePage();
+ }
+ };
+ }
+
+ /*
+ * Initialize the MultiPageEditorPart to use the sub-tab switching commands.
+ */
+ private void initializeSubTabSwitching() {
+ IHandlerService service = (IHandlerService) getSite().getService(IHandlerService.class);
+ service.activateHandler(COMMAND_NEXT_SUB_TAB, new AbstractHandler() {
+ /**
+ * {@inheritDoc}
+ * @throws ExecutionException
+ * if an exception occurred during execution
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ int n= getPageCount();
+ if (n == 0)
+ return null;
+
+ int i= getActivePage() + 1;
+ if (i >= n)
+ i= 0;
+ setActivePage(i);
+ pageChange(i);
+ return null;
+ }
+ });
+
+ service.activateHandler(COMMAND_PREVIOUS_SUB_TAB, new AbstractHandler() {
+ /**
+ * {@inheritDoc}
+ * @throws ExecutionException
+ * if an exception occurred during execution
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ int n= getPageCount();
+ if (n == 0)
+ return null;
+
+ int i= getActivePage() - 1;
+ if (i < 0)
+ i= n - 1;
+ setActivePage(i);
+ pageChange(i);
+ return null;
+ }
+ });
+ }
+
protected abstract IEditorSite createSite(IEditorPart editor);
public void dispose() {
13 years, 10 months
JBoss Tools SVN: r29668 - trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2011-03-10 15:27:17 -0500 (Thu, 10 Mar 2011)
New Revision: 29668
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java
Log:
https://issues.jboss.org/browse/JBIDE-7308 : VPE Part should not show exceptions but readable explanation why it cannot be loaded
- Non ASCII character 'x' (cyrillic) is replaced by ASCII 'x'.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java 2011-03-10 20:21:35 UTC (rev 29667)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java 2011-03-10 20:27:17 UTC (rev 29668)
@@ -78,7 +78,7 @@
private static final Set<String> OFFICIALLY_SUPPORTED_PLATFORM_IDS = new HashSet<String>();
static {
Collections.addAll(OFFICIALLY_SUPPORTED_PLATFORM_IDS,
- "carbon.macosx.�86", //$NON-NLS-1$
+ "carbon.macosx.x86", //$NON-NLS-1$
"cocoa.macosx.x86", //$NON-NLS-1$
"gtk.linux.x86", //$NON-NLS-1$
"gtk.linux.x86_64", //$NON-NLS-1$
13 years, 10 months
JBoss Tools SVN: r29667 - branches/jbosstools-3.2.x/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2011-03-10 15:21:35 -0500 (Thu, 10 Mar 2011)
New Revision: 29667
Modified:
branches/jbosstools-3.2.x/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java
Log:
https://issues.jboss.org/browse/JBIDE-7308 : VPE Part should not show exceptions but readable explanation why it cannot be loaded
- Checking for 32-bit Java is added to MacOS X.
Modified: branches/jbosstools-3.2.x/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java
===================================================================
--- branches/jbosstools-3.2.x/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java 2011-03-10 20:19:19 UTC (rev 29666)
+++ branches/jbosstools-3.2.x/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java 2011-03-10 20:21:35 UTC (rev 29667)
@@ -75,26 +75,31 @@
public static final long NS_ERROR_FAILURE = 0x80004005L;
private static final String XULRUNNER_ENTRY = "/xulrunner"; //$NON-NLS-1$
- public static final Set<String> OFFICIALLY_SUPPORTED_PLATFORM_IDS = new HashSet<String>();
+ private static final Set<String> OFFICIALLY_SUPPORTED_PLATFORM_IDS = new HashSet<String>();
static {
Collections.addAll(OFFICIALLY_SUPPORTED_PLATFORM_IDS,
- "carbon.macosx", //$NON-NLS-1$
- "cocoa.macosx", //$NON-NLS-1$
+ "carbon.macosx.x86", //$NON-NLS-1$
+ "cocoa.macosx.x86", //$NON-NLS-1$
"gtk.linux.x86", //$NON-NLS-1$
"gtk.linux.x86_64", //$NON-NLS-1$
"win32.win32.x86"); //$NON-NLS-1$
}
- public static final String CURRENT_PLATFORM_ID;
+ public static final String CURRENT_PLATFORM_ID = Platform.getWS() + '.'
+ + Platform.getOS() + '.' + Platform.getOSArch();
+
private static final Mozilla mozilla;
static {
StringBuffer buff = new StringBuffer();
- buff.append(Platform.getWS())
- .append('.').append(Platform.getOS());
+ buff.append("org.mozilla.xulrunner.") //$NON-NLS-1$
+ .append(Platform.getWS()).append('.')
+ .append(Platform.getOS());
+
+ /* XULRunner bundle names do not have
+ * '.x86' postfix for Mac OS X. */
if(! Platform.OS_MACOSX.equals(Platform.getOS())) {
buff.append('.').append(Platform.getOSArch());
}
- CURRENT_PLATFORM_ID = buff.toString();
- XULRUNNER_BUNDLE = "org.mozilla.xulrunner." + CURRENT_PLATFORM_ID; //$NON-NLS-1$
+ XULRUNNER_BUNDLE = buff.toString();
mozilla = Mozilla.getInstance();
}
@@ -475,7 +480,7 @@
/**
* Return {@code true} if and only if the current
- * platform is officially supported in JBoss Tools.
+ * platform is officially supported by the Visual Page Editor.
* But {@code false} does not necessary mean that XULRunner
* cannot be run on the system.
*
13 years, 10 months
JBoss Tools SVN: r29666 - trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-03-10 15:19:19 -0500 (Thu, 10 Mar 2011)
New Revision: 29666
Modified:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/ProblemBuffer.java
Log:
JBIDE-8549
https://issues.jboss.org/browse/JBIDE-8549
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/ProblemBuffer.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/ProblemBuffer.java 2011-03-10 20:11:36 UTC (rev 29665)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/ProblemBuffer.java 2011-03-10 20:19:19 UTC (rev 29666)
@@ -12,12 +12,12 @@
import java.io.File;
-import org.eclipse.core.internal.runtime.PlatformLogWriter;
-import org.eclipse.core.runtime.ILogListener;
-import org.eclipse.core.runtime.IStatus;
+//import org.eclipse.core.internal.runtime.PlatformLogWriter;
+//import org.eclipse.core.runtime.ILogListener;
+//import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.adaptor.EclipseLog;
-import org.eclipse.osgi.framework.log.FrameworkLog;
+//import org.eclipse.core.runtime.adaptor.EclipseLog;
+//import org.eclipse.osgi.framework.log.FrameworkLog;
import org.jboss.tools.common.util.FileUtil;
import org.osgi.framework.Bundle;
@@ -29,14 +29,15 @@
ProblemBuffer() {}
+ //TODO remove dead commented code.
/**
* IProblemReporter implementation.
* @param status
*/
- public void writeToBuffer(IStatus status) {
- getEclipseLog();
- writer.logging(status, "org.jboss.tools.common"); //$NON-NLS-1$
- }
+// public void writeToBuffer(IStatus status) {
+// getEclipseLog();
+// writer.logging(status, "org.jboss.tools.common"); //$NON-NLS-1$
+// }
/**
* Returns number of entries in .log file.
@@ -102,16 +103,16 @@
Submit.getInstance().submit(reportText, cleanBuffer);
}
- FrameworkLog log;
- ILogListener writer;
+// FrameworkLog log;
+// ILogListener writer;
- private FrameworkLog getEclipseLog() {
- if(log == null) {
- log = new EclipseLog(getLogFile());
- writer = new PlatformLogWriter(log);
- }
- return log;
- }
+// private FrameworkLog getEclipseLog() {
+// if(log == null) {
+// log = new EclipseLog(getLogFile());
+// writer = new PlatformLogWriter(log);
+// }
+// return log;
+// }
private File getLogFile() {
Bundle b = Platform.getBundle("org.jboss.tools.common"); //$NON-NLS-1$
13 years, 10 months
JBoss Tools SVN: r29665 - branches/jbosstools-3.2.x/build/parent.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-03-10 15:11:36 -0500 (Thu, 10 Mar 2011)
New Revision: 29665
Modified:
branches/jbosstools-3.2.x/build/parent/pom.xml
Log:
add jboss composite dep mirror back in
Modified: branches/jbosstools-3.2.x/build/parent/pom.xml
===================================================================
--- branches/jbosstools-3.2.x/build/parent/pom.xml 2011-03-10 19:52:22 UTC (rev 29664)
+++ branches/jbosstools-3.2.x/build/parent/pom.xml 2011-03-10 20:11:36 UTC (rev 29665)
@@ -803,13 +803,13 @@
<enabled>true</enabled>
</releases>
</repository>
- <!-- repository>
+ <repository>
<id>jboss-requirements-composite-mirror</id>
<url>http://download.jboss.org/jbosstools/updates/helios/</url>
<layout>p2</layout>
<snapshots> <enabled>true</enabled> </snapshots>
<releases> <enabled>true</enabled> </releases>
- </repository-->
+ </repository>
</repositories>
</profile>
13 years, 10 months
JBoss Tools SVN: r29664 - in branches/jbosstools-3.2.x/cdi: plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-03-10 14:52:22 -0500 (Thu, 10 Mar 2011)
New Revision: 29664
Modified:
branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java
branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java
branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java
branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt
branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.java
branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.properties
branches/jbosstools-3.2.x/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/WeldJarTest.java
branches/jbosstools-3.2.x/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java
Log:
https://issues.jboss.org/browse/JBIDE-3126: Validate the serializability of beans injected into passivating-scoped beans.
Modified: branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java
===================================================================
--- branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java 2011-03-10 19:42:17 UTC (rev 29663)
+++ branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java 2011-03-10 19:52:22 UTC (rev 29664)
@@ -51,6 +51,7 @@
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.put(CDIPreferences.NOT_PASSIVATION_CAPABLE_BEAN, CDIPreferences.WARNING);
// defaultPreferences.put(CDIPreferences.INCONSISTENT_SPECIALIZATION, CDIPreferences.WARNING);
defaultPreferences.putInt(SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME, SeverityPreferences.DEFAULT_MAX_NUMBER_OF_MARKERS_PER_FILE);
}
Modified: branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java
===================================================================
--- branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java 2011-03-10 19:42:17 UTC (rev 29663)
+++ branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java 2011-03-10 19:52:22 UTC (rev 29664)
@@ -81,7 +81,10 @@
public static final String MISSING_NONBINDING_IN_INTERCEPTOR_BINDING_TYPE_MEMBER = INSTANCE.createSeverityOption("missingNonbindingInInterceptorBindingTypeMember"); //$NON-NLS-1$
public static final String MISSING_OR_INCORRECT_TARGET_OR_RETENTION_IN_ANNOTATION_TYPE = INSTANCE.createSeverityOption("missingOrIncorrectTargetOrRetentionInAnnotationType"); //$NON-NLS-1$
-
+// Section 6.6.4 - Validation of passivation capable beans and dependencies
+// - If a managed bean which declares a passivating scope is not passivation capable, then the container automatically detects the problem and treats it as a deployment problem.
+ public static final String NOT_PASSIVATION_CAPABLE_BEAN = INSTANCE.createSeverityOption("notPassivationCapableBean"); //$NON-NLS-1$
+
//Scope group
// - bean class or producer method or field specifies multiple scope type annotations (2.4.3)
Modified: branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2011-03-10 19:42:17 UTC (rev 29663)
+++ branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2011-03-10 19:52:22 UTC (rev 29664)
@@ -1667,12 +1667,13 @@
CDICorePlugin.getDefault().logError(e);
}
}
- /*
- * 9.3. Binding an interceptor to a bean
- * - managed bean has a class level interceptor binding and is declared final or has a non-static, non-private, final method
- * - non-static, non-private, final method of a managed bean has a method level interceptor binding
- */
+
try {
+ /*
+ * 9.3. Binding an interceptor to a bean
+ * - managed bean has a class level interceptor binding and is declared final or has a non-static, non-private, final method
+ * - non-static, non-private, final method of a managed bean has a method level interceptor binding
+ */
Set<IInterceptorBinding> bindings = bean.getInterceptorBindings();
if(!bindings.isEmpty()) {
if(Flags.isFinal(bean.getBeanClass().getFlags())) {
@@ -1706,6 +1707,42 @@
}
}
}
+
+ /*
+ * 6.6.4 Validation of passivation capable beans and dependencies
+ * - If a managed bean which declares a passivating scope is not passivation capable, then the container automatically detects the problem and treats it as a deployment problem.
+ */
+ IScope scope = bean.getScope();
+ if(scope!=null && scope.isNorlmalScope()) {
+ IAnnotationDeclaration normalScopeDeclaration = scope.getAnnotationDeclaration(CDIConstants.NORMAL_SCOPE_ANNOTATION_TYPE_NAME);
+ if(normalScopeDeclaration!=null) {
+ IAnnotation annt = normalScopeDeclaration.getDeclaration();
+ if(annt!=null) {
+ boolean passivatingScope = false;
+ IMemberValuePair[] pairs = annt.getMemberValuePairs();
+ for (IMemberValuePair pair : pairs) {
+ if("passivating".equals(pair.getMemberName()) && "true".equalsIgnoreCase("" + pair.getValue())) {
+ passivatingScope = true;
+ break;
+ }
+ }
+ if(passivatingScope) {
+ boolean passivatingCapable = false;
+ Set<IParametedType> supers = bean.getAllTypes();
+ for (IParametedType type : supers) {
+ if("java.io.Serializable".equals(type.getType().getFullyQualifiedName())) {
+ passivatingCapable = true;
+ break;
+ }
+ }
+ if(!passivatingCapable) {
+ ITextSourceReference reference = CDIUtil.convertToSourceReference(bean.getBeanClass().getNameRange());
+ addError(MessageFormat.format(CDIValidationMessages.NOT_PASSIVATION_CAPABLE_BEAN, bean.getSimpleJavaName(), scope.getSourceType().getElementName()), CDIPreferences.NOT_PASSIVATION_CAPABLE_BEAN, reference, bean.getResource());
+ }
+ }
+ }
+ }
+ }
} catch (JavaModelException e) {
CDICorePlugin.getDefault().logError(e);
}
Modified: branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java
===================================================================
--- branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java 2011-03-10 19:42:17 UTC (rev 29663)
+++ branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java 2011-03-10 19:52:22 UTC (rev 29664)
@@ -65,6 +65,7 @@
public static String ILLEGAL_TARGET_IN_STEREOTYPE_TYPE_MF;
public static String ILLEGAL_TARGET_IN_INTERCEPTOR_BINDING_TYPE;
public static String ILLEGAL_TARGET_IN_INTERCEPTOR_BINDING_TYPE_FOR_STEREOTYPE;
+ public static String NOT_PASSIVATION_CAPABLE_BEAN;
public static String MULTIPLE_SCOPE_TYPE_ANNOTATIONS;
public static String MULTIPLE_SCOPE_TYPE_ANNOTATIONS_IN_BEAN_CLASS;
Modified: branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt
===================================================================
--- branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt 2011-03-10 19:42:17 UTC (rev 29663)
+++ branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt 2011-03-10 19:52:22 UTC (rev 29664)
@@ -211,6 +211,9 @@
c) Primitive types cannot be proxied by the container.
d) Array types cannot be proxied by the container.
+6.6.4 Validation of passivation capable beans and dependencies
+- If a managed bean which declares a passivating scope is not passivation capable, then 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.
Modified: branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
===================================================================
--- branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2011-03-10 19:42:17 UTC (rev 29663)
+++ branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2011-03-10 19:52:22 UTC (rev 29664)
@@ -57,6 +57,7 @@
{CDIPreferences.MISSING_NONBINDING_IN_QUALIFIER_TYPE_MEMBER, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingNonbindingInQualifierTypeMember_label},
{CDIPreferences.MISSING_NONBINDING_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingNonbindingInInterceptorBindingTypeMember_label},
{CDIPreferences.MISSING_OR_INCORRECT_TARGET_OR_RETENTION_IN_ANNOTATION_TYPE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingOrIncorrectTargetOrRetentionInAnnotationType_label},
+ {CDIPreferences.NOT_PASSIVATION_CAPABLE_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_notPassivationCapableBean_label},
},
CDICorePlugin.PLUGIN_ID
);
Modified: branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.java
===================================================================
--- branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.java 2011-03-10 19:42:17 UTC (rev 29663)
+++ branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.java 2011-03-10 19:52:22 UTC (rev 29664)
@@ -56,6 +56,7 @@
public static String CDIValidatorConfigurationBlock_pb_missingNonbindingInQualifierTypeMember_label;
public static String CDIValidatorConfigurationBlock_pb_missingNonbindingInInterceptorBindingTypeMember_label;
public static String CDIValidatorConfigurationBlock_pb_missingOrIncorrectTargetOrRetentionInAnnotationType_label;
+ public static String CDIValidatorConfigurationBlock_pb_notPassivationCapableBean_label;
// Scope
public static String CDIValidatorConfigurationBlock_section_scope;
Modified: branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.properties
===================================================================
--- branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.properties 2011-03-10 19:42:17 UTC (rev 29663)
+++ branches/jbosstools-3.2.x/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.properties 2011-03-10 19:52:22 UTC (rev 29664)
@@ -45,6 +45,7 @@
CDIValidatorConfigurationBlock_pb_missingNonbindingInQualifierTypeMember_label=Missing @Nonbinding in qualifier type member:
CDIValidatorConfigurationBlock_pb_missingNonbindingInInterceptorBindingTypeMember_label=Missing @Nonbinding in interceptor binding type member:
CDIValidatorConfigurationBlock_pb_missingOrIncorrectTargetOrRetentionInAnnotationType_label=Missing or incorrect @Target or @Retention in an annotation type:
+CDIValidatorConfigurationBlock_pb_notPassivationCapableBean_label=Not passivation capable managed bean w/ passivating scope:
##Scope
CDIValidatorConfigurationBlock_section_scope=Scope
Modified: branches/jbosstools-3.2.x/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/WeldJarTest.java
===================================================================
--- branches/jbosstools-3.2.x/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/WeldJarTest.java 2011-03-10 19:42:17 UTC (rev 29663)
+++ branches/jbosstools-3.2.x/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/WeldJarTest.java 2011-03-10 19:52:22 UTC (rev 29664)
@@ -1,7 +1,5 @@
package org.jboss.tools.cdi.core.test;
-
-
import java.io.IOException;
import java.util.Set;
@@ -9,7 +7,6 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
@@ -32,7 +29,6 @@
public WeldJarTest() {}
public void setUp() throws Exception {
- System.out.println("setUUUUUUUUUUUp");
project1 = ResourcesUtils.importProject(PLUGIN_ID, "/projects/CDITest1");
JobUtils.waitForIdle();
project1.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
Modified: branches/jbosstools-3.2.x/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java
===================================================================
--- branches/jbosstools-3.2.x/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java 2011-03-10 19:42:17 UTC (rev 29663)
+++ branches/jbosstools-3.2.x/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java 2011-03-10 19:52:22 UTC (rev 29664)
@@ -242,4 +242,16 @@
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);
}
+
+ /**
+ * 6.6.4 Validation of passivation capable beans and dependencies
+ * - If a managed bean which declares a passivating scope is not passivation capable, then the container automatically detects the problem and treats it as a deployment problem.
+ *
+ * See https://issues.jboss.org/browse/JBIDE-3126
+ * @throws Exception
+ */
+ public void testSimpleWebBeanWithNonSerializableImplementationClassFails() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/context/passivating/broken/nonPassivationCapableManagedBeanHasPassivatingScope/Hamina_Broken.java");
+ assertMarkerIsCreated(file, MessageFormat.format(CDIValidationMessages.NOT_PASSIVATION_CAPABLE_BEAN, "Hamina_Broken", "SessionScoped"), 22);
+ }
}
\ No newline at end of file
13 years, 10 months
JBoss Tools SVN: r29663 - branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2011-03-10 14:42:17 -0500 (Thu, 10 Mar 2011)
New Revision: 29663
Modified:
branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/AbstractCSSDialog.java
Log:
https://issues.jboss.org/browse/JBIDE-8414 : Preview Edit is not working for New CSS Class Dialog
- fixed. correct event checking is used
Modified: branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/AbstractCSSDialog.java
===================================================================
--- branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/AbstractCSSDialog.java 2011-03-10 19:31:11 UTC (rev 29662)
+++ branches/jbosstools-3.2.x/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/dialog/AbstractCSSDialog.java 2011-03-10 19:42:17 UTC (rev 29663)
@@ -165,9 +165,14 @@
browser = CSSBrowser.createCSSBrowser(previewComposite, SWT.BORDER | SWT.MOZILLA);
browser.setText(generateBrowserPage());
browser.setLayoutData(gridData);
+
browser.addMouseListener(new MouseAdapter() {
+ /* TODO: yradtsevich: Deduplicate code. Method
+ * org.jboss.tools.jst.css.view.CSSPreview.createPartControl(Composite)
+ * has the same MouseListener in it.
+ * This duplicate code may cause issues like JBIDE-8414 */
public void mouseDoubleClick(MouseEvent e) {
- if (e.widget == browser) {
+ if (browser.isBrowserEvent(e)) {
browser.setEnabled(false);
previewComposite.setMaximizedControl(previewText);
previewText.setFocus();
13 years, 10 months
JBoss Tools SVN: r29662 - in trunk/cdi: plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-03-10 14:31:11 -0500 (Thu, 10 Mar 2011)
New Revision: 29662
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/WeldJarTest.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java
Log:
https://issues.jboss.org/browse/JBIDE-3126: Validate the serializability of beans injected into passivating-scoped beans.
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 2011-03-10 10:34:47 UTC (rev 29661)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java 2011-03-10 19:31:11 UTC (rev 29662)
@@ -51,6 +51,7 @@
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.put(CDIPreferences.NOT_PASSIVATION_CAPABLE_BEAN, CDIPreferences.WARNING);
// defaultPreferences.put(CDIPreferences.INCONSISTENT_SPECIALIZATION, CDIPreferences.WARNING);
defaultPreferences.putInt(SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME, SeverityPreferences.DEFAULT_MAX_NUMBER_OF_MARKERS_PER_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 2011-03-10 10:34:47 UTC (rev 29661)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java 2011-03-10 19:31:11 UTC (rev 29662)
@@ -81,7 +81,10 @@
public static final String MISSING_NONBINDING_IN_INTERCEPTOR_BINDING_TYPE_MEMBER = INSTANCE.createSeverityOption("missingNonbindingInInterceptorBindingTypeMember"); //$NON-NLS-1$
public static final String MISSING_OR_INCORRECT_TARGET_OR_RETENTION_IN_ANNOTATION_TYPE = INSTANCE.createSeverityOption("missingOrIncorrectTargetOrRetentionInAnnotationType"); //$NON-NLS-1$
-
+// Section 6.6.4 - Validation of passivation capable beans and dependencies
+// - If a managed bean which declares a passivating scope is not passivation capable, then the container automatically detects the problem and treats it as a deployment problem.
+ public static final String NOT_PASSIVATION_CAPABLE_BEAN = INSTANCE.createSeverityOption("notPassivationCapableBean"); //$NON-NLS-1$
+
//Scope group
// - bean class or producer method or field specifies multiple scope type annotations (2.4.3)
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 2011-03-10 10:34:47 UTC (rev 29661)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2011-03-10 19:31:11 UTC (rev 29662)
@@ -1689,12 +1689,13 @@
CDICorePlugin.getDefault().logError(e);
}
}
- /*
- * 9.3. Binding an interceptor to a bean
- * - managed bean has a class level interceptor binding and is declared final or has a non-static, non-private, final method
- * - non-static, non-private, final method of a managed bean has a method level interceptor binding
- */
+
try {
+ /*
+ * 9.3. Binding an interceptor to a bean
+ * - managed bean has a class level interceptor binding and is declared final or has a non-static, non-private, final method
+ * - non-static, non-private, final method of a managed bean has a method level interceptor binding
+ */
Set<IInterceptorBinding> bindings = bean.getInterceptorBindings();
if(!bindings.isEmpty()) {
if(Flags.isFinal(bean.getBeanClass().getFlags())) {
@@ -1728,6 +1729,42 @@
}
}
}
+
+ /*
+ * 6.6.4 Validation of passivation capable beans and dependencies
+ * - If a managed bean which declares a passivating scope is not passivation capable, then the container automatically detects the problem and treats it as a deployment problem.
+ */
+ IScope scope = bean.getScope();
+ if(scope!=null && scope.isNorlmalScope()) {
+ IAnnotationDeclaration normalScopeDeclaration = scope.getAnnotationDeclaration(CDIConstants.NORMAL_SCOPE_ANNOTATION_TYPE_NAME);
+ if(normalScopeDeclaration!=null) {
+ IAnnotation annt = normalScopeDeclaration.getDeclaration();
+ if(annt!=null) {
+ boolean passivatingScope = false;
+ IMemberValuePair[] pairs = annt.getMemberValuePairs();
+ for (IMemberValuePair pair : pairs) {
+ if("passivating".equals(pair.getMemberName()) && "true".equalsIgnoreCase("" + pair.getValue())) {
+ passivatingScope = true;
+ break;
+ }
+ }
+ if(passivatingScope) {
+ boolean passivatingCapable = false;
+ Set<IParametedType> supers = bean.getAllTypes();
+ for (IParametedType type : supers) {
+ if("java.io.Serializable".equals(type.getType().getFullyQualifiedName())) {
+ passivatingCapable = true;
+ break;
+ }
+ }
+ if(!passivatingCapable) {
+ ITextSourceReference reference = CDIUtil.convertToSourceReference(bean.getBeanClass().getNameRange());
+ addError(MessageFormat.format(CDIValidationMessages.NOT_PASSIVATION_CAPABLE_BEAN, bean.getSimpleJavaName(), scope.getSourceType().getElementName()), CDIPreferences.NOT_PASSIVATION_CAPABLE_BEAN, reference, bean.getResource());
+ }
+ }
+ }
+ }
+ }
} catch (JavaModelException e) {
CDICorePlugin.getDefault().logError(e);
}
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 2011-03-10 10:34:47 UTC (rev 29661)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationMessages.java 2011-03-10 19:31:11 UTC (rev 29662)
@@ -65,6 +65,7 @@
public static String ILLEGAL_TARGET_IN_STEREOTYPE_TYPE_MF;
public static String ILLEGAL_TARGET_IN_INTERCEPTOR_BINDING_TYPE;
public static String ILLEGAL_TARGET_IN_INTERCEPTOR_BINDING_TYPE_FOR_STEREOTYPE;
+ public static String NOT_PASSIVATION_CAPABLE_BEAN;
public static String MULTIPLE_SCOPE_TYPE_ANNOTATIONS;
public static String MULTIPLE_SCOPE_TYPE_ANNOTATIONS_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 2011-03-10 10:34:47 UTC (rev 29661)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/errorList.txt 2011-03-10 19:31:11 UTC (rev 29662)
@@ -211,6 +211,9 @@
c) Primitive types cannot be proxied by the container.
d) Array types cannot be proxied by the container.
+6.6.4 Validation of passivation capable beans and dependencies
+- If a managed bean which declares a passivating scope is not passivation capable, then 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.
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 2011-03-10 10:34:47 UTC (rev 29661)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/messages.properties 2011-03-10 19:31:11 UTC (rev 29662)
@@ -44,6 +44,7 @@
ILLEGAL_TARGET_IN_STEREOTYPE_TYPE_MF=Stereotype {0} is defined as @Target(TYPE) and may not be applied to stereotype {1} which is defined as @Target('{METHOD, FIELD}') [JSR-299 �2.7.1.5]
ILLEGAL_TARGET_IN_INTERCEPTOR_BINDING_TYPE=Interceptor binding type {0} is defined as @Target(TYPE) and may not be applied to interceptor binding type {1} which is defined as @Target('{TYPE, METHOD}') [JSR-299 �9.1.1]
ILLEGAL_TARGET_IN_INTERCEPTOR_BINDING_TYPE_FOR_STEREOTYPE=Stereotype {0} must be defined as @Target(TYPE) since it declares interceptor bindings ({1}) [JSR-299 �9.1.2]
+NOT_PASSIVATION_CAPABLE_BEAN=Managed bean {0} which declares a passivating scope {1} must be passivation capable [JSR-299 �6.6.4]
MULTIPLE_SCOPE_TYPE_ANNOTATIONS=Bean class or producer method or field specifies multiple scope type annotations [JSR-299 �2.4.3]
MULTIPLE_SCOPE_TYPE_ANNOTATIONS_IN_BEAN_CLASS=Bean class specifies multiple scope type annotations [JSR-299 �2.4.3]
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 2011-03-10 10:34:47 UTC (rev 29661)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2011-03-10 19:31:11 UTC (rev 29662)
@@ -57,6 +57,7 @@
{CDIPreferences.MISSING_NONBINDING_IN_QUALIFIER_TYPE_MEMBER, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingNonbindingInQualifierTypeMember_label},
{CDIPreferences.MISSING_NONBINDING_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingNonbindingInInterceptorBindingTypeMember_label},
{CDIPreferences.MISSING_OR_INCORRECT_TARGET_OR_RETENTION_IN_ANNOTATION_TYPE, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_missingOrIncorrectTargetOrRetentionInAnnotationType_label},
+ {CDIPreferences.NOT_PASSIVATION_CAPABLE_BEAN, CDIPreferencesMessages.CDIValidatorConfigurationBlock_pb_notPassivationCapableBean_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 2011-03-10 10:34:47 UTC (rev 29661)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.java 2011-03-10 19:31:11 UTC (rev 29662)
@@ -56,6 +56,7 @@
public static String CDIValidatorConfigurationBlock_pb_missingNonbindingInQualifierTypeMember_label;
public static String CDIValidatorConfigurationBlock_pb_missingNonbindingInInterceptorBindingTypeMember_label;
public static String CDIValidatorConfigurationBlock_pb_missingOrIncorrectTargetOrRetentionInAnnotationType_label;
+ public static String CDIValidatorConfigurationBlock_pb_notPassivationCapableBean_label;
// Scope
public static String CDIValidatorConfigurationBlock_section_scope;
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 2011-03-10 10:34:47 UTC (rev 29661)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIPreferencesMessages.properties 2011-03-10 19:31:11 UTC (rev 29662)
@@ -45,6 +45,7 @@
CDIValidatorConfigurationBlock_pb_missingNonbindingInQualifierTypeMember_label=Missing @Nonbinding in qualifier type member:
CDIValidatorConfigurationBlock_pb_missingNonbindingInInterceptorBindingTypeMember_label=Missing @Nonbinding in interceptor binding type member:
CDIValidatorConfigurationBlock_pb_missingOrIncorrectTargetOrRetentionInAnnotationType_label=Missing or incorrect @Target or @Retention in an annotation type:
+CDIValidatorConfigurationBlock_pb_notPassivationCapableBean_label=Not passivation capable managed bean w/ passivating scope:
##Scope
CDIValidatorConfigurationBlock_section_scope=Scope
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/WeldJarTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/WeldJarTest.java 2011-03-10 10:34:47 UTC (rev 29661)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/WeldJarTest.java 2011-03-10 19:31:11 UTC (rev 29662)
@@ -1,7 +1,5 @@
package org.jboss.tools.cdi.core.test;
-
-
import java.io.IOException;
import java.util.Set;
@@ -9,7 +7,6 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
@@ -32,7 +29,6 @@
public WeldJarTest() {}
public void setUp() throws Exception {
- System.out.println("setUUUUUUUUUUUp");
project1 = ResourcesUtils.importProject(PLUGIN_ID, "/projects/CDITest1");
JobUtils.waitForIdle();
project1.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
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 2011-03-10 10:34:47 UTC (rev 29661)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DeploymentProblemsValidationTests.java 2011-03-10 19:31:11 UTC (rev 29662)
@@ -281,4 +281,16 @@
ResourcesUtils.setBuildAutomatically(saveAutoBuild);
JobUtils.waitForIdle();
}
+
+ /**
+ * 6.6.4 Validation of passivation capable beans and dependencies
+ * - If a managed bean which declares a passivating scope is not passivation capable, then the container automatically detects the problem and treats it as a deployment problem.
+ *
+ * See https://issues.jboss.org/browse/JBIDE-3126
+ * @throws Exception
+ */
+ public void testSimpleWebBeanWithNonSerializableImplementationClassFails() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/context/passivating/broken/nonPassivationCapableManagedBeanHasPassivatingScope/Hamina_Broken.java");
+ assertMarkerIsCreated(file, MessageFormat.format(CDIValidationMessages.NOT_PASSIVATION_CAPABLE_BEAN, "Hamina_Broken", "SessionScoped"), 22);
+ }
}
\ No newline at end of file
13 years, 10 months
JBoss Tools SVN: r29661 - trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/testcase.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2011-03-10 05:34:47 -0500 (Thu, 10 Mar 2011)
New Revision: 29661
Modified:
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/testcase/SmooksProject.java
Log:
Smooks tests modifications reflecting BotExt API refactoring
Modified: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/testcase/SmooksProject.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/testcase/SmooksProject.java 2011-03-10 00:15:46 UTC (rev 29660)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/src/org/jboss/tools/smooks/ui/bot/testcase/SmooksProject.java 2011-03-10 10:34:47 UTC (rev 29661)
@@ -77,7 +77,7 @@
// Open Project Properties
open.viewOpen(ActionItem.View.GeneralProjectExplorer.LABEL);
projectExplorer.selectProject(Project.PROJECT_NAME);
- ContextMenuHelper.clickContextMenu(projectExplorer.tree(), "Properties");
+ ContextMenuHelper.clickContextMenu(projectExplorer.bot().tree(), "Properties");
// Add Library
eclipse.waitForShell("Properties for " + Project.PROJECT_NAME);
@@ -111,7 +111,7 @@
}
projectExplorer.selectProject(Project.PROJECT_NAME);
- ContextMenuHelper.clickContextMenu(projectExplorer.tree(), "Refresh");
+ ContextMenuHelper.clickContextMenu(projectExplorer.bot().tree(), "Refresh");
open.viewOpen(ActionItem.View.JavaPackageExplorer.LABEL);
@@ -136,7 +136,7 @@
open.viewOpen(ActionItem.View.GeneralProjectExplorer.LABEL);
projectExplorer.selectProject(Project.PROJECT_NAME);
- ContextMenuHelper.clickContextMenu(projectExplorer.tree(), "Refresh");
+ ContextMenuHelper.clickContextMenu(projectExplorer.bot().tree(), "Refresh");
open.viewOpen(ActionItem.View.JavaPackageExplorer.LABEL);
13 years, 10 months