diff --git a/java/jsp-base-openapi/src/com/intellij/psi/jsp/BaseJspFile.java b/java/jsp-base-openapi/src/com/intellij/psi/jsp/BaseJspFile.java index 2327d9b7ad54..08e182bfc842 100644 --- a/java/jsp-base-openapi/src/com/intellij/psi/jsp/BaseJspFile.java +++ b/java/jsp-base-openapi/src/com/intellij/psi/jsp/BaseJspFile.java @@ -32,7 +32,7 @@ public interface BaseJspFile extends XmlFile { boolean isTagPage(); XmlTag[] getDirectiveTags(JspDirectiveKind directiveKind, final boolean searchInIncludes); - XmlTag createDirective(XmlTag context, JspDirectiveKind page); + XmlTag createDirective(XmlTag context, JspDirectiveKind directiveKind); PsiFile getBaseLanguageRoot(); /** @@ -43,4 +43,4 @@ public interface BaseJspFile extends XmlFile { @NotNull JspxFileViewProvider getViewProvider(); -} \ No newline at end of file +} diff --git a/platform/platform-api/src/com/intellij/openapi/vfs/VfsUtil.java b/platform/platform-api/src/com/intellij/openapi/vfs/VfsUtil.java index 8ed063a63bbf..a76d0a3738a5 100644 --- a/platform/platform-api/src/com/intellij/openapi/vfs/VfsUtil.java +++ b/platform/platform-api/src/com/intellij/openapi/vfs/VfsUtil.java @@ -658,8 +658,8 @@ public class VfsUtil { } @Nullable - public static VirtualFile createDirectoryIfMissing(@NotNull String dir) throws IOException { - return doCreateDirectoriesIfMissing(FileUtil.toSystemIndependentName(dir)); + public static VirtualFile createDirectoryIfMissing(@NotNull String directoryPath) throws IOException { + return doCreateDirectoriesIfMissing(FileUtil.toSystemIndependentName(directoryPath)); } private static VirtualFile doCreateDirectoriesIfMissing(String dir) throws IOException { diff --git a/platform/testFramework/src/com/intellij/testFramework/fixtures/CodeInsightFixtureTestCase.java b/platform/testFramework/src/com/intellij/testFramework/fixtures/CodeInsightFixtureTestCase.java index d08ecca169ef..4f7371286685 100644 --- a/platform/testFramework/src/com/intellij/testFramework/fixtures/CodeInsightFixtureTestCase.java +++ b/platform/testFramework/src/com/intellij/testFramework/fixtures/CodeInsightFixtureTestCase.java @@ -19,6 +19,7 @@ import com.intellij.openapi.application.PathManager; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.module.Module; import com.intellij.openapi.project.Project; +import com.intellij.psi.PsiFile; import com.intellij.testFramework.UsefulTestCase; import com.intellij.testFramework.builders.EmptyModuleFixtureBuilder; import org.jetbrains.annotations.NonNls; @@ -83,4 +84,8 @@ public abstract class CodeInsightFixtureTestCase extends UsefulTestCase { protected Editor getEditor() { return myFixture.getEditor(); } + + protected PsiFile getFile() { + return myFixture.getFile(); + } } diff --git a/platform/testFramework/src/com/intellij/testFramework/fixtures/impl/CodeInsightTestFixtureImpl.java b/platform/testFramework/src/com/intellij/testFramework/fixtures/impl/CodeInsightTestFixtureImpl.java index 07b303e3a8b9..51826773cf31 100644 --- a/platform/testFramework/src/com/intellij/testFramework/fixtures/impl/CodeInsightTestFixtureImpl.java +++ b/platform/testFramework/src/com/intellij/testFramework/fixtures/impl/CodeInsightTestFixtureImpl.java @@ -185,7 +185,7 @@ public class CodeInsightTestFixtureImpl extends BaseFixture implements CodeInsig FileUtil.copy(fromFile, destFile); } catch (IOException e) { - throw new RuntimeException(e); + throw new RuntimeException("Cannot copy " + fromFile + " to " + destFile, e); } } } diff --git a/xml/impl/src/com/intellij/xml/util/XmlUtil.java b/xml/impl/src/com/intellij/xml/util/XmlUtil.java index 3e803752e185..5d7e3834e6c3 100644 --- a/xml/impl/src/com/intellij/xml/util/XmlUtil.java +++ b/xml/impl/src/com/intellij/xml/util/XmlUtil.java @@ -190,12 +190,17 @@ public class XmlUtil { return null; } - @Nullable - public static String findNamespacePrefixByURI(XmlFile file, @NonNls String uri) { + @SuppressWarnings({"ConstantConditions"}) + public static XmlTag getRootTag(XmlFile file) { if (file == null) return null; final XmlDocument document = file.getDocument(); if (document == null) return null; - final XmlTag tag = document.getRootTag(); + return document.getRootTag(); + } + + @Nullable + public static String findNamespacePrefixByURI(XmlFile file, @NonNls String uri) { + final XmlTag tag = getRootTag(file); if (tag == null) return null; for (XmlAttribute attribute : tag.getAttributes()) {