本文整理匯總了Java中org.eclipse.ui.IWorkbench.getDisplay方法的典型用法代碼示例。如果您正苦於以下問題:Java IWorkbench.getDisplay方法的具體用法?Java IWorkbench.getDisplay怎麽用?Java IWorkbench.getDisplay使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.ui.IWorkbench
的用法示例。
在下文中一共展示了IWorkbench.getDisplay方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: stop
import org.eclipse.ui.IWorkbench; //導入方法依賴的package包/類
@Override
public void stop ()
{
if ( !PlatformUI.isWorkbenchRunning () )
{
return;
}
final IWorkbench workbench = PlatformUI.getWorkbench ();
final Display display = workbench.getDisplay ();
display.syncExec ( new Runnable () {
@Override
public void run ()
{
if ( !display.isDisposed () )
{
workbench.close ();
}
}
} );
}
示例2: stop
import org.eclipse.ui.IWorkbench; //導入方法依賴的package包/類
@Override
public void stop() {
final IWorkbench workbench = PlatformUI.getWorkbench();
if (workbench == null)
return;
final Display display = workbench.getDisplay();
display.syncExec(new Runnable() {
@Override
public void run() {
if (!display.isDisposed())
workbench.close();
}
});
}
示例3: stopEclipseUI
import org.eclipse.ui.IWorkbench; //導入方法依賴的package包/類
/**
* Stop Eclipse UI.
*/
private void stopEclipseUI() {
if (PlatformUI.isWorkbenchRunning()==false) return;
final IWorkbench workbench = PlatformUI.getWorkbench();
final Display display = workbench.getDisplay();
display.asyncExec(new Runnable() {
public void run() {
if (!display.isDisposed()) {
workbench.close();
}
}
});
}
示例4: stop
import org.eclipse.ui.IWorkbench; //導入方法依賴的package包/類
public void stop() {
if (!PlatformUI.isWorkbenchRunning())
return;
final IWorkbench workbench = PlatformUI.getWorkbench();
final Display display = workbench.getDisplay();
display.syncExec(new Runnable() {
public void run() {
if (!display.isDisposed())
workbench.close();
}
});
}