Goto File with partial path broken

Hi,

In Goto File (Ctrl-Shift-N), the ability to search with a partial path and a file name seems to be broken (as of at least build IC-135.667), e.g entering someth/build.xml to find something/head/build.xml. Assume this is just a regression, not intended behaviour?

Cheers,

Steve

7 comments

It's definitely not in intended behavior. In fact, everything works for me. Could you please try File | Invalidate Caches and retry? If the problem persists, please provide some screenshots illustrating the issue and your log (Help | Show log)

0

This is still an issue on the latest EAP (build #IC-135.815), although it looks like my caches/indexes may just be in a dodgy state.

I've created a simple test project to demonstrate the problem - see test-project.zip attached.
This is the search without any path, showing the two build.xml files:
search-file.png
This search should return the build.xml file in the common module (but returns nothing):
search-file-with-path1.png
I've attached the log, which seems to show that:
- it fails to  read one of the index files (FilenameIndex.project...true), which  definitely exists in that location and is readable,
- it fails to invalidate caches (throws an exception)

Presumably if I manually wipe out the caches/indexes (delete /system directory?), it should correct itself, but thought I'd run it past you first.

Thanks,

Steve



Attachment(s):
test-project.zip
idea.log.zip
0

Cache invalidation went OK, the trace you see in the log is not an exception, it's just a way of recording when caches were invalidated.

The exception about FilenameIndex.project.7786636.242908.true is something more serious, we need to investigate that.

But it doesn't prevent Goto File from functioning, at least as it's designed currently. The folder "common" is not inside your project and is not therefore considered part of the path because only the paths relative to module content roots are considered. Both build.xml's are directly under module content roots, so there are no folders that can be used for narrowing the search unfortunately. In previous versions of IDEA, the whole absolute path of the file was considered. That's why it worked for you, but that also produced tons of false positives, that's why it was changed.

0

Ah, ok - that makes sense, but it will be annoying to lose that functionality. Perhaps you could allow the (partial) module name to narrow the file search, i.e. <module>/<file> in the search box?

In general it would be useful to be able to override the assumption that the module root directory name identifies the module; all our modules are under .../<module>/head, so my Project view contains "head [common]", "head [utils]", etc (which is messy) and the navigation bar doesn't show which module the current file is in (just head/<filename>). Would be good to get the search at least sorted out  - otherwise there's a danger my colleagues using Eclipse will finally have one feature that it does better!

Thanks,

Steve

0

Great, thanks.

Eclipse uses the module name as the base of all files in that module - it completely ignores the directory you define as the source root of the module.

Steve

0

I see, thanks. I'm not sure that completely ignoring this directory is a good idea, maybe prepending the module name would be
better.

0

Please sign in to leave a comment.