Moved "Copy as Diagnostic Test" to Tools -> Kotlin.
Renamed class and done some cleanup.
This commit is contained in:
@@ -66,11 +66,6 @@
|
||||
<keyboard-shortcut keymap="Mac OS X" first-keystroke="control shift T"/>
|
||||
<add-to-group group-id="CodeMenu" anchor="last"/>
|
||||
</action>
|
||||
<action id="CopyAsDiagnosticTest" class="org.jetbrains.jet.plugin.actions.CopyAsDiagnosticTestAction"
|
||||
text="Copy Current File As Diagnostic Test">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="control alt shift T"/>
|
||||
<add-to-group group-id="CodeMenu" anchor="last"/>
|
||||
</action>
|
||||
<action id="ConvertJavaToKotlin" class="org.jetbrains.jet.plugin.actions.JavaToKotlinAction"
|
||||
text="Convert Java File to Kotlin File">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="control alt shift J"/>
|
||||
@@ -102,6 +97,12 @@
|
||||
<add-to-group group-id="IntroduceActionsGroup" anchor="after" relative-to-action="ExtractMethod"/>
|
||||
</action>
|
||||
|
||||
<action id="CopyAsDiagnosticTest" class="org.jetbrains.jet.plugin.actions.internal.CopyAsDiagnosticTestAction"
|
||||
text="Copy Current File As Diagnostic Test">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="control alt shift T"/>
|
||||
<add-to-group group-id="KotlinToolsGroup" anchor="last"/>
|
||||
</action>
|
||||
|
||||
<action id="ExtractFunctionToScope" class="org.jetbrains.jet.plugin.refactoring.extractFunction.ExtractFunctionToScopeAction"
|
||||
text="Extract Function to _Scope...">
|
||||
<keyboard-shortcut keymap="$default" first-keystroke="control alt shift M"/>
|
||||
|
||||
+6
-9
@@ -14,12 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.plugin.actions;
|
||||
package org.jetbrains.jet.plugin.actions.internal;
|
||||
|
||||
import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.actionSystem.LangDataKeys;
|
||||
import com.intellij.openapi.actionSystem.PlatformDataKeys;
|
||||
import com.intellij.openapi.actionSystem.*;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.psi.PsiFile;
|
||||
@@ -39,8 +36,8 @@ import java.util.List;
|
||||
public class CopyAsDiagnosticTestAction extends AnAction {
|
||||
@Override
|
||||
public void actionPerformed(AnActionEvent e) {
|
||||
Editor editor = e.getData(PlatformDataKeys.EDITOR);
|
||||
PsiFile psiFile = e.getData(LangDataKeys.PSI_FILE);
|
||||
Editor editor = e.getData(CommonDataKeys.EDITOR);
|
||||
PsiFile psiFile = e.getData(CommonDataKeys.PSI_FILE);
|
||||
assert editor != null && psiFile != null;
|
||||
|
||||
BindingContext bindingContext = ResolvePackage.getBindingContext((JetFile) psiFile);
|
||||
@@ -58,8 +55,8 @@ public class CopyAsDiagnosticTestAction extends AnAction {
|
||||
|
||||
@Override
|
||||
public void update(AnActionEvent e) {
|
||||
Editor editor = e.getData(PlatformDataKeys.EDITOR);
|
||||
PsiFile psiFile = e.getData(LangDataKeys.PSI_FILE);
|
||||
Editor editor = e.getData(CommonDataKeys.EDITOR);
|
||||
PsiFile psiFile = e.getData(CommonDataKeys.PSI_FILE);
|
||||
e.getPresentation().setEnabled(editor != null && psiFile instanceof JetFile && ApplicationManager.getApplication().isInternal());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user