Markus R.
Markus R.

Reputation: 61

Eclipse PyDev error message "compiled extension"

In Eclipse, I have the following Console output

Logfile: File "C:\temp2\file1.log", line 1
Testimplementierung: File "A:\TestSafety\file2.py", line 222

Both paths are shown as hyperlinks.

When I click these hyperlinks in Eclipse Kepler, the files are openend in the Python Text Editor (this is what I want). When I click these hyperlinks in Eclipse Luna or Mars, it works for the second file. For the first file, I get a dialog "The definition was found at: C:\temp2\file1.log (which cannot be opened because it is a compiled extension)"

Whats going wrong here?

Note: A:\TestSafety is my Eclipse Project. C:\temp2 is outside of my Eclipse workspace. Somebody told me I should add a "Link to existing source" into my Eclipse project, which seemed to work for a file, now it is broken again and I don't know why.

Upvotes: 2

Views: 976

Answers (1)

Markus R.
Markus R.

Reputation: 61

It seems I've found the solution: Open Window -> Preferences, goto PyDev -> Editor -> Code Style -> File Types, look for "Valid source files (comma-separated)" and append ", log".

The file extensions listed in this filed are evaluated by FileTypesPreferencesPage.java:getDottedValidSourceFiles(), which is called by PythonPathHelper.java:isValidSourceFile(), which is called by PyGoToDefinition.java:doOpen(), which is the method raising the error message.

Now my *.log file opens when I click on a hyperlink to it in the Text-Editor.

Upvotes: 4

Related Questions