Don't check whether SDK home path exists on a local disk if it is a remote one
[idea/community.git] / java / idea-ui / src / com / intellij / openapi / projectRoots / ui / SdkEditor.java
index 6c2687978febbaa4c309708d548f65ef466f75e5..d69df85cb95a7718910f251ec543c5f73b3a8d9f 100644 (file)
@@ -290,9 +290,9 @@ public class SdkEditor implements Configurable, Place.Navigator {
   private void setHomePathValue(String absolutePath) {
     myHomeComponent.setText(absolutePath);
     final Color fg;
-    if (absolutePath != null && !absolutePath.isEmpty()) {
+    if (absolutePath != null && !absolutePath.isEmpty() && mySdk != null && mySdk.getSdkType().isLocalSdk(mySdk)) {
       final File homeDir = new File(absolutePath);
-      boolean homeMustBeDirectory = mySdk == null || ((SdkType)mySdk.getSdkType()).getHomeChooserDescriptor().isChooseFolders();
+      boolean homeMustBeDirectory = ((SdkType)mySdk.getSdkType()).getHomeChooserDescriptor().isChooseFolders();
       fg = homeDir.exists() && homeDir.isDirectory() == homeMustBeDirectory
            ? UIUtil.getFieldForegroundColor()
            : PathEditor.INVALID_COLOR;