Search for text in IntelliJ only in files with specific prefix - regex

Pretty sure this can be done with Search Everywhere using a rejex, I want to find all instances of a word, for example "productCode", but only in files beginning with "Market..."
This is important because "productCode" is a field that is found in many files, and I am looking for specific uses only.
Thanks!
I am using IntelliJ IDEA

You may use this option from the drop-down menu:
Edit -> Find in Path...
Then search as follows:
This will search for content \bproductCode\b appearing in any file starting with Market, anywhere in your project.

Related

Doxygen: Is it possible to strip namespace names in CHM index?

I am working on a C++ project which makes extensive use of namespaces and doxygen. I prefer using the CHM file as compiled by MS HHC over the HTML directory for various reasons. One of them is the very convenient index search in the CHM viewer.
But the calls names in the index are always prefixed with their namespaces which forces the user of the CHM file to enter Namespace::Sub-Namespace::[...]::ClassName in the search.
Regarding this, I have changed the following settings in the doxygen configuration file (referring to the default that comes with the tool):
SHOW_NAMESPACES = NO
HIDE_SCOPE_NAMES = YES
This removes the namespace names everywhere except for the CHM index. (How) is it possible to get rid of the namespace prefixes in the CHM index as well?
As far as I know and tried with a small C# project the answer is - no.
One solution I see at this stage is to edit the resulting index.hhk and compile again by HTMLHelp Workshop. Please have a look into your index.hhk you'll find in your Doxygen HTML output subfolder.
The index.hhk file is a text file and can be openend by any text editor e.g. Notepad++. Having some namespaces only you make a RegEx for your needs and replace e.g. C_Sharp_CHM:: like shown in the screenshot below with NOTHING. But be careful using this and try before going to a production use case.
As you can see index.hhk is an old file format and not HTML as used today. Normally each index keyword has a link and a value (see screenshot, text format is edited here for better reading).
To compile the index.hhp you need to open the command prompt, navigate to your output folder and type "%programfiles(x86)%\HTML Help Workshop\hhc" index.hhp on a Windows 10 machine.

Doxygen, nothing shows up in Graphical Class Hierarchy

I'm trying to use DOxygen to generate documentation for a rather large code base.
I got Doxygen 1.8.10 for Windows with Doxywizard.
I installed Graphviz 2.38
I was able to generate the Textual Class Hierarchy without a problem using Recursive option in the Expert tab.
I selected the "Use dot tool from GraphViz package" option in the Wizard.
I also checked "HAVE_DOT" and "CLASS_DIAGRAMS" options in the Expert tab for Dot.
When I generate the documentation and click on Show HTML Output, I cannot see anything under the Graphical Class Hierarchy. I can still see all the classes and their dependencies in the Textual Class Hierarchy.
in Mozilla Firefox, the Graphical Class Hierarchy page shows up as empty
in Internet Explorer, the Graphical Class Hierarchy page shows a lot of broken image icons aligned in 1 column
What am I doing wrong here?
Thank you,
When you select HAVE_DOT in the Expert Tab, doxygen will assume you have DOT available from the PATH. You need to make sure of this.
However, you also have the DOT_PATH option. Here you can put the path where DOT can be found.
I was able to solve this issue by executing a simple line on CMD which iteratively generates the missing .png files from .dot files.
for %f in (*dot) do dot %~nxf -Tpng -o %~nf.png
Make sure to execute this in /html folder where all .dot files reside and have dot.exe in your PATH environment variable. Also, If you receive any syntax errors, such as:
syntax error in line 1 near 'ëPNG'
try changing the default program of .dot format to Notepad (mine was set to Word).

Sublime Text: interactive confirm for replace?

I need to do a lot of search/replace across 50+ files, and am using Sublime Text 3.
Is there a way to step through and interactively confirm each change? I dont't want a blanket Replace All action that just performs all replacements.
I am thinking way back to vi/vim with its %s/old/new/gc functionality.
Both the Find/Replace and Find in Files/Replace commands don't natively support prompting you if the replacement should happen. Regular in-buffer find/replace just replaces directly and the only confirmation that you can get is when you do a Find in Files and Sublime prompts you to confirm the replacement after telling you how many replacements will be made.
As such, the only way to get something like this is to look to an external plugin/package that would do it's own find and replace option so that you could be asked to confirm the changes.
I'm not personally aware of any packages that would do this, but a search in Package Control turns up the RegReplace package, which lists among its features:
Create commands that highlight results and requiring confirmation before replacing.
That said I've never used the package myself, and from briefly looking at the documentation site it seems like it's only capable of searching in the current document and not across files.
A potential workaround would be to use the native Find in Files to find all files with matches, then manually open them and use RegReplace to perform the same operation again.

Getting list of files and folders on the user's computer with the filename filtered by the text line

Currently I'm developing a project that should do the thing described above on Windows. I have the idea to recurcively go through all user's drives and collect all information on then, but it seems to be really time consuming. So is there a better way to do such thing (maybe to use OS's index file or NTFS MFT)?
I use C++/Qt.
You can search for any of the many code examples for this and use one.
The library finctions which you use FindFirstFile and FindNextFile are optimized and will go firectly to the FAT. They are coded by microsoft & I doubt that there is a faster way.
Btw, what do mean by "filtered by the text line"? Do you mean you want only filenames matching a certain pattern (use teh above) or files containing a string?

Find and Replace/Update links like Dreamweaver in other editors

I've been slowly weening myself off of Dreamweaver and using other editors like SublimeText and Espresso. But there are two features that are lacking in those editors that I still find the need to use Dreamweaver for:
1.) Find and Replace within entire current local site.
2.) Update links when a page is saved within another directory. For example, if you rename, or re-save a file that is open within another directory, Dreamweaver will ask you to update the links. This will then make sure that if the file is moved or saved to another directory it will update any links within the HTML for stylesheets, images, navigation, etc.
Does any know of any other apps or tools that might be able to accomplish those actions without having to crack open Dreamweaver?
Any input is greatly appreciated. Thanks!
The Sublime Text plugin 'Side Bar Enhancements' has Search/Replace entire project functionality. Doesn't handle update links across files (that i've found)
PHPStorm may handle the second question.