Search in sources :

Example 1 with FunctionWizardPage

use of eu.esdihumboldt.hale.ui.function.generic.pages.FunctionWizardPage in project hale by halestudio.

the class AbstractGenericFunctionWizard method performFinish.

/**
 * @see Wizard#performFinish()
 */
@Override
public boolean performFinish() {
    ListMultimap<String, ParameterValue> parameters = ArrayListMultimap.create();
    resultCell.setTransformationParameters(parameters);
    // configure cell with all pages
    for (IWizardPage page : getPages()) if (page instanceof FunctionWizardPage)
        ((FunctionWizardPage) page).configureCell(resultCell);
    else if (page instanceof ParameterPage)
        parameters.putAll(((ParameterPage) page).getConfiguration());
    return true;
}
Also used : ParameterValue(eu.esdihumboldt.hale.common.align.model.ParameterValue) ParameterPage(eu.esdihumboldt.hale.ui.function.generic.pages.ParameterPage) GenericParameterPage(eu.esdihumboldt.hale.ui.function.generic.pages.GenericParameterPage) IWizardPage(org.eclipse.jface.wizard.IWizardPage) FunctionWizardPage(eu.esdihumboldt.hale.ui.function.generic.pages.FunctionWizardPage)

Example 2 with FunctionWizardPage

use of eu.esdihumboldt.hale.ui.function.generic.pages.FunctionWizardPage in project hale by halestudio.

the class AbstractGenericFunctionWizard method getUnfinishedCell.

/**
 * Returns the cell that would be created if the wizard would be finished
 * now.
 *
 * @return the cell
 */
public Cell getUnfinishedCell() {
    MutableCell current = new DefaultCell();
    current.setTransformationIdentifier(getFunctionId());
    ListMultimap<String, ParameterValue> parameters = ArrayListMultimap.create();
    current.setTransformationParameters(parameters);
    for (IWizardPage page : getPages()) {
        // stop at first uncompleted page
        if (!page.isPageComplete())
            break;
        if (page instanceof FunctionWizardPage)
            ((FunctionWizardPage) page).configureCell(current);
        else if (page instanceof ParameterPage)
            parameters.putAll(((ParameterPage) page).getConfiguration());
    }
    return current;
}
Also used : MutableCell(eu.esdihumboldt.hale.common.align.model.MutableCell) ParameterValue(eu.esdihumboldt.hale.common.align.model.ParameterValue) DefaultCell(eu.esdihumboldt.hale.common.align.model.impl.DefaultCell) ParameterPage(eu.esdihumboldt.hale.ui.function.generic.pages.ParameterPage) GenericParameterPage(eu.esdihumboldt.hale.ui.function.generic.pages.GenericParameterPage) IWizardPage(org.eclipse.jface.wizard.IWizardPage) FunctionWizardPage(eu.esdihumboldt.hale.ui.function.generic.pages.FunctionWizardPage)

Aggregations

ParameterValue (eu.esdihumboldt.hale.common.align.model.ParameterValue)2 FunctionWizardPage (eu.esdihumboldt.hale.ui.function.generic.pages.FunctionWizardPage)2 GenericParameterPage (eu.esdihumboldt.hale.ui.function.generic.pages.GenericParameterPage)2 ParameterPage (eu.esdihumboldt.hale.ui.function.generic.pages.ParameterPage)2 IWizardPage (org.eclipse.jface.wizard.IWizardPage)2 MutableCell (eu.esdihumboldt.hale.common.align.model.MutableCell)1 DefaultCell (eu.esdihumboldt.hale.common.align.model.impl.DefaultCell)1