|
| 1 | +/* |
| 2 | + * Copyright 2013-2015 Sergey Ignatov, Alexander Zolotov, Florin Patan |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | +package com.goide; |
| 18 | + |
| 19 | +import com.intellij.facet.ui.ValidationResult; |
| 20 | +import com.intellij.openapi.module.Module; |
| 21 | +import com.intellij.openapi.progress.ProcessCanceledException; |
| 22 | +import com.intellij.openapi.project.Project; |
| 23 | +import com.intellij.openapi.vfs.VirtualFile; |
| 24 | +import com.intellij.platform.DirectoryProjectGenerator; |
| 25 | +import org.jetbrains.annotations.Nls; |
| 26 | +import org.jetbrains.annotations.NotNull; |
| 27 | +import org.jetbrains.annotations.Nullable; |
| 28 | + |
| 29 | +import javax.swing.*; |
| 30 | + |
| 31 | +public class GoProjectGenerator implements DirectoryProjectGenerator { |
| 32 | + @Nls |
| 33 | + @NotNull |
| 34 | + @Override |
| 35 | + public String getName() { |
| 36 | + return "Go"; |
| 37 | + } |
| 38 | + |
| 39 | + @Nullable |
| 40 | + @Override |
| 41 | + public Object showGenerationSettings(VirtualFile baseDir) throws ProcessCanceledException { |
| 42 | + return null; |
| 43 | + } |
| 44 | + |
| 45 | + @Nullable |
| 46 | + @Override |
| 47 | + public Icon getLogo() { |
| 48 | + return GoIcons.ICON; |
| 49 | + } |
| 50 | + |
| 51 | + @Override |
| 52 | + public void generateProject(@NotNull Project project, @NotNull VirtualFile baseDir, @Nullable Object settings, @NotNull Module module) { |
| 53 | + |
| 54 | + } |
| 55 | + |
| 56 | + @NotNull |
| 57 | + @Override |
| 58 | + public ValidationResult validate(@NotNull String baseDirPath) { |
| 59 | + return ValidationResult.OK; |
| 60 | + } |
| 61 | +} |
0 commit comments