This file contains 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
/* | |
* Converts unicodes to encoded \uxxxx and escapes special characters | |
* with a preceding slash | |
*/ | |
private static String saveConvert(String theString, boolean escapeSpace, boolean escapeUnicode) { | |
int len = theString.length(); | |
int bufLen = len * 2; | |
if (bufLen < 0) { | |
bufLen = Integer.MAX_VALUE; | |
} |
This file contains 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
/* | |
* JBoss, Home of Professional Open Source | |
* Copyright 2011, Red Hat, Inc., and individual contributors | |
* by the @authors tag. See the copyright.txt in the distribution for a | |
* full listing of individual contributors. | |
* | |
* This is free software; you can redistribute it and/or modify it | |
* under the terms of the GNU Lesser General Public License as | |
* published by the Free Software Foundation; either version 2.1 of | |
* the License, or (at your option) any later version. |
This file contains 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 | |
* |
This file contains 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 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 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 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 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 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 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> |