When I use ctrl+shift+G to find references for an object in eclipse, I will get a list of those, but they are collapsed like this:
Why being collapsed?
Those four occurences are method calls on the object. I expect to be able to see which method calls that are called on the object by looking in this list. Can that be made?
Matches within a single method in a class are always just shown as 'n matches'. There is no way to expand this in the search results view (see Eclipse bug 46051).
Related
I want to bootstrap/embed an extension with fixed controller/action and no matter what is passed to the query string (e.g. tx_*[controller]/tx_*[action]) should not change the behavior of the embedded/bootstrapped version of the extension.
Basically I need to insert multiple instances of the same extension/plugin and each instance should only call what I have defined. Currently it throws an exception if it's not allowed or if I allow it it executes whatever is in the query string.
I want to be able to do that with the same plugin with different controllers.
Is it possible?
EDIT:
Lets say I have a plugin with 3 controllers - List, Show, Top. I want to embed in my page the controllers List and Top. When I click on details in List in my query string I have the appropriate arguments so the extension knows I want to show details on one of the items in list. But these arguments also influence what is shown in Top and now Top shows the same thing as List. I want to be able to embed the Top controller who will never change its output based on the query string.
I tried to do it the same way - and failed to do it in a clean way.
According to several tickets on the forge it is recommended to split it up in different plugins.
/edit:
Just as an additional reference, you could check config.tx_extbase.mvc.callDefaultActionIfActionCantBeResolved = 1
Perhaps it can help you in your case.
I am automating using Selenium, Capybara and siteprism.
Using rubymine, I want to get code completion such that I can type #page. and get a list of the methods (this works) and a list of the elements and sections defined in the page object using siteprism.
Is there any way to do this in Rubymine?
Sublime text editor does this, but yet it doesn't handle the class names and methods very well.
In site-prism the methods on a page-object class such as the getters, waiters, etc are added dynamically by the class methods element, elements, section, sections when the class is evaluated. This adds several methods about a particular element for each listing in the class.
That means there's no way for rubymine to simply read the files looking for def to determine what methods should exist on any instance of #page.
You might be able to code something up to get it working, but there's no straightforward solution.
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.
When I click on a variable, object etc in eclipse and choose "References --> Project" from the context menu, I am presented with a list of methods which reference said object. However if a function has more than one reference the result is shown as:
functionName(signature) (x matches)
Double clicking on the result brings me to the first match, and there appears to be no way to locate the remaining matches. What am I doing wrong?
Use the buttons with the up/down arrows in the search view, they will bring you to the previous/next search result, independent of the code structure, file location etc.
There is no way to further expand the tree of search results for a Java method.
I'm looking for a way to refactor all usages of a method with another. I'm de-singleton-izing a class, and I'm trying to replace all of the getInstance() methods with another method.
In my case, I'd like to change all usages of OldClass.getInstance() to be NewClass.getInstance().getOldClass(0). Is this possible with NetBeans' refactoring tools?
In Netbeans you can refractor the name of the method, but you can't change C.m() to C.m().m2() with refractoring tools.
So the best solutions is to go with Edit->Replace or Replace in project.
Then replace all .getInstance() by .getInstance().getOldClass(0). (Take care of the scope). Don't worry it doesn't replace all occurence directly, it finds match then it displays a tree with checkboxes, you can click on Replace to replace the selected occurence.