[JBoss JIRA] (FORGE-2491) Upgrade to Aesh 0.66
by George Gastaldi (JIRA)
George Gastaldi created FORGE-2491:
--------------------------------------
Summary: Upgrade to Aesh 0.66
Key: FORGE-2491
URL: https://issues.jboss.org/browse/FORGE-2491
Project: Forge
Issue Type: Component Upgrade
Components: UI - Shell
Affects Versions: 2.19.2.Final
Reporter: George Gastaldi
Assignee: George Gastaldi
Fix For: 2.20.0.Final
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (ROASTER-59) Multi-line javadoc not treated correct
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/ROASTER-59?page=com.atlassian.jira.plugin... ]
George Gastaldi closed ROASTER-59.
----------------------------------
Fix Version/s: 2.17.0.Final
(was: 2.x Future)
Assignee: George Gastaldi
Resolution: Done
> Multi-line javadoc not treated correct
> --------------------------------------
>
> Key: ROASTER-59
> URL: https://issues.jboss.org/browse/ROASTER-59
> Project: Roaster
> Issue Type: Bug
> Components: JDT
> Affects Versions: 2.11.1.Final
> Reporter: Michael Schwartz
> Assignee: George Gastaldi
> Priority: Trivial
> Fix For: 2.17.0.Final
>
>
> This code:
> public static void copyJavaDoc(JavaDocSource<?> source, JavaDocSource<?> destination) {
> destination.setFullText(source.getFullText());
> }
> produces for that source:
> /**
> * The country where this currency is used mostly. This field is just for
> * informational purposes and have no effect on any processing.
> */
> the following javadoc:
> /**
> * The country where this currency is used mostly. This field is just forinformational purposes and have no effect on any processing.
> */
> The crlf of the source javadoc is stripped out leading to concatinated words.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (ROASTER-66) JavaClass - hasSuper(Class) and getSuper(Class)
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/ROASTER-66?page=com.atlassian.jira.plugin... ]
George Gastaldi closed ROASTER-66.
----------------------------------
Fix Version/s: (was: 2.x Future)
Resolution: Duplicate Issue
Closing it as duplicate of ROASTER-14
> JavaClass - hasSuper(Class) and getSuper(Class)
> -----------------------------------------------
>
> Key: ROASTER-66
> URL: https://issues.jboss.org/browse/ROASTER-66
> Project: Roaster
> Issue Type: Enhancement
> Affects Versions: 2.14.0.Final
> Reporter: Claus Ibsen
>
> I want to know from a JavaClass which super class and its parents extend. So I can check if it extends a given class.
> Today the only way is to use getSuperType which returns a String with the FQN. Then I manually need to look into that class and its parent and so on.
> I want a one stop method to do that for me.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (ROASTER-63) JavaClassSource - Cannot extend another class when using the fluent builder
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/ROASTER-63?page=com.atlassian.jira.plugin... ]
George Gastaldi closed ROASTER-63.
----------------------------------
Fix Version/s: 2.16.0.Final
(was: 2.x Future)
Assignee: George Gastaldi
Resolution: Done
Even though having setSuperType, ROASTER-51 introduces {{implementInterface(...)}} and {{extendSupertype(...)}} to automatically import the required methods
> JavaClassSource - Cannot extend another class when using the fluent builder
> ---------------------------------------------------------------------------
>
> Key: ROASTER-63
> URL: https://issues.jboss.org/browse/ROASTER-63
> Project: Roaster
> Issue Type: Enhancement
> Reporter: Claus Ibsen
> Assignee: George Gastaldi
> Fix For: 2.16.0.Final
>
>
> I need to create a java class that extends another. As there is no .addExtends or .extends or something I had to work around and use the parse.
> I can only find an .addInterface
> Here is the code I use with my workaround
> {code}
> // need to parse to be able to extends another class
> String top = String.format("public class %s extends RouteBuilder {}", name.getValue());
> final JavaClassSource javaClass = Roaster.parse(JavaClassSource.class, top);
> if (targetPackage.getValue() != null) {
> javaClass.setPackage(targetPackage.getValue());
> }
> {code}
> eg what I want to do is
> {code}
> javaClass.extends("RouteBuilder");
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (ROASTER-62) Roaster - adds java.lang.xxx imports which is automatic in Java
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/ROASTER-62?page=com.atlassian.jira.plugin... ]
George Gastaldi closed ROASTER-62.
----------------------------------
Fix Version/s: 2.17.0.Final
(was: 2.x Future)
Assignee: George Gastaldi
Resolution: Done
> Roaster - adds java.lang.xxx imports which is automatic in Java
> ---------------------------------------------------------------
>
> Key: ROASTER-62
> URL: https://issues.jboss.org/browse/ROASTER-62
> Project: Roaster
> Issue Type: Bug
> Environment: Using Forge 2.14.0 so I use the Roaster that is shipped
> Reporter: Claus Ibsen
> Assignee: George Gastaldi
> Priority: Minor
> Fix For: 2.17.0.Final
>
>
> I have this code that creates a Apache Camel class for building routes.
> {code}
> // need to parse to be able to extends another class
> String top = String.format("public class %s extends RouteBuilder {}", name.getValue());
> final JavaClassSource javaClass = Roaster.parse(JavaClassSource.class, top);
> if (targetPackage.getValue() != null) {
> javaClass.setPackage(targetPackage.getValue());
> }
> javaClass.addImport("org.apache.camel.builder.RouteBuilder");
> javaClass.addMethod()
> .setPublic()
> .setReturnTypeVoid()
> .setName("configure")
> .setBody("from(\"timer:foo\").to(\"log:foo\");")
> .addThrows(Exception.class);
> facet.saveJavaSource(javaClass);
> {code}
> Notice that the configure method has a throws java.lang.Exception.
> The generated source code has import java.lang.Exception which is automatic in java, and all java.lang is auto imported and not to be defined.
> The generated code
> {code}
> davsclaus:/opt/forge-distribution-2.14.0.Final/mydemo/$ cat src/main/java/com/foo/Bar.java
> package com.foo;
> import org.apache.camel.builder.RouteBuilder;
> import java.lang.Exception;
> public class Bar extends RouteBuilder
> {
> public void configure() throws Exception
> {
> from("timer:foo").to("log:foo");
> }
> }davsclaus:/opt/forge-distribution-2.14.0.Final/mydemo/$ mvn clean install
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (ROASTER-70) setReturnType(Response.class) doesn't import Response
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/ROASTER-70?page=com.atlassian.jira.plugin... ]
George Gastaldi closed ROASTER-70.
----------------------------------
Fix Version/s: 2.17.0.Final
(was: 2.x Future)
Assignee: George Gastaldi
Resolution: Done
> setReturnType(Response.class) doesn't import Response
> -----------------------------------------------------
>
> Key: ROASTER-70
> URL: https://issues.jboss.org/browse/ROASTER-70
> Project: Roaster
> Issue Type: Bug
> Components: API
> Affects Versions: 2.13.2.Final
> Reporter: Antonio Goncalves
> Assignee: George Gastaldi
> Fix For: 2.17.0.Final
>
>
> If you take the following code :
> {code}
> public static void main(String[] args) {
> final JavaClassSource javaClassSource = Roaster.create(JavaClassSource.class);
> javaClassSource.setPackage("org.agoncal.myproj").setName("MyEndpoint").addAnnotation(Path.class).setStringValue("/mypath");
> MethodSource<?> doGet = javaClassSource.addMethod().setPublic().setName("method").setReturnType("javax.ws.rs.core.Response");
> doGet.setBody("return null;");
> System.out.println(javaClassSource);
> }
> {code}
> It will generate the following code, which compile because it imports {{javax.ws.rs.core.Response}}.
> {code}
> package org.agoncal.myproj;
> import javax.ws.rs.Path;
> import javax.ws.rs.core.Response;
> @Path("/mypath")
> public class MyEndpoint {
> public Response method() {
> return null;
> }
> }
> {code}
> But if you change {{setReturnType("javax.ws.rs.core.Response")}} with {{setReturnType(Response.class)}}, {{Response}} is not imported, therefore, the code doesn't compile
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months