private SessionTabWidget getActiveSessionTabWidget() { return (SessionTabWidget) getSession().getActiveSessionWindow(); }
private SessionTabWidget getActiveSessionTabWidget() { return (SessionTabWidget) getSession().getActiveSessionWindow(); }
public void fileAppend() { if (_fileManager.open(true)) { fileOpened = true; fileSaved = false; unsavedEdits = false; ActionCollection actions = getSession().getApplication().getActionCollection(); actions.enableAction(FileSaveAction.class, true); } }
public void fileAppend() { if (_fileManager.open(true)) { fileOpened = true; fileSaved = false; unsavedEdits = false; ActionCollection actions = getSession().getApplication().getActionCollection(); actions.enableAction(FileSaveAction.class, true); } }
public void undoableEditHappened(UndoableEditEvent e) { IApplication app = getSession().getApplication(); SquirrelPreferences prefs = app.getSquirrelPreferences(); if (fileOpened || fileSaved) { if (prefs.getWarnForUnsavedFileEdits()) { unsavedEdits = true; } getActiveSessionTabWidget().setUnsavedEdits(true); ActionCollection actions = getSession().getApplication().getActionCollection(); actions.enableAction(FileSaveAction.class, true); } else if (prefs.getWarnForUnsavedBufferEdits()) { unsavedEdits = true; } }
public void undoableEditHappened(UndoableEditEvent e) { IApplication app = getSession().getApplication(); SquirrelPreferences prefs = app.getSquirrelPreferences(); if (fileOpened || fileSaved) { if (prefs.getWarnForUnsavedFileEdits()) { unsavedEdits = true; } getActiveSessionTabWidget().setUnsavedEdits(true); ActionCollection actions = getSession().getApplication().getActionCollection(); actions.enableAction(FileSaveAction.class, true); } else if (prefs.getWarnForUnsavedBufferEdits()) { unsavedEdits = true; } }
public void fileOpen(File f, boolean append){ if (unsavedEdits) { showConfirmSaveDialog(); } if (_fileManager.open(f, append)) { fileOpened = true; fileSaved = false; unsavedEdits = false; ActionCollection actions = getSession().getApplication().getActionCollection(); actions.enableAction(FileSaveAction.class, false); } }
public void fileOpen(File f, boolean append){ if (unsavedEdits) { showConfirmSaveDialog(); } if (_fileManager.open(f, append)) { fileOpened = true; fileSaved = false; unsavedEdits = false; ActionCollection actions = getSession().getApplication().getActionCollection(); actions.enableAction(FileSaveAction.class, false); } }
public void fileOpen() { if (unsavedEdits) { showConfirmSaveDialog(); } if (_fileManager.open(false)) { fileOpened = true; fileSaved = false; unsavedEdits = false; ActionCollection actions = getSession().getApplication().getActionCollection(); actions.enableAction(FileSaveAction.class, false); } }
public void fileSaveAs() { if (_fileManager.saveAs()) { fileSaved = true; unsavedEdits = false; getActiveSessionTabWidget().setUnsavedEdits(false); ActionCollection actions = getSession().getApplication().getActionCollection(); actions.enableAction(FileSaveAction.class, false); } }
public void fileOpen() { if (unsavedEdits) { showConfirmSaveDialog(); } if (_fileManager.open(false)) { fileOpened = true; fileSaved = false; unsavedEdits = false; ActionCollection actions = getSession().getApplication().getActionCollection(); actions.enableAction(FileSaveAction.class, false); } }
public void fileSaveAs() { if (_fileManager.saveAs()) { fileSaved = true; unsavedEdits = false; getActiveSessionTabWidget().setUnsavedEdits(false); ActionCollection actions = getSession().getApplication().getActionCollection(); actions.enableAction(FileSaveAction.class, false); } }
public boolean fileSave() { if (_fileManager.save()) { fileSaved = true; unsavedEdits = false; getActiveSessionTabWidget().setUnsavedEdits(false); ActionCollection actions = getSession().getApplication().getActionCollection(); actions.enableAction(FileSaveAction.class, false); return true; } else { return false; } }
public boolean fileSave() { if (_fileManager.save()) { fileSaved = true; unsavedEdits = false; getActiveSessionTabWidget().setUnsavedEdits(false); ActionCollection actions = getSession().getApplication().getActionCollection(); actions.enableAction(FileSaveAction.class, false); return true; } else { return false; } }
private void _closeFile(boolean clearEditor) { if (unsavedEdits) { showConfirmSaveDialog(); } if (clearEditor) { setEntireSQLScript(""); } getActiveSessionTabWidget().setSqlFile(null); fileOpened = false; fileSaved = false; unsavedEdits = false; ActionCollection actions = getSession().getApplication().getActionCollection(); actions.enableAction(FileSaveAction.class, true); _fileManager.clearCurrentFile(); }
private void _closeFile(boolean clearEditor) { if (unsavedEdits) { showConfirmSaveDialog(); } if (clearEditor) { setEntireSQLScript(""); } getActiveSessionTabWidget().setSqlFile(null); fileOpened = false; fileSaved = false; unsavedEdits = false; ActionCollection actions = getSession().getApplication().getActionCollection(); actions.enableAction(FileSaveAction.class, true); _fileManager.clearCurrentFile(); }
private void createStandardEntryAreaMenuItems() { JMenuItem item; SquirrelResources resources = getSession().getApplication().getResources(); Action toolsPopupAction = _panel.getSession().getApplication().getActionCollection().get(ToolsPopupAction.class); item = getSQLEntryPanel().addToSQLEntryAreaMenu(toolsPopupAction); resources.configureMenuItem(toolsPopupAction, item); if(_panel.isInMainSessionWindow()) { Action vioAction = _panel.getSession().getApplication().getActionCollection().get(ViewObjectAtCursorInObjectTreeAction.class); item = getSQLEntryPanel().addToSQLEntryAreaMenu(vioAction); resources.configureMenuItem(vioAction, item); } Action formatSqlAction = _panel.getSession().getApplication().getActionCollection().get(FormatSQLAction.class); item = getSQLEntryPanel().addToSQLEntryAreaMenu(formatSqlAction); resources.configureMenuItem(formatSqlAction, item); }
private void createStandardEntryAreaMenuItems() { JMenuItem item; SquirrelResources resources = getSession().getApplication().getResources(); Action toolsPopupAction = _panel.getSession().getApplication().getActionCollection().get(ToolsPopupAction.class); item = getSQLEntryPanel().addToSQLEntryAreaMenu(toolsPopupAction); resources.configureMenuItem(toolsPopupAction, item); if(_panel.isInMainSessionWindow()) { Action vioAction = _panel.getSession().getApplication().getActionCollection().get(ViewObjectAtCursorInObjectTreeAction.class); item = getSQLEntryPanel().addToSQLEntryAreaMenu(vioAction); resources.configureMenuItem(vioAction, item); } Action formatSqlAction = _panel.getSession().getApplication().getActionCollection().get(FormatSQLAction.class); item = getSQLEntryPanel().addToSQLEntryAreaMenu(formatSqlAction); resources.configureMenuItem(formatSqlAction, item); }
private void initToolsPopUp() _toolsPopupController = new ToolsPopupController(getSession(), _panel.getSQLEntryPanel()); ActionCollection ac = getSession().getApplication().getActionCollection();
private void initToolsPopUp() _toolsPopupController = new ToolsPopupController(getSession(), _panel.getSQLEntryPanel()); ActionCollection ac = getSession().getApplication().getActionCollection();