[JBoss JIRA] (FORGE-2001) Last script line is not executed when using forge -e "run script.fsh"
by George Gastaldi (JIRA)
George Gastaldi created FORGE-2001:
--------------------------------------
Summary: Last script line is not executed when using forge -e "run script.fsh"
Key: FORGE-2001
URL: https://issues.jboss.org/browse/FORGE-2001
Project: Forge
Issue Type: Bug
Components: Forge Scripting Language
Affects Versions: 2.9.2.Final
Reporter: George Gastaldi
Fix For: 2.x Future
Having a script like:
{code}
project-new --named MyLibrary --topLevelPackage com.sopra.demo --type war ;
jpa-setup --container JBOSS_EAP6 --provider Hibernate ;
jpa-new-entity --named Book ;
jpa-new-field --named title ;
jpa-new-field --named ISBN ;
jpa-new-field --named summary --length 2000 ;
jpa-new-field --named published --type java.util.Date ;
constraint-setup --providers Hibernate ;
constraint-add --onProperty title --constraint NotNull ;
constraint-add --onProperty ISBN --constraint NotNull ;
constraint-add --onProperty summary --constraint Size --max 2000 ;
jpa-new-entity --named Author ;
jpa-new-field --named firstname ;
jpa-new-field --named lastname ;
jpa-new-field --named bio --length 2000 ;
jpa-new-field --named birthdate --type java.util.Date ;
jpa-new-field --named books --type com.sopra.demo.model.Book --relationshipType One-to-Many --inverseFieldName author ;
constraint-add --onProperty firstname --constraint NotNull ;
constraint-add --onProperty lastname --constraint NotNull ;
constraint-add --onProperty bio --constraint Size --max 2000 ;
scaffold-setup
scaffold-generate --targets com.sopra.demo.model.Book com.sopra.demo.model.Author
{code}
After the last line is executed, {{exit}} is immediately called and the execution finishes, without executing the last command
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months
[JBoss JIRA] (FORGE-1991) When using the forge console the first error causes it to lock and not allow further typing
by Vineet Reynolds (JIRA)
[ https://issues.jboss.org/browse/FORGE-1991?page=com.atlassian.jira.plugin... ]
Vineet Reynolds edited comment on FORGE-1991 at 9/8/14 11:15 AM:
-----------------------------------------------------------------
So, the shell is locked up until the script execution times out, because the current implementation of {{RunCommand}} does not detect any failure/result on the first error. It continues to loop expecting the command execution to return a result. Although it has the {{ScriptCommandListener}} attached to the shell, this listener is not triggered, since the execution control has not returned to the controller ({{SingleCommandController}}) yet.
In an other thread, the error message is written out to the shell (via {{CommandAdapter}}). No message is sent to the other thread indicating failure in validation during command execution.
was (Author: vineet.reynolds):
So, the shell is locked up until the script execution times out, because the current implementation of {{RunCommand}} does not detect any failure/result on the first error. It continues to loop expecting the command execution to return a result. Although it has the {{ScriptCommandListener}} attached to the shell, this listener is not triggered, since the execution control has not returned to the controller ({{SingleCommandController}}) yet.
In an other thread, the error message is written out to the shell. No message is sent to the other thread indicating failure in validation during command execution.
> When using the forge console the first error causes it to lock and not allow further typing
> -------------------------------------------------------------------------------------------
>
> Key: FORGE-1991
> URL: https://issues.jboss.org/browse/FORGE-1991
> Project: Forge
> Issue Type: Bug
> Components: UI - Eclipse
> Affects Versions: 2.7.2.Final
> Environment: Mac Maverick. Eclipse Luna 4.4 Forge 2.7.2-Final
> Reporter: Robb Greathouse
> Assignee: Vineet Reynolds
>
> I was using the Forge Console to create a project. I was able to create the project.
> I was then able to create a jpa-new-entity
> Then I created a field with jpa-new-field --named myField --type java.lang.Double.double
> And that worked.
> I then tried creating another field; but had a misspelling with jpa-new-field --named myField2 --type java.land.Double.double misspelling lang
> This returned an error and the console locked up and I had to restart the console. This failed and I had to restart eclipse.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months
[JBoss JIRA] (FORGE-1991) When using the forge console the first error causes it to lock and not allow further typing
by Vineet Reynolds (JIRA)
[ https://issues.jboss.org/browse/FORGE-1991?page=com.atlassian.jira.plugin... ]
Vineet Reynolds commented on FORGE-1991:
----------------------------------------
So, the shell is locked up until the script execution times out, because the current implementation of {{RunCommand}} does not detect any failure/result on the first error. It continues to loop expecting the command execution to return a result. Although it has the {{ScriptCommandListener}} attached to the shell, this listener is not triggered, since the execution control has not returned to the controller ({{SingleCommandController}}) yet.
In an other thread, the error message is written out to the shell. No message is sent to the other thread indicating failure in validation during command execution.
> When using the forge console the first error causes it to lock and not allow further typing
> -------------------------------------------------------------------------------------------
>
> Key: FORGE-1991
> URL: https://issues.jboss.org/browse/FORGE-1991
> Project: Forge
> Issue Type: Bug
> Components: UI - Eclipse
> Affects Versions: 2.7.2.Final
> Environment: Mac Maverick. Eclipse Luna 4.4 Forge 2.7.2-Final
> Reporter: Robb Greathouse
> Assignee: Vineet Reynolds
>
> I was using the Forge Console to create a project. I was able to create the project.
> I was then able to create a jpa-new-entity
> Then I created a field with jpa-new-field --named myField --type java.lang.Double.double
> And that worked.
> I then tried creating another field; but had a misspelling with jpa-new-field --named myField2 --type java.land.Double.double misspelling lang
> This returned an error and the console locked up and I had to restart the console. This failed and I had to restart eclipse.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months
[JBoss JIRA] (FORGE-1991) When using the forge console the first error causes it to lock and not allow further typing
by Vineet Reynolds (JIRA)
[ https://issues.jboss.org/browse/FORGE-1991?page=com.atlassian.jira.plugin... ]
Vineet Reynolds commented on FORGE-1991:
----------------------------------------
I cannot reproduce the issue (on both Fedora 20 and Windows 7) with the described use case.
However, the problem does exist when I run a script. The first error during script execution causes the Forge console in Eclipse to lock up.
> When using the forge console the first error causes it to lock and not allow further typing
> -------------------------------------------------------------------------------------------
>
> Key: FORGE-1991
> URL: https://issues.jboss.org/browse/FORGE-1991
> Project: Forge
> Issue Type: Bug
> Components: UI - Eclipse
> Affects Versions: 2.7.2.Final
> Environment: Mac Maverick. Eclipse Luna 4.4 Forge 2.7.2-Final
> Reporter: Robb Greathouse
> Assignee: Vineet Reynolds
>
> I was using the Forge Console to create a project. I was able to create the project.
> I was then able to create a jpa-new-entity
> Then I created a field with jpa-new-field --named myField --type java.lang.Double.double
> And that worked.
> I then tried creating another field; but had a misspelling with jpa-new-field --named myField2 --type java.land.Double.double misspelling lang
> This returned an error and the console locked up and I had to restart the console. This failed and I had to restart eclipse.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months
[JBoss JIRA] (FORGE-1991) When using the forge console the first error causes it to lock and not allow further typing
by Vineet Reynolds (JIRA)
[ https://issues.jboss.org/browse/FORGE-1991?page=com.atlassian.jira.plugin... ]
Vineet Reynolds reassigned FORGE-1991:
--------------------------------------
Assignee: Vineet Reynolds
> When using the forge console the first error causes it to lock and not allow further typing
> -------------------------------------------------------------------------------------------
>
> Key: FORGE-1991
> URL: https://issues.jboss.org/browse/FORGE-1991
> Project: Forge
> Issue Type: Bug
> Components: UI - Eclipse
> Affects Versions: 2.7.2.Final
> Environment: Mac Maverick. Eclipse Luna 4.4 Forge 2.7.2-Final
> Reporter: Robb Greathouse
> Assignee: Vineet Reynolds
>
> I was using the Forge Console to create a project. I was able to create the project.
> I was then able to create a jpa-new-entity
> Then I created a field with jpa-new-field --named myField --type java.lang.Double.double
> And that worked.
> I then tried creating another field; but had a misspelling with jpa-new-field --named myField2 --type java.land.Double.double misspelling lang
> This returned an error and the console locked up and I had to restart the console. This failed and I had to restart eclipse.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months
[JBoss JIRA] (ROASTER-32) MethodSource.addParameter(Class<?>, String) should support primitive types
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/ROASTER-32?page=com.atlassian.jira.plugin... ]
George Gastaldi closed ROASTER-32.
----------------------------------
Assignee: George Gastaldi
Fix Version/s: 2.7.2.Final
Resolution: Done
Good catch! Fixed
> MethodSource.addParameter(Class<?>, String) should support primitive types
> --------------------------------------------------------------------------
>
> Key: ROASTER-32
> URL: https://issues.jboss.org/browse/ROASTER-32
> Project: Roaster
> Issue Type: Bug
> Reporter: Jeremie Bresson
> Assignee: George Gastaldi
> Fix For: 2.7.2.Final
>
>
> In my opinion passing {{Integer.TYPE}} as first argument in {{MethodSource.addParameter(Class<?>, String)}} should be valid:
> Example:
> {code:java}
> source.addMethod().setPublic().setName("doSomething").setReturnType(Integer.TYPE).setBody("return 0;").addParameter(Integer.TYPE, "initValue");
> {code}
> For the moment (version 2.7.1.Final) I get this stacktrace:
> {quote}
> Exception in thread "main" java.lang.IllegalArgumentException: Cannot import class without a package [int]
> at org.jboss.forge.roaster.model.impl.AbstractJavaSource.addImport(AbstractJavaSource.java:171)
> at org.jboss.forge.roaster.model.impl.MethodImpl.addParameter(MethodImpl.java:671)
> at org.jboss.forge.roaster.model.impl.MethodImpl.addParameter(MethodImpl.java:658)
> {quote}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months
[JBoss JIRA] (ROASTER-32) MethodSource.addParameter(Class<?>, String) should support primitive types
by Jeremie Bresson (JIRA)
Jeremie Bresson created ROASTER-32:
--------------------------------------
Summary: MethodSource.addParameter(Class<?>, String) should support primitive types
Key: ROASTER-32
URL: https://issues.jboss.org/browse/ROASTER-32
Project: Roaster
Issue Type: Bug
Reporter: Jeremie Bresson
In my opinion passing {{Integer.TYPE}} as first argument in {{MethodSource.addParameter(Class<?>, String)}} should be valid:
Example:
{code:java}
source.addMethod().setPublic().setName("doSomething").setReturnType(Integer.TYPE).setBody("return 0;").addParameter(Integer.TYPE, "initValue");
{code}
For the moment (version 2.7.1.Final) I get this stacktrace:
{quote}
Exception in thread "main" java.lang.IllegalArgumentException: Cannot import class without a package [int]
at org.jboss.forge.roaster.model.impl.AbstractJavaSource.addImport(AbstractJavaSource.java:171)
at org.jboss.forge.roaster.model.impl.MethodImpl.addParameter(MethodImpl.java:671)
at org.jboss.forge.roaster.model.impl.MethodImpl.addParameter(MethodImpl.java:658)
{quote}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 3 months