You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Aleksey Lagoshin (JIRA)" <ji...@apache.org> on 2008/07/09 08:56:31 UTC

[jira] Created: (HARMONY-5903) [classlib][rtf] RTF parser initial implementation

[classlib][rtf] RTF parser initial implementation
-------------------------------------------------

                 Key: HARMONY-5903
                 URL: https://issues.apache.org/jira/browse/HARMONY-5903
             Project: Harmony
          Issue Type: Improvement
          Components: Classlib
            Reporter: Aleksey Lagoshin
            Priority: Minor
         Attachments: rtfparser.zip, Test.java

This is initial implementation of RTFParser in the context of "harmony-swing-rtf" GSoC project.
RTF parser could read any RTF file, but it understands only a few control words so far. Other control words it skips.

The archive rtfparser.zip has following files: 

* RTFEditorKit.java: class from JDK API which is responsible for reading and writing RTF files. Currently, works only reading RTF files.
* RTFParser.jj: 
JavaCC grammar for RTF files.
* RTFParserHandler.java: 
This class constructs StyledDocument from parsed content.

Other files were generated from the grammar.

Attached files Test.java and test.rtf are for testing purposes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5903) [classlib][rtf] RTF parser initial implementation

Posted by "Aleksey Lagoshin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Lagoshin updated HARMONY-5903:
--------------------------------------

    Attachment: Test.java

> [classlib][rtf] RTF parser initial implementation
> -------------------------------------------------
>
>                 Key: HARMONY-5903
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5903
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Aleksey Lagoshin
>            Priority: Minor
>         Attachments: rtfparser.zip, Test.java
>
>
> This is initial implementation of RTFParser in the context of "harmony-swing-rtf" GSoC project.
> RTF parser could read any RTF file, but it understands only a few control words so far. Other control words it skips.
> The archive rtfparser.zip has following files: 
> * RTFEditorKit.java: class from JDK API which is responsible for reading and writing RTF files. Currently, works only reading RTF files.
> * RTFParser.jj: 
> JavaCC grammar for RTF files.
> * RTFParserHandler.java: 
> This class constructs StyledDocument from parsed content.
> Other files were generated from the grammar.
> Attached files Test.java and test.rtf are for testing purposes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-5903) [classlib][rtf] RTF parser initial implementation

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexei Zakharov resolved HARMONY-5903.
--------------------------------------

    Resolution: Fixed

Good job Aleksey! Slightly modified version of your sources was committed at the revision 676446. 

However, I had the following issues while trying to integrate the sources with Harmony code base and run tests;
1.
 [hy.javac] Compiling 9 source files to
/home/ayzakhar/projects/harmony/trunk/working_classlib/build/classes
 [hy.javac] ----------
 [hy.javac] 1. ERROR in
//home/ayzakhar/projects/harmony/trunk/working_classlib/modules/swing/src/main/
//(at line 30)
 [hy.javac]     throw new IOException(e);
 [hy.javac]           ^^^^^^^^^^^^^^^^^^
 [hy.javac] The constructor IOException(ParseException) is undefined
 [hy.javac] ----------
 [hy.javac] 1 problem (1 error)
(fixed)

2. Even "test.rtf" doesn't look nice on Linux - see atachment
3. Apache License was not present in the sources' headers - I've fixed this 
4. It would be nice if you can integrate your test case with existing unit
tests for Swing module

BTW, as far as I understand the current version of the parser understands only few RTF keywords like rtf, fonttbl, stylesheet, info, b, i, ul. It is not bad for the beginning. However, I'm looking forward for future updates. ;)



> [classlib][rtf] RTF parser initial implementation
> -------------------------------------------------
>
>                 Key: HARMONY-5903
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5903
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Aleksey Lagoshin
>            Assignee: Alexei Zakharov
>         Attachments: rtf_parser_screenshot1.png, rtfparser.zip, Test.java, test.rtf
>
>
> This is initial implementation of RTFParser in the context of "harmony-swing-rtf" GSoC project.
> RTF parser could read any RTF file, but it understands only a few control words so far. Other control words it skips.
> The archive rtfparser.zip has following files: 
> * RTFEditorKit.java: class from JDK API which is responsible for reading and writing RTF files. Currently, works only reading RTF files.
> * RTFParser.jj: 
> JavaCC grammar for RTF files.
> * RTFParserHandler.java: 
> This class constructs StyledDocument from parsed content.
> Other files were generated from the grammar.
> Attached files Test.java and test.rtf are for testing purposes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5903) [classlib][rtf] RTF parser initial implementation

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexei Zakharov updated HARMONY-5903:
-------------------------------------

    Attachment: rtf_parser_screenshot1.png

> [classlib][rtf] RTF parser initial implementation
> -------------------------------------------------
>
>                 Key: HARMONY-5903
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5903
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Aleksey Lagoshin
>            Assignee: Alexei Zakharov
>         Attachments: rtf_parser_screenshot1.png, rtfparser.zip, Test.java, test.rtf
>
>
> This is initial implementation of RTFParser in the context of "harmony-swing-rtf" GSoC project.
> RTF parser could read any RTF file, but it understands only a few control words so far. Other control words it skips.
> The archive rtfparser.zip has following files: 
> * RTFEditorKit.java: class from JDK API which is responsible for reading and writing RTF files. Currently, works only reading RTF files.
> * RTFParser.jj: 
> JavaCC grammar for RTF files.
> * RTFParserHandler.java: 
> This class constructs StyledDocument from parsed content.
> Other files were generated from the grammar.
> Attached files Test.java and test.rtf are for testing purposes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5903) [classlib][rtf] RTF parser initial implementation

Posted by "Aleksey Lagoshin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Lagoshin updated HARMONY-5903:
--------------------------------------

    Attachment: test.rtf

> [classlib][rtf] RTF parser initial implementation
> -------------------------------------------------
>
>                 Key: HARMONY-5903
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5903
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Aleksey Lagoshin
>            Priority: Minor
>         Attachments: rtfparser.zip, Test.java, test.rtf
>
>
> This is initial implementation of RTFParser in the context of "harmony-swing-rtf" GSoC project.
> RTF parser could read any RTF file, but it understands only a few control words so far. Other control words it skips.
> The archive rtfparser.zip has following files: 
> * RTFEditorKit.java: class from JDK API which is responsible for reading and writing RTF files. Currently, works only reading RTF files.
> * RTFParser.jj: 
> JavaCC grammar for RTF files.
> * RTFParserHandler.java: 
> This class constructs StyledDocument from parsed content.
> Other files were generated from the grammar.
> Attached files Test.java and test.rtf are for testing purposes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5903) [classlib][rtf] RTF parser initial implementation

Posted by "Aleksey Lagoshin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Lagoshin updated HARMONY-5903:
--------------------------------------

    Attachment: rtfparser.zip

> [classlib][rtf] RTF parser initial implementation
> -------------------------------------------------
>
>                 Key: HARMONY-5903
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5903
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Aleksey Lagoshin
>            Priority: Minor
>         Attachments: rtfparser.zip, Test.java
>
>
> This is initial implementation of RTFParser in the context of "harmony-swing-rtf" GSoC project.
> RTF parser could read any RTF file, but it understands only a few control words so far. Other control words it skips.
> The archive rtfparser.zip has following files: 
> * RTFEditorKit.java: class from JDK API which is responsible for reading and writing RTF files. Currently, works only reading RTF files.
> * RTFParser.jj: 
> JavaCC grammar for RTF files.
> * RTFParserHandler.java: 
> This class constructs StyledDocument from parsed content.
> Other files were generated from the grammar.
> Attached files Test.java and test.rtf are for testing purposes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5903) [classlib][rtf] RTF parser initial implementation

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexei Zakharov updated HARMONY-5903:
-------------------------------------

    Priority: Major  (was: Minor)

> [classlib][rtf] RTF parser initial implementation
> -------------------------------------------------
>
>                 Key: HARMONY-5903
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5903
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Aleksey Lagoshin
>            Assignee: Alexei Zakharov
>         Attachments: rtfparser.zip, Test.java, test.rtf
>
>
> This is initial implementation of RTFParser in the context of "harmony-swing-rtf" GSoC project.
> RTF parser could read any RTF file, but it understands only a few control words so far. Other control words it skips.
> The archive rtfparser.zip has following files: 
> * RTFEditorKit.java: class from JDK API which is responsible for reading and writing RTF files. Currently, works only reading RTF files.
> * RTFParser.jj: 
> JavaCC grammar for RTF files.
> * RTFParserHandler.java: 
> This class constructs StyledDocument from parsed content.
> Other files were generated from the grammar.
> Attached files Test.java and test.rtf are for testing purposes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-5903) [classlib][rtf] RTF parser initial implementation

Posted by "Alexei Zakharov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexei Zakharov reassigned HARMONY-5903:
----------------------------------------

    Assignee: Alexei Zakharov

> [classlib][rtf] RTF parser initial implementation
> -------------------------------------------------
>
>                 Key: HARMONY-5903
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5903
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>            Reporter: Aleksey Lagoshin
>            Assignee: Alexei Zakharov
>            Priority: Minor
>         Attachments: rtfparser.zip, Test.java, test.rtf
>
>
> This is initial implementation of RTFParser in the context of "harmony-swing-rtf" GSoC project.
> RTF parser could read any RTF file, but it understands only a few control words so far. Other control words it skips.
> The archive rtfparser.zip has following files: 
> * RTFEditorKit.java: class from JDK API which is responsible for reading and writing RTF files. Currently, works only reading RTF files.
> * RTFParser.jj: 
> JavaCC grammar for RTF files.
> * RTFParserHandler.java: 
> This class constructs StyledDocument from parsed content.
> Other files were generated from the grammar.
> Attached files Test.java and test.rtf are for testing purposes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.