Author: scabanovich
Date: 2012-01-10 20:51:33 -0500 (Tue, 10 Jan 2012)
New Revision: 37753
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/CDISeamSolderLoggerExtension.java
trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/CDISeamSolderServiceHandlerExtension.java
Log:
JBIDE-10601
https://issues.joss.org/browse/JBIDE-10601
When copying context, we should check if definition exists. Alternatively, we would have
to do clean build.
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/CDISeamSolderLoggerExtension.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/CDISeamSolderLoggerExtension.java 2012-01-11
01:50:47 UTC (rev 37752)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/CDISeamSolderLoggerExtension.java 2012-01-11
01:51:33 UTC (rev 37753)
@@ -123,8 +123,18 @@
LoggerDefinitionContext copy = new LoggerDefinitionContext();
copy.root = root;
if(!clean) {
- copy.messageLoggers.putAll(messageLoggers);
- copy.messageBundles.putAll(messageBundles);
+ for (String qn: messageLoggers.keySet()) {
+ TypeDefinition d = messageLoggers.get(qn);
+ if(d.exists()) {
+ copy.messageLoggers.put(qn, d);
+ }
+ }
+ for (String qn: messageBundles.keySet()) {
+ TypeDefinition d = messageBundles.get(qn);
+ if(d.exists()) {
+ copy.messageBundles.put(qn, d);
+ }
+ }
}
return copy;
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/CDISeamSolderServiceHandlerExtension.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/CDISeamSolderServiceHandlerExtension.java 2012-01-11
01:50:47 UTC (rev 37752)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/src/org/jboss/tools/cdi/seam/solder/core/CDISeamSolderServiceHandlerExtension.java 2012-01-11
01:51:33 UTC (rev 37753)
@@ -110,7 +110,12 @@
ServiceHandlerDefinitionContext copy = new ServiceHandlerDefinitionContext();
copy.root = root;
if(!clean) {
- copy.services.putAll(services);
+ for (String qn: services.keySet()) {
+ TypeDefinition d = services.get(qn);
+ if(d.exists()) {
+ copy.services.put(qn, d);
+ }
+ }
copy.serviceAnnotations.addAll(serviceAnnotations);
}