Ctrl-Shift-N and unknown extensions

Currently, the Ctrl-Shift-N behavior is to NOT propose files
that would match the criteria but have an unknown (non-associated)
extension.

This can be terribly confusing (and worse, misleading) especially
for new users.

Wouldn't it make sense to show those files in the Ctrl-Shift-N popup
and if selected, ask for a possible type association? This would be
more consistent with the project-view tree which shows ALL files.

By the same token, Search In Path ignores files with an unknown
extension. This recently led to a bug on our team where a wide
renaming issue was marked as 'resolved' even though later on we
discovered that the installer configuration files (plain-text) had been
missed by the fix. It would have been nice to have the option to
search ALL files.

Vince.


20 comments
Comment actions Permalink

missed by the fix. It would have been nice to have the option to
search ALL files.


Are you certain you'd like search (and replace) in .exe, .dll, .class etc?

-


Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

Maxim

>> missed by the fix. It would have been nice to have the option to
>> search ALL files.
>

Are you certain you'd like search (and replace) in .exe, .dll, .class
etc?

>

Those suffixes are ideal candidates for an exclusion list.

Alain

0
Comment actions Permalink

Yeah, that's for sure. But we're talking about unknown extensions, aren't we?
Thus we made an assumption for unknown types to be treated as binary ones,
just for safety reasons. If I'm not mistaken that's how every other app behaives.
-


Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

For unknown extensions, a simple probe could quickly tell with high
accuracy whether we're talking binary or plain text. Some extensions
like .zip, .dll, .so, .exe, .class could be safely associated with a
'binary'
type or even 'unknown binary' type, or just excluded like Alain suggested.

I don't think every other app behaves the way IDEA does, at least not
the ones I use :). grep, for exemple, will report every file that matches,
binary or not and offers options to deal with binary files. Actually most
of the apps I use will search everything unless I restrict the set of
extensions
to be searched.

For Search, a "search unknown extensions" check-box would help
(but I believe you would have to revisit your indexing strategy).

Vince.


0
Comment actions Permalink

You could add a checkbox similar to "Include non-project files" called
"Include all file types" or something like that.

Maxim Shafirov (JetBrains) wrote:
>> missed by the fix. It would have been nice to have the option to
>> search ALL files.


Are you certain you'd like search (and replace) in .exe, .dll, .class etc?

-------------------
Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

Alain Ravet wrote:

Those suffixes are ideal candidates for an exclusion list.


Or .so, .jpg, or or or or or.... lots of binary files out there...

0
Comment actions Permalink

He's not asking for search-and-replace. He's asking for "Goto File". It seems reasonable that "Goto File" should have special semantics for unknown file types, that all the other search modes can safely ignore. In fact, I'd like "Goto File" to not only show me all the files with unknown type, but ask if I want to bind the extension to a type if I select it, and then open up in the correct editor.

I have to agree. Yes, it really is jarring when Ctrl-Shift-N leads you to believe a file doesn't exist simply because it doesn't ask for a known extension. For all other searches, that's appropriate, but not for "Goto File". I actually lost a half-hour of work due to forgetting that semantics a few months ago.

--Dave Griffith

0
Comment actions Permalink

Yes, "Goto File" should show files with unknown extensions too. And pop up the "Register New Extension" dialog if one is selected.

I have experienced multiple times I was looking for a file but couldn't find it using "Goto File". After trying many variations of the file name I realize the extension is not registered. Minutes wasted!

Searching files with unknown extensions doesn't sound like such a good idea though. At least I wouldn't want my binary files to be searched, so they would have to be excluded somehow.

Bas

0
Comment actions Permalink

"Make 'GoTo File' support unregistered file types"
http://www.jetbrains.net/jira/browse/IDEA-2428

Vince.


0
Comment actions Permalink

Maxim Shafirov (JetBrains) wrote:
>> missed by the fix. It would have been nice to have the option to
>> search ALL files.


Are you certain you'd like search (and replace) in .exe, .dll, .class etc?


I would like to be able to search .ini-Files. Unfortunately, my
bug report http://www.jetbrains.net/jira/browse/IDEA-2061 hasn't
even been touched (and still occurs in the latest Irida build) ...

Regards,
Jens

0
Comment actions Permalink

I propose a new file type "binary". Some extensions could be registered for it by default, e.g. "exe" and "dll".
If I "go to file" to a binary file it should be selected in the project tree. Most of the time I just want to view/find its location or copy its path.
Binary files could be excluded from search/replace.
(Of course it would be nice if there were a hex editor, so that such files, could also be edited, but that's a little out of scope for Idea, isn't it?)

It feels so very stupid that I have to click my way all through the project tree to find a "zuml" file (our uml models) - while there is such a powerful, fast wildcard search.

0
Comment actions Permalink

Why not just register zuml to some file type?

-


Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

Well,
We'll look into possibility to include unknown files to CtrlShiftN.
Search is no-no. Don't even ask :)

-


Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

That's what I finally did, registered to image file type, which seems to do no harm - image viewer opens without showing anything.
A "binary" file type would be nicer.

However as I am such an active EAPler I frequently clear my caches and config to not to report false bugs.
Each time I am baffled that all my zuml's and vm's cannot be found any longer.

It would also be much easier to register them to the binary file type (resp. text for vm) if Idea would find them in "go file" and then just ask me.

0
Comment actions Permalink

Great, your fix was fast.
Can we make that a pattern: If we argue longer than you need to fix it, you'll surrender ;)

0
Comment actions Permalink

Yep, sorry. I still have issues with Jira's search :(
("Quick Search" helps but the "Find Issues" is competely
worthless).

Vince.


0
Comment actions Permalink

I'd like to register a 'no' for this one. I think it works fine the way it is. What I don't want is a mass of files in the box that I'm not concerned with. If they were relevant to the project, then I'd register them as a file type.

If folk really want to do this, then how about a 'find file' under the 'search' menu, or something like that.

0
Comment actions Permalink

If they were relevant to the project, then I'd register them as a file type.


If they are irrelevant to your project, just don't put them below a module root?!

You can also add exclude folder in the module paths settings.

0
Comment actions Permalink

Doesn't work for files that get generated during build processes. They turn up in the same directories, and will now show up in the search.

+If they are irrelevant to your project, just don't put them below a module root?!

You can also add exclude folder in the module paths settings.+

Er .. and if they were relevant to your project, why don't you include them as a filetype!

Anyway, it seems that JetBrains has made the change already, so the point is pretty moot.

0

Please sign in to leave a comment.