mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
implemented automatic root detection for javascript libraries to fix exception
This commit is contained in:
+3
-5
@@ -18,7 +18,6 @@ import com.intellij.openapi.roots.OrderRootType;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -38,13 +37,12 @@ public abstract class LibraryRootsComponentDescriptor {
|
||||
|
||||
/**
|
||||
* Provides root detectors for 'Attach Files' button. They will be used to automatically assign {@link OrderRootType}s for selected files.
|
||||
* Also these detectors are used when a new library is created so the list must not be empty.
|
||||
*
|
||||
* @return list of {@link RootDetector}'s implementations
|
||||
* @return non-empty list of {@link RootDetector}'s implementations
|
||||
*/
|
||||
@NotNull
|
||||
public List<? extends RootDetector> getRootDetectors() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
public abstract List<? extends RootDetector> getRootDetectors();
|
||||
|
||||
/**
|
||||
* @return descriptor for the file chooser which will be shown when 'Attach Files' button is pressed
|
||||
|
||||
@@ -31,9 +31,9 @@ import java.util.Collection;
|
||||
* @author nik
|
||||
*/
|
||||
public abstract class RootDetector {
|
||||
private OrderRootType myRootType;
|
||||
private boolean myJarDirectory;
|
||||
private String myPresentableRootTypeName;
|
||||
private final OrderRootType myRootType;
|
||||
private final boolean myJarDirectory;
|
||||
private final String myPresentableRootTypeName;
|
||||
|
||||
protected RootDetector(OrderRootType rootType, boolean jarDirectory, String presentableRootTypeName) {
|
||||
myRootType = rootType;
|
||||
|
||||
Reference in New Issue
Block a user