Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

completion inside Eclipse Console #155

Open
paulvi opened this issue Oct 17, 2014 · 16 comments
Open

completion inside Eclipse Console #155

paulvi opened this issue Oct 17, 2014 · 16 comments

Comments

@paulvi
Copy link
Contributor

paulvi commented Oct 17, 2014

Started in #144 (comment)

but it is more general issue.

Examples

also in Bug 447206 - [TERMINALS] API for line completion suggestions
using TCF-Terminal may be overkill.
On the other hand it would provide completion while working on remote server.

@angelozerr
Copy link
Owner

@paulvi @nodeleaf this issue is very interesting to develop, but is it really interesting for mongodb users?

I would like to avoid developping something that nobody will use.

@ghost
Copy link

ghost commented Dec 3, 2014

For myself I don't think I would ever use auto-completion in a shell - but a mongo-shell integrated in IDE: oh YES

@angelozerr
Copy link
Owner

Ok, the first thing is to develop a tern plugin for mongo. I have started that https://github.com/angelozerr/tern-mongo-shell

I'm experimenting to have completion for

db. // here Ctrl+Space shows methods of db + collection names

@ghost
Copy link

ghost commented Dec 3, 2014

How could I help?

@angelozerr
Copy link
Owner

How could I help?

There are 3 tasks for that :

  • write the JSON Type Definition. You could do that
  • experiment db. to retrieve collection names (I can do that)
  • integrate this tern plugin inside console eclipse

@ghost
Copy link

ghost commented Dec 3, 2014

@angelozerr

write the JSON Type Definition. You could do that

Can't start this before next week: can you wait that long?

@angelozerr
Copy link
Owner

Can't start this before next week: can you wait that long?

yes sure:) I'm very busy with other task (I'm experimenting tern validation builder inside Eclipse)

paulvi pushed a commit to Nodeclipse/nodeclipse that referenced this issue Dec 4, 2014
paulvi pushed a commit to paulvi/tern-mongo-shell that referenced this issue Dec 4, 2014
angelozerr added a commit to angelozerr/tern-mongo-shell that referenced this issue Dec 4, 2014
@paulvi
Copy link
Contributor Author

paulvi commented Dec 4, 2014

this issue is very interesting to develop, but is it really interesting for mongodb users?

well Nodeclipse MongoDB shell plugins exists about a year,
and @nodeleaf is the only user who has commented on it.

Patrick, have you started using TCF-terminals? You can launch shell within it (for local or remote server).

See Bug 447206 - [TERMINALS] API for line completion suggestions

@ghost
Copy link

ghost commented Dec 5, 2014

@paulvi first of all - in my understanding Nodeclipse Mongo shell integration is not a shell but "integration": in short it runs a mongodb script file like it was sent to the mongo shell - but there is no interactive shell like V8 based mongo shell. Last of all - I learned a little bit about TCF after you mentionned it but just don't see how I could install it as a plugin in Nodeclipse.

@paulvi
Copy link
Contributor Author

paulvi commented Dec 9, 2014

in short it runs a mongodb script file like it was sent to the mongo shell - but there is no interactive shell like V8 based mongo shell.

It may be now, but it is software and is extensible.
The point is does anybody really needs the feature
(that they+we spend time on it)

don't see how I could install it as a plugin in Nodeclipse.

see http://www.nodeclipse.org/enide/studio/2014/

Recommended install via drag-and-drop of install button on Eclipse main toolbar.

This way you get Nodeclipse, Tern and TCF-Terminals.

Please update this issue after trying for a while.

@ghost
Copy link

ghost commented Dec 10, 2014

@paulvi Got it installed from http://www.nodeclipse.org/updates/ and tried its SSH connections to localhost and a remote server: works like a charm. I know this is not the place to express wishes but it would be nice if it had the options to save passwords and to auto connect after Eclipse was launched: am I too lazy? More importantly I just don't see how a tern plugin could add mongo shell completion here as this is about a javascript shell within a terminal shell within an IDE view, etc - but may be you could explain?

@angelozerr
Copy link
Owner

this is about a javascript shell within a terminal shell within an IDE view, etc - but may be you could explain?

I don't know very well, but it seems that console eclipse is able to support compeltion :

@paulvi
Copy link
Contributor Author

paulvi commented Dec 11, 2014

I know this is not the place to express wishes

http://marketplace.eclipse.org/content/tcf-terminals has all links

Just raise bug on Eclipse Bugzilla against TCF
like https://bugs.eclipse.org/bugs/show_bug.cgi?id=435014

Are read/comment Bug 447206 - [TERMINALS] API for line completion suggestions

While completion inside console may be cool,
having completion while working on remote server is even cooler

@ghost
Copy link

ghost commented Dec 11, 2014

@angelozerr I've git cloned the tern-mongo-shell project and tried to figure out where yo start from by running the mongo-shell demo but I am a little bit confused...

Reading mongo shell documentation from here: http://docs.mongodb.org/manual/reference/method/ I can foresee how database method could be scripted for tern - but this is far less obvious for collection methods where the collection name vary - or when we dot chain methods like in:

db.collection.find().limit(5).sort( { key: -1 } ).pretty()

Last but not least there is much more that db and db.collection commands in mongo shell like cursor, rs, sh command sets - etc - this is a lot of work don't you think? Considering I was the only user interested in this...

@angelozerr
Copy link
Owner

collection methods where the collection name vary

Yes I know, and it was my study. If you see https://github.com/angelozerr/tern-mongo-shell/blob/master/mongo-shell.js#L45 I load collection (with mongodb native driver), but it should improve that.

Considering I was the only user interested in this...

I'm very busy for the moment with other tern topics, so I will do that after.

@paulvi
Copy link
Contributor Author

paulvi commented Dec 12, 2014

This issue is for completion inside console
MongoShell is #144

please keep it clear

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants