Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0ca0f81
commit 0b4033f
Showing
88 changed files
with
867 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
com.mongodb.tools/test/com/mongodb/tools/driver/pagination/StartMongo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.mongodb.tools.driver.pagination; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
|
||
public class StartMongo { | ||
|
||
public static void main(String[] args) { | ||
|
||
File f = new File("D:\\MongoDB\\mongodb-win32-i386-2.0.7-rc0\\bin\\mongo.exe"); | ||
try { | ||
//Process p = Runtime.getRuntime().exec("cmd.exe /c start " + f.toString()); | ||
|
||
|
||
String[] s ={"cmd.exe", "/c", "start", f.toString()}; | ||
Process p = new ProcessBuilder(s).start(); | ||
|
||
Thread.sleep(1000); | ||
p.destroy(); | ||
|
||
} catch (Exception e) { | ||
// TODO Auto-generated catch block | ||
e.printStackTrace(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+3.29 KB
(180%)
fr.opensagres.mongodb.ide.core/bin/fr/opensagres/mongodb/ide/core/model/Database.class
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ output.. = bin/ | |
bin.includes = META-INF/,\ | ||
.,\ | ||
plugin.properties,\ | ||
schema/ | ||
schema/,\ | ||
plugin.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...db.ide.core/src/fr/opensagres/mongodb/ide/core/internal/extensions/CommandExecHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package fr.opensagres.mongodb.ide.core.internal.extensions; | ||
|
||
import java.io.IOException; | ||
|
||
import org.eclipse.core.runtime.Platform; | ||
import org.eclipse.osgi.service.environment.Constants; | ||
|
||
public class CommandExecHelper { | ||
|
||
public static void exec(String command) throws IOException { | ||
String nativeCommand = null; | ||
boolean isWin9xME = false; // see bug 50567 | ||
if (Platform.getOS().equals(Constants.OS_WIN32)) { | ||
String osName = System.getProperty("os.name"); //$NON-NLS-1$ | ||
isWin9xME = osName != null | ||
&& (osName.startsWith("Windows 9") || osName.startsWith("Windows ME")); //$NON-NLS-1$ //$NON-NLS-2$ | ||
if (isWin9xME) { | ||
nativeCommand = "command.com /C start "; //$NON-NLS-1$ | ||
} else { | ||
// Win NT, 2K, XP | ||
nativeCommand = "cmd.exe /C start "; //$NON-NLS-1$ | ||
} | ||
} else if (!Platform.getOS().equals(Constants.OS_UNKNOWN)) { | ||
//nativeCommand = "env"; //$NON-NLS-1$ | ||
// TODO : manage linux shell command etc | ||
} | ||
if (nativeCommand == null) { | ||
return; | ||
} | ||
nativeCommand = nativeCommand + command; //$NON-NLS-1$ | ||
Runtime.getRuntime().exec(nativeCommand); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.