public void load(ISession session, PreparedStatement stmt) { getTextArea().setText(""); ResultSet rs = null; try { rs = stmt.executeQuery(); StringBuffer buf = new StringBuffer(4096); while (rs.next()) { buf.append(rs.getString(1)); } getTextArea().setText(buf.toString()); getTextArea().setCaretPosition(0); } catch (SQLException ex) { session.showErrorMessage(ex); } finally { SQLUtilities.closeResultSet(rs); } }
public void load(ISession session, PreparedStatement stmt) { getTextArea().setText(""); ResultSet rs = null; try { rs = stmt.executeQuery(); StringBuffer buf = new StringBuffer(4096); while (rs.next()) { buf.append(rs.getString(1)); } getTextArea().setText(buf.toString()); getTextArea().setCaretPosition(0); } catch (SQLException ex) { session.showErrorMessage(ex); } finally { SQLUtilities.closeResultSet(rs); } }
/** * Create a instance of {@link BaseSourcePanel}. * Per default, a {@link DefaultSourcePanel} is used. * Subclasses can use this to override the default behavior provided by the DefaultSourcePanel, with a * subclass of BaseSourcePanel. * @return The source panel to use. */ protected BaseSourcePanel createSourcePanel() { /* * This callback method replaces the previous use of setSourcePanel, because since we use syntax highlightning, we need a session. * So we need a callback for "lazy" initialization of the source pane. */ return new DefaultSourcePanel(getSession()); }
/** * Create a instance of {@link BaseSourcePanel}. * Per default, a {@link DefaultSourcePanel} is used. * Subclasses can use this to override the default behavior provided by the DefaultSourcePanel, with a * subclass of BaseSourcePanel. * @return The source panel to use. */ protected BaseSourcePanel createSourcePanel() { /* * This callback method replaces the previous use of setSourcePanel, because since we use syntax highlightning, we need a session. * So we need a callback for "lazy" initialization of the source pane. */ return new DefaultSourcePanel(getSession()); }