@Override protected String getArchetypeArtifactId() { return archetypeArtifactId.getValue(); }
@Override protected String getArchetypeVersion() { return archetypeVersion.getValue(); }
@Override protected String getArchetypeGroupId() { return archetypeGroupId.getValue(); } }
@Override protected void setProperties(Properties properties, JPADataSource dataSource) { properties.put(SpringBootJPAFacet.SPRING_DATASOURCE_PROPERTIES_PREFIX + "url", dataSource.getDatabaseURL()); properties.put(SpringBootJPAFacet.SPRING_DATASOURCE_PROPERTIES_PREFIX + "username", username.getValue()); properties.put(SpringBootJPAFacet.SPRING_DATASOURCE_PROPERTIES_PREFIX + "password", password.getValue()); } }
@Override public VALUETYPE getValue() { return getDelegate().getValue(); }
private ScaffoldSetupContext createSetupContext(UIContext context) { Project project = getSelectedProject(context); String targetDir = webRoot.getValue(); if (targetDir == null || targetDir.equals("/")) { targetDir = ""; } return new ScaffoldSetupContext(targetDir, project); } }
@Override public Result execute(UIExecutionContext context) throws Exception { context.getUIContext().getAttributeMap().put("chatRoom", chatRoom.getValue()); context.getUIContext().getAttributeMap().put("issueProjectName", issueProjectName.getValue()); context.getUIContext().getAttributeMap().put("codeReview", codeReview.getValue()); return null; }
@Override public Result execute(UIExecutionContext context) throws Exception { getConfiguration().setProperty(named.getValue(), url.getValue().getFullyQualifiedName()); getArchetypeCatalogFactoryRegistry().addArchetypeCatalogFactory(named.getValue(), url.getValue().getUnderlyingResourceObject()); return Results.success(); }
@Override public NavigationResult next(UINavigationContext context) throws Exception { Boolean value = integrationTest.getValue(); if (value != null && value) { return NavigationResultBuilder.create().add(NewIntegrationTestClassCommand.class).build(); } return null; }
@Override public void validate(UIValidationContext context) { FileResource<?> resource = driverLocation.getValue(); if (resource != null && !resource.exists()) { context.addValidationError(driverLocation, "The location '" + resource.getFullyQualifiedName() + "' does not exist"); } } });
@Override public Result execute(UIExecutionContext context) throws Exception { final ProjectConfig projectConfig = holder.getProject().getFacet(ProjectConfig.class); projectConfig.setProjectProperty(ProjectProperty.MODULE_LOGICAL, logicalModuleName.getValue()); projectConfig.setProjectProperty(ProjectProperty.MODULE_FILE, ModuleSelect.moduleLogicalNameToFile(logicalModuleName.getValue(), holder.getProject())); return Results.success(); }
@Override public Result execute(UIExecutionContext context) throws Exception { final PrintStream out = context.getUIContext().getProvider().getOutput().out(); final FileResource<?> js = script.getValue(); final Boolean canOverwrite = overwrite.getValue(); final Manifest mf = getManifest(); return copyFileToAssetDir(js.getUnderlyingResourceObject(), mf, canOverwrite, onSuccess, onError ); }
@Override public Result execute(UIExecutionContext context) throws Exception { AddonProjectConfigurator configurator = SimpleContainer .getServices(getClass().getClassLoader(), AddonProjectConfigurator.class).get(); Project project = getSelectedProject(context); AddonId addonId = AddonId.fromCoordinates(addon.getValue()); configurator.installSelectedAddons(project, Collections.singleton(addonId), false); return Results.success("Addon " + addonId + " added as a dependency to project " + project.getFacet(MetadataFacet.class).getProjectName()); }
@Override public Result execute(UIExecutionContext context) throws Exception { GitIgnoreResource gitIgnore = gitIgnoreResource(context.getUIContext()); gitIgnore.removePattern(pattern.getValue()); return Results.success("Pattern removed from the .gitignore in the current directory"); }
@Override public Result execute(UIExecutionContext context) throws Exception { GitIgnoreResource gitIgnore = gitIgnoreResource(context.getUIContext()); gitIgnore.addPattern(pattern.getValue()); return Results.success("Pattern added to the .gitignore in the current directory"); }
private void produceTestFile(final Project project) throws IOException { final String testableClassName = this.testableClassName.getValue(); final String testClassName = this.testClassName.getValue(); final File sourceDirectory = getTestSourceDirectory(project); final File testFile = new File(sourceDirectory, relativeFilePathFromClassName(testClassName)); templateWriter.set("$$_testClassPackage_$$", getPackage(testClassName)) .set("$$_testClassSimpleName_$$", getSimpleName(testClassName)) .set("$$_testableClassFullName_$$", testableClassName) .set("$$_testableClassSimpleName_$$", getSimpleName(testableClassName)).writeTemplate(testFile); }
private void configureGwtMockitoRunner(final Project project) { final GwtMockitoRunnerFacet runnerFacet; if (!project.hasFacet(GwtMockitoRunnerFacet.class)) { runnerFacet = facetFactory.install(project, GwtMockitoRunnerFacet.class); } else { runnerFacet = project.getFacet(GwtMockitoRunnerFacet.class); } final String testPackage = getPackage(testClassName.getValue()); runnerFacet.addBlacklistedPackage(testPackage); }
public KubernetesClient getKubernetes() { if (kubernetes == null) { String kubernetesAddress = kubernetesUrl.getValue(); if (Strings.isNotBlank(kubernetesAddress)) { kubernetes = new KubernetesClient(new KubernetesFactory(kubernetesAddress)); } else { kubernetes = new KubernetesClient(); } } Objects.notNull(kubernetes, "kubernetes"); return kubernetes; }
@Override public Result execute(UIExecutionContext context) throws Exception { JavaResource javaResource = (JavaResource) context.getUIContext().getInitialSelection().get(); JavaClassSource commandClass = javaResource.getJavaType(); commandClass = createCommand(commandClass, named.getValue(), categories.getValue()); javaResource.setContents(commandClass); return Results.success("Annotated UICommand created"); }