Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadelessFox committed Oct 20, 2023
1 parent be59a4d commit 3ec0880
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import io.cloudbeaver.service.rm.nio.RMNIOFileSystemProvider;
import org.jkiss.code.NotNull;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.model.DBPImage;
import org.jkiss.dbeaver.model.fs.DBFFileSystemProvider;
import org.jkiss.dbeaver.model.fs.DBFVirtualFileSystem;
import org.jkiss.dbeaver.model.fs.DBFVirtualFileSystemRoot;
import org.jkiss.dbeaver.model.rm.RMController;
Expand All @@ -30,15 +30,24 @@
import java.nio.file.Path;

public class RMVirtualFileSystem implements DBFVirtualFileSystem {
private final RMVirtualFileSystemProvider provider;

@NotNull
private final RMNIOFileSystemProvider rmNioFileSystemProvider;

@NotNull
private final RMProject rmProject;

public RMVirtualFileSystem(@NotNull RMController rmController, @NotNull RMProject rmProject) {
this.rmNioFileSystemProvider = new RMNIOFileSystemProvider(rmController);
this.rmProject = rmProject;
public RMVirtualFileSystem(@NotNull RMVirtualFileSystemProvider provider, @NotNull RMController controller, @NotNull RMProject project) {
this.provider = provider;
this.rmNioFileSystemProvider = new RMNIOFileSystemProvider(controller);
this.rmProject = project;
}

@NotNull
@Override
public DBFFileSystemProvider getProvider() {
return provider;
}

@NotNull
Expand All @@ -58,11 +67,6 @@ public String getDescription() {
return "Resource Manager file system";
}

@Override
public DBPImage getIcon() {
return null;
}

@NotNull
@Override
public String getId() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@
public class RMVirtualFileSystemProvider implements DBFFileSystemProvider {
private static final Log log = Log.getLog(RMVirtualFileSystemProvider.class);

@NotNull
@Override
public String getId() {
return "rm-nio";
}

@Override
public DBFVirtualFileSystem[] getAvailableFileSystems(
@NotNull DBRProgressMonitor monitor,
Expand Down

0 comments on commit 3ec0880

Please sign in to comment.