use of org.knime.core.node.workflow.ConnectionContainer in project knime-core by knime.
the class DeleteCommand method execute.
/**
* {@inheritDoc}
*/
@Override
public void execute() {
WorkflowManager hostWFM = getHostWFM();
// removed.
if (m_nodeIDs.length > 0 || m_annotations.length > 0) {
WorkflowCopyContent.Builder content = WorkflowCopyContent.builder();
content.setNodeIDs(m_nodeIDs);
content.setAnnotation(m_annotations);
m_undoPersitor = hostWFM.copy(true, content.build());
}
for (WorkflowAnnotation anno : m_annotations) {
hostWFM.removeAnnotation(anno);
}
for (NodeID id : m_nodeIDs) {
hostWFM.removeNode(id);
}
for (ConnectionContainer cc : m_connections) {
hostWFM.removeConnection(cc);
}
}
use of org.knime.core.node.workflow.ConnectionContainer in project knime-core by knime.
the class NewBendpointDeleteCommand method redo.
/**
* {@inheritDoc}
*/
@Override
public void redo() {
ConnectionContainer connection = getConnectionContainer();
ConnectionUIInformation uiInfo = getUIInfo(connection);
uiInfo = ConnectionUIInformation.builder(uiInfo).removeBendpoint(m_index).build();
// issue notification
connection.setUIInfo(uiInfo);
}
use of org.knime.core.node.workflow.ConnectionContainer in project knime-core by knime.
the class NewBendpointDeleteCommand method undo.
/**
* {@inheritDoc}
*/
@Override
public void undo() {
ConnectionContainer connection = getConnectionContainer();
ConnectionUIInformation uiInfo = getUIInfo(connection);
uiInfo = ConnectionUIInformation.builder(uiInfo).addBendpoint(m_point[0], m_point[1], m_index).build();
// issue notification
connection.setUIInfo(uiInfo);
}
use of org.knime.core.node.workflow.ConnectionContainer in project knime-core by knime.
the class NewBendpointCreateCommand method undo.
/**
* {@inheritDoc}
*/
@Override
public void undo() {
ConnectionContainer connection = getConnectionContainer();
ConnectionUIInformation uiInfo = getUIInfo(connection);
uiInfo = ConnectionUIInformation.builder(uiInfo).removeBendpoint(m_index).build();
// we need this to fire some update event up
connection.setUIInfo(uiInfo);
}
use of org.knime.core.node.workflow.ConnectionContainer in project knime-core by knime.
the class NewBendpointCreateCommand method execute.
/**
* {@inheritDoc}
*/
@Override
public void execute() {
ConnectionContainer connection = getConnectionContainer();
ConnectionUIInformation uiInfo = getUIInfo(connection);
Point location = m_location.getCopy();
WorkflowEditor.adaptZoom(m_zoomManager, location, true);
ConnectionUIInformation.Builder uiInfoBuilder = ConnectionUIInformation.builder(uiInfo).addBendpoint(location.x, location.y, m_index);
// we need this to fire some update event up
connection.setUIInfo(uiInfoBuilder.build());
}
Aggregations