提交 140b22dc 编写于 作者: S serge-rider

Tasks groupping command tootips fix

上级 0e0923e6
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2020 DBeaver Corp and others
* Copyright (C) 2011-2012 Eugene Fradkin (eugene.fradkin@gmail.com)
*
* 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.tasks.ui.internal;
public class TaskUIBundle {
public static final String BUDLE_ID = "org.jkiss.dbeaver.tasks.ui";
}
...@@ -19,9 +19,11 @@ package org.jkiss.dbeaver.tasks.ui.view; ...@@ -19,9 +19,11 @@ package org.jkiss.dbeaver.tasks.ui.view;
import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException; import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.Platform;
import org.eclipse.ui.commands.IElementUpdater; import org.eclipse.ui.commands.IElementUpdater;
import org.eclipse.ui.handlers.HandlerUtil; import org.eclipse.ui.handlers.HandlerUtil;
import org.eclipse.ui.menus.UIElement; import org.eclipse.ui.menus.UIElement;
import org.jkiss.dbeaver.tasks.ui.internal.TaskUIBundle;
import org.jkiss.dbeaver.ui.UIUtils; import org.jkiss.dbeaver.ui.UIUtils;
import org.jkiss.utils.CommonUtils; import org.jkiss.utils.CommonUtils;
...@@ -77,8 +79,9 @@ public class TaskHandlerGroupBy extends AbstractHandler implements IElementUpdat ...@@ -77,8 +79,9 @@ public class TaskHandlerGroupBy extends AbstractHandler implements IElementUpdat
//element.setIcon(DBeaverIcons.getImageDescriptor(DBIcon.TREE_TASK)); //element.setIcon(DBeaverIcons.getImageDescriptor(DBIcon.TREE_TASK));
break; break;
} }
element.setText("Group by " + groupBy.name()); String commandName = Platform.getResourceBundle(Platform.getBundle(TaskUIBundle.BUDLE_ID)).getString("command.org.jkiss.dbeaver.task.group." + groupBy.name() + ".name");
element.setTooltip("Group tasks by " + groupBy.name()); element.setText(commandName);
element.setTooltip(commandName);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册