当前位置: 首页>>代码示例>>Java>>正文


Java NewElementWizard类代码示例

本文整理汇总了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);
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:27,代码来源:AbstractOpenWizardAction.java

示例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);
  }
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:30,代码来源:AbstractOpenWizardAction.java

示例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);
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:8,代码来源:CreateAsyncInterfaceProposal.java

示例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];
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:6,代码来源:CreateAsyncInterfaceProposal.java

示例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];
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:6,代码来源:NewCUUsingWizardProposal.java


注:本文中的org.eclipse.jdt.internal.ui.wizards.NewElementWizard类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。