1 | _convertToSQL = new AbstractAction()↵ | | |
|
2 | {↵ | | |
|
3 | public void actionPerformed(ActionEvent e)↵ | | |
|
4 | {↵ | | |
|
5 | onConvertToSQL();↵ | | |
|
6 | }↵ | | |
|
7 | };↵ | | |
|
|
8 | // i18n[hibernate.hqlToSqlLong=HQL to SQL]↵ | | |
|
9 | _convertToSQL.putValue(AbstractAction.NAME, s_stringMgr.getString("hibernate.hqlToSqlLong"));↵ | | |
|
|
10 | // i18n[hibernate.hqlToSqlShort=Convert HQL to SQL (ctrl + enter)]↵ | | |
|
11 | _convertToSQL.putValue(AbstractAction.SHORT_DESCRIPTION, s_stringMgr.getString("hibernate.hqlToSqlShort")↵ | | 1 | Settings.removeInitializer(BaseSettingsInitializer.NAME);↵
|
| | | 2 | Settings.addInitializer(new BaseSettingsInitializer(), Settings.CORE_LEVEL);↵
|
| | | 3 | /////////////////////////////////////////////////////////////////////////////////↵
|
| | | 4 | // There are a lot of goodies in the ExtSettingsInitializer↵
|
| | | 5 | // that might be interesting in th future.↵
|
| | | 6 | // Unfortunately some conflicts with some of Squirrels shortcuts↵
|
| | | 7 | // are in ExtSettingsInitializer↵
|
| | | 8 | //Settings.removeInitializer(ExtSettingsInitializer.NAME);↵
|
| | | 9 | //Settings.addInitializer(new ExtSettingsInitializer(), Settings.CORE_LEVEL);↵
|
| | | 10 | //↵
|
| | | 11 | /////////////////////////////////////////////////////////////////////////////↵
|
| | | 12 | Settings.removeInitializer(SQLSettingsInitializer.NAME);↵
|
|
12 | );↵ | | 13 | Font font = _session.getProperties().getFontInfo().createFont();↵
|
|
13 | _convertToSQL.setEnabled(false);↵ | | 14 | ↵
|
|
14 | _hibernateTabController.addToToolbar(_convertToSQL);↵ | | 15 | Settings.addInitializer(new SQLSettingsInitializer(SQLKit.class, _prefs, font, _plugin));↵
|
|
|
15 | KeyStroke ctrlEnter = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, Event.CTRL_MASK);↵ | | 16 | modifyKeyStroke↵
|
16 | _hqlEntryPanelManager.registerKeyboardAction(_convertToSQL, ctrlEnter↵ | | 17 | s();↵
|
|
| | | 18 | Document doc = getDocument();↵
|
17 | ); | | 19 | _syntaxFactory.putDocument(_session, _propertiesWrapper, doc);
|