Commit 5c83f76e authored by Sudeep Kanav's avatar Sudeep Kanav
Browse files

GREEN

refs 2248
parent 12c4bcee
......@@ -17,15 +17,16 @@ $Id$
+--------------------------------------------------------------------------*/
package org.fortiss.af3.expression.ui.properties;
import static org.apache.commons.lang.StringUtils.join;
import static org.fortiss.af3.mira.model.MiraPackage.Literals.EXTERNAL_RELATION_SPECIFICATION__REQUIREMENT_IMPLEMENTED_CORRECTLY;
import static org.fortiss.af3.mira.utils.MiraUtils.getTracesFromExternalRelSpec;
import static org.fortiss.tooling.kernel.ui.util.ObservableUtils.observeValue;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.copy;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickInstanceOf;
import static org.fortiss.tooling.kernel.utils.KernelModelElementUtils.getParentElement;
import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.emf.common.util.EList;
import org.eclipse.jface.databinding.swt.SWTObservables;
......@@ -47,7 +48,6 @@ import org.fortiss.tooling.kernel.extension.data.ITopLevelElement;
import org.fortiss.tooling.kernel.service.IElementCompositorService;
import org.fortiss.tooling.kernel.service.IPersistencyService;
import org.fortiss.tooling.kernel.ui.extension.base.PropertySectionBase;
import org.fortiss.tooling.kernel.utils.EcoreUtils;
/**
* Property section for {@link Enumeration}s.
......@@ -55,7 +55,7 @@ import org.fortiss.tooling.kernel.utils.EcoreUtils;
* @author eder
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 9CC194F0FE92AB343BA25DC70F11906E
* @ConQAT.Rating GREEN Hash: 4DD74D6E09EC8EC5A11A6FD2FB079E4C
*/
public class EnumPropertySection extends PropertySectionBase {
......@@ -105,7 +105,7 @@ public class EnumPropertySection extends PropertySectionBase {
final Enumeration enumeration2 =
ExpressionModelElementFactory.createEnumeration(enumeration.getName());
for(EnumerationMember em : enumeration.getMembers()) {
enumeration2.getMembers().add(EcoreUtils.copy(em));
enumeration2.getMembers().add(copy(em));
}
ITopLevelElement modelContext =
......@@ -134,7 +134,7 @@ public class EnumPropertySection extends PropertySectionBase {
EList<ExternalRelationSpecification> specs =
pickInstanceOf(ExternalRelationSpecification.class, enumeration.getSpecifications());
traces = getTracesFromExternalRelSpec(specs);
showTraces.setText(StringUtils.join(traces, ", "));
showTraces.setText(join(traces, ", "));
// if traces are 0 disable the check button "Correctly Implement Req."
if(traces.size() == 0) {
enumerationImplReqButton.setEnabled(false);
......
......@@ -17,6 +17,7 @@ $Id$
+--------------------------------------------------------------------------*/
package org.fortiss.af3.expression.ui.properties;
import static org.apache.commons.lang.StringUtils.join;
import static org.fortiss.af3.mira.model.MiraPackage.Literals.EXTERNAL_RELATION_SPECIFICATION__REQUIREMENT_IMPLEMENTED_CORRECTLY;
import static org.fortiss.af3.mira.utils.MiraUtils.getTracesFromExternalRelSpec;
import static org.fortiss.tooling.kernel.ui.util.ObservableUtils.observeValue;
......@@ -24,7 +25,6 @@ import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickInstanceOf;
import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.emf.common.util.EList;
import org.eclipse.jface.databinding.swt.ISWTObservableValue;
......@@ -46,7 +46,7 @@ import org.fortiss.tooling.kernel.ui.extension.base.PropertySectionBase;
* @author eder
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 63915C69A940DBA458CA43AD62ACCA72
* @ConQAT.Rating GREEN Hash: 9F26F69199613F302D7AD033CEF2E91C
*/
public final class EnumerationMemberPropertySection extends PropertySectionBase {
......@@ -90,7 +90,7 @@ public final class EnumerationMemberPropertySection extends PropertySectionBase
EList<ExternalRelationSpecification> specs =
pickInstanceOf(ExternalRelationSpecification.class, member.getSpecifications());
traces = getTracesFromExternalRelSpec(specs);
showTraces.setText(StringUtils.join(traces, ", "));
showTraces.setText(join(traces, ", "));
if(traces.size() == 0) {
enumerationMemberImplReqButton.setEnabled(false);
enumerationMemberImplreqLabel.setEnabled(false);
......
......@@ -17,6 +17,7 @@ $Id$
+--------------------------------------------------------------------------*/
package org.fortiss.af3.expression.ui.properties;
import static org.apache.commons.lang.StringUtils.join;
import static org.fortiss.af3.mira.model.MiraPackage.Literals.EXTERNAL_RELATION_SPECIFICATION__REQUIREMENT_IMPLEMENTED_CORRECTLY;
import static org.fortiss.af3.mira.utils.MiraUtils.getTracesFromExternalRelSpec;
import static org.fortiss.tooling.kernel.ui.util.DataBindingUtils.performComplexTextBinding;
......@@ -25,7 +26,6 @@ import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickInstanceOf;
import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.emf.common.util.EList;
import org.eclipse.jface.databinding.swt.ISWTObservableValue;
......@@ -50,7 +50,7 @@ import org.fortiss.tooling.kernel.ui.extension.base.PropertySectionBase;
* @author eder
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 820D12B1B9D908ED1A96C96ADEEA1583
* @ConQAT.Rating GREEN Hash: 61F296F18C9F3856477BB2698A454E00
*/
public final class StructureMemberPropertySection extends PropertySectionBase {
......@@ -96,7 +96,7 @@ public final class StructureMemberPropertySection extends PropertySectionBase {
EList<ExternalRelationSpecification> specs =
pickInstanceOf(ExternalRelationSpecification.class, member.getSpecifications());
traces = getTracesFromExternalRelSpec(specs);
showTraces.setText(StringUtils.join(traces, ", "));
showTraces.setText(join(traces, ", "));
if(traces.size() == 0) {
structureMemberImplReqButton.setEnabled(false);
structureMemberImplreqLabel.setEnabled(false);
......
......@@ -17,15 +17,16 @@ $Id$
+--------------------------------------------------------------------------*/
package org.fortiss.af3.expression.ui.properties;
import static org.apache.commons.lang.StringUtils.join;
import static org.fortiss.af3.mira.model.MiraPackage.Literals.EXTERNAL_RELATION_SPECIFICATION__REQUIREMENT_IMPLEMENTED_CORRECTLY;
import static org.fortiss.af3.mira.utils.MiraUtils.getTracesFromExternalRelSpec;
import static org.fortiss.tooling.kernel.ui.util.ObservableUtils.observeValue;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.copy;
import static org.fortiss.tooling.kernel.utils.EcoreUtils.pickInstanceOf;
import static org.fortiss.tooling.kernel.utils.KernelModelElementUtils.getParentElement;
import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.emf.common.util.EList;
import org.eclipse.jface.databinding.swt.ISWTObservableValue;
......@@ -48,7 +49,6 @@ import org.fortiss.tooling.kernel.extension.data.ITopLevelElement;
import org.fortiss.tooling.kernel.service.IElementCompositorService;
import org.fortiss.tooling.kernel.service.IPersistencyService;
import org.fortiss.tooling.kernel.ui.extension.base.PropertySectionBase;
import org.fortiss.tooling.kernel.utils.EcoreUtils;
/**
* Property section for {@link Structure}s.
......@@ -56,7 +56,7 @@ import org.fortiss.tooling.kernel.utils.EcoreUtils;
* @author eder
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: CF07F8335F42AC5023C6D8951894F31A
* @ConQAT.Rating GREEN Hash: B688BAC3DD705AF141D80CC495D5FA45
*/
public class StructurePropertySection extends PropertySectionBase {
......@@ -102,7 +102,7 @@ public class StructurePropertySection extends PropertySectionBase {
final Structure structure2 =
ExpressionModelElementFactory.createStructure(structure.getName());
for(StructureMember em : structure.getMembers()) {
structure2.getMembers().add(EcoreUtils.copy(em));
structure2.getMembers().add(copy(em));
}
ITopLevelElement modelContext =
......@@ -131,7 +131,7 @@ public class StructurePropertySection extends PropertySectionBase {
EList<ExternalRelationSpecification> specs =
pickInstanceOf(ExternalRelationSpecification.class, structure.getSpecifications());
traces = getTracesFromExternalRelSpec(specs);
showTraces.setText(StringUtils.join(traces, ", "));
showTraces.setText(join(traces, ", "));
if(traces.size() == 0) {
structureImplReqButton.setEnabled(false);
structureImplreqLabel.setEnabled(false);
......
Supports Markdown
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