dzsessona / QuickOpener-NetBeans

Sometimes while programming in NetBeans you want to explore a particular file that you are editing on the file system browser, or maybe launch a command in a terminal to do something with it.
52 stars 41 forks source link

Add relative to project path parameter #18

Closed goof03 closed 11 years ago

goof03 commented 11 years ago

Or perhaps you have a tip : id like to launch scp comand like : scp ${currentFile} blah@myserver:/project_root/${relativeFile}

dzsessona commented 11 years ago

So basically you are missing the relative path of the currentfile from the project root right? As a quick fix i would call a batch file passing the current file and the project (relative path = {currentFie} - {currentProject}); the batch file finds the relative path with a simple substring and call the command. I think i could add the relative path of the fie with not much effort anyway, but the only problem is that i don't know when i will have time time to do it, maybe next week? Will let you know.

dzsessona commented 11 years ago

view committ db59c14efeea963d6d41c452567e58e896272148,if the main project is set, now you can use in the commands the variable ${relativeFile} and ${relativeFolder} they get replaced as follow (example):

example project: C:\Users\sessonad\Documents\NetBeansProjects\JavaApplication14 example selected file: C:\Users\sessonad\Documents\NetBeansProjects\JavaApplication14\src\javaapplication14\JavaApplication14.java

so

${relativeFile} = src\javaapplication14\JavaApplication14.java ${relativeFolder} = src\javaapplication14

it will be available in the version 12.09, will notify you when i upload the .nbm file here and in the netbeans portal. Let me know if that would work for you.