@Override public Result execute(UIExecutionContext context) throws Exception { context.getPrompt().prompt("Press <ENTER> to continue..."); return Results.success(); }
UIPrompt prompt = context.getPrompt(); if (targetClass.hasMethodSignature("equals", Object.class))
UIPrompt prompt = context.getPrompt(); if (prompt.promptBoolean(installRequest.toString() + "\n Do you want to proceed?"))
if (existingDep != null) if (context.getPrompt().promptBoolean( String.format("Dependency is already managed [%s:%s:%s], reference the managed dependency?", existingDep.getCoordinate().getGroupId(), existingDep.getCoordinate().getArtifactId(),
UIProvider provider = context.getUIContext().getProvider(); UIOutput output = provider.getOutput(); UIPrompt prompt = context.getPrompt(); PrintStream out = output.out(); DirectoryResource forgeHome = getForgeHome();
@Override public Result execute(UIExecutionContext context) throws Exception { if (!context.getPrompt().promptBoolean( "Are you sure you want to continue? This command will delete current directories: addons, bin, lib, rules/migration-core")) { return Results.fail("Updating distribution was aborted."); } // Find the latest version. Coordinate latestDist = this.updater.getLatestReleaseOf("org.jboss.windup", "windup-distribution"); Version latestVersion = SingleVersion.valueOf(latestDist.getVersion()); Version installedVersion = currentAddon.getId().getVersion(); if (latestVersion.compareTo(installedVersion) <= 0) { return Results.fail(Util.WINDUP_BRAND_NAME_ACRONYM+" CLI is already in the most updated version."); } distUpdater.replaceWindupDirectoryWithDistribution(latestDist); return Results.success("Sucessfully updated "+Util.WINDUP_BRAND_NAME_ACRONYM+" CLI to version " + latestDist.getVersion() + ". Please restart RHAMT CLI."); }
UIPrompt prompt = context.getPrompt(); UIOutput output = context.getUIContext().getProvider().getOutput(); for (String file : arguments.getValue())
if (existingDep != null) if (context.getPrompt().promptBoolean(String.format( "Dependency [%s:%s] is currently managed. " + "Reference the existing managed dependency [%s:%s:%s]?",