gpt4 book ai didi

eclipse - 制作我自己的 Eclipse 介绍页面

转载 作者:行者123 更新时间:2023-12-05 00:43:19 25 4
gpt4 key购买 nike

我在制作自己的 Eclipse 介绍页面 ( as shown here ) 时遇到了困难。

我的产品 ID 似乎有问题,但我不知道如何获取产品 ID,我尝试扩展 org.eclipse.core.runtime.products,但是当它问我要注册哪个应用程序时,我不知道要回答什么,这似乎是问题的一部分......任何人都知道吗?

最佳答案

这是我最后所做的......

public class IntroPart implements IIntroPart {

//VITAL : you must implement
public void createPartControl(Composite container) {
Composite outerContainer = new Composite(container, SWT.NONE);
GridLayout gridLayout = new GridLayout();
outerContainer.setLayout(gridLayout);
outerContainer.setBackground(outerContainer.getDisplay()
.getSystemColor(SWT.COLOR_TITLE_BACKGROUND_GRADIENT));
Label label = new Label(outerContainer, SWT.CENTER);
label.setText("WELCOME TO ECLIPSE");
GridData gd = new GridData(GridData.GRAB_HORIZONTAL
| GridData.GRAB_VERTICAL);
gd.horizontalAlignment = GridData.CENTER;
gd.verticalAlignment = GridData.CENTER;
label.setLayoutData(gd);
label.setBackground(outerContainer.getDisplay().getSystemColor(
SWT.COLOR_TITLE_BACKGROUND_GRADIENT));
}

//VITAL : you must implement
public String getTitle() {
return "My Title";
}

//VITAL : you must implement
public Image getTitleImage() {
return new Image(Display.getCurrent(), this.getClass()
.getResourceAsStream("splash.bmp"));
}

public void addPropertyListener(IPropertyListener listener) {
//NON-VITAL : implement accordingly to your needs
}

public void dispose() {
//NON-VITAL : implement accordingly to your needs
}

public IIntroSite getIntroSite() {
//NON-VITAL : implement accordingly to your needs
return null;
}

public void init(IIntroSite site, IMemento memento)
throws PartInitException {
//NON-VITAL : implement accordingly to your needs
}

public void removePropertyListener(IPropertyListener listener) {
//NON-VITAL : implement accordingly to your needs
}

public void saveState(IMemento memento) {
//NON-VITAL : implement accordingly to your needs
}

public void setFocus() {
//NON-VITAL : implement accordingly to your needs
}

public void standbyStateChanged(boolean standby) {
//NON-VITAL : implement accordingly to your needs
}

public Object getAdapter(Class adapter) {
//NON-VITAL : implement accordingly to your needs
return null;
}
}

使用的图片是我的一张,当您显示欢迎页面时,它会作为选项卡图标...

奇怪的是,标题和图像没有默认值……但是嘿……这就是生活。

希望能帮到你^^

关于eclipse - 制作我自己的 Eclipse 介绍页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1118411/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com