Questions tagged [eclipse-api]

18 questions
17
votes
6 answers

Get the absolute path of the currently edited file in Eclipse

I'd like to write a plugin that does something with the currently edited file in Eclipse. But I'm not sure how to properly get the file's full path. This is what I do now: IFile file = (IFile)…
levik
  • 114,835
  • 27
  • 73
  • 90
6
votes
1 answer

Eclipse Plugin Dev: How do I get the paths for the currently selected project?

I'm writing a plugin that will parse a bunch of files in a project. But for the moment I'm stuck searching through the Eclipse API for answers. The plugin works like this: Whenever I open a source file I let the plugin parse the source's…
Spoike
  • 119,724
  • 44
  • 140
  • 158
6
votes
2 answers

Eclipe PDE: Jump to line X and highlight it

A qustion about Eclipse PDE development: I write a small plugin for Eclipse and have the following * an org.eclipse.ui.texteditor.ITextEditor * a line number How can I automatically jump to that line and mark it? It's a pity that the API seems only…
autobiographer
  • 945
  • 1
  • 9
  • 8
6
votes
2 answers

How to get the absolute path of project files in eclipse using plugin

I am trying to create a plugin which would give me a list of absolute path of all the files inside a project opened in eclipse. I tried but I am able to get the path of the active window only.. My action code is: IWorkbenchPart workbenchPart =…
user1901079
  • 427
  • 2
  • 7
  • 19
4
votes
1 answer

How to wait until Eclipse IProject.create() and IProject.open() are completed before running Eclipse Java project

I have an Eclipse plugin that automatically loads existing Eclipse Java project to workspace, opens it and finally runs the Java application. If the Java project already exists in the workspace, the plugin refreshes the project relative to the…
Olli W
  • 45
  • 5
3
votes
0 answers

Invoking "Run" button of Eclipse via code

I have created a sample eclipse plugin development with a button. @PostConstruct public void createPartControl(Composite parent) { Button button = new Button(parent, SWT.PUSH); button.setText("button"); …
Kaviarasu
  • 58
  • 7
2
votes
2 answers

Eclipse life cycle

I'm developing an Eclipse Plug-in. I have Activator class and my own classes. I need an Hashtable that must be initiated when the IDE is loaded and must be kept and accessible (used through several classes) until the IDE is closed.
Crazy Ivan
  • 21
  • 2
2
votes
2 answers

Eclipse API: How to get IFile from an IProject using only the file name?

As stated in the title, I do not have the package names or information. I have a handle to the IProject and a String representing the name of the IFile. The IFile is a .java class file, and the IProject is a Java project. Ideally, I would like to do…
modulitos
  • 14,737
  • 16
  • 67
  • 110
2
votes
0 answers

Eclipse API: Simulate console linking functionality

When "filename:line" is displayed in the console, it becomes a link to the appropriate place in the code. I'm trying to duplicate this functionality in an Eclipse plugin and not having much. I got a bit of help from these sites: eclipse plugin: How…
user2992958
  • 73
  • 1
  • 1
  • 3
1
vote
1 answer

Eclispe API - How to get parent project location

How to get the parent module of project. Here is my code works fine in Eclipse PDE. But when I test the plugin(installing in eclipse) using test application by selecting the child module this condition (if (projectRoot == selectedResource)) is…
Maana
  • 640
  • 3
  • 9
  • 22
1
vote
0 answers

Eclipse PDE Plugin - change eclipse settings programmatically

im working on a eclipse plug-in which deploys a simplified perspective. Furthermore i would like to change some eclipse settings. For example i would like to deactivate the Content Assitent when the perspective is loaded. Is there a possiblity to…
Niko
  • 31
  • 3
1
vote
1 answer

Print Method Calls

I am trying to print a list of all method calls to the standard output, with information about which method was called, and which method called it. I am trying to do this using the Eclipse API, does anyone know any functions that could be capable of…
Frank Anthony
  • 89
  • 1
  • 2
  • 9
0
votes
0 answers

Eclipse IFile: Create not called when jar is deleted

I have a method that checks if a file exists then it deletes the file but will always create a new file (Jar file). I am using the org.eclipse.core.resources.IFile class for create and delete methods. The code looks like this: if(file != null){ …
ice
  • 141
  • 2
  • 12
0
votes
3 answers

How to programmatically get information in Eclipse

I'm developing an Eclipse Plug-in. I need to programmatically get both filepath and filename of the selected/active file in the eclipse editor. Also need to programmatically add an existing file (located outside the project) to the project and then…
Crazy Ivan
  • 21
  • 2
0
votes
0 answers

How can i embedded aparat video in eclipse without relative?

I want to add movies in my app how can i embedded them in my app without relative movies at end ? my Movies uploaded in aparat (like youtube ) .
1
2