标签:jar ack shel enc star pre public fragments idg
package com.developer.showtime; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IStartup; public class ShowTime implements IStartup{ @Override public void earlyStartup() { Display.getDefault().syncExec(new Runnable(){ @Override public void run() { long eclipseStartTime = Long.parseLong(System.getProperty("eclipse.startTime")); long costTime = System.currentTimeMillis() - eclipseStartTime; Shell shell = Display.getDefault().getActiveShell(); String message = "eclipse 启动时间:" + costTime + "ms"; MessageDialog.openInformation(shell, "Information", message); } }); } }
<?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.4"?> <plugin> <extension point="org.eclipse.ui.startup"> <startup class="com.developer.showtime.ShowTime"/> </extension> </plugin>
可供下载:http://pan.baidu.com/s/1kVOdkTh
标签:jar ack shel enc star pre public fragments idg
原文地址:http://www.cnblogs.com/mxm985/p/7203265.html