diff --git a/AlgebraicDataflowArchitectureModel/src/application/editor/InputEventCellEditor.java b/AlgebraicDataflowArchitectureModel/src/application/editor/InputEventCellEditor.java index b5c491f..e4d0b34 100644 --- a/AlgebraicDataflowArchitectureModel/src/application/editor/InputEventCellEditor.java +++ b/AlgebraicDataflowArchitectureModel/src/application/editor/InputEventCellEditor.java @@ -107,12 +107,14 @@ ArrayList eventChs = new ArrayList<>();//iOchannelList ArrayList messages = new ArrayList<>();//ADLmessage ArrayList eventMessages = new ArrayList<>();//messageList + ResourcePath eventResPath = null; for(Channel ch : simulator.getModel().getIOChannels()) {//all channel if(((DataTransferChannel)ch).getInputResources().size()== 0) {//ioch Or normalch for(ChannelMember out: ((DataTransferChannel)ch).getOutputChannelMembers()) { ResourcePath resPath = out.getResource(); if(resId.isInstanceOf(resPath)) {//account.uid == acounts.123 + eventResPath = resPath; eventChs.add(((DataTransferChannel)ch)); String message = null; Expression mesExp = out.getStateTransition().getMessageExpression();//sync(a,b) @@ -150,8 +152,8 @@ Parser parser = new Parser(stream); stream.addLine(textArea.getText()); Expression eventMessage = parser.parseTerm(stream,simulator.getModel()); - - Event newEvent = new Event(eventChs.get(0), eventMessage, resId, simulator.getCurState().getResource(resId)); + + Event newEvent = new Event(eventChs.get(0), eventMessage, eventResPath, simulator.getCurState().getResource(resId)); simulator.transition(newEvent); constructNextSimulateGraph(simulator.getCurState().getRootResources(), simulator.getModel(),simulator.getModel().getDataFlowGraph(), graph);