JBoss Tools SVN: r40752 - trunk/central/features/org.jboss.tools.community.central.feature.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-05-03 09:13:23 -0400 (Thu, 03 May 2012)
New Revision: 40752
Modified:
trunk/central/features/org.jboss.tools.community.central.feature/feature.xml
Log:
JBIDE-11299 remove unneeded plugin, but keep this feature around for ease-of-use when installing Central into Eclipse
Modified: trunk/central/features/org.jboss.tools.community.central.feature/feature.xml
===================================================================
--- trunk/central/features/org.jboss.tools.community.central.feature/feature.xml 2012-05-03 13:12:55 UTC (rev 40751)
+++ trunk/central/features/org.jboss.tools.community.central.feature/feature.xml 2012-05-03 13:13:23 UTC (rev 40752)
@@ -26,6 +26,7 @@
<import feature="org.jboss.tools.runtime.seam.detector.feature" version="1.3.0.qualifier" match="greaterOrEqual"/>
</requires>
- <plugin id="org.jboss.tools.community.central" download-size="0" install-size="0" version="0.0.0"/>
+ <!-- JBIDE-11299 remove unneeded plugin, but keep this feature around for ease-of-use when installing Central into Eclipse
+ <plugin id="org.jboss.tools.community.central" download-size="0" install-size="0" version="0.0.0"/> -->
</feature>
12 years, 8 months
JBoss Tools SVN: r40751 - branches/jbosstools-3.3.0.Beta3/central/features/org.jboss.tools.community.central.feature.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-05-03 09:12:55 -0400 (Thu, 03 May 2012)
New Revision: 40751
Modified:
branches/jbosstools-3.3.0.Beta3/central/features/org.jboss.tools.community.central.feature/feature.xml
Log:
JBIDE-11299 remove unneeded plugin, but keep this feature around for ease-of-use when installing Central into Eclipse
Modified: branches/jbosstools-3.3.0.Beta3/central/features/org.jboss.tools.community.central.feature/feature.xml
===================================================================
--- branches/jbosstools-3.3.0.Beta3/central/features/org.jboss.tools.community.central.feature/feature.xml 2012-05-03 12:21:47 UTC (rev 40750)
+++ branches/jbosstools-3.3.0.Beta3/central/features/org.jboss.tools.community.central.feature/feature.xml 2012-05-03 13:12:55 UTC (rev 40751)
@@ -26,6 +26,7 @@
<import feature="org.jboss.tools.runtime.seam.detector.feature" version="1.3.0.qualifier" match="greaterOrEqual"/>
</requires>
- <plugin id="org.jboss.tools.community.central" download-size="0" install-size="0" version="0.0.0"/>
+ <!-- JBIDE-11299 remove unneeded plugin, but keep this feature around for ease-of-use when installing Central into Eclipse
+ <plugin id="org.jboss.tools.community.central" download-size="0" install-size="0" version="0.0.0"/> -->
</feature>
12 years, 8 months
JBoss Tools SVN: r40750 - trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-05-03 08:21:47 -0400 (Thu, 03 May 2012)
New Revision: 40750
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JBoss71ServerConnection.java
trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JBossServerConnection.java
Log:
JBIDE-11064 to trunk
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JBoss71ServerConnection.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JBoss71ServerConnection.java 2012-05-03 11:59:59 UTC (rev 40749)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JBoss71ServerConnection.java 2012-05-03 12:21:47 UTC (rev 40750)
@@ -42,9 +42,11 @@
private String user;
private String pass;
+ private Map<MBeanServerConnection, JMXConnector> connectionToConnector;
protected void initializeEnvironment(IServer s, String user, String pass) throws CredentialException {
this.user = user;
this.pass = pass;
+ this.connectionToConnector = new HashMap<MBeanServerConnection, JMXConnector>();
}
protected MBeanServerConnection createConnection(IServer s) throws Exception {
@@ -64,6 +66,7 @@
try {
connector = JMXConnectorFactory.connect(new JMXServiceURL(url), environment);
MBeanServerConnection connection = connector.getMBeanServerConnection();
+ this.connectionToConnector.put(connection, connector);
return connection;
} catch(IOException ioe) {
return null;
@@ -71,12 +74,17 @@
IStatus stat = new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
"Runtime Exception contacting JBoss instance. Please ensure your server is up and exposes its management ports via the -Djboss.bind.address.management=yourwebsite.com system property", re);
throw new JMXException(stat);
- } finally {
- if( connector != null ) {
- try {
- connector.close();
- } catch(Exception e) { /* Ignore */ }
- }
}
}
+
+ protected void cleanupConnection(IServer server, MBeanServerConnection connection) {
+ super.cleanupConnection(server, connection);
+ if( connectionToConnector.get(connection) != null ) {
+ try {
+ connectionToConnector.remove(connection);
+ connectionToConnector.get(connection).close();
+ } catch(Exception e) { /* Ignore */ }
+ }
+ }
+
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JBossServerConnection.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JBossServerConnection.java 2012-05-03 11:59:59 UTC (rev 40749)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.jmx.integration/src/org/jboss/ide/eclipse/as/jmx/integration/JBossServerConnection.java 2012-05-03 12:21:47 UTC (rev 40750)
@@ -132,9 +132,10 @@
.getContextClassLoader();
ClassLoader newLoader = getProvider2().getClassloaderRepository().getClassLoader(s);
Thread.currentThread().setContextClassLoader(newLoader);
+ MBeanServerConnection connection = null;
try {
initializeEnvironment(s, user, pass);
- MBeanServerConnection connection = createConnection(s);
+ connection = createConnection(s);
if( connection != null ) {
r.run(connection);
}
@@ -146,6 +147,7 @@
throw new JMXException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
"Error connecting to remote JMX. Please ensure your server is properly configured for JMX access.", e));
} finally {
+ cleanupConnection(s, connection);
getProvider2().getClassloaderRepository().removeConcerned(s, r);
Thread.currentThread().setContextClassLoader(currentLoader);
}
@@ -162,6 +164,10 @@
return null;
}
+ protected void cleanupConnection(IServer server, MBeanServerConnection connection) {
+ // Do nothing, provide subclasses ability
+ }
+
protected void initializeEnvironment(IServer s, String user, String pass) throws CredentialException {
JMXUtil.setCredentials(s,user,pass);
}
12 years, 8 months
JBoss Tools SVN: r40749 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-05-03 07:59:59 -0400 (Thu, 03 May 2012)
New Revision: 40749
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/AS7DeploymentScannerUtility.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7DeploymentScannerAdditions.java
Log:
JBIDE-9239 - current scanners loaded from server instead
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/AS7DeploymentScannerUtility.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/AS7DeploymentScannerUtility.java 2012-05-03 11:37:11 UTC (rev 40748)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/AS7DeploymentScannerUtility.java 2012-05-03 11:59:59 UTC (rev 40749)
@@ -23,6 +23,7 @@
import org.jboss.ide.eclipse.as.management.core.JBoss7ManagerUtil;
public class AS7DeploymentScannerUtility {
+ public static final String SCANNER_PREFIX = "JBossToolsScanner"; //$NON-NLS-1$
public IStatus addDeploymentScanner(final IServer server, String scannerName, final String folder) {
ModelNode op = new ModelNode();
@@ -89,6 +90,35 @@
return retval;
}
+
+ public HashMap<String, String> getDeploymentScannersFromServer(final IServer server, boolean all) {
+ ModelNode op = new ModelNode();
+ op.get("operation").set("read-resource"); //$NON-NLS-1$ //$NON-NLS-2$
+ ModelNode addr = op.get("address"); //$NON-NLS-1$
+ addr.add("subsystem", "deployment-scanner"); //$NON-NLS-1$//$NON-NLS-2$
+ addr.add("scanner", "*"); //$NON-NLS-1$ //$NON-NLS-2$
+ final String request = op.toJSONString(true);
+ ModelNode response = null;
+ try {
+ response = executeWithResult(server, request);
+ } catch(Exception e) {
+ return new HashMap<String, String>();
+ }
+
+ HashMap<String, String> retval=new HashMap<String, String>();
+ List<ModelNode> list = response.asList();
+ for( int i = 0; i <list.size(); i++ ) {
+ ModelNode address = list.get(i).get("address"); //$NON-NLS-1$
+ String scannerName = address.asList().get(1).get("scanner").asString(); //$NON-NLS-1$
+ if( all || scannerName.startsWith(SCANNER_PREFIX)) {
+ ModelNode arr = list.get(i).get("result"); //$NON-NLS-1$
+ String loc = arr.get("path").toString(); //$NON-NLS-1$
+ retval.put(scannerName, loc);
+ }
+ }
+ return retval;
+ }
+
protected IStatus execute(final IServer server, final String request) {
try {
ModelNode node = executeWithResult(server, request);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7DeploymentScannerAdditions.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7DeploymentScannerAdditions.java 2012-05-03 11:37:11 UTC (rev 40748)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/LocalJBoss7DeploymentScannerAdditions.java 2012-05-03 11:59:59 UTC (rev 40749)
@@ -10,21 +10,15 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.core.server.internal.v7;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
-import java.util.Properties;
+import java.util.Map;
-import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.ServerEvent;
-import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.Trace;
import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
import org.jboss.ide.eclipse.as.core.server.UnitedServerListener;
@@ -61,21 +55,10 @@
added.addAll(Arrays.asList(folders));
ArrayList<String> removed = new ArrayList<String>(); // list of the scanner names
- IPath p = JBossServerCorePlugin.getServerStateLocation(server).append(SCANNER_PROP_FILE);
- Properties props = new Properties();
- if( p.toFile().exists()) {
- try {
- props.load(new FileInputStream(p.toFile()));
- } catch( IOException ioe) {
- // shouldnt happen. Log this
- Status failStat = new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
- "Unable to read deployment scanner property file " + p.toFile().getAbsolutePath(), ioe); //$NON-NLS-1$
- JBossServerCorePlugin.log(failStat);
- }
- }
+ Map<String, String> props = loadScannersFromServer(server);
// Properties file of format like: JBossToolsScanner4=/some/folder
- Iterator<Object> lastStartup = props.keySet().iterator();
+ Iterator<String> lastStartup = props.keySet().iterator();
String k = null;
String v = null;
while(lastStartup.hasNext()) {
@@ -118,26 +101,19 @@
Trace.trace(Trace.STRING_FINER, "Added Deployment Scanner: success="+s.isOK() + ", " + scannerName + ":" + props.get(newScannerName)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
- // Write the file out
- if( added.size() != 0 || removed.size() != 0 ) {
- try {
- props.store(new FileOutputStream(p.toFile()), "Deployment scanners for the application server"); //$NON-NLS-1$
- } catch( IOException ioe) {
- Status failStat = new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
- "Unable to save deployment scanner property file " + p.toFile().getAbsolutePath(), ioe); //$NON-NLS-1$
- JBossServerCorePlugin.log(failStat);
- }
- }
Trace.trace(Trace.STRING_FINER, "Finished Adding AS7 Deployment Scanners"); //$NON-NLS-1$
}
- private static final String SCANNER_PREFIX = "JBossToolsScanner"; //$NON-NLS-1$
- protected String findNextScannerName(Properties props) {
+ protected Map<String, String> loadScannersFromServer(IServer server) {
+ return new AS7DeploymentScannerUtility().getDeploymentScannersFromServer(server, false);
+ }
+
+ protected String findNextScannerName(Map<String,String> props) {
int i = 1;
- while( props.get(SCANNER_PREFIX + i) != null ) {
+ while( props.get(AS7DeploymentScannerUtility.SCANNER_PREFIX + i) != null ) {
i++;
}
- return SCANNER_PREFIX + i;
+ return AS7DeploymentScannerUtility.SCANNER_PREFIX + i;
}
public void serverChanged(ServerEvent event) {
12 years, 8 months
JBoss Tools SVN: r40748 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-05-03 07:37:11 -0400 (Thu, 03 May 2012)
New Revision: 40748
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
Log:
JBIDE-11565 to trunk
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2012-05-03 11:19:42 UTC (rev 40747)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/behaviour/ExpressPublishMethod.java 2012-05-03 11:37:11 UTC (rev 40748)
@@ -178,6 +178,11 @@
ExpressServerUtils.ATTRIBUTE_REMOTE_NAME_DEFAULT);
PushOperationResult result = null;
boolean committed = false;
+ Repository repo = EGitUtils.getRepository(p);
+ if( repo == null ) {
+ throw new CoreException(new Status(IStatus.ERROR, OpenShiftUIActivator.PLUGIN_ID,
+ NLS.bind("No repository found for project {0}. Please ensure it is shared via git.", p.getName())));
+ }
try {
if( changed != 0 && requestCommitAndPushApproval(p.getName(), changed)) {
monitor.beginTask("Publishing " + p.getName(), 300);
@@ -188,7 +193,7 @@
if( committed || (changed == 0 && requestPushApproval(p.getName()))) {
if( !committed )
monitor.beginTask("Publishing " + p.getName(), 200);
- result = EGitUtils.push(remoteName, EGitUtils.getRepository(p), new SubProgressMonitor(monitor, 100));
+ result = EGitUtils.push(remoteName, repo, new SubProgressMonitor(monitor, 100));
monitor.done();
}
} catch(CoreException ce) {
@@ -197,8 +202,7 @@
return null;
try {
- Repository repository = EGitUtils.getRepository(p);
- result = EGitUtils.pushForce(remoteName, repository, new SubProgressMonitor(monitor, 100));
+ result = EGitUtils.pushForce(remoteName, repo, new SubProgressMonitor(monitor, 100));
monitor.done();
} catch(CoreException ce2) {
// even the push force failed, and we don't have a valid result to check :(
12 years, 8 months
JBoss Tools SVN: r40747 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-05-03 07:19:42 -0400 (Thu, 03 May 2012)
New Revision: 40747
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossConfigurationTableViewer.java
Log:
/JBIDE-11488 to trunk
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossConfigurationTableViewer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossConfigurationTableViewer.java 2012-05-03 08:38:28 UTC (rev 40746)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossConfigurationTableViewer.java 2012-05-03 11:19:42 UTC (rev 40747)
@@ -26,6 +26,7 @@
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Table;
+import org.jboss.ide.eclipse.as.core.util.IConstants;
import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
/**
@@ -52,6 +53,10 @@
public void setFolder(String folder) {
setInput(folder);
String t = getSelectedConfiguration();
+ if( t == null ) {
+ t = IConstants.DEFAULT_CONFIGURATION;
+ setConfiguration(t);
+ }
if( t != null )
setSelection(new StructuredSelection(new Object[]{t}));
}
@@ -61,8 +66,8 @@
}
public void setConfiguration(String defaultConfiguration) {
+ selectedConfiguration = defaultConfiguration;
setSelection(new StructuredSelection(defaultConfiguration));
- selectedConfiguration = defaultConfiguration;
}
private void init() {
12 years, 8 months
JBoss Tools SVN: r40746 - trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-05-03 04:38:28 -0400 (Thu, 03 May 2012)
New Revision: 40746
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/build.properties
Log:
fix the format of build.properties
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/build.properties
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/build.properties 2012-05-03 08:37:58 UTC (rev 40745)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/build.properties 2012-05-03 08:38:28 UTC (rev 40746)
@@ -1,4 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
- resources/
+ resources/,\
+ .
12 years, 8 months
JBoss Tools SVN: r40745 - 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-05-03 04:37:58 -0400 (Thu, 03 May 2012)
New Revision: 40745
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java
Log:
waitForNonIgnoredJobs added to fix time delay
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-05-03 08:36:52 UTC (rev 40744)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/CDIProjectHelper.java 2012-05-03 08:37:58 UTC (rev 40745)
@@ -113,6 +113,7 @@
bot.button(IDELabel.Button.OK).click();
bot.waitWhile(new ShellIsActiveCondition(propertiesShell),
TaskDuration.LONG.getTimeout());
+ util.waitForNonIgnoredJobs();
}
@@ -164,6 +165,7 @@
bot.button(IDELabel.Button.OK).click();
bot.waitWhile(new ShellIsActiveCondition(propertiesShell),
TaskDuration.LONG.getTimeout());
+ util.waitForNonIgnoredJobs();
}
12 years, 8 months
JBoss Tools SVN: r40744 - trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-05-03 04:36:52 -0400 (Thu, 03 May 2012)
New Revision: 40744
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml/BeansXMLCompletionTest.java
Log:
use overloaded method to check only if proposal list contains expected, not equals
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml/BeansXMLCompletionTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml/BeansXMLCompletionTest.java 2012-05-03 08:35:11 UTC (rev 40743)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/beansxml/BeansXMLCompletionTest.java 2012-05-03 08:36:52 UTC (rev 40744)
@@ -170,7 +170,7 @@
getEd().navigateTo(row, column);
getEd().typeText(text);
ContentAssistHelper.checkContentAssistContent(bot,
- editorTitle, text, 1, 0, expectedProposalList);
+ editorTitle, text, 1, 0, expectedProposalList, false);
editResourceUtil.replaceInEditor(text, "");
}
12 years, 8 months
JBoss Tools SVN: r40743 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-05-03 04:35:11 -0400 (Thu, 03 May 2012)
New Revision: 40743
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContentAssistHelper.java
Log:
overloaded methods checkContentAssistContent added
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContentAssistHelper.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContentAssistHelper.java 2012-05-03 07:29:43 UTC (rev 40742)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/helper/ContentAssistHelper.java 2012-05-03 08:35:11 UTC (rev 40743)
@@ -45,6 +45,27 @@
String editorTitle, String textToSelect, int selectionOffset,
int selectionLength, int textToSelectIndex, List<String> expectedProposalList) {
+ return checkContentAssistContent(bot, editorTitle, textToSelect, selectionOffset,
+ selectionLength, textToSelectIndex, expectedProposalList, true);
+
+ }
+
+ /**
+ * Checks Content Assist content on specified position within editor with editorTitle
+ * and checks if expectedProposalList is equal to current Proposal List
+ * @param editorTitle
+ * @param textToSelect
+ * @param selectionOffset
+ * @param selectionLength
+ * @param textToSelectIndex
+ * @param expectedProposalList
+ * @param mustEquals
+ */
+ public static SWTBotEditor checkContentAssistContent(SWTBotExt bot,
+ String editorTitle, String textToSelect, int selectionOffset,
+ int selectionLength, int textToSelectIndex, List<String> expectedProposalList,
+ boolean mustEquals) {
+
SWTJBTExt.selectTextInSourcePane(bot,
editorTitle, textToSelect, selectionOffset, selectionLength,
textToSelectIndex);
@@ -57,7 +78,8 @@
assertTrue("Code Assist menu has incorrect menu items.\n" +
"Expected Proposal Menu Labels vs. Current Proposal Menu Labels :\n" +
FormatUtils.getListsDiffFormatted(expectedProposalList,currentProposalList),
- expectedProposalList.equals(currentProposalList));
+ mustEquals?expectedProposalList.equals(currentProposalList):
+ currentProposalList.containsAll(expectedProposalList));
return editor;
@@ -77,13 +99,34 @@
String editorTitle, String textToSelect, int selectionOffset,
int selectionLength, List<String> expectedProposalList) {
+ return checkContentAssistContent(bot, editorTitle, textToSelect,
+ selectionOffset, selectionLength, expectedProposalList, true);
+
+ }
+
+ /**
+ * Checks Content Assist content on specified position within editor with editorTitle
+ * and checks if expectedProposalList is equal to current Proposal List
+ * @param editorTitle
+ * @param textToSelect
+ * @param selectionOffset
+ * @param selectionLength
+ * @param textToSelectIndex
+ * @param expectedProposalList
+ * @param mustEquals
+ */
+ public static SWTBotEditor checkContentAssistContent(SWTBotExt bot,
+ String editorTitle, String textToSelect, int selectionOffset,
+ int selectionLength, List<String> expectedProposalList, boolean mustEquals) {
+
return ContentAssistHelper.checkContentAssistContent(bot,
editorTitle,
textToSelect,
selectionOffset,
selectionLength,
0,
- expectedProposalList);
+ expectedProposalList,
+ mustEquals);
}
12 years, 8 months