Commit 069407fa authored by Hernan Ponce de Leon's avatar Hernan Ponce de Leon
Browse files

Coding check-list

parent 787f2303
......@@ -51,7 +51,7 @@ import org.fortiss.tooling.kernel.ui.extension.base.EObjectActionBase;
* @author uden
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: E8A1BCE0B18E908BAD95AF8EFF8E865D
* @ConQAT.Rating YELLOW Hash: 86D01EDE5A0494DA168558FDBF6E8D4D
*/
public final class ConnectExternalRelationToComponentAction extends
EObjectActionBase<ExternalRelation> {
......@@ -86,15 +86,16 @@ public final class ConnectExternalRelationToComponentAction extends
List<DataDictionary> dataDics = new BasicEList<DataDictionary>();
if(arch == null) {
if(arch == null || arch.isEmpty()) {
openError(shell, "Component Architecture", "Cannot find a Component Architecture!");
return;
} else {
FileProject parent = (FileProject)EcoreUtil.getRootContainer(arch.get(0));
FileProject root = (FileProject)EcoreUtil.getRootContainer(parent);
dataDics = pickInstanceOf(DataDictionary.class, root.getRootElements());
}
/** The if above checks that the list is not empty. */
FileProject parent = (FileProject)EcoreUtil.getRootContainer(arch.get(0));
FileProject root = (FileProject)EcoreUtil.getRootContainer(parent);
dataDics = pickInstanceOf(DataDictionary.class, root.getRootElements());
Component selected = null;
ExternalRelationSpecification spec = getTarget().getExternalRelationSpecification();
......
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