提交 ab938337 编写于 作者: J jurgen

SQL editor cursor repositioning

上级 daa9b58d
......@@ -1239,6 +1239,7 @@ public class CoreMessages extends NLS {
public static String pref_page_sql_editor_checkbox_enable_sql_parameters;
public static String pref_page_sql_editor_title_pattern;
public static String pref_page_sql_editor_checkbox_put_new_scripts;
public static String pref_page_sql_editor_checkbox_reset_cursor;
public static String pref_page_sql_editor_checkbox_enable_sql_anonymous_parameters;
public static String pref_page_sql_editor_text_anonymous_parameter_mark;
......@@ -1259,7 +1260,7 @@ public class CoreMessages extends NLS {
public static String pref_page_sql_editor_group_common;
public static String pref_page_sql_editor_group_resources;
public static String pref_page_sql_editor_group_misc;
public static String pref_page_sql_editor_group_scripts;
public static String pref_page_sql_editor_label_commit_after_line;
......
......@@ -826,6 +826,7 @@ pref_page_sql_editor_checkbox_enable_sql_anonymous_parameters=Anonymous SQL para
pref_page_sql_editor_text_anonymous_parameter_mark=Anonymous parameter mark
pref_page_sql_editor_checkbox_put_new_scripts=Put new scripts in folders
pref_page_sql_editor_title_pattern=Script title pattern
pref_page_sql_editor_checkbox_reset_cursor=Reset cursor after execute
pref_page_sql_editor_combo_item_each_line_autocommit=After each line (autocommit)
pref_page_sql_editor_combo_item_each_spec_line=After each specified line
pref_page_sql_editor_combo_item_ignore=Ignore
......@@ -835,6 +836,7 @@ pref_page_sql_editor_combo_item_stop_commit=Stop + commit
pref_page_sql_editor_combo_item_stop_rollback=Stop + rollback
pref_page_sql_editor_group_common=Common
pref_page_sql_editor_group_resources=Resources
pref_page_sql_editor_group_misc=Miscellaneous
pref_page_sql_editor_group_scripts=Scripts
pref_page_sql_editor_label_commit_after_line=Commit after line
pref_page_sql_editor_label_commit_type=Commit type
......
......@@ -57,6 +57,7 @@ public class PrefPageSQLEditor extends TargetPrefPage
private Button acBracketsCheck;
private Button autoFoldersCheck;
private Text scriptTitlePattern;
private Button resetCursorCheck;
public PrefPageSQLEditor()
{
......@@ -73,7 +74,8 @@ public class PrefPageSQLEditor extends TargetPrefPage
store.contains(DBeaverPreferences.SCRIPT_TITLE_PATTERN) ||
store.contains(SQLPreferenceConstants.SQLEDITOR_CLOSE_SINGLE_QUOTES) ||
store.contains(SQLPreferenceConstants.SQLEDITOR_CLOSE_DOUBLE_QUOTES) ||
store.contains(SQLPreferenceConstants.SQLEDITOR_CLOSE_BRACKETS)
store.contains(SQLPreferenceConstants.SQLEDITOR_CLOSE_BRACKETS) ||
store.contains(SQLPreferenceConstants.RESET_CURSOR_ON_EXECUTE)
;
}
......@@ -173,6 +175,15 @@ public class PrefPageSQLEditor extends TargetPrefPage
legendLabel.setText(legend.toString());
*/
}
// Misc
{
Composite miscGroup = UIUtils.createControlGroup(composite2, CoreMessages.pref_page_sql_editor_group_misc, 2, GridData.FILL_BOTH, 0);
((GridData) miscGroup.getLayoutData()).horizontalSpan = 2;
resetCursorCheck = UIUtils.createLabelCheckbox(miscGroup, CoreMessages.pref_page_sql_editor_checkbox_reset_cursor, false);
}
return composite;
}
......@@ -200,6 +211,8 @@ public class PrefPageSQLEditor extends TargetPrefPage
autoFoldersCheck.setSelection(store.getBoolean(DBeaverPreferences.SCRIPT_AUTO_FOLDERS));
scriptTitlePattern.setText(store.getString(DBeaverPreferences.SCRIPT_TITLE_PATTERN));
resetCursorCheck.setSelection(store.getBoolean(SQLPreferenceConstants.RESET_CURSOR_ON_EXECUTE));
} catch (Exception e) {
log.warn(e);
}
......@@ -230,6 +243,8 @@ public class PrefPageSQLEditor extends TargetPrefPage
store.setValue(DBeaverPreferences.SCRIPT_AUTO_FOLDERS, autoFoldersCheck.getSelection());
store.setValue(DBeaverPreferences.SCRIPT_TITLE_PATTERN, scriptTitlePattern.getText());
store.setValue(SQLPreferenceConstants.RESET_CURSOR_ON_EXECUTE, resetCursorCheck.getSelection());
} catch (Exception e) {
log.warn(e);
}
......@@ -253,6 +268,8 @@ public class PrefPageSQLEditor extends TargetPrefPage
store.setToDefault(DBeaverPreferences.SCRIPT_AUTO_FOLDERS);
store.setToDefault(DBeaverPreferences.SCRIPT_TITLE_PATTERN);
store.setToDefault(SQLPreferenceConstants.RESET_CURSOR_ON_EXECUTE);
}
@Override
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册