webterminal icon indicating copy to clipboard operation
webterminal copied to clipboard

Add man comand to show the documentation for the method

Open evshvarov opened this issue 9 years ago • 9 comments

Sometimes you don't know exactly what classmethod does. it would be great to introduce man command to get the following:

USER> man ##class(Class.Name).Method() /// it is very valuable method, it has the following params... bla-bla

So this command will show all the /// lines before the method in the class's code

evshvarov avatar Jan 27 '17 20:01 evshvarov

man class method or man class:method

man class to show class docs

eduard93 avatar Jan 28 '17 08:01 eduard93

@ChaosGreyder: добавьте еще туда в вывод FormalSpec из CompiledMethod

eduard93 avatar Jan 28 '17 08:01 eduard93

I think it makes sense to create "full-featured autocomplete with suggestions" here.

Like the following: when you have some autocomplete variant (class, method, etc), or when you have the method name typed, WebTerminal will show a hint consisting of the comment/docs (if there are ones). Showing the formal spec is possible too! I will try to design this as best as possible.

Wow, so much feedback and things to do, thanks!

nikitaeverywhere avatar Jan 28 '17 10:01 nikitaeverywhere

@ZitRos man should be a separate command, cause sometimes you need thorough documentation and formalspec info for the class, methods, params, and once you use the method it 100-500 times in a day you don't care of any formal spec already.

evshvarov avatar Jan 30 '17 14:01 evshvarov

@evshvarov, why not just to type the code and get hints? As for the man command you suggest, you need also to type the names. Why not to make it elegant? The hont will appear with little delay so it won't disturb the user from every-day purposes. The functionality you describe is covered by documentation as well.

nikitaeverywhere avatar Jan 30 '17 22:01 nikitaeverywhere

Yes, it's a kind of a "call to documentation". How can you see the documentation of a non-system class which cannot be shown in docs.intersystems.com? The man command can provide an answer for "I forgot the params of the method and I forgot what exactly method does, can I see this info?" And man can print a story of documentation placed in /// before the method (it can be long). Delayed hints can help, but what I dislike that I don't need this info every time, and that I should wait for the delay.

On Tue, Jan 31, 2017 at 1:02 AM, Nikita [email protected] wrote:

@evshvarov https://github.com/evshvarov, why not just to type the code and get hints? As for the man command you suggest, you need also to type the names. Why not to make it elegant? The hont will appear with little delay so it won't disturb the user from every-day purposes. The functionality you describe is covered by documentation as well.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/intersystems-ru/webterminal/issues/88#issuecomment-276206136, or mute the thread https://github.com/notifications/unsubscribe-auth/ACpyP_8zd4M7wSD0PkljrkEx8O0aDyc1ks5rXl4LgaJpZM4LwLCC .

evshvarov avatar Jan 31 '17 07:01 evshvarov

How can you see the documentation of a non-system class which cannot be shown in docs.intersystems.com?

Caché always has local documentation in it, isn't it?

I agree with the info you need to see each time. How about to add the little (i) icon when hovering over methods/classes in input? And once you press this button, the hint with documentation will appear. I will try to make the best implementation for this!

nikitaeverywhere avatar Jan 31 '17 15:01 nikitaeverywhere

Caché always has local documentation in it, isn't it?

Yes, but it needs the appropriate rights on this server. And usually, doc namespace is closed on a production site.

I agree with the info you need to see each time. How about to add the little (i) icon when hovering over methods/classes in input? And once you press this button, the hint with documentation will appear. I will try to make the best implementation for this!

How about man command? I would prefer separate command if and when I want some documentation.

On Tue, Jan 31, 2017 at 6:51 PM, Nikita [email protected] wrote:

How can you see the documentation of a non-system class which cannot be shown in docs.intersystems.com?

Caché always has local documentation in it, isn't it?

I agree with the info you need to see each time. How about to add the little (i) icon when hovering over methods/classes in input? And once you press this button, the hint with documentation will appear. I will try to make the best implementation for this!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/intersystems-ru/webterminal/issues/88#issuecomment-276401936, or mute the thread https://github.com/notifications/unsubscribe-auth/ACpyP3L2UO1Hm2zvRU23rLL1URXhkfLFks5rX1hygaJpZM4LwLCC .

evshvarov avatar Jan 31 '17 16:01 evshvarov

OK. I will make this, but I will definitely think about making cool suggestions with formal spec, class/classMembers docs, etc.

nikitaeverywhere avatar Jan 31 '17 19:01 nikitaeverywhere