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


Java WizardDescriptor.InstantiatingIterator方法代码示例

本文整理汇总了Java中org.openide.WizardDescriptor.InstantiatingIterator方法的典型用法代码示例。如果您正苦于以下问题:Java WizardDescriptor.InstantiatingIterator方法的具体用法?Java WizardDescriptor.InstantiatingIterator怎么用?Java WizardDescriptor.InstantiatingIterator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.openide.WizardDescriptor的用法示例。


在下文中一共展示了WizardDescriptor.InstantiatingIterator方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getServerIterator

import org.openide.WizardDescriptor; //导入方法依赖的package包/类
private WizardDescriptor.InstantiatingIterator getServerIterator() {
    ServerWizardProvider server = getSelectedWizard();
    if (server == null) {
        return null;
    }

    WizardDescriptor.InstantiatingIterator iterator = (WizardDescriptor.InstantiatingIterator)iterators.get(server);
    if (iterator != null) {
        return iterator;
    }


    iterator = server.getInstantiatingIterator();
    iterator.initialize(wd);
    iterators.put(server, iterator);
    return iterator;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:18,代码来源:AddServerInstanceWizard.java

示例2: updateIterator

import org.openide.WizardDescriptor; //导入方法依赖的package包/类
private void updateIterator (final WizardDescriptor.InstantiatingIterator<WizardDescriptor> it) {
    if (this.typeIterator != null) {
        this.typeIterator.uninitialize (this.wizard);
    }        
    if (it != null) {
        it.initialize (this.wizard);
        updatePanelsList(new JComponent[]{
            (JComponent)selectorPanel.getComponent(),
            (JComponent)locationPanel.getComponent(),
            (JComponent)it.current().getComponent(),
        }, it);
    }
    else {
        updatePanelsList(new JComponent[]{
            (JComponent)selectorPanel.getComponent(),
            (JComponent)locationPanel.getComponent()
        }, null);
    }
    typeIterator = it;
    wizard.putProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, new Integer(panelNumber)); // NOI18N
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:22,代码来源:PlatformInstallIterator.java

示例3: asInstantiatingIterator

import org.openide.WizardDescriptor; //导入方法依赖的package包/类
@NonNull
private static Optional<WizardDescriptor.InstantiatingIterator<WizardDescriptor>> asInstantiatingIterator(
        @NullAllowed final WizardDescriptor.Iterator<WizardDescriptor> it) {
    return Optional.ofNullable(it)
            .map((p)->{
                return p instanceof WizardDescriptor.InstantiatingIterator ?
                        (WizardDescriptor.InstantiatingIterator<WizardDescriptor>) p:
                        null;
            });
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:NewJavaFileWizardIterator.java

示例4: createIterator

import org.openide.WizardDescriptor; //导入方法依赖的package包/类
@Override
public WizardDescriptor.InstantiatingIterator<WizardDescriptor> createIterator(FileObject baseFolder) {
    try {
        return new J2SEWizardIterator(baseFolder);
    } catch (IOException ioe) {
        ErrorManager.getDefault().notify (ioe);
        return null;
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:J2SEInstallImpl.java

示例5: definedArchetype

import org.openide.WizardDescriptor; //导入方法依赖的package包/类
/**
 * Wizard iterator using a predetermined archetype.
 * @since 2.63
 * @see TemplateRegistration
 * @see #TEMPLATE_FOLDER
 */
public static WizardDescriptor.InstantiatingIterator<?> definedArchetype(String groupId, String artifactId, String version, @NullAllowed String repository, String title) {
    Archetype arch = new Archetype();
    arch.setGroupId(groupId);
    arch.setArtifactId(artifactId);
    arch.setVersion(version);
    arch.setRepository(repository);
    return new MavenWizardIterator(arch, title);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:15,代码来源:ArchetypeWizards.java

示例6: testSimpleWizard

import org.openide.WizardDescriptor; //导入方法依赖的package包/类
public void testSimpleWizard() throws Exception {
    clearWorkDir();
    File whereTo = new File(getWorkDir(), "whereTo");
    whereTo.mkdirs();
    FileObject whereToObj = FileUtil.toFileObject(whereTo);
    assertNotNull("Where obj found", whereToObj);
    MockServices.setServices(MockExecuteMaven.class);
    
    FileObject archetype = FileUtil.getConfigFile("Templates/Project/Test/SimpleWizard.archetype");
    assertNotNull(archetype);
    Object iterator = archetype.getAttribute("instantiatingIterator");
    assertNotNull("Iterator found", iterator);
    assertTrue("It is iterator", iterator instanceof WizardDescriptor.InstantiatingIterator);
    WizardDescriptor.InstantiatingIterator instIter = (WizardDescriptor.InstantiatingIterator) iterator;

    TemplateWizard tw = new TemplateWizard();
    tw.setTemplate(DataObject.find(archetype));
    tw.setTargetFolder(DataFolder.findFolder(whereToObj));
    tw.putProperty("version", "6.5");
    tw.putProperty("artifactId", "simplewizardtest");
    tw.putProperty("groupId", "org.netbeans.test");
    
    instIter.initialize(tw);
    Set<?> results = instIter.instantiate();
    assertEquals("One directory: " + results, 1, results.size());
    FileObject createProject = fileObject(results.iterator().next());
    assertEquals("In the same dir", whereToObj.getParent(), createProject.getParent());
    assertEquals("Name as artifactId", "simplewizardtest", createProject.getNameExt());
    
    RunConfig runConfig = MockExecuteMaven.assertConfigExists();
    assertEquals("Check archetype file ArtifactId", "javafx", runConfig.getProperties().get("archetypeArtifactId"));
    assertEquals("Check archetype file GroupId", "org.codehaus.mojo.archetypes", runConfig.getProperties().get("archetypeGroupId"));
    assertEquals("Check archetype file version", "0.6", runConfig.getProperties().get("archetypeVersion"));
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:35,代码来源:SimpleWizardHandlerTest.java

示例7: getInstaller

import org.openide.WizardDescriptor; //导入方法依赖的package包/类
private WizardDescriptor.InstantiatingIterator<WizardDescriptor> getInstaller () {
    return this.iterator;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:LocationChooser.java

示例8: getInstallerIterator

import org.openide.WizardDescriptor; //导入方法依赖的package包/类
/**
 * Returns the currently selected installer.
 */
WizardDescriptor.InstantiatingIterator<WizardDescriptor> getInstallerIterator() {
    return getComponent().getInstaller();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:LocationChooser.java

示例9: createWizardForSuperClass

import org.openide.WizardDescriptor; //导入方法依赖的package包/类
@Override
public WizardDescriptor.InstantiatingIterator createWizardForSuperClass() {
    return TemplateWizardIterator.createForSuperclass();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:NbTemplateWizardProviderImpl.java

示例10: createWizard

import org.openide.WizardDescriptor; //导入方法依赖的package包/类
@Override
public WizardDescriptor.InstantiatingIterator createWizard() {
    return TemplateWizardIterator.create();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:NbTemplateWizardProviderImpl.java

示例11: createIterator

import org.openide.WizardDescriptor; //导入方法依赖的package包/类
public WizardDescriptor.InstantiatingIterator<WizardDescriptor> createIterator(FileObject baseFolder) {
    return this.iterator;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:PlatformInstallIteratorTest.java

示例12: create

import org.openide.WizardDescriptor; //导入方法依赖的package包/类
/** publicly known factory method */
public static WizardDescriptor.InstantiatingIterator<?> create(FileObject data) {
    return new HTMLWizard(data);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:HTMLWizard.java

示例13: javafx

import org.openide.WizardDescriptor; //导入方法依赖的package包/类
@TemplateRegistration(folder=ArchetypeWizards.TEMPLATE_FOLDER, position=120, displayName="#LBL_Maven_JavaFx_Archetype", iconBase="org/netbeans/modules/maven/resources/jaricon.png", description="javafx.html")
@Messages("LBL_Maven_JavaFx_Archetype=JavaFX Application")
public static WizardDescriptor.InstantiatingIterator<?> javafx() {
    return ArchetypeWizards.definedArchetype("org.codehaus.mojo.archetypes", "javafx", "0.6", null, LBL_Maven_JavaFx_Archetype());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:MavenWizardIterator.java

示例14: javafxSample

import org.openide.WizardDescriptor; //导入方法依赖的package包/类
@TemplateRegistration(folder=JAVAFX_SAMPLES_TEMPLATE_FOLDER, position=2450, displayName="#LBL_Maven_JavaFx_Sample_Archetype", iconBase="org/netbeans/modules/maven/resources/jaricon.png", description="javafx.html")
@Messages("LBL_Maven_JavaFx_Sample_Archetype=Maven FXML MigPane Sample")
public static WizardDescriptor.InstantiatingIterator<?> javafxSample() {
    return ArchetypeWizards.definedArchetype("org.codehaus.mojo.archetypes", "sample-javafx", "0.5", null, LBL_Maven_JavaFx_Sample_Archetype());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:MavenWizardIterator.java

示例15: create

import org.openide.WizardDescriptor; //导入方法依赖的package包/类
@TemplateRegistration(folder=ArchetypeWizards.TEMPLATE_FOLDER, position=290, displayName="#template.project.OSGi", iconBase="org/netbeans/modules/maven/osgi/maven_osgi_16.png", description="OSGiDescription.html")
@Messages("template.project.OSGi=OSGi Bundle")
public static WizardDescriptor.InstantiatingIterator<?> create() {
    return ArchetypeWizards.definedArchetype("org.codehaus.mojo.archetypes", "osgi-archetype", "1.4", null, template_project_OSGi());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:BundleWizard.java


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