Questions tagged [eclipse-jdt]

Use this tag for questions about the Eclipse JDT (Java Development Toolkit) project which provides the plug-ins that implement a Java IDE supporting the development of any Java application, including Eclipse plug-ins.

The JDT project provides the tool plug-ins that implement a Java IDE supporting the development of any Java application, including Eclipse plug-ins.
It adds a Java project nature and Java perspective to the Eclipse Workbench as well as a number of views, editors, wizards, builders, and code merging and refactoring tools. The JDT project allows Eclipse to be a development environment for itself.

852 questions
254
votes
2 answers

Break when exception is thrown

Visual Studio has an option to break automatically into the debugger when an unhandled exception is thrown, does Eclipse have similar functionality?
keithwarren7
  • 14,094
  • 8
  • 53
  • 74
72
votes
4 answers

Install Eclipse JDT on top of CDT

I have the eclipse CDT installed, and I would like to install Java development functionality (JDT) on top of my CDT installation. I've been Googling from an hour but I can't figure out how to do this. What plugin do I need to install? What update…
HighCommander4
  • 50,428
  • 24
  • 122
  • 194
69
votes
2 answers

How can I add a key binding for a quickMenu similar to the "Refactor" context menu in JDT?

I want to add a shortcut to my eclipse plugin to show a quick menu with existing bindings. It should work like the "Refactor" quick menu in JDT. Shortcut for quick menu in JDT: JDT quick menu: I already added a binding and a command but it seems…
Meinhard
  • 781
  • 6
  • 9
43
votes
7 answers

Eclipse + Java 8 support?

How can I get Java 8 to work with Eclipse? I have followed this guide but doesn't work. I've also seen the Eclipse Java 8 wiki page, but they don't explain what to do with the checked out git repositories.
mjs
  • 21,431
  • 31
  • 118
  • 200
41
votes
6 answers

Quick fix many problems at once

Is it possible to quick fix all errors in a class opened in Eclipse? I have 71 errors that are pretty much the same, I would rather not do it one-by-one. (Note: I am quick fixing a Java file)
Tiago Veloso
  • 8,513
  • 17
  • 64
  • 85
32
votes
1 answer

Why is IJavaProject.findPackageFragmentRoots returning an empty array?

Every time I call IJavaProject.findPackageFragmentRoots(IClasspathEntry cpe) and pass it an IClasspathEntry of kind CPE_PROJECT, it returns an empty list. I paused the debugger and ran the following lines in the Eclipse Display view to see what was…
peskal
  • 1,213
  • 1
  • 12
  • 28
29
votes
5 answers

JDT weaving is currently disabled

I just installed Eclipse standard 4.4 Luna, and after installing the Scala IDE and friends I get JDT Weaving is currently disabled. The Scala IDE needs JDT Weaving to be active, or it will not work correctly. Activate JDT Weaving and Restart…
Eric Kolotyluk
  • 1,958
  • 2
  • 21
  • 30
23
votes
9 answers

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

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…
basszero
  • 29,624
  • 9
  • 57
  • 79
22
votes
1 answer

Eclipse JDT: Is there a refactoring to replace direct field accesses with setter/getter methods?

I know I can generate setters and getters for fields in the Eclipse source menu, but I'm very surprised it doesn't offer to replace the direct field accessors with calls to the newly created methods. Does anyone know how to do this short of manual…
Jeff Axelrod
  • 27,676
  • 31
  • 147
  • 246
22
votes
4 answers

Programming Java 8 in Eclipse

The development of Eclipse support for Java 8 is ongoing in a branch (http://wiki.eclipse.org/JDT_Core/Java8). To try out the current Eclipse support for Java 8, I did the following: I installed a build of JDK 8 (This step is optional). I checked…
reprogrammer
  • 14,298
  • 16
  • 57
  • 93
21
votes
2 answers

How to skip loops while debugging Java code?

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…
Chandrayya G K
  • 8,719
  • 5
  • 40
  • 68
20
votes
1 answer

Is it possible to have CDT and Java IDE together in Eclipse?

I have an Eclipse CDT environment up and running and customised just the way I like it. I'm also going to be heavily dealing with Java. I don't want to install a separate version of Eclipse just to get the Java features, as I'll be switching…
hhafez
  • 38,949
  • 39
  • 113
  • 143
19
votes
6 answers

Implemented classes / subclasses in content assist in eclipse

What I'm trying to do is this: List list = new and then hit Ctrl+Space and get ArrayList() (among others) to show up in the type proposal. I thought I had this working previously, but I recently had to reinstall and can't find the…
Kevin McCarpenter
  • 786
  • 1
  • 7
  • 22
18
votes
2 answers

Interface method´s annotations are inherited in Java 7 but not in Java 8

I´m migrating from Java 7 to Java 8 and I have met with this change in the language. I have a Superinterface with an annotated method: public interface SuperInterface { @X SuperInterface getSomething(); } I have a SubInterface with the same…
leaqui
  • 533
  • 6
  • 22
18
votes
2 answers

Eclipse - `open call hierarchy` got wrong result

Here is my sample java code: public class Test { public static void foo() { Foo.InnerKey key = new Foo.InnerKey(); getInstance().query(key); } public static void bar() { Bar.InnerKey key = new Bar.InnerKey(); …
andyf
  • 3,262
  • 3
  • 23
  • 37
1
2 3
56 57