mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
make groovy project compile, editable compiler excludes configuration
This commit is contained in:
+13
-4
@@ -22,20 +22,21 @@ package com.intellij.openapi.compiler.options;
|
||||
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.vfs.VfsUtil;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.vfs.pointers.VirtualFilePointer;
|
||||
import com.intellij.openapi.vfs.pointers.VirtualFilePointerManager;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class ExcludeEntryDescription implements Disposable {
|
||||
|
||||
private final String myUrl;
|
||||
private final boolean myIsFile;
|
||||
private boolean myIsFile;
|
||||
private boolean myIncludeSubdirectories;
|
||||
private VirtualFilePointer myFilePointer;
|
||||
private final Disposable myParentDisposable;
|
||||
|
||||
public ExcludeEntryDescription(String url, boolean includeSubdirectories, boolean isFile, Disposable parent) {
|
||||
myUrl = url;
|
||||
myParentDisposable = parent;
|
||||
myFilePointer = VirtualFilePointerManager.getInstance().create(url, parent, null);
|
||||
myIncludeSubdirectories = includeSubdirectories;
|
||||
myIsFile = isFile;
|
||||
@@ -49,6 +50,14 @@ public class ExcludeEntryDescription implements Disposable {
|
||||
return new ExcludeEntryDescription(getUrl(), myIncludeSubdirectories, myIsFile,parent);
|
||||
}
|
||||
|
||||
public void setPresentableUrl(String newUrl) {
|
||||
myFilePointer = VirtualFilePointerManager.getInstance().create(VfsUtil.pathToUrl(FileUtil.toSystemIndependentName(newUrl)), myParentDisposable, null);
|
||||
final VirtualFile file = getVirtualFile();
|
||||
if (file != null) {
|
||||
myIsFile = !file.isDirectory();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isFile() {
|
||||
return myIsFile;
|
||||
}
|
||||
|
||||
+9
-4
@@ -241,7 +241,7 @@ public class ExcludedEntriesConfigurable implements UnnamedConfigurable {
|
||||
public Object getValueAt(int row, int col) {
|
||||
ExcludeEntryDescription description = myExcludeEntryDescriptions.get(row);
|
||||
if(col == 0) {
|
||||
return description;
|
||||
return description.getPresentableUrl();
|
||||
}
|
||||
if(col == 1) {
|
||||
if(!description.isFile()) {
|
||||
@@ -260,7 +260,7 @@ public class ExcludedEntriesConfigurable implements UnnamedConfigurable {
|
||||
|
||||
public Class getColumnClass(int c) {
|
||||
if(c == 0) {
|
||||
return Object.class;
|
||||
return String.class;
|
||||
}
|
||||
if(c == 1) {
|
||||
return Boolean.class;
|
||||
@@ -273,12 +273,17 @@ public class ExcludedEntriesConfigurable implements UnnamedConfigurable {
|
||||
ExcludeEntryDescription description = myExcludeEntryDescriptions.get(row);
|
||||
return !description.isFile();
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void setValueAt(Object aValue, int row, int col) {
|
||||
ExcludeEntryDescription description = myExcludeEntryDescriptions.get(row);
|
||||
description.setIncludeSubdirectories(aValue.equals(Boolean.TRUE));
|
||||
if (col == 1) {
|
||||
description.setIncludeSubdirectories(aValue.equals(Boolean.TRUE));
|
||||
} else {
|
||||
final String path = (String)aValue;
|
||||
description.setPresentableUrl(path);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user