Commit 167db2d7 authored by Carmen Carlan's avatar Carmen Carlan

Code review: green

Issue-ref: 4054
Signed-off-by: Carmen Carlan's avatarCarmen Carlan <carlan@fortiss.org>
parent c0e6d03d
/*-------------------------------------------------------------------------+
| Copyright 2013 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.af3.safetycases.ui.handler;
import static org.conqat.lib.commons.collections.CollectionUtils.emptyList;
import static org.fortiss.af3.safetycases.ui.AF3SafetyCasesUIActivator.PLUGIN_ID;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.requirementspatterns.model.LibraryPatternsDatabase;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.NamedCommentedModelElementHandlerBase;
/**
* {@link IModelElementHandler} for {@link LibraryPatternsDatabase}.
*
* @author carlan
*/
public class LibraryPatternsDatabaseHandler
extends NamedCommentedModelElementHandlerBase<LibraryPatternsDatabase> {
/** {@inheritDoc} */
@Override
public String getName(LibraryPatternsDatabase element) {
return element.getPatternsDatabase().getName();
}
/** {@inheritDoc} */
@Override
protected String getPluginId() {
return PLUGIN_ID;
}
/** {@inheritDoc} */
@Override
protected String getIconPath(LibraryPatternsDatabase element) {
return "icons/patterns.png";
}
/** {@inheritDoc} */
@Override
public List<EObject> getSubnodes(LibraryPatternsDatabase element) {
return emptyList();
}
}
/*-------------------------------------------------------------------------+
| Copyright 2013 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.af3.safetycases.ui.handler;
import static org.fortiss.af3.safetycases.ui.AF3SafetyCasesUIActivator.PLUGIN_ID;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.requirementspatterns.model.LibraryPatternsDatabase;
import org.fortiss.af3.requirementspatterns.model.LibraryPatternsDatabasePackage;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.NamedCommentedModelElementHandlerBase;
/**
* {@link IModelElementHandler} for {@link LibraryPatternsDatabasePackage}.
*
* @author carlan
*/
public class LibraryPatternsDatabasePackageHandler
extends NamedCommentedModelElementHandlerBase<LibraryPatternsDatabasePackage> {
/** {@inheritDoc} */
@Override
protected String getPluginId() {
return PLUGIN_ID;
}
/** {@inheritDoc} */
@Override
protected String getIconPath(LibraryPatternsDatabasePackage element) {
return "icons/package.gif";
}
/** {@inheritDoc} */
@Override
public List<EObject> getSubnodes(LibraryPatternsDatabasePackage element) {
List<EObject> subNodes = new ArrayList<EObject>();
for(LibraryPatternsDatabase lpd : element.getLibraryPatternsDatabases()) {
subNodes.add(lpd);
}
subNodes.addAll(element.getSubPackages());
return subNodes;
}
}
/*-------------------------------------------------------------------------+
| Copyright 2013 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.af3.safetycases.ui.handler;
import static org.fortiss.af3.safetycases.ui.AF3SafetyCasesUIActivator.PLUGIN_ID;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.requirementspatterns.model.SafetyClaimPattern;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.NamedCommentedModelElementHandlerBase;
/**
* {@link IModelElementHandler} for {@link SafetyClaimPattern}.
*
* @author carlan
*/
@SuppressWarnings({"rawtypes", "unchecked"})
public class SafetyClaimPatternHandler
extends NamedCommentedModelElementHandlerBase<SafetyClaimPattern> {
/** {@inheritDoc} */
@Override
protected String getPluginId() {
return PLUGIN_ID;
}
/** {@inheritDoc} */
@Override
protected String getIconPath(SafetyClaimPattern element) {
return "icons/claim.png";
}
/** {@inheritDoc} */
@Override
public List<EObject> getSubnodes(SafetyClaimPattern element) {
return (List)element.getContainedElements();
}
}
/*-------------------------------------------------------------------------+
| Copyright 2013 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.af3.safetycases.ui.handler;
import static org.fortiss.af3.safetycases.ui.AF3SafetyCasesUIActivator.PLUGIN_ID;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.requirementspatterns.model.SafetyClaimPatternsCollection;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.NamedCommentedModelElementHandlerBase;
/**
* {@link IModelElementHandler} for {@link SafetyClaimPatternsCollection}.
*
* @author carlan
*/
@SuppressWarnings({"rawtypes", "unchecked"})
public class SafetyClaimPatternsCollectionHandler
extends NamedCommentedModelElementHandlerBase<SafetyClaimPatternsCollection> {
/** {@inheritDoc} */
@Override
protected String getPluginId() {
return PLUGIN_ID;
}
/** {@inheritDoc} */
@Override
protected String getIconPath(SafetyClaimPatternsCollection element) {
return "icons/patterns.png";
}
/** {@inheritDoc} */
@Override
public List<EObject> getSubnodes(SafetyClaimPatternsCollection element) {
return (List)element.getContainedElements();
}
}
/*-------------------------------------------------------------------------+
| Copyright 2013 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.af3.safetycases.ui.handler;
import static org.fortiss.af3.safetycases.ui.AF3SafetyCasesUIActivator.PLUGIN_ID;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.requirementspatterns.model.PatternsDatabase;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.NamedCommentedModelElementHandlerBase;
/**
* {@link IModelElementHandler} for {@link PatternsDatabase}.
*
* @author carlan
*/
public class SafetyClaimPatternsDatabaseHandler
extends NamedCommentedModelElementHandlerBase<PatternsDatabase> {
/** {@inheritDoc} */
@Override
protected String getPluginId() {
return PLUGIN_ID;
}
/** {@inheritDoc} */
@Override
protected String getIconPath(PatternsDatabase element) {
return "icons/patterns.png";
}
/** {@inheritDoc} */
@SuppressWarnings({"unchecked", "rawtypes"})
@Override
public List<EObject> getSubnodes(PatternsDatabase element) {
return (List)element.getContainedElements();
}
}
/*-------------------------------------------------------------------------+
| Copyright 2013 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.af3.safetycases.ui.handler;
import static org.fortiss.af3.safetycases.ui.AF3SafetyCasesUIActivator.PLUGIN_ID;
import java.util.List;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.requirementspatterns.model.WordAndObjectType;
import org.fortiss.tooling.kernel.ui.extension.IModelElementHandler;
import org.fortiss.tooling.kernel.ui.extension.base.NamedCommentedModelElementHandlerBase;
/**
* {@link IModelElementHandler} for {@link WordAndObjectType}.
*
* @author carlan
*/
@SuppressWarnings({"rawtypes", "unchecked"})
public class WordAndObjectTypeHandler
extends NamedCommentedModelElementHandlerBase<WordAndObjectType> {
/** {@inheritDoc} */
@Override
protected String getPluginId() {
return PLUGIN_ID;
}
/** {@inheritDoc} */
@Override
protected String getIconPath(WordAndObjectType element) {
return "icons/word.png";
}
/** {@inheritDoc} */
@Override
public List<EObject> getSubnodes(WordAndObjectType element) {
return (List)element.getContainedElements();
}
}
PrototypeProvider.java b5c6caca89d864dc1a2f22816da01f9dd2fa6e73 YELLOW
PrototypeProvider.java b5c6caca89d864dc1a2f22816da01f9dd2fa6e73 GREEN
AF3SelectionDialogUtils.java 606c377620ecf8902101585cf60fa8117397bf30 GREEN
DropdownDialog.java 1ec9b26db0e5c2cf40f1761de7bb9a0e3b1b1355 GREEN
GSNSelectionDialogUtils.java e088ec2d2e58a40cae8f70ba7b91ba55682fedde YELLOW
GSNSelectionDialogUtils.java e088ec2d2e58a40cae8f70ba7b91ba55682fedde GREEN
InstantiationOfGSNElementsUtils.java 17c317ebdf5b1ba3e98df37622a519d07c444ac4 GREEN
MaintenanceUtils.java 6666dea44eb6784c9f23c0c549bd6eada1eb1e17 GREEN
MultiPageWizard.java a901e2eb4967e3663b71a96cb22948283c200c2c GREEN
......
......@@ -25,10 +25,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.fortiss.af3.allocation;visibility:=reexport,
org.eclipse.jface;bundle-version="3.9.1",
org.fortiss.af3.mode;bundle-version="2.17.0";visibility:=reexport
Export-Package: org.fortiss.af3.requirementspatterns.model,
org.fortiss.af3.requirementspatterns.model.impl,
org.fortiss.af3.requirementspatterns.model.util,
org.fortiss.af3.requirementspatterns.utils,
Export-Package:
org.fortiss.af3.safetyargumentationpackage.model,
org.fortiss.af3.safetyargumentationpackage.model.impl,
org.fortiss.af3.safetyargumentationpackage.model.util,
......
......@@ -113,7 +113,6 @@
<genClasses ecoreClass="safetycases.ecore#//AwayContext"/>
<genClasses ecoreClass="safetycases.ecore#//ContractModule"/>
<genClasses ecoreClass="safetycases.ecore#//ArgumentModule">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute safetycases.ecore#//ArgumentModule/safetyArgumentType"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute safetycases.ecore#//ArgumentModule/showQuantitativeEvaluation"/>
<genOperations ecoreOperation="safetycases.ecore#//ArgumentModule/getAddressedGoals"
body="return org.fortiss.tooling.kernel.utils.EcoreUtils.pickInstanceOf(&#xD;&#xA;&#x9;&#x9;&#x9;&#x9;Goal.class, getContainedElements());"/>
......
......@@ -6,7 +6,7 @@ AwayGoalCompositor.java 4432c8934746be63dc16374bd923a4e9f3b6d1d0 GREEN
AwayGoalInContextOfConnectionCompositor.java 49daac2f7b70f9ceb708cb27a78fc190bf3293d2 GREEN
AwayGoalSupportedByConnectionCompositor.java 05735ae0a9c07c05a7008319fca34bd186e0e8c9 GREEN
AwaySolutionCompositor.java cce1a2056192a8f2c71b5af4dd52ede2982f94d2 GREEN
ConnectionCompositor.java c5bb71ad4b60ab6190f0d358fe6106d89c87a498 YELLOW
ConnectionCompositor.java 4752ddaf82a000079b223651796299907458ccec GREEN
ContextCompositor.java 0540ee7716235bb96fc48c37ff618d4117a446f5 GREEN
ContractModuleCompositor.java ac85daf1d00003404bf6ba1d9577590c5df92948 GREEN
GoalCompositor.java fde0cc8da148f5ad65263c999d35507b443697ac GREEN
......
......@@ -66,8 +66,8 @@ public class ConnectionCompositor extends
topElement.prepareIDs(connection);
}
parent.getConnections().add(connection);
// This variable enforces the creation of a new allowed connection with the direction of
// arrow of the connection is the appropriate one.
// This variable enforces the creation of a new allowed connection
// with the direction of arrow of the connection is the appropriate one.
boolean swap = false;
if(source instanceof EntryConnectorBase) {
if(target instanceof EntryConnectorBase) {
......
LibraryModuleUtils.java c362ae13c59a8d76cff5dabf8ec11ac024105823 GREEN
ModuleLibraryModelElementFactory.java 5d882790170eb0ebc8be493e05d675e007cc5cca GREEN
SafetyCasesAnalysisUtils.java 6183d6b677046dfeb7d2cf648a9ebeb6b6946938 YELLOW
SafetyCasesAnalysisUtils.java 9cd57ec5f82d420b3f4a25418bc20c48e706827a GREEN
SafetyCasesModelElementFactory.java 264e24056a3fd782e81dc02870173fda63a49377 GREEN
SafetyCasesModellingUtils.java 8e3d8401066a59d17c03c169e25597e9396866f8 GREEN
SafetyCasesUtils.java be6c08065b38250bd80d9e892fd80bb0916165a0 GREEN
......@@ -64,6 +64,8 @@ public class SafetyCasesAnalysisUtils {
}
/**
* This method checks if there exists a connection between two {@link ArgumentElement}s.
*
* @param source
* The source of the connection.
* @param target
......
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