Directory Studio
  1. Directory Studio
  2. DIRSTUDIO-47

Improve filter widget and filter editor dialog

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.0
    • Component/s: studio-ldapbrowser
    • Labels:
      None

      Description

      The filter widget is used in search dialog, export wizards, batch wizard and filter children dialog. It has to be improved:

      • Currently the filter widget accecpts malformed filters.
      • Add support for extensible matching.
      • Replace poor internal filter parser by the rich sharded-ldap filter parser. Perhaps the shared-ldap filter model and parser must be extended to track token offsets.
      • Improve content assistent

        Activity

        Hide
        Stefan Seelmann added a comment -

        I tried to include the shared-ldap filter parser into LS, however the antlr based filter parser in shared-ldap doesn't fit the needs of an filter parser in LS:

        • Parse incomplete filters: The shared-ldap parser is designed to parse complete filters. But it isn't possible to parse incomplete filters. When typing the filter into the text field, for example
          (teleph
          the antlr based filter parser just throws and exception "unexpected token". It doesn't provide any information about the edited part of the filter and it isn't possible to provide context sensitive content assistence to the user.
        • Error tolerance: The antlr based parser stops if an unexpected character occurs. For a filter builder it is necessary to have an parser that continues when unexpected characters occurs. That makes it possible to mark (red squirrel) the invalid characters in the editor.
        • Position tracking: For a filter builder it is necessary to get the position of each token (left parenthesis, attribute, assertion, value, ...) to enable syntax highlighting and context sensitive content assistent. With the antlr based parser it is possible to track the line and columnt but it doesn't fit the Eclipse editor framework reqirements.

        For that reasons I prefer to to keep and improve the hand-written filter parser in LS.

        Show
        Stefan Seelmann added a comment - I tried to include the shared-ldap filter parser into LS, however the antlr based filter parser in shared-ldap doesn't fit the needs of an filter parser in LS: Parse incomplete filters: The shared-ldap parser is designed to parse complete filters. But it isn't possible to parse incomplete filters. When typing the filter into the text field, for example (teleph the antlr based filter parser just throws and exception "unexpected token". It doesn't provide any information about the edited part of the filter and it isn't possible to provide context sensitive content assistence to the user. Error tolerance: The antlr based parser stops if an unexpected character occurs. For a filter builder it is necessary to have an parser that continues when unexpected characters occurs. That makes it possible to mark (red squirrel) the invalid characters in the editor. Position tracking: For a filter builder it is necessary to get the position of each token (left parenthesis, attribute, assertion, value, ...) to enable syntax highlighting and context sensitive content assistent. With the antlr based parser it is possible to track the line and columnt but it doesn't fit the Eclipse editor framework reqirements. For that reasons I prefer to to keep and improve the hand-written filter parser in LS.
        Show
        Stefan Seelmann added a comment - Resolved in commits http://svn.apache.org/viewvc?view=rev&revision=543272 and http://svn.apache.org/viewvc?view=rev&revision=545640

          People

          • Assignee:
            Stefan Seelmann
            Reporter:
            Stefan Seelmann
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development