eclipse-jdt

How to skip loops while debugging Java code?

五迷三道 提交于 2019-11-30 03:08:53
This is not a duplicate of How to come out of while loop during debugging . See the comment on this answer https://stackoverflow.com/a/8107702/1391924 by the author of this question. While debugging, we can use short-cut keys like F8 to resume, F7 to step return, F5 to step into, F6 to step over. Is there any short-cut key to skip loops (for,while and do-while) while debugging Java code? In the picture shown below Currently debug cursor is at line no 57. Is there any short cut key when pressed it debug cursor should come out of innermost loop (for,while or do-while. Here while loop) and pause

How can I add build path items to Eclipse 3.5 using relative paths?

∥☆過路亽.° 提交于 2019-11-30 03:03:52
Eclipse 3.5 added support for relative buildpath/classpath items, yet I cannot seem to find a graphical way to add relatively pathed items. The example in new and noteworthy (search the page for 'relative', about 40% of the way down) seems to indicate that I have to manually edit the .classpath file. Am I just missing something? Edit 2015: Updated link as it had went away. To preserve the "new and noteworthy" indefinitely, here's a screenshot of the mentioned section. The actual way to do this is to import the library into your workspace so, Right Click in Package Explorer -> Import -> File

How do I browse JDT source code in eclipse?

假装没事ソ 提交于 2019-11-30 02:55:58
问题 My current attempt to browse the JDT source code in eclipse: installing Eclipse Helios RCP version. importing all plugins from installation as binary files into my workspace It does not work. 回答1: Install the "Eclipse SDK" feature from the Eclipse Project Updates update site: 回答2: You can follow Vogella's "Eclipse Source Code - Tutorial", especially the section " Import Plugins " how you can import Eclipse plugins from your Eclipse installation to review the code. The Eclipse distribution

Eclipse find references for method

最后都变了- 提交于 2019-11-30 01:51:41
问题 I wanted to find all the callers of the the method "get" for the following class: package com.zzz.zzz.zzz.services; public final class EMF { private static final EntityManagerFactory emfInstance = Persistence.createEntityManagerFactory("obamaCareIsGood4U"); private EMF() {} public static EntityManagerFactory get() { return emfInstance; } } So I highlited the text "get" and right-clicked References - project. But it returned references to every method called "get", rather than just references

How to get “active editor” in Eclipse plugin?

浪尽此生 提交于 2019-11-30 01:28:31
问题 In my Eclipse plugin, I need to know when the editor that is visible on the screen has changed. I am currently getting the active editor as follows: PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor() This works for most cases except for when the green Continue button is pressed: If I use the F8 shortcut then the active editor is updated as expected. It seems that the active editor property is not updated until the editor tab gets focus (which doesn't happen

Children of org.eclipse.jdt.core.dom.ASTNode

老子叫甜甜 提交于 2019-11-29 21:14:51
问题 Using Eclise JDT, I need to retrieve the children of any ASTNode. Is there a utility method somewhere that I could use ? The only way I can think of right now is to subclass ASTVisitor and treat each kind of node manually to find its children. But it's a lot of work to study every node type. 回答1: I would start by looking at source of ASTView Plugin, since that also does the same thing. Based on the code in org.eclipse.jdt.astview.views.ASTViewContentProvider.getNodeChildren(ASTNode) org

How do I disable auto-indent in Eclipse Helios (Java)?

纵然是瞬间 提交于 2019-11-29 15:25:57
I swear I looked everywhere, and disabled almost everything (insertion of matching brackets etc), but when I type an opening brace and hit enter, it auto-indents the next line with a tab. Is there a way to disable this "handy" "commodity"? From the menu go to Project > Properties Select Java Code Style > Formatter Check the box for Enable project specific settings OR click Configure Workspace Settings Click the Edit... button for the active profile On the Indentation tab uncheck all of the Indent options White Fang gave you the correct answer, but I will give you a guide how to find options

Java refactoring tools [duplicate]

断了今生、忘了曾经 提交于 2019-11-29 14:14:04
问题 Possible Duplicate: A tool like ReSharper, but for Java? I make very heavy use of the Java code refactoring tools provided by Eclipse (extract interface, rename method, etc.). Does anyone knows of other similar tools (preferably Eclipse plugins) that can perform Java code refactorings that are not available in Eclipse by default, or that can perform the same refactorings better? I'm aware of various Eclipse plugins that can identify code in need of refactoring (e.g. FindBugs, UCDetector), but

How to customize hashCode() and equals() generated by Eclipse?

会有一股神秘感。 提交于 2019-11-29 06:16:40
问题 It is recommended and sometimes necessary, classes that represent values ( value classes ) to override hashCode() , equals() [and optionally toString() ] methods. The values that these methods return depend on all or subset of the member variables of the class and its super-class. To implement them properly you have to know a little bit of theory about hashing and a little bit of algebra and set theory (not too much, and almost everything is explaind in the javadocs for these methods and in

How do I get rid of “Current text selection cannot be opened in an editor” in Eclipse?

断了今生、忘了曾经 提交于 2019-11-29 05:45:12
Sometimes, I get this message in the status bar when I press F3 on a Type in a Java editor: Current text selection cannot be opened in an editor When I copy the selection into the clipboard and use Ctrl+Shift+T to open the "Open Type" dialog, I can paste the value and it will display the type and I can open it. The type is on the class path (no compile errors). In other Java editors in the same project, F3 / Ctrl-Click works. In the "broken" editor, it only works on internal fields and methods. For internal fields, it only works in the place where the field is defined. All places where a field