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


Java PersistenceClientEntitySelection类代码示例

本文整理汇总了Java中org.netbeans.modules.j2ee.persistence.wizard.PersistenceClientEntitySelection的典型用法代码示例。如果您正苦于以下问题:Java PersistenceClientEntitySelection类的具体用法?Java PersistenceClientEntitySelection怎么用?Java PersistenceClientEntitySelection使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PersistenceClientEntitySelection类属于org.netbeans.modules.j2ee.persistence.wizard包,在下文中一共展示了PersistenceClientEntitySelection类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initialize

import org.netbeans.modules.j2ee.persistence.wizard.PersistenceClientEntitySelection; //导入依赖的package包/类
@Override
public void initialize(TemplateWizard wizard) {
    index = 0;
    // obtaining target folder
    Project project = Templates.getProject(wizard);

    WizardDescriptor.Panel secondPanel = new ValidationPanel(
            new PersistenceClientEntitySelection(NbBundle.getMessage(JpaControllerIterator.class, "LBL_EntityClasses"),
            new HelpCtx("org.netbeans.modules.j2ee.persistence.wizard.jpacontroller$"+PersistenceClientEntitySelection.class.getSimpleName()), wizard)); // NOI18N
    WizardDescriptor.Panel thirdPanel = new JpaControllerSetupPanel(project, wizard);
    String names[];
    //
    boolean noPuNeeded = true;
    try {
        noPuNeeded = ProviderUtil.persistenceExists(project, Templates.getTargetFolder(wizard)) || !ProviderUtil.isValidServerInstanceOrNone(project);
    } catch (InvalidPersistenceXmlException ex) {
        Logger.getLogger(JpaControllerIterator.class.getName()).log(Level.FINE, "Invalid persistence.xml: {0}", ex.getPath()); //NOI18N
    }
    if (!noPuNeeded) {
        puPanel = new PersistenceUnitWizardDescriptor(project);
        panels = new WizardDescriptor.Panel[]{secondPanel, thirdPanel, puPanel};
        names = new String[]{
                    NbBundle.getMessage(JpaControllerIterator.class, "LBL_EntityClasses"),
                    NbBundle.getMessage(JpaControllerIterator.class, "LBL_JpaControllerClasses"),
                    NbBundle.getMessage(JpaControllerIterator.class, "LBL_PersistenceUnitSetup")
                };
    } else {

        panels = new WizardDescriptor.Panel[]{secondPanel, thirdPanel};
        names = new String[]{
                    NbBundle.getMessage(JpaControllerIterator.class, "LBL_EntityClasses"),
                    NbBundle.getMessage(JpaControllerIterator.class, "LBL_JpaControllerClasses")
                };
    }

    wizard.putProperty("NewFileWizard_Title",
            NbBundle.getMessage(JpaControllerIterator.class, "Templates/Persistence/JpaControllersFromEntities"));
    Wizards.mergeSteps(wizard, panels, names);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:40,代码来源:JpaControllerIterator.java

示例2: initialize

import org.netbeans.modules.j2ee.persistence.wizard.PersistenceClientEntitySelection; //导入依赖的package包/类
@Override
public void initialize(WizardDescriptor wizard) {
    
    this.wizard = wizard;
    index = 0;
    // obtaining target folder
    if (getProject() == null) {
        setProject(Templates.getProject(wizard));
    }
    WizardDescriptor.Panel secondPanel = new ValidationPanel(getProject(), new PersistenceClientEntitySelection(NbBundle.getMessage(RevEngWizardDescriptor.class, "LBL_EntityClasses"), null, wizard)); // NOI18N
    WizardDescriptor.Panel thirdPanel = new JPAModelSetupPanel(getProject(), wizard);
    String names[];
    boolean noPuNeeded = true;
    try {
        noPuNeeded = ProviderUtil.persistenceExists(getProject()) || !ProviderUtil.isValidServerInstanceOrNone(project);
    } catch (InvalidPersistenceXmlException ex) {
        Logger.getLogger(RevEngWizardDescriptor.class.getName()).log(Level.FINE, "Invalid persistence.xml: {0}", ex.getPath()); //NOI18N
    }
    if (!noPuNeeded) {
        puPanel = new PersistenceUnitWizardDescriptor(getProject());
        panels = new ArrayList<>();
        panels.add(secondPanel);
        panels.add(thirdPanel);
        panels.add(puPanel);
        names = new String[]{
            NbBundle.getMessage(RevEngWizardDescriptor.class, "LBL_EntityClasses"),
            NbBundle.getMessage(RevEngWizardDescriptor.class, "LBL_JPA_Model"),
            NbBundle.getMessage(RevEngWizardDescriptor.class, "LBL_PersistenceUnitSetup")
        };
    } else {

        panels = new ArrayList<>();
        panels.add(secondPanel);
        panels.add(thirdPanel);
        names = new String[]{
            NbBundle.getMessage(RevEngWizardDescriptor.class, "LBL_EntityClasses"),
            NbBundle.getMessage(RevEngWizardDescriptor.class, "LBL_JPA_Model")
        };
    }

    wizard.putProperty("NewFileWizard_Title", NbBundle.getMessage(RevEngWizardDescriptor.class, "NewFileWizard_Title_JPAModelFromEntities"));
    org.netbeans.modeler.component.Wizards.mergeSteps(wizard, panels.toArray(new WizardDescriptor.Panel[0]), names);
}
 
开发者ID:jeddict,项目名称:jeddict,代码行数:44,代码来源:RevEngWizardDescriptor.java

示例3: initialize

import org.netbeans.modules.j2ee.persistence.wizard.PersistenceClientEntitySelection; //导入依赖的package包/类
@Override
public void initialize(WizardDescriptor wizard) {
    this.wizard = wizard;
    index = 0;
    // obtaining target folder
    Project project = Templates.getProject(wizard);

    WizardDescriptor.Panel secondPanel = new ValidationPanel(new PersistenceClientEntitySelection(NbBundle.getMessage(RevEngWizardDescriptor.class, "LBL_EntityClasses"), null, wizard)); // NOI18N
    WizardDescriptor.Panel thirdPanel = new JPAModelSetupPanel(project, wizard);
    String names[];
    boolean noPuNeeded = true;
    try {
        noPuNeeded = ProviderUtil.persistenceExists(project) || !ProviderUtil.isValidServerInstanceOrNone(project);
    } catch (InvalidPersistenceXmlException ex) {
        Logger.getLogger(RevEngWizardDescriptor.class.getName()).log(Level.FINE, "Invalid persistence.xml: {0}", ex.getPath()); //NOI18N
    }
    if (!noPuNeeded) {
        puPanel = new PersistenceUnitWizardDescriptor(project);
        panels = new ArrayList<WizardDescriptor.Panel<WizardDescriptor>>();
        panels.add(secondPanel);
        panels.add(thirdPanel);
        panels.add(puPanel);
        names = new String[]{
            NbBundle.getMessage(RevEngWizardDescriptor.class, "LBL_EntityClasses"),
            NbBundle.getMessage(RevEngWizardDescriptor.class, "LBL_JPA_Model"),
            NbBundle.getMessage(RevEngWizardDescriptor.class, "LBL_PersistenceUnitSetup")
        };
    } else {

        panels = new ArrayList<WizardDescriptor.Panel<WizardDescriptor>>();
        panels.add(secondPanel);
        panels.add(thirdPanel);
        names = new String[]{
            NbBundle.getMessage(RevEngWizardDescriptor.class, "LBL_EntityClasses"),
            NbBundle.getMessage(RevEngWizardDescriptor.class, "LBL_JPA_Model")
        };
    }

    wizard.putProperty("NewFileWizard_Title", NbBundle.getMessage(RevEngWizardDescriptor.class, "NewFileWizard_Title_JPAModelFromEntities"));
    org.netbeans.modeler.component.Wizards.mergeSteps(wizard, panels.toArray(new WizardDescriptor.Panel[0]), names);
}
 
开发者ID:foxerfly,项目名称:Netbeans-JPA-Modeler,代码行数:42,代码来源:RevEngWizardDescriptor.java


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