JBoss Tools SVN: r27619 - in trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test: editor and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2010-12-20 12:56:58 -0500 (Mon, 20 Dec 2010)
New Revision: 27619
Added:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/StylesOnThePageTest.java
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/IncludedCssFilesJSPTest.java
Log:
Added StylesOnThePageTest
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2010-12-20 17:47:56 UTC (rev 27618)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAllBotTests.java 2010-12-20 17:56:58 UTC (rev 27619)
@@ -8,6 +8,7 @@
import org.jboss.tools.vpe.ui.bot.test.editor.EditingActionsTest;
import org.jboss.tools.vpe.ui.bot.test.editor.InsertActionsTest;
import org.jboss.tools.vpe.ui.bot.test.editor.MinMaxPanesTest;
+import org.jboss.tools.vpe.ui.bot.test.editor.StylesOnThePageTest;
import org.jboss.tools.vpe.ui.bot.test.editor.TextEditingActionsTest;
import org.jboss.tools.vpe.ui.bot.test.editor.ToggleCommentTest;
import org.jboss.tools.vpe.ui.bot.test.editor.VerificationOfNameSpacesTest;
@@ -92,6 +93,7 @@
suite.addTestSuite(IncludedCssFilesTest.class);
suite.addTestSuite(GlobalELVariablesTest.class);
suite.addTestSuite(IncludedCssFilesJSPTest.class);
+ suite.addTestSuite(StylesOnThePageTest.class);
return new TestSetup(suite);
}
Added: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/StylesOnThePageTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/StylesOnThePageTest.java (rev 0)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/StylesOnThePageTest.java 2010-12-20 17:56:58 UTC (rev 27619)
@@ -0,0 +1,158 @@
+/*******************************************************************************
+
+ * Copyright (c) 2007-2010 Exadel, Inc. and 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
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.vpe.ui.bot.test.editor;
+
+import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.widgetOfType;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.eclipse.swt.browser.Browser;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.hamcrest.Matcher;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.jboss.tools.ui.bot.ext.SWTUtilExt;
+import org.jboss.tools.ui.bot.ext.Timing;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.parts.SWTBotEditorExt;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.jboss.tools.ui.bot.ext.types.JobName;
+import org.jboss.tools.vpe.ui.bot.test.VPEAutoTestCase;
+
+/**
+ * Tests functionality of styles defined within page
+ * @author vlado pakan
+ *
+ */
+public class StylesOnThePageTest extends VPEEditorTestCase {
+
+ private static final String JSP_FILE_NAME = "stylesOnThePageTest.jsp";
+
+ public void testStylesOnThePage() throws IOException{
+ SWTBotTree tree = packageExplorer.show().bot().tree();
+ tree.expandNode(VPEAutoTestCase.JBT_TEST_PROJECT_NAME)
+ .expandNode("WebContent")
+ .getNode("pages")
+ .select();
+ open.newObject(ActionItem.NewObject.WebJSPFile.LABEL);
+ bot.shell(IDELabel.Shell.NEW_JSP_FILE).activate(); //$NON-NLS-1$
+ bot.textWithLabel(ActionItem.NewObject.WebJSPFile.TEXT_FILE_NAME).setText(StylesOnThePageTest.JSP_FILE_NAME); //$NON-NLS-1$
+ bot.button(IDELabel.Button.FINISH).click(); //$NON-NLS-1$
+ bot.sleep(Timing.time3S());
+ util.waitForJobs(JobName.BUILDING_WS);
+ SWTBotEditor jspEditor = bot.editorByTitle(StylesOnThePageTest.JSP_FILE_NAME);
+ String oldStyle = "background: lime;color: red;";
+ jspEditor.toTextEditor().setText("<%@ taglib uri=\"http://java.sun.com/jsf/html\" prefix=\"h\"%>\n" +
+ "<html>\n" +
+ " <head>\n" +
+ " <style type=\"text/css\">h3 {" +
+ oldStyle +
+ "}</style>\n" +
+ " </head>\n" +
+ " <body>\n" +
+ " <h3>\n" +
+ " Title Level 3\n" +
+ " </h3>\n" +
+ " </body>\n" +
+ "</html>");
+ jspEditor.save();
+ bot.sleep(Timing.time3S());
+ util.waitForJobs(JobName.BUILDING_WS);
+ // add CSS File Reference
+ bot.sleep(Timing.time3S());
+ SWTBotEditorExt botEditorExt = new SWTBotExt().swtBotEditorExtByTitle(StylesOnThePageTest.JSP_FILE_NAME);
+ botEditorExt.selectPage(IDELabel.VisualPageEditor.PREVIEW_TAB_LABEL);
+ Matcher<Browser> matcher = widgetOfType(Browser.class);
+ @SuppressWarnings("unchecked")
+ List<Browser> browsers = ((List<Browser>)botEditorExt.bot().widgets(matcher));
+ Browser visualSourcePaneBrowser = browsers.get(0);
+ Browser previewPaneBrowser = browsers.get(1);
+ // Test if current style is applied on Visual/Source pane
+ String textToContain = "<STYLE>h3 {" + oldStyle + "}</STYLE>";
+ String browserText = SWTUtilExt.invokeMethod(visualSourcePaneBrowser, "getText");
+ assertTrue("Browser on Visual/>Source pane has to contain text " + textToContain +
+ " but it doesn't.\n" +
+ "Browser text is:\n" +
+ browserText,
+ browserText.contains(textToContain));
+ textToContain = "<H3 style=\"-moz-user-modify:";
+ assertTrue("Browser on Visual/>Source pane has to contain text " + textToContain +
+ " but it doesn't.\n" +
+ "Browser text is:\n" +
+ browserText,
+ browserText.contains(textToContain));
+ // Test if current style is applied on Preview pane
+ textToContain = "<STYLE>h3 {" + oldStyle + "}</STYLE>";
+ browserText = SWTUtilExt.invokeMethod(previewPaneBrowser, "getText");
+ assertTrue("Browser on Preview pane has to contain text " + textToContain +
+ " but it doesn't.\n" +
+ "Browser text is:\n" +
+ browserText,
+ browserText.contains(textToContain));
+ textToContain = "<H3 style=\"-moz-user-modify:";
+ assertTrue("Browser on Preview pane has to contain text " + textToContain +
+ " but it doesn't.\n" +
+ "Browser text is:\n" +
+ browserText,
+ browserText.contains(textToContain));
+ // Apply new style
+ String newStyle = "background: black;color: white;";
+ botEditorExt.selectPage(IDELabel.VisualPageEditor.VISUAL_SOURCE_TAB_LABEL);
+ jspEditor.toTextEditor()
+ .setText(jspEditor.toTextEditor().getText().replaceFirst(oldStyle, newStyle));
+ jspEditor.save();
+ bot.sleep(Timing.time3S());
+ botEditorExt.selectPage(IDELabel.VisualPageEditor.PREVIEW_TAB_LABEL);
+ // Test if current style is applied on Visual/Source pane
+ textToContain = "<STYLE>h3 {" + newStyle + "}</STYLE>";
+ browserText = SWTUtilExt.invokeMethod(visualSourcePaneBrowser, "getText");
+ assertTrue("Browser on Visual/>Source pane has to contain text " + textToContain +
+ " but it doesn't.\n" +
+ "Browser text is:\n" +
+ browserText,
+ browserText.contains(textToContain));
+ textToContain = "<H3 style=\"-moz-user-modify:";
+ assertTrue("Browser on Visual/>Source pane has to contain text " + textToContain +
+ " but it doesn't.\n" +
+ "Browser text is:\n" +
+ browserText,
+ browserText.contains(textToContain));
+ // Test if current style is applied on Preview pane
+ textToContain = "<STYLE>h3 {" + newStyle + "}</STYLE>";
+ browserText = SWTUtilExt.invokeMethod(previewPaneBrowser, "getText");
+ assertTrue("Browser on Preview pane has to contain text " + textToContain +
+ " but it doesn't.\n" +
+ "Browser text is:\n" +
+ browserText,
+ browserText.contains(textToContain));
+ textToContain = "<H3 style=\"-moz-user-modify:";
+ assertTrue("Browser on Preview pane has to contain text " + textToContain +
+ " but it doesn't.\n" +
+ "Browser text is:\n" +
+ browserText,
+ browserText.contains(textToContain));
+
+ botEditorExt.selectPage(IDELabel.VisualPageEditor.VISUAL_SOURCE_TAB_LABEL);
+ jspEditor.close();
+ }
+
+ @Override
+ protected void closeUnuseDialogs() {
+ }
+
+ @Override
+ protected boolean isUnuseDialogOpened() {
+ return false;
+ }
+
+}
Property changes on: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/StylesOnThePageTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/IncludedCssFilesJSPTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/IncludedCssFilesJSPTest.java 2010-12-20 17:47:56 UTC (rev 27618)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/pagedesign/IncludedCssFilesJSPTest.java 2010-12-20 17:56:58 UTC (rev 27619)
@@ -39,7 +39,7 @@
private SWTBot addCssReferenceDialogBot = null;
private SWTBot optionsDialogBot = null;
- public void testIncludedCssFiles() throws IOException{
+ public void testIncludedCssFilesJSP() throws IOException{
SWTBotTree tree = packageExplorer.show().bot().tree();
tree.expandNode(VPEAutoTestCase.JBT_TEST_PROJECT_NAME)
.expandNode("WebContent")
14 years
JBoss Tools SVN: r27618 - 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-20 12:47:56 -0500 (Mon, 20 Dec 2010)
New Revision: 27618
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
Log:
https://issues.jboss.org/browse/JBIDE-7949
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-20 16:37:38 UTC (rev 27617)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-12-20 17:47:56 UTC (rev 27618)
@@ -1328,14 +1328,17 @@
* - If an unsatisfied or unresolvable ambiguous dependency exists, the container automatically detects the problem and treats it as a deployment problem.
*/
IType type = getTypeOfInjection(injection);
- if(type!=null && beans.isEmpty()) {
+ boolean instance = type!=null && CDIConstants.INSTANCE_TYPE_NAME.equals(type.getFullyQualifiedName());
+ if(type!=null && beans.isEmpty() && !instance) {
addError(CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, CDIPreferences.UNSATISFIED_INJECTION_POINTS, reference, injection.getResource(), UNSATISFIED_INJECTION_POINTS_ID);
- } else if(beans.size()>1) {
+ } else if(beans.size()>1 && !instance) {
addError(CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, CDIPreferences.AMBIGUOUS_INJECTION_POINTS, reference, injection.getResource(), AMBIGUOUS_INJECTION_POINTS_ID);
} else if(beans.size()==1) {
IBean bean = beans.iterator().next();
if(!bean.getBeanClass().isReadOnly()) {
- getValidationContext().addLinkedCoreResource(injection.getSourcePath().toOSString(), bean.getResource().getFullPath(), false);
+ if(!injection.getResource().equals(bean.getResource())) {
+ 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
14 years
JBoss Tools SVN: r27617 - in trunk/cdi/tests/org.jboss.tools.cdi.core.test: resources/tck/tests/jbt/resolution/chain and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-20 11:37:38 -0500 (Mon, 20 Dec 2010)
New Revision: 27617
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/chain/
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/chain/AbstractProject.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/chain/CurrentProject.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/chain/Project.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/chain/ProjectImpl.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ResolutionByTypeTest.java
Log:
JBIDE-7950
https://issues.jboss.org/browse/JBIDE-7950
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/chain/AbstractProject.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/chain/AbstractProject.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/chain/AbstractProject.java 2010-12-20 16:37:38 UTC (rev 27617)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.resolution.chain;
+
+public abstract class AbstractProject implements Project {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/chain/AbstractProject.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/chain/CurrentProject.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/chain/CurrentProject.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/chain/CurrentProject.java 2010-12-20 16:37:38 UTC (rev 27617)
@@ -0,0 +1,19 @@
+package org.jboss.jsr299.tck.tests.jbt.resolution.chain;
+
+import javax.enterprise.context.Dependent;
+import javax.enterprise.inject.Default;
+import javax.enterprise.inject.Produces;
+import javax.inject.Inject;
+import javax.inject.Singleton;
+
+@Singleton
+public class CurrentProject {
+ @Produces
+ @Default
+ @Dependent
+ public Project getCurrent() {
+ return null;
+ }
+
+ @Inject Project project;
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/chain/CurrentProject.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/chain/Project.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/chain/Project.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/chain/Project.java 2010-12-20 16:37:38 UTC (rev 27617)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.resolution.chain;
+
+public interface Project {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/chain/Project.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/chain/ProjectImpl.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/chain/ProjectImpl.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/chain/ProjectImpl.java 2010-12-20 16:37:38 UTC (rev 27617)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.jbt.resolution.chain;
+
+public class ProjectImpl extends AbstractProject {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/jbt/resolution/chain/ProjectImpl.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ResolutionByTypeTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ResolutionByTypeTest.java 2010-12-20 15:28:44 UTC (rev 27616)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ResolutionByTypeTest.java 2010-12-20 16:37:38 UTC (rev 27617)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.cdi.core.test.tck;
+import java.util.HashSet;
import java.util.Set;
import org.eclipse.core.runtime.CoreException;
@@ -116,6 +117,23 @@
}
}
+ public void testAbstractClassIsNotEligibleForInjection() throws CoreException {
+ IClassBean bean = getClassBean("JavaSource/org/jboss/jsr299/tck/tests/jbt/resolution/chain/CurrentProject.java");
+ Set<IInjectionPoint> injections = bean.getInjectionPoints();
+ assertEquals("Wrong number of the injection points", 1, injections.size());
+ IInjectionPoint injectionPoint = injections.iterator().next();
+ assertNotNull(injectionPoint);
+ Set<IBean> bs = cdiProject.getBeans(true, injectionPoint);
+ assertEquals(2, bs.size());
+ Set<String> names = new HashSet<String>();
+ System.out.println(bs.size());
+ for (IBean b: bs) {
+ names.add(b.getSimpleJavaName());
+ }
+ names.contains("CurrentProject.getCurrent()");
+ names.contains("ProjectImpl");
+ }
+
/**
* Section 5.2 - Typesafe resolution
* ld) Test with matching beans with matching qualifier with same annotation member value for each member which is not annotated @javax.enterprise.util.NonBinding.
14 years
JBoss Tools SVN: r27616 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-20 10:28:44 -0500 (Mon, 20 Dec 2010)
New Revision: 27616
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
Log:
JBIDE-7948
https://issues.jboss.org/browse/JBIDE-7948
JBIDE-7950
https://issues.jboss.org/browse/JBIDE-7950
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2010-12-20 15:18:09 UTC (rev 27615)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2010-12-20 15:28:44 UTC (rev 27616)
@@ -26,6 +26,7 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.jdt.core.Flags;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jdt.core.IMemberValuePair;
import org.eclipse.jdt.core.IMethod;
@@ -334,6 +335,16 @@
boolean delegateInjectionPoint = injectionPoint.isDelegate();
for (IBean b: beans) {
+ if(b instanceof ClassBean) {
+ IType bType = b.getBeanClass();
+ try {
+ if(bType != null && Flags.isAbstract(bType.getFlags())) {
+ continue;
+ }
+ } catch (JavaModelException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
+ }
if(isNew) {
//TODO improve
IType bType = b.getBeanClass();
@@ -1015,7 +1026,9 @@
CDICoreNature[] ps = n.getDependentProjects().toArray(new CDICoreNature[0]);
for (CDICoreNature p: ps) {
- p.getDelegate().update();
+ if(p.getProject() != null && p.getProject().isAccessible()) {
+ p.getDelegate().update();
+ }
}
}
14 years
JBoss Tools SVN: r27615 - in trunk/cdi: tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-12-20 10:18:09 -0500 (Mon, 20 Dec 2010)
New Revision: 27615
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DefenitionErrorsValidationTest.java
Log:
https://issues.jboss.org/browse/JBIDE-7947 Fixed
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-20 14:48:54 UTC (rev 27614)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-12-20 15:18:09 UTC (rev 27615)
@@ -1576,9 +1576,9 @@
IField[] fields = type.getFields();
for (IField field : fields) {
if (Flags.isPublic(field.getFlags()) && !Flags.isStatic(field.getFlags())) {
+ ITextSourceReference fieldReference = CDIUtil.convertToSourceReference(field.getNameRange());
addError(CDIValidationMessages.ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_PUBLIC_FIELD, CDIPreferences.ILLEGAL_SCOPE_FOR_MANAGED_BEAN,
- declaration, bean.getResource());
- break;
+ fieldReference, bean.getResource());
}
}
/*
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DefenitionErrorsValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DefenitionErrorsValidationTest.java 2010-12-20 14:48:54 UTC (rev 27614)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/DefenitionErrorsValidationTest.java 2010-12-20 15:18:09 UTC (rev 27615)
@@ -205,7 +205,7 @@
*/
public void testNonDependentScopedBeanCanNotHavePublicField() throws Exception {
IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/implementation/simple/definition/dependentWithPublicField/Leopard_Broken.java");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_PUBLIC_FIELD, 21);
+ assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_SCOPE_FOR_MANAGED_BEAN_WITH_PUBLIC_FIELD, 25);
}
/**
14 years
JBoss Tools SVN: r27614 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: dvinnichek
Date: 2010-12-20 09:48:54 -0500 (Mon, 20 Dec 2010)
New Revision: 27614
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
Log:
fixed behavior of mouse scroll when VPE Preview tab opened as default (https://issues.jboss.org/browse/JBIDE-7855)
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2010-12-20 13:55:34 UTC (rev 27613)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2010-12-20 14:48:54 UTC (rev 27614)
@@ -326,8 +326,12 @@
* author Denis Maliarevich.
*/
container.setMaximizedControl(null);
- if (sourceContent != null)
+ if (sourceContent != null) {
sourceContent.setVisible(true);
+ if (sourceEditor != null) {
+ activeEditor = sourceEditor;
+ }
+ }
if (visualContent != null)
visualContent.setVisible(true);
if (previewContent != null) {
@@ -351,6 +355,9 @@
setVerticalToolbarVisible(false);
if (sourceContent != null) {
sourceContent.setVisible(true);
+ if (sourceEditor != null) {
+ activeEditor = sourceEditor;
+ }
/*
* Fixes https://jira.jboss.org/jira/browse/JBIDE-3140
* author Denis Maliarevich.
@@ -396,6 +403,9 @@
if (previewContent != null) {
previewWebBrowser.rebuildDom();
previewContent.setVisible(true);
+ if (previewWebBrowser != null) {
+ activeEditor = previewWebBrowser;
+ }
container.setMaximizedControl(previewContent);
}
break;
14 years
JBoss Tools SVN: r27613 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-20 08:55:34 -0500 (Mon, 20 Dec 2010)
New Revision: 27613
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/ParametedTypeFactory.java
Log:
JBIDE-7951
https://issues.jboss.org/browse/JBIDE-7951
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/ParametedTypeFactory.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/ParametedTypeFactory.java 2010-12-20 13:53:27 UTC (rev 27612)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/ParametedTypeFactory.java 2010-12-20 13:55:34 UTC (rev 27613)
@@ -147,6 +147,7 @@
IType type = EclipseJavaUtil.findType(context.getJavaProject(), resovedTypeName);
if(type != null) {
result.setType(type);
+ cache.put(key, result);
StringBuffer newParams = new StringBuffer();
String[] paramSignatures = null;
try {
@@ -171,7 +172,6 @@
ns.append('Q').append(resovedTypeName).append('<').append(newParams).append(">;");
result.setSignature(ns.toString());
}
- cache.put(key, result);
return result;
}
}
@@ -189,11 +189,9 @@
if(result == null || t.equals(result.getSignature())) {
String sts = bounds.length > 0 ? bounds[0] : "";
if(sts.length() > 0) {
- if(context!=contextType) {
- ParametedType st = getParametedType(contextType, sts);
- if(st != null) {
- result = new TypeDeclaration(st, 0, 0);
- }
+ ParametedType st = getParametedType(contextType, sts);
+ if(st != null) {
+ result = new TypeDeclaration(st, 0, 0);
}
} else if(result != null) {
result.setSignature(t);
14 years
JBoss Tools SVN: r27612 - in trunk/cdi/tests/org.jboss.tools.cdi.core.test: src/org/jboss/tools/cdi/core/test/tck and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2010-12-20 08:53:27 -0500 (Mon, 20 Dec 2010)
New Revision: 27612
Added:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/bean/AbstractJavaSource.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/bean/JavaSource.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/BeanDefinitionTest.java
Log:
JBIDE-7951
https://issues.jboss.org/browse/JBIDE-7951
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/bean/AbstractJavaSource.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/bean/AbstractJavaSource.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/bean/AbstractJavaSource.java 2010-12-20 13:53:27 UTC (rev 27612)
@@ -0,0 +1,7 @@
+package org.jboss.jsr299.tck.tests.definition.bean;
+
+public class AbstractJavaSource<O extends JavaSource<O>> implements
+JavaSource<O> {
+ int i2q;
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/bean/AbstractJavaSource.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/bean/JavaSource.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/bean/JavaSource.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/bean/JavaSource.java 2010-12-20 13:53:27 UTC (rev 27612)
@@ -0,0 +1,5 @@
+package org.jboss.jsr299.tck.tests.definition.bean;
+
+public interface JavaSource<T extends JavaSource<T>> {
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/definition/bean/JavaSource.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/BeanDefinitionTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/BeanDefinitionTest.java 2010-12-20 13:23:04 UTC (rev 27611)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/BeanDefinitionTest.java 2010-12-20 13:53:27 UTC (rev 27612)
@@ -10,15 +10,18 @@
******************************************************************************/
package org.jboss.tools.cdi.core.test.tck;
+import java.util.List;
import java.util.Set;
import org.eclipse.core.resources.IFile;
+import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.jboss.tools.cdi.core.IBean;
import org.jboss.tools.cdi.core.IParametedType;
import org.jboss.tools.cdi.core.IQualifier;
import org.jboss.tools.cdi.core.IScope;
import org.jboss.tools.cdi.core.ITypeDeclaration;
+import org.jboss.tools.cdi.internal.core.impl.ClassBean;
/**
* @author Alexey Kazakov
@@ -206,4 +209,24 @@
IBean bean = beans.iterator().next();
assertEquals("Wrong Bean Class type of org.jboss.jsr299.tck.tests.definition.bean.Horse bean", "org.jboss.jsr299.tck.tests.definition.bean.Horse", bean.getBeanClass().getFullyQualifiedName());
}
+
+ public void testCyclicParametedType() throws JavaModelException {
+ Set<IBean> beans = getBeans("org.jboss.jsr299.tck.tests.definition.bean.AbstractJavaSource");
+ assertFalse(beans.isEmpty());
+ IBean bean = beans.iterator().next();
+ IParametedType t = ((ClassBean)bean).getDefinition().getParametedType();
+ assertNotNull(t);
+ List<? extends IParametedType> ps = t.getParameters();
+ assertFalse(ps.isEmpty());
+ IParametedType p = ps.get(0);
+ ps = p.getParameters();
+ assertFalse(ps.isEmpty());
+ IParametedType p1 = ps.get(0);
+ ps = p1.getParameters();
+ assertFalse(ps.isEmpty());
+ IParametedType p2 = ps.get(0);
+ IType type = p2.getType();
+ assertEquals("org.jboss.jsr299.tck.tests.definition.bean.JavaSource", type.getFullyQualifiedName());
+ assertTrue(p1 == p2);
+ }
}
\ No newline at end of file
14 years
JBoss Tools SVN: r27611 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-12-20 08:23:04 -0500 (Mon, 20 Dec 2010)
New Revision: 27611
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/CDIValidationErrorManager.java
Log:
https://issues.jboss.org/browse/JBIDE-7635
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-20 13:19:08 UTC (rev 27610)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-12-20 13:23:04 UTC (rev 27611)
@@ -1329,9 +1329,9 @@
*/
IType type = getTypeOfInjection(injection);
if(type!=null && beans.isEmpty()) {
- addError(CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, CDIPreferences.UNSATISFIED_INJECTION_POINTS, reference, injection.getResource());
+ addError(CDIValidationMessages.UNSATISFIED_INJECTION_POINTS, CDIPreferences.UNSATISFIED_INJECTION_POINTS, reference, injection.getResource(), UNSATISFIED_INJECTION_POINTS_ID);
} else if(beans.size()>1) {
- addError(CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, CDIPreferences.AMBIGUOUS_INJECTION_POINTS, reference, injection.getResource());
+ addError(CDIValidationMessages.AMBIGUOUS_INJECTION_POINTS, CDIPreferences.AMBIGUOUS_INJECTION_POINTS, reference, injection.getResource(), AMBIGUOUS_INJECTION_POINTS_ID);
} else if(beans.size()==1) {
IBean bean = beans.iterator().next();
if(!bean.getBeanClass().isReadOnly()) {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java 2010-12-20 13:19:08 UTC (rev 27610)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java 2010-12-20 13:23:04 UTC (rev 27611)
@@ -24,6 +24,8 @@
public static final int ILLEGAL_OBSERVER_IN_SESSION_BEAN_ID = 4;
public static final int MULTIPLE_DISPOSERS_FOR_PRODUCER_ID = 5;
public static final int MULTIPLE_INJECTION_CONSTRUCTORS_ID = 6;
+ public static final int UNSATISFIED_INJECTION_POINTS_ID = 7;
+ public static final int AMBIGUOUS_INJECTION_POINTS_ID = 8;
/*
* (non-Javadoc)
14 years
JBoss Tools SVN: r27610 - trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-12-20 08:19:08 -0500 (Mon, 20 Dec 2010)
New Revision: 27610
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/CoreValidationTest.java
Log:
https://issues.jboss.org/browse/JBIDE-7946
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/CoreValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/CoreValidationTest.java 2010-12-20 11:12:25 UTC (rev 27609)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/validation/CoreValidationTest.java 2010-12-20 13:19:08 UTC (rev 27610)
@@ -13,6 +13,7 @@
import org.eclipse.jface.preference.IPersistentPreferenceStore;
import org.eclipse.jface.preference.IPreferenceStore;
import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.cdi.internal.core.validation.CDIProjectSet;
import org.jboss.tools.common.preferences.SeverityPreferences;
import org.jboss.tools.jst.web.kb.internal.validation.ValidatorManager;
@@ -51,4 +52,12 @@
String status = ValidatorManager.getStatus();
assertNotSame("Validation job has not been run (validation status: " + status + ")", VALIDATION_STATUS, status);
}
+
+ /**
+ * https://issues.jboss.org/browse/JBIDE-7946
+ */
+ public void testAllRelatedProjectsIncluded() {
+ CDIProjectSet set = new CDIProjectSet(tckProject);
+ assertTrue("TCKProject is not included in the set of CDI projects", set.getAllProjests().contains(tckProject));
+ }
}
\ No newline at end of file
14 years