本文整理汇总了Java中org.eclipse.jdt.internal.ui.wizards.NewElementWizard类的典型用法代码示例。如果您正苦于以下问题:Java NewElementWizard类的具体用法?Java NewElementWizard怎么用?Java NewElementWizard使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
NewElementWizard类属于org.eclipse.jdt.internal.ui.wizards包,在下文中一共展示了NewElementWizard类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: run
import org.eclipse.jdt.internal.ui.wizards.NewElementWizard; //导入依赖的package包/类
@Override
public void run() {
Shell shell= getShell();
if (!doCreateProjectFirstOnEmptyWorkspace(shell)) {
return;
}
try {
INewWizard wizard= createWizard();
wizard.init(PlatformUI.getWorkbench(), getSelection());
WizardDialog dialog= new WizardDialog(shell, wizard);
PixelConverter converter= new PixelConverter(JFaceResources.getDialogFont());
dialog.setMinimumPageSize(converter.convertWidthInCharsToPixels(70), converter.convertHeightInCharsToPixels(20));
dialog.create();
int res= dialog.open();
if (res == Window.OK && wizard instanceof NewElementWizard) {
fCreatedElement= ((NewElementWizard)wizard).getCreatedElement();
}
notifyResult(res == Window.OK);
} catch (CoreException e) {
String title= NewWizardMessages.AbstractOpenWizardAction_createerror_title;
String message= NewWizardMessages.AbstractOpenWizardAction_createerror_message;
ExceptionHandler.handle(e, shell, title, message);
}
}
示例2: run
import org.eclipse.jdt.internal.ui.wizards.NewElementWizard; //导入依赖的package包/类
@Override
public void run() {
Shell localShell = getShell();
if (!doCreateProjectFirstOnEmptyWorkspace(localShell)) {
return;
}
try {
INewWizard wizard = createWizard();
wizard.init(PlatformUI.getWorkbench(), getSelection());
WizardDialog dialog = new WizardDialog(localShell, wizard);
IPixelConverter converter =
PixelConverterFactory.createPixelConverter(JFaceResources.getDialogFont());
dialog.setMinimumPageSize(converter.convertWidthInCharsToPixels(70),
converter.convertHeightInCharsToPixels(20));
dialog.create();
int res = dialog.open();
if (res == Window.OK && wizard instanceof NewElementWizard) {
createdElement = ((NewElementWizard) wizard).getCreatedElement();
}
notifyResult(res == Window.OK);
} catch (CoreException e) {
String title = NewWizardMessages.AbstractOpenWizardAction_createerror_title;
String message = NewWizardMessages.AbstractOpenWizardAction_createerror_message;
ExceptionHandler.handle(e, localShell, title, message);
}
}
示例3: createWizard
import org.eclipse.jdt.internal.ui.wizards.NewElementWizard; //导入依赖的package包/类
private NewElementWizard createWizard(StructuredSelection selection) {
NewAsyncRemoteServiceInterfaceCreationWizardPage page =
new NewAsyncRemoteServiceInterfaceCreationWizardPage(syncTypeBinding);
page.init(selection);
configureWizardPage(page);
return new NewAsyncRemoteServiceInterfaceCreationWizard(page, true);
}
示例4: getPage
import org.eclipse.jdt.internal.ui.wizards.NewElementWizard; //导入依赖的package包/类
private NewTypeWizardPage getPage(NewElementWizard wizard) {
IWizardPage[] pages = wizard.getPages();
Assert.isTrue(pages.length > 0 && pages[0] instanceof NewTypeWizardPage);
return (NewTypeWizardPage) pages[0];
}
示例5: getPage
import org.eclipse.jdt.internal.ui.wizards.NewElementWizard; //导入依赖的package包/类
private NewTypeWizardPage getPage(NewElementWizard wizard) {
IWizardPage[] pages= wizard.getPages();
Assert.isTrue(pages.length > 0 && pages[0] instanceof NewTypeWizardPage);
return (NewTypeWizardPage) pages[0];
}