📄 rcpworkbenchadvisor.java
字号:
/*******************************************************************************
* Copyright (c) 2004 Berthold Daum. All rights reserved. This program and the
* accompanying materials are made available under the terms of the Common
* Public License v1.0 which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors: Berthold Daum
******************************************************************************/
package com.bdaum.Hex;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
import org.eclipse.ui.application.WorkbenchAdvisor;
import org.eclipse.ui.intro.IIntroManager;
public class RcpWorkbenchAdvisor extends WorkbenchAdvisor {
public String getInitialWindowPerspectiveId() {
return "com.bdaum.Hex.RcpPerspective";
}
public void preWindowOpen(IWorkbenchWindowConfigurer configurer) {
super.preWindowOpen(configurer);
// Hide the various action bars
configurer.setShowCoolBar(false);
configurer.setShowFastViewBars(false);
configurer.setShowPerspectiveBar(false);
configurer.setShowMenuBar(false);
}
public void postWindowOpen(IWorkbenchWindowConfigurer configurer) {
super.postWindowOpen(configurer);
// Set window title
configurer.setTitle("The Hex Game");
}
public void openIntro(IWorkbenchWindowConfigurer configurer) {
super.openIntro(configurer);
// Fetch intro manager and force intro open
IWorkbenchWindow window = configurer.getWindow();
IWorkbench workbench = window.getWorkbench();
IIntroManager manager = workbench.getIntroManager();
manager.showIntro(window, false);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -