JBoss Tools SVN: r41042 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-05-16 04:43:04 -0400 (Wed, 16 May 2012)
New Revision: 41042
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateOrEditDomainAction.java
Log:
cleanup: extracted method
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateOrEditDomainAction.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateOrEditDomainAction.java 2012-05-16 08:41:37 UTC (rev 41041)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/action/CreateOrEditDomainAction.java 2012-05-16 08:43:04 UTC (rev 41042)
@@ -40,27 +40,32 @@
final ITreeSelection treeSelection = (ITreeSelection) selection;
if (selection instanceof ITreeSelection
&& treeSelection.getFirstElement() instanceof UserDelegate) {
- IWizard domainDialog = null;
final UserDelegate user = (UserDelegate) treeSelection.getFirstElement();
- try {
- if (user.getDefaultDomain() == null || user.getDefaultDomain().getId() == null) {
- domainDialog = new NewDomainDialog(user);
- } else {
- domainDialog = new EditDomainDialog(user);
- }
- } catch (OpenShiftException e) {
- Logger.warn("Failed to retrieve User domain, prompting for creation", e);
- // let's use the domain creation wizard, then.
- domainDialog = new NewDomainDialog(user);
- } catch (SocketTimeoutException e) {
- Logger.warn("Failed to retrieve User domain, prompting for creation", e);
- // let's use the domain creation wizard, then.
- domainDialog = new NewDomainDialog(user);
- }
+ IWizard domainDialog = createDomainWizard(user);
WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), domainDialog);
dialog.create();
dialog.open();
}
}
+ private IWizard createDomainWizard(final UserDelegate user) {
+ IWizard domainDialog;
+ try {
+ if (user.getDefaultDomain() == null || user.getDefaultDomain().getId() == null) {
+ domainDialog = new NewDomainDialog(user);
+ } else {
+ domainDialog = new EditDomainDialog(user);
+ }
+ } catch (OpenShiftException e) {
+ Logger.warn("Failed to retrieve User domain, prompting for creation", e);
+ // let's use the domain creation wizard, then.
+ domainDialog = new NewDomainDialog(user);
+ } catch (SocketTimeoutException e) {
+ Logger.warn("Failed to retrieve User domain, prompting for creation", e);
+ // let's use the domain creation wizard, then.
+ domainDialog = new NewDomainDialog(user);
+ }
+ return domainDialog;
+ }
+
}
12 years, 8 months
JBoss Tools SVN: r41041 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-05-16 04:41:37 -0400 (Wed, 16 May 2012)
New Revision: 41041
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainWizardPage.java
Log:
corrected formatting
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainWizardPage.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainWizardPage.java 2012-05-16 08:29:57 UTC (rev 41040)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/EditDomainWizardPage.java 2012-05-16 08:41:37 UTC (rev 41041)
@@ -67,9 +67,8 @@
final IObservableValue namespaceModelObservable = BeanProperties.value(
EditDomainWizardPageModel.PROPERTY_DOMAIN_ID).observe(pageModel);
ValueBindingBuilder.bind(namespaceTextObservable).to(namespaceModelObservable).in(dbc);
+ }
- }
-
@Override
protected void setupWizardPageSupport(DataBindingContext dbc) {
ParametrizableWizardPageSupport.create(IStatus.ERROR | IStatus.CANCEL, this, dbc);
12 years, 8 months
JBoss Tools SVN: r41040 - trunk/jst/features/org.jboss.tools.jst.feature.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2012-05-16 04:29:57 -0400 (Wed, 16 May 2012)
New Revision: 41040
Modified:
trunk/jst/features/org.jboss.tools.jst.feature/feature.xml
Log:
JBIDE-11873: no provider name for JST
Modified: trunk/jst/features/org.jboss.tools.jst.feature/feature.xml
===================================================================
--- trunk/jst/features/org.jboss.tools.jst.feature/feature.xml 2012-05-16 08:27:51 UTC (rev 41039)
+++ trunk/jst/features/org.jboss.tools.jst.feature/feature.xml 2012-05-16 08:29:57 UTC (rev 41040)
@@ -2,7 +2,8 @@
<feature
id="org.jboss.tools.jst.feature"
label="%featureName"
- version="3.3.0.qualifier">
+ version="3.3.0.qualifier"
+ provider-name="%providerName">
<description url="http://www.jboss.org/tools">
%description
12 years, 8 months
JBoss Tools SVN: r41039 - trunk/vpe/features/org.jboss.tools.vpe.feature.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2012-05-16 04:27:51 -0400 (Wed, 16 May 2012)
New Revision: 41039
Modified:
trunk/vpe/features/org.jboss.tools.vpe.feature/feature.xml
Log:
JBIDE-11873: no provider name for VPE
Modified: trunk/vpe/features/org.jboss.tools.vpe.feature/feature.xml
===================================================================
--- trunk/vpe/features/org.jboss.tools.vpe.feature/feature.xml 2012-05-16 07:44:36 UTC (rev 41038)
+++ trunk/vpe/features/org.jboss.tools.vpe.feature/feature.xml 2012-05-16 08:27:51 UTC (rev 41039)
@@ -2,7 +2,8 @@
<feature
id="org.jboss.tools.vpe.feature"
label="%featureName"
- version="3.3.0.qualifier">
+ version="3.3.0.qualifier"
+ provider-name="%providerName">
<description url="http://www.jboss.org/tools">
%description
12 years, 8 months
JBoss Tools SVN: r41038 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2012-05-16 03:44:36 -0400 (Wed, 16 May 2012)
New Revision: 41038
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/EmbedCartridgesOperation.java
Log:
[JBIDE-10852] cleanup
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/EmbedCartridgesOperation.java
===================================================================
--- trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/EmbedCartridgesOperation.java 2012-05-16 07:38:57 UTC (rev 41037)
+++ trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/core/EmbedCartridgesOperation.java 2012-05-16 07:44:36 UTC (rev 41038)
@@ -53,14 +53,10 @@
return Collections.emptyList();
}
- List<IEmbeddableCartridge> cartridgesToAdd = new ArrayList<IEmbeddableCartridge>();
- List<IEmbeddableCartridge> cartridgesToRemove = new ArrayList<IEmbeddableCartridge>();
- computeRemovals(selectedCartridges, application.getEmbeddedCartridges(), cartridgesToRemove);
- computeAdditions(selectedCartridges, application.getEmbeddedCartridges(), cartridgesToAdd);
-
- removeEmbeddedCartridges(cartridgesToRemove, application);
- final List<IEmbeddedCartridge> addedCartridges = addEmbeddedCartridges(cartridgesToAdd, application);
- return addedCartridges;
+ removeEmbeddedCartridges(
+ getRemovedCartridges(selectedCartridges, application.getEmbeddedCartridges()), application);
+ return addEmbeddedCartridges(
+ getAddedCartridges(selectedCartridges, application.getEmbeddedCartridges()), application);
}
private void removeEmbeddedCartridges(List<IEmbeddableCartridge> cartridgesToRemove, final IApplication application)
@@ -87,22 +83,26 @@
return application.addEmbeddableCartridges(cartridgesToAdd);
}
- private void computeAdditions(List<IEmbeddableCartridge> selectedCartridges,
- List<IEmbeddedCartridge> embeddedCartridges, List<IEmbeddableCartridge> addedCartridges) {
- for (IEmbeddableCartridge cartridge : selectedCartridges){
- if (!embeddedCartridges.contains(cartridge)){
- addedCartridges.add(cartridge);
+ private List<IEmbeddableCartridge> getAddedCartridges(List<IEmbeddableCartridge> selectedCartridges,
+ List<IEmbeddedCartridge> embeddedCartridges) {
+ List<IEmbeddableCartridge> cartridgesToAdd = new ArrayList<IEmbeddableCartridge>();
+ for (IEmbeddableCartridge cartridge : selectedCartridges) {
+ if (!embeddedCartridges.contains(cartridge)) {
+ cartridgesToAdd.add(cartridge);
}
}
+ return cartridgesToAdd;
}
- private void computeRemovals(List<IEmbeddableCartridge> selectedCartridges,
- List<IEmbeddedCartridge> embeddedCartridges, List<IEmbeddableCartridge> removedCartridges) {
- for (IEmbeddableCartridge cartridge : embeddedCartridges){
- if (!selectedCartridges.contains(cartridge)){
- removedCartridges.add(cartridge);
+ private List<IEmbeddableCartridge> getRemovedCartridges(List<IEmbeddableCartridge> selectedCartridges,
+ List<IEmbeddedCartridge> embeddedCartridges) {
+ List<IEmbeddableCartridge> cartridgesToRemove = new ArrayList<IEmbeddableCartridge>();
+ for (IEmbeddableCartridge cartridge : embeddedCartridges) {
+ if (!selectedCartridges.contains(cartridge)) {
+ cartridgesToRemove.add(cartridge);
}
}
+ return cartridgesToRemove;
}
private static class CartridgeAddRemovePriorityComparator implements Comparator<IEmbeddableCartridge> {
12 years, 8 months
JBoss Tools SVN: r41037 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-05-16 03:38:57 -0400 (Wed, 16 May 2012)
New Revision: 41037
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/RequiredCredentialsDialog.java
Log:
JBIDE-11830
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/RequiredCredentialsDialog.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/RequiredCredentialsDialog.java 2012-05-16 06:29:11 UTC (rev 41036)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/RequiredCredentialsDialog.java 2012-05-16 07:38:57 UTC (rev 41037)
@@ -88,6 +88,12 @@
passLabel.setText(Messages.swf_Password);
saveCredentials.setText(Messages.credentials_save);
+ // defaults
+ userText.setText(user);
+ userText.setSelection(0, user == null ? 0 : user.length());
+ passText.setText(pass);
+
+
ModifyListener listener = new ModifyListener() {
public void modifyText(ModifyEvent e) {
user = userText.getText();
@@ -109,10 +115,6 @@
passText.addModifyListener(listener);
saveCredentials.addSelectionListener(listener2);
- // defaults
- userText.setText(user);
- userText.setSelection(0, user == null ? 0 : user.length());
- passText.setText(pass);
// save by default
saveCredentials.setSelection(true);
12 years, 8 months
JBoss Tools SVN: r41036 - in trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-05-16 02:29:11 -0400 (Wed, 16 May 2012)
New Revision: 41036
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/.classpath
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/build.properties
Log:
JBIDE-11871 to trunk (dumb error, did not export)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/.classpath
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/.classpath 2012-05-16 05:32:02 UTC (rev 41035)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/.classpath 2012-05-16 06:29:11 UTC (rev 41036)
@@ -9,9 +9,9 @@
<classpathentry exported="true" kind="lib" path="jboss-threads-2.0.0.GA.jar"/>
<classpathentry exported="true" kind="lib" path="xnio-api-3.0.3.GA.jar"/>
<classpathentry exported="true" kind="lib" path="xnio-nio-3.0.3.GA.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-remoting-3.2.7.GA.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="lib" path="jboss-remoting-3.2.7.GA.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/META-INF/MANIFEST.MF 2012-05-16 05:32:02 UTC (rev 41035)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/META-INF/MANIFEST.MF 2012-05-16 06:29:11 UTC (rev 41036)
@@ -15,11 +15,11 @@
jboss-dmr-1.1.1.Final.jar,
jboss-logging-3.1.0.GA.jar,
jboss-marshalling-1.3.9.GA.jar,
- jboss-remoting-3.2.2.GA.jar,
jboss-sasl-1.0.0.Final.jar,
jboss-threads-2.0.0.GA.jar,
xnio-api-3.0.3.GA.jar,
- xnio-nio-3.0.3.GA.jar
+ xnio-nio-3.0.3.GA.jar,
+ jboss-remoting-3.2.7.GA.jar
Service-Component: META-INF/jboss-management-service.xml
Export-Package: org.jboss.ide.eclipse.as.internal.management.as71;x-friends:="org.jboss.ide.eclipse.as.management.as7.tests"
Bundle-Vendor: JBoss by Red Hat
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/build.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/build.properties 2012-05-16 05:32:02 UTC (rev 41035)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/build.properties 2012-05-16 06:29:11 UTC (rev 41036)
@@ -12,8 +12,8 @@
jboss-dmr-1.1.1.Final.jar,\
jboss-logging-3.1.0.GA.jar,\
jboss-marshalling-1.3.9.GA.jar,\
- jboss-remoting-3.2.2.GA.jar,\
jboss-sasl-1.0.0.Final.jar,\
jboss-threads-2.0.0.GA.jar,\
xnio-api-3.0.3.GA.jar,\
- xnio-nio-3.0.3.GA.jar
+ xnio-nio-3.0.3.GA.jar,\
+ jboss-remoting-3.2.7.GA.jar
12 years, 8 months
JBoss Tools SVN: r41035 - in trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71: src/org/jboss/ide/eclipse/as/internal/management/as71 and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-05-16 01:32:02 -0400 (Wed, 16 May 2012)
New Revision: 41035
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/jboss-remoting-3.2.7.GA.jar
Removed:
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/jboss-remoting-3.2.2.GA.jar
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/.classpath
trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/src/org/jboss/ide/eclipse/as/internal/management/as71/AS71Manager.java
Log:
JBIDE-11871 to trunk
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/.classpath
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/.classpath 2012-05-15 23:20:05 UTC (rev 41034)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/.classpath 2012-05-16 05:32:02 UTC (rev 41035)
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry exported="true" kind="lib" path="jboss-as-controller-client-7.1.0.Final.jar"/>
- <classpathentry exported="true" kind="lib" path="jboss-as-protocol-7.1.0.Final.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-as-controller-client-7.1.0.Final.jar" sourcepath="/home/rob/code/jboss/as7/jboss-as/controller-client"/>
+ <classpathentry exported="true" kind="lib" path="jboss-as-protocol-7.1.0.Final.jar" sourcepath="/home/rob/code/jboss/as7/jboss-as/protocol/src"/>
<classpathentry exported="true" kind="lib" path="jboss-dmr-1.1.1.Final.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-logging-3.1.0.GA.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-marshalling-1.3.9.GA.jar"/>
- <classpathentry exported="true" kind="lib" path="jboss-remoting-3.2.2.GA.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-sasl-1.0.0.Final.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-threads-2.0.0.GA.jar"/>
<classpathentry exported="true" kind="lib" path="xnio-api-3.0.3.GA.jar"/>
@@ -13,5 +12,6 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
+ <classpathentry kind="lib" path="jboss-remoting-3.2.7.GA.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Deleted: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/jboss-remoting-3.2.2.GA.jar
===================================================================
(Binary files differ)
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/jboss-remoting-3.2.7.GA.jar
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/jboss-remoting-3.2.7.GA.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/src/org/jboss/ide/eclipse/as/internal/management/as71/AS71Manager.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/src/org/jboss/ide/eclipse/as/internal/management/as71/AS71Manager.java 2012-05-15 23:20:05 UTC (rev 41034)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.management.as71/src/org/jboss/ide/eclipse/as/internal/management/as71/AS71Manager.java 2012-05-16 05:32:02 UTC (rev 41035)
@@ -264,13 +264,42 @@
}
public void dispose() {
- new Thread("Closing AS7 Management Streams") {
+ if( client != null ) {
+ closeClient(client);
+ }
+ }
+ // Launch a thread to handle the close to ensure dispose() is immediate
+ private void closeClient(final ModelControllerClient client) {
+ Thread t = new Thread("Closing client") {
public void run() {
- StreamUtils.safeClose(client);
+ closeClientJoin(client);
}
- }.start();
+ };
+ t.start();
}
+
+ // Launch a new thread with max duration 5s to handle the actual close
+ private void closeClientJoin(final ModelControllerClient client) {
+ Runnable r = new Runnable() {
+ public void run() {
+ try {
+ client.close();
+ } catch (Exception e) {
+ // trace
+ }
+ }
+ };
+ Thread t = new Thread(r);
+ try {
+ t.start();
+ t.join(5000);
+ } catch (InterruptedException e) {
+ } finally {
+ t.interrupt();
+ }
+ }
+
/*package*/ ModelNode execute(ModelNode node) throws JBoss7ManangerException {
try {
ModelNode response = client.execute(node);
12 years, 8 months
JBoss Tools SVN: r41034 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-05-15 19:20:05 -0400 (Tue, 15 May 2012)
New Revision: 41034
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
Log:
JBIDE-11867
https://issues.jboss.org/browse/JBIDE-11867
Observer method resolution is fixed.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2012-05-15 23:18:53 UTC (rev 41033)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2012-05-15 23:20:05 UTC (rev 41034)
@@ -569,7 +569,7 @@
}
public static boolean areMatchingEventQualifiers(Set<IQualifierDeclaration> eventQualifiers, Set<IQualifierDeclaration> paramQualifiers) throws CoreException {
- if(!eventQualifiers.isEmpty() || paramQualifiers.isEmpty()) {
+ if(!paramQualifiers.isEmpty()) {
TreeSet<String> paramKeys = new TreeSet<String>();
for (IQualifierDeclaration d: paramQualifiers) {
12 years, 8 months
JBoss Tools SVN: r41033 - in trunk/cdi/tests/org.jboss.tools.cdi.core.test: src/org/jboss/tools/cdi/core/test/tck and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-05-15 19:18:53 -0400 (Tue, 15 May 2012)
New Revision: 41033
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/event/fires/DogWhisperer.java
trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ObserverMethodResolutionTest.java
Log:
JBIDE-11867
https://issues.jboss.org/browse/JBIDE-11867
Test is added.
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/event/fires/DogWhisperer.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/event/fires/DogWhisperer.java 2012-05-15 20:22:31 UTC (rev 41032)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/resources/tck/tests/event/fires/DogWhisperer.java 2012-05-15 23:18:53 UTC (rev 41033)
@@ -25,6 +25,9 @@
@Inject @Tame @Role("Master")
TamingCommand tamingCommand;
+ @Inject
+ Event<TamingCommand> generalEvent;
+
@Inject @Any @Tame @Role("Master")
Event<TamingCommand> tamingEvent;
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ObserverMethodResolutionTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ObserverMethodResolutionTest.java 2012-05-15 20:22:31 UTC (rev 41032)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/src/org/jboss/tools/cdi/core/test/tck/ObserverMethodResolutionTest.java 2012-05-15 23:18:53 UTC (rev 41033)
@@ -35,6 +35,28 @@
assertTrue(observers.isEmpty());
}
+ /**
+ * Event injection point has no qualifiers.
+ */
+ public void testObserverMethodResolution0() {
+ IInjectionPointField generalEvent = getInjectionPointField("JavaSource/org/jboss/jsr299/tck/tests/event/fires/DogWhisperer.java", "generalEvent");
+ assertNotNull(generalEvent);
+
+ Set<IObserverMethod> observers = generalEvent.getCDIProject().resolveObserverMethods(generalEvent);
+ IObserverMethod tamedObserver = null;
+ IObserverMethod recognizedFriendObserver = null;
+ for (IObserverMethod m: observers) {
+ IMethod jm = m.getMethod();
+ if("tamed".equals(jm.getElementName())) {
+ tamedObserver = m;
+ } else if("recognizedFriend".equals(jm.getElementName())) {
+ recognizedFriendObserver = m;
+ }
+ }
+ assertNull(tamedObserver);
+ assertNull(recognizedFriendObserver);
+ }
+
public void testObserverMethodResolution() {
IInjectionPointField tamingEvent = getInjectionPointField("JavaSource/org/jboss/jsr299/tck/tests/event/fires/DogWhisperer.java", "tamingEvent");
assertNotNull(tamingEvent);
12 years, 8 months