This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Usecase: Allow to open a file which is encoded within a string literal. Consider this example: package com.toy.anagrams.lib; public class NewMain { public static void main(String[] args) { System.out.println("filename = " + "com/toy/anagrams/lib/WordLibrary.java"); } } When I (CTRL-)hover above the literal "com/..." and the file path defined by the literal exists then allow me to open that file in the editor. Note: I have seen this feature in Intellij IDEA and there is also an eclipse plugin [1], which provides this feature. [1] http://andrei.gmxhome.de/anyedit/ (Eclipse plugin)
Created attachment 141787 [details] Proposed patch @Dusan: I like to propose a patch for this RFE. Please review. The patch contains a "simple" hyperlink provider which is responsible to get the path out of a string literal and to open the respective file. When there are no matching files (File.exists) then no hyperlink is produced. When there are multiple matches a dialog pops up which asks the user to choose a file to open. Some open issues * cache the results for the same path, because checking for existence is an IO-operation * replace the popup dialog with floating listbox like "Open implementations"
Created attachment 141788 [details] Patch in action
(In reply to markiewb from comment #1) > > Some open issues * i had to add a dependency to org.netbeans.modules.java.project to get access the constants for the source root query
FYI: I created a separate plugin to provide this feature http://plugins.netbeans.org/plugin/52349/?show=true
Lowering the prio to P4, because my plugin works as expected