use of org.pentaho.di.core.undo.TransAction in project pentaho-kettle by pentaho.
the class Spoon method redoAction.
public void redoAction(UndoInterface undoInterface) {
if (undoInterface == null) {
return;
}
TransAction ta = undoInterface.nextUndo();
if (ta == null) {
return;
}
// something changed: change the menu
setUndoMenu(undoInterface);
if (undoInterface instanceof TransMeta) {
delegates.trans.redoTransformationAction((TransMeta) undoInterface, ta);
if (ta.getType() == TransAction.TYPE_ACTION_DELETE_HOP) {
// something changed: change the menu
setUndoMenu(undoInterface);
ta = undoInterface.viewNextUndo();
if (ta != null && ta.getType() == TransAction.TYPE_ACTION_DELETE_STEP) {
ta = undoInterface.nextUndo();
delegates.trans.redoTransformationAction((TransMeta) undoInterface, ta);
}
}
}
if (undoInterface instanceof JobMeta) {
delegates.jobs.redoJobAction((JobMeta) undoInterface, ta);
if (ta.getType() == TransAction.TYPE_ACTION_DELETE_JOB_HOP) {
// something changed: change the menu
setUndoMenu(undoInterface);
ta = undoInterface.viewNextUndo();
if (ta != null && ta.getType() == TransAction.TYPE_ACTION_DELETE_JOB_ENTRY) {
ta = undoInterface.nextUndo();
delegates.jobs.redoJobAction((JobMeta) undoInterface, ta);
}
}
}
// Put what we redo in focus
if (undoInterface instanceof TransMeta) {
TransGraph transGraph = delegates.trans.findTransGraphOfTransformation((TransMeta) undoInterface);
transGraph.forceFocus();
}
if (undoInterface instanceof JobMeta) {
JobGraph jobGraph = delegates.jobs.findJobGraphOfJob((JobMeta) undoInterface);
jobGraph.forceFocus();
}
}
use of org.pentaho.di.core.undo.TransAction in project pentaho-kettle by pentaho.
the class Spoon method undoAction.
public void undoAction(UndoInterface undoInterface) {
if (undoInterface == null) {
return;
}
TransAction ta = undoInterface.previousUndo();
if (ta == null) {
return;
}
// something changed: change the menu
setUndoMenu(undoInterface);
if (undoInterface instanceof TransMeta) {
delegates.trans.undoTransformationAction((TransMeta) undoInterface, ta);
if (ta.getType() == TransAction.TYPE_ACTION_DELETE_STEP) {
// something changed: change the menu
setUndoMenu(undoInterface);
handleSelectedStepOnUndo((TransMeta) undoInterface);
ta = undoInterface.viewPreviousUndo();
if (ta != null && ta.getType() == TransAction.TYPE_ACTION_DELETE_HOP) {
ta = undoInterface.previousUndo();
delegates.trans.undoTransformationAction((TransMeta) undoInterface, ta);
}
}
}
if (undoInterface instanceof JobMeta) {
delegates.jobs.undoJobAction((JobMeta) undoInterface, ta);
if (ta.getType() == TransAction.TYPE_ACTION_DELETE_JOB_ENTRY) {
// something changed: change the menu
setUndoMenu(undoInterface);
ta = undoInterface.viewPreviousUndo();
if (ta != null && ta.getType() == TransAction.TYPE_ACTION_DELETE_JOB_HOP) {
ta = undoInterface.previousUndo();
delegates.jobs.undoJobAction((JobMeta) undoInterface, ta);
}
}
}
// Put what we undo in focus
if (undoInterface instanceof TransMeta) {
TransGraph transGraph = delegates.trans.findTransGraphOfTransformation((TransMeta) undoInterface);
transGraph.forceFocus();
}
if (undoInterface instanceof JobMeta) {
JobGraph jobGraph = delegates.jobs.findJobGraphOfJob((JobMeta) undoInterface);
jobGraph.forceFocus();
}
}
Aggregations