diff --git a/plugins/org.jkiss.dbeaver.core/OSGI-INF/l10n/bundle.properties b/plugins/org.jkiss.dbeaver.core/OSGI-INF/l10n/bundle.properties index 38395387b5b4acf99af7d79a6cbbb49030b750dd..903e070ddd71b07186b1a9c947a63a712d95259c 100644 --- a/plugins/org.jkiss.dbeaver.core/OSGI-INF/l10n/bundle.properties +++ b/plugins/org.jkiss.dbeaver.core/OSGI-INF/l10n/bundle.properties @@ -63,10 +63,6 @@ command.org.jkiss.dbeaver.core.txn.log.description=Current transaction log (exec command.org.jkiss.dbeaver.core.txn.pending.name=Pending transactions command.org.jkiss.dbeaver.core.txn.pending.description=List of all pending transactions command.org.jkiss.dbeaver.core.transaction_mode.name=Transaction mode -command.org.jkiss.dbeaver.core.select.connection.name=Active connection -command.org.jkiss.dbeaver.core.select.connection.description=Database conection associated with current editor -command.org.jkiss.dbeaver.core.select.schema.name=Active schema -command.org.jkiss.dbeaver.core.select.schema.description=Database active schema command.org.jkiss.dbeaver.core.procedure.execute.name=Execute Stored Procedure command.org.jkiss.dbeaver.core.procedure.execute.description=Open new SQL console with execute stored procedure query diff --git a/plugins/org.jkiss.dbeaver.core/plugin.xml b/plugins/org.jkiss.dbeaver.core/plugin.xml index d9801049c9ef42b591090becfcfedad00103d71f..6372cc4225bf3afbb701e4400515238d65f74454 100644 --- a/plugins/org.jkiss.dbeaver.core/plugin.xml +++ b/plugins/org.jkiss.dbeaver.core/plugin.xml @@ -128,9 +128,6 @@ - - - @@ -163,8 +160,8 @@ - - + + @@ -351,23 +348,6 @@ - - - - - - - - - - - - - - - - - @@ -477,18 +457,23 @@ - - + + - + - - - - + + + + + + + + + @@ -606,18 +591,6 @@ - @@ -664,14 +637,14 @@ diff --git a/plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/datasource/DataSourceToolbarUtils.java b/plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/datasource/DataSourceToolbarUtils.java index 27b7533f84237901797bf7ab257d7fb6864d1df9..84ab4beda0a011282f36eb3d21f5b84941812e76 100644 --- a/plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/datasource/DataSourceToolbarUtils.java +++ b/plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/datasource/DataSourceToolbarUtils.java @@ -70,8 +70,8 @@ public class DataSourceToolbarUtils public static void updateCommandsUI() { ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class); - commandService.refreshElements("org.jkiss.dbeaver.core.select.connection", null); - commandService.refreshElements("org.jkiss.dbeaver.core.select.schema", null); + commandService.refreshElements("org.jkiss.dbeaver.ui.tools.select.connection", null); + commandService.refreshElements("org.jkiss.dbeaver.ui.tools.select.schema", null); commandService.refreshElements("org.jkiss.dbeaver.ui.editors.sql.sync.connection", null); } } \ No newline at end of file diff --git a/plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/datasource/SelectActiveDataSourceHandler.java b/plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/datasource/SelectActiveDataSourceHandler.java index 600b32fc9f8951544847e6bb6cc01c8c2866b512..af5db27929ecf89edcac461a3ad9cb56589a6736 100644 --- a/plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/datasource/SelectActiveDataSourceHandler.java +++ b/plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/actions/datasource/SelectActiveDataSourceHandler.java @@ -59,7 +59,7 @@ public class SelectActiveDataSourceHandler extends AbstractDataSourceHandler imp return null; } - private static void openDataSourceSelector(IWorkbenchWindow workbenchWindow, DBPDataSourceContainer dataSource) { + public static void openDataSourceSelector(IWorkbenchWindow workbenchWindow, DBPDataSourceContainer dataSource) { IProject activeProject = dataSource != null ? dataSource.getRegistry().getProject() : DBWorkbench.getPlatform().getProjectManager().getActiveProject(); IEditorPart activeEditor = workbenchWindow.getActivePage().getActiveEditor(); diff --git a/plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/perspective/DataSourceManagementToolbar.java b/plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/perspective/DataSourceManagementToolbar.java index 7c1993a1e17acf8f4f6b89e91625738b9b119f57..82bb88d5be9ad1d49c46895e7d01eed7d11b8046 100644 --- a/plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/perspective/DataSourceManagementToolbar.java +++ b/plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/perspective/DataSourceManagementToolbar.java @@ -78,7 +78,9 @@ import java.util.*; /** * DataSource Toolbar + * Deprecated everything was moved to org.jkiss.dbeaver.ui.actions.datasource.* */ +@Deprecated public class DataSourceManagementToolbar implements DBPRegistryListener, DBPEventListener, DBPPreferenceListener, INavigatorListener { private static final Log log = Log.getLog(DataSourceManagementToolbar.class); diff --git a/plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/perspective/SelectConnectionHandler.java b/plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/perspective/SelectConnectionHandler.java deleted file mode 100644 index d7f80eb687d3d0cf2d3aa3a06e01d64c1ef49904..0000000000000000000000000000000000000000 --- a/plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/perspective/SelectConnectionHandler.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * DBeaver - Universal Database Manager - * Copyright (C) 2010-2019 Serge Rider (serge@jkiss.org) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.jkiss.dbeaver.ui.perspective; - -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IWorkbenchPart; -import org.eclipse.ui.handlers.HandlerUtil; -import org.jkiss.dbeaver.model.IDataSourceContainerProviderEx; -import org.jkiss.dbeaver.model.exec.DBCExecutionContext; -import org.jkiss.dbeaver.ui.actions.AbstractDataSourceHandler; - -public class SelectConnectionHandler extends AbstractDataSourceHandler -{ - @Override - public Object execute(ExecutionEvent event) throws ExecutionException - { - IEditorPart activeEditor = HandlerUtil.getActiveEditor(event); - if (activeEditor instanceof IDataSourceContainerProviderEx) { - DataSourceManagementToolbar.getInstance().showConnectionSelector(); - } - return null; - } - -} \ No newline at end of file diff --git a/plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/perspective/SelectSchemaHandler.java b/plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/perspective/SelectSchemaHandler.java deleted file mode 100644 index da4b5d47fa32779f961ce5cf0d9a08765623b4fe..0000000000000000000000000000000000000000 --- a/plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/perspective/SelectSchemaHandler.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * DBeaver - Universal Database Manager - * Copyright (C) 2010-2019 Serge Rider (serge@jkiss.org) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.jkiss.dbeaver.ui.perspective; - -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.jkiss.dbeaver.model.exec.DBCExecutionContext; -import org.jkiss.dbeaver.ui.actions.AbstractDataSourceHandler; - -public class SelectSchemaHandler extends AbstractDataSourceHandler -{ - @Override - public Object execute(ExecutionEvent event) throws ExecutionException - { - DBCExecutionContext context = getExecutionContext(event, true); - if (context != null && context.isConnected()) { - DataSourceManagementToolbar.getInstance().showDatabaseSelector(); - } - return null; - } - -} \ No newline at end of file diff --git a/plugins/org.jkiss.dbeaver.ui.dashboard/plugin.xml b/plugins/org.jkiss.dbeaver.ui.dashboard/plugin.xml index 6fda8160b7ec657dc75421211787d5f9e2c0aa50..04c290aca5864fe6621c2b2f2d5c28939cd35fc7 100644 --- a/plugins/org.jkiss.dbeaver.ui.dashboard/plugin.xml +++ b/plugins/org.jkiss.dbeaver.ui.dashboard/plugin.xml @@ -53,17 +53,7 @@ - - - - - - - - - - - + @@ -91,6 +81,12 @@ + + + + + + diff --git a/plugins/org.jkiss.dbeaver.ui.dashboard/src/org/jkiss/dbeaver/ui/dashboard/view/HandlerDashboardOpen.java b/plugins/org.jkiss.dbeaver.ui.dashboard/src/org/jkiss/dbeaver/ui/dashboard/view/HandlerDashboardOpen.java index e3bf170906f2301c67abcd2516b3ca3cac49a1fa..7f408559d9ed5c474b48128ee99160cf2380db9d 100644 --- a/plugins/org.jkiss.dbeaver.ui.dashboard/src/org/jkiss/dbeaver/ui/dashboard/view/HandlerDashboardOpen.java +++ b/plugins/org.jkiss.dbeaver.ui.dashboard/src/org/jkiss/dbeaver/ui/dashboard/view/HandlerDashboardOpen.java @@ -31,7 +31,7 @@ public class HandlerDashboardOpen extends AbstractDataSourceHandler { @Override public Object execute(ExecutionEvent event) throws ExecutionException { IWorkbenchWindow workbenchWindow = HandlerUtil.getActiveWorkbenchWindow(event); - DBPDataSourceContainer dataSourceContainer = getDataSourceContainer(event, false); + DBPDataSourceContainer dataSourceContainer = getDataSourceContainer(event, true); if (dataSourceContainer == null) { dataSourceContainer = getDataSourceContainer(event, true); }