本文整理了Java中org.netbeans.spi.project.ui.templates.support.Templates.buildSimpleTargetChooser()
方法的一些代码示例,展示了Templates.buildSimpleTargetChooser()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Templates.buildSimpleTargetChooser()
方法的具体详情如下:
包路径:org.netbeans.spi.project.ui.templates.support.Templates
类名称:Templates
方法名:buildSimpleTargetChooser
暂无
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-selenium2-php
@Override
public WizardDescriptor.Panel createTargetChooserPanel(WizardDescriptor wiz) {
Project project = Templates.getProject(wiz);
SourceGroup seleniumSourceGroup = getSeleniumSourceGroup(project);
return Templates.buildSimpleTargetChooser(project, new SourceGroup[]{seleniumSourceGroup}).create();
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-clientproject
private WizardDescriptor.Panel<WizardDescriptor>[] getPanels() {
Project project = Templates.getProject(descriptor);
SourceGroup[] groups = getSourceGroups(project, Templates.getTemplate(descriptor));
WizardDescriptor.Panel<WizardDescriptor> simpleTargetChooserPanel = Templates.buildSimpleTargetChooser(project, groups).create();
@SuppressWarnings({"unchecked", "rawtypes"})
WizardDescriptor.Panel<WizardDescriptor>[] panels = new WizardDescriptor.Panel[] {simpleTargetChooserPanel};
return panels;
}
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-project-ui
groups = checkNotNull (groups, sources);
return new WizardDescriptor.Panel[] {
Templates.buildSimpleTargetChooser(project, groups).create(),
};
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-css-prep
private WizardDescriptor.Panel<WizardDescriptor> createWizardPanel() {
Project project = getProject();
assert project != null;
// #233484
ensureProperTargetFolder(project);
return Templates.buildSimpleTargetChooser(project, getSourceGroups(project))
.bottomPanel(getBottomPanel())
.create();
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-jsf
protected WizardDescriptor.Panel[] createPanels(Project project, TemplateWizard wiz) {
Sources sources = (Sources) ProjectUtils.getSources(project);
SourceGroup[] sourceGroups1 = sources.getSourceGroups(WebProjectConstants.TYPE_DOC_ROOT);
SourceGroup[] sourceGroups;
if (sourceGroups1.length == 0) {
sourceGroups = sources.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA);
} else if (sourceGroups1.length == 1) {
sourceGroups = new SourceGroup[]{sourceGroups1[0], sourceGroups1[0]};
} else {
sourceGroups = sourceGroups1;
}
templatePanel = new TemplatePanel(wiz);
// creates simple wizard panel with bottom panel
WizardDescriptor.Panel firstPanel = new JSFValidationPanel(
Templates.buildSimpleTargetChooser(project, sourceGroups).bottomPanel(templatePanel).create());
JComponent c = (JComponent) firstPanel.getComponent();
Dimension d = c.getPreferredSize();
d.setSize(d.getWidth(), d.getHeight() + 65);
c.setPreferredSize(d);
return new WizardDescriptor.Panel[]{
firstPanel
};
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-jsf
protected WizardDescriptor.Panel[] createPanels(Project project, TemplateWizard wiz) {
Sources sources = (Sources) ProjectUtils.getSources(project);
SourceGroup[] docSourceGroups = sources.getSourceGroups(WebProjectConstants.TYPE_DOC_ROOT);
SourceGroup[] sourceGroups;
if (docSourceGroups.length == 0) {
sourceGroups = sources.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA);
} else {
sourceGroups = docSourceGroups;
}
templateClientPanel = new TemplateClientPanel(wiz);
// creates simple wizard panel with bottom panel
return new WizardDescriptor.Panel[] {
Templates.buildSimpleTargetChooser(project, sourceGroups).bottomPanel(templateClientPanel).create()
};
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-php-project
Templates.SimpleTargetChooserBuilder targetChooserBuilder = Templates.buildSimpleTargetChooser(project, groups);
if (bottomPanelForPhpProject != null) {
targetChooserBuilder
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-groovy-grailsproject
private WizardDescriptor.Panel[] createPanels(WizardDescriptor wizardDescriptor) {
Sources sources = ProjectUtils.getSources(project);
SourceGroup group = GrailsArtifacts.getSourceGroupForCategory(
project, GroovySources.getGroovySourceGroups(sources), sourceCategory);
// fails with enabled assertion, fallback below
assert group != null;
SourceGroup[] groups;
if (group == null) {
groups = sources.getSourceGroups(Sources.TYPE_GENERIC);
return new WizardDescriptor.Panel[] {
Templates.buildSimpleTargetChooser(project, groups).create()
};
} else {
return new WizardDescriptor.Panel[] {
new GrailsTargetChooserPanel(project, group, null, sourceCategory.getSuffix())
};
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-selenium2-maven
@Override
public WizardDescriptor.Panel createTargetChooserPanel(WizardDescriptor wiz) {
// Ask for Java folders
Project project = Templates.getProject(wiz);
Sources sources = ProjectUtils.getSources(project);
SourceGroup[] groups = sources.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA);
assert groups != null : "Cannot return null from Sources.getSourceGroups: " + sources; //NOI18N
if (groups.length == 0) {
groups = sources.getSourceGroups(Sources.TYPE_GENERIC);
return Templates.buildSimpleTargetChooser(project, groups).create();
} else {
FileObject testDir = getTestRoot(project);
// fetch source groups again in case test root was just created
groups = sources.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA);
for (SourceGroup selGroup : groups) {
if (selGroup.getRootFolder().equals(testDir)){
return JavaTemplates.createPackageChooser(project, new SourceGroup[]{selGroup});
}
}
return JavaTemplates.createPackageChooser(project, groups);
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-selenium2-php
@Override
public void initialize(WizardDescriptor wizard) {
this.wiz = wizard;
Project project = Templates.getProject(wiz);
Selenium2SupportImpl selenium2Support = Selenium2Support.findSelenium2Support(project);
if (selenium2Support != null){
panel = selenium2Support.createTargetChooserPanel(wiz);
panel.getComponent();
} else {
wiz.putProperty(WizardDescriptor.PROP_ERROR_MESSAGE, Bundle.NO_SELENIUM_SUPPORT(project.getProjectDirectory().toString()));
panel = Templates.buildSimpleTargetChooser(project, new SourceGroup[0]).create();
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-beans
buildSimpleTargetChooser(project, sourceGroups);
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-web-jsf
folderPanel = new FacesConfigValidationPanel(Templates.buildSimpleTargetChooser(project, sourceGroups).create());
panels = new WizardDescriptor.Panel[] { folderPanel };
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-testng-ui
private WizardDescriptor.Panel[] createPanels(final WizardDescriptor wizardDescriptor) {
// Ask for Java folders
Project project = Templates.getProject(wizardDescriptor);
Sources sources = ProjectUtils.getSources(project);
SourceGroup[] groups = getTestRoots(sources);
if (groups.length == 0) {
if (SourceGroupModifier.createSourceGroup(project, JavaProjectConstants.SOURCES_TYPE_JAVA, JavaProjectConstants.SOURCES_HINT_TEST) != null) {
groups = getTestRoots(sources);
}
}
if (groups.length == 0) {
groups = sources.getSourceGroups(Sources.TYPE_GENERIC);
return new WizardDescriptor.Panel[]{
Templates.buildSimpleTargetChooser(project, groups).create()
};
} else {
return new WizardDescriptor.Panel[]{
JavaTemplates.createPackageChooser(project, groups, new EmptyTestStepLocation())
};
}
}
内容来源于网络,如有侵权,请联系作者删除!