Netbeans "Drop to Frame" debugging

I took me a while to figure out how to rewind the stack while debugging in Netbeans. This feature is called “Drop to Frame” in Eclipse and there is accesible in the toolbar. In Netbeans the feature that allows you to go back in the callstack is called Pop to Here and you invoke it right clicking on the stack. There is also a “Debug / Stack / Pop Topmost Call”

July 15, 2010

Eclipse bug 149890 finally solved

After long long time since the bug #149890 was reported on 2006-07-06 has been finally resolved on 2008-02-03. I wonder if my comment on javalobby a couple of days ago has something to do with this. Now it seems that is possible to have a dynamic MenuManager as a submenu of the parent MenuManager.

February 6, 2008

Eclipse Bug #201116 update: Switch compare viewer for java files

I’ve submitted a patch (Attachment #77777 and a couple of screenshots ( Attachment #77774 y Attachment #77776) to Bug #201116. It’s only a preliminary work but it enables the user to select with contentMergeViewer to use with each FileType/ContentType. Now it’s only useful if you use my java formatting compare plugin. Currently the org.eclipse.compare subsystem will allow only one contentMergeViewer per fileType or contentType and you cannot tell which one it will be as Szymon Brandys comments. With this patch the user can select/switch which one he wants to use among all viewer registered for a given file extension/content type. ...

September 6, 2007

Eclipse #201116 contentMergeViewers discarded

I filled Bug 201116 – Compare will silently discard additional contentMergeViewers associated with the same file extension a couple of days ago. As Szymon Brandys says eclipse should allow the user to switch between the differente merge viewer available for a given extension. He proposes two solutions: Having a mechanishm inside the compare view to do the switch or having a preference page to do the same I feel more inclined towards the second solution, as I’m used to change the defautl editor for .xml, etc though the preference page General -> Editors -> File Associations. Having a similar preference page would fit me. I’m trying to figure out how to integrate a preference page to org.eclipse.compare and send it back to eclipse.org to include it in the next release.

August 31, 2007

Updating the java compare plugin

I received some comments about my java compare plugin about my plugin ignoring preferences for text font and formatter settings. I didn’t address those at the beginning because I didn’t notice so as soon as I realized that was missing I put my hands at work. The java formatter settings was easy just modifying the old final Properties options = new Properties(); final CodeFormatter codeFormatter = ToolFactory .createCodeFormatter(options); with final Map options = JavaCore.getOptions(); final CodeFormatter codeFormatter = ToolFactory.createCodeFormatter(options); That’s easy. The font issue was also easy, just adding the following snippet to the plugin.xml did the trick: ...

August 23, 2007

Eclipse Compare. Ignoring java formatting changes not only whitespace.

I met some difficulties dealing with the default eclipse java compare. I got involved on a project where everybody likes to commit code to CVS formatted their way, so comparing between CVS revisions is almost impossible. So I decided to start investigating about Eclipse plugin development to make a Java Compare Viewer that not only ignores whitespace but also all java formatting changes. The result is the following *Before *ignore java formatting plugin: ...

August 18, 2007

Eclipse Error Reporting: Exception stacktrace details

I’m working with Eclipse 3.2.2 RCP right now and I’m getting an exception that I want to display on screen. I found in the eclipsepedia that we must use ErrorDialog to report errors: try { // ... } catch (InvocationTargetException e) { IStatus status = new Status(IStatus.ERROR, Application.ID, 1, "Exception found.", e.getCause()); ErrorDialog.openError(window.getShell(),"Error while loading file", null,status); } But using this code snippet will only print the e.getLocalizedMessage() in the Details pane of the ErrorDialog. See screenshot ...

July 25, 2007

Eclipse Preference Page Extension Wizard troubleshooting

Today I tried to add a Preference Page to an RCP application that I’m working on with no luck. After executing the Extension -> Add -> Extension Wizards -> Preference Page I end up with 3 new classes. But 2 of then have compilation errors, they refer to an unexisting PreferenceClass. After googling a bit I found this message in a mailing list describing the same exact problem: >Hello, I ’ve added preference page in my application using plugin.xml extensions template. Then, in a new package, Eclipse created 3 classes (Template preferences page extending FieldEditorPreferencePage, a preference constants class and a preference initializer class). The template preferences page uses a PreferenceClass which doesn’t already exists… I suppose this class has to initialize the preference store, in the preference template class constructor, unsing the plugin instance of the product : “setPreferenceStore(PreferenceClass.getDefault().getPreferenceStore());” I’ve tried to extend the AbstractUIPlugin (I’ve read in differents articles from eclipse.org) to catch the plugin instance when it is created, but without succes (when to catch this single instance during startup of eclispe core runtime ?). Then I’ve found the existance of the WorkBenchPlugin class which holds this static instance, I used it, discarding PreferenceClass , but Eclispe tells me that the use of this class is discouraged. Why ? How is it possible to store the plugin instance at startup ? Thanks a lot for your help, frank ...

June 29, 2007

Compiling and building JMeter with Eclipse 3.2.x

The developer notes on how to compile and debug Jmeter with Eclipse 1 and 2 are very difficult to follow and outdated. If you are interested in modifying Jmeter using Eclipse 3.2 Callisto you can follow the following procedure: Install Subclipse Callisto release (update site: http://subclipse.tigris.org/update_1.2.x) Download optional libraries. Although they’re optional is better if you download them. mail.jar activation.jar beanshell bsf jexl Use SVN Repository Exploring and add the following repository http://svn.apache.org/repos/asf/jakarta/jmeter Navigate to tags/v2_2. Right-click on it and select Checkout. Use then New Project Wizard. Rename the the eclipse.classpath to .classpath. Delete the eclipse generated .classpath first. Change the Build Classpath. Select the project in the Package Explorer. Right-click it and select Properties~~Java Build Path~~> Source. Then uncheck Allow output folders for source folders and set the Default output folder to the <Project name>/lib/ext. Remove the exclusion patterns for images/*, etc. in the Build Path->Source Look with the Navigator (not the Package Explorer) in the lib/ext folder and see if eclipse is compiling ok. If not check the Problems view to see if the project was not built since its build path is incomplete. Probably your are missing some library. Commons-logging has to be change from commons-logging-1.1 to commons-logging. If it complains about javax.mail.MessagingException then you have to add mail.jar to the build path At startup JMeter search for classes deriving from JMeterGUIComponent or TestBean. Now the context menus are populated with items. ...

April 25, 2007

New views don't show up when using Eclipse RCP setSaveAndRestore

If you add a new view to an Eclipse RCP and when launch it the new view is not there you probably hit the problem described in this CT Arrington’s Weblog post. The IWorkbenchConfigurer.setSaveAndRestore(true) called from your WorkbenchAdvisor can be the source of the problem. The Eclipse RCP platform is trying to restore the perspective from the serialized version stored on disk so it fails to load you new changes. You have several solutions [from the CT Arrington’s Weblog post]. ...

April 23, 2007