當前位置: 首頁>>代碼示例>>Java>>正文


Java WizardNewFileCreationPage類代碼示例

本文整理匯總了Java中org.eclipse.ui.dialogs.WizardNewFileCreationPage的典型用法代碼示例。如果您正苦於以下問題:Java WizardNewFileCreationPage類的具體用法?Java WizardNewFileCreationPage怎麽用?Java WizardNewFileCreationPage使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


WizardNewFileCreationPage類屬於org.eclipse.ui.dialogs包,在下文中一共展示了WizardNewFileCreationPage類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: addPages

import org.eclipse.ui.dialogs.WizardNewFileCreationPage; //導入依賴的package包/類
@Override
public void addPages() {
	super.addPages();
	String fileExtension = fileExtensions.split("\\s*,\\s*")[0];
	mainPage = new WizardNewFileCreationPage("New File Page", getSelection()) {
		@Override
		protected InputStream getInitialContents() {
			NewFileTemplate template = new NewFileTemplate(this.getFileName().replace("."+fileExtension, ""), solidityVersion);
			
			return new StringInputStream(template.generate().toString());
		}
	};
	mainPage.setTitle("Solidity File");
	mainPage.setFileName("my_contract");
	mainPage.setFileExtension(fileExtension);
	addPage(mainPage);
}
 
開發者ID:Yakindu,項目名稱:solidity-ide,代碼行數:18,代碼來源:NewFileWizard.java

示例2: setPreviewContent

import org.eclipse.ui.dialogs.WizardNewFileCreationPage; //導入依賴的package包/類
/**
 * Update the preview content with the given template.
 * 
 * @param template
 */
protected void setPreviewContent(TemplateElement template)
{
	WizardNewFileCreationPage fileCreationPage = (WizardNewFileCreationPage) getPreviousPage();
	String templateContent = null;
	try
	{
		IPath path = fileCreationPage.getContainerFullPath().append(fileCreationPage.getFileName());
		templateContent = NewFileWizard.getTemplateContent(template, path);
	}
	catch (Exception e)
	{
		// logs the exception but allows the page to continue
		IdeLog.logError(CommonEditorPlugin.getDefault(), e);
	}
	if (templateContent == null)
	{
		templatePreview.setText(""); //$NON-NLS-1$
	}
	else
	{
		templatePreview.setText(templateContent);
	}
	scroll.setMinSize(templatePreview.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:30,代碼來源:TemplateSelectionPage.java

示例3: addPages

import org.eclipse.ui.dialogs.WizardNewFileCreationPage; //導入依賴的package包/類
@Override
public void addPages() {
    super.addPages();
    page = new WizardNewFileCreationPage(getPageName(), selection) {
        @Override
        protected void createAdvancedControls(Composite parent) {}

        @Override
        protected IStatus validateLinkedResource() {
            return Status.OK_STATUS;
        }
    };
    page.setImageDescriptor(RoboVMPlugin.getDefault().getImageRegistry()
            .getDescriptor(getPageBanner()));
    page.setTitle(getPageTitle());
    page.setDescription(getPageDescription());
    addPage(page);
}
 
開發者ID:robovm,項目名稱:robovm-eclipse,代碼行數:19,代碼來源:AbstractNewXcodeFileWizard.java

示例4: addPages

import org.eclipse.ui.dialogs.WizardNewFileCreationPage; //導入依賴的package包/類
/**
 * The wizard is composed of two pages
 */
@Override
public void addPages() {
  viewContainerFolderSelectionPage =
      new WizardNewFileCreationPage(Messages.getString("VirtualModelFileWizard.Page.Name"), //$NON-NLS-1$
                                    selection);
  viewContainerFolderSelectionPage
      .setImageDescriptor(EmfViewsUIPlugin.getImageDescriptor("VirtualModelWizard.png")); //$NON-NLS-1$

  viewContainerFolderSelectionPage.setTitle(Messages.getString("VirtualModelFileWizard.Title")); //$NON-NLS-1$
  viewContainerFolderSelectionPage
      .setDescription(Messages.getString("VirtualModelFileWizard.Page.Description")); //$NON-NLS-1$
  viewContainerFolderSelectionPage.setFileExtension("eview"); //$NON-NLS-1$
  addPage(viewContainerFolderSelectionPage);
  String viewpoint = virtualMetamodel.getFullPath().makeRelative().toString();
  createViewScreen = new CreateViewScreen(viewpoint);

  addPage(createViewScreen);
}
 
開發者ID:atlanmod,項目名稱:emfviews,代碼行數:22,代碼來源:CreateViewWizard.java

示例5: addPages

import org.eclipse.ui.dialogs.WizardNewFileCreationPage; //導入依賴的package包/類
/**
 * The wizard is composed of two pages
 */
@Override
public void addPages() {
  simplePage =
      new WizardNewFileCreationPage(Messages.getString("VirtualMetamodelFileWizard.Page.Name"), //$NON-NLS-1$
                                    selection);
  simplePage.setImageDescriptor(EmfViewsUIPlugin.getImageDescriptor("VirtualModelWizard.png")); //$NON-NLS-1$

  simplePage.setTitle(Messages.getString("VirtualMetamodelFileWizard.Title")); //$NON-NLS-1$
  simplePage.setDescription(Messages.getString("VirtualModelFileWizard.Page.Description")); //$NON-NLS-1$
  simplePage.setFileExtension("eviewpoint"); //$NON-NLS-1$
  addPage(simplePage);

  advancedPage = new CreateViewpointScreen(selection);
  addPage(advancedPage);

  attSelectionPage = new AttributesSelectionPage();
  addPage(attSelectionPage);

}
 
開發者ID:atlanmod,項目名稱:emfviews,代碼行數:23,代碼來源:CreateViewpointWizard.java

示例6: addPages

import org.eclipse.ui.dialogs.WizardNewFileCreationPage; //導入依賴的package包/類
public void addPages() {
	for (Iterator<DataSource> it = activeSources.iterator();it.hasNext();)
	{
		DataSource ds = it.next();
		WizardNewFileCreationPage destinationPage = 
			new WizardNewFileCreationPage("FilePage", new StructuredSelection());
		String pageTitle = "Choose a new file to store the result of translation from data source "
			+ ds.instanceURIString();
		destinationPage.setFileExtension(resultExtension);
		if (isXSLTGeneration) 
		{
			pageTitle = "Choose a new file to store generated XSLT to translate from mapped source "
				+ ds.mappingSetURIString();
			destinationPage.setFileExtension("xsl");				
		}
		destinationPage.setTitle(pageTitle);
		addPage(destinationPage);	
		pages.add(destinationPage);
	}
}
 
開發者ID:openmapsoftware,項目名稱:mappingtools,代碼行數:21,代碼來源:TranslateDestinationWizard.java

示例7: createNewFilePage

import org.eclipse.ui.dialogs.WizardNewFileCreationPage; //導入依賴的package包/類
@Override
protected WizardNewFileCreationPage createNewFilePage() {
	return new NewFilePage(getSelection(), fileExt) {
		@Override
		public void createControl(Composite parent) {
			super.createControl(parent);
			Composite area = (Composite) getControl();
			Composite container = new Composite(area, SWT.NONE);
			container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
			GridLayout layout = new GridLayout(2, false);
			container.setLayout(layout);
			Label lbtOcciServerUrl = new Label(container, SWT.NONE);
			lbtOcciServerUrl.setText(Messages.NewConfigurationWizard_OcciServerUrl);
			final Text txtOcciServerUrl = new Text(container, SWT.BORDER);
			txtOcciServerUrl.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
			txtOcciServerUrl.addModifyListener(new ModifyListener() {
				public void modifyText(ModifyEvent e) {
					occiServerUrl = txtOcciServerUrl.getText();
					setPageComplete(validatePage());
				}
			});
		}

		@Override
		protected boolean validatePage() {
			// TODO add error messages
			return super.validatePage() && !Strings.isNullOrEmpty(occiServerUrl);
		}
	};
}
 
開發者ID:occiware,項目名稱:OCCI-Studio,代碼行數:31,代碼來源:NewConfigurationWizard.java

示例8: createNewFilePage

import org.eclipse.ui.dialogs.WizardNewFileCreationPage; //導入依賴的package包/類
@Override
protected WizardNewFileCreationPage createNewFilePage() {
	return new NewFilePage(getSelection(), fileExt) {
		@Override
		public void createControl(Composite parent) {
			super.createControl(parent);
			Composite control = (Composite) getControl();

			Composite extensionGroup = new Composite(control, SWT.NONE);
			GridLayout layout = new GridLayout();
			layout.numColumns = 2;
			extensionGroup.setLayout(layout);
			extensionGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

			Label refOccieLabel = new Label(extensionGroup, SWT.NONE);
			refOccieLabel.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, true));
			refOccieLabel.setText(Messages.NewExtensionWizard_RefExtensionLabel);
			refOccieLabel.setFont(parent.getFont());

			Composite composite = new Composite(extensionGroup, SWT.NULL);
			GridData layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
			composite.setLayoutData(layoutData);
			TableColumnLayout tableLayout = new TableColumnLayout();
			composite.setLayout(tableLayout);

			Table table = new Table(composite,
					SWT.CHECK | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
			refExtensionViewer = new CheckboxTableViewer(table);

			refExtensionViewer.setContentProvider(ArrayContentProvider.getInstance());

			Collection<String> registeredExtensions = new ArrayList<String>(
					OcciRegistry.getInstance().getRegisteredExtensions());
			refExtensionViewer.setInput(registeredExtensions);
		}
	};
}
 
開發者ID:occiware,項目名稱:OCCI-Studio,代碼行數:38,代碼來源:NewConfigurationWizard.java

示例9: init

import org.eclipse.ui.dialogs.WizardNewFileCreationPage; //導入依賴的package包/類
@Override
public void init(IWorkbench workbench, IStructuredSelection selection) {
	page=new WizardNewFileCreationPage("選擇存儲目錄",selection);
	page.setFileName("process.jpdl.xml");
	page.setTitle("流程模版存儲目錄選擇");
	page.setDescription("選擇新建的流程模版文件存放目錄");
	this.addPage(page);
}
 
開發者ID:bsteker,項目名稱:bdf2,代碼行數:9,代碼來源:NewProcessWizard.java

示例10: addPages

import org.eclipse.ui.dialogs.WizardNewFileCreationPage; //導入依賴的package包/類
@Override
public void addPages() {
	mainPage = new WizardNewFileCreationPage("newFilePage1", getSelection());//$NON-NLS-1$
	mainPage.setTitle("New Solution");
	mainPage.setDescription("Create a new marketplace solution. The file name must end with \".mps\".");
	addPage(mainPage);
}
 
開發者ID:Itema-as,項目名稱:dawn-marketplace-server,代碼行數:8,代碼來源:NewMarketplaceSolutionWizard.java

示例11: addContentPages

import org.eclipse.ui.dialogs.WizardNewFileCreationPage; //導入依賴的package包/類
@Override
public void addContentPages() {
       wizardNewFileCreationPage = new WizardNewFileCreationPage("newPlanFilePage1", getSelection());//$NON-NLS-1$
       wizardNewFileCreationPage.setTitle(getTranslatableName());
       wizardNewFileCreationPage.setFileExtension("plan");
       wizardNewFileCreationPage.setDescription(getDescription()); 
       
       temporalNewPlanWizardPage = new TemporalNewPlanWizardPage();
       temporalNewPlanWizardPage.setTitle(getTranslatableName());
       temporalNewPlanWizardPage.setDescription(getDescription());
       // descriptions is set in page
                     
       addPage(wizardNewFileCreationPage);
       addPage(temporalNewPlanWizardPage);
   }
 
開發者ID:nasa,項目名稱:OpenSPIFe,代碼行數:16,代碼來源:NewPlanResourceWizard.java

示例12: addPage

import org.eclipse.ui.dialogs.WizardNewFileCreationPage; //導入依賴的package包/類
/**
 * {@inheritDoc}
 */
@Override
public void addPage(final IWizardPage page) {
    if (page instanceof WizardNewFileCreationPage) {
        ((WizardNewFileCreationPage) page).setFileName("classes.klaviz");
    }
    super.addPage(page);
}
 
開發者ID:OpenKieler,項目名稱:klassviz,代碼行數:11,代碼來源:NewKlavizFileWizard.java

示例13: addPages

import org.eclipse.ui.dialogs.WizardNewFileCreationPage; //導入依賴的package包/類
@Override
public void addPages() {
        IStructuredSelection projectSelectionFromModulePath = getProjectSelection();
        mainPage = new WizardNewFileCreationPage("Create new Rust file", projectSelectionFromModulePath);
        mainPage.setTitle("Create new Rust file");
        mainPage.setFileExtension("rs");
        mainPage.setDescription("Create a new Rust file");
        addPage(mainPage);
}
 
開發者ID:peq,項目名稱:rustyeclipse,代碼行數:10,代碼來源:NewPackageWizard.java

示例14: create_a_niem_model

import org.eclipse.ui.dialogs.WizardNewFileCreationPage; //導入依賴的package包/類
public void create_a_niem_model(final String theModelName) throws CoreException {
    final IWorkbench theWorkbench = get_the_workbench();
    final IWorkbenchWizard theWizard = theWorkbench.getNewWizardRegistry().findWizard(NewNiemModelWizard.ID)
            .createWizard();
    theWizard.init(theWorkbench, new StructuredSelection(projectProvider.get()));

    final WizardDialog theDialog = new WizardDialog(null, theWizard);
    theDialog.setBlockOnOpen(false);
    theDialog.open();

    final WizardNewFileCreationPage theNewModelFilePage = (WizardNewFileCreationPage) theWizard.getPages()[0];
    theNewModelFilePage.setFileName(theModelName + ".di");

    select_the_default_button(theDialog);
    select_the_default_button(theDialog);

    final SetMPDValuesPage theSecondMpdValuesPage = (SetMPDValuesPage) theWizard.getPages()[2];
    theSecondMpdValuesPage.setDomains(asList("Test Domain"));
    theSecondMpdValuesPage.setKeywords(asList("Test Keyword"));
    theSecondMpdValuesPage.setAuthoritativeSourceName("Test Name");
    select_the_default_button(theDialog);

    final SetPOCValuesPage thePOCValuesPage = (SetPOCValuesPage) theWizard.getPages()[3];
    thePOCValuesPage.setPointsOfContact(singletonList(new PointOfContact("Test POC Name",
            singletonList("[email protected]"), singletonList("555-5555"))));
    select_the_default_button(theDialog);
}
 
開發者ID:info-sharing-environment,項目名稱:NIEM-Modeling-Tool,代碼行數:28,代碼來源:CreatesATemporaryNiemUmlModel.java

示例15: openWizardDialog

import org.eclipse.ui.dialogs.WizardNewFileCreationPage; //導入依賴的package包/類
public static void openWizardDialog(IWorkbenchSite site, RuleTemplate ruleTemplate, IProject project) {
	NewRuleWizard wizard = new NewRuleWizard(ruleTemplate.toString());
	wizard.init(site.getWorkbenchWindow().getWorkbench(), new StructuredSelection(project));
	WizardDialog dialog = new WizardDialog(site.getShell(), wizard);
	dialog.setHelpAvailable(false);
	dialog.create();
	((WizardNewFileCreationPage) dialog.getCurrentPage()).setFileName("rule.btm");
	dialog.open();
}
 
開發者ID:masao-kunii,項目名稱:byteman-editor,代碼行數:10,代碼來源:NewRuleWizard.java


注:本文中的org.eclipse.ui.dialogs.WizardNewFileCreationPage類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。