提交 888d38df 编写于 作者: S serge-rider

MySQL view create fix (new view name). i18n fixes


Former-commit-id: 3b573ba3
上级 c2753c2a
......@@ -329,7 +329,6 @@ dialog_connection_button_test = &\u6D4B\u8BD5\u94FE\u63A5 ...
#page conn setting
dialog_connection_description = \u6570\u636E\u5E93\u8FDE\u63A5\u8BBE\u7F6E.
dialog_connection_driver = \u9A71\u52A8\u540D\u79F0:
#dialog_connection_driver_general = \u901A\u7528
dialog_connection_driver_project = \u9879\u76EE
dialog_connection_driver_treecontrol_initialText = \u8F93\u5165\u6570\u636E\u5E93/\u9A71\u52A8\u540D\u7684\u90E8\u5206\u5185\u5BB9\u6765\u8FC7\u6EE4
dialog_connection_edit_driver_button = \u7F16\u8F91\u9A71\u52A8\u8BBE\u7F6E
......
......@@ -327,7 +327,6 @@ dialog_connection_button_test = &Test Connection ...
#page conn setting
dialog_connection_description = Database connection settings.
dialog_connection_driver = Driver Name:
dialog_connection_driver_general = General
dialog_connection_driver_project = Project
dialog_connection_driver_treecontrol_initialText = Type part of database/driver name to filter
dialog_connection_edit_driver_button = Edit Driver Settings
......
......@@ -64,7 +64,7 @@ public class MySQLTableManager extends SQLTableManager<MySQLTableBase, MySQLCata
}
@Override
protected MySQLTable createDatabaseObject(DBRProgressMonitor monitor, DBECommandContext context, MySQLCatalog parent, Object copyFrom) throws DBException
protected MySQLTableBase createDatabaseObject(DBRProgressMonitor monitor, DBECommandContext context, MySQLCatalog parent, Object copyFrom) throws DBException
{
final MySQLTable table;
if (copyFrom instanceof DBSEntity) {
......
......@@ -19,15 +19,14 @@ package org.jkiss.dbeaver.ext.mysql.edit;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.model.DBPEvaluationContext;
import org.jkiss.dbeaver.model.edit.DBEPersistAction;
import org.jkiss.dbeaver.ext.mysql.model.MySQLCatalog;
import org.jkiss.dbeaver.ext.mysql.model.MySQLTableBase;
import org.jkiss.dbeaver.ext.mysql.model.MySQLView;
import org.jkiss.dbeaver.model.DBPEvaluationContext;
import org.jkiss.dbeaver.model.edit.DBECommandContext;
import org.jkiss.dbeaver.model.edit.DBEPersistAction;
import org.jkiss.dbeaver.model.impl.DBSObjectCache;
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.utils.GeneralUtils;
import org.jkiss.utils.CommonUtils;
......@@ -38,7 +37,7 @@ import java.util.Map;
/**
* MySQLViewManager
*/
public class MySQLViewManager extends SQLObjectEditor<MySQLTableBase, MySQLCatalog> {
public class MySQLViewManager extends MySQLTableManager {
@Nullable
@Override
......@@ -69,13 +68,18 @@ public class MySQLViewManager extends SQLObjectEditor<MySQLTableBase, MySQLCatal
@Override
protected MySQLView createDatabaseObject(DBRProgressMonitor monitor, DBECommandContext context, MySQLCatalog parent, Object copyFrom)
{
MySQLView newCatalog = new MySQLView(parent);
newCatalog.setName("NewView"); //$NON-NLS-1$
return newCatalog;
MySQLView newView = new MySQLView(parent);
try {
newView.setName(getNewChildName(monitor, parent, "new_view"));
} catch (DBException e) {
// Never be here
log.error(e);
}
return newView;
}
@Override
protected void addObjectCreateActions(List<DBEPersistAction> actions, ObjectCreateCommand command, Map<String, Object> options)
protected void addStructObjectCreateActions(List<DBEPersistAction> actions, StructCreateCommand command, Map<String, Object> options)
{
createOrReplaceViewQuery(actions, (MySQLView) command.getObject());
}
......@@ -107,26 +111,5 @@ public class MySQLViewManager extends SQLObjectEditor<MySQLTableBase, MySQLCatal
actions.add(new SQLDatabasePersistAction("Create view", decl.toString()));
}
/*
public ITabDescriptor[] getTabDescriptors(IWorkbenchWindow workbenchWindow, final IDatabaseEditor activeEditor, final MySQLView object)
{
if (object.getContainer().isSystem()) {
return null;
}
return new ITabDescriptor[] {
new PropertyTabDescriptor(
PropertiesContributor.CATEGORY_INFO,
"view.definition", //$NON-NLS-1$
MySQLMessages.edit_view_manager_definition,
DBIcon.SOURCES.getImage(),
new SectionDescriptor("default", MySQLMessages.edit_view_manager_definition) { //$NON-NLS-1$
public ISection getSectionClass()
{
return new MySQLViewDefinitionSection(activeEditor);
}
})
};
}
*/
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册