本文整理汇总了Java中org.pentaho.di.ui.spoon.Spoon.refreshTree方法的典型用法代码示例。如果您正苦于以下问题:Java Spoon.refreshTree方法的具体用法?Java Spoon.refreshTree怎么用?Java Spoon.refreshTree使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.ui.spoon.Spoon
的用法示例。
在下文中一共展示了Spoon.refreshTree方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: editProperties
import org.pentaho.di.ui.spoon.Spoon; //导入方法依赖的package包/类
public static boolean editProperties(JobMeta jobMeta, Spoon spoon, Repository rep, boolean allowDirectoryChange) {
if (jobMeta == null)
return false;
JobDialog jd = new JobDialog(spoon.getShell(), SWT.NONE, jobMeta, rep);
jd.setDirectoryChangeAllowed(allowDirectoryChange);
JobMeta ji = jd.open();
// In this case, load shared objects
//
if (jd.isSharedObjectsFileChanged()) {
try {
SharedObjects sharedObjects = jobMeta.readSharedObjects(rep);
spoon.sharedObjectsFileMap.put(sharedObjects.getFilename(), sharedObjects);
} catch (Exception e) {
new ErrorDialog(spoon.getShell(), Messages.getString("Spoon.Dialog.ErrorReadingSharedObjects.Title"),
Messages.getString("Spoon.Dialog.ErrorReadingSharedObjects.Message", spoon.delegates.tabs
.makeJobGraphTabName(jobMeta)), e);
}
}
// If we added properties, add them to the variables too, so that they appear in the CTRL-SPACE variable completion.
//
spoon.setParametersAsVariablesInUI(jobMeta, jobMeta);
if (jd.isSharedObjectsFileChanged() || ji != null) {
spoon.refreshTree();
spoon.delegates.tabs.renameTabs(); // cheap operation, might as will do it anyway
}
spoon.setShellText();
return ji != null;
}
示例2: editProperties
import org.pentaho.di.ui.spoon.Spoon; //导入方法依赖的package包/类
public static boolean editProperties(TransMeta transMeta, Spoon spoon, Repository rep, boolean allowDirectoryChange,
TransDialog.Tabs currentTab) {
if (transMeta == null)
return false;
TransDialog tid = new TransDialog(spoon.getShell(), SWT.NONE, transMeta, rep, currentTab);
tid.setDirectoryChangeAllowed(allowDirectoryChange);
TransMeta ti = tid.open();
// Load shared objects
//
if (tid.isSharedObjectsFileChanged() || ti != null) {
try {
SharedObjects sharedObjects = transMeta.readSharedObjects(rep);
spoon.sharedObjectsFileMap.put(sharedObjects.getFilename(), sharedObjects);
} catch (KettleException e) {
new ErrorDialog(spoon.getShell(), Messages.getString("Spoon.Dialog.ErrorReadingSharedObjects.Title"),
Messages.getString("Spoon.Dialog.ErrorReadingSharedObjects.Message", spoon.makeTransGraphTabName(transMeta)), e);
}
// If we added properties, add them to the variables too, so that they appear in the CTRL-SPACE variable completion.
//
spoon.setParametersAsVariablesInUI(transMeta, transMeta);
spoon.refreshTree();
spoon.delegates.tabs.renameTabs(); // cheap operation, might as will do it anyway
}
spoon.setShellText();
return ti != null;
}
示例3: editProperties
import org.pentaho.di.ui.spoon.Spoon; //导入方法依赖的package包/类
public static boolean editProperties(JobMeta jobMeta, Spoon spoon, Repository rep, boolean allowDirectoryChange) {
if (jobMeta == null)
return false;
JobDialog jd = new JobDialog(spoon.getShell(), SWT.NONE, jobMeta, rep);
jd.setDirectoryChangeAllowed(allowDirectoryChange);
JobMeta ji = jd.open();
// In this case, load shared objects
//
if (jd.isSharedObjectsFileChanged()) {
try {
SharedObjects sharedObjects = rep!=null ? rep.readJobMetaSharedObjects(jobMeta) : jobMeta.readSharedObjects();
spoon.sharedObjectsFileMap.put(sharedObjects.getFilename(), sharedObjects);
} catch (Exception e) {
new ErrorDialog(spoon.getShell(), BaseMessages.getString(PKG, "Spoon.Dialog.ErrorReadingSharedObjects.Title"),
BaseMessages.getString(PKG, "Spoon.Dialog.ErrorReadingSharedObjects.Message", spoon.delegates.tabs.makeTabName(jobMeta, true)), e);
}
}
// If we added properties, add them to the variables too, so that they appear in the CTRL-SPACE variable completion.
//
spoon.setParametersAsVariablesInUI(jobMeta, jobMeta);
if (jd.isSharedObjectsFileChanged() || ji != null) {
spoon.refreshTree();
spoon.delegates.tabs.renameTabs(); // cheap operation, might as will do it anyway
}
spoon.setShellText();
return ji != null;
}
示例4: editProperties
import org.pentaho.di.ui.spoon.Spoon; //导入方法依赖的package包/类
public static boolean editProperties(TransMeta transMeta, Spoon spoon, Repository rep, boolean allowDirectoryChange,
TransDialog.Tabs currentTab) {
if (transMeta == null)
return false;
TransDialog tid = new TransDialog(spoon.getShell(), SWT.NONE, transMeta, rep, currentTab);
tid.setDirectoryChangeAllowed(allowDirectoryChange);
TransMeta ti = tid.open();
// Load shared objects
//
if (tid.isSharedObjectsFileChanged()) {
try {
SharedObjects sharedObjects = rep!=null ? rep.readTransSharedObjects(transMeta) : transMeta.readSharedObjects();
spoon.sharedObjectsFileMap.put(sharedObjects.getFilename(), sharedObjects);
} catch (KettleException e) {
new ErrorDialog(spoon.getShell(), BaseMessages.getString(PKG, "Spoon.Dialog.ErrorReadingSharedObjects.Title"), //$NON-NLS-1$
BaseMessages.getString(PKG, "Spoon.Dialog.ErrorReadingSharedObjects.Message", spoon.makeTabName(transMeta, true)), e); //$NON-NLS-1$
}
// If we added properties, add them to the variables too, so that they appear in the CTRL-SPACE variable completion.
//
spoon.setParametersAsVariablesInUI(transMeta, transMeta);
spoon.refreshTree();
spoon.delegates.tabs.renameTabs(); // cheap operation, might as will do it anyway
}
spoon.setShellText();
return ti != null;
}
示例5: refreshSpoon
import org.pentaho.di.ui.spoon.Spoon; //导入方法依赖的package包/类
/**
* Refreshes Spoons plugin registry, core objects and some UI things.
*
* @throws KettleException
*/
private static void refreshSpoon() throws KettleException {
PluginRegistry.init();
Spoon spoon = Spoon.getInstance();
spoon.refreshCoreObjects();
spoon.refreshTree();
spoon.refreshGraph();
spoon.enableMenus();
GUIResource.getInstance().reload();
spoon.selectionFilter.setText(spoon.selectionFilter.getText());
}
示例6: closeETLTabs
import org.pentaho.di.ui.spoon.Spoon; //导入方法依赖的package包/类
/**
* Close all transformation ETL tabs, possibly saving them in the process.
*
* @param save Flag indicating if the transformation tabs' content should be saved ({@code true}) or discarded ({@code false})
* @return {@code true} if the operation completed successfully; {@code false} otherwise
* @throws KettleException Error saving a transformation tab
*/
private boolean closeETLTabs(boolean save) throws KettleException {
Spoon spoonInstance = Spoon.getInstance();
int numTabs = spoonInstance.delegates.tabs.getTabs().size();
for (int i = numTabs - 1; i >= 0; i--) {
spoonInstance.tabfolder.setSelected(i);
// Logic copied directly out of SpoonTabsDelegate.tabClose(). That needs to be refactored badly.
Object control = spoonInstance.tabfolder.getSelected().getControl();
// Save the changes if we're requested to and the control object is a tab item
if (control instanceof TransGraph) {
TransMeta transMeta = ((TransGraph) control).getManagedObject();
if (!openedFromInstaview(transMeta)) {
// Don't save or close tabs we didn't open
continue;
}
if (save) {
TabItemInterface tabItem = (TabItemInterface) control;
if (!tabItem.applyChanges()) {
return false;
}
}
spoonInstance.delegates.trans.closeTransformation(transMeta);
spoonInstance.refreshTree();
}
// we don't care about any other ETL tab types
}
return true;
}
示例7: editProperties
import org.pentaho.di.ui.spoon.Spoon; //导入方法依赖的package包/类
public static boolean editProperties( JobMeta jobMeta, Spoon spoon, Repository rep, boolean allowDirectoryChange ) {
if ( jobMeta == null ) {
return false;
}
JobDialog jd = new JobDialog( spoon.getShell(), SWT.NONE, jobMeta, rep );
jd.setDirectoryChangeAllowed( allowDirectoryChange );
JobMeta ji = jd.open();
// In this case, load shared objects
//
if ( jd.isSharedObjectsFileChanged() ) {
try {
SharedObjects sharedObjects =
rep != null ? rep.readJobMetaSharedObjects( jobMeta ) : jobMeta.readSharedObjects();
spoon.sharedObjectsFileMap.put( sharedObjects.getFilename(), sharedObjects );
} catch ( Exception e ) {
new ErrorDialog( spoon.getShell(),
BaseMessages.getString( PKG, "Spoon.Dialog.ErrorReadingSharedObjects.Title" ),
BaseMessages.getString( PKG, "Spoon.Dialog.ErrorReadingSharedObjects.Message", spoon.delegates.tabs.makeTabName( jobMeta, true ) ), e );
}
}
// If we added properties, add them to the variables too, so that they appear in the CTRL-SPACE variable completion.
//
spoon.setParametersAsVariablesInUI( jobMeta, jobMeta );
if ( jd.isSharedObjectsFileChanged() || ji != null ) {
spoon.refreshTree();
spoon.delegates.tabs.renameTabs(); // cheap operation, might as will do it anyway
}
spoon.setShellText();
return ji != null;
}
示例8: editProperties
import org.pentaho.di.ui.spoon.Spoon; //导入方法依赖的package包/类
public static boolean editProperties( TransMeta transMeta, Spoon spoon, Repository rep, boolean allowDirectoryChange,
TransDialog.Tabs currentTab ) {
if ( transMeta == null ) {
return false;
}
TransDialog tid = new TransDialog( spoon.getShell(), SWT.NONE, transMeta, rep, currentTab );
tid.setDirectoryChangeAllowed( allowDirectoryChange );
TransMeta ti = tid.open();
// Load shared objects
//
if ( tid.isSharedObjectsFileChanged() ) {
try {
SharedObjects sharedObjects =
rep != null ? rep.readTransSharedObjects( transMeta ) : transMeta.readSharedObjects();
spoon.sharedObjectsFileMap.put( sharedObjects.getFilename(), sharedObjects );
} catch ( KettleException e ) {
// CHECKSTYLE:LineLength:OFF
new ErrorDialog( spoon.getShell(),
BaseMessages.getString( PKG, "Spoon.Dialog.ErrorReadingSharedObjects.Title" ), BaseMessages.getString( PKG,
"Spoon.Dialog.ErrorReadingSharedObjects.Message", spoon.makeTabName( transMeta, true ) ), e );
}
// If we added properties, add them to the variables too, so that they appear in the CTRL-SPACE variable
// completion.
//
spoon.setParametersAsVariablesInUI( transMeta, transMeta );
spoon.refreshTree();
spoon.delegates.tabs.renameTabs(); // cheap operation, might as will do it anyway
}
spoon.setShellText();
return ti != null;
}