[JBoss JIRA] (ROASTER-99) java comments can not be added with setBody()
by Elis Edlund (JIRA)
Elis Edlund created ROASTER-99:
----------------------------------
Summary: java comments can not be added with setBody()
Key: ROASTER-99
URL: https://issues.jboss.org/browse/ROASTER-99
Project: Roaster
Issue Type: Bug
Components: JDT
Affects Versions: 2.18.3.Final
Reporter: Elis Edlund
Priority: Minor
public static void main(String[] args) {
JavaClassSource dst = Roaster.create(JavaClassSource.class);
dst.addMethod().setConstructor(true).setPrivate().setBody("//hidden");
dst.addMethod().setConstructor(true).setPrivate().setBody("super();//hidden");
System.out.println(dst);
//expected "private JavaClass() {\n//hidden\n}" but get "private JavaClass() {\n}"
//alternative: dst.addMethod().setConstructor(true).setPrivate().setBody("super();//hidden");
//expected "private JavaClass() {\nsuper();//hidden\n}" but get "private JavaClass() {\nsuper();\n}"
}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (ROASTER-91) Add JavaInterfaceMethodImpl class
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/ROASTER-91?page=com.atlassian.jira.plugin... ]
George Gastaldi closed ROASTER-91.
----------------------------------
Resolution: Won't Fix
I've been thinking a bit about this and I think we don't want to mess around with the JavaInterfaceMethod behavior for now as this may introduce some undesirable side effects.
> Add JavaInterfaceMethodImpl class
> ---------------------------------
>
> Key: ROASTER-91
> URL: https://issues.jboss.org/browse/ROASTER-91
> Project: Roaster
> Issue Type: Bug
> Affects Versions: 2.18.0.Final
> Reporter: Nicolas Challut
> Assignee: Nicolas Challut
>
> method "bar" should be overrided in javaClass but it is empty.
> While searching in the code, I found that :
> {code}
> for (Method method : source.getMethods())
> {
> if (method.isAbstract() && !target.hasMethod(method))
> {
> {code}
> It seems that in JavaInterfaceSource the method aren't abstract by default (in the standars, interface method is abstract, key word is redundant).
> So, I see 2 ways to resolve this :
> # Change JavaInterface implementation to set all method abstract without add the key word
> # Change Methods#implementAbstractMethod() to handle JavaInterfaceSource type (if source instance of JavaInterfaceSource, addAll() )
> What do you guys think about it ?
> UPDATE 21/01 : We could add a new class which extend MethodImpl to handle special behavior of interface.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (ROASTER-98) MethodSource.getJavaDoc().getFullText() formats @param without space
by Elis Edlund (JIRA)
[ https://issues.jboss.org/browse/ROASTER-98?page=com.atlassian.jira.plugin... ]
Elis Edlund commented on ROASTER-98:
------------------------------------
Big thanks for the really quick fix!
Yes I agree that its a minor issue, (will do a better job filling issue details next time)
> MethodSource.getJavaDoc().getFullText() formats @param without space
> ----------------------------------------------------------------------
>
> Key: ROASTER-98
> URL: https://issues.jboss.org/browse/ROASTER-98
> Project: Roaster
> Issue Type: Bug
> Components: JDT
> Affects Versions: 2.18.3.Final
> Reporter: Elis Edlund
> Assignee: George Gastaldi
> Priority: Minor
> Fix For: 2.18.4.Final
>
>
> {noformat}
> public static void main(String[] args) {
> JavaClassSource src = Roaster.parse(JavaClassSource.class,
> "package issue;\npublic class Issue { \n" +
> " /**\n" +
> " * Creates a new instance of CLASS\n" +
> " *\n" +
> " * @param actual the actual value.\n" +
> " * @return the modified text\n" +
> " */\n" +
> " public static String someMethod(String actual) {\n" +
> " return actual;\n" +
> " }}");
> System.out.println(src); //looks ok
> MethodSource<JavaClassSource> method = src.getMethods().get(0);
> System.out.println(method);//looks ok
> System.out.println(method.getJavaDoc().getFullText());//looks not ok
> //will have "@paramactual the actual value." instead of "@param actual the actual value."
> }
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (ROASTER-98) MethodSource.getJavaDoc().getFullText() formats @param without space
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/ROASTER-98?page=com.atlassian.jira.plugin... ]
George Gastaldi closed ROASTER-98.
----------------------------------
Fix Version/s: 2.18.4.Final
(was: 2.x Future)
Assignee: George Gastaldi
Resolution: Done
> MethodSource.getJavaDoc().getFullText() formats @param without space
> ----------------------------------------------------------------------
>
> Key: ROASTER-98
> URL: https://issues.jboss.org/browse/ROASTER-98
> Project: Roaster
> Issue Type: Bug
> Components: JDT
> Affects Versions: 2.18.3.Final
> Reporter: Elis Edlund
> Assignee: George Gastaldi
> Priority: Minor
> Fix For: 2.18.4.Final
>
>
> {noformat}
> public static void main(String[] args) {
> JavaClassSource src = Roaster.parse(JavaClassSource.class,
> "package issue;\npublic class Issue { \n" +
> " /**\n" +
> " * Creates a new instance of CLASS\n" +
> " *\n" +
> " * @param actual the actual value.\n" +
> " * @return the modified text\n" +
> " */\n" +
> " public static String someMethod(String actual) {\n" +
> " return actual;\n" +
> " }}");
> System.out.println(src); //looks ok
> MethodSource<JavaClassSource> method = src.getMethods().get(0);
> System.out.println(method);//looks ok
> System.out.println(method.getJavaDoc().getFullText());//looks not ok
> //will have "@paramactual the actual value." instead of "@param actual the actual value."
> }
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (ROASTER-98) MethodSource.getJavaDoc().getFullText() formats @param without space
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/ROASTER-98?page=com.atlassian.jira.plugin... ]
George Gastaldi updated ROASTER-98:
-----------------------------------
Component/s: JDT
(was: API)
> MethodSource.getJavaDoc().getFullText() formats @param without space
> ----------------------------------------------------------------------
>
> Key: ROASTER-98
> URL: https://issues.jboss.org/browse/ROASTER-98
> Project: Roaster
> Issue Type: Bug
> Components: JDT
> Affects Versions: 2.18.3.Final
> Reporter: Elis Edlund
> Priority: Minor
> Fix For: 2.x Future
>
>
> {noformat}
> public static void main(String[] args) {
> JavaClassSource src = Roaster.parse(JavaClassSource.class,
> "package issue;\npublic class Issue { \n" +
> " /**\n" +
> " * Creates a new instance of CLASS\n" +
> " *\n" +
> " * @param actual the actual value.\n" +
> " * @return the modified text\n" +
> " */\n" +
> " public static String someMethod(String actual) {\n" +
> " return actual;\n" +
> " }}");
> System.out.println(src); //looks ok
> MethodSource<JavaClassSource> method = src.getMethods().get(0);
> System.out.println(method);//looks ok
> System.out.println(method.getJavaDoc().getFullText());//looks not ok
> //will have "@paramactual the actual value." instead of "@param actual the actual value."
> }
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (ROASTER-98) MethodSource.getJavaDoc().getFullText() formats @param without space
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/ROASTER-98?page=com.atlassian.jira.plugin... ]
George Gastaldi updated ROASTER-98:
-----------------------------------
Description:
{noformat}
public static void main(String[] args) {
JavaClassSource src = Roaster.parse(JavaClassSource.class,
"package issue;\npublic class Issue { \n" +
" /**\n" +
" * Creates a new instance of CLASS\n" +
" *\n" +
" * @param actual the actual value.\n" +
" * @return the modified text\n" +
" */\n" +
" public static String someMethod(String actual) {\n" +
" return actual;\n" +
" }}");
System.out.println(src); //looks ok
MethodSource<JavaClassSource> method = src.getMethods().get(0);
System.out.println(method);//looks ok
System.out.println(method.getJavaDoc().getFullText());//looks not ok
//will have "@paramactual the actual value." instead of "@param actual the actual value."
}
{noformat}
was:
{noformat}
public static void main(String[] args) {
JavaClassSource src = Roaster.parse(JavaClassSource.class,
"package issue;\npublic class Issue { \n" +
" /**\n" +
" * Creates a new instance of CLASS\n" +
" *\n" +
" * @param actual the actual value.\n" +
" * @return the modified text\n" +
" */\n" +
" public static String someMethod(String actual) {\n" +
" return actual;\n" +
" }}");
System.out.println(src); //looks ok
MethodSource<JavaClassSource> method = src.getMethods().get(0);
System.out.println(method);//looks ok
System.out.println(method.getJavaDoc().getFullText());//looks not ok
//will have "@paramactual the actual value." instead of "@param actual the actual value."
}
{noformat}
Priority: Minor (was: Critical)
I am sorry, but this is not a critical issue. This is a minor issue, as the method works but requires some minor tweaks
> MethodSource.getJavaDoc().getFullText() formats @param without space
> ----------------------------------------------------------------------
>
> Key: ROASTER-98
> URL: https://issues.jboss.org/browse/ROASTER-98
> Project: Roaster
> Issue Type: Bug
> Components: API
> Affects Versions: 2.18.3.Final
> Reporter: Elis Edlund
> Priority: Minor
> Fix For: 2.x Future
>
>
> {noformat}
> public static void main(String[] args) {
> JavaClassSource src = Roaster.parse(JavaClassSource.class,
> "package issue;\npublic class Issue { \n" +
> " /**\n" +
> " * Creates a new instance of CLASS\n" +
> " *\n" +
> " * @param actual the actual value.\n" +
> " * @return the modified text\n" +
> " */\n" +
> " public static String someMethod(String actual) {\n" +
> " return actual;\n" +
> " }}");
> System.out.println(src); //looks ok
> MethodSource<JavaClassSource> method = src.getMethods().get(0);
> System.out.println(method);//looks ok
> System.out.println(method.getJavaDoc().getFullText());//looks not ok
> //will have "@paramactual the actual value." instead of "@param actual the actual value."
> }
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (ROASTER-98) MethodSource.getJavaDoc().getFullText() formats @param without space
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/ROASTER-98?page=com.atlassian.jira.plugin... ]
George Gastaldi updated ROASTER-98:
-----------------------------------
Fix Version/s: 2.x Future
> MethodSource.getJavaDoc().getFullText() formats @param without space
> ----------------------------------------------------------------------
>
> Key: ROASTER-98
> URL: https://issues.jboss.org/browse/ROASTER-98
> Project: Roaster
> Issue Type: Bug
> Components: API
> Affects Versions: 2.18.3.Final
> Reporter: Elis Edlund
> Priority: Minor
> Fix For: 2.x Future
>
>
> {noformat}
> public static void main(String[] args) {
> JavaClassSource src = Roaster.parse(JavaClassSource.class,
> "package issue;\npublic class Issue { \n" +
> " /**\n" +
> " * Creates a new instance of CLASS\n" +
> " *\n" +
> " * @param actual the actual value.\n" +
> " * @return the modified text\n" +
> " */\n" +
> " public static String someMethod(String actual) {\n" +
> " return actual;\n" +
> " }}");
> System.out.println(src); //looks ok
> MethodSource<JavaClassSource> method = src.getMethods().get(0);
> System.out.println(method);//looks ok
> System.out.println(method.getJavaDoc().getFullText());//looks not ok
> //will have "@paramactual the actual value." instead of "@param actual the actual value."
> }
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (ROASTER-98) MethodSource.getJavaDoc().getFullText() formats @param without space
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/ROASTER-98?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on ROASTER-98:
----------------------------------------
Thanks for providing a test case.
> MethodSource.getJavaDoc().getFullText() formats @param without space
> ----------------------------------------------------------------------
>
> Key: ROASTER-98
> URL: https://issues.jboss.org/browse/ROASTER-98
> Project: Roaster
> Issue Type: Bug
> Components: API
> Affects Versions: 2.18.3.Final
> Reporter: Elis Edlund
> Priority: Critical
>
> {noformat}
> public static void main(String[] args) {
> JavaClassSource src = Roaster.parse(JavaClassSource.class,
> "package issue;\npublic class Issue { \n" +
> " /**\n" +
> " * Creates a new instance of CLASS\n" +
> " *\n" +
> " * @param actual the actual value.\n" +
> " * @return the modified text\n" +
> " */\n" +
> " public static String someMethod(String actual) {\n" +
> " return actual;\n" +
> " }}");
> System.out.println(src); //looks ok
> MethodSource<JavaClassSource> method = src.getMethods().get(0);
> System.out.println(method);//looks ok
> System.out.println(method.getJavaDoc().getFullText());//looks not ok
> //will have "@paramactual the actual value." instead of "@param actual the actual value."
> }
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (ROASTER-98) MethodSource.getJavaDoc().getFullText() formats @param without space
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/ROASTER-98?page=com.atlassian.jira.plugin... ]
George Gastaldi updated ROASTER-98:
-----------------------------------
Issue Type: Bug (was: Patch)
> MethodSource.getJavaDoc().getFullText() formats @param without space
> ----------------------------------------------------------------------
>
> Key: ROASTER-98
> URL: https://issues.jboss.org/browse/ROASTER-98
> Project: Roaster
> Issue Type: Bug
> Components: API
> Affects Versions: 2.18.3.Final
> Reporter: Elis Edlund
> Priority: Critical
>
> public static void main(String[] args) {
> JavaClassSource src = Roaster.parse(JavaClassSource.class,
> "package issue;\npublic class Issue { \n" +
> " /**\n" +
> " * Creates a new instance of CLASS\n" +
> " *\n" +
> " * @param actual the actual value.\n" +
> " * @return the modified text\n" +
> " */\n" +
> " public static String someMethod(String actual) {\n" +
> " return actual;\n" +
> " }}");
> System.out.println(src); //looks ok
> MethodSource<JavaClassSource> method = src.getMethods().get(0);
> System.out.println(method);//looks ok
> System.out.println(method.getJavaDoc().getFullText());//looks not ok
> //will have "@paramactual the actual value." instead of "@param actual the actual value."
> }
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months
[JBoss JIRA] (ROASTER-98) MethodSource.getJavaDoc().getFullText() formats @param without space
by Elis Edlund (JIRA)
[ https://issues.jboss.org/browse/ROASTER-98?page=com.atlassian.jira.plugin... ]
Elis Edlund updated ROASTER-98:
-------------------------------
Description:
{noformat}
public static void main(String[] args) {
JavaClassSource src = Roaster.parse(JavaClassSource.class,
"package issue;\npublic class Issue { \n" +
" /**\n" +
" * Creates a new instance of CLASS\n" +
" *\n" +
" * @param actual the actual value.\n" +
" * @return the modified text\n" +
" */\n" +
" public static String someMethod(String actual) {\n" +
" return actual;\n" +
" }}");
System.out.println(src); //looks ok
MethodSource<JavaClassSource> method = src.getMethods().get(0);
System.out.println(method);//looks ok
System.out.println(method.getJavaDoc().getFullText());//looks not ok
//will have "@paramactual the actual value." instead of "@param actual the actual value."
}
{noformat}
was:
public static void main(String[] args) {
JavaClassSource src = Roaster.parse(JavaClassSource.class,
"package issue;\npublic class Issue { \n" +
" /**\n" +
" * Creates a new instance of CLASS\n" +
" *\n" +
" * @param actual the actual value.\n" +
" * @return the modified text\n" +
" */\n" +
" public static String someMethod(String actual) {\n" +
" return actual;\n" +
" }}");
System.out.println(src); //looks ok
MethodSource<JavaClassSource> method = src.getMethods().get(0);
System.out.println(method);//looks ok
System.out.println(method.getJavaDoc().getFullText());//looks not ok
//will have "@paramactual the actual value." instead of "@param actual the actual value."
}
> MethodSource.getJavaDoc().getFullText() formats @param without space
> ----------------------------------------------------------------------
>
> Key: ROASTER-98
> URL: https://issues.jboss.org/browse/ROASTER-98
> Project: Roaster
> Issue Type: Bug
> Components: API
> Affects Versions: 2.18.3.Final
> Reporter: Elis Edlund
> Priority: Critical
>
> {noformat}
> public static void main(String[] args) {
> JavaClassSource src = Roaster.parse(JavaClassSource.class,
> "package issue;\npublic class Issue { \n" +
> " /**\n" +
> " * Creates a new instance of CLASS\n" +
> " *\n" +
> " * @param actual the actual value.\n" +
> " * @return the modified text\n" +
> " */\n" +
> " public static String someMethod(String actual) {\n" +
> " return actual;\n" +
> " }}");
> System.out.println(src); //looks ok
> MethodSource<JavaClassSource> method = src.getMethods().get(0);
> System.out.println(method);//looks ok
> System.out.println(method.getJavaDoc().getFullText());//looks not ok
> //will have "@paramactual the actual value." instead of "@param actual the actual value."
> }
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 10 months