This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @SuppressWarnings("unchecked") | |
| private void addField(Field<O> field) | |
| { | |
| List<Object> bodyDeclarations = getBodyDeclaration().bodyDeclarations(); | |
| int idx = bodyDeclarations.size(); | |
| for (; idx > 0; idx--) | |
| { | |
| if (bodyDeclarations.get(idx - 1) instanceof FieldDeclaration) | |
| { | |
| break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * This method only returns true if: | |
| * | |
| * The major version of pluginApiVersion is equal to the major version of runtimeVersion AND | |
| * | |
| * The minor version of pluginApiVersion is less or equal to the minor version of runtimeVersion | |
| * | |
| * @param runtimeVersion a version in the format x.x.x | |
| * @param pluginApiVersion a version in the format x.x.x | |
| * @return |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>com.george.app</groupId> | |
| <artifactId>teste-app</artifactId> | |
| <version>0.0.1-SNAPSHOT</version> | |
| <packaging>far</packaging> | |
| <build> | |
| <plugins> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Updates the forge version | |
| * | |
| * @param specificVersion if you need a specific version | |
| */ | |
| @Command(value = "update", help = "Update this forge installation") | |
| public void update() throws IOException | |
| { | |
| Dependency forgeDistribution = getLatestAvailableDistribution(); | |
| if (forgeDistribution == null) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright 2012 Red Hat, Inc. and/or its affiliates. | |
| * | |
| * Licensed under the Eclipse Public License version 1.0, available at | |
| * http://www.eclipse.org/legal/epl-v10.html | |
| */ | |
| package org.jboss.forge.shell.analytics; | |
| import java.text.DateFormat; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.forge.plug; | |
| import java.io.IOException; | |
| import javax.inject.Inject; | |
| import org.jboss.forge.parser.java.JavaSource; | |
| import org.jboss.forge.parser.java.Method; | |
| import org.jboss.forge.project.Project; | |
| import org.jboss.forge.project.facets.JavaSourceFacet; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class BeanManagerExtension implements Extension { | |
| private static volatile BeanManager beanManager; | |
| public void init(@Observes AfterDeploymentValidation evt, BeanManager bm) { | |
| BeanManagerExtension.beanManager = bm; | |
| } | |
| public void destroy(@Observes Shutdown forgeShutdown) { | |
| BeanManagerExtension.beanManager = null; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.jboss.forge.resources; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.net.URL; | |
| import java.util.Collections; | |
| import java.util.List; | |
| import org.jboss.forge.project.services.ResourceFactory; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Override | |
| public DirectoryResource getSourceFolder() | |
| { | |
| MavenCoreFacet mavenFacet = project.getFacet(MavenCoreFacet.class); | |
| Build build = mavenFacet.getPOM().getBuild(); | |
| String srcFolderName; | |
| if (build != null && build.getSourceDirectory() != null) { | |
| srcFolderName = build.getSourceDirectory(); | |
| } else { | |
| srcFolderName = "src" + File.separator + "main" + File.separator + "java"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.george.hint.impl; | |
| import org.jboss.forge.project.Facet; | |
| import org.jboss.forge.project.Project; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| /** | |
| * A Holder object to ease working with Drools | |
| * |