Javascript : Jump to method definition using eclipse - java

In eclipse for java we have a feature to navigate to the method definition by "holding the CTRL key and move mouse cursor over the method name. Method name will become a hyper link. Simply click it to go to the method definition."
But we don't have a similar feature for jquery or backbone in eclipse.
Is there any plugin available for this feature.
Does anyone have any idea about this??

using shift+F3 takes you to the definition after placing the cursor on name

Related

How to view all implementors of a given interface in NetBeans for Java?

I'm trying to evaluate NetBeans, being a veteran Eclipse user. In Eclipse I could press F4, and I would a class hierarchy for a given class or Interface. For example - show me all the classes that implements InputStream.
It's also important it will show me this across all my dependencies and not just my code.
Try this, select the type e.g. "String", then click with the right mouse button -> Navigate -> Inspect Hierarchy. On the right side you will see a window called "Hierarchy" or maybe just a vertical text with "Hierarchy" which is a minimized window (click to open).
If opened you see a combobox with "Supertypes". Change this to subtypes, there you see all classes or interfaces implementing/extending your interfaces or extending your classes.
Try this,
ctrl + alt + click
this will list all implementations of same interface
The shortcut key "Alt+F12" works for me in NetBeans 8.0.2.
I believe "Inspect Hierarchy" is in existence since NetBeans 6.0
http://wiki.netbeans.org/Java_MembersAndHierarchyPopup
Select "Subtypes" and "Refresh".
NetBeans Type Hierarchy
UPDATE: This bug has been marked as fixed, so you should be able to use Find Usages for this.
Original post: You cannot do this without some sort of plugin or other program. The inability to find usages in libraries has been under discussion for 10 years and is currently listed as a Priority 1 enhancement, having no easy workaround. No planned fix date has been announced.
Right click on the Interface name
Go To > Implementations(s)
You can use "Find Usage" (select the name of the interface in your code and ALT+F7). In the popup, select "Find All Subtypes" and in the Scope, select "Open Projects".
That will show you all you all the classes that implement the interface in all your open projects.

eclipse auto complete before finishing the full name of a method

I am using eclipse for Java ee. One thing I noticed is in the computer in my office, eclipse auto complete is working even though I didn't finish writing the full name of the method.
For example: as soon as I write
getSer
It suggests me the
getServletContex
However at home the suggestion only appear when I am done with the method name and enter "."
At the office I am using Helios and at home Juno.
Anyone knows how to make the other eclipse to auto complete before I finish the name of the method?
Go to Preferences>java>Editor>Content Assist and configure your settings.
The IDE only suggests these auto-complete sometimes. Use CTRL+space to call it yourself.

How to get the class name for Java SWT/JFace UI component which is currently highlighted by mouse cursor?

I need to get the name of class that represents the Java SWT/JFace UI component which is currently displayed and highlighted by mouse cursor.
For example, i wish to get something like "org.eclipse.swt.widgets.Table" when my cursor is pointing to any displayed SWT Table control, etc.
Tell me, is there a plugin for Eclipse IDE, or any another utility, which allows to do this?
In this way I want to simplify the process of writing UI-tests for Eclipse-RCP plugin project. Searching for class name and path manually anytime when this needed is very discouraging.
Get hold of the current display Display.getDefault() and call getCursorControl(), once you have the Control call control.getClass().getName().
Install SWT Spy: http://www.eclipse.org/swt/tools.php
SWT Spy is the correct tool to use. However, the mentioned page is not updated.
From Eclipse 4.7 SWT Spy is included in Eclipse PDE. So you can get it by downloading the Eclipse for RCP and RAP.
To launch SWT Spy, press: CTRL + ALT + SHIFT + F9
In case of doubts, please see: http://www.vogella.com/tutorials/EclipseCodeAccess/article.html#swt-spy

Motodev won't lookup methods - can it be configured to do so?

I am using Motodev, an Eclipse-based development tool for Java ME / Motorola. The problem is when you type a line of code that has a method, such as:
super.
It doesnt give options of what methods it has available?
How do I configure it to do this?
Or I'm guessing the instructions for eclipse would work the same.
#android_king22 MOTODEV Studio should work just like Eclipse does. Pressing '.' or ctrl-space should bring up the list of suggestions. What context are you typing 'super'? Are you able to build your project (i.e. is the SDK path correct)?
Is there a folder inside your SDK called "platforms/android-X/sources"? This is a common workaround to a particularly ugly problem in Eclipse where it takes 20-30 seconds for auto-complete to work. If you do have this folder but no actual source inside, it could be preventing the auto-complete mechanism from working.
You must enable "Java Proposals" and "Java Type Proposals" in Preferences|Java|Editor|Content assist|Advanced
"super" calls a method in the superclass of whatever object you are currently using. If no method is available (or your current class is not a subclass), then it won't show anything. However, if there are methods available, it will automatically show (if you have Intellisense on).

How to search a class in Java Library using Netbean IDE?

I have no idea, but would like to know whether it is possible or not to search in java libraray using netbean IDE. For example, I have heard ArrayList. And I want to find which package ArrayList belongs to. Is there any tool or plugins to search within Java Library for Netbean IDE?
CTRL+O
This shortcut triggers an action called interchangeably by the NetBeans documentation for Go to Type... and Go to type/file. The usage of this shortcut resembles the keyboard shortcut SHIFT+CTRL+T in Eclipse. Both IDE:s will search for a Java type/class as you type in the opened search field and provides a quick way to navigate to different types and classes. Thus in your case, instead of having to write down "ArrayList x;" in your code somewhere and hold down CTRL while you click on the variable type with your mouse (or any other "hack" provided in this thread now or in the future) just press CTRL+O and type in "arraylis" should be enough.
The shortcut may be changed if you go to your Tools menu item and then click Options. A window will pop up. Click on Keymap and find the action. Edit the shortcut.
You can find keyboard shortcut cards for different versions of Netbeans here.
Just type ArrayList + CTRL + SPACE Netbeans will suggest which package it belongs
But If that class isn't in classpath netbeans will suggest to create a new class with name ArrayList
for second of your question
You can press ctrl and then move mouse over the function and click.
You will move to the file where that function defination is provided.
So you can easily see return type .. parameter type
To search Library .. In netbean at the top right corner serach box is given.
There you can search library like google.
This might not be the best way to do that.
Just create an object for this class and press Ctrl + Shift + I. It will automatically import all the necessary classes. Hence you can check the package in the import statements.

Categories

Resources