This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 204550 - Simplyfy SQLHistory and SQLHistoryPanel
Summary: Simplyfy SQLHistory and SQLHistoryPanel
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.0.1
Hardware: PC Linux
: P2 normal (vote)
Assignee: Jiri Rechtacek
URL:
Keywords: NETFIX
Depends on:
Blocks: 149929 204552
  Show dependency tree
 
Reported: 2011-11-01 22:11 UTC by matthias42
Modified: 2012-02-10 17:07 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Proposed patch v1 (it is against nightly build 201110300600) (140.93 KB, patch)
2011-11-01 22:11 UTC, matthias42
Details | Diff
Modify first patch to survivy multiple modules providing xerces (see http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/classpath.html#syscl) (140.00 KB, patch)
2011-12-23 20:07 UTC, matthias42
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description matthias42 2011-11-01 22:11:57 UTC
Created attachment 112701 [details]
Proposed patch v1 (it is against nightly build 201110300600)

I had a closer look at the SQLHistory implementation and I think the solution I saw was much more difficult, than it should be. Attached you find a patch, that represents this. Main points that are archived:

1. Move XML Parsing to JAXB instead of lowlevel SAX
2. Unify persistence handling into SQLHistoryManager and get rid of the Persistence Manager
3. Let the SQLHistory expose its structure as a Set, which makes it more convenient to manipulate the contents.
4. Clean up the SQLHistoryPanel:
   -> use less classes to implement the panel
   -> clean the HistoryTableModel
   -> use Swing RowSorter/RowFilter for the designated tasks

In addition to the smaller code base, this also fixes at least one bug, which I will make dependend on this.

Additionally I created another patch to implement deleting of statement from the set.
Comment 1 Jiri Rechtacek 2011-11-09 17:57:59 UTC
I'm sorry, we are too close to code-freeze of NB7.1, will applied in NB7.2 once NB7.1 will be branched out.
Comment 2 matthias42 2011-12-23 20:07:35 UTC
Created attachment 114436 [details]
Modify first patch to survivy multiple modules providing xerces (see http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/classpath.html#syscl)
Comment 3 Jiri Rechtacek 2012-02-10 17:07:01 UTC
The patch was applied in core-main/rev/783f7b73d4df