Menu

Project Overview

Help
jedihoho
2010-10-01
2013-05-21
  • jedihoho

    jedihoho - 2010-10-01

    I saw your project and found that it is very interesting and effective.
    I would like to help you with this project. But I need some information to understand how this program work.

    I would like to know how things are organise in here and what algorithm are you using to find regular expressions in a text.

    Thank you

     
  • Josh V

    Josh V - 2010-10-01

    I'm glad to see someone interested in the project!

    The regex algorithm used is from the standard java.util.regex library. As far as organization goes, the entry point is in the class rxr.RXR, the UI is done in rxr.MainPanel, and most of the magic happens in rxr.RegexFieldListener.

    Do you have any specific questions?

     
  • jedihoho

    jedihoho - 2010-10-07

    Could you confirm me that I'm understanding correctly that

    rxr.RegexFieldListener is where we find words that match regular expression (by using java.util.regex library) and it also looks for any change in the program and response ??

    and I would like to ask you that

    Do you have any particular reasons why you put MatchTreeNodeRenderer and MatchTreeModel class as nested classes in _MatchTree _class; and also in _Util _class that has 5 classes inside it?? Do you want to decrease the number of files??

     
  • Josh V

    Josh V - 2010-10-07

    It sounds like you've got it. rxr.RegexFieldListener listens for changes on the regex, replace pattern, and test text. On a change, it recomputes the regex match, and lets the UI know that it should refresh.

    The inner MatchTree classes are inside because they would most likely not be used outside the class MatchTree. They really only make sense in the context of their enclosing class. Refactoring them outside is not out of the question, though. Util has 5 inner classes to categorize the different utility functions. They could probably be moved out.

     
  • jedihoho

    jedihoho - 2010-10-07

    I nearly understand all the code but I don't understand what are _Color _class and _System _class in _Util _class for?

    and after studying the code more carefully, I strongly agree with you about the inner MatchTree classes but I suggest you to move inner _Util _classes out. What do you think about that??

     
  • Josh V

    Josh V - 2010-10-11

    Thanks for the input. In the latest release, the Util class is now split up. Not all the methods in there are used, because that code was written for other projects as well.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.