I'm using Eclipse JDT to build a Java refactoring platform, for exploring different refactorings in memory before choosing one and saving it. I can create working copies of the source files and edit them (for example to rename a type, using ASTRewrite), and I also want to rename one or more of the working copies. I'd hoped that the renam...
I'm using Eclipse JDT to build a Java refactoring platform, for exploring different refactorings in memory before choosing one and saving it. I can create collections of working copies of the source files, edit them in memory, and commit the changes to disk using the JDT framework.
However, I also want to generate new 'working copy' sou...
How do i register an additional handler/action/command for "Open Declaration" (aka F3) in a plugin?
I want to use F3 on String literals in Java code to navigate to the files declaring resource bundle keys. I already have a context menu action ready that does the job. All that's missing is a way to bind it to the key that users are used ...
I am not working on an Eclipse plug-in project; however, I use an external library that generates an instance of org.eclipse.jdt.core.dom.CompilationUnit. Is there a way to generate Java bytecode from it?
Some searching revealed that CompilationUnit's are typically built by registering a custom builder for the Eclipse project, then lett...
I have an Eclipse plugin, that among other things, can create a project and give it several classpath entries. This in and of itself works fine.
These jars do not have source included in the, however there is a URL that can be used for Javadoc. I want to set this up programmatically for these classpath entries that the plug-in creates...
Some time ago I wrote an Eclipse plugin which makes use of JDT to do some parsing. Now I am thinking of making a command-line version of this app. Naturally, I hope to reuse the parsing code, so I need to get JDT to work outside Eclipse. Is there any way I can accomplish this (maybe build some wrappers, etc)? Are there any ports of the J...
Hey folks,
There's a lot of discussion about Ant and Eclipse, but no previously answered seems to help me.
Here's the deal: I am trying to build a Java program that compiles successfully with Ant from the command-line. (To confuse matters further, the program I am attempting to compile is Ant itself.)
What I really want to do is to br...
Eclipse Helios periodically starts running a job which displays "Computing additional info". During this time, Eclipse is very sluggish, bordering on unusable. What does this job do? Can I shut it off?
I just hope that someone in the JDT team comes to sense and gets rid of it, make it go faster, or at the very least change it to somethi...
I am going to need to do some development with Eclipse JDT while on holiday. I will be off-line for the most of the time and therefore I will not be able to access the Eclipse JDT API documentation on the Web. I can't find a link to download the documentation in ZIP or PDF or, best of all, CHM format. Does anyone have a copy? Could you p...
Hi all,
I'm needing to install the eclipse JDT.Core plugin locally (eg download the file with site.xml etc), as opposed to installing it remotely due to the horrible firewall at work.
Can anyone suggest where to download it so i can do the local install?
Thanks
...
For example:
private long p, q, g, h;
I want to split this field declaration as:
private long p;
private long q, g, h;
How can I use ASTRewrite to do it? I tried to use ASTNode copyFd = rewriter.createCopyTarget(fd) to copy the field declaration, modify it, then add to field declaration list, but my modification on copyFd is not ...
I am writing an Eclipse plug-in that uses JDT AST's ASTParser to parse a method. I am looking within that method for the creation of a particular type of object.
When I find a ClassInstanceCreation, I call getType() on it to see what type is being instantiated. I want to be sure that the fully-resolved type being dealt with there is t...
Does someone know a plugin for Eclipse that replaces fully qualified Java class names with the simple one and the corresponding import where possible? It would be even better if it could be performed as a Save Action.
...
Hi,
I making a eclipse view that is working with selected elements from other views.
Let say I have opened a java file in the editor that has the following fields in it:
private String world = " world!"
private String hello = "hello" + world;
When I select "hello" in the Outline view I'm able to get IFiled selection and I have access to...
Using Eclipse jdt facilities, you can traverse the AST of java code snippets as follows:
ASTParser ASTparser = ASTParser.newParser(AST.JLS3);
ASTparser.setSource("package x;class X{}".toCharArray());
ASTparser.createAST(null).accept(...);
But when trying to perform code complete & code selection it seems that I have to do it in a plug...
Consider a simple "Hello world" plug-in, how can I run it without having to fully launch the eclipse platform?
...
Hi,
I'm trying to execute 'OrganizeImports' programmatically on files that I'm editing programmatically.
My code looks like this:
final ICommandService cmdService = (ICommandService)PlatformUI.getWorkbench().getService (ICommandService.class);
if (cmdService != null) {
final Command cmd = cmdService.getCommand(IJavaE...
Hello folks,
I am working on an Eclipse plugin that modifies Java code in a user's project.
Basically the result of this plugin is that Java annotations are added to some methods, so
void foo() { ... }
becomes
@MyAnnotation
void foo() { ... }
Except that it doesn't quite look like that; the indentation on the newly inserted anno...
Hi,
I want to programmatically get the model of an anonymous class or locally declared type (i.e. an instance of IType) from the JDT Java Search Engine, known by fully qualified name. So far, I did well with the following when searching for "usual" types that were not nested in other types:
SearchPattern pattern = SearchPattern.createP...
I want to use some of the libraries produced by the Eclipse project through Maven. I 've had a look at the main Maven repo and while it looks like that there are a few projects already imported, their versions are old and some important ones are missing (e.g. cdt). Is there any Eclipse project official Maven repository? If not, what woul...