提交 4ddc3f48 编写于 作者: S Serge Rider

dbeaver-corp/dbeaver-ee#307 Composite tasks editor, settings save/load


Former-commit-id: b17e20c6
上级 9da17469
/*
* 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.model.task;
import org.jkiss.code.NotNull;
/**
* Task reference.
*/
public interface DBTTaskReference {
@NotNull
DBTTask getTask();
}
......@@ -634,10 +634,15 @@ public class DatabaseTasksTree {
List<DBTTask> tasks = new ArrayList<>();
StringBuilder buf = new StringBuilder();
for (Object nextSelected : selection.toArray()) {
if (!(nextSelected instanceof DBTTask)) {
DBTTask task = null;
if (nextSelected instanceof DBTTask) {
task = (DBTTask) nextSelected;
} else if (nextSelected instanceof DBTTaskReference) {
task = ((DBTTaskReference) nextSelected).getTask();
}
if (task == null) {
continue;
}
DBTTask task = (DBTTask) nextSelected;
tasks.add(task);
String taskName = task.getName();
if (buf.length() > 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册