当前位置: 首页>>代码示例>>Java>>正文


Java TransAction.getType方法代码示例

本文整理汇总了Java中org.pentaho.di.core.undo.TransAction.getType方法的典型用法代码示例。如果您正苦于以下问题:Java TransAction.getType方法的具体用法?Java TransAction.getType怎么用?Java TransAction.getType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.pentaho.di.core.undo.TransAction的用法示例。


在下文中一共展示了TransAction.getType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: undoAction

import org.pentaho.di.core.undo.TransAction; //导入方法依赖的package包/类
public void undoAction( UndoInterface undoInterface ) {
  if ( undoInterface == null ) {
    return;
  }

  TransAction ta = undoInterface.previousUndo();
  if ( ta == null ) {
    return;
  }

  setUndoMenu( undoInterface ); // something changed: change the menu

  if ( undoInterface instanceof TransMeta ) {
    delegates.trans.undoTransformationAction( (TransMeta) undoInterface, ta );
    if ( ta.getType() == TransAction.TYPE_ACTION_DELETE_STEP ) {
      setUndoMenu( undoInterface ); // something changed: change the menu
      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 ) {
      setUndoMenu( undoInterface ); // something changed: change the menu
      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();
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:48,代码来源:Spoon.java

示例2: redoAction

import org.pentaho.di.core.undo.TransAction; //导入方法依赖的package包/类
public void redoAction( UndoInterface undoInterface ) {
  if ( undoInterface == null ) {
    return;
  }

  TransAction ta = undoInterface.nextUndo();
  if ( ta == null ) {
    return;
  }

  setUndoMenu( undoInterface ); // something changed: change the menu

  if ( undoInterface instanceof TransMeta ) {
    delegates.trans.redoTransformationAction( (TransMeta) undoInterface, ta );
    if ( ta.getType() == TransAction.TYPE_ACTION_DELETE_HOP ) {
      setUndoMenu( undoInterface ); // something changed: change the menu
      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 ) {
      setUndoMenu( undoInterface ); // something changed: change the menu
      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();
  }
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:48,代码来源:Spoon.java


注:本文中的org.pentaho.di.core.undo.TransAction.getType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。