Commit 405435d5 authored by Tatiana Chuprina's avatar Tatiana Chuprina
Browse files

RED

refs 3122
parent e6c2764a
......@@ -70,7 +70,8 @@ public class AF3MiraActivator extends Plugin {
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
// TODO (TC, 25) - all IConstraintService.getInstance()
// TODO duplicated IConstraintService.getInstance().registerConstraint
RelationTypeService rts = (RelationTypeService)IRelationTypeService.getInstance();
rts.initializeService();
rts.startService();
......
......@@ -63,13 +63,16 @@ public class SignalsContainerCompositor implements IElementCompositor<ISignalsCo
IElementCompositionContext context) {
if(contained instanceof Signal) {
Signal signal = (Signal)contained;
// TODO (TC, 25)
List<String> containerNames =
container.getSignals().stream().map(c -> c.getName().toLowerCase())
.collect(Collectors.toList());
if(containerNames.contains(signal.getName().toLowerCase())) {
// TODO (TC, 25)
Status status =
new Status(ERROR, ToolingBaseUIActivator.PLUGIN_ID, 0,
"A signal with this name already exists.", null);
// TODO (TC, 25)
openError(Display.getCurrent().getActiveShell(), "Error", null, status);
return 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