Author Topic: Find details are global  (Read 3985 times)

dunkers

  • Senior Community Member
  • Posts: 578
  • Hero Points: 26
Find details are global
« on: June 30, 2009, 09:11:02 am »
I'm working on a Delphi project, so do a find and set find to search project files, and then list those as *.pas;*.dfm etc. Then an urgent request to sort something out in a C project arrives, and I do a search in the project files but can't find anything. I use a string I know exists but it's not found...

Of course, spelling it out here the problem is obviously that C projects don't have .pas files, but that's very non-obvious to me in panic mode.

I think the find parameters should be stored per project so switching between projects doesn't require you to reconfigure all your tools. It's even more painful when the diversion took 2 minutes (after 10 minutes of sorting out why find didn't work) and then you have to change everything back to the previous project and settings.

jimlangrunner

  • Senior Community Member
  • Posts: 354
  • Hero Points: 30
  • Jim Lang - always a student.
Re: Find details are global
« Reply #1 on: June 30, 2009, 01:38:02 pm »
I can see conflicting demands here.  I like the Slickedit Regex (as opposed to Unix or Brief or Perl).  I'd like to be able to select it and have it stay forever.

However, when I'm working on a web project, I need .php, .htm, .html, etc.  On a VS project I need other extensions, and for generic text editing,  I generally look at all files. 

I think I can legitimately see arguments for having any or all of those settings both global and project-based.  How to decide? 

Not to belittle your aggravation. It'd drive me nuts. I'd like to see the same kind of enhancement myself. But I don't know how I'd like best see it addressed.

Jim.

dunkers

  • Senior Community Member
  • Posts: 578
  • Hero Points: 26
Re: Find details are global
« Reply #2 on: June 30, 2009, 02:47:49 pm »
a tickbox: "Use project settings" :)

Something similar (local vs global) happens with things like language formatting, where you set the default setting in options but you can modify that on a per document basis from the document menu. That changes only the current document and not the globals. If we ignore things that aren't relevant (per document instead of per project, and saved in user settings? rather than project settings) if does show in principle how global default settings and overriding project settings could be combined.

Having said that, I don't really think it's a global vs local issue. What struck me was that SE plainly knows it's a C project yet sticks with what it knows are Pascal file extensions. Some parts of the dialog could be a little more intelligent that is currently apparent.

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: Find details are global
« Reply #3 on: June 30, 2009, 03:12:55 pm »
Yes, I've run afoul of this myself. My preferred solution would be to assign each project type an associated "Files of Types" filter. For Generic projects, the users would be able to assign it themselves. SlickEdit would then use that for searching.

On the other hand, the items you have searched for do seem like they are part of your work history and should be changed when you switch workspaces. That's really the purpose of workspaces: to set up different areas to work in and tie projects together.

Both probably need to be done. I'd like to hear more feedback on this one, please.

dunkers

  • Senior Community Member
  • Posts: 578
  • Hero Points: 26
Re: Find details are global
« Reply #4 on: June 30, 2009, 03:57:17 pm »
That sounds a reasonable approach. I agree (surprise!) that this is what projects are for (since a workspace could have different language projects).

Graeme

  • Senior Community Member
  • Posts: 1985
  • Hero Points: 227
Re: Find details are global
« Reply #5 on: July 01, 2009, 01:18:24 am »
When I do "search in project" I set the files filter to *.* and mostly I never need to change it.  Currently slick includes non text files in the *.* search.  I think for *.* and project / workspace search it would be better to exclude file extensions that are known to be not text files (doc, pdf etc).  Also, if slick finds no files to search in, it currently states this in the search results but it's not very noticeable, so an improvement would be to bring up a dialog box with some options - search all files, search files of type etc.  Or if the files filter means some project files get excluded from the search, bring up a dialog box informing that some files weren't searched.  I switched to *.* a while ago when I realised the danger of the project search silently excluding some files.

Graeme

dunkers

  • Senior Community Member
  • Posts: 578
  • Hero Points: 26
Re: Find details are global
« Reply #6 on: July 01, 2009, 09:45:31 am »
The *.* is certainly a good workaround++, particularly for me. I tend to use 'find in files' when a normal tag lookup fails and I'm looking for any instance at all in the full project

Graeme

  • Senior Community Member
  • Posts: 1985
  • Hero Points: 227
Re: Find details are global
« Reply #7 on: July 01, 2009, 11:46:13 am »
Thanks for the HP but I don't think I deserved it.  I gave you one back for reporting the problem  :)

Graeme

dunkers

  • Senior Community Member
  • Posts: 578
  • Hero Points: 26
Re: Find details are global
« Reply #8 on: July 01, 2009, 12:58:34 pm »
 ;D Thanks

Tim Kemp

  • Senior Community Member
  • Posts: 514
  • Hero Points: 83
Re: Find details are global
« Reply #9 on: July 01, 2009, 04:59:13 pm »
I've certainly run into the situation where I search for a string and it doesn't even find it in the file I'm looking at.  Sometimes it's a result of having the wrong file types selected, more often it's the result of "Color".  I love the "Color" feature, but I'm always forgetting to turn it off.

It would be nice if line at the top of the seach results could let you know that a non-default color is selected in addition to things like "Ignore case".

- Tim

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1092
  • Hero Points: 94
Re: Find details are global
« Reply #10 on: July 01, 2009, 05:22:35 pm »
It does list which Color options are enabled for Find in Files at the top of the Search results, but it doesn't appear to do that for the "List all occurrences" for the single buffer case.   I'll make sure that gets filed so that can be addressed for that the next release.

Color options are also listed in a label underneath the Color... button in the Find and Replace tool window.  Even there it is sometimes overlooked.  I've gone back and forth on the idea making that label bold or perhaps another color to make it more obvious when it Color searches are enabled.

Tim Kemp

  • Senior Community Member
  • Posts: 514
  • Hero Points: 83
Re: Find details are global
« Reply #11 on: July 01, 2009, 05:37:28 pm »
If you made the label summarizing the Color selection bold and another color when it's not "none" I might notice it.  I appreciate you helping me to do fewer dumb things.   ;D

- Tim

hs2

  • Senior Community Member
  • Posts: 2727
  • Hero Points: 281
Re: Find details are global
« Reply #12 on: July 01, 2009, 06:07:31 pm »
This is what I do since quite a while - setting e.g. 'Colors: String' or 'Colors: ---'.
It an easy change and maybe bold would be enough.
HS2