Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Commit

Permalink
[chore] Misc
Browse files Browse the repository at this point in the history
- remove Maven pom.xml
- renaming
- upgrade mongodb driver to 3.8
  • Loading branch information
dboissier committed Jul 20, 2018
1 parent 3a84c15 commit 2979275
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 300 deletions.
9 changes: 2 additions & 7 deletions .gitignore
@@ -1,12 +1,7 @@
*.iml
*.ipr
*.iws
.classpath
.project
.settings/
target/
classes/
META-INF/
.idea/
.gradle/
build/

.DS_Store
2 changes: 1 addition & 1 deletion build.gradle
Expand Up @@ -56,7 +56,7 @@ repositories {
}

dependencies {
compile 'org.mongodb:mongodb-driver:3.5.0'
compile 'org.mongodb:mongodb-driver:3.8.0'
compile 'commons-lang:commons-lang:2.4'
compile 'commons-io:commons-io:1.4'

Expand Down
286 changes: 0 additions & 286 deletions pom.xml

This file was deleted.

Expand Up @@ -139,7 +139,14 @@ public void addConfiguration(ServerConfiguration serverConfiguration) {
mongoManager.registerServer(mongoServer);
}

public void loadServerConfiguration(final MongoServer mongoServer) {
public void closeServer(MongoServer mongoServer) {
ApplicationManager.getApplication().invokeLater(() -> {
mongoServer.setDatabases(Collections.emptyList());
mongoTreeBuilder.queueUpdateFrom(mongoServer, true);
});
}

public void openServer(final MongoServer mongoServer) {
ProgressManager.getInstance().run(new Task.Backgroundable(project, "Connecting to " + mongoServer.getLabel()) {

@Override
Expand Down Expand Up @@ -247,7 +254,7 @@ protected boolean onDoubleClick(MouseEvent event) {

MongoServer selectedMongoServer = getSelectedServer();
if (selectedMongoServer != null) {
loadServerConfiguration(selectedMongoServer);
openServer(selectedMongoServer);
return true;
}
MongoCollection selectedCollection = getSelectedCollection();
Expand Down
Expand Up @@ -44,8 +44,8 @@ public ConnectDisconnectServerAction(MongoExplorerPanel mongoExplorerPanel) {
@Override
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
MongoServer selectedMongoServer = mongoExplorerPanel.getSelectedServer();
mongoExplorerPanel.loadServerConfiguration(selectedMongoServer);
// mongoExplorerPanel.loadServerConfiguration(selectedMongoServer);
mongoExplorerPanel.openServer(selectedMongoServer);
mongoExplorerPanel.closeServer(selectedMongoServer);
}

@Override
Expand Down
Expand Up @@ -52,7 +52,7 @@ public void actionPerformed(AnActionEvent event) {
return;
}
if (mongoServer.isConnected()) {
mongoExplorerPanel.loadServerConfiguration(mongoServer);
mongoExplorerPanel.openServer(mongoServer);
}
}

Expand Down
Expand Up @@ -44,7 +44,7 @@ public RefreshServerAction(MongoExplorerPanel mongoExplorerPanel) {
@Override
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
MongoServer selectedMongoServer = mongoExplorerPanel.getSelectedServer();
mongoExplorerPanel.loadServerConfiguration(selectedMongoServer);
mongoExplorerPanel.openServer(selectedMongoServer);
}

@Override
Expand Down

0 comments on commit 2979275

Please sign in to comment.