Nodeclipse / nodeclipse

Nodeclipse-1 : Eclipse plugin for Node.js, PhantomJS development (Nodeclipse core plugin); Maven and Gradle (with Android) plugins
https://nodeclipse.github.io/
158 stars 78 forks source link

mongo shell integration - console prompt #112

Open ghost opened 10 years ago

ghost commented 10 years ago

Getting a connection to default mongod from running a dummy JS file as _MongoDB Shell Javascript_, a console view is opening and we can intereact with the database instance from this shell prompt.

Actually there is no such a prompt: you just type in the console next empty line.

Sounds like a minor issue but it's not as the mongo shell is handling multi-lines statement like this one:

MongoDB shell version: 2.4.8 connecting to: test > var t = { ... a:1, ... b:1 ... } > t { "a" : 1, "b" : 1 } >

Trying the same from nodeclipse IDE there is the output:

MongoDB shell version: 2.4.8 connecting to: test type "help" for help var t = { a:1, b:1 } t { "a" : 1, "b" : 1 }

Nothing is telling you are editing a multilines statement (mongo shell use ellipsis ...) or even prompt you for input.

You can customize a mongo shell prompt using a .mongorc.js file: following a similar pattern, it would be nice if we could customize the shell prompt in nodeclipse...

paulvi commented 10 years ago

Actually the same mongo process is running here, so .mongorc.js is to be applied.

@nodeleaf An issue should be solvable issue, so let's say this one is about missing '>' and '...'

ghost commented 10 years ago

Yes but not only: where the prompt is in current console would be nice too...

angelozerr commented 9 years ago

I think we could provide completion for MongoDB with tern.java.

For instance

conn = new Mongo();
db = conn. // Ctrl+Space shows completion getDB, etc

tern.java can be used outside JSDT (just with a simple SWT Text, completion can work), so with Console View I think we can do that

paulvi commented 9 years ago

Yes, I think tern nature should be added by default into new projects (so that if user has tern IDE install it would give suggestions) ... I have not tried yet.

paulvi commented 9 years ago

Reminder: this is issue about Mongo Shell, not Mongo

related https://github.com/angelozerr/tern.java/issues/155 and https://github.com/angelozerr/tern.java/issues/144