Issue #17 new

UI work for "ExampleList" displaying custom rules

Ernie Rael
created an issue

PersistAndSplitListUI.diff patch does UI related things for working with custom rules. (I'll look at setting ExampleList's editor read-only when I get some time).

The patch from issue 14 should be applied first

  • ExamplesList.java

** add splitter for list and editor pieces

** persist size/location/split-divider

  • FindDuplicatesRefactoringPanel.java

** persist knownPattern or customPattern selected I introduced a package private version of "setPattern" with a "overrideSettings" argument

** Use JEditorPane (not JTextArea) and do setContentType

ExamplesList uses JEditorPane; FindDuplicatesRefactoringPanel uses JTextArea. I had to make FindDup... a JEditorPane (to avoid Exception about needed StyledEditorKit) so I could do setContentType to get some jVi functionality. In ExamplesList there is {{{ pattern.setContentType(org.openide.util.NbBundle.getMessage( ExamplesList.class, "ExamplesList.pattern.contentType")); }}} which seems strange to me (out of a bundle). I used {{{ pattern.setContentType(getMyTextContentType()); }}} where getMyTextContentType is a static method that could be shared.

BTW, I ended up editting the .form and guarded area to change JTextPane to JEditorPane because I couldn't figure out how to replace the text component in the scroll pane without blowing away layout related.

Comments (2)

  1. Ernie Rael reporter

    Update this patch to fix a couple of bugs

    1. set ExampleList text field to read only
    2. in FindDupRefPan, maintain LRU order of pattern read from prefs

    NOTE: the patch has the same name, don't see a way to invalidate the prevous one

    following for the latest patch: /jackpot30/ $ sum /erra/Desktop/PersistAndSplitListUI.diff 50047 61

  2. Log in to comment