mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
empty project type
This commit is contained in:
@@ -22,10 +22,13 @@ public class BuilderBasedProjectType extends ProjectCategory {
|
||||
return myBuilder;
|
||||
}
|
||||
|
||||
/**
|
||||
* @author Dmitry Avdeev
|
||||
* Date: 04.09.13
|
||||
*/
|
||||
public static class Empty extends BuilderBasedProjectType {
|
||||
|
||||
public Empty() {
|
||||
super(new EmptyProjectBuilder());
|
||||
}
|
||||
}
|
||||
|
||||
public static class Java extends BuilderBasedProjectType {
|
||||
|
||||
public Java() {
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright 2000-2013 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.ide.projectWizard;
|
||||
|
||||
import com.intellij.ide.util.projectWizard.EmptyModuleBuilder;
|
||||
|
||||
/**
|
||||
* @author Dmitry Avdeev
|
||||
* Date: 27.09.13
|
||||
*/
|
||||
public class EmptyProjectBuilder extends EmptyModuleBuilder {
|
||||
@Override
|
||||
public String getPresentableName() {
|
||||
return "Empty Project";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Empty project without modules. Use it to create free-style module structure.";
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package com.intellij.platform.templates;
|
||||
|
||||
import com.intellij.ide.util.projectWizard.EmptyModuleBuilder;
|
||||
import com.intellij.ide.projectWizard.EmptyProjectBuilder;
|
||||
import com.intellij.ide.util.projectWizard.ModuleBuilder;
|
||||
import com.intellij.ide.util.projectWizard.WizardContext;
|
||||
import com.intellij.platform.ProjectTemplate;
|
||||
@@ -60,17 +60,7 @@ public class PlainModuleTemplatesFactory extends ProjectTemplatesFactory {
|
||||
if (!context.isCreatingNewProject()) {
|
||||
return ProjectTemplate.EMPTY_ARRAY;
|
||||
}
|
||||
return new ProjectTemplate[]{new BuilderBasedTemplate(new EmptyModuleBuilder() {
|
||||
@Override
|
||||
public String getPresentableName() {
|
||||
return "Empty Project";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "Empty project without modules. Use it to create free-style module structure.";
|
||||
}
|
||||
})};
|
||||
return new ProjectTemplate[]{new BuilderBasedTemplate(new EmptyProjectBuilder())};
|
||||
}
|
||||
List<ModuleBuilder> builders = ModuleBuilder.getAllBuilders();
|
||||
List<ProjectTemplate> templates = ContainerUtil.mapNotNull(builders, new NullableFunction<ModuleBuilder, ProjectTemplate>() {
|
||||
|
||||
@@ -314,6 +314,8 @@
|
||||
<projectTemplatesFactory implementation="com.intellij.platform.templates.PlainModuleTemplatesFactory"/>
|
||||
<projectTemplateFileProcessor implementation="com.intellij.platform.templates.SystemFileProcessor"/>
|
||||
|
||||
<projectWizard.projectCategory implementation="com.intellij.ide.projectWizard.BuilderBasedProjectType$Empty"/>
|
||||
|
||||
<applicationService serviceImplementation="com.intellij.ide.util.newProjectWizard.SelectTemplateSettings"/>
|
||||
|
||||
<gotoFileContributor implementation="com.intellij.ide.util.gotoByName.ProjectBaseDirNavigationContributor"/>
|
||||
|
||||
Reference in New Issue
Block a user