private Shell shell; public void setActivePart(IAction action, IWorkbenchPart targetPart) { IWorkbenchPartSite site = targetPart.getSite(); if (site != null) { shell = site.getShell(); } } public void run(IAction action) { Shell shell = new Shell(); MessageDialog.openInformation( shell, "Hello2 プラグイン", "Hello, Eclipse world"); }