public boolean doTimer() { Timer timer1 = new Timer(); timer1.schedule(new MyTimerTask(), 10* 1000) }
//TimerTask 类 class MyTimerTask extends TimerTask { @SuppressWarnings("restriction") public void run() { Display.getDefault().asyncExec(new Runnable() { public void run() { WorkbenchWindow workbenchWindow = (WorkbenchWindow) PlatformUI .getWorkbench().getActiveWorkbenchWindow(); IStatusLineManager lineManager = workbenchWindow .getStatusLineManager(); lineManager.removeAll(); lineManager.setErrorMessage(""); } }); } }