请教一下,我用eclipse开发一个可以读取串口信息的插件,把它单独作为应用程序可以正常运行.但以插件形式运行时点击按钮就会出现异常.不知道是什么问题?
package com.plugin.hello;import org.eclipse.core.runtime.*;import org.eclipse.jface.dialogs.errordialog;import org.eclipse.jface.window.applicationwindow;import org.eclipse.swt.swt;import org.eclipse.swt.events.*;import org.eclipse.swt.layout.*;import org.eclipse.swt.widgets.*;import com.leon.serial.*; 【程序编程相关:经过百般努力,终于用JSP写出FileU】
插件窗口程序: 【推荐阅读:Junit FAQ(001-016)】
// open the main window open(); 【扩展信息:JavaMail 之 杜绝邮件乱码】
/** * this class demonstrates jfaces errordialog class */public class dialogsample extends applicationwindow { /** * showerror constructor */ public dialogsample() { super(null); } /** * runs the application */ public void run() { // dont return from open() until window closes setblockonopen(true);
// dispose the display display.getcurrent().dispose(); }
/** * configures the shell * * @param shell the shell */ protected void configureshell(shell shell) { super.configureshell(shell);
... 下一页