-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add substitution variable for line_number #212
Comments
For now I am using a bash script with the Eclipse built in "External Tools Configurations..." This is of course only for my special case described above. And no error handling, nor input sanitization is done. set -x
selected_file=$1
selected_text=$2
echo "$selected_file"
echo "$selected_text"
selected_file_no_ext=${selected_file%.cudato.cpp}
echo "$selected_file_no_ext"
line_number="$(grep -nF "$selected_text" "$selected_file" | head -n 1 | cut -d : -f 1)"
echo "$line_number"
eclipse -name Eclipse --launcher.openFile "$selected_file_no_ext".cu:$line_number
|
Workaround can be configured similarly to this Stackoverflow page answer. FYI: |
... add substitutions for selected text #219 Signed-off-by: Andre Bossert <anb0s@anbos.de>
... add substitutions for selected text #219 Signed-off-by: Andre Bossert <anb0s@anbos.de>
... add substitutions for selected text #219 Signed-off-by: Andre Bossert <anb0s@anbos.de>
... add substitutions for selected text #219 Signed-off-by: Andre Bossert <anb0s@anbos.de>
... add substitutions for selected text #219 Signed-off-by: Andre Bossert <anb0s@anbos.de>
... add substitutions for selected text #219 Signed-off-by: Andre Bossert <anb0s@anbos.de>
@bigla see new pre-release v2.3.0-beta.2 |
Goal
Open the source of a derived file when debugging derived files at exact same line. Because this makes this great tool even more flexible.
Explanation
I have some project generating derived files from source files with a different extension, without changing the file line numbers.
I'd love to be able to open the source file in an external editor passing the exact same line number where I am currently at (or where warnings and errors are indicating problems) using something along the lines of:
eclipse -name Eclipse --launcher.openFile ${easyshell:container_name}${easyshell:file_separator}${easyshell:resource_basename}.cu:${easyshell:resource_line_number}
Any occuring line breaks in above command not intended!
Example files:
derived file: myDerivedfile.cudato.cpp
source file: myDerivedfile.cu
Suggestion for a substitution variable name
${easyshell:resource_line_number}
The text was updated successfully, but these errors were encountered: