diff --git a/org.fortiss.tooling.kernel/trunk/plugin.xml b/org.fortiss.tooling.kernel/trunk/plugin.xml index 9c7fe0c4f801247537590be84804b22ed4329205..2bd8648642b9956a627a35b9d27634289d0f0866 100644 --- a/org.fortiss.tooling.kernel/trunk/plugin.xml +++ b/org.fortiss.tooling.kernel/trunk/plugin.xml @@ -4,6 +4,8 @@ <extension-point id="modelPrototypeProvider" name="Model Prototype Provider" schema="schema/modelPrototypeProvider.exsd"/> <extension-point id="modelElementCompositor" name="Model Element Compositor" schema="schema/modelElementCompositor.exsd"/> <extension-point id="modelElementConnector" name="Model Element Connector" schema="schema/modelElementConnector.exsd"/> + <extension-point id="modelStorageProvider" name="Model Storage Provider" schema="schema/modelStorageProvider.exsd"/> + <extension-point id="modelConstraintChecker" name="Model Constraint Checker" schema="schema/modelConstraintChecker.exsd"/> <extension point="org.eclipse.emf.ecore.generated_package"> <package @@ -12,4 +14,10 @@ uri="http://www.fortiss.org/tooling/kernel"> </package> </extension> + <extension + point="org.fortiss.tooling.kernel.modelStorageProvider"> + <modelStorageProvider + provider="org.fortiss.tooling.kernel.internal.storage.eclipse.EclipseResourceStorageProvider"> + </modelStorageProvider> + </extension> </plugin> diff --git a/org.fortiss.tooling.kernel/trunk/schema/modelConstraintChecker.exsd b/org.fortiss.tooling.kernel/trunk/schema/modelConstraintChecker.exsd new file mode 100644 index 0000000000000000000000000000000000000000..bebe29d78833d9ffc5490bdf24ce6feeed9c610e --- /dev/null +++ b/org.fortiss.tooling.kernel/trunk/schema/modelConstraintChecker.exsd @@ -0,0 +1,89 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!-- Schema file written by PDE --> +<schema targetNamespace="org.fortiss.tooling.kernel" xmlns="http://www.w3.org/2001/XMLSchema"> +<annotation> + <appinfo> + <meta.schema plugin="org.fortiss.tooling.kernel" id="modelConstraintChecker" name="Model Constraint Checker"/> + </appinfo> + <documentation> + Registers a constraint checker for model elements. + </documentation> + </annotation> + + <element name="extension"> + <annotation> + <appinfo> + <meta.element /> + </appinfo> + </annotation> + <complexType> + <sequence> + </sequence> + <attribute name="point" type="string" use="required"> + <annotation> + <documentation> + + </documentation> + </annotation> + </attribute> + <attribute name="id" type="string"> + <annotation> + <documentation> + + </documentation> + </annotation> + </attribute> + <attribute name="name" type="string"> + <annotation> + <documentation> + + </documentation> + <appinfo> + <meta.attribute translatable="true"/> + </appinfo> + </annotation> + </attribute> + </complexType> + </element> + + <element name="modelConstraintChecker" type="string"> + </element> + + <annotation> + <appinfo> + <meta.section type="since"/> + </appinfo> + <documentation> + [Enter the first release in which this extension point appears.] + </documentation> + </annotation> + + <annotation> + <appinfo> + <meta.section type="examples"/> + </appinfo> + <documentation> + [Enter extension point usage example here.] + </documentation> + </annotation> + + <annotation> + <appinfo> + <meta.section type="apiinfo"/> + </appinfo> + <documentation> + [Enter API information here.] + </documentation> + </annotation> + + <annotation> + <appinfo> + <meta.section type="implementation"/> + </appinfo> + <documentation> + [Enter information about supplied implementation of this extension point.] + </documentation> + </annotation> + + +</schema> diff --git a/org.fortiss.tooling.kernel/trunk/schema/modelStorageProvider.exsd b/org.fortiss.tooling.kernel/trunk/schema/modelStorageProvider.exsd new file mode 100644 index 0000000000000000000000000000000000000000..3737d3d6bd7e2cc901f79db8da887be02843e9e1 --- /dev/null +++ b/org.fortiss.tooling.kernel/trunk/schema/modelStorageProvider.exsd @@ -0,0 +1,102 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!-- Schema file written by PDE --> +<schema targetNamespace="org.fortiss.tooling.kernel" xmlns="http://www.w3.org/2001/XMLSchema"> +<annotation> + <appinfo> + <meta.schema plugin="org.fortiss.tooling.kernel" id="modelStorageProvider" name="Model Storage Provider"/> + </appinfo> + <documentation> + Extension mechanism for model storage providers, i.e. alternative persistency implementations. + </documentation> + </annotation> + + <element name="extension"> + <annotation> + <appinfo> + <meta.element /> + </appinfo> + </annotation> + <complexType> + <sequence> + <element ref="modelStorageProvider" minOccurs="1" maxOccurs="unbounded"/> + </sequence> + <attribute name="point" type="string" use="required"> + <annotation> + <documentation> + + </documentation> + </annotation> + </attribute> + <attribute name="id" type="string"> + <annotation> + <documentation> + + </documentation> + </annotation> + </attribute> + <attribute name="name" type="string"> + <annotation> + <documentation> + + </documentation> + <appinfo> + <meta.attribute translatable="true"/> + </appinfo> + </annotation> + </attribute> + </complexType> + </element> + + <element name="modelStorageProvider"> + <complexType> + <attribute name="provider" type="string" use="required"> + <annotation> + <documentation> + + </documentation> + <appinfo> + <meta.attribute kind="java" basedOn=":org.fortiss.tooling.kernel.interfaces.IStorageProvider"/> + </appinfo> + </annotation> + </attribute> + </complexType> + </element> + + <annotation> + <appinfo> + <meta.section type="since"/> + </appinfo> + <documentation> + [Enter the first release in which this extension point appears.] + </documentation> + </annotation> + + <annotation> + <appinfo> + <meta.section type="examples"/> + </appinfo> + <documentation> + [Enter extension point usage example here.] + </documentation> + </annotation> + + <annotation> + <appinfo> + <meta.section type="apiinfo"/> + </appinfo> + <documentation> + [Enter API information here.] + </documentation> + </annotation> + + <annotation> + <appinfo> + <meta.section type="implementation"/> + </appinfo> + <documentation> + [Enter information about supplied implementation of this extension point.] + </documentation> + </annotation> + + +</schema> diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/ToolingKernelActivator.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/ToolingKernelActivator.java index de4c7d506b68b7cc529efd2da681aedc2f838dc2..865a47f0c5b6d307647c254051c21ff8619b4f92 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/ToolingKernelActivator.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/ToolingKernelActivator.java @@ -27,7 +27,7 @@ import org.osgi.framework.BundleContext; * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: 1D717C45E4E5E6DB57569062F7E741A1 + * @ConQAT.Rating YELLOW Hash: 157BFA58493859794739A4C9E55B0EFF */ public class ToolingKernelActivator extends Plugin { diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/base/EObjectAware2ServiceBase.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/base/EObjectAware2ServiceBase.java index b246f3ede95450bbaaefcd109300941a28d9f925..80a78184a53dff85b87bc00edf7d895ab6fec2d4 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/base/EObjectAware2ServiceBase.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/base/EObjectAware2ServiceBase.java @@ -39,7 +39,7 @@ import org.osgi.framework.Bundle; * @author hoelzlf * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: F6B36995BE099A30EA854295563C109E + * @ConQAT.Rating YELLOW Hash: 5A12CD400F90CECAC6B1246227D363AB */ public abstract class EObjectAware2ServiceBase<T extends IEObjectAware2<? extends EObject, ? extends EObject>> { diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/base/EObjectAwareServiceBase.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/base/EObjectAwareServiceBase.java index 65480377bd438ee90a8e18c3a748f90cdbf524a8..ad3b2223676547fb2292736757a30f9f541a2ac3 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/base/EObjectAwareServiceBase.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/base/EObjectAwareServiceBase.java @@ -39,7 +39,7 @@ import org.osgi.framework.Bundle; * @author hoelzlf * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: C72B82111F8713B4BB4A10B239274A71 + * @ConQAT.Rating YELLOW Hash: 8A8E5E88AC4F8FE9D3213D12B500F959 */ public abstract class EObjectAwareServiceBase<T extends IEObjectAware<? extends EObject>> { diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IConstraintChecker.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IConstraintChecker.java new file mode 100644 index 0000000000000000000000000000000000000000..23245c0eb91371618c51351616bf249f61e487d5 --- /dev/null +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IConstraintChecker.java @@ -0,0 +1,40 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2011 ForTISS GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.tooling.kernel.interfaces; + +import org.eclipse.emf.ecore.EObject; + +/** + * Interface for constraint checker implementations. + * + * @author hoelzlf + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating YELLOW Hash: B26440F1029C58D8B881C889F3D87A95 + */ +public interface IConstraintChecker { + + /** + * Determines whether the constraint checker is applicable to the given + * model element. + */ + boolean isApplicable(EObject modelElement); + + /** Applies the constraint checker to the given model element. */ + IConstraintViolation apply(EObject modelElement); +} diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IConstraintViolation.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IConstraintViolation.java new file mode 100644 index 0000000000000000000000000000000000000000..a0ac476a6815f197beccc6ece9ef16851a019907 --- /dev/null +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/IConstraintViolation.java @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------+ +$Id$ +| | +| Copyright 2011 ForTISS GmbH | +| | +| Licensed under the Apache License, Version 2.0 (the "License"); | +| you may not use this file except in compliance with the License. | +| You may obtain a copy of the License at | +| | +| http://www.apache.org/licenses/LICENSE-2.0 | +| | +| Unless required by applicable law or agreed to in writing, software | +| distributed under the License is distributed on an "AS IS" BASIS, | +| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | +| See the License for the specific language governing permissions and | +| limitations under the License. | ++--------------------------------------------------------------------------*/ +package org.fortiss.tooling.kernel.interfaces; + +/** + * This interface describes a constraint violation produced by some constraint + * checker. A constraint violation has a severity, an explanation and possibly a + * quick fix. + * + * @author hoelzlf + * @author $Author$ + * @version $Rev$ + * @ConQAT.Rating YELLOW Hash: BAED4776E8F47E7A6D42A7D38A68FAA6 + */ +public interface IConstraintViolation { + + /** Returns the severity of the constraint violation. */ + ESeverity getSeverity(); + + /** Returns the explanation of the constraint violation. */ + String getExplanation(); + + /** Returns the quick fix handler for this constraint violation. */ + IQuickFixHandler getQuickFixHandler(); + + /** Enumeration of severity classes. */ + public static enum ESeverity { + /** Fatal error severity. */ + FATAL, + /** Normal error severity. */ + ERROR, + /** Warning severity. */ + WARNING, + /** Information severity. */ + INFO, + /** Debug severity. */ + DEBUG + } + + /** Interface for quick fix handlers. */ + public static interface IQuickFixHandler { + /** Applies the quick fix. */ + void applyQuickFix(); + } +} diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/ITopLevelElementChangeListener.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/ITopLevelElementChangeListener.java index 82f747e0af678ad5598f6615ae0e70c48f356158..f567e01011bf4a6484f83b97a5dafecc5a14858b 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/ITopLevelElementChangeListener.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/interfaces/ITopLevelElementChangeListener.java @@ -24,7 +24,7 @@ package org.fortiss.tooling.kernel.interfaces; * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: 0F7CAD896981964CEB0159F2AB9CC40E + * @ConQAT.Rating YELLOW Hash: 47E5580127F52AD1A331B4E01D385128 */ public interface ITopLevelElementChangeListener { diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/CommandStackService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/CommandStackService.java index ee60e0103d1fd5be43657154dee37a3171336d87..25692baf87bbbead93abc3e74799f1bf2f1fc4f2 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/CommandStackService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/CommandStackService.java @@ -32,9 +32,8 @@ import org.fortiss.tooling.kernel.util.LoggingUtils; * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: C5B41AC6A5B1092D032C36ADEEFB3B57 + * @ConQAT.Rating YELLOW Hash: 24589AA882EB757183F8EB940CF778D0 */ -// TODO (FH): move to UI public class CommandStackService implements ICommandStackService { /** {@inheritDoc} */ @Override diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/CompositorService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/CompositorService.java index 34bca1d2e2479fd1b7ecf07b2ecb27804824c1bd..25378ba5ba9409128bf1da60db54abfd095f590c 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/CompositorService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/CompositorService.java @@ -32,7 +32,7 @@ import org.fortiss.tooling.kernel.services.IPrototypeService.Prototype; * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: EF4D271497C017EB740CCF869DCEB319 + * @ConQAT.Rating YELLOW Hash: 1AB8E5D4937CE2C77649035548CA11DF */ public final class CompositorService extends EObjectAwareServiceBase<ICompositor<EObject>> implements diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ConstraintService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ConstraintService.java index ce34738312a9a624f55b5267ec6bb868d171e64b..0281ecf6056777997273322fd55fc9b1e2dd3137 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ConstraintService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/ConstraintService.java @@ -17,6 +17,11 @@ $Id$ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.internal; +import java.util.List; + +import org.eclipse.emf.ecore.EObject; +import org.fortiss.tooling.kernel.interfaces.IConstraintChecker; +import org.fortiss.tooling.kernel.interfaces.IConstraintViolation; import org.fortiss.tooling.kernel.services.IConstraintService; /** @@ -28,5 +33,20 @@ import org.fortiss.tooling.kernel.services.IConstraintService; * @ConQAT.Rating RED Hash: 9E0D8411A1525AA3989DED2C0DC7A033 */ public class ConstraintService implements IConstraintService { - // TODO (FH): implement + + /** {@inheritDoc} */ + @Override + public List<IConstraintViolation> performAllConstraintChecks( + EObject modelElement) { + // TODO + return null; + } + + /** {@inheritDoc} */ + @Override + public List<IConstraintChecker> getAllConstraintCheckers( + EObject modelElement) { + // TODO + return null; + } } diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/PersistencyService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/PersistencyService.java index d5006d4ea60da64d9395c3888a45a53de6b7a729..16e336a7941be2783047ff21f02ed3c1cf013c53 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/PersistencyService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/PersistencyService.java @@ -25,13 +25,17 @@ import java.util.Map; import org.conqat.lib.commons.collections.CollectionUtils; import org.conqat.lib.commons.collections.UnmodifiableList; +import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.emf.ecore.EObject; +import org.fortiss.tooling.kernel.ToolingKernelActivator; import org.fortiss.tooling.kernel.interfaces.IStorageProvider; import org.fortiss.tooling.kernel.interfaces.ITopLevelElementChangeListener; import org.fortiss.tooling.kernel.interfaces.ITopLevelElementContext; -import org.fortiss.tooling.kernel.internal.storage.eclipse.EclipseResourceStorageProvider; import org.fortiss.tooling.kernel.services.IPersistencyService; +import org.fortiss.tooling.kernel.util.ExtensionPointUtils; +import org.fortiss.tooling.kernel.util.LoggingUtils; +import org.osgi.framework.Bundle; /** * This class implements the {@link IPersistencyService} interface. @@ -39,10 +43,19 @@ import org.fortiss.tooling.kernel.services.IPersistencyService; * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating RED Hash: 91A0548CFEB392918C83B0159A4638EC + * @ConQAT.Rating YELLOW Hash: 152A73FE81A28D789914ECBD143F1DFF */ public class PersistencyService implements IPersistencyService { + /** The prototype provider extension point ID. */ + private static final String EXTENSION_POINT_NAME = "org.fortiss.tooling.kernel.modelPrototypeProvider"; + + /** The prototype provider configuration element name. */ + private static final String CONFIGURATION_ELEMENT_NAME = "modelPrototypeProvider"; + + /** Stores the registered storage providers. */ + private final List<IStorageProvider> storageProviderList = new ArrayList<IStorageProvider>(); + /** Stores the top-level element contexts. */ private final List<ITopLevelElementContext> contextCache = new LinkedList<ITopLevelElementContext>(); @@ -54,13 +67,7 @@ public class PersistencyService implements IPersistencyService { /** Constructor. */ public PersistencyService() { - // TODO (FH): replace with extension mechanism - IStorageProvider provider = new EclipseResourceStorageProvider(); - for (ITopLevelElementContext context : provider - .getTopLevelElementContexts()) { - contextCache.add(context); - storageProviderCache.put(context, provider); - } + setupStorageProviders(); } /** {@inheritDoc} */ @@ -172,4 +179,23 @@ public class PersistencyService implements IPersistencyService { } return null; } + + /** Initializes the storage provider list from plugin extensions. */ + private void setupStorageProviders() { + for (IConfigurationElement ce : ExtensionPointUtils + .getConfigurationElements(EXTENSION_POINT_NAME, + CONFIGURATION_ELEMENT_NAME)) { + Bundle bundle = ExtensionPointUtils.getBundle(ce); + try { + Class<?> handlerClass = ExtensionPointUtils.loadClass( + ce.getAttribute("provider"), bundle); + IStorageProvider provider = (IStorageProvider) handlerClass + .getConstructor().newInstance(); + storageProviderList.add(provider); + } catch (Exception ex) { + LoggingUtils.error(ToolingKernelActivator.getDefault(), + ex.getMessage(), ex); + } + } + } } diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/PrototypeService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/PrototypeService.java index d4ccf6db6c9b725f3c008a53abbb7028f8d8ddac..0e7daf3e71086d0640f051d67f77c6b07791113a 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/PrototypeService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/PrototypeService.java @@ -39,9 +39,8 @@ import org.osgi.framework.Bundle; * @author hoelzl * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: 31E49A6AD1B4A03E4CFEC3BB584284B5 + * @ConQAT.Rating YELLOW Hash: 3E2A2A18E224F7675FC2BE992D4DD80C */ -// TODO (FH): move to UI public class PrototypeService implements IPrototypeService { /** The prototype provider extension point ID. */ diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/AutoUndoCommandStack.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/AutoUndoCommandStack.java index ecae33285b7d1b291b1fa5ce2ea226941dc84f53..95321aeacfd4519b3a7db6af60cfa75601b1b17f 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/AutoUndoCommandStack.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/AutoUndoCommandStack.java @@ -31,10 +31,10 @@ import org.eclipse.emf.transaction.TransactionalEditingDomain; * all calls to its command stack. However all commands which are executed are * wrapped in an AutoUndoCommand first. * - * @author hummelb + * @author hummel * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: 036C23278E8F4B717FDC253E34F9B21A + * @ConQAT.Rating YELLOW Hash: AFB8CA71F5FD955F7EFC6113A7A59A0F */ public class AutoUndoCommandStack implements TransactionalCommandStack { diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/EMFTransactionalCommand.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/EMFTransactionalCommand.java index 0fbb72ac61f51d18f7f992bd0f463427e0465965..f0433f174144c542511295d2f7324a2fa3c52512 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/EMFTransactionalCommand.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/EMFTransactionalCommand.java @@ -36,10 +36,10 @@ import org.fortiss.tooling.kernel.util.LoggingUtils; * a transaction. As a bonus the undo and redo methods are based on the * transaction of the execute call (i.e. are coming for free). * - * @author hummelb + * @author hummel * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: E0EA5F25BB104FFF25B992C00F7E04FD + * @ConQAT.Rating YELLOW Hash: 1F16376712579A2350052EF8560C1861 */ public class EMFTransactionalCommand implements Command { diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/EclipseResourceStorageProvider.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/EclipseResourceStorageProvider.java index 11bbd93d55c5a0d183c8347ea8ebd55074f542eb..ae01f485611e05a8cd1be216118c3a5ed2913db6 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/EclipseResourceStorageProvider.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/EclipseResourceStorageProvider.java @@ -47,7 +47,7 @@ import org.fortiss.tooling.kernel.util.LoggingUtils; * @author hoelzlf * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: 350FE8BC692DF5B142EE95493B393B3B + * @ConQAT.Rating YELLOW Hash: E8F12BF14037AEDE9A02AE20B99271A6 */ public class EclipseResourceStorageProvider implements IResourceChangeListener, IResourceDeltaVisitor, IStorageProvider { diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/ModelContext.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/ModelContext.java index fecedefb8f0f5260d7709bf7ccef7b1318f1510e..87260939a9ce380145c92c222c31ce05576670bd 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/ModelContext.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/internal/storage/eclipse/ModelContext.java @@ -54,10 +54,10 @@ import org.fortiss.tooling.kernel.util.LoggingUtils; * The model context provides additional commands and hooks for a model. * Additionally an editing domain is provided. * - * @author hummelb + * @author hummel * @author $Author$ * @version $Rev$ - * @ConQAT.Rating YELLOW Hash: 0E450BA9320FFE2D8F9BCED63B3AAE90 + * @ConQAT.Rating YELLOW Hash: 8EED08FDCAC443A797F6BE7F17F747B1 */ class ModelContext implements ITopLevelElementContext { diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IConstraintService.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IConstraintService.java index 213d9e2d7e3891b9edc133413381d8a9cd3e0e43..42bf4cc245fa9fdf34debc897b655af3a895ed92 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IConstraintService.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/services/IConstraintService.java @@ -17,6 +17,11 @@ $Id$ +--------------------------------------------------------------------------*/ package org.fortiss.tooling.kernel.services; +import java.util.List; + +import org.eclipse.emf.ecore.EObject; +import org.fortiss.tooling.kernel.interfaces.IConstraintChecker; +import org.fortiss.tooling.kernel.interfaces.IConstraintViolation; import org.fortiss.tooling.kernel.internal.ConstraintService; /** @@ -33,5 +38,15 @@ public interface IConstraintService { /** Returns the singleton instance of the service. */ public static final IConstraintService INSTANCE = new ConstraintService(); - // TODO (FH): define + /** + * Performs all constraint checks on the given model element and returns the + * check results. + */ + List<IConstraintViolation> performAllConstraintChecks(EObject modelElement); + + /** + * Returns the list of registered constraint checkers for the given model + * element. + */ + List<IConstraintChecker> getAllConstraintCheckers(EObject modelElement); } diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/util/ExtensionPointUtils.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/util/ExtensionPointUtils.java index 8f3c2c633576d9ef6e33b6416d119a57ba3c9928..743dcf8a759963edd0cbd1d051bf0b42e2c9dfd9 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/util/ExtensionPointUtils.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/util/ExtensionPointUtils.java @@ -36,10 +36,10 @@ import org.osgi.framework.Bundle; * implementation. It re-packaged with the kernel to avoid any dependency to * eclipse.ui packages. See http://www.conqat.org for the original version. * - * @author hummelb + * @author hummel * @author $Author$ * @version $Rev$ - * @levd.rating GREEN Hash: 3A6C32DF7541A73EFF1BBA7204FFB23D + * @ConQAT.Rating YELLOW Hash: 05174A663568D6A53F98A21704CDBCA5 */ public class ExtensionPointUtils { diff --git a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/util/LoggingUtils.java b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/util/LoggingUtils.java index 72c3b23b5666ecb13c99f34ac8612c555bc11a1e..74fd461683812613b3b5dce1e817a7a0309ec033 100644 --- a/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/util/LoggingUtils.java +++ b/org.fortiss.tooling.kernel/trunk/src/org/fortiss/tooling/kernel/util/LoggingUtils.java @@ -28,11 +28,11 @@ import org.eclipse.core.runtime.Status; * implementation. It re-packaged with the kernel to avoid any dependency to * eclipse.ui packages. See http://www.conqat.org for the original version. * - * @author hummelb + * @author hummel * @author schwitze * @author $Author$ * @version $Rev$ - * @levd.rating GREEN Hash: AA5D7661DFC5CC4BF4D59C1A84E5D471 + * @ConQAT.Rating YELLOW Hash: 27FE1FF60B7FF5F94B1619BE297E4036 */ public class LoggingUtils {