Skip to content

Commit 34fd534

Browse files
skibishSergey Kovtun
authored and
Sergey Kovtun
committed
Fix string index error (#84)
In new version of intellij `VirtualFile` return directory in some cases. Check for a directory is added. close #82
1 parent ca1056f commit 34fd534

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
id 'idea'
33
id 'java'
4-
id "org.jetbrains.intellij" version "0.1.10"
4+
id "org.jetbrains.intellij" version "0.3.2"
55
id 'net.researchgate.release' version '2.6.0'
66
}
77

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version=2.5.1-SNAPSHOT
22

33
# Intellij SDK
4-
intellijSdkVersion=2017.2.2
4+
intellijSdkVersion=2018.1.4
55

66
# Versions
77
versionJunit=4.12

ui/jetbrains/src/main/java/com/neueda/jetbrains/plugin/graphdb/jetbrains/ui/datasource/interactions/GraphDbEditorsConsoleRootType.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ public String substituteName(@NotNull Project project, @NotNull VirtualFile file
4444
}
4545

4646
private Optional<? extends DataSourceApi> getDataSource(@NotNull Project project, @NotNull VirtualFile file) {
47+
if (file.isDirectory()) {
48+
return Optional.empty();
49+
}
50+
4751
DataSourcesComponent component = project.getComponent(DataSourcesComponent.class);
4852
return component.getDataSourceContainer()
4953
.findDataSource(NameUtil.extractDataSourceUUID(file.getName()));

0 commit comments

Comments
 (0)