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

Summary: Simplyfy SQLHistory and SQLHistoryPanel
Product: db Reporter: matthias42
Component: CodeAssignee: Jiri Rechtacek <jrechtacek>
Status: RESOLVED FIXED    
Severity: normal Keywords: NETFIX
Priority: P2    
Version: 7.0.1   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 149929, 204552    
Attachments: Proposed patch v1 (it is against nightly build 201110300600)
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)

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