提交 772c84fb 编写于 作者: S serge-rider

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


Former-commit-id: 7e6f7629
......@@ -55,7 +55,7 @@ public class ExasolViewCache extends JDBCStructCache<ExasolSchema, ExasolView, E
"FROM " +
"SYS.%s_COLUMNS c " +
"WHERE " +
"COLUMN_SCHEMA = '%s' AND COLUMN_OBJECT_TYPE = 'TABLE' " +
"COLUMN_SCHEMA = '%s' AND COLUMN_OBJECT_TYPE = 'VIEW' " +
"ORDER BY " +
"COLUMN_ORDINAL_POSITION ";
......@@ -151,7 +151,7 @@ public class ExasolViewCache extends JDBCStructCache<ExasolSchema, ExasolView, E
String sql;
String tablePrefix = exasolSchema.getDataSource().getTablePrefix(ExasolSysTablePrefix.ALL);
if (exasolSchema.getName().equals("SYS"))
if (exasolSchema.getName().equals("SYS") || exasolSchema.getName().equals("EXA_STATISTICS"))
{
if (forView != null) {
sql = String.format(SQL_COLS_SYS_VIEW, ExasolUtils.quoteString(exasolSchema.getName()), ExasolUtils.quoteString(forView.getName())) ;
......
......@@ -117,7 +117,7 @@ meta.org.jkiss.dbeaver.ext.mysql.model.MySQLTable$AdditionalInfo.charset.name=\u
meta.org.jkiss.dbeaver.ext.mysql.model.MySQLTable$AdditionalInfo.description.name=\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435
meta.org.jkiss.dbeaver.ext.mysql.model.MySQLTable$AdditionalInfo.rowCount.name=\u041A\u043E\u043B-\u0432\u043E \u0437\u0430\u043F\u0438\u0441\u0435\u0439
meta.org.jkiss.dbeaver.ext.mysql.model.MySQLTable$AdditionalInfo.avgRowLength.name=\u0421\u0440\u0435\u0434\u043D\u044F\u044F \u0434\u043B\u0438\u043D\u0430 \u0437\u0430\u043F\u0438\u0441\u0438
meta.org.jkiss.dbeaver.ext.mysql.model.MySQLTable$AdditionalInfo.dataLength.name=\u0414\u043B\u0438\u043D\u0430 \u0434\u0430\u043D\u043D\u044B\u0445
meta.org.jkiss.dbeaver.ext.mysql.model.MySQLTable$AdditionalInfo.dataLength.name=\u0420\u0430\u0437\u043C\u0435\u0440
meta.org.jkiss.dbeaver.ext.mysql.model.MySQLTable$AdditionalInfo.createTime.name=\u0412\u0440\u0435\u043C\u044F \u0441\u043E\u0437\u0434\u0430\u043D\u0438\u044F
meta.org.jkiss.dbeaver.ext.mysql.model.MySQLTable$AdditionalInfo.maxDataLength.name=\u041C\u0430\u043A\u0441. \u0434\u043B\u0438\u043D\u0430 \u0434\u0430\u043D\u043D\u044B\u0445
meta.org.jkiss.dbeaver.ext.mysql.model.MySQLTable$AdditionalInfo.dataFree.name=\u0421\u0432\u043E\u0431\u043E\u0434\u043D\u043E
......
......@@ -110,7 +110,10 @@ public class OraclePackageManager extends SQLObjectEditor<OraclePackage, OracleS
private void createOrReplaceProcedureQuery(List<DBEPersistAction> actionList, OraclePackage pack)
{
try {
String header = pack.getObjectDefinitionText(new VoidProgressMonitor(), DBPScriptObject.EMPTY_OPTIONS);
String header = pack.getObjectDefinitionText(new VoidProgressMonitor(), DBPScriptObject.EMPTY_OPTIONS).trim();
if (!header.endsWith(";")) {
header += ";";
}
if (!CommonUtils.isEmpty(header)) {
actionList.add(
new OracleObjectValidateAction(
......@@ -120,6 +123,10 @@ public class OraclePackageManager extends SQLObjectEditor<OraclePackage, OracleS
}
String body = pack.getExtendedDefinitionText(new VoidProgressMonitor());
if (!CommonUtils.isEmpty(body)) {
body = body.trim();
if (!body.endsWith(";")) {
body += ";";
}
actionList.add(
new OracleObjectValidateAction(
pack, OracleObjectType.PACKAGE_BODY,
......
......@@ -16,15 +16,9 @@
*/
package org.jkiss.dbeaver.ext.oracle.model;
import org.jkiss.dbeaver.ext.oracle.actions.CompileHandler;
import org.jkiss.dbeaver.ext.oracle.actions.OracleTaskHandler;
import org.jkiss.dbeaver.ext.oracle.model.source.OracleSourceObject;
import org.jkiss.dbeaver.model.exec.DBCException;
import org.jkiss.dbeaver.model.exec.DBCSession;
import org.jkiss.dbeaver.model.exec.compile.DBCCompileError;
import org.jkiss.dbeaver.model.exec.compile.DBCCompileLog;
import org.jkiss.dbeaver.model.exec.compile.DBCCompileLogBase;
import org.jkiss.dbeaver.model.exec.jdbc.JDBCSession;
/**
* Oracle persist action with validation
......@@ -43,6 +37,7 @@ public class OracleObjectValidateAction extends OracleObjectPersistAction {
if (error != null) {
return;
}
/*
DBCCompileLog log = new DBCCompileLogBase();
OracleTaskHandler.logObjectErrors((JDBCSession) session, log, object, getObjectType());
if (!log.getErrorStack().isEmpty()) {
......@@ -54,5 +49,6 @@ public class OracleObjectValidateAction extends OracleObjectPersistAction {
}
throw new DBCException(message.toString());
}
*/
}
}
......@@ -180,7 +180,7 @@ public class OraclePackage extends OracleSchemaObject
"ALTER PACKAGE " + getFullyQualifiedName(DBPEvaluationContext.DDL) + " COMPILE BODY"
));
}
return actions.toArray(new DBEPersistAction[actions.size()]);
return actions.toArray(new DBEPersistAction[0]);
}
@NotNull
......
......@@ -161,7 +161,7 @@ public class OracleCompilerDialog extends BaseDialog
infoGroup.setLayoutData(gd);
infoGroup.setLayout(new GridLayout(1, false));
compileLog = new ObjectCompilerLogViewer(infoGroup, true);
compileLog = new ObjectCompilerLogViewer(infoGroup, null, true);
}
return composite;
......
......@@ -63,6 +63,7 @@ meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreAttribute.identity.descriptio
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreAttribute.objectId.name=ID \u043E\u0431\u044A\u0435\u043A\u0442\u0430
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreAttribute.objectId.description=\u0423\u043D\u0438\u043A\u0430\u043B\u044C\u043D\u044B\u0439 ID \u043E\u0431\u044A\u0435\u043A\u0442\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreAttribute.local.name=\u041B\u043E\u043A\u0430\u043B\u044C\u043D\u043E
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreAttribute.local.description=\u042D\u0442\u0430 \u043A\u043E\u043B\u043E\u043D\u043A\u0430 \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442\u0441\u044F \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E \u0432 \u043E\u0442\u043D\u043E\u0448\u0435\u043D\u0438\u0438. \u041E\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043D\u0438\u043C\u0430\u043D\u0438\u0435, \u0447\u0442\u043E \u043A\u043E\u043B\u043E\u043D\u043A\u0430 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0430 \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E \u0438 \u0443\u043D\u0430\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u043D\u0430 \u043E\u0434\u043D\u043E\u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E.
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreRole.canLogin.name=\u041F\u0440\u0430\u0432\u043E \u0432\u0445\u043E\u0434\u0430
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreRole.canLogin.description=
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreRole.connLimit.name=\u041A\u0432\u043E\u0442\u0430 \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0439
......@@ -183,7 +184,7 @@ meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreGenericTrigger.objectDefiniti
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreGenericTrigger.objectDefinitionText.description=\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreGenericTrigger.orientation.name=\u041E\u0440\u0438\u0435\u043D\u0442\u0430\u0446\u0438\u044F
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreGenericTrigger.orientation.description=Orientation
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreGenericTrigger.timing.name=\u0425\u0440\u043E\u043D\u043E\u043C\u0435\u0442\u0440\u0430\u0436
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreGenericTrigger.timing.name=\u0412\u0440\u0435\u043C\u044F \u0441\u0440\u0430\u0431\u0430\u0442\u044B\u0432\u0430\u043D\u0438\u044F
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreGenericTrigger.timing.description=
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreIndex.accessMethod.name=\u041C\u0435\u0442\u043E\u0434 \u0434\u043E\u0441\u0442\u0443\u043F\u0430
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreIndex.accessMethod.description=
......@@ -357,6 +358,7 @@ meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreRule.enabled.name=\u0412\u043
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreRule.enabled.description=\u042D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u0443\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u044F, \u0432 \u043A\u043E\u0442\u043E\u0440\u044B\u0445 session_replication_role \u0440\u0435\u0436\u0438\u043C\u044B \u0441\u0440\u0430\u0431\u0430\u0442\u044B\u0432\u0430\u043D\u0438\u044F \u043F\u0440\u0430\u0432\u0438\u043B\u0430. \u041E = \u043F\u0440\u0430\u0432\u0438\u043B\u043E \u0441\u0440\u0430\u0431\u0430\u0442\u044B\u0432\u0430\u0435\u0442 \u0432 "origin" \u0438 "local" \u0440\u0435\u0436\u0438\u043C\u0430\u0445, \u0414 = \u043F\u0440\u0430\u0432\u0438\u043B\u043E \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u043E, \u0420 = \u0441\u0440\u0430\u0431\u0430\u0442\u044B\u0432\u0430\u0435\u0442 \u043F\u0440\u0430\u0432\u0438\u043B\u043E \u0432 \u0440\u0435\u0436\u0438\u043C\u0435 "\u0440\u0435\u043F\u043B\u0438\u043A\u0430", \u0410 = \u043F\u0440\u0430\u0432\u0438\u043B\u043E \u0441\u0440\u0430\u0431\u0430\u0442\u044B\u0432\u0430\u0435\u0442 \u0432\u0441\u0435\u0433\u0434\u0430.
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreRule.instead.name=Instead
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreRule.instead.description=\u0418\u0441\u0442\u0438\u043D\u043D\u043E, \u0435\u0441\u043B\u0438 \u043F\u0440\u0430\u0432\u0438\u043B\u043E \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043F\u0440\u0430\u0432\u0438\u043B\u043E\u043C INSTEAD
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreRule.objectId.name=ID \u043E\u0431\u044A\u0435\u043A\u0442\u0430
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreView.name.name=\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreView.name.description=\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0438\u044F
meta.org.jkiss.dbeaver.ext.postgresql.model.PostgreView.objectDefinitionText.name=\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u0435
......
<?xml version="1.0" encoding="utf-8"?>
<?eclipse version="3.2"?>
<tips>
<tip>To execute current query use the following shortcut: <b>Ctrl+Enter</b>.<br/>Note that queries are separated by delimiters or empty lines.</tip>
<tip>To open query results in a new tab, use the following shortcut: <b>Ctrl+\</b>.<br/>Note that queries are separated by delimiters or empty lines.</tip>
<tip>You can select any part of SQL script and run it using the following shortcut: <b>Ctrl+Enter</b>.</tip>
<tip>To run the current SQL script use the following shortcut: <b>Alt+X</b>.</tip>
<tip>If you want to filter table rows by column value in<a href="https://github.com/dbeaver/dbeaver/wiki/Data-Editor"> Data Editor</a>, press <b>F11</b>.</tip>
<tip>If you want to filter table rows by column value in<a href="https://github.com/dbeaver/dbeaver/wiki/Data-Editor"> Data Editor</a>, use the following shortcut: <b>Ctrl+F11</b>.</tip>
<tip>In order to format SQL statements use the following shortcut: <b>Ctrl+Shift+F</b>.</tip>
<tip>You can <a href="prefs://org.jkiss.dbeaver.preferences.main.sql.format">configure</a> SQL formatter globally or for a particular database.</tip>
<tip>We release new version of DBeaver Community every two weeks and usually publish the updates on Mondays.<br/> You can download up-to-date version <a href="https://dbeaver.io/download">here</a>.</tip>
<tips>
<tip>You can execute current query using <b>Ctrl+Enter</b> shortcut.
<br/>If you want to open results in a new tab then use <b>Ctrl+\</b> shortcut.
<br/>Queries are separated by delimiters or empty lines.
</tip>
<tip>You can select any part of SQL script and run it with <b>Ctrl+Enter</b></tip>
<tip>You can run SQL script using <b>Alt+X</b> shortcut. Script queries are separated with delimiters (like ";" or "go").</tip>
<tip>You can filter table rows by column value (use <b>F11</b> or <b>Ctrl+F11</b>) or by typing SQL expression in filter edit field</tip>
<tip>In order to format SQL use <b>Ctrl+Shift+F</b>.
<br/>You can <a href="prefs://org.jkiss.dbeaver.preferences.main.sql.format">configure</a> SQL formatter (globally or for the particular database).
</tip>
<tip>New version of DBeaver Community is released once per two weeks (usually at Monday).
<br/>You always can download a fresh version from <a href="https://dbeaver.io/download">dbeaver.io/download</a>.
</tip>
<tip>You can navigate over foreign keys in data view by pressing <b>Ctrl+1</b> or using context menu.
<br/>Back/Forward buttons (<b>Alt+Left/Right</b>) near to the filter panel allow to jump to previous tables/filter values.
<br/><b>Ctrl+Shift+1</b> will open links in a new editor.
</tip>
<tip>You can export data directly from SQL query without pre-executing it: use SQL editor context menu Execute -> Export From Query.</tip>
<tip>You can assign your own shortcuts for almost all DBeaver operations. Also, you can change most of <a href="prefs://org.eclipse.ui.preferencePages.Keys">existing shortcuts</a>.</tip>
<tip>You can debug PostgreSQL functions. Use debug tool in the main toolbar to initiate debug session.</tip>
<tip>Data editor supports copy/paste of multiple cells. Use <b>Ctrl+Shift+V</b> to paste multiple rows/columns separated by tabs and line feeds.</tip>
<tip>DBeaver documentation can be found in our WIKI (<a href="https://github.com/dbeaver/dbeaver/wiki">https://github.com/dbeaver/dbeaver/wiki</a>).
<br/>Just press <b>F1</b>.
</tip>
<tip>Panels in Data viewer are extremely useful.<br/>You can open cell value viewer, statistics calculator, columns aggregator and others.<br/>Use <b>F7</b> to toggle panels.</tip>
<tip>You can view queries executed in DBeaver in <a href="view://org.jkiss.dbeaver.core.queryManager">Query Manager</a> view.
<br/>There you can see even all internal queries which DBeaver runs to read metadata.
</tip>
<tip>See all SQL errors which occur in DBeaver in <a href="view://org.eclipse.pde.runtime.LogView">Error Log</a> view.
<br/>Error log includes all SQL, permission and configuration errors. You always can open error history and send error details to your colleagues.
</tip>
<tip>If you need more features, NoSQL databases support or analytical functions then you can use <a href="https://dbeaver.com/">DBeaver Enterprise Edition</a>.
<br/>You can try it for free.
</tip>
</tips>
<tip>The following keyboard shortcuts can be useful when viewing data:
<br/> <b>Ctrl+1</b> - opens foreign keys menu.
<br/><b>Alt+Left</b> - navigates backward in history of your actions.
<br/><b>Alt+Right</b> - navigates forward in history of your actions.
<br/><b>Ctrl+Shift+1</b> - opens link in a new editor.
</tip>
<tip>Use the following options in SQL Editor's context menu: Execute -> Export From Query, to export data directly from SQL query without pre-executing it. </tip>
<tip>Any keyboard shortcut can be created for most of DBeaver commands. <a href="prefs://org.eclipse.ui.preferencePages.Keys">Existing shortcuts can also be changed</a>.</tip>
<tip>Use the Debug As tool in the main toolbar of SQL Editor to initiate a debug session.</tip>
<tip>For additional information on DBeaver features and functions, visit our <a href="https://github.com/dbeaver/dbeaver/wiki"> wiki page</a>).</tip>
<tip>To open DBeaver Help contents, press <b>F1</b>.</tip>
<tip>You can view queries executed in DBeaver in <a href="view://org.jkiss.dbeaver.core.queryManager">Query Manager</a> view.<br/>All the internal queries DBeaver runs to read metadata can also be found there.</tip>
<tip>All the errors that occur when running SQL scripts in DBeaver, can be observed in the <a href="view://org.eclipse.pde.runtime.LogView">Error Log</a> view.<br/>The error log tracks SQL, permission and configuration errors.</tip>
<tip>When you need error details to be shared with your colleagues, use <a href="view://org.eclipse.pde.runtime.LogView"> Error Log view</a>.</tip>
<tip>If your project requires advanced analytical tools or NoSQL database support, you can try <a href="https://dbeaver.com/">DBeaver Enterprise Edition</a>.</tip>
<tip>You can convert the selected text into uppercase using the following shortcut: <b>Ctrl+Shift+X</b>.</tip>
<tip>You can convert the selected text into lowercase using the following shortcut: <b>Ctrl+Shift+Y</b>.</tip>
<tip>In <a href="https://github.com/dbeaver/dbeaver/wiki/Data-Editor">Data Editor</a>, you can iterate through the view modes using the following shortcut: <b>Ctrl+~</b>.</tip>
<tip>Use <b>Ctrl+F7</b> shortcut to iterate through the view windows of DBeaver interface.</tip>
<tip>You can turn on/off the right panels by using the following shortcut: <b>Ctrl+7</b>.</tip>
<tip>You can turn on/off the right panels by pressing <b>F7</b>.</tip>
<tip>To refresh query results in <a href="https://github.com/dbeaver/dbeaver/wiki/SQL-Editor">SQL Editor</a>, press <b>F5</b>.</tip>
<tip>In <a href="https://github.com/dbeaver/dbeaver/wiki/Database-Navigator"> Database Navigator</a>, press <b>F2</b> to rename the selected element.</tip>
<tip>In <a href="https://github.com/dbeaver/dbeaver/wiki/Database-Navigator"> Database Navigator</a>, press <b>F4</b> to edit properties of the selected element.</tip>
<tip>In <a href="https://github.com/dbeaver/dbeaver/wiki/Database-Navigator"> Database Navigator</a>, press <b>F5</b> to refresh the selected element.</tip>
<tip>In <a href="https://github.com/dbeaver/dbeaver/wiki/Database-Navigator"> Database Navigator</a>, press <b>Ctrl+D</b> to add the selected elements into your <a href="https://github.com/dbeaver/dbeaver/wiki/Bookmarks">bookmarks</a>.</tip>
<tip>Use <a href="https://github.com/dbeaver/dbeaver/wiki/Bookmarks">bookmarks</a> as quick access links to objects of a database.</tip>
<tip><a href="https://github.com/dbeaver/dbeaver/wiki/Managing-Charts">Charts</a> let you quickly and easily turn your SELECT queries' output into a colorized bar chart.</tip>
<tip>To see available <a href="https://github.com/dbeaver/dbeaver/wiki/SQL-Templates">templates</a> of SQL statements, use <b>Ctrl+Alt+Space</b> shortcut.</tip>
<tip><a href="https://github.com/dbeaver/dbeaver/wiki/SQL-Templates">Templates</a> allow you to insert frequently used SQL statements into an SQL script.</tip>
<tip>In <a href="https://github.com/dbeaver/dbeaver/wiki/Data-Editor"> Data Editor</a>, press <b>Ctrl+F</b> to search for data in the current table.</tip>
<tip>You can generate SQL statements (SELECT/INSERT/UPDATE/DELETE) based on selected rows. To generate SQL, right-click the selected rows,then click Generate SQL and select one of the SQL commands you see.</tip>
<tip>DBeaver allows viewing diagrams of existing tables and whole database schemas, see <a href="https://github.com/dbeaver/dbeaver/wiki/Database-Structure-Diagrams">ER diagrams</a> article.</tip>
<tip>DBeaver allows creating custom diagrams, see <a href="https://github.com/dbeaver/dbeaver/wiki/Custom-Diagrams">Custom Diagrams</a>.</tip>
<tip>DBeaver is a customizable software.<br/>For additional information on optional extensions, see <a href="https://github.com/dbeaver/dbeaver/wiki/Optional-extensions"> Optional Extensions</a></tip>
<tip>Use <a href="https://github.com/dbeaver/dbeaver/wiki/Mock-Data-Generation-in-DBeaver">DBeaver Mock Data Generator</a> when you need to create a huge quantities of realistic sample data for testing purposes and want to avoid tedious and time-consuming work of entering test data by hand.</tip>
<tip>To customize the menu bar and the list of menu items displayed go to Window -> Customize Perspective ->Menu Visibility tab.</tip>
<tip>To customize the toolbar go to Window -> Customize Perspective -> Toolbar Visibility tab.</tip>
<tip>To execute the selected SQL expression and print the results use the following shortcut: <b>Ctrl+Alt+'</b>.</tip>
<tip>To see the execution plan for the current query, use the following shortcut: <b>Ctrl+Shift+E</b>.</tip>
<tip>To execute queries of current script simultaneously and display the results in separate tabs, use the following shortcut: <b>Ctrl+Alt+Shift+X</b>.</tip>
<tip>To jump to the previous query in the current SQL script,use the following shortcut: <b>Alt+Up</b>.</tip>
<tip>To jump to the next query in the current SQL script,use the following shortcut: <b>Alt+Down</b>.</tip>
<tip>If you are not much familiar with SQL scripting, use <a href="https://github.com/dbeaver/dbeaver/wiki/Visual-Query-Builder">Visual Query Builder</a> tool.
<br/>Note: this tool is available only in DBeaver <a href="https://github.com/dbeaver/dbeaver/wiki/Enterprise-Edition">Enterprise Edition</a>.
</tip>
</tips>
\ No newline at end of file
......@@ -48,9 +48,12 @@ meta.org.jkiss.dbeaver.model.impl.struct.AbstractAttribute.name.name=\u0418\u043
meta.org.jkiss.dbeaver.model.impl.struct.AbstractAttribute.typeName.name=\u0422\u0438\u043F \u0414\u0430\u043D\u043D\u044B\u0445
meta.org.jkiss.dbeaver.model.impl.struct.AbstractAttribute.ordinalPosition.name=#
meta.org.jkiss.dbeaver.model.impl.struct.AbstractAttribute.maxLength.name=\u0414\u043B\u0438\u043D\u0430
meta.org.jkiss.dbeaver.model.impl.struct.AbstractAttribute.maxLength.description=\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u0430\u044F \u0434\u043B\u0438\u043D\u0430 \u043A\u043E\u043B\u043E\u043D\u043A\u0438
meta.org.jkiss.dbeaver.model.impl.struct.AbstractAttribute.required.name=\u041D\u0435 Null
meta.org.jkiss.dbeaver.model.impl.struct.AbstractAttribute.scale.name=\u041C\u0430\u0441\u0448\u0442\u0430\u0431
meta.org.jkiss.dbeaver.model.impl.struct.AbstractAttribute.scale.description=\u0427\u0438\u0441\u043B\u043E\u0432\u043E\u0439 \u0442\u0438\u043F \u0434\u0430\u043D\u043D\u044B\u0445 "\u043C\u0430\u0441\u0448\u0442\u0430\u0431" (\u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0434\u0440\u043E\u0431\u043D\u044B\u0445 \u0446\u0438\u0444\u0440)
meta.org.jkiss.dbeaver.model.impl.struct.AbstractAttribute.precision.name=\u0422\u043E\u0447\u043D\u043E\u0441\u0442\u044C
meta.org.jkiss.dbeaver.model.impl.struct.AbstractAttribute.autoGenerated.name=\u0410\u0432\u0442\u043E. \u0441\u0433\u0435\u043D\u0435\u0440\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u0430\u044F
meta.org.jkiss.dbeaver.model.impl.struct.AbstractProcedure.name.name=\u0418\u043C\u044F \u041F\u0440\u043E\u0446\u0435\u0434\u0443\u0440\u044B
meta.org.jkiss.dbeaver.model.impl.struct.AbstractProcedure.description.name=\u041E\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u043F\u0440\u043E\u0446\u0435\u0434\u0443\u0440\u044B
meta.org.jkiss.dbeaver.model.impl.struct.AbstractTable.name.name=\u0418\u043C\u044F \u0422\u0430\u0431\u043B\u0438\u0446\u044B
......
......@@ -19,6 +19,8 @@ package org.jkiss.dbeaver.ui.controls;
import org.eclipse.jface.action.*;
import org.eclipse.swt.SWT;
import org.eclipse.swt.dnd.TextTransfer;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Menu;
......@@ -28,6 +30,7 @@ import org.eclipse.ui.IWorkbenchCommandConstants;
import org.eclipse.ui.internal.WorkbenchMessages;
import org.jkiss.dbeaver.model.exec.compile.DBCCompileError;
import org.jkiss.dbeaver.model.exec.compile.DBCCompileLogBase;
import org.jkiss.dbeaver.model.exec.compile.DBCSourceHost;
import org.jkiss.dbeaver.ui.UIUtils;
import org.jkiss.dbeaver.utils.GeneralUtils;
import org.jkiss.utils.ArrayUtils;
......@@ -42,7 +45,7 @@ public class ObjectCompilerLogViewer extends DBCCompileLogBase {
private Table infoTable;
public ObjectCompilerLogViewer(Composite parent, boolean bordered)
public ObjectCompilerLogViewer(Composite parent, DBCSourceHost sourceHost, boolean bordered)
{
super();
......@@ -53,6 +56,25 @@ public class ObjectCompilerLogViewer extends DBCCompileLogBase {
UIUtils.createTableColumn(infoTable, SWT.LEFT, "Line");
UIUtils.createTableColumn(infoTable, SWT.LEFT, "Pos");
if (sourceHost != null) {
infoTable.addMouseListener(new MouseAdapter() {
@Override
public void mouseDoubleClick(MouseEvent e) {
TableItem[] selection = infoTable.getSelection();
if (selection.length > 0) {
TableItem item = selection[0];
Object data = item.getData();
if (data instanceof DBCCompileError) {
int line = ((DBCCompileError) data).getLine();
int position = ((DBCCompileError) data).getPosition();
sourceHost.positionSource(line, position);
sourceHost.setCompileInfo(((DBCCompileError) data).getMessage(), true);
}
}
}
});
}
createContextMenu();
}
......@@ -124,6 +146,7 @@ public class ObjectCompilerLogViewer extends DBCCompileLogBase {
if (color != -1) {
item.setForeground(infoTable.getDisplay().getSystemColor(color));
}
item.setData(message);
infoTable.showItem(item);
}
if (t != null) {
......
......@@ -88,6 +88,7 @@ import org.jkiss.dbeaver.tools.transfer.database.DatabaseTransferProducer;
import org.jkiss.dbeaver.tools.transfer.wizard.DataTransferWizard;
import org.jkiss.dbeaver.ui.*;
import org.jkiss.dbeaver.ui.controls.CustomSashForm;
import org.jkiss.dbeaver.ui.controls.StyledTextFindReplaceTarget;
import org.jkiss.dbeaver.ui.controls.VerticalButton;
import org.jkiss.dbeaver.ui.controls.VerticalFolder;
import org.jkiss.dbeaver.ui.controls.resultset.*;
......@@ -3065,6 +3066,10 @@ public class SQLEditor extends SQLEditorBase implements
private boolean lastFocusInEditor = true;
@Override
public IFindReplaceTarget getTarget() {
CTabItem activeResultsTab = getActiveResultsTab();
if (activeResultsTab != null && outputViewer != null && activeResultsTab.getData() == outputViewer) {
return new StyledTextFindReplaceTarget(outputViewer.getText());
}
ResultSetViewer rsv = getActiveResultSetViewer();
TextViewer textViewer = getTextViewer();
boolean focusInEditor = textViewer != null && textViewer.getTextWidget().isFocusControl();
......
......@@ -41,7 +41,6 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.part.MultiPageEditorSite;
import org.eclipse.ui.texteditor.IDocumentProvider;
......@@ -127,7 +126,7 @@ public abstract class SQLEditorNested<T extends DBSObject>
super.createPartControl(editorSash);
editorControl = editorSash.getChildren()[0];
compileLog = new ObjectCompilerLogViewer(editorSash, false);
compileLog = new ObjectCompilerLogViewer(editorSash, this, false);
} else {
super.createPartControl(pageControl.createContentContainer());
}
......@@ -164,6 +163,15 @@ public abstract class SQLEditorNested<T extends DBSObject>
@Override
public void doSave(final IProgressMonitor progressMonitor) {
UIUtils.syncExec(() -> SQLEditorNested.super.doSave(progressMonitor));
postScriptSave();
}
private void postScriptSave() {
String compileCommandId = getCompileCommandId();
if (compileCommandId != null) {
// Compile after save
ActionUtils.runCommand(compileCommandId, getSite().getWorkbenchWindow());
}
}
@Override
......@@ -313,7 +321,7 @@ public abstract class SQLEditorNested<T extends DBSObject>
try {
final IRegion lineInfo = getTextViewer().getDocument().getLineInformation(line - 1);
final int offset = lineInfo.getOffset() + position - 1;
super.selectAndReveal(offset, 1);
super.selectAndReveal(offset, 0);
//textEditor.setFocus();
} catch (BadLocationException e) {
log.warn(e);
......
......@@ -71,6 +71,10 @@ public class SQLEditorOutputViewer extends Composite {
refreshStyles();
}
public StyledText getText() {
return text;
}
void refreshStyles() {
ITheme currentTheme = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme();
Font outputFont = currentTheme.getFontRegistry().get(SQLConstants.CONFIG_FONT_OUTPUT);
......
......@@ -149,6 +149,14 @@ public class SQLSymbolInserter implements VerifyKeyListener, ILinkedModeListener
if (!closeBrackets) {
return;
}
try {
if (offset < document.getLength() && !Character.isWhitespace(document.getChar(offset + length))) {
return;
}
} catch (BadLocationException e) {
log.debug(e);
return;
}
if (hasCharacterToTheRight(document, offset + length, event.character)) {
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册