本文整理汇总了Java中com.intellij.ide.util.projectWizard.WebProjectTemplate类的典型用法代码示例。如果您正苦于以下问题:Java WebProjectTemplate类的具体用法?Java WebProjectTemplate怎么用?Java WebProjectTemplate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WebProjectTemplate类属于com.intellij.ide.util.projectWizard包,在下文中一共展示了WebProjectTemplate类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createAdvancedSettings
import com.intellij.ide.util.projectWizard.WebProjectTemplate; //导入依赖的package包/类
@Override
@Nullable
protected JPanel createAdvancedSettings() {
JComponent advancedSettings = null;
if (myProjectGenerator instanceof PythonProjectGenerator)
advancedSettings = ((PythonProjectGenerator)myProjectGenerator).getSettingsPanel(myProjectDirectory);
else if (myProjectGenerator instanceof WebProjectTemplate) {
advancedSettings = ((WebProjectTemplate)myProjectGenerator).getPeer().getComponent();
}
if (advancedSettings != null) {
final JPanel jPanel = new JPanel(new VerticalFlowLayout());
final HideableDecorator deco = new HideableDecorator(jPanel, "Mor&e Settings", false);
boolean isValid = checkValid();
deco.setOn(!isValid);
if (myProjectGenerator instanceof PythonProjectGenerator && !deco.isExpanded()) {
final ValidationResult result = ((PythonProjectGenerator)myProjectGenerator).warningValidation(getSdk());
deco.setOn(!result.isOk());
}
deco.setContentComponent(advancedSettings);
return jPanel;
}
return null;
}
示例2: doGenerate
import com.intellij.ide.util.projectWizard.WebProjectTemplate; //导入依赖的package包/类
private static <T> void doGenerate(@NotNull WebProjectTemplate<T> template, @NotNull Module module) {
WebProjectGenerator.GeneratorPeer<T> peer = template.getPeer();
ModuleRootManager moduleRootManager = ModuleRootManager.getInstance(module);
VirtualFile[] contentRoots = moduleRootManager.getContentRoots();
VirtualFile dir = module.getProject().getBaseDir();
if (contentRoots.length > 0 && contentRoots[0] != null) {
dir = contentRoots[0];
}
template.generateProject(module.getProject(), dir, peer.getSettings(), module);
}
示例3: computeProjectSettings
import com.intellij.ide.util.projectWizard.WebProjectTemplate; //导入依赖的package包/类
public static Object computeProjectSettings(DirectoryProjectGenerator generator, ProjectSpecificSettingsStep settings) {
Object projectSettings = null;
if (generator instanceof PythonProjectGenerator) {
projectSettings = ((PythonProjectGenerator)generator).getProjectSettings();
}
else if (generator instanceof WebProjectTemplate) {
projectSettings = ((WebProjectTemplate)generator).getPeer().getSettings();
}
if (projectSettings instanceof PyNewProjectSettings) {
((PyNewProjectSettings)projectSettings).setSdk(settings.getSdk());
((PyNewProjectSettings)projectSettings).setInstallFramework(settings.installFramework());
}
return projectSettings;
}
示例4: WebModuleBuilder
import com.intellij.ide.util.projectWizard.WebProjectTemplate; //导入依赖的package包/类
public WebModuleBuilder(@NotNull WebProjectTemplate<?> template) {
myTemplate = template;
}
示例5: createModuleBuilder
import com.intellij.ide.util.projectWizard.WebProjectTemplate; //导入依赖的package包/类
@NotNull
public <T> ModuleBuilder createModuleBuilder(@NotNull WebProjectTemplate<T> webProjectTemplate) {
return new WebModuleBuilder(webProjectTemplate);
}