[
https://issues.jboss.org/browse/FORGE-1751?page=com.atlassian.jira.plugin...
]
Antonio Goncalves commented on FORGE-1751:
------------------------------------------
In Forge 1.x there was this notion of project root (with {{~~}}) but also the top level
package root (with {{~}}). So we could write something like that :
{code}
new-project --named test --topLevelPackage com.mycomp.myproj
java new-class --named Test --package ~.constraints
Wrote com.mycomp.myproj.constraints.Test.java
{code}
With the {{--package ~.constraints}} paramater, it will create a class under
{{com.mycomp.myproj.constraints}} because {{~}} represents the top level package
{{com.mycomp.myproj}}.
This is not possible with Forge 2.x. The same code in Forge 2.x produces the following
exception :
{code}
project-new --named test --topLevelPackage com.mycomp.myproj
java-new-class --named Test --targetPackage ~.constraints
Exception when parsing/running: java-new-class --named Test6 --targetPackage
~.constraints, Invalid identifier : >~<
{code}
When writing Forge scripts, it's much easier and reusable to be able to use the {{~}}
represents the top level package.
Support Wildcards for package and class names
---------------------------------------------
Key: FORGE-1751
URL:
https://issues.jboss.org/browse/FORGE-1751
Project: Forge
Issue Type: Feature Request
Components: UI - Shell
Affects Versions: 2.4.1.Final
Reporter: George Gastaldi
Fix For: 2.x Future
In Forge 1.x it was possible to do something like:
{code}
scaffold-x from ~.model.Customer
scaffold-x from ~.model.*
{code}
That would replace the ~ character with the top level package name.
This is needed for scripting purposes and also very used.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)