diff --git a/.idea/libraries/gradle_and_groovy_plugin.xml b/.idea/libraries/gradle_and_groovy_plugin.xml new file mode 100644 index 00000000000..d572bda634f --- /dev/null +++ b/.idea/libraries/gradle_and_groovy_plugin.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/idea/idea.iml b/idea/idea.iml index 129a2218252..294e31ab147 100644 --- a/idea/idea.iml +++ b/idea/idea.iml @@ -37,6 +37,7 @@ + diff --git a/idea/src/META-INF/gradle.xml b/idea/src/META-INF/gradle.xml new file mode 100644 index 00000000000..7a03308fedf --- /dev/null +++ b/idea/src/META-INF/gradle.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/idea/src/META-INF/plugin.xml b/idea/src/META-INF/plugin.xml index 7aeeb898dc2..d049e3a1b08 100644 --- a/idea/src/META-INF/plugin.xml +++ b/idea/src/META-INF/plugin.xml @@ -9,6 +9,7 @@ JUnit + JUnit TestNG-J com.intellij.copyright JavaScriptDebugger diff --git a/idea/src/org/jetbrains/jet/plugin/quickfix/ConfigureAndroidGradleProjectNotification.java b/idea/src/org/jetbrains/jet/plugin/quickfix/ConfigureAndroidGradleProjectNotification.java new file mode 100644 index 00000000000..74a14e00f74 --- /dev/null +++ b/idea/src/org/jetbrains/jet/plugin/quickfix/ConfigureAndroidGradleProjectNotification.java @@ -0,0 +1,59 @@ +/* + * Copyright 2010-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 org.jetbrains.jet.plugin.quickfix; + +import com.intellij.openapi.fileEditor.FileEditor; +import com.intellij.openapi.project.Project; +import com.intellij.openapi.util.Key; +import com.intellij.openapi.vfs.VirtualFile; +import com.intellij.psi.PsiFile; +import com.intellij.psi.PsiManager; +import com.intellij.ui.EditorNotificationPanel; +import com.intellij.ui.EditorNotifications; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.plugins.groovy.GroovyFileType; +import org.jetbrains.plugins.groovy.lang.psi.GroovyFile; + +public class ConfigureAndroidGradleProjectNotification extends EditorNotifications.Provider { + private static final Key KEY = Key.create("kotlin.configure.android.gradle.project"); + + private final Project project; + + public ConfigureAndroidGradleProjectNotification(Project project) { + this.project = project; + } + + @Override + @Nullable + public EditorNotificationPanel createNotificationPanel(@NotNull VirtualFile file, @NotNull FileEditor fileEditor) { + if (file.getFileType() != GroovyFileType.GROOVY_FILE_TYPE) return null; + if (!"gradle".equals(file.getExtension())) return null; + + PsiFile psiFile = PsiManager.getInstance(project).findFile(file); + if (!(psiFile instanceof GroovyFile)) return null; + + GroovyFile groovyFile = (GroovyFile) psiFile; + + throw new UnsupportedOperationException(); + } + + @Override + public Key getKey() { + return KEY; + } +}