use of org.knime.workbench.ui.wizards.workflowgroup.WorkflowGroupSelectionDialog in project knime-core by knime.
the class NewProjectWizardPage method handleBrowseButton.
private void handleBrowseButton() {
WorkflowGroupSelectionDialog dialog = new WorkflowGroupSelectionDialog(getShell());
dialog.setInitialSelection(new Path(m_destinationUI.getText()));
if (dialog.open() == IDialogConstants.OK_ID) {
IContainer c = dialog.getSelectedWorkflowGroup();
m_destinationUI.setText(c.getFullPath().toString());
}
dialogChanged();
}
use of org.knime.workbench.ui.wizards.workflowgroup.WorkflowGroupSelectionDialog in project knime-core by knime.
the class WorkflowImportSelectionPage method handleWorkflowGroupBrowseButtonPressed.
private void handleWorkflowGroupBrowseButtonPressed() {
// get the value from the text field
String wfGroupPath = m_targetTextUI.getText();
IPath initialPath = ResourcesPlugin.getWorkspace().getRoot().getFullPath();
// if not yet set take workflow root
if (wfGroupPath != null && !wfGroupPath.trim().isEmpty()) {
initialPath = new Path(wfGroupPath);
}
WorkflowGroupSelectionDialog dialog = new WorkflowGroupSelectionDialog(getShell());
dialog.setInitialSelection(initialPath);
int returnCode = dialog.open();
if (returnCode == IDialogConstants.OK_ID) {
// set the newly selected workflow group as destination
IContainer target = dialog.getSelectedWorkflowGroup();
if (target != null && !target.equals(ResourcesPlugin.getWorkspace().getRoot())) {
m_targetTextUI.setText(target.getFullPath().toString());
} else {
m_targetTextUI.setText(Path.ROOT.toString());
}
}
validateWorkflows();
}
Aggregations