提交 c8f001d9 编写于 作者: A Anastasiya Volkova

#8562 part (Configurators) of ui-part from plugins/org.jkiss.dbeaver.ext.db2...

#8562 part (Configurators) of ui-part from plugins/org.jkiss.dbeaver.ext.db2 moved in org.jkiss.dbeaver.ext.db2.ui
上级 957e99ea
# DBeaver - Universal Database Manager
# Copyright (C) 2013-2016 Denis Forveille titou10.titou10@gmail.com
# Copyright (C) 2010-2020 DBeaver Corp and others serge@jkiss.org
Bundle-Vendor = JKISS
Bundle-Name = DBeaver DB2 UI
dialog.connection.header=DB2 Connection Settings
editor.org.jkiss.dbeaver.ext.db2.model.app.DB2ServerApplicationEditor.name = Application Manager
editor.source.declaration.name=Source
editor.source.declaration.description=Source
editor.source.ddl.name=DDL
editor.source.ddl.description=DDL
tool.org.jkiss.dbeaver.ext.db2.table.reorg.name=Reorg Table...
tool.org.jkiss.dbeaver.ext.db2.table.reorgix.name=Reorg Index...
tool.org.jkiss.dbeaver.ext.db2.table.reorgcheck.name=Reorg Check (Table)...
tool.org.jkiss.dbeaver.ext.db2.table.reorgcheckix.name=Reorg Check (Indexes)...
tool.org.jkiss.dbeaver.ext.db2.table.setintegrity.name=Set Integrity...
tool.org.jkiss.dbeaver.ext.db2.table.runstats.name=Runstats...
tool.org.jkiss.dbeaver.ext.db2.table.truncate.name=Truncate...
tool.org.jkiss.dbeaver.ext.db2.showerror.name=Retrieve SQL Error Message...
\ No newline at end of file
#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/)
category.db2.description = DB2 Werkzeuge
category.db2.name = DB2
dialog.connection.header = DB2 Verbindungseinstellungen
editor.org.jkiss.dbeaver.ext.db2.model.app.DB2ServerApplicationEditor.name = Applikationsmanager
editor.source.ddl.description = DDL
editor.source.ddl.name = DDL
editor.source.declaration.description = Quelle
editor.source.declaration.name = Quelle
tool.org.jkiss.dbeaver.ext.db2.table.reorg.name=Reorg Table...
tool.org.jkiss.dbeaver.ext.db2.table.reorgix.name=Reorg Index...
tool.org.jkiss.dbeaver.ext.db2.table.reorgcheck.name=Reorg Check (Table)...
tool.org.jkiss.dbeaver.ext.db2.table.reorgcheckix.name=Reorg Check (Indexes)...
tool.org.jkiss.dbeaver.ext.db2.table.setintegrity.name=Set Integrity...
tool.org.jkiss.dbeaver.ext.db2.table.runstats.name=Runstats...
tool.org.jkiss.dbeaver.ext.db2.table.truncate.name=Truncate...
tool.org.jkiss.dbeaver.ext.db2.showerror.name=Retrieve SQL Error Message...
\ No newline at end of file
# DBeaver - Universal Database Manager
# Copyright (C) 2013-2016 Denis Forveille titou10.titou10@gmail.com
# Copyright (C) 2010-2020 DBeaver Corp and others serge@jkiss.org
Bundle-Name = Support DB2 pour DBeaver
tool.org.jkiss.dbeaver.ext.db2.table.reorg.name=R\u00E9organiser la table...
tool.org.jkiss.dbeaver.ext.db2.table.reorgix.name=R\u00E9organiser 'index...
tool.org.jkiss.dbeaver.ext.db2.table.reorgcheck.name=R\u00E9organiser le Check (Table)...
tool.org.jkiss.dbeaver.ext.db2.table.reorgcheckix.name=R\u00E9organiser le Check (Indexes)...
tool.org.jkiss.dbeaver.ext.db2.table.setintegrity.name=D\u00E9finir l'int\u00E9grit\u00E9...
tool.org.jkiss.dbeaver.ext.db2.table.runstats.name=Runstats...
tool.org.jkiss.dbeaver.ext.db2.table.truncate.name=Vider...
tool.org.jkiss.dbeaver.ext.db2.showerror.name=R\u00E9cup\u00E9rer le message d'erreur SQL...
dialog.connection.header=Param\u00E8tres de connexion DB2
editor.source.declaration.name=Source
editor.source.declaration.description=Source
editor.source.ddl.name=DDL
editor.source.ddl.description=DDL
editor.org.jkiss.dbeaver.ext.db2.model.app.DB2ServerApplicationEditor.name = Gestionnaire d'application
\ No newline at end of file
#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/)
# DBeaver - Universal Database Manager
# Copyright (C) 2013-2016 Denis Forveille titou10.titou10@gmail.com
# Copyright (C) 2010-2020 DBeaver Corp and others serge@jkiss.org
Bundle-Name = DBeaver DB2 Support
Bundle-Vendor = JKISS
dialog.connection.header = DB2 Configura\u00E7\u00F5es de conex\u00E3o
editor.org.jkiss.dbeaver.ext.db2.model.app.DB2ServerApplicationEditor.name = Application Manager
editor.source.ddl.description = DDL
editor.source.ddl.name = DDL
editor.source.declaration.description = Origem
editor.source.declaration.name = Origem
tool.org.jkiss.dbeaver.ext.db2.showerror.name = Recuperar erros de messagem do SQL...
tool.org.jkiss.dbeaver.ext.db2.table.reorg.name = Reorganizar Tabela...
tool.org.jkiss.dbeaver.ext.db2.table.reorgcheck.name = Reorganizar e Checar (Tabela)...
tool.org.jkiss.dbeaver.ext.db2.table.reorgcheckix.name = Reorganizar Checar (Indices)...
tool.org.jkiss.dbeaver.ext.db2.table.reorgix.name = Reorganizar Indice...
tool.org.jkiss.dbeaver.ext.db2.table.runstats.name = Runstats...
tool.org.jkiss.dbeaver.ext.db2.table.setintegrity.name = Setar Integridade...
tool.org.jkiss.dbeaver.ext.db2.table.truncate.name = Truncar...
\ No newline at end of file
......@@ -7,6 +7,8 @@ Bundle-Name = DBeaver DB2 UI
dialog.connection.header=DB2 Connection Settings
editor.org.jkiss.dbeaver.ext.db2.model.app.DB2ServerApplicationEditor.name = Application Manager
editor.source.ddl.name=DDL
editor.source.ddl.description=DDL
......
......@@ -39,6 +39,32 @@
</extension>
<extension point="org.jkiss.dbeaver.databaseEditor">
<editor id="source.declaration"
class="org.jkiss.dbeaver.ui.editors.sql.SQLSourceViewer"
label="%editor.source.declaration.name"
description="%editor.source.declaration.description"
icon="#sql_text"
position="additions_middle"
contributor="org.jkiss.dbeaver.ui.editors.sql.SQLEditorContributorNested"
type="folder"
embeddable="false">
<objectType name="org.jkiss.dbeaver.ext.db2.model.DB2MaterializedQueryTable"/>
<objectType name="org.jkiss.dbeaver.ext.db2.model.DB2TableCheckConstraint"/>
<objectType name="org.jkiss.dbeaver.ext.db2.model.DB2Trigger"/>
<objectType name="org.jkiss.dbeaver.ext.db2.model.DB2View"/>
</editor>
<editor id="source.ddl"
class="org.jkiss.dbeaver.ui.editors.sql.SQLSourceViewer"
label="%editor.source.ddl.name"
description="%editor.source.ddl.description"
icon="#sql_text"
position="additions_middle"
contributor="org.jkiss.dbeaver.ui.editors.sql.SQLEditorContributorNested"
type="folder">
<objectType name="org.jkiss.dbeaver.ext.db2.model.DB2Table"/>
</editor>
<editor id="source.routine.ddl"
class="org.jkiss.dbeaver.ext.db2.ui.editors.DB2RoutineDDLEditor"
label="%editor.source.ddl.name"
......@@ -49,6 +75,23 @@
type="folder">
<objectType name="org.jkiss.dbeaver.ext.db2.model.DB2Routine"/>
</editor>
<configurator class="org.jkiss.dbeaver.ext.mssql.ui.config.DB2ForeignKeyConfigurator">
<objectType name="org.jkiss.dbeaver.ext.mssql.model.DB2TableForeignKey"/>
</configurator>
<configurator class="org.jkiss.dbeaver.ext.mssql.ui.config.DB2IndexConfigurator">
<objectType name="org.jkiss.dbeaver.ext.mssql.model.DB2Index"/>
</configurator>
<configurator class="org.jkiss.dbeaver.ext.mssql.ui.config.DB2SchemaConfigurator">
<objectType name="org.jkiss.dbeaver.ext.mssql.model.DB2Schema"/>
</configurator>
<configurator class="org.jkiss.dbeaver.ext.mssql.ui.config.DB2SequenceConfigurator">
<objectType name="org.jkiss.dbeaver.ext.mssql.model.DB2Sequence"/>
</configurator>
<configurator class="org.jkiss.dbeaver.ext.mssql.ui.config.DB2UniqueKeyConfigurator">
<objectType name="org.jkiss.dbeaver.ext.mssql.model.DB2TableUniqueKey"/>
</configurator>
</extension>
<extension point="org.jkiss.dbeaver.tools">
......@@ -111,4 +154,14 @@
</extension>
<extension point="org.eclipse.ui.editors">
<editor
name="%editor.org.jkiss.dbeaver.ext.db2.model.app.DB2ServerApplicationEditor.name"
icon="platform:/plugin/org.jkiss.dbeaver.ext.db2/icons/compile.png"
class="org.jkiss.dbeaver.ext.db2.model.app.DB2ServerApplicationEditor"
id="org.jkiss.dbeaver.ext.db2.model.app.DB2ServerApplicationEditor"
contributorClass="org.jkiss.dbeaver.ui.editors.EditorSearchActionsContributor">
</editor>
</extension>
</plugin>
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2020 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.ext.db2.ui.config;
import java.util.ArrayList;
import java.util.List;
import org.jkiss.dbeaver.ext.db2.ui.internal.DB2Messages;
import org.jkiss.dbeaver.ext.db2.model.DB2TableColumn;
import org.jkiss.dbeaver.ext.db2.model.DB2TableForeignKey;
import org.jkiss.dbeaver.ext.db2.model.DB2TableKeyColumn;
import org.jkiss.dbeaver.ext.db2.model.DB2TableUniqueKey;
import org.jkiss.dbeaver.ext.db2.model.dict.DB2DeleteUpdateRule;
import org.jkiss.dbeaver.model.edit.DBEObjectConfigurator;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import org.jkiss.dbeaver.model.struct.rdb.DBSForeignKeyModifyRule;
import org.jkiss.dbeaver.ui.UITask;
import org.jkiss.dbeaver.ui.editors.object.struct.EditForeignKeyPage;
/**
* DB2 foreign key configurator
*/
public class DB2ForeignKeyConfigurator implements DBEObjectConfigurator<DB2TableForeignKey> {
private static final DBSForeignKeyModifyRule[] FK_RULES;
static {
List<DBSForeignKeyModifyRule> rules = new ArrayList<>(DB2DeleteUpdateRule.values().length);
for (DB2DeleteUpdateRule db2DeleteUpdateRule : DB2DeleteUpdateRule.values()) {
rules.add(db2DeleteUpdateRule.getRule());
}
FK_RULES = rules.toArray(new DBSForeignKeyModifyRule[] {});
}
@Override
public DB2TableForeignKey configureObject(DBRProgressMonitor monitor, Object container, DB2TableForeignKey foreignKey) {
return new UITask<DB2TableForeignKey>() {
@Override
protected DB2TableForeignKey runTask() {
EditForeignKeyPage editDialog = new EditForeignKeyPage(
DB2Messages.edit_db2_foreign_key_manager_dialog_title, foreignKey, FK_RULES);
if (!editDialog.edit()) {
return null;
}
DBSForeignKeyModifyRule deleteRule = editDialog.getOnDeleteRule();
DBSForeignKeyModifyRule updateRule = editDialog.getOnUpdateRule();
DB2TableUniqueKey ukConstraint = (DB2TableUniqueKey) editDialog.getUniqueConstraint();
foreignKey.setReferencedConstraint(ukConstraint);
foreignKey.setDb2DeleteRule(DB2DeleteUpdateRule.getDB2RuleFromDBSRule(deleteRule));
foreignKey.setDb2UpdateRule(DB2DeleteUpdateRule.getDB2RuleFromDBSRule(updateRule));
List<DB2TableKeyColumn> columns = new ArrayList<>(editDialog.getColumns().size());
DB2TableKeyColumn column;
int colIndex = 1;
for (EditForeignKeyPage.FKColumnInfo tableColumn : editDialog.getColumns()) {
column = new DB2TableKeyColumn(foreignKey, (DB2TableColumn) tableColumn.getOwnColumn(), colIndex++);
columns.add(column);
}
foreignKey.setColumns(columns);
return foreignKey;
}
}.execute();
}
}
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2020 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.ext.db2.ui.config;
import org.jkiss.dbeaver.ext.db2.ui.internal.DB2Messages;
import org.jkiss.dbeaver.ext.db2.model.DB2Index;
import org.jkiss.dbeaver.ext.db2.model.DB2IndexColumn;
import org.jkiss.dbeaver.ext.db2.model.DB2TableBase;
import org.jkiss.dbeaver.ext.db2.model.DB2TableColumn;
import org.jkiss.dbeaver.ext.db2.model.dict.DB2IndexType;
import org.jkiss.dbeaver.ext.db2.model.dict.DB2UniqueRule;
import org.jkiss.dbeaver.model.edit.DBEObjectConfigurator;
import org.jkiss.dbeaver.model.impl.DBObjectNameCaseTransformer;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import org.jkiss.dbeaver.model.struct.DBSEntityAttribute;
import org.jkiss.dbeaver.model.struct.rdb.DBSIndexType;
import org.jkiss.dbeaver.ui.UITask;
import org.jkiss.dbeaver.ui.editors.object.struct.EditIndexPage;
import org.jkiss.utils.CommonUtils;
import java.util.ArrayList;
import java.util.List;
/**
* DB2 index configurator
*/
public class DB2IndexConfigurator implements DBEObjectConfigurator<DB2Index> {
private static final String CONS_IX_NAME = "%s_%s_IDX";
private static final List<DBSIndexType> IX_TYPES;
static {
IX_TYPES = new ArrayList<>(DB2IndexType.values().length);
for (DB2IndexType db2IndexType : DB2IndexType.values()) {
if (db2IndexType.isValidForCreation()) {
IX_TYPES.add(db2IndexType.getDBSIndexType());
}
}
}
@Override
public DB2Index configureObject(DBRProgressMonitor monitor, Object container, DB2Index index) {
return UITask.run(() -> {
DB2TableBase table = (DB2TableBase) container;
EditIndexPage editPage = new EditIndexPage(
DB2Messages.edit_db2_index_manager_dialog_title, index, IX_TYPES);
if (!editPage.edit()) {
return null;
}
String tableName = CommonUtils.escapeIdentifier(table.getName());
String colName = CommonUtils.escapeIdentifier(editPage.getSelectedAttributes().iterator().next().getName());
String indexBaseName = String.format(CONS_IX_NAME, tableName, colName);
String indexName = DBObjectNameCaseTransformer.transformName(table.getDataSource(), indexBaseName);
index.setName(indexName);
index.setIndexType(editPage.getIndexType());
index.setUniqueRule(editPage.isUnique() ? DB2UniqueRule.U : DB2UniqueRule.D);
int colIndex = 1;
for (DBSEntityAttribute tableColumn : editPage.getSelectedAttributes()) {
index.addColumn(new DB2IndexColumn(
index,
(DB2TableColumn) tableColumn,
colIndex++,
!Boolean.TRUE.equals(editPage.getAttributeProperty(tableColumn, EditIndexPage.PROP_DESC))));
}
return index;
});
}
}
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2020 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.ext.db2.ui.config;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.jkiss.dbeaver.ext.db2.model.DB2DataSource;
import org.jkiss.dbeaver.ext.db2.model.DB2Schema;
import org.jkiss.dbeaver.model.edit.DBEObjectConfigurator;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import org.jkiss.dbeaver.ui.UITask;
import org.jkiss.dbeaver.ui.UIUtils;
/**
* DB2SchemaConfigurator
*/
public class DB2SchemaConfigurator implements DBEObjectConfigurator<DB2Schema> {
@Override
public DB2Schema configureObject(DBRProgressMonitor monitor, Object container, DB2Schema newSchema) {
return new UITask<DB2Schema>() {
@Override
protected DB2Schema runTask() {
NewSchemaDialog dialog = new NewSchemaDialog(UIUtils.getActiveWorkbenchShell());
if (dialog.open() != IDialogConstants.OK_ID) {
return null;
}
String schemaName = dialog.getSchemaName();
if (schemaName.length() == 0) {
return null;
}
return new DB2Schema((DB2DataSource) container, schemaName);
}
}.execute();
}
// --------
// Dialog
// --------
private static class NewSchemaDialog extends Dialog {
private String schemaName;
public String getSchemaName()
{
return schemaName;
}
// Dialog managment
private Text nameText;
public NewSchemaDialog(Shell parentShell)
{
super(parentShell);
}
@Override
protected boolean isResizable()
{
return true;
}
@Override
protected Control createDialogArea(Composite parent)
{
getShell().setText("New Schema Name");
Control container = super.createDialogArea(parent);
Composite composite = UIUtils.createPlaceholder((Composite) container, 2);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
nameText = UIUtils.createLabelText(composite, "Schema Name", null);
nameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
return parent;
}
@Override
protected void okPressed()
{
this.schemaName = nameText.getText().trim().toUpperCase();
super.okPressed();
}
}
}
package org.jkiss.dbeaver.ext.db2.ui.config;
import org.jkiss.dbeaver.ext.db2.model.DB2Schema;
import org.jkiss.dbeaver.ext.db2.model.DB2Sequence;
import org.jkiss.dbeaver.model.edit.DBEObjectConfigurator;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import org.jkiss.dbeaver.model.struct.DBSEntityType;
import org.jkiss.dbeaver.ui.UITask;
import org.jkiss.dbeaver.ui.editors.object.struct.EntityEditPage;
public class DB2SequenceConfigurator implements DBEObjectConfigurator<DB2Sequence> {
@Override
public DB2Sequence configureObject(DBRProgressMonitor monitor, Object container, DB2Sequence sequence) {
DB2Schema schema = (DB2Schema) container;
return new UITask<DB2Sequence>() {
@Override
protected DB2Sequence runTask() {
EntityEditPage page = new EntityEditPage(schema.getDataSource(), DBSEntityType.SEQUENCE);
if (!page.edit()) {
return null;
}
return new DB2Sequence(schema, page.getEntityName());
}
}.execute();
}
}
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2020 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.ext.db2.ui.config;
import java.util.ArrayList;
import java.util.List;
import org.jkiss.dbeaver.ext.db2.ui.internal.DB2Messages;
import org.jkiss.dbeaver.ext.db2.model.DB2Table;
import org.jkiss.dbeaver.ext.db2.model.DB2TableColumn;
import org.jkiss.dbeaver.ext.db2.model.DB2TableKeyColumn;
import org.jkiss.dbeaver.ext.db2.model.DB2TableUniqueKey;
import org.jkiss.dbeaver.model.edit.DBEObjectConfigurator;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import org.jkiss.dbeaver.model.struct.DBSEntityAttribute;
import org.jkiss.dbeaver.model.struct.DBSEntityConstraintType;
import org.jkiss.dbeaver.ui.UITask;
import org.jkiss.dbeaver.ui.editors.object.struct.EditConstraintPage;
/**
* DB2 unique constraint configurator
*/
public class DB2UniqueKeyConfigurator implements DBEObjectConfigurator<DB2TableUniqueKey> {
private static final DBSEntityConstraintType[] CONS_TYPES = { DBSEntityConstraintType.PRIMARY_KEY,
DBSEntityConstraintType.UNIQUE_KEY };
@Override
public DB2TableUniqueKey configureObject(DBRProgressMonitor monitor, Object table, DB2TableUniqueKey primaryKey) {
DB2TableUniqueKey constraint = new DB2TableUniqueKey((DB2Table) table, DBSEntityConstraintType.UNIQUE_KEY);
return new UITask<DB2TableUniqueKey>() {
@Override
protected DB2TableUniqueKey runTask()
{
EditConstraintPage editPage = new EditConstraintPage(DB2Messages.edit_db2_constraint_manager_dialog_title, constraint, CONS_TYPES);
if (!editPage.edit()) {
return null;
}
constraint.setConstraintType(editPage.getConstraintType());
constraint.setName(editPage.getConstraintName());
List<DB2TableKeyColumn> columns = new ArrayList<>(editPage.getSelectedAttributes().size());
DB2TableKeyColumn column;
int colIndex = 1;
for (DBSEntityAttribute tableColumn : editPage.getSelectedAttributes()) {
column = new DB2TableKeyColumn(constraint, (DB2TableColumn) tableColumn, colIndex++);
columns.add(column);
}
constraint.setColumns(columns);
return constraint;
}
}.execute();
}
}
......@@ -116,4 +116,8 @@ public class DB2Messages extends NLS {
public static String dialog_tools_mes_error_code;
public static String dialog_tools_mes_message;
public static String edit_db2_constraint_manager_dialog_title;
public static String edit_db2_foreign_key_manager_dialog_title;
public static String edit_db2_index_manager_dialog_title;
}
......@@ -82,3 +82,7 @@ dialog_tools_msg_code=SQL Code?
dialog_tools_mes_error_code_title=Error
dialog_tools_mes_error_code=The SQL Code must be Numeric, eg -551, 803...
dialog_tools_mes_message=SQL Message
edit_db2_constraint_manager_dialog_title=Create constraint
edit_db2_foreign_key_manager_dialog_title=Create foreign key
edit_db2_index_manager_dialog_title=Create index
......@@ -61,3 +61,7 @@ dialog_tools_mes_error_code_title = Fehler
dialog_tools_mes_message = SQL-Nachricht
dialog_tools_msg_code = SQL-Code?
dialog_tools_msg_title = Abrufen der SQL-Nachricht aus dem SQL-Code
edit_db2_constraint_manager_dialog_title = Einschr\u00E4nkung erstellen
edit_db2_foreign_key_manager_dialog_title = Fremdschl\u00FCssel erstellen
edit_db2_index_manager_dialog_title = Index erstellen
\ No newline at end of file
......@@ -69,8 +69,6 @@ dialog_table_tools_reorgix_options_cleanup_pages=Only Cleanup Pseudo Deleted Pag
dialog_table_tools_reorgcheck_title=Reorg Check on Table
dialog_table_tools_reorgcheckix_title=Reorg Check on Table Indexes
dialog_table_tools_truncate_title=Truncate Table(s)
dialog_table_tools_truncate_storage_title=Storage Options
dialog_table_tools_truncate_storage_reuse=Reuse Storage
......@@ -78,3 +76,6 @@ dialog_table_tools_truncate_storage_drop=Drop Storage
dialog_table_tools_truncate_triggers_title=Delete Triggers Options
dialog_table_tools_truncate_triggers_ignore=Ignore Delete Triggers
dialog_table_tools_truncate_triggers_restrict=Restrict When Delete Triggers
edit_db2_foreign_key_manager_dialog_title=\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u0432\u043D\u0435\u0448\u043D\u0438\u0439 \u043A\u043B\u044E\u0447
edit_db2_index_manager_dialog_title=\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u0438\u043D\u0434\u0435\u043A\u0441
......@@ -8,22 +8,6 @@ Bundle-Name = DBeaver DB2 Support
category.db2.description=DB2 Tools
category.db2.name=DB2
tool.org.jkiss.dbeaver.ext.db2.table.reorg.name=Reorg Table...
tool.org.jkiss.dbeaver.ext.db2.table.reorgix.name=Reorg Index...
tool.org.jkiss.dbeaver.ext.db2.table.reorgcheck.name=Reorg Check (Table)...
tool.org.jkiss.dbeaver.ext.db2.table.reorgcheckix.name=Reorg Check (Indexes)...
tool.org.jkiss.dbeaver.ext.db2.table.setintegrity.name=Set Integrity...
tool.org.jkiss.dbeaver.ext.db2.table.runstats.name=Runstats...
tool.org.jkiss.dbeaver.ext.db2.table.truncate.name=Truncate...
tool.org.jkiss.dbeaver.ext.db2.showerror.name=Retrieve SQL Error Message...
dialog.connection.header=DB2 Connection Settings
editor.source.declaration.name=Source
editor.source.declaration.description=Source
editor.source.ddl.name=DDL
editor.source.ddl.description=DDL
menu.tables.manage=Manage
tree.administer.node.name=Administer
......@@ -864,5 +848,3 @@ meta.org.jkiss.dbeaver.ext.db2.model.security.DB2RoleAuth.role.name=Role
meta.org.jkiss.dbeaver.ext.db2.model.security.DB2RoleDep.admin.name=Admin?
meta.org.jkiss.dbeaver.ext.db2.model.security.DB2RoleDep.grantee.name=Grantee
meta.org.jkiss.dbeaver.ext.db2.model.security.DB2RoleDep.granteeType.name=Grantee Type
\ No newline at end of file
editor.org.jkiss.dbeaver.ext.db2.model.app.DB2ServerApplicationEditor.name = Application Manager
\ No newline at end of file
......@@ -3,14 +3,6 @@
category.db2.description = DB2 Werkzeuge
category.db2.name = DB2
dialog.connection.header = DB2 Verbindungseinstellungen
editor.org.jkiss.dbeaver.ext.db2.model.app.DB2ServerApplicationEditor.name = Applikationsmanager
editor.source.ddl.description = DDL
editor.source.ddl.name = DDL
editor.source.declaration.description = Quelle
editor.source.declaration.name = Quelle
menu.tables.manage = Verwalten
meta.org.jkiss.dbeaver.ext.db2.info.DB2Parameter.dataType.name = Typ
......
......@@ -7,22 +7,6 @@ Bundle-Name = Support DB2 pour DBeaver
category.db2.description=Outils DB2
category.db2.name=DB2
tool.org.jkiss.dbeaver.ext.db2.table.reorg.name=R\u00E9organiser la table...
tool.org.jkiss.dbeaver.ext.db2.table.reorgix.name=R\u00E9organiser 'index...
tool.org.jkiss.dbeaver.ext.db2.table.reorgcheck.name=R\u00E9organiser le Check (Table)...
tool.org.jkiss.dbeaver.ext.db2.table.reorgcheckix.name=R\u00E9organiser le Check (Indexes)...
tool.org.jkiss.dbeaver.ext.db2.table.setintegrity.name=D\u00E9finir l'int\u00E9grit\u00E9...
tool.org.jkiss.dbeaver.ext.db2.table.runstats.name=Runstats...
tool.org.jkiss.dbeaver.ext.db2.table.truncate.name=Vider...
tool.org.jkiss.dbeaver.ext.db2.showerror.name=R\u00E9cup\u00E9rer le message d'erreur SQL...
dialog.connection.header=Param\u00E8tres de connexion DB2
editor.source.declaration.name=Source
editor.source.declaration.description=Source
editor.source.ddl.name=DDL
editor.source.ddl.description=DDL
menu.tables.manage=G\u00E9rer
tree.administer.node.name=Administrer
......@@ -860,5 +844,3 @@ meta.org.jkiss.dbeaver.ext.db2.model.security.DB2RoleAuth.role.name=R\u00F4le
meta.org.jkiss.dbeaver.ext.db2.model.security.DB2RoleDep.admin.name=Admin?
meta.org.jkiss.dbeaver.ext.db2.model.security.DB2RoleDep.grantee.name=receveur (Grantee)
meta.org.jkiss.dbeaver.ext.db2.model.security.DB2RoleDep.granteeType.name=Type de receveur
editor.org.jkiss.dbeaver.ext.db2.model.app.DB2ServerApplicationEditor.name = Gestionnaire d'application
......@@ -10,14 +10,6 @@ Bundle-Vendor = JKISS
category.db2.description = DB2 Tools
category.db2.name = DB2
dialog.connection.header = DB2 Configura\u00E7\u00F5es de conex\u00E3o
editor.org.jkiss.dbeaver.ext.db2.model.app.DB2ServerApplicationEditor.name = Application Manager
editor.source.ddl.description = DDL
editor.source.ddl.name = DDL
editor.source.declaration.description = Origem
editor.source.declaration.name = Origem
menu.tables.manage = Gerencia
meta.org.jkiss.dbeaver.ext.db2.info.DB2Parameter.dataType.name = Tipo
......@@ -645,15 +637,6 @@ meta.org.jkiss.dbeaver.ext.db2.model.security.DB2RoleDep.admin.name
meta.org.jkiss.dbeaver.ext.db2.model.security.DB2RoleDep.grantee.name = Concedente
meta.org.jkiss.dbeaver.ext.db2.model.security.DB2RoleDep.granteeType.name = Tipo de concedente
tool.org.jkiss.dbeaver.ext.db2.showerror.name = Recuperar erros de messagem do SQL...
tool.org.jkiss.dbeaver.ext.db2.table.reorg.name = Reorganizar Tabela...
tool.org.jkiss.dbeaver.ext.db2.table.reorgcheck.name = Reorganizar e Checar (Tabela)...
tool.org.jkiss.dbeaver.ext.db2.table.reorgcheckix.name = Reorganizar Checar (Indices)...
tool.org.jkiss.dbeaver.ext.db2.table.reorgix.name = Reorganizar Indice...
tool.org.jkiss.dbeaver.ext.db2.table.runstats.name = Runstats...
tool.org.jkiss.dbeaver.ext.db2.table.setintegrity.name = Setar Integridade...
tool.org.jkiss.dbeaver.ext.db2.table.truncate.name = Truncar...
tree.administer.node.name = Administrador
tree.alias.node.name = Apelido
tree.aliases.node.name = Apelidos
......
......@@ -861,5 +861,3 @@ meta.org.jkiss.dbeaver.ext.db2.model.security.DB2RoleAuth.role.name=Role
meta.org.jkiss.dbeaver.ext.db2.model.security.DB2RoleDep.admin.name=Admin?
meta.org.jkiss.dbeaver.ext.db2.model.security.DB2RoleDep.grantee.name=Grantee
meta.org.jkiss.dbeaver.ext.db2.model.security.DB2RoleDep.granteeType.name=Grantee Type
\ No newline at end of file
editor.org.jkiss.dbeaver.ext.db2.model.app.DB2ServerApplicationEditor.name = Application Manager
\ No newline at end of file
......@@ -419,36 +419,6 @@
<manager class="org.jkiss.dbeaver.ext.db2.manager.DB2XMLSchemaManager" objectType="org.jkiss.dbeaver.ext.db2.model.DB2XMLSchema"/>
</extension>
<extension point="org.jkiss.dbeaver.databaseEditor">
<editor id="source.declaration"
class="org.jkiss.dbeaver.ui.editors.sql.SQLSourceViewer"
label="%editor.source.declaration.name"
description="%editor.source.declaration.description"
icon="#sql_text"
position="additions_middle"
contributor="org.jkiss.dbeaver.ui.editors.sql.SQLEditorContributorNested"
type="folder"
embeddable="false">
<objectType name="org.jkiss.dbeaver.ext.db2.model.DB2MaterializedQueryTable"/>
<objectType name="org.jkiss.dbeaver.ext.db2.model.DB2TableCheckConstraint"/>
<objectType name="org.jkiss.dbeaver.ext.db2.model.DB2Trigger"/>
<objectType name="org.jkiss.dbeaver.ext.db2.model.DB2View"/>
</editor>
<editor id="source.ddl"
class="org.jkiss.dbeaver.ui.editors.sql.SQLSourceViewer"
label="%editor.source.ddl.name"
description="%editor.source.ddl.description"
icon="#sql_text"
position="additions_middle"
contributor="org.jkiss.dbeaver.ui.editors.sql.SQLEditorContributorNested"
type="folder">
<objectType name="org.jkiss.dbeaver.ext.db2.model.DB2Table"/>
</editor>
</extension>
<extension point="org.jkiss.dbeaver.dataTypeProvider">
<provider
class="org.jkiss.dbeaver.ext.db2.data.DB2ValueHandlerProvider"
......@@ -473,14 +443,4 @@
</dialect>
</extension>
<extension point="org.eclipse.ui.editors">
<editor
name="%editor.org.jkiss.dbeaver.ext.db2.model.app.DB2ServerApplicationEditor.name"
icon="icons/compile.png"
class="org.jkiss.dbeaver.ext.db2.model.app.DB2ServerApplicationEditor"
id="org.jkiss.dbeaver.ext.db2.model.app.DB2ServerApplicationEditor"
contributorClass="org.jkiss.dbeaver.ui.editors.EditorSearchActionsContributor">
</editor>
</extension>
</plugin>
......@@ -33,78 +33,9 @@ public class DB2Messages extends NLS {
// Pure Utility Class
}
public static String db2_connection_page_tab_database;
public static String db2_connection_page_tab_security;
public static String db2_connection_trace_page_checkbox_append;
public static String db2_connection_trace_page_checkbox_connect;
public static String db2_connection_trace_page_checkbox_connection_calls;
public static String db2_connection_trace_page_checkbox_diagnostics;
public static String db2_connection_trace_page_checkbox_drda_flows;
public static String db2_connection_trace_page_checkbox_driver_configuration;
public static String db2_connection_trace_page_checkbox_enable_trace;
public static String db2_connection_trace_page_checkbox_parameter_metadata;
public static String db2_connection_trace_page_checkbox_result_set_calls;
public static String db2_connection_trace_page_checkbox_result_set_metadata;
public static String db2_connection_trace_page_checkbox_sql_j;
public static String db2_connection_trace_page_checkbox_statement_calls;
public static String db2_connection_trace_page_checkbox_xa_calls;
public static String db2_connection_trace_page_header_levels;
public static String db2_connection_trace_page_label_file_name;
public static String db2_connection_trace_page_label_folder;
public static String db2_connection_trace_page_string_trace;
public static String db2_connection_trace_page_tab_description_trace_settings;
public static String db2_connection_trace_page_tab_trace_settings;
public static String dialog_connection_browse_button;
public static String dialog_connection_database_schema_label;
public static String dialog_connection_db_file_chooser_text;
public static String dialog_connection_db_folder_chooser_message;
public static String dialog_connection_db_folder_chooser_text;
public static String dialog_connection_edit_driver_button;
public static String dialog_connection_host_label;
public static String dialog_connection_jdbc_url_;
public static String dialog_connection_password_label;
public static String dialog_connection_path_label;
public static String dialog_connection_port_label;
public static String dialog_connection_server_label;
public static String dialog_connection_test_connection_button;
public static String dialog_connection_user_name_label;
public static String dialog_connection_advanced_tab;
public static String dialog_connection_advanced_tab_tooltip;
public static String dialog_connection_basic_tab;
public static String dialog_connection_connection_type_group;
public static String dialog_connection_custom_tab;
public static String dialog_connection_general_tab;
public static String dialog_connection_general_tab_tooltip;
public static String dialog_connection_host;
public static String dialog_connection_ora_home;
public static String dialog_connection_os_authentication;
public static String dialog_connection_password;
public static String dialog_connection_port;
public static String dialog_connection_role;
public static String dialog_connection_security_group;
public static String dialog_connection_select_ora_home_msg;
public static String dialog_connection_sid_service;
public static String dialog_connection_sid;
public static String dialog_connection_service;
public static String dialog_connection_database;
public static String dialog_connection_test_connection;
public static String dialog_connection_tns_tab;
public static String dialog_connection_user_name;
public static String dialog_connection_ver;
public static String edit_db2_constraint_manager_dialog_title;
public static String edit_db2_data_type_manager_dialog_title;
public static String edit_db2_foreign_key_manager_dialog_title;
public static String edit_db2_index_manager_dialog_title;
public static String edit_db2_package_manager_dialog_title;
public static String edit_db2_schema_manager_dialog_title;
public static String edit_db2_trigger_manager_dialog_title;
public static String edit_db2_sequence_manager_dialog_title;
public static String dialog_explain_choose_tablespace;
public static String dialog_explain_choose_tablespace_tablespace;
public static String dialog_explain_no_tables;
public static String dialog_explain_no_tablespace_found;
public static String dialog_explain_no_tablespace_found_title;
public static String dialog_explain_no_tables_found_ex;
public static String dialog_explain_ask_to_create;
......@@ -113,68 +44,9 @@ public class DB2Messages extends NLS {
public static String editors_db2_application_editor_action_force;
public static String editors_db2_application_editor_confirm_action;
public static String dialog_table_tools_success_title;
public static String dialog_table_tools_options;
public static String dialog_table_tools_result;
public static String dialog_table_tools_progress;
public static String dialog_table_tools_runstats_title;
public static String dialog_table_tools_runstats_cols_title;
public static String dialog_table_tools_runstats_cols_all;
public static String dialog_table_tools_runstats_cols_all_and_distribution;
public static String dialog_table_tools_runstats_cols_no;
public static String dialog_table_tools_runstats_indexes_title;
public static String dialog_table_tools_runstats_indexes_detailed;
public static String dialog_table_tools_runstats_indexes_all;
public static String dialog_table_tools_runstats_indexes_no;
public static String dialog_table_tools_runstats_stats_title;
public static String dialog_table_tools_reorg_title;
public static String dialog_table_tools_reorg_inplace;
public static String dialog_table_tools_reorg_useindex;
public static String dialog_table_tools_reorg_useindexscan;
public static String dialog_table_tools_reorg_truncate;
public static String dialog_table_tools_reorg_usetempts;
public static String dialog_table_tools_reorg_reorglobs;
public static String dialog_table_tools_reorg_reorglobsts;
public static String dialog_table_tools_reorg_resetdict;
public static String dialog_table_tools_reorg_access_title;
public static String dialog_table_tools_reorg_access_no;
public static String dialog_table_tools_reorg_access_read;
public static String dialog_table_tools_reorg_access_readwrite;
public static String dialog_table_tools_reorgix_title;
public static String dialog_table_tools_reorgix_access_title;
public static String dialog_table_tools_reorgix_access_default;
public static String dialog_table_tools_reorgix_access_no;
public static String dialog_table_tools_reorgix_access_read;
public static String dialog_table_tools_reorgix_access_readwrite;
public static String dialog_table_tools_reorgix_options_title;
public static String dialog_table_tools_reorgix_options_full;
public static String dialog_table_tools_reorgix_options_cleanup_keys;
public static String dialog_table_tools_reorgix_options_cleanup_pages;
public static String dialog_table_tools_reorgcheck_title;
public static String dialog_table_tools_reorgcheckix_title;
public static String dialog_table_tools_truncate_title;
public static String dialog_table_tools_truncate_storage_title;
public static String dialog_table_tools_truncate_storage_reuse;
public static String dialog_table_tools_truncate_storage_drop;
public static String dialog_table_tools_truncate_triggers_title;
public static String dialog_table_tools_truncate_triggers_ignore;
public static String dialog_table_tools_truncate_triggers_restrict;
public static String no_ddl_for_system_tables;
public static String no_ddl_for_nicknames;
public static String no_ddl_for_nonsql_routines;
public static String no_ddl_for_spaces_in_name;
public static String dialog_tools_msg_title;
public static String dialog_tools_msg_code;
public static String dialog_tools_mes_error_code_title;
public static String dialog_tools_mes_error_code;
public static String dialog_tools_mes_message;
}
db2_connection_page_tab_database=Database
db2_connection_page_tab_security=Security
db2_connection_trace_page_checkbox_connect=Connects
db2_connection_trace_page_checkbox_connection_calls=Connection calls
db2_connection_trace_page_checkbox_diagnostics=Diagnostics
db2_connection_trace_page_checkbox_drda_flows=DRDA flows
db2_connection_trace_page_checkbox_driver_configuration=Driver configuration
db2_connection_trace_page_checkbox_enable_trace=Enable trace
db2_connection_trace_page_checkbox_parameter_metadata=Parameter metadata
db2_connection_trace_page_checkbox_result_set_calls=Result set calls
db2_connection_trace_page_checkbox_result_set_metadata=Result set metadata
db2_connection_trace_page_checkbox_sql_j=SQL J
db2_connection_trace_page_checkbox_statement_calls=Statement calls
db2_connection_trace_page_checkbox_xa_calls=XA calls
db2_connection_trace_page_header_levels=Levels
db2_connection_trace_page_label_file_name=File name
db2_connection_trace_page_label_folder=Folder
db2_connection_trace_page_string_trace=trace
db2_connection_trace_page_tab_description_trace_settings=Trace settings
db2_connection_trace_page_tab_trace_settings=Trace settings
db2_connection_trace_page_checkbox_append=Append
dialog_connection_browse_button=Browse ...
dialog_connection_database_schema_label=Database/Schema:
dialog_connection_db_file_chooser_text=Choose database file
dialog_connection_db_folder_chooser_message=Choose folder with database files
dialog_connection_db_folder_chooser_text=Choose database folder
dialog_connection_edit_driver_button=Edit Driver Settings
dialog_connection_general_tab=General
dialog_connection_general_tab_tooltip=General connection properties
dialog_connection_host_label=Host:
dialog_connection_jdbc_url_=JDBC URL:
dialog_connection_password_label=Password:
dialog_connection_path_label=Path:
dialog_connection_port_label=Port:
dialog_connection_server_label=Server:
dialog_connection_test_connection_button=Test Connection ...
dialog_connection_user_name_label=User name:
dialog_connection_advanced_tab=Advanced
dialog_connection_advanced_tab_tooltip=Advanced/custom driver properties
dialog_connection_basic_tab=Basic
dialog_connection_connection_type_group=Connection Type
dialog_connection_custom_tab=Custom
dialog_connection_host=Host
dialog_connection_ora_home=Client
dialog_connection_os_authentication=OS Authentication
dialog_connection_password=Password
dialog_connection_port=Port
dialog_connection_role=Role
dialog_connection_security_group=Security
dialog_connection_select_ora_home_msg=Select DB2 home
dialog_connection_sid_service=SID/Service
dialog_connection_sid=SID
dialog_connection_service=Service Name
dialog_connection_database=Database
dialog_connection_test_connection=Test Connection ...
dialog_connection_tns_tab=TNS
dialog_connection_user_name=User name
dialog_connection_ver=v.
edit_db2_constraint_manager_dialog_title=Create constraint
edit_db2_data_type_manager_dialog_title=Package
edit_db2_foreign_key_manager_dialog_title=Create foreign key
edit_db2_index_manager_dialog_title=Create index
edit_db2_package_manager_dialog_title=Package
edit_db2_schema_manager_dialog_title=Schema name
edit_db2_sequence_manager_dialog_title=Sequence
edit_db2_trigger_manager_dialog_title=Trigger
editors_db2_application_editor_title_force_application=Force Application
editors_db2_application_editor_action_force=Force
editors_db2_application_editor_confirm_action=Are you sure you want to "force" application "{1}"?
......@@ -80,67 +10,8 @@ dialog_explain_no_tablespace_found_title=No Tablespace
dialog_explain_no_tables_found_ex=EXPLAIN tables not found. Query cannot be explained.
dialog_explain_ask_to_create=Tables for EXPLAIN not found within current authorization ID (%s) nor in SYSTOOLS.\n\nDo you want DBeaver to create new EXPLAIN tables?
dialog_table_tools_success_title=Success
dialog_table_tools_options=Options
dialog_table_tools_result=Result
dialog_table_tools_progress=Progress
dialog_table_tools_runstats_title=Runstats on Table
dialog_table_tools_runstats_cols_title=Collect Colums Statistics
dialog_table_tools_runstats_cols_all=All Columns
dialog_table_tools_runstats_cols_all_and_distribution=All Columns with Distribution
dialog_table_tools_runstats_cols_no=No Statistics on Columns
dialog_table_tools_runstats_indexes_title=Collect Indexes Statistics
dialog_table_tools_runstats_indexes_detailed=Extended Detailed Statistics with Sampling on all Indexes
dialog_table_tools_runstats_indexes_all=All Indexes
dialog_table_tools_runstats_indexes_no=No Statistics on Indexes
dialog_table_tools_runstats_stats_title=Table Sampling (% of Pages)
dialog_table_tools_reorg_title=Reorg Table
dialog_table_tools_reorg_inplace=Reorg in place?
dialog_table_tools_reorg_useindex=Reorg Using Existing Index?
dialog_table_tools_reorg_useindexscan=Use Index Scan?
dialog_table_tools_reorg_truncate=Truncate Table After Reorg?
dialog_table_tools_reorg_usetempts=Use Temporary Tablespace?
dialog_table_tools_reorg_reorglobs=Reorg LOBs and Long Columns?
dialog_table_tools_reorg_reorglobsts=Use Temp. Tablespace for LOBs and Long Cols
dialog_table_tools_reorg_resetdict=Reset Dictionary?
dialog_table_tools_reorg_access_title=Table Access
dialog_table_tools_reorg_access_no=Allow No Access
dialog_table_tools_reorg_access_read=Allow Read-Only Access
dialog_table_tools_reorg_access_readwrite=Allow Read and Write Access
dialog_table_tools_reorgix_title=Reorg Index on Table
dialog_table_tools_reorgix_access_title=Table Access
dialog_table_tools_reorgix_access_default=Use Default Access
dialog_table_tools_reorgix_access_no=Allow No Access
dialog_table_tools_reorgix_access_read=Allow Read-Only Access
dialog_table_tools_reorgix_access_readwrite=Allow Read and Write Access
dialog_table_tools_reorgix_options_title=Options
dialog_table_tools_reorgix_options_full=Full Index Reorg
dialog_table_tools_reorgix_options_cleanup_keys=Only Cleanup Pseudo Deleted Keys and Pages
dialog_table_tools_reorgix_options_cleanup_pages=Only Cleanup Pseudo Deleted Pages
dialog_table_tools_reorgcheck_title=Reorg Check on Table
dialog_table_tools_reorgcheckix_title=Reorg Check on Table Indexes
dialog_table_tools_truncate_title=Truncate Table(s)
dialog_table_tools_truncate_storage_title=Storage Options
dialog_table_tools_truncate_storage_reuse=Reuse Storage
dialog_table_tools_truncate_storage_drop=Drop Storage
dialog_table_tools_truncate_triggers_title=Delete Triggers Options
dialog_table_tools_truncate_triggers_ignore=Ignore Delete Triggers
dialog_table_tools_truncate_triggers_restrict=Restrict When Delete Triggers
no_ddl_for_system_tables=-- DDL is not available for System Tables
no_ddl_for_nicknames=-- DDL is not available for Nicknames
no_ddl_for_nonsql_routines=-- DDL is not available for non-SQL based Routines
no_ddl_for_spaces_in_name=-- DDL is not available for Object that have a whitespace in their name or Schema
dialog_tools_msg_title=Retrieve SQL Message from SQL Code
dialog_tools_msg_code=SQL Code?
dialog_tools_mes_error_code_title=Error
dialog_tools_mes_error_code=The SQL Code must be Numeric, eg -551, 803...
dialog_tools_mes_message=SQL Message
#Generated by ResourceBundle Editor (http://essiembre.github.io/eclipse-rbe/)
dialog_connection_advanced_tab = Erweitert
dialog_connection_advanced_tab_tooltip = Erweiterte/angepasste Treibereigenschaften
dialog_connection_basic_tab = Basis
dialog_connection_browse_button = Durchsuchen ...
dialog_connection_connection_type_group = Verbindungstyp
dialog_connection_custom_tab = Benutzerdefiniert
dialog_connection_database = Datenbank
dialog_connection_database_schema_label = Datenbank/Schema:
dialog_connection_db_file_chooser_text = Datenbankdatei w\u00E4hlen
dialog_connection_db_folder_chooser_message = Ordner mit Datenbankdateien ausw\u00E4hlen
dialog_connection_db_folder_chooser_text = Datenbankordner ausw\u00E4hlen
dialog_connection_edit_driver_button = Treibereinstellungen bearbeiten
dialog_connection_general_tab = Allgemein
dialog_connection_general_tab_tooltip = Allgemeine Verbindungseigenschaften
dialog_connection_host = Host
dialog_connection_host_label = Host:
dialog_connection_jdbc_url_ = JDBC URL:
dialog_connection_ora_home = Client
dialog_connection_os_authentication = Betriebssystem-Authentifizierung
dialog_connection_password = Passwort
dialog_connection_password_label = Passwort:
dialog_connection_path_label = Pfad:
dialog_connection_port = Port
dialog_connection_port_label = Port:
dialog_connection_role = Rolle
dialog_connection_security_group = Sicherheit
dialog_connection_select_ora_home_msg = DB2 Home ausw\u00E4hlen
dialog_connection_server_label = Server:
dialog_connection_service = Servicename
dialog_connection_sid = SID
dialog_connection_sid_service = SID/Service
dialog_connection_test_connection = Verbindung testen ...
dialog_connection_test_connection_button = Verbindung testen ...
dialog_connection_tns_tab = TNS
dialog_connection_user_name = Benutzername
dialog_connection_user_name_label = Benutzername:
dialog_connection_ver = v.
dialog_explain_ask_to_create = Tabellen f\u00FCr EXPLAIN, die weder in der aktuellen Berechtigungs-ID (%s) noch in SYSTOOLS enthalten sind.\r\n\r\nM\u00F6chten Sie, dass DBeaver neue EXPLAIN-Tabellen erstellt?
dialog_explain_choose_tablespace = Einen Tablespace ausw\u00E4hlen
dialog_explain_choose_tablespace_tablespace = Tablespace
dialog_explain_no_tables = Fehlende Tabellen erkl\u00E4ren
dialog_explain_no_tables_found_ex = EXPLAIN-Tabellen nicht gefunden. Die Abfrage kann nicht beantwortet werden.
dialog_explain_no_tablespace_found = Es wurde kein verwendbarer Tablespace gefunden, um Explain-Tabellen zu erstellen.
dialog_explain_no_tablespace_found_title = Kein Tablespace
dialog_table_tools_options = Optionen
dialog_table_tools_progress = Fortschritt
dialog_table_tools_reorg_access_no = Kein Zugriff erlauben
dialog_table_tools_reorg_access_read = Nur Lesezugriff erlauben
dialog_table_tools_reorg_access_readwrite = Lese- und Schreibzugriff erlauben
dialog_table_tools_reorg_access_title = Tabellenzugriff
dialog_table_tools_reorg_inplace = Reorg in Position?
dialog_table_tools_reorg_reorglobs = Reorg LOBs und langen Spalten?
dialog_table_tools_reorg_reorglobsts = Temp. Tablespace f\u00FCr LOBs und Lange Spalten verwenden
dialog_table_tools_reorg_resetdict = W\u00F6rterbuch zur\u00FCcksetzen?
dialog_table_tools_reorg_title = Reorg Tabelle
dialog_table_tools_reorg_truncate = Tabelle nach Reorg abschneiden?
dialog_table_tools_reorg_useindex = Reorg mit bestehendem Index?
dialog_table_tools_reorg_useindexscan = Index-Scan verwenden?
dialog_table_tools_reorg_usetempts = Tempor\u00E4ren Tablespace verwenden?
dialog_table_tools_reorgcheck_title = Reorg-Pr\u00FCfung auf Tabelle
dialog_table_tools_reorgcheckix_title = Reorg-Check auf Tabellenindizes
dialog_table_tools_reorgix_access_default = Standardzugang verwenden
dialog_table_tools_reorgix_access_no = Kein Zugriff erlauben
dialog_table_tools_reorgix_access_read = Lesezugriff erlauben
dialog_table_tools_reorgix_access_readwrite = Lese- und Schreibzugriff erlauben
dialog_table_tools_reorgix_access_title = Tabellenzugriff
dialog_table_tools_reorgix_options_cleanup_keys = Nur Pseudogel\u00F6schte Schl\u00FCssel und Seiten bereinigen
dialog_table_tools_reorgix_options_cleanup_pages = Nur Pseudogel\u00F6schte Seiten bereinigen
dialog_table_tools_reorgix_options_full = Vollst\u00E4ndiger Index Reorg
dialog_table_tools_reorgix_options_title = Optionen
dialog_table_tools_reorgix_title = Reorg Index auf Tabelle
dialog_table_tools_result = Ergebnis
dialog_table_tools_runstats_cols_all = Alle Spalten
dialog_table_tools_runstats_cols_all_and_distribution = Alle Spalten mit Verteilung
dialog_table_tools_runstats_cols_no = Keine Statistiken zu den Spalten
dialog_table_tools_runstats_cols_title = Sammeln Sie Kolumnenstatistiken
dialog_table_tools_runstats_indexes_all = Alle Indizes
dialog_table_tools_runstats_indexes_detailed = Erweiterte detaillierte Statistiken mit Stichproben auf allen Indizes
dialog_table_tools_runstats_indexes_no = Keine Statistiken f\u00FCr Indizes
dialog_table_tools_runstats_indexes_title = Sammeln von Indexstatistiken
dialog_table_tools_runstats_stats_title = Tabellen-Stichproben (% der Seiten)
dialog_table_tools_runstats_title = Runstats auf Tabelle
dialog_table_tools_success_title = Erfolg
dialog_table_tools_truncate_storage_drop = Speicher auswerfen
dialog_table_tools_truncate_storage_reuse = Speicher wiederverwenden
dialog_table_tools_truncate_storage_title = Speicheroptionen
dialog_table_tools_truncate_title = Tabelle(n) abschneiden
dialog_table_tools_truncate_triggers_ignore = L\u00F6schausl\u00F6ser ignorieren
dialog_table_tools_truncate_triggers_restrict = Einschr\u00E4nken beim L\u00F6schen von Triggern
dialog_table_tools_truncate_triggers_title = Trigger-Optionen l\u00F6schen
dialog_tools_mes_error_code = Der SQL-Code muss numerisch sein, z.B. -551, 803...
dialog_tools_mes_error_code_title = Fehler
dialog_tools_mes_message = SQL-Nachricht
dialog_tools_msg_code = SQL-Code?
dialog_tools_msg_title = Abrufen der SQL-Nachricht aus dem SQL-Code
edit_db2_constraint_manager_dialog_title = Einschr\u00E4nkung erstellen
edit_db2_data_type_manager_dialog_title = Paket
edit_db2_foreign_key_manager_dialog_title = Fremdschl\u00FCssel erstellen
edit_db2_index_manager_dialog_title = Index erstellen
edit_db2_package_manager_dialog_title = Paket
edit_db2_schema_manager_dialog_title = Schema name
edit_db2_sequence_manager_dialog_title = Reihenfolge
edit_db2_trigger_manager_dialog_title = Ausl\u00F6ser
editors_db2_application_editor_action_force = Erzwingen
editors_db2_application_editor_confirm_action = Sind Sie sicher, dass Sie die Anwendung "{1}" "erzwingen" wollen?
editors_db2_application_editor_title_force_application = Erzwingen der Anwendung
no_ddl_for_nicknames = -- DDL ist f\u00FCr Nicknames nicht verf\u00FCgbar.
no_ddl_for_nonsql_routines = -- DDL ist nicht verf\u00FCgbar f\u00FCr nicht-SQL-basierte Routinen.
no_ddl_for_spaces_in_name = -- DDL ist nicht verf\u00FCgbar f\u00FCr Objekte, die einen Whitespace in ihrem Namen oder Schema haben.
no_ddl_for_system_tables = -- DDL ist f\u00FCr Systemtabellen nicht verf\u00FCgbar.
db2_connection_trace_page_checkbox_connect=\u0421\u043E\u0435\u0434\u0438\u043D\u0438\u0442\u044C
db2_connection_trace_page_checkbox_connection_calls=\u0412\u044B\u0437\u043E\u0432\u044B \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u044F
db2_connection_trace_page_checkbox_diagnostics=\u0414\u0438\u0430\u0433\u043D\u043E\u0441\u0442\u0438\u043A\u0430
db2_connection_trace_page_checkbox_drda_flows=\u041F\u043E\u0442\u043E\u043A\u0438 DRDA
db2_connection_trace_page_checkbox_driver_configuration=\u041A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044F \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430
db2_connection_trace_page_checkbox_enable_trace=\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043E\u0442\u0441\u043B\u0435\u0436\u0438\u0432\u0430\u043D\u0438\u0435
db2_connection_trace_page_checkbox_parameter_metadata=\u041C\u0435\u0442\u0430\u0434\u0430\u043D\u043D\u044B\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432
db2_connection_trace_page_checkbox_result_set_calls=\u0412\u044B\u0437\u043E\u0432\u044B \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0438\u0440\u0443\u044E\u0449\u0435\u0433\u043E \u043D\u0430\u0431\u043E\u0440\u0430
db2_connection_trace_page_checkbox_result_set_metadata=\u041C\u0435\u0442\u0430\u0434\u0430\u043D\u043D\u044B\u0435 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0438\u0440\u0443\u044E\u0449\u0435\u0433\u043E \u043D\u0430\u0431\u043E\u0440\u0430
db2_connection_trace_page_checkbox_sql_j=SQL J
db2_connection_trace_page_checkbox_statement_calls=\u0412\u044B\u0437\u043E\u0432\u044B \u043E\u043F\u0435\u0440\u0430\u0442\u043E\u0440\u043E\u0432
db2_connection_trace_page_checkbox_xa_calls=\u0412\u044B\u0437\u043E\u0432\u044B XA
db2_connection_trace_page_header_levels=\u0423\u0440\u043E\u0432\u043D\u0438
db2_connection_trace_page_label_file_name=\u0418\u043C\u044F \u0444\u0430\u0439\u043B\u0430
db2_connection_trace_page_label_folder=\u041F\u0430\u043F\u043A\u0430
db2_connection_trace_page_string_trace=\u043E\u0442\u0441\u043B\u0435\u0436\u0438\u0432\u0430\u043D\u0438\u0435
db2_connection_trace_page_tab_description_trace_settings=\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043E\u0442\u0441\u043B\u0435\u0436\u0438\u0432\u0430\u043D\u0438\u044F
db2_connection_trace_page_tab_trace_settings=\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043E\u0442\u0441\u043B\u0435\u0436\u0438\u0432\u0430\u043D\u0438\u044F
db2_connection_page_tab_database=\u0411\u0430\u0437\u0430 \u0434\u0430\u043D\u043D\u044B\u0445
db2_connection_page_tab_security=\u0411\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u043E\u0441\u0442\u044C
db2_connection_trace_page_checkbox_append=\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C
dialog_connection_browse_button=Browse ...
dialog_connection_database_schema_label=Database/Schema:
dialog_connection_db_file_chooser_text=Choose database file
dialog_connection_db_folder_chooser_message=Choose folder with database files
dialog_connection_db_folder_chooser_text=Choose database folder
dialog_connection_edit_driver_button=Edit Driver Settings
dialog_connection_general_tab=General
dialog_connection_general_tab_tooltip=General connection properties
dialog_connection_host_label=\u0425\u043E\u0441\u0442:
dialog_connection_jdbc_url_=JDBC URL:
dialog_connection_password_label=\u041F\u0430\u0440\u043E\u043B\u044C:
dialog_connection_path_label=Path:
dialog_connection_port_label=\u041F\u043E\u0440\u0442:
dialog_connection_server_label=Server:
dialog_connection_test_connection_button=Test Connection ...
dialog_connection_user_name_label=\u0418\u043C\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F:
dialog_connection_advanced_tab=Advanced
dialog_connection_advanced_tab_tooltip=Advanced/custom driver properties
dialog_connection_basic_tab=Basic
dialog_connection_connection_type_group=Connection Type
dialog_connection_custom_tab=Custom
dialog_connection_host=\u0425\u043E\u0441\u0442
dialog_connection_ora_home=Client
dialog_connection_os_authentication=OS Authentication
dialog_connection_password=\u041F\u0430\u0440\u043E\u043B\u044C
dialog_connection_port=\u041F\u043E\u0440\u0442
dialog_connection_role=Role
dialog_connection_security_group=\u0411\u0435\u0437\u043E\u043F\u0430\u0441\u043D\u043E\u0441\u0442\u044C
dialog_connection_select_ora_home_msg=Select DB2 home
dialog_connection_sid_service=SID/Service
dialog_connection_sid=SID
dialog_connection_service=Service Name
dialog_connection_database=\u0411\u0430\u0437\u0430 \u0434\u0430\u043D\u043D\u044B\u0445
dialog_connection_test_connection=Test Connection ...
dialog_connection_tns_tab=TNS
dialog_connection_user_name=\u0418\u043C\u044F \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F
dialog_connection_ver=v.
edit_db2_constraint_manager_dialog_title=Create constraint
edit_db2_data_type_manager_dialog_title=Package
edit_db2_foreign_key_manager_dialog_title=Create foreign key
edit_db2_index_manager_dialog_title=Create index
edit_db2_package_manager_dialog_title=Package
edit_db2_schema_manager_dialog_title=Schema name
edit_db2_sequence_manager_dialog_title=Sequence
edit_db2_trigger_manager_dialog_title=Trigger
editors_db2_application_editor_title_force_application=Force Application
editors_db2_application_editor_action_force=Force
editors_db2_application_editor_confirm_action=Are you sure you want to "force" application "{1}"?
......@@ -80,67 +10,8 @@ dialog_explain_no_tablespace_found_title=No Tablespace
dialog_explain_no_tables_found_ex=EXPLAIN tables not found. Query can't be explained.
dialog_explain_ask_to_create=Tables for EXPLAIN not found within current authorization Id (%s) nor in SYSTOOLS.\n\nDo you want DBeaver to create new EXPLAIN tables?
dialog_table_tools_success_title=Success
dialog_table_tools_options=Options
dialog_table_tools_result=Result
dialog_table_tools_progress=Progress
dialog_table_tools_runstats_title=Runstats on Table
dialog_table_tools_runstats_cols_title=Collect Colums Statistics
dialog_table_tools_runstats_cols_all=All Columns
dialog_table_tools_runstats_cols_all_and_distribution=All Columns with Distribution
dialog_table_tools_runstats_cols_no=No Statistics on Columns
dialog_table_tools_runstats_indexes_title=Collect Indexes Statistics
dialog_table_tools_runstats_indexes_detailed=Extended Detailed Statistics with Sampling on all Indexes
dialog_table_tools_runstats_indexes_all=All Indexes
dialog_table_tools_runstats_indexes_no=No Statistics on Indexes
dialog_table_tools_runstats_stats_title=Table Sampling (% of Pages)
dialog_table_tools_reorg_title=Reorg Table
dialog_table_tools_reorg_inplace=Reorg in place?
dialog_table_tools_reorg_useindex=Reorg Using Existing Index?
dialog_table_tools_reorg_useindexscan=Use Index Scan?
dialog_table_tools_reorg_truncate=Truncate Table After Reorg?
dialog_table_tools_reorg_usetempts=Use Temporary Tablespace?
dialog_table_tools_reorg_reorglobs=Reorg LOBs and Long Columns?
dialog_table_tools_reorg_reorglobsts=Use Temp. Tablespace for LOBs and Long Cols
dialog_table_tools_reorg_resetdict=Reset Dictionary?
dialog_table_tools_reorg_access_title=Table Access
dialog_table_tools_reorg_access_no=Allow No Access
dialog_table_tools_reorg_access_read=Allow Read-Only Access
dialog_table_tools_reorg_access_readwrite=Allow Read and Write Access
dialog_table_tools_reorgix_title=Reorg Index on Table
dialog_table_tools_reorgix_access_title=Table Access
dialog_table_tools_reorgix_access_default=Use Default Access
dialog_table_tools_reorgix_access_no=Allow No Access
dialog_table_tools_reorgix_access_read=Allow Read-Only Access
dialog_table_tools_reorgix_access_readwrite=Allow Read and Write Access
dialog_table_tools_reorgix_options_title=Options
dialog_table_tools_reorgix_options_full=Full Index Reorg
dialog_table_tools_reorgix_options_cleanup_keys=Only Cleanup Pseudo Deleted Keys and Pages
dialog_table_tools_reorgix_options_cleanup_pages=Only Cleanup Pseudo Deleted Pages
dialog_table_tools_reorgcheck_title=Reorg Check on Table
dialog_table_tools_reorgcheckix_title=Reorg Check on Table Indexes
dialog_table_tools_truncate_title=Truncate Table(s)
dialog_table_tools_truncate_storage_title=Storage Options
dialog_table_tools_truncate_storage_reuse=Reuse Storage
dialog_table_tools_truncate_storage_drop=Drop Storage
dialog_table_tools_truncate_triggers_title=Delete Triggers Options
dialog_table_tools_truncate_triggers_ignore=Ignore Delete Triggers
dialog_table_tools_truncate_triggers_restrict=Restrict When Delete Triggers
no_ddl_for_system_tables=-- DDL is not available for System Tables
no_ddl_for_nicknames=-- DDL is not available for Nicknames
no_ddl_for_nonsql_routines=-- DDL is not available for non-SQL based Routines
no_ddl_for_spaces_in_name=-- DDL is not available for Object that have a whitespace in their name or Schema
dialog_tools_msg_title=Retrieve SQL Message from SQL Code
dialog_tools_msg_code=SQL Code?
dialog_tools_mes_error_code_title=Error
dialog_tools_mes_error_code=The SQL Code must be Numeric, eg -551, 803...
dialog_tools_mes_message=SQL Message
......@@ -18,9 +18,7 @@
package org.jkiss.dbeaver.ext.db2.manager;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.ext.db2.DB2Messages;
import org.jkiss.dbeaver.ext.db2.model.*;
import org.jkiss.dbeaver.ext.db2.model.dict.DB2DeleteUpdateRule;
import org.jkiss.dbeaver.model.DBPEvaluationContext;
import org.jkiss.dbeaver.model.edit.DBECommandContext;
import org.jkiss.dbeaver.model.edit.DBEPersistAction;
......@@ -30,10 +28,7 @@ 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.dbeaver.model.struct.rdb.DBSForeignKeyModifyRule;
import org.jkiss.dbeaver.ui.UITask;
import org.jkiss.dbeaver.ui.editors.object.struct.EditForeignKeyPage;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
......@@ -49,16 +44,6 @@ public class DB2ForeignKeyManager extends SQLForeignKeyManager<DB2TableForeignKe
private static final String CONS_FK_NAME = "%s_%s_FK";
private static final DBSForeignKeyModifyRule[] FK_RULES;
static {
List<DBSForeignKeyModifyRule> rules = new ArrayList<>(DB2DeleteUpdateRule.values().length);
for (DB2DeleteUpdateRule db2DeleteUpdateRule : DB2DeleteUpdateRule.values()) {
rules.add(db2DeleteUpdateRule.getRule());
}
FK_RULES = rules.toArray(new DBSForeignKeyModifyRule[] {});
}
// -----------------
// Business Contract
// -----------------
......@@ -82,44 +67,11 @@ public class DB2ForeignKeyManager extends SQLForeignKeyManager<DB2TableForeignKe
@Override
public DB2TableForeignKey createDatabaseObject(DBRProgressMonitor monitor, DBECommandContext context, final Object table, Object from, Map<String, Object> options)
{
DB2TableForeignKey foreignKey = new DB2TableForeignKey(
return new DB2TableForeignKey(
(DB2Table) table,
null,
DBSForeignKeyModifyRule.NO_ACTION,
DBSForeignKeyModifyRule.NO_ACTION);
return new UITask<DB2TableForeignKey>() {
@Override
protected DB2TableForeignKey runTask() {
EditForeignKeyPage editDialog = new EditForeignKeyPage(
DB2Messages.edit_db2_foreign_key_manager_dialog_title, foreignKey, FK_RULES);
if (!editDialog.edit()) {
return null;
}
DBSForeignKeyModifyRule deleteRule = editDialog.getOnDeleteRule();
DBSForeignKeyModifyRule updateRule = editDialog.getOnUpdateRule();
DB2TableUniqueKey ukConstraint = (DB2TableUniqueKey) editDialog.getUniqueConstraint();
foreignKey.setReferencedConstraint(ukConstraint);
foreignKey.setDb2DeleteRule(DB2DeleteUpdateRule.getDB2RuleFromDBSRule(deleteRule));
foreignKey.setDb2UpdateRule(DB2DeleteUpdateRule.getDB2RuleFromDBSRule(updateRule));
foreignKey.setName(getNewConstraintName(monitor, foreignKey));
List<DB2TableKeyColumn> columns = new ArrayList<>(editDialog.getColumns().size());
DB2TableKeyColumn column;
int colIndex = 1;
for (EditForeignKeyPage.FKColumnInfo tableColumn : editDialog.getColumns()) {
column = new DB2TableKeyColumn(foreignKey, (DB2TableColumn) tableColumn.getOwnColumn(), colIndex++);
columns.add(column);
}
foreignKey.setColumns(columns);
return foreignKey;
}
}.execute();
}
// ------
......
......@@ -18,27 +18,16 @@
package org.jkiss.dbeaver.ext.db2.manager;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.ext.db2.DB2Messages;
import org.jkiss.dbeaver.ext.db2.model.DB2Index;
import org.jkiss.dbeaver.ext.db2.model.DB2IndexColumn;
import org.jkiss.dbeaver.ext.db2.model.DB2TableBase;
import org.jkiss.dbeaver.ext.db2.model.DB2TableColumn;
import org.jkiss.dbeaver.ext.db2.model.dict.DB2IndexType;
import org.jkiss.dbeaver.ext.db2.model.dict.DB2UniqueRule;
import org.jkiss.dbeaver.model.edit.DBECommandContext;
import org.jkiss.dbeaver.model.impl.DBObjectNameCaseTransformer;
import org.jkiss.dbeaver.model.impl.sql.edit.struct.SQLIndexManager;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import org.jkiss.dbeaver.model.struct.DBSEntityAttribute;
import org.jkiss.dbeaver.model.struct.DBSObject;
import org.jkiss.dbeaver.model.struct.cache.DBSObjectCache;
import org.jkiss.dbeaver.model.struct.rdb.DBSIndexType;
import org.jkiss.dbeaver.ui.UITask;
import org.jkiss.dbeaver.ui.editors.object.struct.EditIndexPage;
import org.jkiss.utils.CommonUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
......@@ -48,19 +37,6 @@ import java.util.Map;
*/
public class DB2IndexManager extends SQLIndexManager<DB2Index, DB2TableBase> {
private static final String CONS_IX_NAME = "%s_%s_IDX";
private static final List<DBSIndexType> IX_TYPES;
static {
IX_TYPES = new ArrayList<>(DB2IndexType.values().length);
for (DB2IndexType db2IndexType : DB2IndexType.values()) {
if (db2IndexType.isValidForCreation()) {
IX_TYPES.add(db2IndexType.getDBSIndexType());
}
}
}
@Override
public boolean canEditObject(DB2Index object) {
return false;
......@@ -75,42 +51,11 @@ public class DB2IndexManager extends SQLIndexManager<DB2Index, DB2TableBase> {
@Override
protected DB2Index createDatabaseObject(DBRProgressMonitor monitor, DBECommandContext context, final Object container, Object from, Map<String, Object> options) {
DB2TableBase table = (DB2TableBase) container;
DB2Index index = new DB2Index(
return new DB2Index(
(DB2TableBase) table,
"INDEX",
DBSIndexType.UNKNOWN,
DB2UniqueRule.U);
return new UITask<DB2Index>() {
@Override
protected DB2Index runTask() {
EditIndexPage editPage = new EditIndexPage(
DB2Messages.edit_db2_index_manager_dialog_title, index, IX_TYPES);
if (!editPage.edit()) {
return null;
}
String tableName = CommonUtils.escapeIdentifier(table.getName());
String colName = CommonUtils.escapeIdentifier(editPage.getSelectedAttributes().iterator().next().getName());
String indexBaseName = String.format(CONS_IX_NAME, tableName, colName);
String indexName = DBObjectNameCaseTransformer.transformName(table.getDataSource(), indexBaseName);
index.setName(indexName);
index.setIndexType(editPage.getIndexType());
index.setUniqueRule(editPage.isUnique() ? DB2UniqueRule.U : DB2UniqueRule.D);
int colIndex = 1;
for (DBSEntityAttribute tableColumn : editPage.getSelectedAttributes()) {
index.addColumn(new DB2IndexColumn(
index,
(DB2TableColumn) tableColumn,
colIndex++,
!Boolean.TRUE.equals(editPage.getAttributeProperty(tableColumn, EditIndexPage.PROP_DESC))));
}
return index;
}
}.execute();
}
}
......@@ -17,13 +17,6 @@
*/
package org.jkiss.dbeaver.ext.db2.manager;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.ext.db2.model.DB2DataSource;
import org.jkiss.dbeaver.ext.db2.model.DB2Schema;
......@@ -37,8 +30,6 @@ 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.dbeaver.ui.UITask;
import org.jkiss.dbeaver.ui.UIUtils;
import java.util.List;
import java.util.Map;
......@@ -70,20 +61,7 @@ public class DB2SchemaManager extends SQLObjectEditor<DB2Schema, DB2DataSource>
protected DB2Schema createDatabaseObject(DBRProgressMonitor monitor, DBECommandContext context, final Object container,
Object copyFrom, Map<String, Object> options)
{
return new UITask<DB2Schema>() {
@Override
protected DB2Schema runTask() {
NewSchemaDialog dialog = new NewSchemaDialog(UIUtils.getActiveWorkbenchShell());
if (dialog.open() != IDialogConstants.OK_ID) {
return null;
}
String schemaName = dialog.getSchemaName();
if (schemaName.length() == 0) {
return null;
}
return new DB2Schema((DB2DataSource) container, schemaName);
}
}.execute();
return new DB2Schema((DB2DataSource) container, "NEW_SCHEMA");
}
@Override
......@@ -103,54 +81,4 @@ public class DB2SchemaManager extends SQLObjectEditor<DB2Schema, DB2DataSource>
actions.add(action);
}
// --------
// Dialog
// --------
private static class NewSchemaDialog extends Dialog {
private String schemaName;
public String getSchemaName()
{
return schemaName;
}
// Dialog managment
private Text nameText;
public NewSchemaDialog(Shell parentShell)
{
super(parentShell);
}
@Override
protected boolean isResizable()
{
return true;
}
@Override
protected Control createDialogArea(Composite parent)
{
getShell().setText("New Schema Name");
Control container = super.createDialogArea(parent);
Composite composite = UIUtils.createPlaceholder((Composite) container, 2);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
nameText = UIUtils.createLabelText(composite, "Schema Name", null);
nameText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
return parent;
}
@Override
protected void okPressed()
{
this.schemaName = nameText.getText().trim().toUpperCase();
super.okPressed();
}
}
}
......@@ -29,11 +29,8 @@ import org.jkiss.dbeaver.model.exec.DBCExecutionContext;
import org.jkiss.dbeaver.model.impl.edit.SQLDatabasePersistAction;
import org.jkiss.dbeaver.model.impl.sql.edit.SQLObjectEditor;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import org.jkiss.dbeaver.model.struct.DBSEntityType;
import org.jkiss.dbeaver.model.struct.DBSObject;
import org.jkiss.dbeaver.model.struct.cache.DBSObjectCache;
import org.jkiss.dbeaver.ui.UITask;
import org.jkiss.dbeaver.ui.editors.object.struct.EntityEditPage;
import org.jkiss.utils.CommonUtils;
import java.util.List;
......@@ -80,17 +77,7 @@ public class DB2SequenceManager extends SQLObjectEditor<DB2Sequence, DB2Schema>
Object copyFrom, Map<String, Object> options)
{
DB2Schema schema = (DB2Schema) container;
return new UITask<DB2Sequence>() {
@Override
protected DB2Sequence runTask() {
EntityEditPage page = new EntityEditPage(schema.getDataSource(), DBSEntityType.SEQUENCE);
if (!page.edit()) {
return null;
}
return new DB2Sequence(schema, page.getEntityName());
}
}.execute();
return new DB2Sequence(schema, "NEW_SEQUENCE");
}
@Override
......
......@@ -18,24 +18,16 @@
package org.jkiss.dbeaver.ext.db2.manager;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.ext.db2.DB2Messages;
import org.jkiss.dbeaver.ext.db2.model.DB2Table;
import org.jkiss.dbeaver.ext.db2.model.DB2TableColumn;
import org.jkiss.dbeaver.ext.db2.model.DB2TableKeyColumn;
import org.jkiss.dbeaver.ext.db2.model.DB2TableUniqueKey;
import org.jkiss.dbeaver.model.DBPEvaluationContext;
import org.jkiss.dbeaver.model.edit.DBECommandContext;
import org.jkiss.dbeaver.model.impl.sql.edit.struct.SQLConstraintManager;
import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor;
import org.jkiss.dbeaver.model.struct.DBSEntityAttribute;
import org.jkiss.dbeaver.model.struct.DBSEntityConstraintType;
import org.jkiss.dbeaver.model.struct.DBSObject;
import org.jkiss.dbeaver.model.struct.cache.DBSObjectCache;
import org.jkiss.dbeaver.ui.UITask;
import org.jkiss.dbeaver.ui.editors.object.struct.EditConstraintPage;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
......@@ -48,9 +40,6 @@ public class DB2UniqueKeyManager extends SQLConstraintManager<DB2TableUniqueKey,
private static final String SQL_DROP_PK = "ALTER TABLE %s DROP PRIMARY KEY ";
private static final String SQL_DROP_UK = "ALTER TABLE %s DROP UNIQUE %s";
private static final DBSEntityConstraintType[] CONS_TYPES = { DBSEntityConstraintType.PRIMARY_KEY,
DBSEntityConstraintType.UNIQUE_KEY };
// -----------------
// Business Contract
// -----------------
......@@ -76,33 +65,7 @@ public class DB2UniqueKeyManager extends SQLConstraintManager<DB2TableUniqueKey,
public DB2TableUniqueKey createDatabaseObject(DBRProgressMonitor monitor, DBECommandContext context, final Object table,
Object from, Map<String, Object> options)
{
DB2TableUniqueKey constraint = new DB2TableUniqueKey((DB2Table) table, DBSEntityConstraintType.UNIQUE_KEY);
return new UITask<DB2TableUniqueKey>() {
@Override
protected DB2TableUniqueKey runTask()
{
EditConstraintPage editPage = new EditConstraintPage(DB2Messages.edit_db2_constraint_manager_dialog_title, constraint, CONS_TYPES);
if (!editPage.edit()) {
return null;
}
constraint.setConstraintType(editPage.getConstraintType());
constraint.setName(editPage.getConstraintName());
List<DB2TableKeyColumn> columns = new ArrayList<>(editPage.getSelectedAttributes().size());
DB2TableKeyColumn column;
int colIndex = 1;
for (DBSEntityAttribute tableColumn : editPage.getSelectedAttributes()) {
column = new DB2TableKeyColumn(constraint, (DB2TableColumn) tableColumn, colIndex++);
columns.add(column);
}
constraint.setColumns(columns);
return constraint;
}
}.execute();
return new DB2TableUniqueKey((DB2Table) table, DBSEntityConstraintType.UNIQUE_KEY);
}
// ------
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册