Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JavaDoc #112

Merged
merged 3 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions atomic/src/main/ecore/atomicModelChange.ecore
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="InsertRootEObject">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="*&#xA;EChange which inserts a new root EObject into a resource. The object will&#xA;be taken from the staging area and needs to be filled by {@link CreateEObject} change first."/>
<details key="documentation" value="*&#xA;EChange which inserts a new root EObject into a resource. The object will&#xA;be taken from the staging area and needs to be filled by {@link tools.vitruv.change.atomic.eobject.CreateEObject} change first."/>
</eAnnotations>
<eTypeParameters name="Element">
<eBounds eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
Expand Down Expand Up @@ -549,7 +549,7 @@
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="InsertEReference">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="*&#xA;EChange which inserts an EObject into a many valued reference.&#xA;If the reference is a containment reference, the inserted object will be taken from the staging area.&#xA;There it must be placed by a {@link CreateEObject} EChange or by removing it from another reference."/>
<details key="documentation" value="*&#xA;EChange which inserts an EObject into a many valued reference.&#xA;If the reference is a containment reference, the inserted object will be taken from the staging area.&#xA;There it must be placed by a {@link tools.vitruv.change.atomic.eobject.CreateEObject} EChange or by removing it from another reference."/>
</eAnnotations>
<eTypeParameters name="Element">
<eBounds eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
Expand All @@ -565,7 +565,7 @@
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="RemoveEReference">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="*&#xA;EChange which removes an EObject from a many valued reference.&#xA;If the reference is a containment reference, the removed object will be placed in the staging area.&#xA;There it can be deleted by a {@link DeleteEObject} EChange or reinserted by another change."/>
<details key="documentation" value="*&#xA;EChange which removes an EObject from a many valued reference.&#xA;If the reference is a containment reference, the removed object will be placed in the staging area.&#xA;There it can be deleted by a {@link tools.vitruv.change.atomic.eobject.DeleteEObject} EChange or reinserted by another change."/>
</eAnnotations>
<eTypeParameters name="Element">
<eBounds eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
Expand All @@ -581,7 +581,7 @@
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ReplaceSingleValuedEReference">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="*&#xA;EChange which replaces a single valued reference with a new EObject.&#xA;If the reference is a containment reference, the new object will be taken from the staging&#xA;area and the old one will be placed in it.&#xA;The new object must be placed in the staging area by a {@link CreateEObject} EChange or by removing&#xA;it from another reference.&#xA;The old one can be deleted by a {@link DeleteEObject} EChange or resinserted by another change."/>
<details key="documentation" value="*&#xA;EChange which replaces a single valued reference with a new EObject.&#xA;If the reference is a containment reference, the new object will be taken from the staging&#xA;area and the old one will be placed in it.&#xA;The new object must be placed in the staging area by a {@link tools.vitruv.change.atomic.eobject.CreateEObject} EChange or by removing&#xA;it from another reference.&#xA;The old one can be deleted by a {@link tools.vitruv.change.atomic.eobject.DeleteEObject} EChange or resinserted by another change."/>
</eAnnotations>
<eTypeParameters name="Element">
<eBounds eClassifier="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
import org.eclipse.emf.ecore.resource.ResourceSet;

/**
* A UUID resolver manages the mapping of {@link EObject} to UUIDs within one
* A UUID resolver manages the mapping of {@link org.eclipse.emf.ecore.EObject} to UUIDs within one
* resource set. UUIDs are used to uniquely identify an element in changes,
* independent of the location within a resource set and the actual resource set
* instance.
*/
public interface UuidResolver {
/**
* Returns whether the given {@link EObject} has a registered UUID or not.
* Returns whether the given {@link org.eclipse.emf.ecore.EObject} has a registered UUID or not.
*/
public default boolean hasUuid(EObject eObject) {
try {
Expand All @@ -30,7 +30,7 @@ public default boolean hasUuid(EObject eObject) {
};

/**
* Returns whether an {@link EObject} is registered for the given UUID or not.
* Returns whether an {@link org.eclipse.emf.ecore.EObject} is registered for the given UUID or not.
*/
public default boolean hasEObject(Uuid uuid) {
try {
Expand All @@ -42,49 +42,49 @@ public default boolean hasEObject(Uuid uuid) {
};

/**
* Returns the UUID for the given {@link EObject}. If no UUID is registered for
* Returns the UUID for the given {@link org.eclipse.emf.ecore.EObject}. If no UUID is registered for
* it, an {@link IllegalStateException} is thrown.
*/
public Uuid getUuid(EObject eObject) throws IllegalStateException;

/**
* Returns the {@link EObject} for the given UUID. If more than one object was
* Returns the {@link org.eclipse.emf.ecore.EObject} for the given UUID. If more than one object was
* registered for the UUID, the last one is returned.
*
* @throws IllegalStateException if no {@link EObject} was registered for the
* @throws IllegalStateException if no {@link org.eclipse.emf.ecore.EObject} was registered for the
* UUID
*/
public EObject getEObject(Uuid uuid) throws IllegalStateException;

/**
* Generates a new UUID for the given {@link EObject}.
* Generates a new UUID for the given {@link org.eclipse.emf.ecore.EObject}.
*
* @param eObject is the object to generate a UUID for. Must not be
* <code>null</code> or a proxy.
*/
public Uuid generateUuid(EObject eObject);

/**
* Registers the given {@link EObject} for the given UUID.
* Registers the given {@link org.eclipse.emf.ecore.EObject} for the given UUID.
*
* @param uuid is the UUID to register the {@link EObject} for. Must not be
* @param uuid is the UUID to register the {@link org.eclipse.emf.ecore.EObject} for. Must not be
* <code>null</code>.
* @param eObject is the {@link EObject} to register. Must not be
* @param eObject is the {@link org.eclipse.emf.ecore.EObject} to register. Must not be
* <code>null</code> or a proxy.
* @throws IllegalStateException if there is already another UUID registered for
* the given {@link EObject} or vice versa.
* the given {@link org.eclipse.emf.ecore.EObject} or vice versa.
*/
public void registerEObject(Uuid uuid, EObject eObject) throws IllegalStateException;

/**
* Registers the given {@link EObjecty} for a newly generated UUID and returns
* Registers the given {@link org.eclipse.emf.ecore.EObject} for a newly generated UUID and returns
* that UUID. The UUID is generated using {@link UuidResolver#generateUuid}.
*
* @param eObject is the object to register. Must not be <code>null</code> or a
* proxy.
* @throws IllegalStateException if there is already another UUID registered for
* the given {@link EObject}.
* @return the UUID registered for the given {@link EObject}.
* the given {@link org.eclipse.emf.ecore.EObject}.
* @return the UUID registered for the given {@link org.eclipse.emf.ecore.EObject}.
*/
public default Uuid registerEObject(EObject eObject) throws IllegalStateException {
Uuid uuid = generateUuid(eObject);
Expand All @@ -101,16 +101,16 @@ public default Uuid registerEObject(EObject eObject) throws IllegalStateExceptio
public Resource getResource(URI uri);

/**
* Ends a transactions such that any registered {@link EObject} not being
* Ends a transactions such that any registered {@link org.eclipse.emf.ecore.EObject} not being
* contained in a resource throws an error.
*
* @throws IllegalStateException if an uncontained element is registered.
*/
public void endTransaction() throws IllegalStateException;

/**
* Resolves all {@link EObject}s contained in any resource of the given
* mapping's key set to its counterpart {@link EObject} in the corresponding
* Resolves all {@link org.eclipse.emf.ecore.EObject}s contained in any resource of the given
* mapping's key set to its counterpart {@link org.eclipse.emf.ecore.EObject} in the corresponding
* resource of the <code>targetUuidResolver</code> and registers the resolved
* object under the same UUID as in the current resolver. The resource
* correspondences are determined by the
Expand All @@ -128,16 +128,16 @@ public default Uuid registerEObject(EObject eObject) throws IllegalStateExceptio
* @param targetUuidResolver is the {@link UuidResolver} to resolve
* the given resources in. Must not be
* <code>null</code>.
* @throws IllegalStateException if any {@link EObject} of the current resolver
* @throws IllegalStateException if any {@link org.eclipse.emf.ecore.EObject} of the current resolver
* is not contained in a resource or a resource
* pair is not structurally equal.
*/
public void resolveResources(Map<Resource, Resource> sourceToTargetResourceMapping, UuidResolver targetUuidResolver)
throws IllegalStateException;

/**
* Resolves all {@link EObject}s contained in the given
* <code>sourceResource</code> to its counterpart {@link EObject} in the
* Resolves all {@link org.eclipse.emf.ecore.EObject}s contained in the given
* <code>sourceResource</code> to its counterpart {@link org.eclipse.emf.ecore.EObject} in the
* <code>targetResource</code> and registers the resolved object under the same
* UUID as in the current resolver. The source and target resources are expected
* to be structurally equal.
Expand All @@ -150,7 +150,7 @@ public void resolveResources(Map<Resource, Resource> sourceToTargetResourceMappi
* <code>null</code>.
* @param targetUuidResolver is the {@link UuidResolver} to resolve the given
* resources in. Must not be <code>null</code>.
* @throws IllegalStateException if any {@link EObject} of the current resolver
* @throws IllegalStateException if any {@link org.eclipse.emf.ecore.EObject} of the current resolver
* is not contained in a resource or the given
* resources are not structurally equal.
*/
Expand All @@ -177,7 +177,7 @@ public static UuidResolver create(ResourceSet resourceSet) {
* @param uri is the {@link URI} to store the serialization at. Must not be
* <code>null</code> and must be a file URI.
* @throws IOException if saving to file fails.
* @throws IllegalStateException if any {@link EObject} of the current resolver
* @throws IllegalStateException if any {@link org.eclipse.emf.ecore.EObject} of the current resolver
* is not contained in a resource.
*/
public void storeAtUri(URI uri) throws IOException, IllegalStateException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ class TypeInferringAtomicEChangeFactory {
/**
* Sets the attributes of a RootEChange.
* @param change The RootEChange which attributes are to be set.
* @param resourceURI The affected resource of the change.
* @param URI the URI of the resource. May differ from URI of the resource if it has changed.
* @param resource The affected resource of the change.
* @param uri the URI of the resource. May differ from URI of the resource if it has changed.
* @param index The affected index of the resource.
*/
def protected setRootChangeFeatures(RootEChange<?> change, Resource resource, URI uri, int index) {
Expand Down Expand Up @@ -149,7 +149,7 @@ class TypeInferringAtomicEChangeFactory {
}

/**
* Creates a new {@link InsertEAttribute} EChange.
* Creates a new {@link InsertEAttributeValue} EChange.
* @param affectedEObject The affected EObject of the change.
* @param affectedAttribute The affected EAttribute of the change.
* @param newValue The inserted value.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class TypeInferringCompoundEChangeFactory {
}

/**
* Creates a new {@link CreateAndInsertRoot} EChange.
* Creates a new EChange list that creates and inserts a root object.
* @param affectedEObject The created and inserted root object by the change.
* @param resource The resource where the root object will be inserted.
* @param index The index at which the root object will be inserted into the resource.
Expand All @@ -41,7 +41,7 @@ class TypeInferringCompoundEChangeFactory {
}

/**
* Creates a new {@link CreateAndRemoveDeleteRoot} EChange.
* Creates a new EChange list that removes and delete a root object.
* @param affectedEObject The removed and deleted root object by the change.
* @param resource The resource where the root object will be removed from.
* @param index The index at which the root object will be removed from the resource.
Expand All @@ -55,7 +55,7 @@ class TypeInferringCompoundEChangeFactory {
}

/**
* Creates a new {@link CreateAndInsertNonRoot} EChange.
* Creates a new EChange list that creates and inserts a non root element.
* @param affectedEObject The affected object, in which feature the created non root element will be inserted.
* @param reference The reference of the affected object, in which the created non root element will be inserted.
* @param newValue The created and inserted non root element.
Expand All @@ -70,7 +70,7 @@ class TypeInferringCompoundEChangeFactory {
}

/**
* Creates a new {@link RemoveAndDeleteNonRoot} EChange.
* Creates a new EChange list that removes and deletes a non root element.
* @param affectedEObject The affected object, from which feature the non root element will be removed.
* @param reference The reference of the affected object, from which the non root element will be removed.
* @param oldValue The removed and deleted non root element.
Expand All @@ -85,7 +85,7 @@ class TypeInferringCompoundEChangeFactory {
}

/**
* Creates a new {@link CreateAndReplaceNonRoot} EChange.
* Creates a new EChange list that creates an EObject and replaces a value with it.
* @param affectedEObject The affected object, in which feature null will be replaced by the new value.
* @param reference The reference of the affected object, in which null will be replaced by the new value.
* @param newValue The new value which replaces null.
Expand All @@ -99,7 +99,7 @@ class TypeInferringCompoundEChangeFactory {
}

/**
* Creates a new {@link ReplaceAndDeleteNonRoot} EChange.
* Creates a new EChange list that replace a feature value with null and deletes the replaced EObject.
* @param affectedEObject The affected object, in which feature the old value will be replaced by null.
* @param reference The reference of the affected object, in which the old value will be replaced by null.
* @param oldValue The old value which will be replaced by null.
Expand All @@ -113,7 +113,7 @@ class TypeInferringCompoundEChangeFactory {
}

/**
* Creates a new {@link CreateAndReplaceAndDeleteNonRoot} EChange.
* Creates a new EChange list that replaced a feature value with a newly created EObject and deletes the replaced EObject.
* @param affectedEObject The affected object, in which feature the non root element will be replaced.
* @param reference The reference of the affected object, in which the non root element will be replaced.
* @param oldValue The replaced and deleted non root element.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import static com.google.common.base.Preconditions.checkState
class ApplyEChangeSwitch {
/**
* Applies a given {@link EChange}.
* Returns if the change was successfully applied.
* @param change The {@link EChange} which will be applied.
* @param applyForward If {@code true} the change will be applied forward,
* otherwise backward.
* @returns The change was successfully applied.
* @throws IllegalStateException No commands can be generated for the change, or they cannot be executed.
*/
def static void applyEChange(EChange<EObject> change, boolean applyForward) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ObjectResolutionUtil {
* </pre>
*
* @param object - the {@link EObject} to get a hierarchic URI fragment for
* @returns a hierarchic URI fragment for the given {@link EObject}
* @return a hierarchic URI fragment for the given {@link EObject}
*/
def static getHierarchicUriFragment(EObject object) {
val resource = object.eResource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ interface HierarchicalIdResolver {
def void endTransaction()

/**
* Instantiates a {@link IdResolverAndRepository} with the given {@link ResourceSet}
* Instantiates a {@link HierarchicalIdResolver} with the given {@link ResourceSet}
* for resolving objects.
*
* @param resourceSet -
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class HierarchicalIdResolverImpl implements HierarchicalIdResolver {
*
* @param resourceSet -
* the {@link ResourceSet} to load model elements from, may not be {@code null}
* @throws IllegalArgumentExceptionif given {@link ResourceSet} is {@code null}
* @throws IllegalArgumentException if given {@link ResourceSet} is {@code null}
*/
new(ResourceSet resourceSet) {
checkArgument(resourceSet !== null, "Resource set may not be null")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ abstract class AbstractVitruviusChangeResolver<Id> implements VitruviusChangeRes
* After completely handling a transactional change, the
* {@code onTransactionEnd} handler is called with the transformed change.
*
* @parameter change the change to transform
* @parameter changeHandler the handler for transforming a single
* @param change the change to transform
* @param changeHandler the handler for transforming a single
* {@code EChange}.
* @parameter onTransactionEnd any cleanup logic after a transactional change
* @param onTransactionEnd any cleanup logic after a transactional change
* has been completely transformed. This might be called multiple
* times with different changes if the passed change is a composite
* change.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import static extension tools.vitruv.change.atomic.EChangeUtil.*
* The recorder considers resources being loaded as existing and does thus not produce changes for it.
*
* Does not record changes of the <code>xmi:id</code> tag in an
* {@link org.eclipse.emf.ecore.xmi.XMLResource XMLResource} if it is not stored in the element
* {@code org.eclipse.emf.ecore.xmi.XMLResource} if it is not stored in the element
* but directly in the <code>Resource</code>.
*/
class ChangeRecorder implements AutoCloseable {
Expand Down
Loading