Commit 6e41dc64 authored by Liana Soima's avatar Liana Soima

Coding Standards

Changes comments in accordance with coding standards.
Signed-off-by: Liana Soima's avatarLiana Soima <soima@fortiss.org>
Issue-Ref: 3976
parent aeb5d958
AutomaticSetListener.java 2d0680e2e63039aa1eb648f3f35a861b0bb0d071 YELLOW
AutomaticSetListener.java 9e4f7a929cb10be116c0442a6251683cea39dc2a YELLOW
AutomaticSetListenerPersistency.java fdf9f4af3ec798af6c5f95d7b1f6a3ed39de2b14 GREEN
......@@ -177,19 +177,19 @@ public class AutomaticSetListener extends EContentAdapter {
}
}
/** Searches for a referenceable {@link Requirement} in the claim text. */
/** Searches for a referenceable {@link Requirement} in the claim text (textualInformation). */
private void referenceRequirement(ArgumentElement argElement, String name) {
boolean containsReference = argElement.getReferencedRequirements().stream()
.map(i -> ((INamedElement)i).getName()).anyMatch(e -> e.equals(name));
if(!containsReference) {
if(getAllRequirements(argElement) != null) {
// The list can contain just one element (last referenced element in the claim
// text).
// Search in the project for the element with the same name as the reference from
// the claim text.
List<INamedElement> list =
getAllRequirements(argElement).stream().filter(i -> i.getName() != null)
.filter(i -> i.getName().equals(name)).collect(Collectors.toList());
// The last referenced element in the claim text.
if(!list.isEmpty()) {
// The list contains the element with the same name as the refence.
argElement.getReferencedRequirements().add((Requirement)list.get(0));
}
}
......@@ -202,11 +202,11 @@ public class AutomaticSetListener extends EContentAdapter {
.map(i -> ((INamedElement)i).getName()).anyMatch(e -> e.equals(name));
if(!containsReference) {
if(getAllAllocations(argElement) != null) {
// The list can contain just one element (last referenced element in the claim
// text).
// Search in the project for the element with the same name as the reference from
// the claim text.
List<INamedElement> list = getAllAllocations(argElement).stream()
.filter(i -> i.getName().equals(name)).collect(Collectors.toList());
// The last referenced element in the claim text.
// The list contains the element with the same name as the refence.
if(!list.isEmpty()) {
argElement.getReferencedDeployments().add((AllocationTable)list.get(0));
}
......@@ -220,12 +220,12 @@ public class AutomaticSetListener extends EContentAdapter {
.map(i -> ((INamedElement)i).getName()).anyMatch(e -> e.equals(name));
if(!containsReference) {
if(getAllPlatformArchitecture(argElement) != null) {
// The list can contain just one element (last referenced element in the claim
// text).
// Search in the project for the element with the same name as the reference from
// the claim text.
List<INamedElement> list = getAllPlatformArchitecture(argElement).stream()
.filter(i -> i.getName().equals(name)).collect(Collectors.toList());
if(!list.isEmpty()) {
// The last referenced element in the claim text.
// The list contains the element with the same name as the refence.
argElement.getReferencedPTA().add((IPlatformArchitectureElement)list.get(0));
}
}
......@@ -238,11 +238,11 @@ public class AutomaticSetListener extends EContentAdapter {
.map(i -> ((INamedElement)i).getName()).anyMatch(e -> e.equals(name));
if(!containsReference) {
if(getAllModes(argElement) != null) {
// The list can contain just one element (last referenced element in the claim
// text).
// Search in the project for the element with the same name as the reference from
// the claim text.
List<INamedElement> list = getAllModes(argElement).stream()
.filter(i -> i.getName().equals(name)).collect(Collectors.toList());
// The last referenced element in the claim text.
// The list contains the element with the same name as the refence.
if(!list.isEmpty()) {
argElement.getReferencedModes().add((Mode)list.get(0));
}
......@@ -256,11 +256,11 @@ public class AutomaticSetListener extends EContentAdapter {
.map(i -> ((INamedElement)i).getName()).anyMatch(e -> e.equals(name));
if(!containsReference) {
if(getAllStates(argElement) != null) {
// The list can contain just one element (last referenced element in the claim
// text).
// Search in the project for the element with the same name as the reference from
// the claim text.
List<INamedElement> list = getAllStates(argElement).stream()
.filter(i -> i.getName().equals(name)).collect(Collectors.toList());
// The last referenced element in the claim text.
// The list contains the element with the same name as the refence.
if(!list.isEmpty()) {
argElement.getReferencedStates().add((State)list.get(0));
}
......@@ -274,11 +274,11 @@ public class AutomaticSetListener extends EContentAdapter {
.map(i -> ((INamedElement)i).getName()).anyMatch(e -> e.equals(name));
if(!containsReference) {
if(getAllLogicalComponents(argElement) != null) {
// The list can contain just one element (last referenced element in the claim
// text).
// Search in the project for the element with the same name as the reference from
// the claim text.
List<INamedElement> list = getAllLogicalComponents(argElement).stream()
.filter(i -> i.getName().equals(name)).collect(Collectors.toList());
// The last referenced element in the claim text.
// The list contains the element with the same name as the refence.
if(!list.isEmpty()) {
argElement.getReferencedComponents().add((Component)list.get(0));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment