diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/extension/base/ElementCompositorBase.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/extension/base/ElementCompositorBase.java index c8cf31a859e91d8aaf956610ca8f3adf3867ad5b..51020ba3880305e303d2b7eb5fd4e5f438b4eabc 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/extension/base/ElementCompositorBase.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/extension/base/ElementCompositorBase.java @@ -24,11 +24,12 @@ import org.fortiss.tooling.kernel.extension.data.IElementCompositionContext; import org.fortiss.tooling.kernel.extension.data.Prototype; /** + * Base implementation for supporting composition of {@link IElementCompositor}. * * @author moudy * @author $Author: hoelzl $ * @version $Rev: 18709 $ - * @ConQAT.Rating YELLOW Hash: 9795B85BC74E3167DC8697262B931F45 + * @ConQAT.Rating GREEN Hash: 2E67535CC62707219CB9F266DA06F99B */ public abstract class ElementCompositorBase<C extends EObject> implements IElementCompositor<C> { diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/extension/data/Prototype.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/extension/data/Prototype.java index 2293927a95ef17840572385f8a1fc85590a551e9..c9814b41542e9d2124cc1aa2893e583dd5032896 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/extension/data/Prototype.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/extension/data/Prototype.java @@ -27,7 +27,7 @@ import org.eclipse.emf.ecore.EObject; * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: 8F0E6F639CF6EE33174A1EE5016E3E69 + * @ConQAT.Rating GREEN Hash: 3329872E451EF853C552E9AEAC5CB7EC */ public class Prototype { diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ConnectionCompositorService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ConnectionCompositorService.java index b6761971486823efc05928f5491245bd8867128a..adb1b25ac06e46946e0f1c0f2842497773b173b0 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ConnectionCompositorService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ConnectionCompositorService.java @@ -32,7 +32,7 @@ import org.fortiss.tooling.kernel.service.base.EObjectAware2ServiceBase; * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: 32A10A407ACEEAE1210429B4A2C6FB91 + * @ConQAT.Rating GREEN Hash: E2E2C40D393401D420CA9000D1BD1028 */ public class ConnectionCompositorService extends EObjectAware2ServiceBase<IConnectionCompositor<EObject, EObject, EObject>> implements diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ElementCompositorService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ElementCompositorService.java index b65d07663428dd622e6078d2dd14adc120c86bd9..3ded845996d5c83eac2b3aeef6e17aea7f4a9dd2 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ElementCompositorService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ElementCompositorService.java @@ -36,7 +36,7 @@ import org.fortiss.tooling.kernel.utils.LoggingUtils; * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: 92E1A4E58E91DC08258B83B53E3034D2 + * @ConQAT.Rating GREEN Hash: D2813F2898EBA0ABD1BF12D7D1554323 */ public final class ElementCompositorService extends EObjectAwareServiceBase<IElementCompositor<EObject>> implements IElementCompositorService { @@ -68,8 +68,8 @@ public final class ElementCompositorService extends findWorkingCompositor(container, element, context, false); if(compositor == null) { LoggingUtils.error(ToolingKernelActivator.getDefault(), String.format( - "Can not find compositor for container %s and element %s", - container.getClass(), element.getClass())); + "Cannot find compositor for container %s and element %s", container.getClass(), + element.getClass())); return false; } IPersistencyService.INSTANCE.getTopLevelElementFor(container).prepareIDs(element); diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/MigrationService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/MigrationService.java index f73cac150eab12f1a5c59e3bfc59c80419725e5d..fdc67e23bbe12b3a7aba386ffc4b78f6a87e797c 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/MigrationService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/MigrationService.java @@ -37,7 +37,7 @@ import org.fortiss.tooling.kernel.service.base.ObjectAwareServiceBase; * @author mou * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: 022F25C1D17554DE41E792592028C20D + * @ConQAT.Rating GREEN Hash: 4008B014AD23F8E56B1D90CEE9A5C319 */ public class MigrationService extends ObjectAwareServiceBase<IMigrationProvider> implements IMigrationService { diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/EMFResourceUtils.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/EMFResourceUtils.java index 36cb3b8e388e1efea652f3b4a8616f7bc3d252da..c5a3b75e201cd5e82bf15c8428dba3dcd13da787 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/EMFResourceUtils.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/EMFResourceUtils.java @@ -41,7 +41,7 @@ import org.fortiss.tooling.kernel.ToolingKernelActivator; * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: A8091215BF4A3742FAA20AD702A1295B + * @ConQAT.Rating GREEN Hash: 0F500D545960AA85BBE636519B9120C4 */ public final class EMFResourceUtils { /** diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/EcoreUtils.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/EcoreUtils.java index e5ca6579f952c549aac43cb7436dbf3952a6ba22..1cae3d09acf06e00eaeb8d7d5df81f9e36e7240c 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/EcoreUtils.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/EcoreUtils.java @@ -42,22 +42,23 @@ import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.emf.ecore.util.EcoreUtil.Copier; /** - * Utility methods for dealing with <code>.ecore</code> models. These methods should be used to + * Utility methods for dealing with <code>Ecore</code> models. These methods should be used to * define EMF operations that make the models easier to use. * * @author ratiu * @author $Author: hoelzl $ * @version $Rev: 18709 $ - * @ConQAT.Rating YELLOW Hash: 8EAEF7E3DCA3BC1D3F412165108A9DEA + * @ConQAT.Rating GREEN Hash: 283A66F00038F9CA2487E758FC9C057E */ public class EcoreUtils { /** The new event type count defined by the kernel. */ public static final int KERNEL_EMF_EVENT_TYPE_COUNT = EVENT_TYPE_COUNT + 1; - /** Notification to cause model element display refresh. */ - // we use a large number above EMF standard notifications to avoid collision - // with other EMF tools. + /** + * Notification to cause model element display refresh. We use a large number above EMF standard + * notifications to avoid collision with other EMF tools. + */ private static final Notification refreshNotification = new NotificationImpl( EVENT_TYPE_COUNT + 1, null, null); @@ -115,12 +116,15 @@ public class EcoreUtils { */ @SuppressWarnings("unchecked") public static <T> EList<T> pickInstanceOf(Class<T> targetClass, List<?> sourceList) { - if(sourceList == null) + if(sourceList == null) { return null; + } EList<T> result = new BasicEList<T>(); - for(Object sourceElement : sourceList) - if(targetClass.isAssignableFrom(sourceElement.getClass())) + for(Object sourceElement : sourceList) { + if(targetClass.isAssignableFrom(sourceElement.getClass())) { result.add((T)sourceElement); + } + } return ECollections.unmodifiableEList(result); } @@ -140,8 +144,9 @@ public class EcoreUtils { */ public static <S> EList<S> pickInstanceOf(Collection<Class<?>> targetClasses, List<S> sourceList) { - if(sourceList == null) + if(sourceList == null) { return null; + } EList<S> result = new BasicEList<S>(); for(S sourceElement : sourceList) { Class<?> sourceClass = sourceElement.getClass(); @@ -169,8 +174,9 @@ public class EcoreUtils { * <code>targetClass</code> instances */ public static <S> EList<S> filterOutInstanceOf(Class<?> targetClass, List<S> sourceList) { - if(sourceList == null) + if(sourceList == null) { return null; + } EList<S> result = new BasicEList<S>(); for(S sourceElement : sourceList) { Class<?> sourceClass = sourceElement.getClass(); @@ -193,11 +199,14 @@ public class EcoreUtils { */ @SuppressWarnings("unchecked") public static <S, T extends S> T pickFirstInstanceOf(Class<T> targetClass, List<S> sourceList) { - if(sourceList == null) + if(sourceList == null) { return null; - for(S sourceElement : sourceList) - if(targetClass.isAssignableFrom(sourceElement.getClass())) + } + for(S sourceElement : sourceList) { + if(targetClass.isAssignableFrom(sourceElement.getClass())) { return (T)sourceElement; + } + } return null; } diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/KernelModelElementUtils.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/KernelModelElementUtils.java index f05ea261b07596a111e69ff97f2d3b9535ef7488..0e413d99bad9e7637a9c16499d889ce2ffb885cb 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/KernelModelElementUtils.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/utils/KernelModelElementUtils.java @@ -38,7 +38,7 @@ import org.fortiss.tooling.kernel.service.IPersistencyService; * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: E4EBC5D7A0611A8B71877E7000BE58DF + * @ConQAT.Rating GREEN Hash: AF4108116CA2222CFBF5FD1A83E6C48E */ public final class KernelModelElementUtils {