JBoss Tools SVN: r23897 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-08-03 17:57:53 -0400 (Tue, 03 Aug 2010)
New Revision: 23897
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreUtils.java
Log:
https://jira.jboss.org/browse/JBIDE-6330 The Explore command in the Servers view doesn't work on Mac
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreUtils.java 2010-08-03 21:33:17 UTC (rev 23896)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreUtils.java 2010-08-03 21:57:53 UTC (rev 23897)
@@ -55,12 +55,9 @@
return exploreFileCommand;
}
- @SuppressWarnings("nls")
private static void setExploreCommands() {
if (Platform.OS_MACOSX.equals(Platform.getOS())) {
- exploreFolderCommand = "/usr/bin/open -a /System/Library/CoreServices/Finder.app \"" //$NON-NLS-1$
- + PATH + "\""; //$NON-NLS-1$
- exploreFileCommand = exploreFolderCommand;
+ exploreFolderCommandArray = new String[] {"/usr/bin/open", "-a", "/System/Library/CoreServices/Finder.app", ""}; //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$
} else if (Platform.OS_WIN32.equals(Platform.getOS())) {
exploreFolderCommand = "cmd /C start explorer /root,/e,\"" //$NON-NLS-1$
+ PATH + "\""; //$NON-NLS-1$
@@ -120,7 +117,7 @@
}
try {
- if (Platform.OS_LINUX.equals(Platform.getOS())) {
+ if (Platform.OS_LINUX.equals(Platform.getOS()) || Platform.OS_MACOSX.equals(Platform.getOS())) {
int len = exploreFolderCommandArray.length;
exploreFolderCommandArray[len-1] = name;
Runtime.getRuntime().exec(exploreFolderCommandArray);
@@ -141,7 +138,6 @@
}
}
- @SuppressWarnings("nls")
public static IPath getDeployPath(IDeployableServer server,IModule[] moduleTree) {
IPath root = new Path( server.getDeployFolder() );
String type, name;
14 years, 5 months
JBoss Tools SVN: r23896 - in trunk/build: target-platform and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-08-03 17:33:17 -0400 (Tue, 03 Aug 2010)
New Revision: 23896
Modified:
trunk/build/parent/pom.xml
trunk/build/target-platform/pom.xml
Log:
make target platform build not depend on parent
Modified: trunk/build/parent/pom.xml
===================================================================
--- trunk/build/parent/pom.xml 2010-08-03 21:27:16 UTC (rev 23895)
+++ trunk/build/parent/pom.xml 2010-08-03 21:33:17 UTC (rev 23896)
@@ -6,6 +6,9 @@
<version>0.0.1-SNAPSHOT</version>
<name>JBoss Tools Parent</name>
<packaging>pom</packaging>
+ <modules>
+ <module>../target-platform</module>
+ </modules>
<properties>
<!-- <tychoVersion>0.10.0-SNAPSHOT</tychoVersion> -->
Modified: trunk/build/target-platform/pom.xml
===================================================================
--- trunk/build/target-platform/pom.xml 2010-08-03 21:27:16 UTC (rev 23895)
+++ trunk/build/target-platform/pom.xml 2010-08-03 21:33:17 UTC (rev 23896)
@@ -2,11 +2,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <parent>
+<!-- <parent>
<groupId>org.jboss.tools</groupId>
<artifactId>org.jboss.tools.parent.pom</artifactId>
<version>0.0.1-SNAPSHOT</version>
- </parent>
+ </parent> -->
<groupId>org.jboss.tools</groupId>
<artifactId>target-platform</artifactId>
<version>0.0.1-SNAPSHOT</version>
14 years, 5 months
JBoss Tools SVN: r23895 - trunk/build/parent.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-08-03 17:27:16 -0400 (Tue, 03 Aug 2010)
New Revision: 23895
Modified:
trunk/build/parent/pom.xml
Log:
add oro, xulrunner; remove module build of target platform
Modified: trunk/build/parent/pom.xml
===================================================================
--- trunk/build/parent/pom.xml 2010-08-03 21:13:55 UTC (rev 23894)
+++ trunk/build/parent/pom.xml 2010-08-03 21:27:16 UTC (rev 23895)
@@ -6,9 +6,6 @@
<version>0.0.1-SNAPSHOT</version>
<name>JBoss Tools Parent</name>
<packaging>pom</packaging>
- <modules>
- <module>../target-platform</module>
- </modules>
<properties>
<!-- <tychoVersion>0.10.0-SNAPSHOT</tychoVersion> -->
@@ -265,7 +262,7 @@
</repository>
<repository>
<id>orbit</id>
- <url>http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/r...
+ <url>http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/u...
</url>
<layout>p2</layout>
<snapshots>
@@ -276,6 +273,18 @@
</releases>
</repository>
<repository>
+ <id>jboss-xulrunner-1.9.2</id>
+ <url>http://download.jboss.org/jbosstools/updates/xulrunner-1.9.2/
+ </url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ <repository>
<id>google eclipse plugins</id>
<url>http://dl.google.com/eclipse/plugin/3.6</url>
<layout>p2</layout>
@@ -388,7 +397,7 @@
</repository>
<repository>
<id>orbit</id>
- <url>http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/r...
+ <url>http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/u...
</url>
<layout>p2</layout>
<snapshots>
@@ -546,7 +555,7 @@
</repository>
<repository>
<id>orbit</id>
- <url>http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/r...
+ <url>http://download.eclipse.org/tools/orbit/downloads/drops/R20100519200754/u...
</url>
<layout>p2</layout>
<releases>
@@ -815,4 +824,17 @@
</releases>
</pluginRepository>
</pluginRepositories>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>apache-oro</groupId>
+ <artifactId>jakarta-oro</artifactId>
+ <version>2.0.8</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+
</project>
14 years, 5 months
JBoss Tools SVN: r23894 - trunk/drools.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-08-03 17:13:55 -0400 (Tue, 03 Aug 2010)
New Revision: 23894
Modified:
trunk/drools/
Log:
update drools component svn:ignore
Property changes on: trunk/drools
___________________________________________________________________
Name: svn:ignore
- drools-5.1.0.SNAPSHOT-eclipse-all.zip
+ drools-*eclipse-all.zip
14 years, 5 months
JBoss Tools SVN: r23893 - trunk/drools.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-08-03 17:12:29 -0400 (Tue, 03 Aug 2010)
New Revision: 23893
Modified:
trunk/drools/build.xml
Log:
use Drools 5.1.0.34406.FINAL zip
Modified: trunk/drools/build.xml
===================================================================
--- trunk/drools/build.xml 2010-08-03 21:04:20 UTC (rev 23892)
+++ trunk/drools/build.xml 2010-08-03 21:12:29 UTC (rev 23893)
@@ -2,7 +2,7 @@
<!-- Configuration Start -->
<property name="COMPONENT" value="drools" />
- <property name="drools.zip" value="drools-5.2.0.SNAPSHOT-eclipse-all.zip" />
+ <property name="drools.zip" value="drools-5.1.0-eclipse-all.zip" />
<!-- Configuration Ends -->
<condition property="WORKINGDIR" value="/home/hudson/static_build_env/jbds/tools/sources">
@@ -39,7 +39,7 @@
description="fetch latest drools from their Hudson build + selectively unpack it"
depends="init"
>
- <get src="http://hudson.qa.jboss.com/hudson/job/drools/lastStableBuild/artifact/tru..."
+ <get src="http://download.jboss.org/drools/release/5.1.0.34406.FINAL/${drools.zip}"
dest="${WORKINGDIR}/${COMPONENT}/${drools.zip}"
usetimestamp="true"
/>
14 years, 5 months
JBoss Tools SVN: r23892 - trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views.
by jbosstools-commits@lists.jboss.org
Author: elvisisking
Date: 2010-08-03 17:04:20 -0400 (Tue, 03 Aug 2010)
New Revision: 23892
Modified:
trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/ServerView.java
Log:
JBIDE-6770 ModeShape View Incorrectly Updates StatusBar: Invalid Java assert has been removed. When zero or more than one object is selected in the ModeShape view the status bar is now cleared. Otherwise, the status bar is updated as before.
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/ServerView.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/ServerView.java 2010-08-03 20:57:50 UTC (rev 23891)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.rest/src/org/jboss/tools/modeshape/rest/views/ServerView.java 2010-08-03 21:04:20 UTC (rev 23892)
@@ -323,9 +323,7 @@
* @param selection the current viewer selection (never <code>null</code>)
*/
private void updateStatusLine( IStructuredSelection selection ) {
- assert (selection.size() < 2);
-
- String msg = (selection.isEmpty() ? "" : ((IModeShapeObject)selection.getFirstElement()).getShortDescription());
+ String msg = (selection.size() != 1 ? "" : ((IModeShapeObject)selection.getFirstElement()).getShortDescription());
getViewSite().getActionBars().getStatusLineManager().setMessage(msg);
}
14 years, 5 months
JBoss Tools SVN: r23891 - in trunk: site and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-08-03 16:57:50 -0400 (Tue, 03 Aug 2010)
New Revision: 23891
Modified:
trunk/build/aggregate/site/site.xml
trunk/site/site.xml
Log:
add missing modeshape feature to update sites
Modified: trunk/build/aggregate/site/site.xml
===================================================================
--- trunk/build/aggregate/site/site.xml 2010-08-03 20:18:31 UTC (rev 23890)
+++ trunk/build/aggregate/site/site.xml 2010-08-03 20:57:50 UTC (rev 23891)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<site pack200="true">
<description>
- This is the Nightly Build Update Site for JBoss Tools 3.2.0.M1.
+ This is the Nightly Build Update Site for JBoss Tools 3.2.0.
</description>
<!-- only in JBDS -->
@@ -102,7 +102,6 @@
<category name="DataTools" />
<category name="GeneralTools" />
</feature>
-
<feature url="features/org.drools.eclipse.feature_0.0.0.jar" id="org.drools.eclipse.feature" version="0.0.0">
<category name="AllTools" />
<category name="SOATools" />
@@ -119,7 +118,6 @@
<category name="AllTools" />
<category name="SOATools" />
</feature>
-
<feature url="features/org.jboss.tools.project.examples.feature_0.0.0.jar"
id="org.jboss.tools.project.examples.feature"
version="0.0.0"
@@ -229,6 +227,11 @@
<category name="SOATools" />
</feature>
+ <feature url="features/org.jboss.tools.modeshape.rest.feature_0.0.0.jar" id="org.jboss.tools.modeshape.rest.feature" version="0.0.0">
+ <category name="AllTools" />
+ <category name="GeneralTools" />
+ </feature>
+
<!-- categories - see also ../../../common/aggregateRepos.*.properties -->
<category-def name="SDKTools" label="JBoss Tools SDK">
<description>JBoss Tools SDK contains plugins where an SDK package
@@ -237,7 +240,7 @@
</description>
</category-def>
- <category-def name="AllTools" label="All JBoss Tools 3.2.0.M1">
+ <category-def name="AllTools" label="All JBoss Tools 3.2.0">
<description>
Contains ALL the plugins that are available from
JBoss Tools except those
@@ -291,13 +294,13 @@
<description>Tools used to improve testing and performance.
</description>
</category-def>
-
+
<!-- aggregated from other sources -->
<feature url="features/org.pi4soa.core.feature_0.0.0.jar" id="org.pi4soa.core.feature" version="0.0.0">
<category name="AllTools" />
</feature>
- <!-- removed temporarily because pi4soa doesn't work w/ Eclipse 3.6. yet.
+ <!-- removed temporarily because teiid doesn't work w/ Eclipse 3.6. yet.
<feature url="features/org.teiid.datatools.connectivity.feature_0.0.0.jar" id="org.teiid.datatools.connectivity.feature" version="0.0.0">
<category name="AllTools" />
<category name="DataTools" />
Modified: trunk/site/site.xml
===================================================================
--- trunk/site/site.xml 2010-08-03 20:18:31 UTC (rev 23890)
+++ trunk/site/site.xml 2010-08-03 20:57:50 UTC (rev 23891)
@@ -227,6 +227,11 @@
<category name="SOATools" />
</feature>
+ <feature url="features/org.jboss.tools.modeshape.rest.feature_0.0.0.jar" id="org.jboss.tools.modeshape.rest.feature" version="0.0.0">
+ <category name="AllTools" />
+ <category name="GeneralTools" />
+ </feature>
+
<!-- categories - see also ../../../common/aggregateRepos.*.properties -->
<category-def name="SDKTools" label="JBoss Tools SDK">
<description>JBoss Tools SDK contains plugins where an SDK package
@@ -290,4 +295,18 @@
</description>
</category-def>
+ <!-- removed temporarily because teiid doesn't work w/ Eclipse 3.6. yet.
+ <feature url="features/org.teiid.datatools.connectivity.feature_0.0.0.jar" id="org.teiid.datatools.connectivity.feature" version="0.0.0">
+ <category name="AllTools" />
+ <category name="DataTools" />
+ </feature>
+ <feature url="features/org.teiid.designer.feature_0.0.0.jar" id="org.teiid.designer.feature" version="0.0.0">
+ <category name="AllTools" />
+ <category name="DataTools" />
+ </feature>
+ <feature url="features/org.teiid.designer.runtime.feature_0.0.0.jar" id="org.teiid.designer.runtime.feature" version="0.0.0">
+ <category name="AllTools" />
+ <category name="DataTools" />
+ </feature>
+ -->
</site>
14 years, 5 months
JBoss Tools SVN: r23890 - trunk/drools.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-08-03 16:18:31 -0400 (Tue, 03 Aug 2010)
New Revision: 23890
Modified:
trunk/drools/build.xml
Log:
Drools now on 5.2.0-SNAPSHOT
Modified: trunk/drools/build.xml
===================================================================
--- trunk/drools/build.xml 2010-08-03 19:56:51 UTC (rev 23889)
+++ trunk/drools/build.xml 2010-08-03 20:18:31 UTC (rev 23890)
@@ -2,7 +2,7 @@
<!-- Configuration Start -->
<property name="COMPONENT" value="drools" />
- <property name="drools.zip" value="drools-5.1.0.SNAPSHOT-eclipse-all.zip" />
+ <property name="drools.zip" value="drools-5.2.0.SNAPSHOT-eclipse-all.zip" />
<!-- Configuration Ends -->
<condition property="WORKINGDIR" value="/home/hudson/static_build_env/jbds/tools/sources">
14 years, 5 months
JBoss Tools SVN: r23889 - 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-08-03 15:56:51 -0400 (Tue, 03 Aug 2010)
New Revision: 23889
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/tests/org.jboss.tools.cdi.core.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
Log:
https://jira.jboss.org/browse/JBIDE-6507 Enable/disable checkbox has been added to CDI/EL/Seam validation preference pages.
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-08-03 19:56:14 UTC (rev 23888)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java 2010-08-03 19:56:51 UTC (rev 23889)
@@ -28,6 +28,7 @@
@Override
public void initializeDefaultPreferences() {
IEclipsePreferences defaultPreferences = ((IScopeContext) new DefaultScope()).getNode(CDICorePlugin.PLUGIN_ID);
+ defaultPreferences.putBoolean(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, true);
for (String name : CDIPreferences.SEVERITY_OPTION_NAMES) {
defaultPreferences.put(name, SeverityPreferences.ERROR);
}
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-08-03 19:56:14 UTC (rev 23888)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java 2010-08-03 19:56:51 UTC (rev 23889)
@@ -26,10 +26,6 @@
private static CDIPreferences INSTANCE = new CDIPreferences();
- // Test group
-
- // Test
- public static final String TEST = INSTANCE.createSeverityOption("testKey"); //$NON-NLS-1$
//Name group
// - stereotype declares a non-empty @Named annotation (2.7.1.3)
@@ -277,4 +273,8 @@
public static boolean shouldValidateCore(IProject project) {
return true;
}
+
+ public static boolean isValidationEnabled(IProject project) {
+ return INSTANCE.isEnabled(project);
+ }
}
\ No newline at end of file
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-08-03 19:56:14 UTC (rev 23888)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-08-03 19:56:51 UTC (rev 23889)
@@ -142,6 +142,14 @@
/*
* (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.validation.IValidator#isEnabled(org.eclipse.core.resources.IProject)
+ */
+ public boolean isEnabled(IProject project) {
+ return CDIPreferences.isValidationEnabled(project);
+ }
+
+ /*
+ * (non-Javadoc)
*
* @see
* org.jboss.tools.jst.web.kb.validation.IValidator#shouldValidate(org.eclipse
@@ -149,8 +157,7 @@
*/
public boolean shouldValidate(IProject project) {
try {
- // TODO check preferences
- return project != null && project.isAccessible() && project.hasNature(CDICoreNature.NATURE_ID);
+ return project != null && project.isAccessible() && project.hasNature(CDICoreNature.NATURE_ID) && isEnabled(project);
} catch (CoreException e) {
CDICorePlugin.getDefault().logError(e);
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/META-INF/MANIFEST.MF 2010-08-03 19:56:14 UTC (rev 23888)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/META-INF/MANIFEST.MF 2010-08-03 19:56:51 UTC (rev 23889)
@@ -15,6 +15,7 @@
org.eclipse.jdt.core,
org.jboss.tools.common.el.core,
org.jboss.tools.common.model.ui,
- org.eclipse.ltk.core.refactoring;bundle-version="3.5.0"
+ org.eclipse.ltk.core.refactoring,
+ org.jboss.tools.jst.web.kb
Export-Package: org.jboss.tools.cdi.core.test,
org.jboss.tools.cdi.core.test.tck
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-08-03 19:56:14 UTC (rev 23888)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ValidationTest.java 2010-08-03 19:56:51 UTC (rev 23889)
@@ -11,11 +11,19 @@
package org.jboss.tools.cdi.core.test.tck;
import java.text.MessageFormat;
+import java.util.List;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
+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.CDICoreValidator;
import org.jboss.tools.cdi.internal.core.validation.CDIValidationMessages;
+import org.jboss.tools.common.preferences.SeverityPreferences;
+import org.jboss.tools.jst.web.kb.internal.validation.ValidationContext;
+import org.jboss.tools.jst.web.kb.validation.IValidator;
import org.jboss.tools.tests.AbstractResourceMarkerTest;
/**
@@ -1391,6 +1399,19 @@
assertMarkerIsCreated(file, CDIValidationMessages.OBSERVER_IN_DECORATOR, 14);
}
+ /**
+ * 10.4.3. Conditional observer methods
+ * - bean with scope @Dependent has an observer method declared notifyObserver=IF_EXISTS
+ *
+ * @throws Exception
+ */
+ public void testDependentBeanWithConditionalObserverMethodIsDefinitionError() throws Exception {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/event/broken/observer/dependentIsConditionalObserver/AlarmSystem.java");
+ assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_CONDITIONAL_OBSERVER, 24);
+ }
+
+ // Wrong targets in CDI annotation types.
+
public void testQualifierWithMissingTarget() throws Exception {
IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/annotations/qualifier/broken/Hairy_MissingTarget.java");
assertMarkerIsCreated(file, CDIValidationMessages.MISSING_TARGET_ANNOTATION_IN_QUALIFIER_TYPE.substring(0, 56) + ".*", 36);
@@ -1422,16 +1443,34 @@
}
/**
- * 10.4.3. Conditional observer methods
- * - bean with scope @Dependent has an observer method declared notifyObserver=IF_EXISTS
+ * https://jira.jboss.org/browse/JBIDE-6507
*
* @throws Exception
*/
- public void testDependentBeanWithConditionalObserverMethodIsDefinitionError() throws Exception {
- IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/event/broken/observer/dependentIsConditionalObserver/AlarmSystem.java");
- assertMarkerIsCreated(file, CDIValidationMessages.ILLEGAL_CONDITIONAL_OBSERVER, 24);
+ public void testDisabledValidator() throws Exception {
+ IPreferenceStore preferenceStore = CDICorePlugin.getDefault().getPreferenceStore();
+ preferenceStore.setValue(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, false);
+ ((IPersistentPreferenceStore)preferenceStore).save();
+
+ assertNull("CDICoreValidator is not be disabled.", getCDIValidator());
+
+ preferenceStore.setValue(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, true);
+ ((IPersistentPreferenceStore)preferenceStore).save();
+
+ assertNotNull("CDICoreValidator is disabled.", getCDIValidator());
}
+ private CDICoreValidator getCDIValidator() {
+ ValidationContext context = new ValidationContext(tckProject);
+ List<IValidator> validators = context.getValidators();
+ for (IValidator validator : validators) {
+ if(validator instanceof CDICoreValidator) {
+ return (CDICoreValidator)validator;
+ }
+ }
+ return null;
+ }
+
public static int getMarkersNumber(IResource resource) {
return AbstractResourceMarkerTest.getMarkersNumberByGroupName(resource, null);
}
14 years, 5 months
JBoss Tools SVN: r23888 - trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-08-03 15:56:14 -0400 (Tue, 03 Aug 2010)
New Revision: 23888
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencePage.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencesMessages.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencesMessages.properties
Log:
https://jira.jboss.org/browse/JBIDE-6507 Enable/disable checkbox has been added to CDI/EL/Seam validation preference pages.
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencePage.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencePage.java 2010-08-03 19:55:27 UTC (rev 23887)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencePage.java 2010-08-03 19:56:14 UTC (rev 23888)
@@ -13,14 +13,27 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.jdt.internal.ui.preferences.PropertyAndPreferencePage;
+import org.eclipse.jface.dialogs.ControlEnableState;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.jboss.tools.common.preferences.SeverityPreferences;
/**
* @author Viacheslav Kabanovich
*/
public abstract class SeverityPreferencePage extends PropertyAndPreferencePage {
+ private ControlEnableState mainBlockEnableState;
+ private Button checkBox;
+ protected Control severityConfigurationBlock;
+
protected SeverityConfigurationBlock fConfigurationBlock;
protected SeverityConfigurationBlock getConfigurationBlock() {
@@ -29,9 +42,51 @@
@Override
protected Control createPreferenceContent(Composite composite) {
- return getConfigurationBlock().createContents(composite);
+ Composite root = new Composite(composite, SWT.NONE);
+
+ GridData gd = new GridData(GridData.FILL, GridData.FILL, true, true);
+
+ GridLayout gridLayout = new GridLayout(1, false);
+ root.setLayout(gridLayout);
+ root.setLayoutData(gd);
+
+ checkBox = new Button(root, SWT.CHECK);
+ checkBox.setFont(JFaceResources.getDialogFont());
+ checkBox.setText(SeverityPreferencesMessages.ENABLE_VALIDATION);
+ checkBox.setSelection(getPreferenceStore().getBoolean(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME));
+
+ severityConfigurationBlock = getConfigurationBlock().createContents(root);
+ gridLayout = new GridLayout(1, false);
+ severityConfigurationBlock.setLayoutData(gd);
+
+ checkBox.addSelectionListener(new SelectionListener() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ enableMainPreferenceContent(checkBox.getSelection());
+ getPreferenceStore().setValue(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, checkBox.getSelection());
+ }
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+ enableMainPreferenceContent(checkBox.getSelection());
+
+ return root;
}
+ protected void enableMainPreferenceContent(boolean enable) {
+ if (enable) {
+ if (mainBlockEnableState != null) {
+ mainBlockEnableState.restore();
+ mainBlockEnableState= null;
+ }
+ } else {
+ if (mainBlockEnableState == null) {
+ mainBlockEnableState= ControlEnableState.disable(severityConfigurationBlock);
+ }
+ }
+ }
+
@Override
protected boolean hasProjectSpecificOptions(IProject project) {
return getConfigurationBlock().hasProjectSpecificOptions(project);
@@ -64,6 +119,8 @@
*/
@Override
protected void performDefaults() {
+ checkBox.setSelection(true);
+ enableMainPreferenceContent(true);
super.performDefaults();
if (getConfigurationBlock() != null) {
getConfigurationBlock().performDefaults();
@@ -77,7 +134,8 @@
public boolean performOk() {
if (getConfigurationBlock() != null && !getConfigurationBlock().performOk()) {
return false;
- }
+ }
+ updateEnableBlock();
return super.performOk();
}
@@ -89,5 +147,14 @@
if (getConfigurationBlock() != null) {
getConfigurationBlock().performApply();
}
+ updateEnableBlock();
}
+
+ private void updateEnableBlock() {
+ boolean oldValue = getPreferenceStore().getBoolean(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME);
+ boolean newValue = checkBox.getSelection();
+ if(oldValue != newValue) {
+ getPreferenceStore().setValue(SeverityPreferences.ENABLE_BLOCK_PREFERENCE_NAME, newValue);
+ }
+ }
}
\ No newline at end of file
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencesMessages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencesMessages.java 2010-08-03 19:55:27 UTC (rev 23887)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencesMessages.java 2010-08-03 19:56:14 UTC (rev 23888)
@@ -27,6 +27,7 @@
public static String VALIDATOR_CONFIGURATION_BLOCK_ERROR;
public static String VALIDATOR_CONFIGURATION_BLOCK_IGNORE;
public static String VALIDATOR_CONFIGURATION_BLOCK_WARNING;
+ public static String ENABLE_VALIDATION;
static {
NLS.initializeMessages(BUNDLE_NAME, SeverityPreferencesMessages.class);
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencesMessages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencesMessages.properties 2010-08-03 19:55:27 UTC (rev 23887)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencesMessages.properties 2010-08-03 19:56:14 UTC (rev 23888)
@@ -16,4 +16,6 @@
VALIDATOR_CONFIGURATION_BLOCK_ERROR=Error
VALIDATOR_CONFIGURATION_BLOCK_WARNING=Warning
-VALIDATOR_CONFIGURATION_BLOCK_IGNORE=Ignore
\ No newline at end of file
+VALIDATOR_CONFIGURATION_BLOCK_IGNORE=Ignore
+
+ENABLE_VALIDATION=Enable validation
\ No newline at end of file
14 years, 5 months