Search in sources :

Example 1 with EnginesManager

use of org.phoenicis.engines.EnginesManager in project POL-POM-5 by PlayOnLinux.

the class ContainersFeaturePanel method changeEngineVersion.

/**
 * Opens a dialog to change the engine version used for a given container
 *
 * @param container The container
 */
public void changeEngineVersion(final ContainerDTO container) {
    EnginesManager enginesManager = getEnginesManager();
    if (enginesManager != null) {
        final String engineId = container.getEngine().toLowerCase();
        enginesManager.getEngine(engineId, engine -> engine.changeVersion(container.getName()), exception -> Platform.runLater(() -> {
            final ErrorDialog errorDialog = ErrorDialog.builder().withMessage(tr("Error during engine version change")).withException(exception).withOwner(getScene().getWindow()).build();
            errorDialog.showAndWait();
        }));
    }
}
Also used : ErrorDialog(org.phoenicis.javafx.dialogs.ErrorDialog) EnginesManager(org.phoenicis.engines.EnginesManager)

Example 2 with EnginesManager

use of org.phoenicis.engines.EnginesManager in project POL-POM-5 by PhoenicisOrg.

the class ContainersFeaturePanel method changeEngineVersion.

/**
 * Opens a dialog to change the engine version used for a given container
 *
 * @param container The container
 */
public void changeEngineVersion(final ContainerDTO container) {
    EnginesManager enginesManager = getEnginesManager();
    if (enginesManager != null) {
        final String engineId = container.getEngine().toLowerCase();
        enginesManager.getEngine(engineId, engine -> engine.changeVersion(container.getName()), exception -> Platform.runLater(() -> {
            final ErrorDialog errorDialog = ErrorDialog.builder().withMessage(tr("Error during engine version change")).withException(exception).withOwner(getScene().getWindow()).build();
            errorDialog.showAndWait();
        }));
    }
}
Also used : ErrorDialog(org.phoenicis.javafx.dialogs.ErrorDialog) EnginesManager(org.phoenicis.engines.EnginesManager)

Aggregations

EnginesManager (org.phoenicis.engines.EnginesManager)2 ErrorDialog (org.phoenicis.javafx.dialogs.ErrorDialog)2