I have it working for case 1, but not sure how to handle case 2 without creating language specific code and was wondering if there is an API available that can convert the reference to the file. In my plugin I detect that the string is a reference and convert it to a Markdown link to the file. However in those IDEs/languages where the string results in a language specific reference, such as Java and Php, the reference needs to be resolved to a file. Alternatively: Edit Copy Path ( Ctrl + Shift + C here on Windows keymap). Where the resulting string is a relative path from the project base path, I can easily find the file being referenced. Right click on editor tab or on entry in Project View and choose Copy path action. PhpStorm: Http/Controllers/MultiMarkdownController.php:77 IDEA (Java): com/vladsch/idea/multimarkdown/psi/impl/MultiMarkdownPsiReference.java:268 All IDEs (IDEA, PhpStorm, WebStorm, … ) have “Copy Reference” action that copies path relative to some module and if the action is invoked from the editor then line number is included.
0 Comments
Leave a Reply. |