jbushmaster007 / anyedittools

Automatically exported from code.google.com/p/anyedittools
Other
1 stars 0 forks source link

"Open File under Cursor" does not work #105

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run ccc as an external tool on a .cc file that contains a compile error
   --> the output will appear in the Console
2. Select the error line (that contains the file path and line number)
3. Select "Open File under Cursor"

Expected output:
I expect that a new editor window will open (or that the focus will go to the 
appropriate editor window if the file is already open) and the cursor is set to 
the correct line

What I see:
The "Open Resource" dialog pops up and nothing else happens.

What version of the product are you using? On what operating system?
I'm using Eclipse Luna (4.4.1) and AnyEdit 2.4.11.201409071702 on a Linux 
machine. However, I had the same issue already in earlier versions of both, 
Eclipse and AnyEdit.

Please provide any additional information below.
I can reproduce the problem by entering any file path in the standard editor 
and then right-clicking the path and selecting "Open File under Cursor". If I 
enter absolute paths of existing files, it works as expected. However, if I 
enter relative paths of files from any Eclipse project, it does not work. 
The problem exists in both, the standard editor and/or the Console output.

Playing around with the standard editor, I have found the following:
If I call "Open File under Cursor" from a file within a project, it will find 
files from the project even if only the file name (without path) is specified.
However, it won't find any file outside the project.
Or the other way round: If I call "Open File under Cursor" in a file outside a 
project, it won't find any file in the project.

The console does not seem to have the project context and therefore does not 
find the files in the project.

The code seems to work only for specific console types and launch 
configurations, see  getProject(IWorkbenchPart viewPart) method

https://code.google.com/a/eclipselabs.org/p/anyedittools/source/browse/AnyEditTo
ols/src/de/loskutov/anyedit/util/EclipseUtils.java#132

I'am using the "CDT Global Build Console" and my projects are C++ projects.

Original issue reported on code.google.com by bot...@gmail.com on 29 Jan 2015 at 4:26