eclipse-plugin-dev

How to show syntax errors in an eclipse editor plugin

How can I indicate syntax errors (e.g. an illegal sequence of tokens) in an eclipse editor plugin just like in the eclipse Java editor, i.e. by red wriggly underlines, a red marker on the scrollbar that you can jump to, and an explanatory message when you hover over either one? I'm writing an eclipse editor plugin for a custom file form...

Error in Preview of Custom Eclipse refactoring

I am implementing an new eclipse refactoring. This will enable developers to Pull-up the preconditions statements from a child method to the parent method. This all works perfectly when I select "Finish" in the refactoring wizard, but when I select "Preview" I get an error "No target edit provided." This seems to be caused by a prob...

developing plugin for eclipse

Hi All, Anybody out there who had developed plugins for eclipse? I am using eclipse for last 4-5 years and am just thinking about developing some plugins for eclipse. I dont know anything about that, like how its written and all. If someone who has experience on this can show light over that, it would be great. Some really good tutorial...

How do I get an IResource from an IEditorActionDelegate

I wrote an IEditorActionDelegate to fire from a context menu on a CompilationUnitEditor. From there I want to create a marker at the start line of the selected text. I have an ITextSelection, and an IEditorPart object. How can I get an IResource from those so that I can call resource.createMarker()? Thanks ...

How to get method name from VariableDeclarationStatement

hi, i have a variable of type VariableDeclarationStatement. I want to get the name of the method from this variable . How can i do that?Help ...

Code generation in Eclipse plug-in

Hi, I'm developing an Eclipse plug-in and I'd like to insert code automatically... sort of create a sample application automatically when the user presses a button. How can I go about it please? Thanks and regards, Krt_Malta ...

eclipse progress bar

Hi! I develop an eclipse plugin and I want to create an progress bar as eclipse view at bottom of the workbench window. I have an example, but this is showed only a moment. Please give me some ideas, thanks ProgressMonitorDialog dialog = new ProgressMonitorDialog(shell); dialog.run(true, true, new IRunnableWithProgress(){ ...

Plug-in Development: Creating Problem Marker for a Given Resource

Hello everyone. I seem to be having a problem with associating a problem marker with a resource; in my case, I'm trying to create a problem marker for the editor. To achieve this, I've tried to do the following: public class MyEditor extends TextEditor{ private ColorManager colorManager; public MyEditor() { super(); ...

How to display an error sign on the Package when the Package has wrong information?

As you know, If package has a compile error then the package display an error sign. Error sign means Red circle with 'X'. My package has some other type file. (It is not a Java file.) If user modify the file then My plugin will inspect the file. And should display error sign on the package if the file has wrong information. How can I d...

Eclipse plugin: popup menu extension for ILogEntry (CVS revisions history) not showing (objectContribution at plugin.xml)

Hi, I'm migrating an old eclipse 3.0 plugin to eclipse 3.4 and the popup menu contributed to the CVS revisions history is not showing at all. I have another popup menu contributed to another perspective (CVS repository exploring) and that's working without problems (ICVSResource). The one not working is org.eclipse.team.internal.ccvs.c...

Workspace is closed error

Hi, I am newbie for eclipse. I have created a EMF model and generated a model code for that. I have created one plugin project and i have created one class named as 'CommandTest' which is having "public static void main()" method which reads mymodel resource file. Its working fine in eclipse 3.5.2. There is no issues am able to read t...

How can I show the Problem Marker properly? It is not displayed Text Editor and Problem View.

Hi everyone! I got many ideas from previous question (http://stackoverflow.com/questions/3178996/how-to-display-an-error-sign-on-the-package-when-the-package-has-wrong-informatio) But the Problem Marker is not displayed. My interested resource is XML file. So I add listener for PRE_BUILD means using following code. addResourceChange...

How can I distinguish 'Meta data change' from 'File change'

Hi Everyone! My Resource(XML file)'s listener has two type of events as following. IResourceChangeEvent.POST_CHANGE | IResourceChangeEvent.PRE_BUILD When POST_CHANGE occurs, My plugin will parse the Resource(XML file). And when PRE_BUILD occurs, My plugin will add Problem Mark as following IMarker marker = file.createMarker(PR...

Eclipse plugin - get a list of Eclipse projects and their contents in a wizard

In my Eclipse plugin application I have a wizard to create a new file. In this wizard I need to display a tree of the Workspace projects, their packages and source files, similar to the Package Explorer, so that the user can select the items that are relevant to my particular editor. They won't be edited in the editor itself, but they pr...

How can I enable "Mark Occurrences" in a Java editor that is loaded in a multi page editor?

I am working on a multi page editor that loads opens multiple files (e.g. java, html) in separate tabs of a multi page editor. The files get opened with the default editors associated with the file type and these default editors are embedded in the multi page editor as tabs. Here is how I am determining which editor to load (for a file ...

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 going on: IClasspathEntry cpe = javaProject.getRawClasspath()[8]; cpe.toString(); (ja...

How does JUnit find the eclipse plug-in being tested?

I am writing a plug-in (ClassRefactoringPlugin) that examines source code in Eclipse 3.5.2. The plug-in contains a CallData class that examines a Java source file and figures out which Java elements are called from a method using JDT operations. I wrote a JUnit 4 test for this class that also resides in the ClassRefactoringPlugin proje...

eclipse_customization.ini file and what are differences between application and product

When developing an eclipse plugin, we are using a file named plugin_customization.ini I wonder where I can find detailed information about which setting can be set with help of this file? Another question is when product branding and defining an extension point in plugin.xml file we can define the extension point by the tag product ...

How to Implement Mark Occurrence in own Plugin?

Hi everybody. I am trying to implement a plugin for eclipse. Is it possible to implement "mark occurrence" for the own editor? How can i do it? Thank you very much, Andrey ...

Can I define a view in eclipse which shows html files?

I wonder if there is a way to define a view in eclipse which can render and show html files or with other words a view which works like a browser! I mean a view for an eclipse plugin. For example if I can define a browser based on org.eclipse.swt.browser and associate it to viewcontentprovider? I don't want to open an html file wi...