
Monday, 22. May 2006, 16:34:18
TECH, Eclipse
终于开化了!
May 18, 2006
Sun and Eclipse join together to support Solaris x86 Posted by Ed Burnette@1:23 pm
Digg This!
A new committer from Sun has joined the Eclipse project and contributed source
changes needed to support Solaris x86. As of 3.2RC4, Solaris x86 is an
officially supported build. This was announced during a keynote address by
Erick Gamma and John Wiegand. I'll have more on the keynote itself in a
separate article.
According to Eclipse director Mike Milinkovich, this represents the first Sun
committer on an Eclipse project, and also set a new record for the quickest
turn-around from contribution to new platform supported. Sun will be in charge
of doing the actual builds on their own servers, and sending them to appear on
the eclipse.org web site. It is hoped that this kind of cooperation can be
replicated to other platforms, opening up Eclipse to run on a much wider
variety of machines.
Eclipse for Solaris x86 is available now from eclipse.org. Go to the downloads
page, select "All versions", then "3.2RC4" (or later), and then the package
for "Solaris (x86/GTK 2)". See bug 84344 for more information.


Saturday, 29. April 2006, 12:12:04
Eclipse, Java, DevNotes
RCP程序建立时默认的ApplicationWorkbenchWindowAdvisor#preWindowOpen() 是这样的:
public void preWindowOpen() {
IWorkbenchWindowConfigurer configurer =getWindowConfigurer();
configurer.setInitialSize(new Point(400,300));
configurer.setShowCoolBar(false);
configurer.setShowStatusLine(false);
configurer.setTitle("THE TITLE");
}
它把窗口设置成了400*300的大小,要设置成全屏,一种最简单的思路就是获取Display的大小,把窗口设置成Display的大小就好了:
public void preWindowOpen() {
IWorkbenchWindowConfigurer configurer =getWindowConfigurer();
Display display = Display.getDefault();
Rectangle rect = display.getBounds();
configurer.setInitialSize(new Point(rect.width,rect.height));
configurer.setShowCoolBar(false);
configurer.setShowStatusLine(false);
configurer.setTitle("THE TITLE");
}
这样之后窗口大小的确根显示器一样了,但是他的状态还不是"最大化"(观察"最大化/还原"按钮),不爽,继续改进,IWorkbenchWindowConfigurer configurer 没有给出全屏设置,但是Shell给出了设置方法,只要获取到他的shell然后最大化就可以了:
getWindowConfigurer().getWindow().getShell().setMaximized(true);
但是这个句子放在ApplicationWorkbenchWindowAdvisor#preWindowOpen() 中会有一些问题...经试验,放在ApplicationWorkbenchWindowAdvisor#postWindowCreate()中可以正常使用:
public void postWindowCreate()
{
super.postWindowCreate();
getWindowConfigurer().getWindow().getShell().setMaximized(true);
}
//从原Blogger上搬过来的