This commit is contained in:
Roman Shevchenko
2012-02-12 23:50:21 +01:00
parent eab21370af
commit ef6736554a
3 changed files with 11 additions and 10 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2010 JetBrains s.r.o.
* Copyright 2000-2012 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.
@@ -18,7 +18,7 @@ package com.intellij.codeInsight.intention.impl;
import com.intellij.codeInsight.CodeInsightBundle;
import com.intellij.codeInsight.intention.PsiElementBaseIntentionAction;
import com.intellij.javaee.ExternalResourceManager;
import com.intellij.lang.StdLanguages;
import com.intellij.lang.java.JavaLanguage;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.project.Project;
@@ -50,7 +50,7 @@ public class ConvertToBasicLatinAction extends PsiElementBaseIntentionAction {
@Override
public boolean isAvailable(@NotNull final Project project, final Editor editor, @NotNull final PsiElement element) {
if (!element.getLanguage().isKindOf(StdLanguages.JAVA)) return false;
if (!element.getLanguage().isKindOf(JavaLanguage.INSTANCE)) return false;
final Pair<PsiElement, Handler> pair = findHandler(element);
if (pair == null) return false;
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2010 JetBrains s.r.o.
* Copyright 2000-2012 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.
@@ -18,7 +18,7 @@ package com.intellij.codeInsight.intention;
import com.intellij.JavaTestUtil;
import com.intellij.codeInsight.CodeInsightBundle;
import com.intellij.openapi.vfs.encoding.EncodingProjectManager;
import com.intellij.openapi.vfs.encoding.EncodingManager;
import com.intellij.testFramework.fixtures.CodeInsightTestUtil;
import com.intellij.testFramework.fixtures.JavaCodeInsightFixtureTestCase;
@@ -30,7 +30,7 @@ public class ConvertToBasicLatinTest extends JavaCodeInsightFixtureTestCase {
public void setUp() throws Exception {
super.setUp();
myIntention = CodeInsightBundle.message("intention.convert.to.basic.latin");
EncodingProjectManager.getInstance().setDefaultCharsetName("UTF-8");
EncodingManager.getInstance().setDefaultCharsetName("UTF-8");
}
public void testConvertCharLiteral() throws Exception {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2012 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.
@@ -20,12 +20,14 @@ import com.intellij.openapi.fileTypes.FileTypes;
/**
* Defines the standard languages supported by IDEA.
*
* @author max
*/
public class StdLanguages {
/**
* The definition for the Java language.
* @deprecated use JavaLanguage.INSTANCE instead
*
* @deprecated use {@linkplain com.intellij.lang.java.JavaLanguage#INSTANCE} instead.
*/
public static Language JAVA = StdFileTypes.JAVA.getLanguage();
@@ -80,6 +82,5 @@ public class StdLanguages {
@Deprecated
public static Language CSS;
private StdLanguages() {
}
private StdLanguages() { }
}