/** * Bug: 2119937 (Windows EOL chars (CRLF) are converted to Linux EOL (LF)) * Internally, SQuirreL prefers to represent EOL as "\n". This is fine for Unix, but in Windows, EOL is * "\r\n". So, if the platform-specific EOL isn't "\n", this method will replace all "\n", with "\r\n". * Other editors on Windows will then properly display the EOL characters. * * @return a String that represents the SQL Script being saved with adjusted (if necessary) EOL characters. */ private String getEntireSQLScriptWithPlatformEolChar() { String result = _sqlPanelAPI.getEntireSQLScript(); return convertLineFeedToPlatformEOL(result); }
public void requestFocus() { checkInit(); _entry.requestFocus(); }
public MessagePanelPopupMenu() { super(); add(new ClearAction()); }
/** * View the Object at cursor in the Object Tree * * @param evt Event being executed. */ public synchronized void actionPerformed(ActionEvent evt) { if (_panel == null) { return; } String stringAtCursor = _panel.getSQLEntryPanel().getWordAtCursor(); new ObjectTreeSearch().viewObjectInObjectTree(stringAtCursor, _panel.getSession()); } }
public boolean open(File f, boolean appendToExisting) { boolean result = false; _sqlPanelAPI.getSession().selectMainTab(ISession.IMainPanelTabIndexes.SQL_TAB); result = true; if (!appendToExisting) { _sqlPanelAPI.setEntireSQLScript(""); } loadScript(f); return result; }
private SessionTabWidget getActiveSessionTabWidget() { return (SessionTabWidget)_sqlPanelAPI.getSession().getActiveSessionWindow(); }
public void actionPerformed(ActionEvent e) { _panel.getSQLEntryPanel().moveCaretToNextSQLBegin(); }
public int[] getBoundsOfSQLToBeExecuted() { int[] bounds = new int[2]; bounds[0] = getSelectionStart(); bounds[1] = getSelectionEnd(); if(bounds[0] == bounds[1]) { bounds = getSqlBoundsBySeparatorRule(getCaretPosition()); } return bounds; }
public void selectCurrentSql() { int[] boundsOfSQLToBeExecuted = getSqlBoundsBySeparatorRule(getCaretPosition()); if(boundsOfSQLToBeExecuted[0] != boundsOfSQLToBeExecuted[1]) { setSelectionStart(boundsOfSQLToBeExecuted[0]); setSelectionEnd(boundsOfSQLToBeExecuted[1]); } }
private SessionTabWidget getActiveSessionTabWidget() { return (SessionTabWidget) getSession().getActiveSessionWindow(); }
public void actionPerformed(ActionEvent e) { if (stmt != null) { CancelStatementThread cst = new CancelStatementThread(new StatementWrapper(stmt), messageHandler); cst.tryCancel(); } }
public EditableSqlCheck(SQLExecutionInfo exInfo) { if(null == exInfo || null == exInfo.getSQL()) { return; } _tableNameFromSQL = getTableFromSQLIntern(exInfo.getSQL()); }
public void setSQL(String sql) { _entryPanelManager.getEntryPanel().setText(sql, false); }
/** * Replace the currently selected text in the SQL entry area * with the passed text. * * @param sqlScript The script to be placed in the SQL entry area. */ public void replaceSelection(String sqlScript) { _comp.replaceSelection(sqlScript); }
public boolean open(File f, boolean appendToExisting) { boolean result = false; _sqlPanelAPI.getSession().selectMainTab(ISession.IMainPanelTabIndexes.SQL_TAB); result = true; if (!appendToExisting) { _sqlPanelAPI.setEntireSQLScript(""); } loadScript(f); return result; }
public void actionPerformed(ActionEvent e) { if (stmt != null) { CancelStatementThread cst = new CancelStatementThread(new StatementWrapper(stmt), messageHandler); cst.tryCancel(); } }
/** * Bug: 2119937 (Windows EOL chars (CRLF) are converted to Linux EOL (LF)) * Internally, SQuirreL prefers to represent EOL as "\n". This is fine for Unix, but in Windows, EOL is * "\r\n". So, if the platform-specific EOL isn't "\n", this method will replace all "\n", with "\r\n". * Other editors on Windows will then properly display the EOL characters. * * @return a String that represents the SQL Script being saved with adjusted (if necessary) EOL characters. */ private String getEntireSQLScriptWithPlatformEolChar() { String result = _sqlPanelAPI.getEntireSQLScript(); return convertLineFeedToPlatformEOL(result); }
public void requestFocus() { checkInit(); _entry.requestFocus(); }
public MessagePanelPopupMenu() { super(); add(new ClearAction()); }
public EditableSqlCheck(SQLExecutionInfo exInfo) { if(null == exInfo || null == exInfo.getSQL()) { return; } _tableNameFromSQL = getTableFromSQLIntern(exInfo.getSQL()); }