Reverse key bindings in Webstorm - keyboard-shortcuts

I'm having this problem and one way to solve it would be by reverse engineering key bindings in Webstorm.
Specifically, if I type, say, Ctrl+D, I should be able to do a reverse look up to see what function it calls in the key bindings menu. Or find it nested away in a configuration file somewhere or something.
Looking in /Users/Dan/Library/Application Support/WebStorm7/ the only relevant thing I see is editorconfig-jetbrains, but it only contains jars which I'm not sure what to do with.
I've heard this is what emacs' C-h k does.
Thus far I haven't found any equivalence, and the bindings only let you go function -> key, not the other way.

Specifically, if I type, say, Ctrl+D, I should be able to do a reverse look up to see what function it calls in the key bindings menu
Settings/Keymap, 'Find action by shortcut' button - is it what you are looking for?

Related

In chrome dev tools what is the combination of these attributes called and why can i not just do a quick copy of them

I don't see anything in the right-click menu that will give me this. I always have to write it manually
Are you asking about button#checkout.button-1.checkout-button? If so, I'm not aware of a way to copy-paste this, or a name for it, but it is constructed with the format
htmlTag#idOfElement.class.with.periods.instead.of.spaces
It is pretty commonly a unique selector for the element in question.

How to find a method where used in intellij

Is there a way to find one method where used in intellij idea with golang plugin ?
I need to find the method all where used.
Anyone who know how to do this?
Find Usages is for sure the right way how it was already mentioned. However, if you don't want going through the context menu, you could also use the shortcut Alt + F7 for Windows/Linux or Option + F7 for Mac OS. You can also specify the Find Usages Scope which can be, for example, only production files or only test classes. Other shortcuts could be found from here.
Unfortunately if you use Ubuntu this shortcut is already reserved for some system operation and to make it working in Intellij IDEA you need to disable it in OS level.
Right click on the method name and select "Find Usages". This will find direct callers of the concrete method. If you want to find callers who call the method via an interface, it's harder. If you know the interface(s), you can navigate to each of them in turn and right click on the method name and select "Find Usages". If you don't know which interfaces include the method, Go Oracle can help.
Unfortunately, the Find Usages on a method finds every method of that same name, so if you use a common method name, it will find a lot more than you want. For example, I am debugging legacy code that had a method called clone(), not an override, just a new method. When I did a Find Usages on it, it found over 1000 entries, most of which were in the JDK, which clearly did not call the method of interest.
My solution was to slightly rename the clone() method to cloneXYZ() and rebuild. The compiler showed me the 5 calls I was looking for.

Capturing variable xpath in selenium IDE

Am trying to capture a element (delete button in gmail) which has variable xpath.
The xpath is something like this-
//*[#id=':rr']/div/div[4]/div[1]/div[1]/div[1]/div/div/div[2]/div[3]
can somebody kindly help?
No, this is where the IDE falls behind and it's for good reason. It, along with other 'XPath-ified' (e.g using the 'XPath' right-click option in Firebug) tools will only take a guess at where something is located in the DOM.
In that, I mean it's going to walk down the tree and see where it is, in relation to the other elements, i.e it'll walk down one set of tr elements, and know there are 7 of them, therefore it'll know that the first one can be accessed using [1], then the next one can be accessed using [2] etc etc...
It doesn't, or really can't, know what is unique enough for you to use. That's why it's down to you to figure it out.
As for Gmail specifically, I would suggest you either fall back to Gmail's basic mode - so the markup will be easier to deal with or stop completely and use a particular set of API's in whatever language you are using to deal direct with the mailboxes in that account.
Though, if you do this, you'll need to dump the IDE altogether - essentially this is beyond the IDE and is a logical thing you need to decide yourself. The IDE is not designed for this.
Though, a tip would be see what's near the delete button. Is there a static element, that has the same attributes all the time, near it? You can get that element, and walk through to the DOM to your 'delete button'.

How can my own implementation of Find References write to the Eclipse Search View?

I am using the Eclipse plugin framework to write an editor for a specific language. I would like to implement a Find Reference capability for this language and write the results to the eclipse Search View. I've been searching the web for a few days now, and all I found was explanations on how the define the org.eclipse.search.searchResultViewPages extension point and define a search page and a search view. I am only interested in the Search View and how I can plug in my own results to it.
Thanks!
I have started to work on the same problem.
For me, the easiest thing to do was to add a command handler for the existing Java find references command org.eclipse.jdt.ui.edit.text.java.search.references.in.workspace when in the context of my editor.
The current version of my handler is very simple, and it sends a regular expression based on the current word to a simple text search (admittedly, producing false positives). On the plus side, the results get plugged into the search results as you would like, and I didn't have to deal with search views.
The important thing seems to be that your handler end with a call like this:
NewSearchUI.runQueryInBackground(query);
In order to prepare my simple text query, I use
ISearchQuery query = TextSearchQueryProvider.getPreferred().createQuery(new PigSearchInput(word));
You can look at my complete handler class here. It's mostly self contained. In the future I plan on implementing a "real" find references feature,, using my own classes instead of the Eclipse text search ones, but I haven't done this yet.

Change dwm colorization - Windows 7

I'm currently trying to write a program in VB.NET which fluidly changes the DWM window colorization colors in Windows 7.
I first tried to edit Registry values directly, but I had to restart the UXSMS service. This solution was unsatisfying, because of the toggle of the taskbar.
I'm now searching for a function in a DLL such as user32.dll or themecpl.dll which can reproduce the behaviour of control panel when setting the window color.
I'm now on IDA, searching for the adquate function (CColorCplPage::SetDwmColorizationColor seems good!). If anyone has one, please share it!
(If anyone need screens or code, please ask. Sorry for my poor English.)
Your first attempt failed because manually editing the Registry is never the correct way to change system settings. As you found out, lots of Windows components (and other applications!) read those configuration values once and cache them, preventing your changes from being propagated. Another problem (and you'd be surprised how often I see this) is applications that attempt to muck around in the Registry generally end up corrupting things.
Instead, you should call the documented API to change the settings. There's almost always a documented way of doing this, and if there isn't, well then you shouldn't be doing it.
This appears to be one of those cases. There's a documented DwmGetColorizationColor function, but there's no corresponding DwmSetColorizationColor function, as one might expect.
The reason is that the user is supposed to be the only one who can change their colorization settings, not other applications. You might promise not to abuse this, and to only make such changes at the user's explicit request, but not all applications can be trusted to do this. Lots of people would use it maliciously, so these functions have not been documented and exposed.
But as usual, if you press on, you can usually find an undocumented way of doing things. The problem with using undocumented functions is that there's no guarantee they'll work or continue to work. They've been intentionally left undocumented because they're liable to change on new versions of Windows. You should only use them at your own risk.
In this case, if you use a program like DumpBin to obtain a list of all the exported functions from the DWM DLL (dwmapi.dll), you'll see a number of undocumented exported functions.
The ones you're interested in are DwmGetColorizationParameters and DwmSetColorizationParameters. Both of these functions take a COLORIZATIONPARAMS structure as an argument that contains the values they need.
So, you need to reverse engineer these functions and obtain the appropriate definitions. Then, you can call the DwmGetColorizationParameters function, passing in a COLORIZATIONPARAMS structure to obtain the current configuration settings; modify the member of the structure that contains the current colorization color; and then pass that modified version of the structure to the DwmSetColorizationParameters function.
Did I mention that I don't recommend doing this?