Monday, March 04, 2019

Open .java file for .class file


M2Eclispe supports resolution of dependencies from Workspace projects. With this you can click on a method from dependency owned class, M2Eclipse will automatically load the .java file for that .class file from. This is fine and dandy as long as your projects are Maven based. No fear...I wrote a simple Eclipse plugin to do just that - Open .java file for .class file.

How it works


Monitors the opening of a .class editor. Then uses the JDT Java search mechanism to locate the corresponding .java file in any of the Java projects in the Eclipse workspace. It also tries to move the caret to the same offset in .java file. By default closes the .class file, however by setting a preference you can opt-in to not close the .class file. The association of source folder with the .jar file containing the .class file is required for this to work.

Preferences


Github

https://github.com/sandipchitale/odjfdc

Update site

https://sandipchitale.github.io/odjfdc/OpenDotJavaForDotClassUpdateSite/site.xml


Eclipse Marketplace

https://marketplace.eclipse.org/content/open-java-file-class-file

Wednesday, February 27, 2019

Devtools App (Angular)


UPDATE: Release 1.0.8 Load devtools code ignoring cache by CTRL+SHIFT+Clicking when launching devtools.

UPDATE: Release 1.0.7 also allows using the Chrome devtools master branch as your devtools frontend.



UPDATE: Go to members all files will go to source mapped location when available. Also builds a cache (WeakMap) first time so subsequent invocations are very fast.

UPDATE: Version 1.0.6 is released. Download from Github releases page.

I have implemented a Angular based Devtools App using Electron framework. It allows you to use any hosted Chrome Devtools instance as your devtools frontend. For example, by default it will load my enhanced Chrome Devtools which implements the Go to members all files ( Ctrl+Shift+8 on windows, Command+Shift+8 on mac) action. With this you can find and navigate to classes, functions and properties in all the loaded scripts not only in active source script editor.

If you are debugging an app written in Typescript e.g. Angular app, make sure to Enable JavaScript source maps in Settings to take full advantage of Go to members all files functionality.

Screenshot




Github repository for Devtools App (Angular) The README in the repository explains how to use it.

Download the distribution zip.