[JBoss JIRA] (FORGE-471) JavaResource handling of files with nested classes is incorrect
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-471?page=com.atlassian.jira.plugin.... ]
George Gastaldi updated FORGE-471:
----------------------------------
Fix Version/s: 1.2.2.Final
(was: 1.2.1.Final)
> JavaResource handling of files with nested classes is incorrect
> ---------------------------------------------------------------
>
> Key: FORGE-471
> URL: https://issues.jboss.org/browse/FORGE-471
> Project: Forge
> Issue Type: Bug
> Components: Parsers / File Manipulation, Resources API
> Affects Versions: 1.0.6.Final
> Reporter: Rudy De Busscher
> Fix For: 1.2.2.Final
>
>
> In the case you have following java source file
> public class Test {
>
> private String mainProperty;
> public void mainMethod() {
> System.out.println("Hi");
> }
> public static final class Nested {
> private String innerProperty;
> public void innerMethod() {
> System.out.println("I'm inner");
> }
> }
> }
> And running following statements
> JavaResource javaResource = factory.getResourceFrom(new File"/path/to/file/Test.java")).reify(JavaResource.class);
> System.out.println(javaResource.toString());
> List<Resource<?>> resources = javaResource.listResources();
> for (Resource res : resources) {
> System.out.println(res.getFullyQualifiedName());
> }
> You get following output
> be.rubus.forge.deltaspike.test.projectstage.Nested
> /path/to/file/Test.java/innerProperty::String
> /path/to/file/Test.java/mainMethod()::void
> /path/to/file/Test.java/innerMethod()::void
> The wrong name is due to the fact that TypeDeclarationFinderVisitor records every class type the parser finds. In our case the 2 class names but only the last one is kept (first name is overwritten)
> The MethodFinderVisitor has a similar problem, it gets called twice and adds up the found methods.
> So there need to be a general review of the visitors to be able to handle nested or multiple classes in one java source file.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 3 months
[JBoss JIRA] (FORGE-385) Current directory is poor default for new-project location when existing project is detected
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-385?page=com.atlassian.jira.plugin.... ]
George Gastaldi updated FORGE-385:
----------------------------------
Fix Version/s: 1.2.2.Final
(was: 1.2.1.Final)
> Current directory is poor default for new-project location when existing project is detected
> --------------------------------------------------------------------------------------------
>
> Key: FORGE-385
> URL: https://issues.jboss.org/browse/FORGE-385
> Project: Forge
> Issue Type: Enhancement
> Components: Builtin Plugins
> Affects Versions: 1.0.0.Beta3
> Reporter: Dan Allen
> Priority: Minor
> Labels: Starter
> Fix For: 1.2.2.Final
>
>
> When creating a new project using the new-project command, forge will offer the current directory as the target location if a project with the same name is found.
> {code}
> $ new-project --named example --topLevelPackage org.example
> ***ERROR*** [/home/dallen/example] already contains a project; please use a different folder.
> Where would you like to create the project? [Press ENTER to use the current directory: dallen]
> {code}
> This default is a recipe for disaster. If there is a project in the way, then using the current directory puts that project *in* the project being created. Additionally, if the current directory is $HOME, then the project will get overlaid in a directory which has many other files and directories.
> A better default is to append a number to the end of the project name. For example:
> {code}
> $ new-project --named example --topLevelPackage org.example
> ***ERROR*** [/home/dallen/example] already contains a project; please use a different folder.
> Where would you like to create the project? [Press ENTER to use an alternative directory: example2]
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 3 months
[JBoss JIRA] (FORGE-552) Escaping of selected characters doesn't work
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-552?page=com.atlassian.jira.plugin.... ]
George Gastaldi updated FORGE-552:
----------------------------------
Fix Version/s: 1.2.2.Final
(was: 1.2.1.Final)
> Escaping of selected characters doesn't work
> --------------------------------------------
>
> Key: FORGE-552
> URL: https://issues.jboss.org/browse/FORGE-552
> Project: Forge
> Issue Type: Bug
> Components: Forge Build
> Affects Versions: 1.0.2.Final
> Environment: Ubuntu 10.04 i686
> Reporter: Jevgeni Zelenkov
> Fix For: 1.2.2.Final
>
>
> This is related to the https://issues.jboss.org/browse/FORGE-43 issue.
> The following characters in file names should be escaped by the forge completion:
> \* ? = ' " { } \ $ ! & ; ( ) < > |
> also: TAB-char (yes, I know it is stupid, but possible)
> First two (*, ?) are used internally as wildcard chars, so should be allowed to be used escaped as well as unescaped.
> = char doesn't need to be escaped neither on linux nor on windows but somehow forge fails to work with files containing = (at least on my ubuntu).
> Windows has a slightly different set of chars to be escaped (from wikipedia, not actually tested):
> ' " = & | ( ) < > ^
> This issue is added for completeness.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 3 months