提交 70ec5f20 编写于 作者: S Serge Rider

Project navigator view toolbar


Former-commit-id: 068f2efb
上级 edb05f3b
......@@ -892,7 +892,7 @@
<separator name="additions" visible="true"/>
<command commandId="org.eclipse.ui.navigate.collapseAll"/>
<command commandId="org.jkiss.dbeaver.core.navigator.linkeditor"/>
<command commandId="org.jkiss.dbeaver.core.navigator.preferences"/>
<command commandId="org.jkiss.dbeaver.core.navigator.view.configure"/>
<separator name="additions_end" visible="true"/>
<command commandId="org.jkiss.dbeaver.core.project.refresh"/>
</menuContribution>
......
......@@ -19,16 +19,21 @@ package org.jkiss.dbeaver.ui.navigator.project;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbenchCommandConstants;
import org.eclipse.ui.PartInitException;
import org.jkiss.dbeaver.Log;
import org.jkiss.dbeaver.model.app.DBPProject;
import org.jkiss.dbeaver.model.navigator.DBNNode;
import org.jkiss.dbeaver.runtime.DBWorkbench;
import org.jkiss.dbeaver.ui.ActionUtils;
import org.jkiss.dbeaver.ui.IHelpContextIds;
import org.jkiss.dbeaver.ui.UIExecutionQueue;
import org.jkiss.dbeaver.ui.UIUtils;
import org.jkiss.dbeaver.ui.navigator.NavigatorPreferences;
import org.jkiss.dbeaver.ui.navigator.NavigatorStatePersistor;
import org.jkiss.dbeaver.ui.navigator.NavigatorUtils;
import org.jkiss.dbeaver.ui.navigator.database.NavigatorViewBase;
import org.jkiss.dbeaver.ui.project.PrefPageProjectResourceSettings;
/**
* ProjectNavigatorView
......@@ -77,4 +82,15 @@ public class ProjectNavigatorView extends NavigatorViewBase // CommonNavigator
UIUtils.setHelp(parent, IHelpContextIds.CTX_PROJECT_NAVIGATOR);
UIExecutionQueue.queueExec(this::restoreState);
}
@Override
public void configureView() {
DBPProject project = NavigatorUtils.getSelectedProject();
if (project != null) {
UIUtils.showPreferencesFor(getSite().getShell(), project.getEclipseProject(), PrefPageProjectResourceSettings.PAGE_ID);
} else {
ActionUtils.runCommand(IWorkbenchCommandConstants.WINDOW_PREFERENCES, UIUtils.getActiveWorkbenchWindow());
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册