提交 dd519197 编写于 作者: S Serge Rider

Merge remote-tracking branch 'origin/devel' into devel

......@@ -409,7 +409,7 @@ public class StreamConsumerPageSettings extends ActiveWizardPage<DataTransferWiz
UIUtils.asyncExec(() -> {
viewer.setInput(mappings);
viewer.expandAll(true);
UIUtils.packColumns(viewer.getTree(), false, new float[]{0.75f, 0.25f});
UIUtils.packColumns(viewer.getTree(), true, new float[]{0.75f, 0.25f});
updateCompletion();
});
......
......@@ -34,8 +34,6 @@ public class SQLServerUIMessages extends NLS {
public static String dialog_connection_user_name_label;
public static String dialog_setting_show_all_schemas;
public static String dialog_setting_show_all_schemas_tip;
public static String dialog_setting_close_existing_connections;
public static String dialog_setting_close_existing_connections_tip;
public static String dialog_setting_trust_server_certificate;
public static String dialog_setting_trust_server_certificate_tip;
public static String dialog_setting_ssl_advanced_hostname_label;
......
......@@ -10,8 +10,6 @@ dialog_connection_port_label=Port:
dialog_connection_user_name_label=User name:
dialog_setting_show_all_schemas=Show All Schemas
dialog_setting_show_all_schemas_tip=Shows all database schemas. If disabled shows only non-empty schemas.
dialog_setting_close_existing_connections=Close existing connections before deleting database
dialog_setting_close_existing_connections_tip=Closes all remote connections that use this database and thus prevent its deletion.
dialog_setting_trust_server_certificate=Trust Server Certificate
dialog_setting_trust_server_certificate_tip=If "true", the SQL Server SSL certificate is automatically trusted when the communication layer is encrypted using SSL.\nIf "false", the Microsoft JDBC Driver for SQL Server validates the server SSL certificate.\nIf the server certificate validation fails, the driver raises an error and terminate the connection.
dialog_setting_ssl_advanced_hostname_label=Certificate hostname
......
......@@ -10,8 +10,6 @@ dialog_connection_port_label=\u041F\u043E\u0440\u0442:
dialog_connection_user_name_label=\u0418\u043C\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F:
dialog_setting_show_all_schemas=\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0432\u0441\u0435 \u0441\u0445\u0435\u043C\u044B
dialog_setting_show_all_schemas_tip=\u041F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0441\u0445\u0435\u043C\u044B \u0431\u0430\u0437\u044B \u0434\u0430\u043D\u043D\u044B\u0445. \u0415\u0441\u043B\u0438 \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u043E, \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E \u043D\u0435\u043F\u0443\u0441\u0442\u044B\u0435 \u0441\u0445\u0435\u043C\u044B.
dialog_setting_close_existing_connections=\u0417\u0430\u043A\u0440\u044B\u0432\u0430\u0442\u044C \u0432\u0441\u0435 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0435 \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u044F \u043F\u0435\u0440\u0435\u0434 \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u0435\u043C \u0411\u0414
dialog_setting_close_existing_connections_tip=\u0417\u0430\u043A\u0440\u044B\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0435 \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u044F, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u043C\u043E\u0433\u0443\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0411\u0414 \u0438 \u0442\u0435\u043C \u0441\u0430\u043C\u044B\u043C \u043C\u0435\u0448\u0430\u0442\u044C \u0435\u0451 \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u044E.
dialog_setting_trust_server_certificate=\u0412\u0441\u0435\u0433\u0434\u0430 \u0434\u043E\u0432\u0435\u0440\u044F\u0442\u044C \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0430
dialog_setting_trust_server_certificate_tip=\u0415\u0441\u043B\u0438 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 "true", \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043A\u0430\u0442 SSL SQL Server \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u0441\u044F \u0434\u043E\u0432\u0435\u0440\u0435\u043D\u043D\u044B\u043C, \u043A\u043E\u0433\u0434\u0430 \u0443\u0440\u043E\u0432\u0435\u043D\u044C \u0441\u0432\u044F\u0437\u0438 \u0448\u0438\u0444\u0440\u0443\u0435\u0442\u0441\u044F \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E SSL.\n\u0415\u0441\u043B\u0438 "false", \u0434\u0440\u0430\u0439\u0432\u0435\u0440 Microsoft JDBC \u0434\u043B\u044F SQL Server \u043F\u0440\u043E\u0432\u0435\u0440\u044F\u0435\u0442 SSL-\u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043A\u0430\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.\n\u0415\u0441\u043B\u0438 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044F \u043D\u0435\u0443\u0434\u0430\u0447\u043D\u043E, \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0432\u044B\u0437\u044B\u0432\u0430\u0435\u0442 \u043E\u0448\u0438\u0431\u043A\u0443 \u0438 \u0440\u0430\u0437\u0440\u044B\u0432\u0430\u0435\u0442 \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0435.
dialog_setting_ssl_advanced_hostname_label=\u0418\u043C\u044F \u0445\u043E\u0441\u0442\u0430 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u0430
......
......@@ -89,7 +89,6 @@ public class SQLServerConstants {
public static final String PROP_AUTHENTICATION = DBConstants.INTERNAL_PROP_PREFIX + "authentication@";
public static final String PROP_SHOW_ALL_SCHEMAS = DBConstants.INTERNAL_PROP_PREFIX + "show-all-schemas@";
public static final String PROP_CLOSE_EXISTING_CONNECTIONS = "closeExistingConnections";
public static final String PROP_CONNECTION_INTEGRATED_SECURITY = "integratedSecurity";
public static final String PROP_CONNECTION_AUTHENTICATION = "authentication";
public static final String PROP_CONNECTION_AUTHENTICATION_SCHEME = "authenticationScheme";
......
......@@ -59,9 +59,9 @@ public abstract class SQLServerBaseTableManager<OBJECT extends SQLServerTableBas
new SQLDatabasePersistAction(
"Add table comment",
"EXEC " + SQLServerUtils.getSystemTableName(table.getDatabase(), isUpdate ? "sp_updateextendedproperty" : "sp_addextendedproperty") +
" 'MS_Description', N" + SQLUtils.quoteString(command.getObject(), command.getObject().getDescription()) + "," +
" 'schema', N'" + table.getSchema().getName() + "'," +
" '" + (table.isView() ? "view" : "table") + "', N'" + table.getName() + "'"));
" 'MS_Description', " + SQLUtils.quoteString(table, table.getDescription()) + "," +
" 'schema', " + SQLUtils.quoteString(table, table.getSchema().getName()) + "," +
" '" + (table.isView() ? "view" : "table") + "', " + SQLUtils.quoteString(table, table.getName())));
}
}
......@@ -74,7 +74,7 @@ public abstract class SQLServerBaseTableManager<OBJECT extends SQLServerTableBas
"Rename table",
"EXEC " + SQLServerUtils.getSystemTableName(object.getDatabase(), "sp_rename") +
" N'" + object.getSchema().getFullyQualifiedName(DBPEvaluationContext.DML) + "." + DBUtils.getQuotedIdentifier(object.getDataSource(), command.getOldName()) +
"' , N'" + DBUtils.getQuotedIdentifier(object.getDataSource(), command.getNewName()) + "', 'OBJECT'")
"', " + SQLUtils.quoteString(object.getDataSource(), command.getNewName()) + ", 'OBJECT'")
);
}
......
......@@ -17,8 +17,6 @@
package org.jkiss.dbeaver.ext.mssql.edit;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.ext.mssql.SQLServerConstants;
import org.jkiss.dbeaver.ext.mssql.internal.SQLServerActivator;
import org.jkiss.dbeaver.ext.mssql.model.SQLServerDataSource;
import org.jkiss.dbeaver.ext.mssql.model.SQLServerDatabase;
import org.jkiss.dbeaver.model.DBPDataSource;
......@@ -33,6 +31,7 @@ import org.jkiss.dbeaver.model.impl.sql.edit.SQLObjectEditor;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import org.jkiss.dbeaver.model.struct.DBSObject;
import org.jkiss.dbeaver.model.struct.cache.DBSObjectCache;
import org.jkiss.utils.CommonUtils;
import java.util.List;
import java.util.Map;
......@@ -64,7 +63,7 @@ public class SQLServerDatabaseManager extends SQLObjectEditor<SQLServerDatabase,
@Override
protected void addObjectDeleteActions(DBRProgressMonitor monitor, DBCExecutionContext executionContext, List<DBEPersistAction> actions, ObjectDeleteCommand command, Map<String, Object> options) {
if (SQLServerActivator.getDefault().getPreferences().getBoolean(SQLServerConstants.PROP_CLOSE_EXISTING_CONNECTIONS)) {
if (CommonUtils.getOption(options, DBEObjectMaker.OPTION_CLOSE_EXISTING_CONNECTIONS)) {
actions.add(new SQLDatabasePersistAction(
"Drop database connections",
"ALTER DATABASE " + DBUtils.getQuotedIdentifier(command.getObject()) + " SET SINGLE_USER WITH ROLLBACK IMMEDIATE;"
......@@ -90,7 +89,7 @@ public class SQLServerDatabaseManager extends SQLObjectEditor<SQLServerDatabase,
@Override
public long getMakerOptions(DBPDataSource dataSource) {
return DBEObjectMaker.FEATURE_SAVE_IMMEDIATELY;
return DBEObjectMaker.FEATURE_SAVE_IMMEDIATELY | DBEObjectMaker.FEATURE_CLOSE_EXISTING_CONNECTIONS;
}
@Override
......
......@@ -120,9 +120,9 @@ public class SQLServerProcedureManager extends SQLServerObjectManager<SQLServerP
new SQLDatabasePersistAction(
"Add procedure comment",
"EXEC " + SQLServerUtils.getSystemTableName(database, isUpdate ? "sp_updateextendedproperty" : "sp_addextendedproperty") +
" 'MS_Description', N" + SQLUtils.quoteString(command.getObject(), command.getObject().getDescription()) + "," +
" 'schema', N'" + procedure.getContainer().getName() + "'," +
" 'procedure', N'" + procedure.getName() + "'"));
" 'MS_Description', " + SQLUtils.quoteString(procedure, procedure.getDescription()) + "," +
" 'schema', " + SQLUtils.quoteString(procedure, procedure.getContainer().getName()) + "," +
" 'procedure', " + SQLUtils.quoteString(procedure, procedure.getName())));
}
}
......
......@@ -170,10 +170,10 @@ public class SQLServerTableColumnManager extends SQLTableColumnManager<SQLServer
new SQLDatabasePersistAction(
"Add column comment",
"EXEC " + SQLServerUtils.getSystemTableName(column.getTable().getDatabase(), isUpdate ? "sp_updateextendedproperty" : "sp_addextendedproperty") +
" 'MS_Description', N" + SQLUtils.quoteString(command.getObject(), command.getObject().getDescription()) + "," +
" 'schema', N'" + column.getTable().getSchema().getName() + "'," +
" 'table', N'" + column.getTable().getName() + "'," +
" 'column', N'" + column.getName() + "'"));
" 'MS_Description', " + SQLUtils.quoteString(column, column.getDescription()) + "," +
" 'schema', " + SQLUtils.quoteString(column, column.getTable().getSchema().getName()) + "," +
" 'table', " + SQLUtils.quoteString(column, column.getTable().getName()) + "," +
" 'column', " + SQLUtils.quoteString(column, column.getName())));
}
if (totalProps > 0) {
actionList.add(new SQLDatabasePersistAction(
......
......@@ -29,10 +29,5 @@ public class SQLServerPreferencesInitializer extends AbstractPreferenceInitializ
@Override
public void initializeDefaultPreferences() {
// Init default preferences
DBPPreferenceStore store = new BundlePreferenceStore(SQLServerActivator.getDefault().getBundle());
// Common
PrefUtils.setDefaultPreferenceValue(store, SQLServerConstants.PROP_CLOSE_EXISTING_CONNECTIONS, true);
}
}
......@@ -248,4 +248,27 @@ public class SQLServerDialect extends JDBCSQLDialect {
sql.append("\nSELECT\t'Return Value' = @return_value\n\n");
sql.append("GO\n\n");
}
@Override
public boolean isQuotedString(String string) {
if (string.length() >= 3 && string.charAt(0) == 'N') {
// https://docs.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql
return super.isQuotedString(string.substring(1));
}
return super.isQuotedString(string);
}
@Override
public String getQuotedString(String string) {
return 'N' + super.getQuotedString(string);
}
@Override
public String getUnquotedString(String string) {
if (string.length() >= 3 && string.charAt(0) == 'N') {
// https://docs.microsoft.com/en-us/sql/t-sql/data-types/nchar-and-nvarchar-transact-sql
return super.getUnquotedString(string.substring(1));
}
return super.getUnquotedString(string);
}
}
......@@ -155,7 +155,7 @@ public class MySQLTableColumn extends JDBCTableColumn<MySQLTableBase> implements
case STRING:
// Escape if it is not NULL (#1913)
// Although I didn't reproduce that locally - perhaps depends on server config.
if (!SQLConstants.NULL_VALUE.equals(defaultValue) && !SQLUtils.isStringQuoted(defaultValue)) {
if (!SQLConstants.NULL_VALUE.equals(defaultValue) && !SQLUtils.isStringQuoted(getDataSource(), defaultValue)) {
defaultValue = SQLUtils.quoteString(getDataSource(), defaultValue);
}
break;
......
......@@ -433,6 +433,21 @@ public abstract class AbstractSQLDialect implements SQLDialect {
return identifier;
}
@Override
public boolean isQuotedString(String string) {
return string.length() >= 2 && string.charAt(0) == '\'' && string.charAt(string.length() - 1) == '\'';
}
@Override
public String getQuotedString(String string) {
return '\'' + escapeString(string) + '\'';
}
@Override
public String getUnquotedString(String string) {
return isQuotedString(string) ? unEscapeString(string.substring(1, string.length() - 1)) : string;
}
@NotNull
@Override
public String escapeString(String string) {
......
......@@ -292,6 +292,12 @@ public interface SQLDialect {
String getUnquotedIdentifier(String identifier);
boolean isQuotedString(String string);
String getQuotedString(String string);
String getUnquotedString(String string);
/**
* Escapes string to make usable inside of SQL queries.
* Basically it has to escape only ' character which delimits strings.
......
......@@ -210,9 +210,8 @@ public final class SQLUtils {
}
}
public static boolean isStringQuoted(String string)
{
return string.length() > 1 && string.startsWith("'") && string.endsWith("'");
public static boolean isStringQuoted(DBSObject object, String string) {
return object.getDataSource().getSQLDialect().isQuotedString(string);
}
public static String quoteString(DBSObject object, String string)
......@@ -222,7 +221,7 @@ public final class SQLUtils {
public static String quoteString(DBPDataSource dataSource, String string)
{
return "'" + escapeString(dataSource, string) + "'";
return dataSource.getSQLDialect().getQuotedString(string);
}
public static String escapeString(DBPDataSource dataSource, String string)
......@@ -661,12 +660,9 @@ public final class SQLUtils {
case STRING:
case ROWID:
if (sqlDialect != null) {
strValue = sqlDialect.escapeString(strValue);
}
if (dataKind == DBPDataKind.STRING || !(strValue.startsWith("'") && strValue.endsWith("'"))) {
strValue = '\'' + strValue + '\'';
return sqlDialect.getTypeCastClause(attribute, sqlDialect.getQuotedString(strValue));
}
return sqlDialect.getTypeCastClause(attribute, strValue);
return strValue;
default:
if (sqlDialect != null) {
return sqlDialect.escapeScriptValue(attribute, value, strValue);
......
......@@ -175,17 +175,34 @@ public class SQLSemanticProcessor {
orderByElements = new ArrayList<>();
select.setOrderByElements(orderByElements);
}
for (DBDAttributeConstraint co : filter.getOrderConstraints()) {
String columnName = co.getAttributeName();
boolean forceNumeric = filter.hasNameDuplicates(columnName) || !SQLUtils.PATTERN_SIMPLE_NAME.matcher(columnName).matches();
Expression orderExpr = getOrderConstraintExpression(monitor, dataSource, select, co, forceNumeric);
OrderByElement element = new OrderByElement();
element.setExpression(orderExpr);
if (co.isOrderDescending()) {
element.setAsc(false);
element.setAscDescPresent(true);
List<DBDAttributeConstraint> orderConstraints = filter.getOrderConstraints();
if (!CommonUtils.isEmpty(orderConstraints)) {
for (DBDAttributeConstraint co : orderConstraints) {
String columnName = co.getAttributeName();
boolean forceNumeric = filter.hasNameDuplicates(columnName) || !SQLUtils.PATTERN_SIMPLE_NAME.matcher(columnName).matches();
Expression orderExpr = getOrderConstraintExpression(monitor, dataSource, select, co, forceNumeric);
OrderByElement element = new OrderByElement();
element.setExpression(orderExpr);
if (co.isOrderDescending()) {
element.setAsc(false);
element.setAscDescPresent(true);
}
orderByElements.add(element);
}
} else {
Expression expression;
String filterOrder = filter.getOrder();
try {
expression = CCJSqlParserUtil.parseExpression(filterOrder);
} catch (JSQLParserException e) {
// Can't parse. Let's use custom expression
expression = new CustomExpression(filterOrder);
}
if (expression != null) {
OrderByElement element = new OrderByElement();
element.setExpression(expression);
orderByElements.add(element);
}
orderByElements.add(element);
}
}
......
......@@ -61,6 +61,17 @@ public class EditorsMessages extends NLS {
public static String dialog_struct_columns_select_column;
public static String dialog_struct_columns_type;
public static String dialog_morph_delimited_shell_text;
public static String dialog_morph_delimited_source_group;
public static String dialog_morph_delimited_source_group_delimiter;
public static String dialog_morph_delimited_target_group_label;
public static String dialog_morph_delimited_target_group_delim_result;
public static String dialog_morph_delimited_target_group_delim_quote;
public static String dialog_morph_delimited_target_group_spinner_wrap_line;
public static String dialog_morph_delimited_target_group_spinner_wrap_line_tip;
public static String dialog_morph_delimited_target_group_leading_text;
public static String dialog_morph_delimited_target_group_trailing_text;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, EditorsMessages.class);
......
......@@ -36,3 +36,14 @@ dialog_struct_edit_fk_label_ref_table = Reference table
dialog_struct_edit_fk_label_table = Table
dialog_struct_edit_fk_title = {0} for table "{1}"
dialog_struct_edit_index_label_type = Type
dialog_morph_delimited_shell_text = Delimited text options
dialog_morph_delimited_source_group = Source
dialog_morph_delimited_source_group_delimiter = Column Delimiter
dialog_morph_delimited_target_group_label = Target
dialog_morph_delimited_target_group_delim_result = Result delimiter
dialog_morph_delimited_target_group_delim_quote = String quote character
dialog_morph_delimited_target_group_spinner_wrap_line = Wrap line at column
dialog_morph_delimited_target_group_spinner_wrap_line_tip = Inserts line feeds after specified number of characters. Zero means no wrap.
dialog_morph_delimited_target_group_leading_text = Leading text
dialog_morph_delimited_target_group_trailing_text = Trailing text
\ No newline at end of file
......@@ -35,3 +35,14 @@ dialog_struct_edit_fk_label_ref_table = \u0421\u0432\u044F\u0437\u0430\u043D\u04
dialog_struct_edit_fk_label_table = \u0422\u0430\u0431\u043B\u0438\u0446\u0430
dialog_struct_edit_fk_title = {0} \u0434\u043B\u044F \u0442\u0430\u0431\u043B\u0438\u0446\u044B "{1}"
dialog_struct_edit_index_label_type = \u0422\u0438\u043F
dialog_morph_delimited_shell_text = \u041E\u043F\u0446\u0438\u0438 \u0440\u0430\u0437\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u0438\u044F \u0442\u0435\u043A\u0441\u0442\u0430
dialog_morph_delimited_source_group = \u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A
dialog_morph_delimited_source_group_delimiter = \u0420\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044C \u043A\u043E\u043B\u043E\u043D\u043E\u043A
dialog_morph_delimited_target_group_label = \u0426\u0435\u043B\u044C
dialog_morph_delimited_target_group_delim_result = \u0420\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044C \u0438\u0442\u043E\u0433\u043E\u0432
dialog_morph_delimited_target_group_delim_quote = \u0421\u0438\u043C\u0432\u043E\u043B \u0446\u0438\u0442\u0430\u0442\u044B \u0441\u0442\u0440\u043E\u043A\u0438
dialog_morph_delimited_target_group_spinner_wrap_line = \u041E\u0431\u043E\u0440\u0430\u0447\u0438\u0432\u0430\u043D\u0438\u0435 \u043B\u0438\u043D\u0438\u0438 \u0432 \u043A\u043E\u043B\u043E\u043D\u043A\u0443
dialog_morph_delimited_target_group_spinner_wrap_line_tip = \u0412\u0441\u0442\u0430\u0432\u043B\u044F\u0435\u0442 \u043F\u0435\u0440\u0435\u0432\u043E\u0434\u044B \u0441\u0442\u0440\u043E\u043A \u043F\u043E\u0441\u043B\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u043D\u043E\u0433\u043E \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432. \u041D\u043E\u043B\u044C \u043E\u0437\u043D\u0430\u0447\u0430\u0435\u0442 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043E\u0431\u0451\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u044F.
dialog_morph_delimited_target_group_leading_text = \u0412\u0435\u0434\u0443\u0449\u0438\u0439 \u0442\u0435\u043A\u0441\u0442
dialog_morph_delimited_target_group_trailing_text = \u0417\u0430\u043A\u043B\u044E\u0447\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u0442\u0435\u043A\u0441\u0442
......@@ -33,6 +33,7 @@ import org.eclipse.swt.widgets.*;
import org.eclipse.ui.handlers.HandlerUtil;
import org.jkiss.dbeaver.runtime.DBWorkbench;
import org.jkiss.dbeaver.ui.UIUtils;
import org.jkiss.dbeaver.ui.editors.internal.EditorsMessages;
import org.jkiss.dbeaver.ui.editors.text.BaseTextEditor;
import org.jkiss.utils.CommonUtils;
......@@ -279,7 +280,7 @@ public final class MorphDelimitedListHandler extends AbstractTextHandler {
@Override
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
newShell.setText("Delimited text options");
newShell.setText(EditorsMessages.dialog_morph_delimited_shell_text);
}
@Override
......@@ -291,20 +292,20 @@ public final class MorphDelimitedListHandler extends AbstractTextHandler {
int textWidthHint = UIUtils.getFontHeight(parent) * 10;
{
Group sourceGroup = UIUtils.createControlGroup(group, "Source", 2, GridData.FILL_HORIZONTAL, SWT.DEFAULT);
sourceDelimCombo = UIUtils.createDelimiterCombo(sourceGroup, "Column Delimiter", new String[] {"\n", "\t", ";", ","}, morphSettings.getSourceDelimiter(), true);
Group sourceGroup = UIUtils.createControlGroup(group, EditorsMessages.dialog_morph_delimited_source_group, 2, GridData.FILL_HORIZONTAL, SWT.DEFAULT);
sourceDelimCombo = UIUtils.createDelimiterCombo(sourceGroup, EditorsMessages.dialog_morph_delimited_source_group_delimiter, new String[] {"\n", "\t", ";", ","}, morphSettings.getSourceDelimiter(), true);
((GridData) sourceDelimCombo.getLayoutData()).widthHint = textWidthHint;
}
{
Group targetGroup = UIUtils.createControlGroup(group, "Target", 2, GridData.FILL_BOTH, SWT.DEFAULT);
targetDelimCombo = UIUtils.createDelimiterCombo(targetGroup, "Result delimiter", new String[] {"\n", "\t", ";", ","}, morphSettings.getTargetDelimiter(), false);
quoteStringCombo = UIUtils.createDelimiterCombo(targetGroup, "String quote character", new String[] {"\"", "'"}, morphSettings.getQuoteString(), false);
wrapLineAtColumn = UIUtils.createLabelSpinner(targetGroup, "Wrap line at column", "Inserts line feeds after spcified number of characters. Zero means no wrap.", morphSettings.getWrapLine(), 0, Integer.MAX_VALUE);
leadingText = UIUtils.createLabelText(targetGroup, "Leading text", morphSettings.getLeadingText(), SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
Group targetGroup = UIUtils.createControlGroup(group, EditorsMessages.dialog_morph_delimited_target_group_label, 2, GridData.FILL_BOTH, SWT.DEFAULT);
targetDelimCombo = UIUtils.createDelimiterCombo(targetGroup, EditorsMessages.dialog_morph_delimited_target_group_delim_result, new String[] {"\n", "\t", ";", ","}, morphSettings.getTargetDelimiter(), false);
quoteStringCombo = UIUtils.createDelimiterCombo(targetGroup, EditorsMessages.dialog_morph_delimited_target_group_delim_quote, new String[] {"\"", "'"}, morphSettings.getQuoteString(), false);
wrapLineAtColumn = UIUtils.createLabelSpinner(targetGroup, EditorsMessages.dialog_morph_delimited_target_group_spinner_wrap_line, EditorsMessages.dialog_morph_delimited_target_group_spinner_wrap_line_tip, morphSettings.getWrapLine(), 0, Integer.MAX_VALUE);
leadingText = UIUtils.createLabelText(targetGroup, EditorsMessages.dialog_morph_delimited_target_group_leading_text, morphSettings.getLeadingText(), SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
((GridData) leadingText.getLayoutData()).widthHint = textWidthHint;
((GridData) leadingText.getLayoutData()).verticalAlignment = GridData.FILL;
((GridData) leadingText.getLayoutData()).grabExcessVerticalSpace = true;
trailingText = UIUtils.createLabelText(targetGroup, "Trailing text", morphSettings.getTrailingText(), SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
trailingText = UIUtils.createLabelText(targetGroup, EditorsMessages.dialog_morph_delimited_target_group_trailing_text, morphSettings.getTrailingText(), SWT.BORDER | SWT.MULTI | SWT.V_SCROLL);
((GridData) trailingText.getLayoutData()).widthHint = textWidthHint;
((GridData) trailingText.getLayoutData()).verticalAlignment = GridData.FILL;
((GridData) trailingText.getLayoutData()).grabExcessVerticalSpace = true;
......
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2021 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jkiss.dbeaver.ui.editors.text.handlers;
import org.eclipse.core.commands.ExecutionEvent;
......
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2021 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jkiss.dbeaver.ui.editors.text.handlers;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.text.*;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.ui.handlers.HandlerUtil;
import org.jkiss.dbeaver.Log;
import org.jkiss.dbeaver.ui.editors.text.BaseTextEditor;
import org.jkiss.dbeaver.utils.GeneralUtils;
import org.jkiss.utils.CommonUtils;
/**
* Trim trailing and leading spaces of highlighted and non-highlighted text
*/
public class TrimTextSpacesHandler extends AbstractTextHandler {
private static final Log log = Log.getLog(TrimTextSpacesHandler.class);
@Override
public Object execute(ExecutionEvent executionEvent) throws ExecutionException {
BaseTextEditor textEditor = BaseTextEditor.getTextEditor(HandlerUtil.getActiveEditor(executionEvent));
if (textEditor != null) {
ISelectionProvider provider = textEditor.getSelectionProvider();
IDocument document = textEditor.getDocumentProvider().getDocument(textEditor.getEditorInput());
if (provider != null && document != null) {
ISelection selection = provider.getSelection();
if (selection instanceof ITextSelection) {
ITextSelection textSelection = (ITextSelection) selection;
int offset = textSelection.getOffset();
try {
if (textSelection.getLength() > 0) {
int startLine = textSelection.getStartLine();
int endLine = textSelection.getEndLine();
if (startLine != endLine) {
// Highlighted more than one line - make trim for each row separately
StringBuilder allStrings = new StringBuilder();
String lineSeparator = GeneralUtils.getDefaultLineSeparator();
for (int i = startLine; i <= endLine; i++) {
IRegion lineInformation = document.getLineInformation(i);
String untrimmedString = document.get(lineInformation.getOffset(), lineInformation.getLength());
allStrings.append(untrimmedString.trim());
if (i != endLine) {
allStrings.append(lineSeparator);
}
}
document.replace(offset, textSelection.getLength(), allStrings.toString());
} else {
// Make trim only for the highlighted area of the string
String trimmedSelection = textSelection.getText().trim();
if (!CommonUtils.isEmpty(trimmedSelection)) {
document.replace(offset, textSelection.getLength(), trimmedSelection);
}
}
} else {
// Nothing is highlighted - make trim only for the string on which the cursor is
IRegion information = document.getLineInformationOfOffset(offset);
int startLine = information.getOffset();
int length = offset - startLine;
String untrimmedString = document.get(startLine, length);
String trimmedString = untrimmedString.trim();
if (!CommonUtils.isEmpty(untrimmedString)) {
document.replace(startLine, length, trimmedString);
}
}
} catch (BadLocationException e) {
log.error("Error reading or replacing text when trimming", e);
}
}
}
}
return null;
}
}
......@@ -240,7 +240,7 @@ public class GroupingResultsContainer implements IResultSetContainer {
}
sql.append(" FROM (\n");
sql.append(queryText);
sql.append(") src");
sql.append("\n) src");
} else {
try {
Statement statement = SQLSemanticProcessor.parseQuery(dataSource.getSQLDialect(), queryText);
......
......@@ -110,6 +110,8 @@ command.org.jkiss.dbeaver.ui.editors.sql.save.file.name=Export SQL script
command.org.jkiss.dbeaver.ui.editors.sql.save.file.description=Save script to file system.
command.org.jkiss.dbeaver.ui.editors.sql.morph.delimited.list.name=Morph to delimited list
command.org.jkiss.dbeaver.ui.editors.sql.morph.delimited.list.description=Morph to delimited list
org.jkiss.dbeaver.ui.editors.sql.trim.spaces.name=Trim spaces
org.jkiss.dbeaver.ui.editors.sql.trim.spaces.description=Trim trailing and leading spaces
command.org.jkiss.dbeaver.ui.editors.sql.comment.single.name=Toggle Line Comment
command.org.jkiss.dbeaver.ui.editors.sql.comment.single.description=Add or remove single line comment
command.org.jkiss.dbeaver.ui.editors.sql.comment.multi.name=Toggle Block Comment
......
......@@ -17,16 +17,16 @@ command.org.jkiss.dbeaver.ui.editors.sql.assist.templates.description = \u
command.org.jkiss.dbeaver.ui.editors.sql.assist.templates.name = \u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u0438\u043C\u044F \u0448\u0430\u0431\u043B\u043E\u043D\u0430
command.org.jkiss.dbeaver.ui.editors.sql.close.tab.description = \u0417\u0430\u043A\u0440\u044B\u0442\u044C \u0432\u043A\u043B\u0430\u0434\u043A\u0443 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432
command.org.jkiss.dbeaver.ui.editors.sql.close.tab.name = \u0417\u0430\u043A\u0440\u044B\u0442\u044C \u0432\u043A\u043B\u0430\u0434\u043A\u0443
command.org.jkiss.dbeaver.ui.editors.sql.comment.multi.description = \u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C/\u0443\u0434\u0430\u043B\u0438\u0442\u044C \u043C\u043D\u043E\u0433\u043E\u0441\u0442\u0440\u043E\u0447\u043D\u044B\u0439 \u043A\u043E\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439
command.org.jkiss.dbeaver.ui.editors.sql.comment.multi.name = \u0411\u043B\u043E\u0447\u043D\u044B\u0439 \u043A\u043E\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439
command.org.jkiss.dbeaver.ui.editors.sql.comment.single.description = \u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C/\u0443\u0434\u0430\u043B\u0438\u0442\u044C \u043E\u0434\u043D\u043E\u0441\u0442\u0440\u043E\u0447\u043D\u044B\u0439 \u043A\u043E\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439
command.org.jkiss.dbeaver.ui.editors.sql.comment.single.name = \u041E\u0434\u043D\u043E\u0441\u0442\u0440\u043E\u0447\u043D\u044B\u0439 \u043A\u043E\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439
command.org.jkiss.dbeaver.ui.editors.sql.comment.multi.description = \u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C/\u0443\u0434\u0430\u043B\u0438\u0442\u044C \u043C\u043D\u043E\u0433\u043E\u0441\u0442\u0440\u043E\u0447\u043D\u044B\u0439 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439
command.org.jkiss.dbeaver.ui.editors.sql.comment.multi.name = \u0411\u043B\u043E\u0447\u043D\u044B\u0439 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439
command.org.jkiss.dbeaver.ui.editors.sql.comment.single.description = \u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C/\u0443\u0434\u0430\u043B\u0438\u0442\u044C \u043E\u0434\u043D\u043E\u0441\u0442\u0440\u043E\u0447\u043D\u044B\u0439 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439
command.org.jkiss.dbeaver.ui.editors.sql.comment.single.name = \u041E\u0434\u043D\u043E\u0441\u0442\u0440\u043E\u0447\u043D\u044B\u0439 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439
command.org.jkiss.dbeaver.ui.editors.sql.export.data.description = \u042D\u043A\u0441\u043F\u043E\u0440\u0442 \u0434\u0430\u043D\u043D\u044B\u0445 \u0438\u0437 \u0442\u0435\u043A\u0443\u0449\u0435\u0433\u043E SQL \u0437\u0430\u043F\u0440\u043E\u0441\u0430
command.org.jkiss.dbeaver.ui.editors.sql.export.data.name = \u042D\u043A\u0441\u043F\u043E\u0440\u0442 \u0434\u0430\u043D\u043D\u044B\u0445 \u0438\u0437 \u0437\u0430\u043F\u0440\u043E\u0441\u0430
command.org.jkiss.dbeaver.ui.editors.sql.maximize.result.panel.description = \u0423\u0432\u0435\u043B\u0438\u0447\u0438\u0442\u044C/\u0443\u043C\u0435\u043D\u044C\u0448\u0438\u0442\u044C \u043F\u0430\u043D\u0435\u043B\u044C \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432
command.org.jkiss.dbeaver.ui.editors.sql.maximize.result.panel.name = \u0423\u0432\u0435\u043B\u0438\u0447\u0438\u0442\u044C \u043F\u0430\u043D\u0435\u043B\u044C \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432
command.org.jkiss.dbeaver.ui.editors.sql.morph.delimited.list.description = \u041F\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044C \u0432 \u0441\u0442\u0440\u043E\u043A\u0443 \u0441 \u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0435\u043B\u044F\u043C\u0438
command.org.jkiss.dbeaver.ui.editors.sql.morph.delimited.list.name = \u041F\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044C \u0432 \u0441\u0442\u0440\u043E\u043A\u0443 \u0441 \u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0435\u043B\u044F\u043C\u0438
command.org.jkiss.dbeaver.ui.editors.sql.morph.delimited.list.description = \u041F\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044C \u0432 \u0441\u0442\u0440\u043E\u043A\u0443 \u0441 \u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044F\u043C\u0438
command.org.jkiss.dbeaver.ui.editors.sql.morph.delimited.list.name = \u041F\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u044B\u0439 \u0442\u0435\u043A\u0441\u0442 \u0432 \u0441\u0442\u0440\u043E\u043A\u0443/\u0441\u0442\u0440\u043E\u043A\u0438 \u0441 \u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044F\u043C\u0438
command.org.jkiss.dbeaver.ui.editors.sql.navigate.object.description = \u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0443\u043A\u0430\u0437\u0430\u043D\u043D\u044B\u0439 \u0432 SQL \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043E\u0431\u044A\u0435\u043A\u0442 \u0411\u0414
command.org.jkiss.dbeaver.ui.editors.sql.navigate.object.name = \u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043E\u0431\u044A\u0435\u043A\u0442 \u0411\u0414
command.org.jkiss.dbeaver.ui.editors.sql.open.file.description = \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0438\u0437 \u0444\u0430\u0439\u043B\u0430
......@@ -75,6 +75,8 @@ command.org.jkiss.dbeaver.ui.editors.sql.word.wrap.description = \u
command.org.jkiss.dbeaver.ui.editors.sql.word.wrap.name = \u0412\u043A\u043B/\u0432\u044B\u043A\u043B \u043F\u0435\u0440\u0435\u043D\u043E\u0441 \u0441\u0442\u0440\u043E\u043A
command.org.jkiss.dbeaver.ui.editors.text.content.format.description = \u041E\u0442\u0444\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0442\u0435\u043A\u0441\u0442
command.org.jkiss.dbeaver.ui.editors.text.content.format.name = \u0424\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0442\u0435\u043A\u0441\u0442
org.jkiss.dbeaver.ui.editors.sql.trim.spaces.name = \u041E\u0431\u0440\u0435\u0437\u0430\u0442\u044C \u043F\u0440\u043E\u0431\u0435\u043B\u044B
org.jkiss.dbeaver.ui.editors.sql.trim.spaces.description = \u041E\u0431\u0440\u0435\u0437\u0430\u0442\u044C \u0432\u0435\u0434\u0443\u0449\u0438\u0435 \u0438 \u043A\u043E\u043D\u0435\u0447\u043D\u044B\u0435 \u043F\u0440\u043E\u0431\u0435\u043B\u044B
menu.sqleditor = \u0420\u0435\u0434\u0430\u043A\u0442\u043E\u0440 SQL
menu.org.jkiss.dbeaver.ui.editors.sql.SQLEditor.execute.label = \u0412\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C
......
......@@ -242,6 +242,7 @@
<command id="org.jkiss.dbeaver.ui.editors.sql.open.file" name="%command.org.jkiss.dbeaver.ui.editors.sql.open.file.name" description="%command.org.jkiss.dbeaver.ui.editors.sql.open.file.description" categoryId="org.jkiss.dbeaver.core.sql"/>
<command id="org.jkiss.dbeaver.ui.editors.sql.save.file" name="%command.org.jkiss.dbeaver.ui.editors.sql.save.file.name" description="%command.org.jkiss.dbeaver.ui.editors.sql.save.file.description" categoryId="org.jkiss.dbeaver.core.sql"/>
<command id="org.jkiss.dbeaver.ui.editors.sql.morph.delimited.list" name="%command.org.jkiss.dbeaver.ui.editors.sql.morph.delimited.list.name" description="%command.org.jkiss.dbeaver.ui.editors.sql.morph.delimited.list.description" categoryId="org.jkiss.dbeaver.core.sql"/>
<command id="org.jkiss.dbeaver.ui.editors.sql.trim.spaces" name="%org.jkiss.dbeaver.ui.editors.sql.trim.spaces.name" description="%org.jkiss.dbeaver.ui.editors.sql.trim.spaces.description" categoryId="org.jkiss.dbeaver.core.sql"/>
<command id="org.jkiss.dbeaver.ui.editors.sql.comment.single" name="%command.org.jkiss.dbeaver.ui.editors.sql.comment.single.name" description="%command.org.jkiss.dbeaver.ui.editors.sql.comment.single.description" categoryId="org.jkiss.dbeaver.core.sql"/>
<command id="org.jkiss.dbeaver.ui.editors.sql.comment.multi" name="%command.org.jkiss.dbeaver.ui.editors.sql.comment.multi.name" description="%command.org.jkiss.dbeaver.ui.editors.sql.comment.multi.description" categoryId="org.jkiss.dbeaver.core.sql"/>
<command id="org.jkiss.dbeaver.ui.editors.sql.word.wrap" name="%command.org.jkiss.dbeaver.ui.editors.sql.word.wrap.name" description="%command.org.jkiss.dbeaver.ui.editors.sql.word.wrap.description" categoryId="org.jkiss.dbeaver.core.sql"/>
......@@ -589,6 +590,7 @@
</with>
</enabledWhen>
</handler>
<handler commandId="org.jkiss.dbeaver.ui.editors.sql.trim.spaces" class="org.jkiss.dbeaver.ui.editors.text.handlers.TrimTextSpacesHandler"/>
<handler commandId="org.jkiss.dbeaver.ui.editors.sql.comment.single" class="org.jkiss.dbeaver.ui.editors.text.handlers.ToggleSingleLineCommentHandler">
<enabledWhen>
<with variable="activeEditor">
......
......@@ -578,6 +578,7 @@ public abstract class SQLEditorBase extends BaseTextEditor implements DBPContext
formatMenu.add(ActionUtils.makeCommandContribution(getSite(), "org.jkiss.dbeaver.ui.editors.sql.morph.delimited.list"));
formatMenu.add(getAction(ITextEditorActionConstants.UPPER_CASE));
formatMenu.add(getAction(ITextEditorActionConstants.LOWER_CASE));
formatMenu.add(ActionUtils.makeCommandContribution(getSite(), "org.jkiss.dbeaver.ui.editors.sql.trim.spaces"));
formatMenu.add(new Separator());
formatMenu.add(ActionUtils.makeCommandContribution(getSite(), "org.jkiss.dbeaver.ui.editors.sql.word.wrap"));
formatMenu.add(ActionUtils.makeCommandContribution(getSite(), "org.jkiss.dbeaver.ui.editors.sql.comment.single"));
......
......@@ -191,7 +191,6 @@ error_deleting_multiple_objects_from_different_datasources_message = Can not del
confirm_deleting_multiple_objects_title = Delete multiple objects
confirm_deleting_multiple_objects_message = Are you sure you want to delete {0} objects?\nThis action can not be undone!
confirm_deleting_multiple_objects_table_group_name = Objects
confirm_deleting_multiple_objects_column_type = Type
confirm_deleting_multiple_objects_column_name = Name
confirm_deleting_multiple_objects_column_description = Description
confirm_deleting_delete_cascade_checkbox_label = Cascade delete
......
......@@ -69,8 +69,6 @@ confirm_deleting_multiple_objects_column_description = Descripci\u00F3n
confirm_deleting_multiple_objects_column_name = Nombre
confirm_deleting_multiple_objects_column_type = Tipo
confirm_deleting_multiple_objects_message = \u00BFEst\u00E1 seguro de que quiere borrar {0} objetos?\n\u00A1Esta acci\u00F3n no se puede revertir!
confirm_deleting_multiple_objects_table_group_name = Objetos
......
......@@ -45,7 +45,7 @@ public class ConfirmNavigatorNodesDeleteDialog extends MessageDialog {
private final NavigatorObjectsDeleter deleter;
private ConfirmNavigatorNodesDeleteDialog(Shell shell, String title, String message, List<?> selectedObjects, NavigatorObjectsDeleter deleter) {
super(shell, title, DBeaverIcons.getImage(UIIcon.REJECT), message, MessageDialog.WARNING, null, 0);
super(shell, title, DBeaverIcons.getImage(UIIcon.REJECT), message, MessageDialog.ERROR, null, 0);
this.selectedObjects = selectedObjects;
this.deleter = deleter;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册