diff --git a/platform/annotations/src/org/intellij/lang/annotations/MagicConstant.java b/platform/annotations/src/org/intellij/lang/annotations/MagicConstant.java index 0bce553f718b..93f11fb116e5 100644 --- a/platform/annotations/src/org/intellij/lang/annotations/MagicConstant.java +++ b/platform/annotations/src/org/intellij/lang/annotations/MagicConstant.java @@ -18,7 +18,7 @@ package org.intellij.lang.annotations; import java.lang.annotation.*; /** - *
This annotation indended to help IDEA to detect and auto-complete int and String constants used as an enumeration. + *
This annotation intended to help IDEA to detect and auto-complete int and String constants used as an enumeration.
* For example, in the {@link java.awt.Label#Label(String, int)} constructor the alignment parameter can be one of the following
* int constants: {@link java.awt.Label#LEFT}, {@link java.awt.Label#CENTER} or {@link java.awt.Label#RIGHT}
*
diff --git a/platform/platform-api/src/com/intellij/openapi/vfs/newvfs/NewVirtualFile.java b/platform/platform-api/src/com/intellij/openapi/vfs/newvfs/NewVirtualFile.java
index 8c1807ce7904..0e965474ddc6 100644
--- a/platform/platform-api/src/com/intellij/openapi/vfs/newvfs/NewVirtualFile.java
+++ b/platform/platform-api/src/com/intellij/openapi/vfs/newvfs/NewVirtualFile.java
@@ -134,11 +134,11 @@ public abstract class NewVirtualFile extends VirtualFile implements VirtualFileW
@NotNull
public abstract Collectionfile.
* This method can be performed only for files which are in local file system.
- * @param file file which read-only attribute to be changed.
+ *
+ * @param file file which read-only attribute to be changed.
* @param readOnlyStatus new read-only status.
- * @throws java.lang.IllegalArgumentException if passed file doesn't
- * belong to the local file system.
- * @throws IOException if some IOExecption occurred.
+ * @throws java.lang.IllegalArgumentException
+ * if passed file doesn't
+ * belong to the local file system.
+ * @throws IOException if some IOException occurred.
*/
public static void setReadOnlyAttribute(VirtualFile file, boolean readOnlyStatus) throws IOException {
if (file.getFileSystem().isReadOnly()) {
- throw new IllegalArgumentException("Wrong file system: "+file.getFileSystem());
+ throw new IllegalArgumentException("Wrong file system: " + file.getFileSystem());
}
- if(file.isWritable()==!readOnlyStatus){
+ if (file.isWritable() == !readOnlyStatus) {
return;
}
diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/impl/FakeVirtualFile.java b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/impl/FakeVirtualFile.java
index bef2a72fb044..8399f668020b 100644
--- a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/impl/FakeVirtualFile.java
+++ b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/impl/FakeVirtualFile.java
@@ -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.
@@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
-/*
- * @author max
- */
package com.intellij.openapi.vfs.newvfs.impl;
+import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.VirtualFile;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.NonNls;
+/**
+ * @author max
+ */
public class FakeVirtualFile extends StubVirtualFile {
private final VirtualFile myParent;
private final String myName;
@@ -42,8 +42,7 @@ public class FakeVirtualFile extends StubVirtualFile {
@Override
public String getPath() {
final String basePath = myParent.getPath();
- if (basePath.endsWith("/")) return basePath + myName;
- return basePath + '/' + myName;
+ return StringUtil.endsWithChar(basePath, '/') ? basePath + myName : basePath + '/' + myName;
}
@Override