Skip to content
Snippets Groups Projects
Commit a0a44f18 authored by Daniel Ratiu's avatar Daniel Ratiu
Browse files

Yet another review of the code.

parent 1449cba5
No related branches found
No related tags found
No related merge requests found
Showing
with 39 additions and 24 deletions
......@@ -2,7 +2,7 @@
<!--
$Id$
@version $Rev$
@ConQAT.Rating YELLOW Hash: 26017AC11C86070E4BD552A152560B42
@ConQAT.Rating GREEN Hash: 7928C78126C557E8FCBAAE2B8DA1A7D4
-->
<project name="org.fortiss.tooling.kernel" default="generate-ecore" basedir="..">
......
......@@ -47,7 +47,7 @@ import org.fortiss.tooling.kernel.service.base.IEObjectAware2;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 1AC611B81A3BA734C7F2282DB2AD91E9
* @ConQAT.Rating GREEN Hash: E742F52CFB04C7A360DB5B8E6B298A9B
*/
public interface IConnectionCompositor<P extends EObject, S extends EObject, T extends EObject>
extends IEObjectAware2<S, T> {
......
......@@ -37,7 +37,7 @@ import org.fortiss.tooling.kernel.extension.data.ITopLevelElement;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: A67842FEEDB243FFDE4F9A2608BF3BDD
* @ConQAT.Rating GREEN Hash: E36F41D943949451796331ACA6BCA5AA
*/
public interface IStorageProvider {
......
......@@ -24,6 +24,9 @@ import org.fortiss.tooling.kernel.service.ITransformationService;
import org.fortiss.tooling.kernel.service.base.IObjectAware2;
/**
* TODO: why do you mean with "extends the {@link ITransformationService}"?
* where is the extension?
*
* A transformation provider extends the {@link ITransformationService} with a
* concrete transformation from a source element into a target element. Since
* transformations may also produce intermediary data, which is not intended to
......@@ -33,7 +36,7 @@ import org.fortiss.tooling.kernel.service.base.IObjectAware2;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: ED966776801EC39BB007677192874648
* @ConQAT.Rating RED Hash: 85C9BC59354ADFA207E0852126747DC3
*/
public interface ITransformationProvider extends IObjectAware2<Object, Object> {
......
......@@ -40,10 +40,16 @@ import org.fortiss.tooling.kernel.extension.IStorageProvider;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: D5E4768469B152AF43BEA636ADD15647
* @ConQAT.Rating RED Hash: 9226FD21C183EB5EBC673EE375282AA2
*/
public interface ITopLevelElement {
// TODO: Why does the interface ITopLevelElement have the method
// getTopLevelElement ? Shouldn't we rename this interface in e.g.
// IModelContext?
// in ProjectRootElementUtils we have
// IPersistencyService.INSTANCE.getTopLevelElementFor(element).getTopLevelElement().eContents()
// ----- so, a topLevelElement has another toplevelElement
/** Returns the top-level model element represented by this context. */
EObject getTopLevelElement();
......
......@@ -29,7 +29,7 @@ import org.fortiss.tooling.kernel.extension.ITransformationProvider;
* @author hoelzlf
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 99FAB30533C1B634FFA4B109F3895563
* @ConQAT.Rating GREEN Hash: 9A5B9BC7340486B8305FF86DD93E4B76
*/
public interface ITransformationContext {
// this is just a marker interface
......
......@@ -33,7 +33,7 @@ import org.fortiss.tooling.kernel.extension.exception.TransformationFailedExcept
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 823FBB16792EF512BC61325FDE261FD2
* @ConQAT.Rating GREEN Hash: 710BEC527492779A8E599292CDFD06F4
*/
public final class TransformationProviderChain {
......
......@@ -33,7 +33,7 @@ import org.fortiss.tooling.kernel.extension.data.TransformationProviderChain;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: B7A22EFB0198AF292D921D8DB0F1A1C8
* @ConQAT.Rating GREEN Hash: AB3D4D3B9B0CC64098BD7A9A03454214
*/
public class ChainTransformationFailedException extends
TransformationFailedException {
......
......@@ -33,7 +33,7 @@ import org.fortiss.tooling.kernel.extension.data.TransformationProviderChain;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 44C923CA265C916F3E996EECF8BE78E1
* @ConQAT.Rating GREEN Hash: FE609364041911AE73A94322D0221728
*/
public class TransformationFailedException extends Exception {
......
<!--
$Id$
@version $Rev$
@ConQAT.Rating YELLOW Hash: C93760009EA4D5F2F25954D7D798DDEF
@ConQAT.Rating GREEN Hash: 73A6132435FD764CF272C5A6CDCC4CEC
-->
<body>
Exception classes for failure reporting between the kernel and extensions.
......
......@@ -32,7 +32,7 @@ import org.fortiss.tooling.kernel.service.base.EObjectAware2ServiceBase;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: A8FA617C6A6923341A50C756271D00AD
* @ConQAT.Rating GREEN Hash: 51C72E3E2B906CA666B2A2649441B518
*/
public class ConnectionCompositorService
extends
......@@ -85,7 +85,7 @@ public class ConnectionCompositorService
/**
* Returns the first {@link IConnectionCompositor} which can connect the
* given elements (or <code>null</code>n if no such connector exists).
* given elements (or <code>null</code> if no such connector exists).
*/
private IConnectionCompositor<EObject, EObject, EObject> findWorkingConnector(
EObject source, EObject target, EObject connection,
......
......@@ -34,7 +34,7 @@ import org.fortiss.tooling.kernel.service.base.EObjectAwareServiceBase;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: CCCF0A7F0499A7BEBAD802EB5706EF88
* @ConQAT.Rating GREEN Hash: FEB4237E503A79A9B119E465A3D49C31
*/
public class ConstraintCheckerService extends
EObjectAwareServiceBase<IConstraintChecker<EObject>> implements
......
......@@ -33,7 +33,7 @@ import org.fortiss.tooling.kernel.service.base.EObjectAwareServiceBase;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 158E787FA702863117C1D0FEBD532AA4
* @ConQAT.Rating GREEN Hash: DC6A32F0B679D71C283A86517CF900BA
*/
public final class ElementCompositorService extends
EObjectAwareServiceBase<IElementCompositor<EObject>> implements
......
<!--
$Id$
@version $Rev$
@ConQAT.Rating YELLOW Hash: 13F39D97447479F3151634E5DAAB3AEC
@ConQAT.Rating GREEN Hash: 3AF02E4D87B483A62475FCF449069F62
-->
<body>
Implementations of the kernel services defined in the <code>kernel.service</code> package.
......
......@@ -56,7 +56,7 @@ import org.osgi.framework.Bundle;
* @author hoelzlf
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: C6275F103FF5DC989ABA86CB9E7E3CE7
* @ConQAT.Rating GREEN Hash: 17E9760429C421C70BB25ED0F6D3A243
*/
public class EclipseResourceStorageProvider implements
IEclipseResourceStorageService, IResourceChangeListener,
......
......@@ -11,5 +11,7 @@ Only files in the project's root folder are considered.
For each such files the set of registered <code>eclipseResourceStorageLocationProvider</code> extensions is
asked whether the respective file should be considered a model file. This extension mechanism is used
to allow different tools to use different file extensions for their models, e.g., tool A uses *.toolA, while
tool B uses *.toolB files.
tool B uses *.
<p>
TODO: What do you mean here with tool A and tool B? Do we make an infrastructure for more tools?
</body>
......@@ -41,7 +41,7 @@ import org.fortiss.tooling.kernel.service.listener.IPersistencyServiceListener;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 2AB0B956F1EE43A8F5DBCAEC8AD7FF36
* @ConQAT.Rating GREEN Hash: 2FFF20C4EEB1C3B252E0925640300886
*/
public interface IPersistencyService {
......
......@@ -36,7 +36,7 @@ import org.fortiss.tooling.kernel.internal.TransformationService;
* @author hoelzl
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 96AE78B4B0296C7CBBD0770F43F9B2A3
* @ConQAT.Rating RED Hash: 04E7821466A71D96E214234950636F6D
*/
public interface ITransformationService {
......@@ -47,6 +47,8 @@ public interface ITransformationService {
* Determines if there is a transformation provider, which can perform the
* transformation of the given source element into the given target element.
*/
// TODO: replace everywhere Class<? extends Object> with Class<?>
// http://stackoverflow.com/questions/370601/is-it-good-practice-to-replace-class-with-class-extends-object-to-avoid-warnin
boolean canTransform(Object source, Class<? extends Object> targetClass,
ITransformationContext context);
......
......@@ -58,14 +58,16 @@ import org.osgi.framework.Bundle;
* is <code>false</code>.
* </UL>
*
* An example implementation of a service based on this class is given by
* {@link ElementCompositorService}. The corresponding extension point schema is
* defined in <code>schema/modelElementConnectionCompositor.exsd</code>.
* TODO: {@link ElementCompositorService} or
* {@link ElementConnectionCompositorService}? An example implementation of a
* service based on this class is given by {@link ElementCompositorService}. The
* corresponding extension point schema is defined in
* <code>schema/modelElementConnectionCompositor.exsd</code>.
*
* @author hoelzlf
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 1DF3DF539FD1C665BD119D7DFD31EB1F
* @ConQAT.Rating RED Hash: 786F8E4DCC1D8024AB6DB6FBE101DB56
*/
public abstract class ObjectAware2ServiceBase<T extends IObjectAware2<? extends Object, ? extends Object>> {
......
<!--
$Id: package.html 901 2011-07-10 13:44:11Z hoelzl $
@version $Rev: 901 $
@ConQAT.Rating YELLOW Hash: F00D0F258657E3EE1E28098A9F06A812
@ConQAT.Rating GREEN Hash: 545290276E5BEC4B5B3A5875F1E4D14A
-->
<body>
Classes in this packages are listener interfaces for kernel services.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment