ColdFusion icon indicating copy to clipboard operation
ColdFusion copied to clipboard

Add the ability to <modifier>-click to open template file from cfmodule or cfinclude

Open redtopia opened this issue 13 years ago • 10 comments

In CF Builder, you can CTL-click (windows) on the file path (template="../filename.cfm") from or (or the cfscript equivalent) and the editor will find and open the file for you. It would be great to add the ability to do this from src="filename.js" or link="filename.css" as well.

redtopia avatar Nov 06 '12 19:11 redtopia

This is already available via the Open-Include plugin https://github.com/SublimeText/Open-Include

atomi avatar Nov 06 '12 20:11 atomi

I've been using Open-Include, but I'm running into problems... mainly that it finds my include or module file even if my path is incorrect. Maybe it's caching file info? Either way, one reason why I like this feature in ColdFusion Builder is that I know when my paths are incorrect simply by trying to open the file. Also, Open-Include doesn't know about ColdFusion server mappings. Considering these two issues, my vote would be to re-open this feature request.

redtopia avatar Nov 14 '12 07:11 redtopia

To your first problem, I would recommend posting the issue to the Open-Include repository.

In regards to the ColdFusion mappings, as far as I know the only way to retrieve them is through the ServiceFactory java object. And that is cumbersome via python.

I'll re-open this issue for you, if only, to increase visibility as there may be other ways to pull the mappings into Sublime that I'm not aware of. If you'd like you could request the ability to manually add mappings and post this as a feature request to the Open-Include repository as well. It sounds like a great idea and it benefits users of other cfml engines and languages.

But, I'd like to be clear and make sure it's understood that implementing open includes here would duplicate the functionality of another well supported package which is not something I'm keen on doing.

Edit: sorry for ninja edit.

atomi avatar Nov 14 '12 08:11 atomi

I will open an issue with Open-Include and see what comes up. I understand the complexities of accessing Java from Python, but this might be a worthy goal for this project.

redtopia avatar Nov 14 '12 15:11 redtopia

Just found out that Open-Include will find files located at different locations by design. The intent is to help in situations where a path is constructed programatically:

var path = "../../";

then...

path + "filename.html"

I personally don't think it's a good feature for Open-Include, but they seem to like it.

redtopia avatar Nov 14 '12 16:11 redtopia

Open-Include just posted a new feature - found in package settings:

//strict means; the path needs to be complete and correct, if not the file will not open and the package will not attempt to find the file. "use_strict": true

redtopia avatar Nov 14 '12 16:11 redtopia

Great.

I'm going to go ahead and leave this open for now just to see if an easy way to get ColdFusion mappings into Sublime comes up. I'd rather not rely on 3rd party libraries but I'll play around with it a little and reach out to @titoBouzout if there's a solution.

atomi avatar Nov 14 '12 17:11 atomi

Hello! Do you need help with something? I was unable to understand what is neeede reading this issue, Regards

titoBouzout avatar Nov 15 '12 16:11 titoBouzout

Hey @titoBouzout.

We'd like to use "mappings" which are extra paths for open-location to search files in. I was thinking about pulling a list of these mappings from a server using python to java, but manually adding per project mappings sounds like a better idea to me.

atomi avatar Nov 15 '12 17:11 atomi

@tito, you helped yesterday by adding the preference "use_strict". This came up because I originally added a feature request to this ColdFusion plugin to do the same thing as Adobe ColdFusion Builder eclipse plugin, which finds your include files for you. What the Open-Include plugin does not do is connect with the ColdFusion server settings to include search paths that are specified within the server. Therefore, this issue remains open for this plugin.

redtopia avatar Nov 15 '12 17:11 redtopia