mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
editable paths list for Python interpreter (PY-1201)
This commit is contained in:
@@ -215,7 +215,7 @@ public class SdkEditor implements Configurable, Place.Navigator {
|
||||
else{
|
||||
final SdkModificator sdkModificator = mySdk.getSdkModificator();
|
||||
for (OrderRootType type : myPathEditors.keySet()) {
|
||||
myPathEditors.get(type).reset(sdkModificator.getRoots(type));
|
||||
myPathEditors.get(type).reset(sdkModificator);
|
||||
}
|
||||
sdkModificator.commitChanges();
|
||||
setHomePathValue(mySdk.getHomePath().replace('/', File.separatorChar));
|
||||
|
||||
@@ -38,6 +38,7 @@ import com.intellij.util.Icons;
|
||||
import com.intellij.util.containers.HashSet;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import gnu.trove.TIntArrayList;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.ListSelectionEvent;
|
||||
@@ -121,11 +122,12 @@ public class PathEditor {
|
||||
return roots;
|
||||
}
|
||||
|
||||
public void reset(VirtualFile[] files) {
|
||||
public void reset(@Nullable SdkModificator modificator) {
|
||||
keepSelectionState();
|
||||
clearList();
|
||||
myEnabled = files != null;
|
||||
myEnabled = modificator != null;
|
||||
if(myEnabled){
|
||||
VirtualFile[] files = modificator.getRoots(myOrderRootType);
|
||||
for (VirtualFile file : files) {
|
||||
addElement(file);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user