mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Cleanup (obsolete OS constant)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -467,7 +467,7 @@ public class VfsUtilCore {
|
||||
throw new RuntimeException(new IOException(VfsBundle.message("url.parse.error", url.toExternalForm())));
|
||||
}
|
||||
}
|
||||
if (SystemInfo.isWindows || SystemInfo.isOS2) {
|
||||
if (SystemInfo.isWindows) {
|
||||
while (!path.isEmpty() && path.charAt(0) == '/') {
|
||||
path = path.substring(1, path.length());
|
||||
}
|
||||
|
||||
+3
-4
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -72,14 +72,13 @@ public abstract class LocalFileSystemBase extends LocalFileSystem {
|
||||
|
||||
@Override
|
||||
public VirtualFile findFileByIoFile(@NotNull File file) {
|
||||
String path = FileUtil.toSystemIndependentName(file.getAbsolutePath());
|
||||
return findFileByPath(path);
|
||||
return findFileByPath(FileUtil.toSystemIndependentName(file.getAbsolutePath()));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected static File convertToIOFile(@NotNull final VirtualFile file) {
|
||||
String path = file.getPath();
|
||||
if (StringUtil.endsWithChar(path, ':') && path.length() == 2 && (SystemInfo.isWindows || SystemInfo.isOS2)) {
|
||||
if (StringUtil.endsWithChar(path, ':') && path.length() == 2 && SystemInfo.isWindows) {
|
||||
path += "/"; // Make 'c:' resolve to a root directory for drive c:, not the current directory on that drive
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 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.
|
||||
@@ -29,13 +29,17 @@ public class SystemInfoRt {
|
||||
|
||||
private static final String _OS_NAME = OS_NAME.toLowerCase(Locale.US);
|
||||
public static final boolean isWindows = _OS_NAME.startsWith("windows");
|
||||
public static final boolean isOS2 = _OS_NAME.startsWith("os/2") || _OS_NAME.startsWith("os2");
|
||||
public static final boolean isMac = _OS_NAME.startsWith("mac");
|
||||
public static final boolean isLinux = _OS_NAME.startsWith("linux");
|
||||
public static final boolean isFreeBSD = _OS_NAME.startsWith("freebsd");
|
||||
public static final boolean isSolaris = _OS_NAME.startsWith("sunos");
|
||||
public static final boolean isUnix = !isWindows && !isOS2;
|
||||
public static final boolean isUnix = !isWindows;
|
||||
|
||||
public static final boolean isFileSystemCaseSensitive =
|
||||
isUnix && !isMac || "true".equalsIgnoreCase(System.getProperty("idea.case.sensitive.fs"));
|
||||
|
||||
//<editor-fold desc="Deprecated stuff.">
|
||||
/** @deprecated outdated (to be removed in IDEA 2018) */
|
||||
public static final boolean isOS2 = _OS_NAME.startsWith("os/2") || _OS_NAME.startsWith("os2");
|
||||
//</editor-fold>
|
||||
}
|
||||
@@ -37,7 +37,6 @@ public class SystemInfo extends SystemInfoRt {
|
||||
|
||||
public static final boolean isWindows = SystemInfoRt.isWindows;
|
||||
public static final boolean isMac = SystemInfoRt.isMac;
|
||||
public static final boolean isOS2 = SystemInfoRt.isOS2;
|
||||
public static final boolean isLinux = SystemInfoRt.isLinux;
|
||||
public static final boolean isFreeBSD = SystemInfoRt.isFreeBSD;
|
||||
public static final boolean isSolaris = SystemInfoRt.isSolaris;
|
||||
@@ -238,5 +237,8 @@ public class SystemInfo extends SystemInfoRt {
|
||||
public static String getUnixReleaseVersion() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/** @deprecated outdated (to be removed in IDEA 2018) */
|
||||
public static final boolean isOS2 = SystemInfoRt.isOS2;
|
||||
//</editor-fold>
|
||||
}
|
||||
@@ -99,7 +99,7 @@ public class BuildoutFacet extends LibraryContributingFacet<BuildoutFacetConfigu
|
||||
bin.refresh(false, false);
|
||||
}
|
||||
final String exe;
|
||||
if (SystemInfo.isWindows || SystemInfo.isOS2) {
|
||||
if (SystemInfo.isWindows) {
|
||||
exe = "buildout.exe";
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -375,7 +375,7 @@ public final class PythonSdkType extends SdkType {
|
||||
*/
|
||||
@Nullable
|
||||
public static File findExecutableFile(File parent, String name) {
|
||||
if (SystemInfo.isWindows || SystemInfo.isOS2) {
|
||||
if (SystemInfo.isWindows) {
|
||||
for (String suffix : WINDOWS_EXECUTABLE_SUFFIXES) {
|
||||
File file = new File(parent, name + "." + suffix);
|
||||
if (file.exists()) return file;
|
||||
|
||||
Reference in New Issue
Block a user