本文整理了Java中net.sf.taverna.t2.workflowmodel.Edit.isApplied()
方法的一些代码示例,展示了Edit.isApplied()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Edit.isApplied()
方法的具体详情如下:
包路径:net.sf.taverna.t2.workflowmodel.Edit
类名称:Edit
方法名:isApplied
[英]Has the edit been applied yet?
[中]编辑是否已应用?
代码示例来源:origin: net.sf.taverna.t2.activities/biomoby-activity-ui
@Override
protected void undoEditAction(DataflowImpl dataflow) {
if (linkEdit!=null && linkEdit.isApplied())
linkEdit.undo();
if (compoundEdit!=null && compoundEdit.isApplied())
compoundEdit.undo();
if (upstreamObjectEdit!=null && upstreamObjectEdit.isApplied()) {
upstreamObjectEdit.undo();
}
}
代码示例来源:origin: net.sf.taverna.t2.ui-activities/biomoby-activity-ui
@Override
protected void undoEditAction(DataflowImpl dataflow) {
if (linkEdit!=null && linkEdit.isApplied())
linkEdit.undo();
if (compoundEdit!=null && compoundEdit.isApplied())
compoundEdit.undo();
if (upstreamObjectEdit!=null && upstreamObjectEdit.isApplied()) {
upstreamObjectEdit.undo();
}
}
代码示例来源:origin: net.sf.taverna.t2.ui-activities/biomoby-activity-ui
@Override
protected void undoEditAction(DataflowImpl dataflow) {
if (subEdits != null && subEdits.size() > 0) {
for (int i = subEdits.size() - 1; i >= 0; i--) {
Edit<?> edit = subEdits.get(i);
if (edit.isApplied())
edit.undo();
}
}
}
代码示例来源:origin: net.sf.taverna.t2.activities/biomoby-activity-ui
@Override
protected void undoEditAction(DataflowImpl subjectImpl) {
if (linkEdit != null && linkEdit.isApplied())
linkEdit.undo();
if (compoundEdit != null && compoundEdit.isApplied())
compoundEdit.undo();
}
代码示例来源:origin: net.sf.taverna.t2.activities/biomoby-activity-ui
@Override
protected void undoEditAction(DataflowImpl subjectImpl) {
if (linkEdit!=null && linkEdit.isApplied())
linkEdit.undo();
if (compoundEdit!=null && compoundEdit.isApplied())
compoundEdit.undo();
}
代码示例来源:origin: net.sf.taverna.t2.ui-activities/biomoby-activity-ui
@Override
protected void undoEditAction(DataflowImpl subjectImpl) {
if (linkEdit != null && linkEdit.isApplied())
linkEdit.undo();
if (compoundEdit != null && compoundEdit.isApplied())
compoundEdit.undo();
}
代码示例来源:origin: net.sf.taverna.t2.ui-activities/biomoby-activity-ui
@Override
protected void undoEditAction(DataflowImpl subjectImpl) {
if (linkEdit!=null && linkEdit.isApplied())
linkEdit.undo();
if (compoundEdit!=null && compoundEdit.isApplied())
compoundEdit.undo();
}
代码示例来源:origin: net.sf.taverna.t2.activities/biomoby-activity-ui
@Override
protected void undoEditAction(DataflowImpl dataflow) {
if (linkEdits != null && linkEdits.size() > 0) {
for (int i = linkEdits.size() - 1; i >= 0; i--) {
Edit<?> edit = linkEdits.get(i);
if (edit.isApplied())
edit.undo();
}
}
if (compoundEdits != null && compoundEdits.size() > 0) {
for (int i = compoundEdits.size() - 1; i >= 0; i--) {
Edit<?> edit = compoundEdits.get(i);
if (edit.isApplied())
edit.undo();
}
}
}
代码示例来源:origin: net.sf.taverna.t2.activities/wsdl-activity
@Override
public void undo() {
if (!applied) {
throw new RuntimeException(
"Attempt to undo edit that was never applied");
}
if (linkUpEdit.isApplied())
linkUpEdit.undo();
if (compoundEdit1.isApplied())
compoundEdit1.undo();
applied = false;
}
代码示例来源:origin: net.sf.taverna.cagrid/cagrid-activity
@Override
protected void undoEditAction(DataflowImpl dataflow) {
if (linkUpEdit.isApplied())
linkUpEdit.undo();
if (compoundEdit1.isApplied())
compoundEdit1.undo();
}
代码示例来源:origin: net.sf.taverna.t2.workbench/edits-impl
public void notify(Observable<EditManagerEvent> sender,
EditManagerEvent message) throws Exception {
events.add(message);
if (message instanceof DataflowEditEvent) {
DataflowEditEvent dataflowEdit = (DataflowEditEvent) message;
assertTrue("Edit was not applied on edit event", dataflowEdit
.getEdit().isApplied());
} else if (message instanceof DataFlowUndoEvent) {
DataFlowUndoEvent dataflowUndo = (DataFlowUndoEvent) message;
assertFalse("Edit was applied on undo event", dataflowUndo
.getEdit().isApplied());
} else if (message instanceof DataFlowRedoEvent) {
DataFlowRedoEvent dataflowEdit = (DataFlowRedoEvent) message;
assertTrue("Edit was not applied on edit event", dataflowEdit
.getEdit().isApplied());
} else {
fail("Unknown event: " + message);
}
}
}
代码示例来源:origin: net.sf.taverna.t2.workbench/edits-impl
@Test
public void addProcessor() throws Exception {
EditManager editManager = EditManager.getInstance();
editManager.addObserver(editManagerObserver);
Edits edits = editManager.getEdits();
Edit<Dataflow> edit = edits.getAddProcessorEdit(dataflow, processor);
assertFalse("Edit was already applied", edit.isApplied());
assertTrue("Did already add processor", dataflow.getProcessors()
.isEmpty());
editManager.doDataflowEdit(dataflow, edit);
assertTrue("Edit was not applied", edit.isApplied());
assertEquals("Did not add processor", processor, dataflow
.getProcessors().get(0));
// Should have received the edit event
assertEquals("Incorrect number of events", 1,
editManagerObserver.events.size());
EditManagerEvent event = editManagerObserver.events.get(0);
assertTrue("Event was not a DataflowEditEvent",
event instanceof DataflowEditEvent);
DataflowEditEvent dataEditEvent = (DataflowEditEvent) event;
assertEquals("Event did not have correct dataflow", dataflow,
dataEditEvent.getDataFlow());
assertEquals("Event did not have correct edit", edit, dataEditEvent
.getEdit());
}
代码示例来源:origin: net.sf.taverna.t2.workbench/edits-impl
@Test
public void undoAddProcessor() throws Exception {
EditManager editManager = EditManager.getInstance();
editManager.addObserver(editManagerObserver);
Edits edits = editManager.getEdits();
Edit<Dataflow> edit = edits.getAddProcessorEdit(dataflow, processor);
editManager.doDataflowEdit(dataflow, edit);
assertFalse("Did not add processor", dataflow.getProcessors().isEmpty());
editManager.undoDataflowEdit(dataflow);
assertTrue("Did not undo add processor", dataflow.getProcessors()
.isEmpty());
// Should have received the undo event
assertEquals("Incorrect number of events", 2,
editManagerObserver.events.size());
EditManagerEvent event = editManagerObserver.events.get(1);
assertTrue("Event was not a DataflowEditEvent",
event instanceof DataFlowUndoEvent);
DataFlowUndoEvent dataEditEvent = (DataFlowUndoEvent) event;
assertEquals("Event did not have correct dataflow", dataflow,
dataEditEvent.getDataFlow());
assertEquals("Event did not have correct edit", edit, dataEditEvent
.getEdit());
assertFalse("Edit was still applied", edit.isApplied());
}
内容来源于网络,如有侵权,请联系作者删除!