How to change standard value of GDB debugger in eclipse-cdt programmatically - eclipse

I am a completely newbie in Eclipse and in Eclipse-CDT in particular, so I ask for your help.
In
Window->Preferences->C/C++->Debug->GDB
we have standart value "gdb" in the "GDB Debugger" field.
I want to change this value. I mean, I have a plugin which should change the value "gdb" at the beginning of the plugin's run.
But I don't know which plugins fill the field "GDB Debugger" and other field.
Can you help me? Can you describe the mechanism of launching and what methods are filled by these fields? Or give me some links where I can find suitable information.
Here is a picture of Window->Preferences->C/C++->Debug->GDB:

Use Plugin Spy to find which plugin contributes to UI.
GDB Debugger field is created inside GdbDebuggerPreferencePage

Related

Eclipse autocomplete parentheses in control structures

I have a quick question that might save me a few seconds of annoyance every day. I know that eclipse can do a lot of autocomplete magic, so this might be possible:
As a programmer who learned with python, I constantly forget to surround contitions in control structures (like if or while) with parentheses. How do I make eclipse autocomplete opening and closing parentheses when I finish typing while or if?
I am aware that I can autocomplete whole structures with ctrl-space, but how can I configure eclipse to do this by itself?
Any help is appreciated.
So in stock Eclipse, the usual way to bring up assisted content is to type Ctrl+Space. The problem with this is that it brings up both Help Proposals and Template Proposals, with the Help Proposals displayed first. You end up wasting time scrolling down to find what you actually want from the Template Proposals. And there's just that much more clutter to choose from.
The solution is this:
Go Window->Preferences->General->Keys. In the type filter text search for "Template". This should bring up a "C++ Content Assist (Template Proposal)" line. Click on it. Now map this to whatever shortcut you'd like (I did Shift+Space because that's an easy one to do while typing). Make sure to click on the "Binding" option to do this. Click "Ok" and you're done!
If you ever want to add or change what is brought up by that shortcut, and for which specific strings it works, just go Window->Preferences->C/C++->Editor->Templates and you can edit those to do exactly what you'd like when using that newly assigned shortcut.
Hope this helps.
EDIT: I am unable verify if this works for PyDev, as I'm running Eclipse Oxygen, which doesn't currently offer PyDev or the Eclipse Marketplace Client plugin. However, my guess is this would still work in PyDev. Best of luck!
Sources:
Setting auto complete shortcuts in Eclipse
How to change the Control+Space autocomplete shortcut keys in Eclipse for Android
Thanks for any help, but the only thing that seems to work are workarounds. My prefered "solution" is to change the Auto activation triggers for Java in Preferences>Java>Editor>Content Assist from . to .iwfs, so that the autocomplete dialog automatically pops up when I start typing if, while, for or switch. Then hitting enter will do exactly what I needed.

Unable to Copy XPath to Selenium IDE 2.0.0

Whenever I try to Copy Xpath of any item I select through Firebug, I'm just provided with item ID alone.
e.g., //*[#id="txtUsername"]
I know that the path would be something lengthy which needs to placed at Target textbox. I tried my level best to get it done but failed with all my attempts :(
Please help me to find out the place where I'm going wrong? Is that either in Firebug or Selenium?????
P.S: I'm using Selenium IDE V2.0.0 and Firebug V1.11.2.
You need to be careful when using Firebug and Selenium together with respect to the XPath. Firebug will give you the full XPath which is great but Selenium may not understand that target. You may need to use a much smaller subset of the XPath (e.g. Selenium may want '//input' while Firebug will give you a MUCH larger (the complete) XPath).
for many of the Selenium commands, if you are using the IDE, if you click on part of the page you are automating with the IDE set to Record, you will see a target value display. To the right of the target value but to the left of the 'Find' box, there should be a drop down menu to give you options for targets. Depending on the webpage you are automating different targets will work better.
Regardless of which method you choose to use to find the XPath to work with Selenium, I can recommend at least the following: Use the 'Find' feature I mentioned above. Place the XPath or any target you want to use in the target value field and click the 'Find' button. The location will display on the webpage and you will know whether or not you've missed the mark.
I hope this helps!

Display Javadoc with Autocomplete Parameter Information in Intellij

In Eclipse, when you're about to enter parameters for a method, the auto-complete will display all possible combinations as well as the Javadoc associated with each of them. This can also be triggered manually.
I'm trying to get Intellij to display the same information but I can only get it to display the shortened parameter information via Control-P. Is there a way to display the corresponding Javadocs as well?
For the example below, in Eclipse, you can get the Javadoc for each of the different Date constructors to show up before entering anything. But in Intellij, I can only get the JavaDocs to display after entering ALL of the parameters then performing a Control-Q on the method. I can't get the Javadocs to display while typing.
In this case, it's trivial but sometimes the parameter names are not labeled so Javadocs are nice to help pick which overloaded method you want.
Eclipse:
Intellij:
It's a known limitation, please vote for this feature request in YouTrack (it's 4 years old!).
Maybe you're looking for this new feature to appear in IntelliJ 2018.2, Go to Settings | Editor | General | Code Completion and open Show the documentation info popup in... options, I just solved this problem with the new version.

Making Eclipse Plugins: How to open class declaration from String e.g. "java.is.Good"

I want to make a tool like this:
"java.is.Good.toString()" I want to search this String and jump to the Good.toString() method body.
how to active this?
I can read sourcecode of eclipse, but know nothing about eclipse plugins development, so please give me some guide just like:
THE KEY METHOD
org.eclipse.jdt.core.search.MethodDeclarationMatch
[I can't find where to turn a String path to a JavaElement for search]
THE KEY SAMPLE
[I can't find the eclipse "navigate->open declaration" sourcecode]
try eclipse plug-in spy tools to find existing function codes and description.
As the jdt, there are many api for users to do such things like find a JavaElement by string name.
However, it's a pity that few people are familiar to this part and all depends on you.
Good luck.
The same functionality (Open Type under Cursor, Open File under Cursor) gives plugin called AnyEdit Tools (update site: http://andrei.gmxhome.de/eclipse/). Look into its sources or just use it.
P.S. Useful hotkeys for plugin development/hacking:
Shift+Alt+F1 - Plugin Selection Spy, shows detailed information about current window/editor/selection (contributing plugin, classes, selection etc.)
Shift+Alt+F3 - Show Contributing Plug-in, shows which plugin has contributed active window

How do I use IntelliJ to auto-complete method parameters?

A feature in Eclipse that I really miss is how you can auto-complete method parameters with currently in-scope variables. This feature will, with a single key combo (ctrl+space) fill in all method parameters. As long as my variables were named similarly to the method parameters, I never had a problem with this auto-complete. Is there a plugin or a native way to accomplish this in Intellij?
You might already know that IntelliJ IDEA has the CTRL+P shortcut (Windows) and CMD+P (OX X) that brings up a brief description of which parameters are passed to the method. It's very handy and saves a lot of time that otherwise would have been spent looking up the method declaration.
IntelliJ IDEA 9 now supports what they call "super completion" which matches the behavior you are looking for and is available through their early access program.
(source: jetbrains.com)
IntelliJ IDEA 8 does not allow you to autocomplete more than one parameter at a time. You are forced to use Control-Shift-Space once for each parameter.
Control-Shift-Space (and the completion is based on type, not name)
For more goodness: Help -> Default Keymap Reference
There is also an IntelliJ plugin called 'kotlin-fill-class' that will fill in some default values automagically. Tested the latest snapshot version of the plugin with IntelliJ 2019.1 and it appears to be working.
from this post: https://stackoverflow.com/a/55160515/405749:
The plugin https://plugins.jetbrains.com/plugin/8638-auto-filling-java-call-arguments at least will provide a smart fix to do it when pressing alt+enter.
I have not found a away to do this completely automatically as it works in eclipse.