JBoss Tools SVN: r38519 - trunk/maven/site.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-02-08 13:39:21 -0500 (Wed, 08 Feb 2012)
New Revision: 38519
Modified:
trunk/maven/site/site.xml
Log:
JBIDE-10750 : add new JPA maven configurator
Modified: trunk/maven/site/site.xml
===================================================================
--- trunk/maven/site/site.xml 2012-02-08 18:36:45 UTC (rev 38518)
+++ trunk/maven/site/site.xml 2012-02-08 18:39:21 UTC (rev 38519)
@@ -29,6 +29,9 @@
<feature url="features/org.jboss.tools.maven.jaxrs.feature_0.0.0.jar" id="org.jboss.tools.maven.jaxrs.feature" version="0.0.0">
<category name="JBoss Tools maven Nightly Build Update Site"/>
</feature>
+ <feature url="features/org.jboss.tools.maven.jpa.feature_0.0.0.jar" id="org.jboss.tools.maven.jpa.feature" version="0.0.0">
+ <category name="JBoss Tools maven Nightly Build Update Site"/>
+ </feature>
<feature url="features/org.jboss.tools.maven.jbosspackaging.feature_0.0.0.jar" id="org.jboss.tools.maven.jbosspackaging.feature" version="0.0.0">
<category name="JBoss Tools maven Nightly Build Update Site"/>
</feature>
14 years, 2 months
JBoss Tools SVN: r38518 - trunk/download.jboss.org/jbosstools/updates/requirements/m2eclipse.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-02-08 13:36:45 -0500 (Wed, 08 Feb 2012)
New Revision: 38518
Added:
trunk/download.jboss.org/jbosstools/updates/requirements/m2eclipse/build-...
Modified:
trunk/download.jboss.org/jbosstools/updates/requirements/m2eclipse/build.xml
Log:
new builder for m2e-wtp 0.15; add m2e-jdt-compiler 1.0 too // JBIDE-10659, JBIDE-JBIDE-10834
Copied: trunk/download.jboss.org/jbosstools/updates/requirements/m2eclipse/build-... (from rev 38517, trunk/download.jboss.org/jbosstools/updates/requirements/m2eclipse/build.xml)
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/m2eclipse/build-... (rev 0)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/m2eclipse/build-... 2012-02-08 18:36:45 UTC (rev 38518)
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project default="mirror">
+ <!-- run locally in Eclipse (to resolve p2 tasks) using these commandline options:
+
+ -os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}
+ -consoleLog -nosplash -data /tmp
+ -application org.eclipse.ant.core.antRunner
+ -f "/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/m2eclipse/build.xml"
+
+ or, run headless on qa01 server, where Eclipse is installed into ~/eclipse:
+
+ export JAVA_HOME=/opt/jdk1.6.0; \
+ ${JAVA_HOME}/bin/java -cp ~/eclipse/plugins/org.eclipse.equinox.launcher_*.jar \
+ org.eclipse.equinox.launcher.Main -vm ${JAVA_HOME} -consoleLog -nosplash -data /tmp \
+ -application org.eclipse.ant.core.antRunner \
+ -f ~/RHDS/updates/requirements/m2eclipse/build.xml -Ddestination=/tmp/m2eclipse-repo
+ -->
+ <target name="mirror">
+ <property name="URL1" value="http://download.eclipse.org/technology/m2e/releases/"/>
+ <property name="URL2" value="http://repository.sonatype.org/content/repositories/forge-sites/m2e-extra..."/>
+ <property name="URL3" value="http://download.jboss.org/jbosstools/updates/m2eclipse-wtp/"/>
+
+ <!--
+ <property name="URL1" value="https://repository.sonatype.org/content/sites/forge-sites/m2e/1.0.0/N/1.0..."/>
+ <property name="URL2" value="https://repository.sonatype.org/content/repositories/forge-sites/m2e-extr..."/>
+ <property name="URL3" value="https://repository.sonatype.org/content/sites/forge-sites/m2eclipse-wtp/0..."/>
+ <property name="URL4" value="http://download.jboss.org/jbosstools/updates/m2eclipse-wtp/"/>
+
+ <property name="URL1" value="https://repository.sonatype.org/content/sites/forge-sites/m2e/1.0.0/N/1.0..."/>
+ <property name="URL2" value="https://repository.sonatype.org/content/repositories/forge-sites/m2e-extr..."/>
+ <property name="URL3" value="https://repository.sonatype.org/content/sites/forge-sites/m2eclipse-wtp/0..."/>
+
+ <property name="URL1" value="http://download.eclipse.org/technology/m2e/milestones/1.0/"/>
+ <property name="URL2" value="http://m2eclipse.sonatype.org/sites/m2e"/>
+ <property name="URL3" value="http://m2eclipse.sonatype.org/sites/m2e-extras/"/>
+ <property name="URL4" value="http://download.jboss.org/jbosstools/updates/requirements/m2eclipse-wtp-e37/"/>
+
+ <property name="URL1" value="https://repository.sonatype.org/content/sites/forge-sites/m2e/0.13.0/N/0...."/>
+ <property name="URL2" value="https://repository.sonatype.org/content/sites/forge-sites/m2e-extras/0.13..."/>
+ <property name="URL3" value="https://repository.sonatype.org/content/sites/forge-sites/m2eclipse-wtp/0..."/>
+
+ <property name="URL1" value="https://repository.sonatype.org/content/sites/forge-sites/m2e/0.13.0/N/0...."/>
+ <property name="URL2" value="https://repository.sonatype.org/content/sites/forge-sites/m2e-extras/0.13..."/>
+ <property name="URL3" value="https://repository.sonatype.org/content/sites/forge-sites/m2eclipse-wtp/0..."/>
+
+ <property name="URL1" value="https://repository.sonatype.org/content/sites/forge-sites/m2e/0.13.0/N/0...."/>
+ <property name="URL2" value="https://repository.sonatype.org/content/sites/forge-sites/m2e-extras/0.13..."/>
+ <property name="URL3" value="https://repository.sonatype.org/content/sites/forge-sites/m2eclipse-wtp/0..."/>
+
+ <property name="URL1" value="http://m2eclipse.sonatype.org/sites/m2e/" />
+ <property name="URL2" value="http://m2eclipse.sonatype.org/sites/m2e-extras/" />
+ <property name="URL3" value="http://download.eclipse.org/technology/m2e/updates/M/" />
+ -->
+
+ <property name="destination" value="/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/m2eclipse/" />
+ <property name="compress" value="true" />
+
+ <p2.mirror>
+ <repository location="file:${destination}/20111005-1500" name="m2eclipse 1.0.100 for Eclipse 3.6 - 3.7 (mirrored 20111005-1500)" />
+ <source>
+ <repository location="${URL1}" />
+ <repository location="${URL2}" />
+ <repository location="${URL3}" />
+ </source>
+
+ <slicingOptions includeFeatures="true" followStrict="true" />
+ </p2.mirror>
+
+ <p2.publish.featuresAndBundles metadataRepository="file:${destination}/20111005-1500/" artifactRepository="file:${destination}/20111005-1500/"
+ publishartifacts="true" source="${destination}/20111005-1500/" compress="${compress}" />
+ </target>
+</project>
Modified: trunk/download.jboss.org/jbosstools/updates/requirements/m2eclipse/build.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/m2eclipse/build.xml 2012-02-08 17:58:25 UTC (rev 38517)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/m2eclipse/build.xml 2012-02-08 18:36:45 UTC (rev 38518)
@@ -16,57 +16,28 @@
-f ~/RHDS/updates/requirements/m2eclipse/build.xml -Ddestination=/tmp/m2eclipse-repo
-->
<target name="mirror">
- <property name="URL1" value="http://download.eclipse.org/technology/m2e/releases/"/>
- <property name="URL2" value="http://repository.sonatype.org/content/repositories/forge-sites/m2e-extra..."/>
- <property name="URL3" value="http://download.jboss.org/jbosstools/updates/m2eclipse-wtp/"/>
+ <property name="URL1" value="http://download.jboss.org/jbosstools/updates/m2eclipse-wtp/"/>
+ <property name="URL2" value="http://download.jboss.org/jbosstools/updates/m2e-jdt-compiler/"/>
<!--
- <property name="URL1" value="https://repository.sonatype.org/content/sites/forge-sites/m2e/1.0.0/N/1.0..."/>
- <property name="URL2" value="https://repository.sonatype.org/content/repositories/forge-sites/m2e-extr..."/>
- <property name="URL3" value="https://repository.sonatype.org/content/sites/forge-sites/m2eclipse-wtp/0..."/>
- <property name="URL4" value="http://download.jboss.org/jbosstools/updates/m2eclipse-wtp/"/>
-
- <property name="URL1" value="https://repository.sonatype.org/content/sites/forge-sites/m2e/1.0.0/N/1.0..."/>
- <property name="URL2" value="https://repository.sonatype.org/content/repositories/forge-sites/m2e-extr..."/>
- <property name="URL3" value="https://repository.sonatype.org/content/sites/forge-sites/m2eclipse-wtp/0..."/>
-
- <property name="URL1" value="http://download.eclipse.org/technology/m2e/milestones/1.0/"/>
- <property name="URL2" value="http://m2eclipse.sonatype.org/sites/m2e"/>
- <property name="URL3" value="http://m2eclipse.sonatype.org/sites/m2e-extras/"/>
- <property name="URL4" value="http://download.jboss.org/jbosstools/updates/requirements/m2eclipse-wtp-e37/"/>
-
- <property name="URL1" value="https://repository.sonatype.org/content/sites/forge-sites/m2e/0.13.0/N/0...."/>
- <property name="URL2" value="https://repository.sonatype.org/content/sites/forge-sites/m2e-extras/0.13..."/>
- <property name="URL3" value="https://repository.sonatype.org/content/sites/forge-sites/m2eclipse-wtp/0..."/>
-
- <property name="URL1" value="https://repository.sonatype.org/content/sites/forge-sites/m2e/0.13.0/N/0...."/>
- <property name="URL2" value="https://repository.sonatype.org/content/sites/forge-sites/m2e-extras/0.13..."/>
- <property name="URL3" value="https://repository.sonatype.org/content/sites/forge-sites/m2eclipse-wtp/0..."/>
-
- <property name="URL1" value="https://repository.sonatype.org/content/sites/forge-sites/m2e/0.13.0/N/0...."/>
- <property name="URL2" value="https://repository.sonatype.org/content/sites/forge-sites/m2e-extras/0.13..."/>
- <property name="URL3" value="https://repository.sonatype.org/content/sites/forge-sites/m2eclipse-wtp/0..."/>
-
- <property name="URL1" value="http://m2eclipse.sonatype.org/sites/m2e/" />
- <property name="URL2" value="http://m2eclipse.sonatype.org/sites/m2e-extras/" />
- <property name="URL3" value="http://download.eclipse.org/technology/m2e/updates/M/" />
+ <property name="URL1" value="http://download.eclipse.org/technology/m2e/releases/"/>
+ <property name="URL2" value="http://repository.sonatype.org/content/repositories/forge-sites/m2e-extra..."/>
-->
<property name="destination" value="/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/m2eclipse/" />
<property name="compress" value="true" />
<p2.mirror>
- <repository location="file:${destination}/20111005-1500" name="m2eclipse 1.0.100 for Eclipse 3.6 - 3.7 (mirrored 20111005-1500)" />
+ <repository location="file:${destination}/20120208-1400" name="m2e 1.0, m2e-wtp 0.15, m2e-extras 0.15, m2e-jdt-compiler 1.0 (mirrored 20120208-1400)" />
<source>
<repository location="${URL1}" />
<repository location="${URL2}" />
- <repository location="${URL3}" />
</source>
<slicingOptions includeFeatures="true" followStrict="true" />
</p2.mirror>
- <p2.publish.featuresAndBundles metadataRepository="file:${destination}/20111005-1500/" artifactRepository="file:${destination}/20111005-1500/"
- publishartifacts="true" source="${destination}/20111005-1500/" compress="${compress}" />
+ <p2.publish.featuresAndBundles metadataRepository="file:${destination}/20120208-1400/" artifactRepository="file:${destination}/20120208-1400/"
+ publishartifacts="true" source="${destination}/20120208-1400/" compress="${compress}" />
</target>
</project>
14 years, 2 months
JBoss Tools SVN: r38517 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-02-08 12:58:25 -0500 (Wed, 08 Feb 2012)
New Revision: 38517
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIMarkerResolutionUtils.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/ValuedQualifier.java
Log:
Wizard 'Specify CDI Bean for the Injection Point' does not compute correctly condition 'can finish' https://issues.jboss.org/browse/JBIDE-10637
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIMarkerResolutionUtils.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIMarkerResolutionUtils.java 2012-02-08 17:46:07 UTC (rev 38516)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/CDIMarkerResolutionUtils.java 2012-02-08 17:58:25 UTC (rev 38517)
@@ -345,7 +345,7 @@
return false;
}
}
- if(bean.getQualifiers().size() == qualifiers.size())
+ if(bean.getQualifiers().size() == qualifiers.size() && bean.getQualifiers().size() != 0)
return true;
return false;
}
@@ -354,31 +354,20 @@
Set<IQualifier> qualifiers = bean.getQualifiers();
for(IQualifier q : qualifiers){
- if(q.getSourceType().getFullyQualifiedName().equals(valuedQualifier.getQualifier().getSourceType().getFullyQualifiedName()))
+ IQualifierDeclaration declaration = CDIMarkerResolutionUtils.findQualifierDeclaration(bean, q);
+ ValuedQualifier vq = null;
+ if(declaration != null){
+ vq = new ValuedQualifier(q, declaration);
+ }else{
+ vq = new ValuedQualifier(q);
+ }
+ if(vq.equals(valuedQualifier)){
return true;
+ }
}
return false;
}
- public static String findQualifierValue(IBean bean, IQualifier qualifier){
- IQualifierDeclaration declaration = findQualifierDeclaration(bean, qualifier);
- if(declaration == null)
- return "";
-
- return findQualifierValue(bean, declaration);
- }
-
- public static String findQualifierValue(IBean bean, IQualifierDeclaration declaration){
- Object value = declaration.getMemberValue(null);
-
- String result = value == null ? "" : value.toString();
-
- if("".equals(result) && declaration.getQualifier().getSourceType().getFullyQualifiedName().equals(CDIConstants.NAMED_QUALIFIER_TYPE_NAME))
- result = getELName(bean);
-
- return result;
- }
-
public static IQualifierDeclaration findQualifierDeclaration(IBean bean, IQualifier qualifier){
Set<IQualifierDeclaration> declarations = bean.getQualifierDeclarations();
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/ValuedQualifier.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/ValuedQualifier.java 2012-02-08 17:46:07 UTC (rev 38516)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/ValuedQualifier.java 2012-02-08 17:58:25 UTC (rev 38517)
@@ -114,6 +114,15 @@
return generateValue();
}
+ public Object getValue(String name){
+ for(Pair pair : pairs){
+ if(pair.name.equals(name)){
+ return pair.value;
+ }
+ }
+ return null;
+ }
+
public String getStringValue(){
for(Pair pair : pairs){
if(pair.name.equals("value") && pair.type.equals("String")){
@@ -155,8 +164,14 @@
@Override
public boolean equals(Object obj) {
- if(obj instanceof ValuedQualifier)
- return getQualifier().getSourceType().getFullyQualifiedName().equals(((ValuedQualifier)obj).getQualifier().getSourceType().getFullyQualifiedName());
+ if(obj instanceof ValuedQualifier && getQualifier().getSourceType().getFullyQualifiedName().equals(((ValuedQualifier)obj).getQualifier().getSourceType().getFullyQualifiedName())){
+ for(Pair pair : ((ValuedQualifier)obj).getValuePairs()){
+ if(!pair.value.equals(getValue(pair.name)) || pair.value == null){
+ return false;
+ }
+ }
+ return true;
+ }
return false;
}
14 years, 2 months
JBoss Tools SVN: r38516 - in trunk/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-02-08 12:46:07 -0500 (Wed, 08 Feb 2012)
New Revision: 38516
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ModuleRestartSection.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerWorkingCopyPropertyButtonCommand.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerWorkingCopyPropertyCommand.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
Log:
JBIDE-10464 - additions for UI
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServer.java 2012-02-08 16:55:29 UTC (rev 38515)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServer.java 2012-02-08 17:46:07 UTC (rev 38516)
@@ -27,7 +27,8 @@
public static final String DEPLOY_DIRECTORY_TYPE = "org.jboss.ide.eclipse.as.core.server.deployDirectoryType"; //$NON-NLS-1$
public static final String ZIP_DEPLOYMENTS_PREF = "org.jboss.ide.eclipse.as.core.server.zipDeploymentsPreference"; //$NON-NLS-1$
public static final String ORG_JBOSS_TOOLS_AS_RESTART_FILE_PATTERN = "org.jboss.tools.as.restartFilePattern"; //$NON-NLS-1$
-
+ public static final String ORG_JBOSS_TOOLS_AS_RESTART_DEFAULT_FILE_PATTERN = "\\.jar$"; //$NON-NLS-1$
+
public static final String DEPLOY_METADATA = "metadata"; //$NON-NLS-1$
public static final String DEPLOY_CUSTOM = "custom"; //$NON-NLS-1$
public static final String DEPLOY_SERVER = "server"; //$NON-NLS-1$
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java 2012-02-08 16:55:29 UTC (rev 38515)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java 2012-02-08 17:46:07 UTC (rev 38516)
@@ -117,9 +117,17 @@
return getAttribute(ZIP_DEPLOYMENTS_PREF, false);
}
- // kept static to avoid overhead of pattern compilation
- final private static Pattern defaultFilePattern = Pattern.compile("\\.jar$", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
+ // cannot be static, as different servers may have different defaults
private Pattern restartFilePattern = null;
+ protected Pattern defaultFilePattern = Pattern.compile(
+ getDefaultModuleRestartPattern(),
+ Pattern.CASE_INSENSITIVE);
+
+ /* Needs to be public so UI can access this */
+ public String getDefaultModuleRestartPattern() {
+ return IDeployableServer.ORG_JBOSS_TOOLS_AS_RESTART_DEFAULT_FILE_PATTERN;
+ }
+
public void setRestartFilePattern(String filepattern) {
setAttribute(ORG_JBOSS_TOOLS_AS_RESTART_FILE_PATTERN, filepattern);
this.restartFilePattern = null;
@@ -127,20 +135,25 @@
public Pattern getRestartFilePattern() {
if( this.restartFilePattern == null ) {
- // ensure it's set properly from the saved attribute
- String currentPattern = getAttribute(ORG_JBOSS_TOOLS_AS_RESTART_FILE_PATTERN, (String)null);
- try {
- this.restartFilePattern = currentPattern == null ? defaultFilePattern :
- Pattern.compile(currentPattern, Pattern.CASE_INSENSITIVE);
- } catch(PatternSyntaxException pse) {
- JBossServerCorePlugin.log("Could not set restart file pattern to: " + currentPattern, pse); //$NON-NLS-1$
- // avoid errors over and over
- this.restartFilePattern = defaultFilePattern;
- }
+ compileRestartPattern();
}
return this.restartFilePattern;
}
+ private void compileRestartPattern() {
+ // ensure it's set properly from the saved attribute
+ String currentPattern = getAttribute(ORG_JBOSS_TOOLS_AS_RESTART_FILE_PATTERN, (String)null);
+ try {
+ this.restartFilePattern = currentPattern == null ? defaultFilePattern :
+ Pattern.compile(currentPattern, Pattern.CASE_INSENSITIVE);
+ } catch(PatternSyntaxException pse) {
+ JBossServerCorePlugin.log("Could not set restart file pattern to: " + currentPattern, pse); //$NON-NLS-1$
+ // avoid errors over and over
+ this.restartFilePattern = defaultFilePattern;
+ }
+ }
+
+
/*
* (non-Javadoc)
* @see org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer#getAttributeHelper()
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ModuleRestartSection.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ModuleRestartSection.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ModuleRestartSection.java 2012-02-08 17:46:07 UTC (rev 38516)
@@ -0,0 +1,127 @@
+/*******************************************************************************
+ * Copyright (c) 2012 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.editor;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.forms.widgets.ExpandableComposite;
+import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.eclipse.wst.server.ui.editor.ServerEditorSection;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.internal.DeployableServer;
+import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
+import org.jboss.ide.eclipse.as.core.util.ServerConverter;
+import org.jboss.ide.eclipse.as.ui.Messages;
+import org.jboss.ide.eclipse.as.ui.UIUtil;
+
+public class ModuleRestartSection extends ServerEditorSection {
+
+ public ModuleRestartSection() {
+ }
+ private Button customizePattern;
+ private Text restartPatternText;
+ private SelectionListener checkboxListener;
+ private ModifyListener textListener;
+ protected ServerAttributeHelper helper;
+
+ public void init(IEditorSite site, IEditorInput input) {
+ super.init(site, input);
+ helper = new ServerAttributeHelper(server.getOriginal(), server);
+ }
+
+ public void createSection(Composite parent) {
+ super.createSection(parent);
+ createUI(parent);
+ addListeners();
+ DeployableServer ds = (DeployableServer)ServerConverter.getDeployableServer(server.getOriginal());
+ String defaultPattern = ds.getDefaultModuleRestartPattern();
+ String pattern = server.getAttribute(IDeployableServer.ORG_JBOSS_TOOLS_AS_RESTART_FILE_PATTERN, defaultPattern);
+ customizePattern.setSelection(!defaultPattern.equals(pattern));
+ restartPatternText.setEnabled(!defaultPattern.equals(pattern));
+ restartPatternText.setText(pattern == null ? defaultPattern : pattern);
+ }
+
+ protected void createUI(Composite parent) {
+
+ FormToolkit toolkit = new FormToolkit(parent.getDisplay());
+ Section section = toolkit.createSection(parent, ExpandableComposite.TWISTIE|ExpandableComposite.EXPANDED|ExpandableComposite.TITLE_BAR);
+ section.setText("Application Reload Behavior");
+ section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.VERTICAL_ALIGN_FILL));
+
+ Composite composite = toolkit.createComposite(section);
+ composite.setLayout(new FormLayout());
+
+ customizePattern = toolkit.createButton(composite, "Customize application reload behavior on changes to project resources", SWT.CHECK);
+ customizePattern.setLayoutData(UIUtil.createFormData2(0, 5, null, 0, 0, 5, null, 0));
+ Label l = toolkit.createLabel(composite, "Force module restart on following regex pattern: ");
+ l.setLayoutData(UIUtil.createFormData2(customizePattern, 5, null, 0, 0, 5, null, 0));
+ restartPatternText = toolkit.createText(composite, "");
+ restartPatternText.setLayoutData(UIUtil.createFormData2(l, 5, null, 0, 0, 5, 100, -5));
+
+ toolkit.paintBordersFor(composite);
+ section.setClient(composite);
+ }
+
+ protected void addListeners() {
+ checkboxListener = new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ execute(new SetCustomizePatternCommand(server));
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ };
+ textListener = new ModifyListener() {
+ public void modifyText(ModifyEvent e) {
+ execute(new SetCustomPatternCommand(server));
+ }
+ };
+
+ this.customizePattern.addSelectionListener(checkboxListener);
+ this.restartPatternText.addModifyListener(textListener);
+ }
+
+ public class SetCustomizePatternCommand extends ServerWorkingCopyPropertyButtonCommand {
+ public SetCustomizePatternCommand(IServerWorkingCopy server) {
+ super(server, Messages.EditorChangeStartPollerCommandName,
+ customizePattern, customizePattern.getSelection(), null, checkboxListener);
+ }
+ public void execute() {
+ super.execute();
+ restartPatternText.setEnabled(customizePattern.getSelection());
+ }
+ public void undo() {
+ super.undo();
+ restartPatternText.setEnabled(customizePattern.getSelection());
+ }
+ }
+
+ public class SetCustomPatternCommand extends ServerWorkingCopyPropertyCommand {
+ public SetCustomPatternCommand(IServerWorkingCopy server) {
+ super(server, Messages.EditorChangeStopPollerCommandName,
+ restartPatternText, restartPatternText.getText(),
+ IDeployableServer.ORG_JBOSS_TOOLS_AS_RESTART_FILE_PATTERN,
+ textListener);
+ }
+ }
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java 2012-02-08 16:55:29 UTC (rev 38515)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerPasswordSection.java 2012-02-08 17:46:07 UTC (rev 38516)
@@ -1,24 +1,13 @@
-/**
- * JBoss by Red Hat
- * Copyright 2006-2009, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+/*******************************************************************************
+ * Copyright (c) 2012 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.ide.eclipse.as.ui.editor;
import org.eclipse.core.runtime.IProgressMonitor;
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerWorkingCopyPropertyButtonCommand.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerWorkingCopyPropertyButtonCommand.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerWorkingCopyPropertyButtonCommand.java 2012-02-08 17:46:07 UTC (rev 38516)
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2012 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.editor;
+
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
+import org.eclipse.wst.server.ui.internal.command.ServerCommand;
+/**
+ * @since 2.3
+ */
+public class ServerWorkingCopyPropertyButtonCommand extends ServerCommand {
+ protected boolean oldVal;
+ protected boolean newVal;
+ protected String key;
+ protected Button button;
+ protected SelectionListener listener;
+ protected IServerWorkingCopy wc;
+
+ public ServerWorkingCopyPropertyButtonCommand(IServerWorkingCopy wc, String commandName,
+ Button button, boolean newVal, String attributeKey, SelectionListener listener) {
+ super(wc, commandName);
+ this.wc = wc;
+ this.button = button;
+ this.key = attributeKey;
+ this.newVal = newVal;
+ this.listener = listener;
+ if( key != null )
+ this.oldVal = wc.getAttribute(attributeKey, false);
+ }
+
+ public void execute() {
+ if( key != null )
+ wc.setAttribute(key, newVal);
+ }
+
+ public void undo() {
+ if( listener != null )
+ button.removeSelectionListener(listener);
+ if( key != null )
+ wc.setAttribute(key, oldVal);
+ if( button != null && !button.isDisposed())
+ button.setSelection(oldVal);
+ if( listener != null )
+ button.addSelectionListener(listener);
+ }
+}
\ No newline at end of file
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerWorkingCopyPropertyCommand.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerWorkingCopyPropertyCommand.java 2012-02-08 16:55:29 UTC (rev 38515)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ServerWorkingCopyPropertyCommand.java 2012-02-08 17:46:07 UTC (rev 38516)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2012 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:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.ide.eclipse.as.ui.editor;
import org.eclipse.swt.events.ModifyListener;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2012-02-08 16:55:29 UTC (rev 38515)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2012-02-08 17:46:07 UTC (rev 38516)
@@ -165,6 +165,12 @@
-->
<section
+ class="org.jboss.ide.eclipse.as.ui.editor.ModuleRestartSection"
+ id="org.jboss.ide.eclipse.as.ui.editor.moduleRestartSection"
+ insertionId="org.eclipse.wst.server.editor.overview.right"
+ order="9"
+ typeIds="%AllJBossServerTypes"/>
+ <section
class="org.jboss.ide.eclipse.as.ui.editor.PollerSection"
id="org.jboss.ide.eclipse.as.ui.editor.pollerSection"
insertionId="org.eclipse.wst.server.editor.overview.right"
14 years, 2 months
JBoss Tools SVN: r38514 - trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-02-08 11:01:52 -0500 (Wed, 08 Feb 2012)
New Revision: 38514
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java
Log:
Modifying CDIProjectHelper to not use sleep method
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java 2012-02-08 16:01:14 UTC (rev 38513)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java 2012-02-08 16:01:52 UTC (rev 38514)
@@ -19,8 +19,10 @@
import org.jboss.tools.cdi.bot.test.CDIConstants;
import org.jboss.tools.cdi.bot.test.uiutils.actions.NewFileWizardAction;
import org.jboss.tools.cdi.bot.test.uiutils.wizards.DynamicWebProjectWizard;
-import org.jboss.tools.ui.bot.ext.Timing;
+import org.jboss.tools.ui.bot.ext.condition.ProgressInformationShellIsActiveCondition;
+import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
public class CDIProjectHelper extends CDIBase{
@@ -32,10 +34,7 @@
new NewFileWizardAction().run()
.selectTemplate(CDIConstants.CDI_GROUP, CDIConstants.CDI_WEB_PROJECT).next();
- new DynamicWebProjectWizard().setProjectName(projectName).finish();
- bot.sleep(Timing.time5S());
- util.waitForNonIgnoredJobs();
- bot.sleep(Timing.time5S());
+ new DynamicWebProjectWizard().setProjectName(projectName).finishWithWait();
}
/**
@@ -55,8 +54,7 @@
public void createDynamicWebProjectWithCDIPreset(String projectName) {
new NewFileWizardAction().run()
.selectTemplate(CDIConstants.WEB_GROUP, CDIConstants.DYNAMIC_WEB_PROJECT).next();
- new DynamicWebProjectWizard().setProjectName(projectName).setCDIPreset().finish();
- util.waitForNonIgnoredJobs();
+ new DynamicWebProjectWizard().setProjectName(projectName).setCDIPreset().finishWithWait();
}
/**
@@ -66,9 +64,7 @@
public void createDynamicWebProjectWithCDIFacets(String projectName) {
new NewFileWizardAction().run()
.selectTemplate(CDIConstants.WEB_GROUP, CDIConstants.DYNAMIC_WEB_PROJECT).next();
- new DynamicWebProjectWizard().setProjectName(projectName).setCDIFacet().finish();
- bot.sleep(Timing.time5S());
- util.waitForNonIgnoredJobs();
+ new DynamicWebProjectWizard().setProjectName(projectName).setCDIFacet().finishWithWait();
}
/**
@@ -94,8 +90,7 @@
private void createDynamicWebProject(String projectName) {
new NewFileWizardAction().run()
.selectTemplate(CDIConstants.WEB_GROUP, CDIConstants.DYNAMIC_WEB_PROJECT).next();
- new DynamicWebProjectWizard().setProjectName(projectName).finish();
- util.waitForNonIgnoredJobs();
+ new DynamicWebProjectWizard().setProjectName(projectName).finishWithWait();
}
/**
@@ -109,9 +104,8 @@
item.expand();
NodeContextUtil.nodeContextMenu(tree, item, CDIConstants.CONFIGURE,
CDIConstants.ADD_CDI_SUPPORT).click();
- bot.activeShell().bot().button("OK").click();
- bot.sleep(Timing.time2S());
- util.waitForNonIgnoredJobs();
+ bot.activeShell().bot().button(IDELabel.Button.OK).click();
+ bot.waitWhile(new ProgressInformationShellIsActiveCondition(), TaskDuration.LONG.getTimeout());
}
/**
@@ -128,7 +122,7 @@
bot.tree().expandNode(CDIConstants.CDI_PROPERTIES_SETTINGS).select();
boolean isCDISupported = bot.checkBox().isChecked();
- bot.button("Cancel").click();
+ bot.button(IDELabel.Button.CANCEL).click();
return isCDISupported;
}
14 years, 2 months
JBoss Tools SVN: r38513 - trunk/cdi/tests/org.jboss.tools.cdi.bot.test.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-02-08 11:01:14 -0500 (Wed, 08 Feb 2012)
New Revision: 38513
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml
Log:
System properties to be able to debug tests run with maven
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml 2012-02-08 15:18:30 UTC (rev 38512)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml 2012-02-08 16:01:14 UTC (rev 38513)
@@ -11,7 +11,8 @@
<packaging>eclipse-test-plugin</packaging>
<properties>
- <systemProperties>-Dswtbot.test.properties.file=${project.basedir}/properties/config_files/swtbot.properties</systemProperties>
+ <!-- <systemProperties>-Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=y -Dswtbot.test.properties.file=${project.basedir}/properties/config_files/swtbot.properties</systemProperties> -->
+ <systemProperties> -Dswtbot.test.properties.file=${project.basedir}/properties/config_files/swtbot.properties</systemProperties>
<test.suite.class>org.jboss.tools.cdi.bot.test.CDIAllBotTests</test.suite.class>
</properties>
@@ -46,19 +47,6 @@
<artifactId>org.jboss.tools.cdi.seam.feature.feature.group</artifactId>
<version>0.0.0</version>
</dependency>
-
- <!--
- <dependency>
- <type>p2-installable-unit</type>
- <artifactId>org.eclipse.jst.server_ui.feature.feature.group</artifactId>
- <version>0.0.0</version>
- </dependency>
- <dependency>
- <type>p2-installable-unit</type>
- <artifactId>org.jboss.tools.richfaces.feature.feature.group</artifactId>
- <version>0.0.0</version>
- </dependency>
- -->
</dependencies>
</configuration>
</plugin>
14 years, 2 months
JBoss Tools SVN: r38512 - trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test.
by jbosstools-commits@lists.jboss.org
Author: rawagner
Date: 2012-02-08 10:18:30 -0500 (Wed, 08 Feb 2012)
New Revision: 38512
Modified:
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/Configurators.java
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/MavenAllBotTests.java
Log:
fixed small bug in CDI configurator test
Modified: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/Configurators.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/Configurators.java 2012-02-08 14:51:28 UTC (rev 38511)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/Configurators.java 2012-02-08 15:18:30 UTC (rev 38512)
@@ -65,6 +65,7 @@
}
//TODO https://issues.jboss.org/browse/JBIDE-10468
+ //https://issues.jboss.org/browse/JBIDE-10831
@Test
public void testJSFConfigurator() throws Exception{
createMavenizedDynamicWebProject(PROJECT_NAME_JSF, false);
@@ -104,7 +105,7 @@
assertTrue("Project "+PROJECT_NAME_CDI_EJB+" doesn't have "+CDI_NATURE+" nature.",Utils.hasNature(PROJECT_NAME_CDI_EJB, CDI_NATURE));
}
- //@Test
+ @Test
public void testJAXRSConfigurator() throws Exception {
createMavenizedDynamicWebProject(PROJECT_NAME_JSF, false);
addDependencies(PROJECT_NAME_JSF, "com.cedarsoft.rest", "jersey", "1.0.0");
@@ -128,6 +129,7 @@
botExt.tree().expandNode("JBoss Community").select("JBoss 6.x Runtime");
botExt.button("Next >").click();
botExt.textWithLabel("Home Directory").setText(JBOSS6_AS_HOME);
+ botExt.button("Finish").click();
} else {
botExt.comboBoxInGroup("Target runtime").setSelection("<None>");
}
@@ -264,7 +266,7 @@
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = factory.newDocumentBuilder();
- Document docPom = docBuilder.parse(facade.getProject().getFile("pom.xml").getContents());
+ Document docPom = docBuilder.parse(facade.getProject().getFile("web.xml").getContents());
Element servletElement = docPom.createElement("servlet");
Element servletNameElement = docPom.createElement("servlet-name");
Element servletClassElement = docPom.createElement("servlet-class");
Modified: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/MavenAllBotTests.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/MavenAllBotTests.java 2012-02-08 14:51:28 UTC (rev 38511)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/MavenAllBotTests.java 2012-02-08 15:18:30 UTC (rev 38512)
@@ -21,12 +21,12 @@
*/
@RunWith(RequirementAwareSuite.class)
@Suite.SuiteClasses({
- //CreateMavenizedSeamProjectTest.class,
- //CreateMavenizedEARProjectTest.class,
- //CreateMavenizedJSFProjectTest.class,
- //MavenProfileSelectionTest.class, //failures
- //MaterializeLibraryTest.class,
- //CreateMavenProjectsTest.class,
+ CreateMavenizedSeamProjectTest.class,
+ CreateMavenizedEARProjectTest.class,
+ CreateMavenizedJSFProjectTest.class,
+ MavenProfileSelectionTest.class, //failures
+ MaterializeLibraryTest.class,
+ CreateMavenProjectsTest.class,
Configurators.class
})
public class MavenAllBotTests {
14 years, 2 months
JBoss Tools SVN: r38511 - in trunk/as: plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-02-08 09:51:28 -0500 (Wed, 08 Feb 2012)
New Revision: 38511
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2/ModuleRestartDetectionTest.java
Log:
JBIDE-10464 - max patch, move setting to inside server, adjust tests
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServer.java 2012-02-08 14:48:24 UTC (rev 38510)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IDeployableServer.java 2012-02-08 14:51:28 UTC (rev 38511)
@@ -11,6 +11,8 @@
package org.jboss.ide.eclipse.as.core.server;
+import java.util.regex.Pattern;
+
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
@@ -24,6 +26,7 @@
public static final String TEMP_DEPLOY_DIRECTORY = "org.jboss.ide.eclipse.as.core.server.tempDeployDirectory"; //$NON-NLS-1$
public static final String DEPLOY_DIRECTORY_TYPE = "org.jboss.ide.eclipse.as.core.server.deployDirectoryType"; //$NON-NLS-1$
public static final String ZIP_DEPLOYMENTS_PREF = "org.jboss.ide.eclipse.as.core.server.zipDeploymentsPreference"; //$NON-NLS-1$
+ public static final String ORG_JBOSS_TOOLS_AS_RESTART_FILE_PATTERN = "org.jboss.tools.as.restartFilePattern"; //$NON-NLS-1$
public static final String DEPLOY_METADATA = "metadata"; //$NON-NLS-1$
public static final String DEPLOY_CUSTOM = "custom"; //$NON-NLS-1$
@@ -43,5 +46,8 @@
public ServerAttributeHelper getAttributeHelper();
public IServer getServer();
+ public void setRestartFilePattern(String filepattern);
+ public Pattern getRestartFilePattern();
+
public boolean hasJMXProvider();
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java 2012-02-08 14:48:24 UTC (rev 38510)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServer.java 2012-02-08 14:51:28 UTC (rev 38511)
@@ -10,6 +10,9 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.core.server.internal;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -20,6 +23,7 @@
import org.eclipse.wst.server.core.IServerWorkingCopy;
import org.eclipse.wst.server.core.ServerPort;
import org.eclipse.wst.server.core.model.ServerDelegate;
+import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.util.RuntimeUtils;
@@ -113,7 +117,30 @@
return getAttribute(ZIP_DEPLOYMENTS_PREF, false);
}
+ // kept static to avoid overhead of pattern compilation
+ final private static Pattern defaultFilePattern = Pattern.compile("\\.jar$", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
+ private Pattern restartFilePattern = null;
+ public void setRestartFilePattern(String filepattern) {
+ setAttribute(ORG_JBOSS_TOOLS_AS_RESTART_FILE_PATTERN, filepattern);
+ this.restartFilePattern = null;
+ }
+ public Pattern getRestartFilePattern() {
+ if( this.restartFilePattern == null ) {
+ // ensure it's set properly from the saved attribute
+ String currentPattern = getAttribute(ORG_JBOSS_TOOLS_AS_RESTART_FILE_PATTERN, (String)null);
+ try {
+ this.restartFilePattern = currentPattern == null ? defaultFilePattern :
+ Pattern.compile(currentPattern, Pattern.CASE_INSENSITIVE);
+ } catch(PatternSyntaxException pse) {
+ JBossServerCorePlugin.log("Could not set restart file pattern to: " + currentPattern, pse); //$NON-NLS-1$
+ // avoid errors over and over
+ this.restartFilePattern = defaultFilePattern;
+ }
+ }
+ return this.restartFilePattern;
+ }
+
/*
* (non-Javadoc)
* @see org.jboss.ide.eclipse.as.core.server.attributes.IDeployableServer#getAttributeHelper()
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java 2012-02-08 14:48:24 UTC (rev 38510)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java 2012-02-08 14:51:28 UTC (rev 38511)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 Red Hat, Inc.
+ * Copyright (c) 2012 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,
@@ -13,7 +13,6 @@
import java.util.HashMap;
import java.util.List;
import java.util.regex.Pattern;
-import java.util.regex.PatternSyntaxException;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -30,43 +29,22 @@
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.publishers.LocalPublishMethod;
import org.jboss.ide.eclipse.as.core.publishers.patterns.IModulePathFilter;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethod;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethodType;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublisher;
import org.jboss.ide.eclipse.as.core.server.internal.launch.DeployableLaunchConfiguration;
import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader;
+import org.jboss.ide.eclipse.as.core.util.ServerConverter;
/**
* @author Rob Stryker
*/
public class DeployableServerBehavior extends ServerBehaviourDelegate {
- public static final String ORG_JBOSS_TOOLS_AS_RESTART_FILE_PATTERN = "org.jboss.tools.as.restartFilePattern"; //$NON-NLS-1$
-
- // kept static to avoid overhead of pattern compilation
- final private static Pattern defaultFilePattern = Pattern.compile("\\.jar$", Pattern.CASE_INSENSITIVE); //$NON-NLS-1$
-
- // contains the pattern to use to recognize if files deployed needs to result in restart
- // can be set via system property "org.jboss.tools.as.restartFilePattern" but should eventually be made
- // available via server settings.
- private Pattern restartFilePattern = null;
-
public DeployableServerBehavior() {
- String systemPattern = System.getProperty(ORG_JBOSS_TOOLS_AS_RESTART_FILE_PATTERN,null);
-
- if(systemPattern == null) {
- restartFilePattern = defaultFilePattern;
- } else {
- try {
- setRestartFilePattern(systemPattern);
- } catch(PatternSyntaxException pse) {
- JBossServerCorePlugin.getDefault();
- JBossServerCorePlugin.log("Could not set restart file pattern to: " + systemPattern, pse); //$NON-NLS-1$
- }
- }
}
-
public void stop(boolean force) {
setServerStopped(); // simple enough
}
@@ -243,20 +221,14 @@
}
public boolean changedFileRequiresModuleRestart(IModuleFile file) {
+ IDeployableServer ds = ServerConverter.getDeployableServer(getServer());
+ Pattern restartFilePattern = ds.getRestartFilePattern();
if (restartFilePattern != null) {
// using find over matches to make it a substring search by default and avoid having to specify .*.class$ instead of just .class$
return restartFilePattern.matcher(file.getName()).find();
- } else {
- if (file.getName().toLowerCase().endsWith(".jar")) //$NON-NLS-1$
- return true;
- return false;
}
+ return false;
}
-
- public void setRestartFilePattern(String filepattern) {
- this.restartFilePattern = Pattern.compile(filepattern, Pattern.CASE_INSENSITIVE);
- }
-
/**
* Some projects may request post-processing filtering on
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2/ModuleRestartDetectionTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2/ModuleRestartDetectionTest.java 2012-02-08 14:48:24 UTC (rev 38510)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2/ModuleRestartDetectionTest.java 2012-02-08 14:51:28 UTC (rev 38511)
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2011 Red Hat, Inc.
+ * Copyright (c) 2012 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,
@@ -12,10 +12,16 @@
import junit.framework.TestCase;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IServerWorkingCopy;
import org.eclipse.wst.server.core.model.IModuleFile;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.internal.DeployableServer;
import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
-import org.jboss.ide.eclipse.as.test.publishing.v2.ModuleRestartDetectionTest.MockFile;
+import org.jboss.ide.eclipse.as.core.util.ServerConverter;
+import org.jboss.ide.eclipse.as.test.util.ServerRuntimeUtils;
public class ModuleRestartDetectionTest extends TestCase {
@@ -45,6 +51,7 @@
}
+ private DeployableServer deployableServer;
private DeployableServerBehavior behavior;
private MockFile mixedJar;
private MockFile classyjar;
@@ -53,6 +60,31 @@
private MockFile jarfile;
private MockFile nodotjar;
+ public void setUp() throws CoreException {
+ IServer depServer = ServerRuntimeUtils.createMockDeployOnlyServer();
+ deployableServer = (DeployableServer)ServerConverter.getDeployableServer(depServer);
+ behavior = (DeployableServerBehavior)depServer.loadAdapter(DeployableServerBehavior.class, null);
+
+ jarfile = new MockFile("blah.jar");
+ classfile = new MockFile("blah.class");
+ nodotjar = new MockFile("nodotjar");
+ htmlfile = new MockFile("blah.html");
+ classyjar = new MockFile("myclassy.jarfile");
+ mixedJar = new MockFile("BLAH.JAr");
+ }
+ private void setRestartFilePattern(String filepattern) {
+ try {
+ IServerWorkingCopy wc = deployableServer.getServer().createWorkingCopy();
+ wc.setAttribute(IDeployableServer.ORG_JBOSS_TOOLS_AS_RESTART_FILE_PATTERN, filepattern);
+ IServer depServer = wc.save(false, null);
+ deployableServer = (DeployableServer)ServerConverter.getDeployableServer(depServer);
+ behavior = (DeployableServerBehavior)depServer.loadAdapter(DeployableServerBehavior.class, null);
+ } catch( CoreException ce ) {
+ fail("Could not update the server");
+ }
+ }
+
+
public void testDefaults() {
@@ -67,21 +99,11 @@
}
- public void setUp() {
- behavior = new DeployableServerBehavior();
-
- jarfile = new MockFile("blah.jar");
- classfile = new MockFile("blah.class");
- nodotjar = new MockFile("nodotjar");
- htmlfile = new MockFile("blah.html");
- classyjar = new MockFile("myclassy.jarfile");
- mixedJar = new MockFile("BLAH.JAr");
- }
public void testClassEndOfLine() {
String filepattern = ".class$";
- behavior.setRestartFilePattern(filepattern);
+ setRestartFilePattern(filepattern);
assertFalse(filepattern + " should not restart on .jar", behavior.changedFileRequiresModuleRestart(jarfile));
assertTrue(filepattern + " should restart on .class", behavior.changedFileRequiresModuleRestart(classfile));
@@ -91,7 +113,7 @@
public void testBasicOr() {
String filepattern = ".class|.jar";
- behavior.setRestartFilePattern(filepattern);
+ setRestartFilePattern(filepattern);
assertTrue(filepattern + " should restart on .jar", behavior.changedFileRequiresModuleRestart(jarfile));
assertTrue(filepattern + " should restart on .class", behavior.changedFileRequiresModuleRestart(classfile));
@@ -103,36 +125,21 @@
public void testCaseInsensitive() {
assertTrue(behavior.changedFileRequiresModuleRestart(new MockFile(".jar")));
-
assertTrue(behavior.changedFileRequiresModuleRestart(new MockFile(".JAR")));
- behavior.setRestartFilePattern(".jar");
+ setRestartFilePattern(".jar");
assertTrue(behavior.changedFileRequiresModuleRestart(new MockFile(".jar")));
-
assertTrue(behavior.changedFileRequiresModuleRestart(new MockFile(".JAR")));
-
}
public void testBasicOrEndOfLine() {
String filepattern = ".class$|.jar$";
- behavior.setRestartFilePattern(filepattern);
+ setRestartFilePattern(filepattern);
assertTrue(filepattern + " should restart on .jar", behavior.changedFileRequiresModuleRestart(jarfile));
assertTrue(filepattern + " should restart on .class", behavior.changedFileRequiresModuleRestart(classfile));
assertFalse(filepattern + " should not restart on .html", behavior.changedFileRequiresModuleRestart(htmlfile));
assertFalse(filepattern + "Default should not restart on file named classy.jarfile", behavior.changedFileRequiresModuleRestart(classyjar));
-
}
-
- public void testSystemProperty() {
-
- System.setProperty(DeployableServerBehavior.ORG_JBOSS_TOOLS_AS_RESTART_FILE_PATTERN,".blah");
-
- behavior = new DeployableServerBehavior();
-
- assertTrue(behavior.changedFileRequiresModuleRestart(new MockFile(".blah")));
- assertFalse(behavior.changedFileRequiresModuleRestart(new MockFile(".jar")));
-
- }
}
14 years, 2 months
JBoss Tools SVN: r38510 - trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-02-08 09:48:24 -0500 (Wed, 08 Feb 2012)
New Revision: 38510
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/JSFTestBase.java
Log:
Modifying to not use sleep method
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/JSFTestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/JSFTestBase.java 2012-02-08 14:47:47 UTC (rev 38509)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/jsf/JSFTestBase.java 2012-02-08 14:48:24 UTC (rev 38510)
@@ -25,7 +25,6 @@
import org.jboss.tools.cdi.bot.test.uiutils.wizards.CDIRefactorWizard;
import org.jboss.tools.cdi.bot.test.uiutils.wizards.XHTMLDialogWizard;
import org.jboss.tools.ui.bot.ext.SWTJBTExt;
-import org.jboss.tools.ui.bot.ext.Timing;
import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.junit.Before;
@@ -61,9 +60,7 @@
protected void createXHTMLPage(String pageName) {
XHTMLDialogWizard xhtmlWizard = new NewXHTMLFileWizard().run();
xhtmlWizard.setDestination(getProjectName() + "/" + CDIConstants.WEBCONTENT +
- "/" + WEB_FOLDER).setName(pageName).finish();
- bot.sleep(Timing.time3S());
- util.waitForNonIgnoredJobs();
+ "/" + WEB_FOLDER).setName(pageName).finishWithWait();
setEd(bot.activeEditor().toTextEditor());
}
@@ -94,7 +91,7 @@
"' Named Bean ";
openContextMenuForTextInEditor(text,
IDELabel.Menu.CDI_REFACTOR, renameContextMenuText);
- bot.sleep(Timing.time3S());
+ bot.waitForShell("Refactoring");
}
/**
14 years, 2 months