Add ability to create python stub in new python file dialog.

This commit is contained in:
Semyon Proshev
2017-10-18 19:03:38 +03:00
parent bcafbf851a
commit 1caa0d503b
2 changed files with 4 additions and 16 deletions
@@ -1,18 +1,4 @@
/*
* Copyright 2000-2014 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.
*/
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.jetbrains.python.actions;
import com.intellij.ide.actions.CreateFileFromTemplateAction;
@@ -21,6 +7,7 @@ import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
import com.intellij.psi.PsiDirectory;
import com.jetbrains.python.PythonFileType;
import com.jetbrains.python.pyi.PyiFileType;
/**
* @author yole
@@ -35,7 +22,8 @@ public class CreatePythonFileAction extends CreateFileFromTemplateAction impleme
builder
.setTitle("New Python file")
.addKind("Python file", PythonFileType.INSTANCE.getIcon(), "Python Script")
.addKind("Python unit test", PythonFileType.INSTANCE.getIcon(), "Python Unit Test");
.addKind("Python unit test", PythonFileType.INSTANCE.getIcon(), "Python Unit Test")
.addKind("Python stub", PyiFileType.INSTANCE.getIcon(), "Python Stub");
}
@Override