I want to develop an extension functionality where user can request a type of given expression by a pressing a combination of keys instead of just hovering.
The key moment here is that when the same combination is pressed again, I want to increase the scope of selection and show the type of the "bigger" block, etc.
I have the functionality ready in my language client, so I have a command and receive the response. I can also decorate the expression I want to display type for, this works well.
But how do I implement triggering hover-like tooltip to actually show the type?
Related
In the Actions Console one can specify a NO_Match when a user's response does not match an existing parameter. But that NO_MATCH does not provide a transition to another scene. When the user input is not recognized, I want to return to the start of the conversation and start over. How can I do that?
It does seem odd that the only transition that NO_MATCH supports in the Actions Builder/SDK is to the (mandatory) End Conversation scene. But this is more a conceptual notion - NO_MATCH indicates that you want to attempt conversation recovery, or that you're giving up on it.
If you want to capture what is said and/or take action on it (ie - transition to a different scene) you can do something like this:
Create a Type that takes "Free form text" (I usually call it "Any"), by creating a type and selecting this for "What kind of values" will it support.
Create an Intent where all the sample phrases use this Any type - I've named it "fallback" in this example. You should specify that this is not a global Intent, since we only want it explicitly triggered in a Scene. Then create an intent parameter that uses the Any type and some sample phrases that use this parameter. Make sure you highlight some of the words in the phrases to show which parts are the "Any" type, since they won't automatically match.
Finally, in your scene, place this as the last Custom Intent. (Note that it must be the last Custom Intent, since they are evaluated in order.) You can then assign it to transition to whatever scene you want.
In our dear VS Code when we hover in any variable the vscode by default shows the type of this variable, when it is an object, it shows the structure of the object.
e.g:
I would like to know if in addition to showing the type or structure it is possible to show the value of the properties.
If this is not possible in the vscode itself, is there any extension that does something like this?
The closest you can get to what you want (show variables value), is to add the variable in the debug window to the watch list. In debug mode, when you hit a breakpoint, your watch will evaluate the value at the current time (whether its been set, or not etc.) and will output what it is in that window for you.
See below:
If for example you have acquired a object of type handleplot with expression like below:
handle = plot(t,functoin1 , t , function2 ) ;
Now handle will be an array that contains two elements, handle(1) and handle(2). Now suppose you want to change some properties of one of these objects, like set a LineWidth, change the Color, or the like.
Is there any way in which you can activate auto-completion or suggestions when you type handle(1). (note the memebership operator .)? I am looking for the automatic suggestions that MATLAB provides for member functions in a combobox near the blinking cursor, similar to the way other IDEs provide this feature:
MATLAB's objects support tab completion. After typing handle(1). simply hit tab and you will receive a list of available methods and properties of the graphics object.
If you want more help on a method, you will also get a popup dialog of the method and the accepted input arguments.
If you want to programmatically get a list of properties of an object, you can use properties
properties(t)
If you want a listing of all properties and their values, just use get
get(t)
i use this method ...
for example i'm writing a program in matlab editor and when im want to know the properties of an object just stop coding and run the program , know it's have my object (for example handle) and know i can write the properties(handle) in command window to know the exact properties of handle . as Suever says .
I'm using Intellij IDEA 13 for android development.
Some methods has long list of parameters. For example, db.query(...) and I can't remember the order of them.
Is there any plugin or can i change some settings to make IDEA insert variables from function template?
Thanks
You have a couple of options. Ctrl+P will show a lit of the parameters, with the current one bolded. As long as you have either the source or javadoc for the library (or JDK/SDK) attached to the corresponding definition, you will see the parameters' names.
If you invoke code completion while entering parameters, IDEA will show at the top only ones that are of the correct type. Furthermore, if one of you local variables is the same name (or similar to) the required parameter's name, it will be at the top of the list. So if there is a method that takes an int named 'width', and I have several int variables, but one is named 'theWidth', it would be at the top. (Again, this assumes you have javadoc or source attached so IDEA can determine parameter names.) If IDEA can find local variables that satisfy all parameters (or all the first x parameters) of the method, there will be an option in the code completion list to complete all of them, The icon will be a double circle. The below screen shot shows how the HttpServletReqest is at the top of the list. So I do not have to remember if the parameter order is "request, response" or "response, "request". Notice the fourth option is to complete both the request and the response.
I am developing an Eclipse RCP application and have defined a custom context (org.eclipse.ui.contexts) for my editors. This context is activated whenever I invoke one of my editors.
Further, I have defined a single-key key binding (org.eclipse.ui.bindings) that I have scoped to this context which, when typed within the editor context, invokes a command/handler (I'll use the letter 'J' for this example).
Everything works as expected. When I launch/select one of my custom editors, the context is activated and 'J' executes my handler. When I launch/select a view part, my custom editor's context is deactivated and 'J' no longer executes the handler. However, when I click in a Text widget somewhere in the window trim area--let's say the Quick Access field--and type the letter 'J', the keystroke is consumed and executes my handler, behavior I do NOT want.
The reason is that selecting another workbench part has the effect of activating its context and deactivating the previous one. However clicking anywhere else in the workbench window area (other than another part) does NOT deactivate the previous context. I am sure this is by design and is a perfectly reasonable approach. However, it prevents me from defining single-key key bindings.
Has anyone a) run into this problem before and b) if so, how did you solve it?
For now I am using a complete hack that involves using a global listener to disable the key binding service entirely on detecting entry into a Text widget, and re-enabling it on exit from the Text widget.
In extension point point <extension point="org.eclipse.ui.bindings"> do not specify the command ID that will replace the existing key.
See the documentation for details.
commandId - The unique identifier of the command to which the key sequence specified by this key binding is assigned. If the value of this attribute is an empty string, the key sequence is assigned to an internal 'no operation' command. This is useful for 'undefining' key bindings in specific key configurations and contexts which may have been borrowed from their parents.