[JBoss JIRA] (ROASTER-75) Encoding of source[?] code cannot be easily configured.
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/ROASTER-75?page=com.atlassian.jira.plugin... ]
George Gastaldi updated ROASTER-75:
-----------------------------------
Fix Version/s: 2.16.1.Final
(was: 2.x Future)
> Encoding of source[?] code cannot be easily configured.
> -------------------------------------------------------
>
> Key: ROASTER-75
> URL: https://issues.jboss.org/browse/ROASTER-75
> Project: Roaster
> Issue Type: Enhancement
> Components: API, JDT
> Affects Versions: 2.14.0.Final, 2.15.0.Final
> Environment: Java 8 64bit, Eclipse Mars, Windows 8.1 Pro 64bit
> Reporter: Shoji Kuzukami
> Priority: Minor
> Fix For: 2.16.1.Final
>
>
> The parser encoding for souce code can only be configured by the 'file.encoding' system parameter, as we can see in JavaParserImpl, "String encoding = System.getProperty("file.encoding", "ISO8859_1");".
> Even though the Roaster API can receive a 'String' source as "public static JavaType<?> parse(final String data)" in the 'Roaster.java', the 'String' of source can only contain "ISO8859_1" charsets if we don't change the "file.encoding".
> The parser SPI in 'JavaParser.java' is defined as "JavaUnit parseUnit(final InputStream data);" instead of "JavaUnit parseUnit(Reader source);". I think it is adequate considering that the Roaster API will accept some binary sources (such as bytecode) in near future.
> I recommend that the SPI "JavaUnit parseUnit(final InputStream data);" is expanded into "JavaUnit parseUnit(final InputStream data, Charset encodingIfText );" and some encoding refactors are done in the 'Roaster.java' without any change of semantics in the Roaster APIs except for the 'String' souce APIs as "public static JavaType<?> parse(final String data)".
> The 'Charset' argument is used only if the 'data' of InputStream must be interpreted as 'String' ( as a case of source code ).
> If this idea is accepted by this project design, I'll refactor the code and do a pull-requeust.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (ROASTER-75) Encoding of source[?] code cannot be easily configured.
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/ROASTER-75?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on ROASTER-75:
----------------------------------------
I have reduced the parseUnit methods in {{JavaParser}} interface to having a {{org.jboss.forge.roaster.spi.JavaParser.parseUnit(String)}} method.
We wouldn't be able to reuse the same method for binary parsing, as it wouldn't be possible to detect if the {{InputStream}} is a source or a binary file.
As this SPI is only used internally, we believe it's safe to change it without impact on consumers.
> Encoding of source[?] code cannot be easily configured.
> -------------------------------------------------------
>
> Key: ROASTER-75
> URL: https://issues.jboss.org/browse/ROASTER-75
> Project: Roaster
> Issue Type: Enhancement
> Components: API, JDT
> Affects Versions: 2.14.0.Final, 2.15.0.Final
> Environment: Java 8 64bit, Eclipse Mars, Windows 8.1 Pro 64bit
> Reporter: Shoji Kuzukami
> Priority: Minor
> Fix For: 2.16.1.Final
>
>
> The parser encoding for souce code can only be configured by the 'file.encoding' system parameter, as we can see in JavaParserImpl, "String encoding = System.getProperty("file.encoding", "ISO8859_1");".
> Even though the Roaster API can receive a 'String' source as "public static JavaType<?> parse(final String data)" in the 'Roaster.java', the 'String' of source can only contain "ISO8859_1" charsets if we don't change the "file.encoding".
> The parser SPI in 'JavaParser.java' is defined as "JavaUnit parseUnit(final InputStream data);" instead of "JavaUnit parseUnit(Reader source);". I think it is adequate considering that the Roaster API will accept some binary sources (such as bytecode) in near future.
> I recommend that the SPI "JavaUnit parseUnit(final InputStream data);" is expanded into "JavaUnit parseUnit(final InputStream data, Charset encodingIfText );" and some encoding refactors are done in the 'Roaster.java' without any change of semantics in the Roaster APIs except for the 'String' souce APIs as "public static JavaType<?> parse(final String data)".
> The 'Charset' argument is used only if the 'data' of InputStream must be interpreted as 'String' ( as a case of source code ).
> If this idea is accepted by this project design, I'll refactor the code and do a pull-requeust.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (FORGE-2285) Allow commands to be deprecated
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2285?page=com.atlassian.jira.plugin... ]
George Gastaldi closed FORGE-2285.
----------------------------------
Resolution: Done
> Allow commands to be deprecated
> -------------------------------
>
> Key: FORGE-2285
> URL: https://issues.jboss.org/browse/FORGE-2285
> Project: Forge
> Issue Type: Feature Request
> Components: Brainstorming, UI - API
> Affects Versions: 2.15.1.Final
> Reporter: George Gastaldi
> Assignee: George Gastaldi
> Labels: new_and_noteworthy
> Fix For: 2.20.0.Final
>
>
> Right now there are situations where we want to rename a command but we don't want to break scripts, same goes for the option names.
> There should be a way to preserve the behavior, but in a deprecated way. Eg: suppose we rename {{java-new-method}} to {{java-add-method}}:
> Scripts that still use {{java-new-method}} should display a warning saying that the command is deprecated and now you should use {{java-add-method}}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (FORGE-2487) Allow inputs to be deprecated
by George Gastaldi (JIRA)
George Gastaldi created FORGE-2487:
--------------------------------------
Summary: Allow inputs to be deprecated
Key: FORGE-2487
URL: https://issues.jboss.org/browse/FORGE-2487
Project: Forge
Issue Type: Feature Request
Components: UI - API
Affects Versions: 2.19.2.Final
Reporter: George Gastaldi
Assignee: George Gastaldi
Fix For: 2.20.0.Final
Right now there are situations where we want to rename a parameter but we don't want to break scripts. There should be a way to preserve the behavior, but in a deprecated way
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (FORGE-2285) Allow commands to be deprecated
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2285?page=com.atlassian.jira.plugin... ]
George Gastaldi reopened FORGE-2285:
------------------------------------
> Allow commands to be deprecated
> -------------------------------
>
> Key: FORGE-2285
> URL: https://issues.jboss.org/browse/FORGE-2285
> Project: Forge
> Issue Type: Feature Request
> Components: Brainstorming, UI - API
> Affects Versions: 2.15.1.Final
> Reporter: George Gastaldi
> Assignee: George Gastaldi
> Labels: new_and_noteworthy
> Fix For: 2.x Future
>
>
> Right now there are situations where we want to rename a command but we don't want to break scripts, same goes for the option names.
> There should be a way to preserve the behavior, but in a deprecated way. Eg: suppose we rename {{java-new-method}} to {{java-add-method}}:
> Scripts that still use {{java-new-method}} should display a warning saying that the command is deprecated and now you should use {{java-add-method}}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (FORGE-2285) Allow commands to be deprecated
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2285?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-2285:
-----------------------------------
Labels: new_and_noteworthy (was: )
> Allow commands to be deprecated
> -------------------------------
>
> Key: FORGE-2285
> URL: https://issues.jboss.org/browse/FORGE-2285
> Project: Forge
> Issue Type: Feature Request
> Components: Brainstorming, UI - API
> Affects Versions: 2.15.1.Final
> Reporter: George Gastaldi
> Assignee: George Gastaldi
> Labels: new_and_noteworthy
> Fix For: 2.20.0.Final
>
>
> Right now there are situations where we want to rename a command but we don't want to break scripts, same goes for the option names.
> There should be a way to preserve the behavior, but in a deprecated way. Eg: suppose we rename {{java-new-method}} to {{java-add-method}}:
> Scripts that still use {{java-new-method}} should display a warning saying that the command is deprecated and now you should use {{java-add-method}}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (FORGE-2285) Allow commands to be deprecated
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2285?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-2285:
-----------------------------------
Fix Version/s: 2.20.0.Final
(was: 2.x Future)
> Allow commands to be deprecated
> -------------------------------
>
> Key: FORGE-2285
> URL: https://issues.jboss.org/browse/FORGE-2285
> Project: Forge
> Issue Type: Feature Request
> Components: Brainstorming, UI - API
> Affects Versions: 2.15.1.Final
> Reporter: George Gastaldi
> Assignee: George Gastaldi
> Labels: new_and_noteworthy
> Fix For: 2.20.0.Final
>
>
> Right now there are situations where we want to rename a command but we don't want to break scripts, same goes for the option names.
> There should be a way to preserve the behavior, but in a deprecated way. Eg: suppose we rename {{java-new-method}} to {{java-add-method}}:
> Scripts that still use {{java-new-method}} should display a warning saying that the command is deprecated and now you should use {{java-add-method}}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months