[JBoss JIRA] (FORGE-2182) Need an InputTypes.FILE_OR_DIRECTORY type
by Lincoln Baxter III (JIRA)
[ https://issues.jboss.org/browse/FORGE-2182?page=com.atlassian.jira.plugin... ]
Lincoln Baxter III commented on FORGE-2182:
-------------------------------------------
We may be able to do without this if we just assume that unspecified Resource<?> inputs will accept both Files and Directories.
> Need an InputTypes.FILE_OR_DIRECTORY type
> -----------------------------------------
>
> Key: FORGE-2182
> URL: https://issues.jboss.org/browse/FORGE-2182
> Project: Forge
> Issue Type: Feature Request
> Components: UI - API, UI - Eclipse, UI - IntelliJ IDEA, UI - NetBeans
> Affects Versions: 2.13.0.Final
> Reporter: Lincoln Baxter III
> Fix For: 2.x Future
>
>
> There is currently no way to hint to the IDE to allow an input to select a file OR directory in Eclipse. I assume this will also be problematic in other IDEs.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years
[JBoss JIRA] (FORGE-2183) UI Wizards should default Resource<?> UIInput types to support selecting a File OR Directory
by Lincoln Baxter III (JIRA)
Lincoln Baxter III created FORGE-2183:
-----------------------------------------
Summary: UI Wizards should default Resource<?> UIInput types to support selecting a File OR Directory
Key: FORGE-2183
URL: https://issues.jboss.org/browse/FORGE-2183
Project: Forge
Issue Type: Feature Request
Components: UI - API, UI - Eclipse, UI - IntelliJ IDEA, UI - NetBeans
Affects Versions: 2.13.0.Final
Reporter: Lincoln Baxter III
Fix For: 2.x Future
There is currently no way to hint to the IDE to allow an input to select a file OR directory in Eclipse. I assume this will also be problematic in other IDEs.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years
[JBoss JIRA] (FORGE-2182) Need an InputTypes.FILE_OR_DIRECTORY type
by Lincoln Baxter III (JIRA)
Lincoln Baxter III created FORGE-2182:
-----------------------------------------
Summary: Need an InputTypes.FILE_OR_DIRECTORY type
Key: FORGE-2182
URL: https://issues.jboss.org/browse/FORGE-2182
Project: Forge
Issue Type: Feature Request
Components: UI - API, UI - Eclipse, UI - IntelliJ IDEA, UI - NetBeans
Affects Versions: 2.13.0.Final
Reporter: Lincoln Baxter III
Fix For: 2.x Future
There is currently no way to hint to the IDE to allow an input to select a file OR directory in Eclipse. I assume this will also be problematic in other IDEs.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years
[JBoss JIRA] (ROASTER-49) Impossible to create a field of type HashMap<Class<?>, Object>
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/ROASTER-49?page=com.atlassian.jira.plugin... ]
George Gastaldi closed ROASTER-49.
----------------------------------
Assignee: George Gastaldi
Fix Version/s: 2.11.2.Final
Resolution: Done
Nevermind, fixed it and reproduced in a test case.
Don't forget to add {{javaClass.addImport(HashMap.class)}}.
Thanks for reporting this!
> Impossible to create a field of type HashMap<Class<?>, Object>
> --------------------------------------------------------------
>
> Key: ROASTER-49
> URL: https://issues.jboss.org/browse/ROASTER-49
> Project: Roaster
> Issue Type: Bug
> Reporter: Yusuf Iskenderoglu
> Assignee: George Gastaldi
> Fix For: 2.11.2.Final
>
>
> Roaster does not like question-mark-operator:
> {code}
> to.addField()
> .setFinal(true)
> .setName("AS_MAP")
> .setPrivate()
> .setStatic(true)
> .setType("HashMap<Class<?>, Object>")
> .setLiteralInitializer("new HashMap<>();");
> {code}
> cannot be used:
> {verbatim}
> Exception in thread "main" java.lang.IllegalArgumentException: Cannot parse type parameter ?
> at org.jboss.forge.roaster.model.util.Types.toSimpleName(Types.java:196)
> at org.jboss.forge.roaster.model.util.Types.toSimpleName(Types.java:198)
> at org.jboss.forge.roaster.model.impl.FieldImpl.setType(FieldImpl.java:334)
> :support:main:roastJavaExecTask FAILED
> {verbatim}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years
[JBoss JIRA] (ROASTER-49) Impossible to create a field of type HashMap<Class<?>, Object>
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/ROASTER-49?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on ROASTER-49:
----------------------------------------
What version are you using? I can't reproduce in the latest SNAPSHOT (2.11.2-SNAPSHOT)
> Impossible to create a field of type HashMap<Class<?>, Object>
> --------------------------------------------------------------
>
> Key: ROASTER-49
> URL: https://issues.jboss.org/browse/ROASTER-49
> Project: Roaster
> Issue Type: Bug
> Reporter: Yusuf Iskenderoglu
>
> Roaster does not like question-mark-operator:
> {code}
> to.addField()
> .setFinal(true)
> .setName("AS_MAP")
> .setPrivate()
> .setStatic(true)
> .setType("HashMap<Class<?>, Object>")
> .setLiteralInitializer("new HashMap<>();");
> {code}
> cannot be used:
> {verbatim}
> Exception in thread "main" java.lang.IllegalArgumentException: Cannot parse type parameter ?
> at org.jboss.forge.roaster.model.util.Types.toSimpleName(Types.java:196)
> at org.jboss.forge.roaster.model.util.Types.toSimpleName(Types.java:198)
> at org.jboss.forge.roaster.model.impl.FieldImpl.setType(FieldImpl.java:334)
> :support:main:roastJavaExecTask FAILED
> {verbatim}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years
[JBoss JIRA] (ROASTER-49) Impossible to create a field of type HashMap<Class<?>, Object>
by Yusuf Iskenderoglu (JIRA)
[ https://issues.jboss.org/browse/ROASTER-49?page=com.atlassian.jira.plugin... ]
Yusuf Iskenderoglu updated ROASTER-49:
--------------------------------------
Issue Type: Bug (was: Feature Request)
> Impossible to create a field of type HashMap<Class<?>, Object>
> --------------------------------------------------------------
>
> Key: ROASTER-49
> URL: https://issues.jboss.org/browse/ROASTER-49
> Project: Roaster
> Issue Type: Bug
> Reporter: Yusuf Iskenderoglu
>
> Roaster does not like question-mark-operator:
> {code}
> to.addField()
> .setFinal(true)
> .setName("AS_MAP")
> .setPrivate()
> .setStatic(true)
> .setType("HashMap<Class<?>, Object>")
> .setLiteralInitializer("new HashMap<>();");
> {code}
> cannot be used:
> {verbatim}
> Exception in thread "main" java.lang.IllegalArgumentException: Cannot parse type parameter ?
> at org.jboss.forge.roaster.model.util.Types.toSimpleName(Types.java:196)
> at org.jboss.forge.roaster.model.util.Types.toSimpleName(Types.java:198)
> at org.jboss.forge.roaster.model.impl.FieldImpl.setType(FieldImpl.java:334)
> :support:main:roastJavaExecTask FAILED
> {verbatim}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years
[JBoss JIRA] (ROASTER-49) Impossible to create a field of type HashMap<Class<?>, Object>
by Yusuf Iskenderoglu (JIRA)
[ https://issues.jboss.org/browse/ROASTER-49?page=com.atlassian.jira.plugin... ]
Yusuf Iskenderoglu updated ROASTER-49:
--------------------------------------
Description:
Roaster does not like question-mark-operator:
{code}
to.addField()
.setFinal(true)
.setName("AS_MAP")
.setPrivate()
.setStatic(true)
.setType("HashMap<Class<?>, Object>")
.setLiteralInitializer("new HashMap<>();");
{code}
cannot be used:
{verbatim}
Exception in thread "main" java.lang.IllegalArgumentException: Cannot parse type parameter ?
at org.jboss.forge.roaster.model.util.Types.toSimpleName(Types.java:196)
at org.jboss.forge.roaster.model.util.Types.toSimpleName(Types.java:198)
at org.jboss.forge.roaster.model.impl.FieldImpl.setType(FieldImpl.java:334)
:support:main:roastJavaExecTask FAILED
{verbatim}
was:
Roaster does not like question-mark-operator:
{code}
to.addField()
.setFinal(true)
.setName("AS_MAP")
.setPrivate()
.setStatic(true)
.setType("HashMap<Class<?>, Object>")
.setLiteralInitializer("new HashMap<>();");
{code}
cannot be used:
{verbatim}
Exception in thread "main" java.lang.IllegalArgumentException: Cannot parse type parameter ?
at org.jboss.forge.roaster.model.util.Types.toSimpleName(Types.java:196)
at org.jboss.forge.roaster.model.util.Types.toSimpleName(Types.java:198)
at org.jboss.forge.roaster.model.impl.FieldImpl.setType(FieldImpl.java:334)
at de.check24.finance.baufi.roast.main.Roast.parse(Roast.java:244)
at de.check24.finance.baufi.roast.main.Roast.main(Roast.java:396)
:support:main:roastJavaExecTask FAILED
{verbatim}
> Impossible to create a field of type HashMap<Class<?>, Object>
> --------------------------------------------------------------
>
> Key: ROASTER-49
> URL: https://issues.jboss.org/browse/ROASTER-49
> Project: Roaster
> Issue Type: Feature Request
> Reporter: Yusuf Iskenderoglu
>
> Roaster does not like question-mark-operator:
> {code}
> to.addField()
> .setFinal(true)
> .setName("AS_MAP")
> .setPrivate()
> .setStatic(true)
> .setType("HashMap<Class<?>, Object>")
> .setLiteralInitializer("new HashMap<>();");
> {code}
> cannot be used:
> {verbatim}
> Exception in thread "main" java.lang.IllegalArgumentException: Cannot parse type parameter ?
> at org.jboss.forge.roaster.model.util.Types.toSimpleName(Types.java:196)
> at org.jboss.forge.roaster.model.util.Types.toSimpleName(Types.java:198)
> at org.jboss.forge.roaster.model.impl.FieldImpl.setType(FieldImpl.java:334)
> :support:main:roastJavaExecTask FAILED
> {verbatim}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years
[JBoss JIRA] (ROASTER-49) Impossible to create a field of type HashMap<Class<?>, Object>
by Yusuf Iskenderoglu (JIRA)
Yusuf Iskenderoglu created ROASTER-49:
-----------------------------------------
Summary: Impossible to create a field of type HashMap<Class<?>, Object>
Key: ROASTER-49
URL: https://issues.jboss.org/browse/ROASTER-49
Project: Roaster
Issue Type: Feature Request
Reporter: Yusuf Iskenderoglu
Roaster does not like question-mark-operator:
{code}
to.addField()
.setFinal(true)
.setName("AS_MAP")
.setPrivate()
.setStatic(true)
.setType("HashMap<Class<?>, Object>")
.setLiteralInitializer("new HashMap<>();");
{code}
cannot be used:
{verbatim}
Exception in thread "main" java.lang.IllegalArgumentException: Cannot parse type parameter ?
at org.jboss.forge.roaster.model.util.Types.toSimpleName(Types.java:196)
at org.jboss.forge.roaster.model.util.Types.toSimpleName(Types.java:198)
at org.jboss.forge.roaster.model.impl.FieldImpl.setType(FieldImpl.java:334)
at de.check24.finance.baufi.roast.main.Roast.parse(Roast.java:244)
at de.check24.finance.baufi.roast.main.Roast.main(Roast.java:396)
:support:main:roastJavaExecTask FAILED
{verbatim}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years
[JBoss JIRA] (ROASTER-48) A generic parameterized Method is not possible. Class<T> gets reduced to Class, generic parameter name is not accepted
by Yusuf Iskenderoglu (JIRA)
[ https://issues.jboss.org/browse/ROASTER-48?page=com.atlassian.jira.plugin... ]
Yusuf Iskenderoglu updated ROASTER-48:
--------------------------------------
Description:
What I need is something like this:
{code}
final MethodSource<JavaClassSource> newMethod = to.addMethod()
.setName(name)
.setPublic()
.setFinal(true);
newMethod.addTypeVariable("T");
newMethod.setReturnType("T").setBody(localBody + ".as(((Class<T>) as));");
newMethod.addParameter(int.class, "index");
newMethod.addParameter("Class<T>", "as");
{code}
However, roaster reduces *Class<T>* to *Class*. In that case, the method returns only "Object", because the type information cannot be deduced anymore, causes ugly Code on the caller side:
{code}
app().financing.desires(0, Foo.class).programNumber;
vs.
Foo k = (Foo) app().financing.desires(0, Foo.class);
k.programNumber
{code}
Further, a parameter with the name *T* is not accepted at all, even if its defined as a type variable.
Would be very nice, if you could solve this issue :-)
was:
What I need is something like this:
{code}
final MethodSource<JavaClassSource> newMethod = to.addMethod()
.setName(name)
.setPublic()
.setFinal(true);
newMethod.addTypeVariable("T");
newMethod.setReturnType("T").setBody(localBody + ".as(((Class<T>) as));");
newMethod.addParameter(int.class, "index");
newMethod.addParameter("Class<T>", "as");
{code}
However, roaster reduces *Class<T>* to *Class*. In that case, the method returns only "Object", because the type information cannot be deduced anymore, causes ugly Code on the caller side:
{code}
app().financing.desires(0, Foo.class).programNumber);
vs.
Foo k = (Foo) app().financing.desires(0, Foo.class);
k.programNumber
{code}
Further, a parameter with the name *T* is not accepted at all, even if its defined as a type variable.
Would be very nice, if you could solve this issue :-)
> A generic parameterized Method is not possible. Class<T> gets reduced to Class, generic parameter name is not accepted
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: ROASTER-48
> URL: https://issues.jboss.org/browse/ROASTER-48
> Project: Roaster
> Issue Type: Feature Request
> Reporter: Yusuf Iskenderoglu
>
> What I need is something like this:
> {code}
> final MethodSource<JavaClassSource> newMethod = to.addMethod()
> .setName(name)
> .setPublic()
> .setFinal(true);
> newMethod.addTypeVariable("T");
> newMethod.setReturnType("T").setBody(localBody + ".as(((Class<T>) as));");
> newMethod.addParameter(int.class, "index");
> newMethod.addParameter("Class<T>", "as");
> {code}
> However, roaster reduces *Class<T>* to *Class*. In that case, the method returns only "Object", because the type information cannot be deduced anymore, causes ugly Code on the caller side:
> {code}
> app().financing.desires(0, Foo.class).programNumber;
> vs.
> Foo k = (Foo) app().financing.desires(0, Foo.class);
> k.programNumber
> {code}
> Further, a parameter with the name *T* is not accepted at all, even if its defined as a type variable.
> Would be very nice, if you could solve this issue :-)
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years
[JBoss JIRA] (ROASTER-48) A generic parameterized Method is not possible. Class<T> gets reduced to Class, generic parameter name is not accepted
by Yusuf Iskenderoglu (JIRA)
Yusuf Iskenderoglu created ROASTER-48:
-----------------------------------------
Summary: A generic parameterized Method is not possible. Class<T> gets reduced to Class, generic parameter name is not accepted
Key: ROASTER-48
URL: https://issues.jboss.org/browse/ROASTER-48
Project: Roaster
Issue Type: Feature Request
Reporter: Yusuf Iskenderoglu
What I need is something like this:
{code}
final MethodSource<JavaClassSource> newMethod = to.addMethod()
.setName(name)
.setPublic()
.setFinal(true);
newMethod.addTypeVariable("T");
newMethod.setReturnType("T").setBody(localBody + ".as(((Class<T>) as));");
newMethod.addParameter(int.class, "index");
newMethod.addParameter("Class<T>", "as");
{code}
However, roaster reduces *Class<T>* to *Class*. In that case, the method returns only "Object", because the type information cannot be deduced anymore, causes ugly Code on the caller side:
{code}
app().financing.desires(0, Foo.class).programNumber);
vs.
Foo k = (Foo) app().financing.desires(0, Foo.class);
k.programNumber
{code}
Further, a parameter with the name *T* is not accepted at all, even if its defined as a type variable.
Would be very nice, if you could solve this issue :-)
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years