How do I Ignore the build folder in NetBeans 'Find In Projects'? - netbeans

Anyone know how to ignore the build folder when doing a 'Find in Projects' on NetBeans (v6.9.1).
Currently the Search results pane shows all results from src folders but also those from the build folder so if your project contains a lot of JSP files for example, many results are duplicated...

I think I've figured out how to ignore the build folder of projects when doing a 'Find in Projects' in NetBeans 6.9.1:
Go to Tools->Options-Miscellaneous.
Click the Files tab.
In Files Ignored by the IDE, edit the Ignored Files Pattern
regular expression and include the build folder. For example, on
my system I simply added build thus:
^(CVS|SCCS|vssver.?\.scc|#.*#|%.*%|_svn|build)$|~$|^\.(?!htaccess$).*$
Click OK to save the options and close the dialog.
(Nerd Note: Took me exactly 1 year to the day to figure this out!)

You may be able to get similar behavior with a multiple node selection search.
From the 'Files' Window (Found in the Window/Files Menu), expand all
of your projects and select all of them with a Ctrl+A (PC) or
Command+A (Mac).
Then with Control(PC) or Command(Mac) key held down, click the
folders that you don't want to search.
Finally, use Ctrl+F(PC) or Command+F(Mac) to open a search, enter the
text you're looking for, and then choose 'Selection ( # nodes)' under
the Scope where the '#' symbol is the number of folders you just selected.
It is a little more manual than applying a filter, but you should be able to better control your results.

Related

VS Code does not see existing file

Apparently VS Code does not list existing files in files dropdown (Ctrl + P command).
Here is what it shows:
As you can see, the file laravel-2019-09-26.log exists in the directory (left bottom), but not in the files dropdown. After I open this file from the Explorer tree, it starts showing in the dropdown.
Am I doing something wrong or does this happen for everyone? Or is this command supposed to show previously opened files only? If so, what is the way to quickly open any existing file in the workspace?
N.B: I have gone through this related question. No one has mentioned this problem, making me think that this might be specific to my machine.
Edit
For future readers, second answer provided by #michaelze is spot on. VS Code by default does not list files mentioned in .gitignore. You can change this setting by going to Settings panel (File > Preferences > Settings) and typing useIgnoreFiles. This will bring up two boolean settings named Use Global Ignore Files and Use Ignore Files. Turn off these two settings and all workspace files will start showing in the files dropdown. Works correctly as of version 1.38.1.
As those files are .log files, I assume, they are maybe mentioned in the .gitignore file? Maybe this can help you? Visual Studio Code - Automatic exclude based on .gitignore
The list you are seing when pressing CTRL + P is called recently opened. When you open one of the files, it was recently open, so it shows up. The CTRL + P menu also has a files results section that lists actual search results from the files you have in your workspace. None of your .log files are showing up in this section (hence the section is not visible).
The laravel-2019-09-08.log file is also missing from the drop down.
I was wondering if maybe the listing is capped to a certain number of files. Try to be more specific with your search. In my version of VSCode, I can search for files using multiple words. Maybe try searching for "laravel 26" to find the file you are looking for?

How to make Eclipse ignore some files during lookup?

In Eclipse, there is the option to lookup a specific file by going to Navigate > Open Resource. Once the popup open, you can type to search for a file in the project. Is there any way to make this lookup ignore some files and not show them?
This is only possible to do by "inclusion" (that is, telling Eclipse which files to include during the search), not by "exclusion" (telling Eclipse which files to exclude).
In the "Open Resource" dialog, notice that there's a small down-pointing arrow at the top right. From there, you can select the Working Set which will be considered during the search. You can define the working set as the collection of resources to consider during search; only resources that are contained within the working set will be shown.

sorting files by date in project explorer in eclipse juno

Is it possible to show files in package explorer in the order of date they were created? I am using eclipse juno and I couldn't find any customize option in view menu of the project..
Currently the package explorer shows items in alphabetic order which cause me to search through the files to find the last modified project or java file. Can someone help?
I'd comment if I could to ask for clarification but don't have enough points...
I assume you don't have a team repository or you would have enabled its label decorations, which I know is available in svn. Label decorations will show the team metadata associated with the files. It won't have them sorted but with a small set, you can scan them manually.
In order for this to be useful with a large set, the sort would have to be across all folders/packages. You could open up file explorer(assuming windows os), to the project folder, perform a search with filter of 'datemodified:'. Now you may have to remove the semi-colon and add it again, hit enter. That would sort the folders by date, then the files by date..across all folders.
Its ugly but it works (as far as I understand the question). Good luck.

searching in eclipse

how can I search something in all files in a given folder in eclipse
also how can I search up, it's seems like only going down the document
sometimes I am working on single files, so there is no project defined. I know about the search in project feature
If you go to Search>Files... you'll have an advanced search dialogue where you amongst others can specify the scope to search in (all of the workspace, selected resources only etc.). Is this what you're looking for?
And also, if searching through a single file (+), you have the standard search dialogue where you can specify search direction to either forward or backward.
Search forward in file: Edit -> Incremental Find Next
Search backward in file: Edit -> Incremental Find Previous
Search in multiple files: Search -> File -> Containing Text.
Search files in a specific subdirectory: Select the sub-directory -> Search -> File -> Scope: Selected resources.
I reccomend that you learn the short-cuts for these tasks. (Key-combination is found right beside the menu-item.)
When you are searching "Java Resources" with "File Search" with "Selected resources" checkbox checked - you will not get any results.
To search recursively a chosen folder for any files:
Select folder (it has to be folder)
Select FileSearch with "Selected resources" checked.
Good luck
Use the Remote Search Feature. Here you can browse for local folders. Some stupid name...
If default eclipse search is not sufficient for your needs, eclipse instasearch plugin is a very useful plugin for search needs inside eclipse.
It is based on lucene. This is also available in eclipse marketplace.
It has extensive feature set.
Instantly shows search results
Shows a preview using relevant lines
Periodically updates the index
Matches partial words (e.g. case in CamelCase)
Opens and highlights matches in files
Searches JAR source attachments
Supports filtering by extension/project/working set
If you want to search for anything without telling Eclipse what it is, use ctrl+shift+L (QuickEclipseSearch). This is the quickest way.
You can also use 'file search' (press ctrl+H) and navigate into file search using left and right arrrows on the top right corner of your windows. Or type 'file search' in the 'Quick Access' window.
If you are looking for a specific method, package, field,type or constructor use JAVA search.
If you want search in a particular file then just press ctr+F and type whatever you want to search in that current file.
Read all the answers above but couldn't figure out the solution working for me. Finally gave a thought process keeping in mind all the solutions provided here and voila it worked for what I'm looking here. Thanks stackoverflow, this site is awesome.
Solution I worked out:
Goto Navigator window in eclipse, select the folder where you want to perform the search operation, now click Alt a & f (shortcut) which opens the file search window. Now select the option "Selected resources" in 'scope' section and hit 'Search' button.
In MAC I use, control+H (^H), it opens a window, where you can search for any text within all the files.

How to exclude specific folders or files from validation in Eclipse?

We have a bunch of malformed XML files used in unit tests to check if our application can handle them.
Eclipse marks this XML files with errors, polluting the "problem view".
Is there a way to exclude a specific folder from Eclipse validators?
In the Validation section of Window > Preferences you can add different rules in settings (...) column, you can add a "Folder or file name rule" in the Exclude Group for XML types.
This is what I do to exclude a folder from validation in a project. For me this works for javascript and other warnings/errors.
Right Click Folder
Click Resource, ResourceFilters
Click "Add"
Set the following Exclude All, Files and Folders, All Children, add an asterisk (*) to the File and Folder Attributes input field (highlighted in the image below)
Note: In Eclipse Indigo you have to Right click the folder and select properties and then select resource in the left navigation.
With Eclipse 2018-12 in an Angular-Project, i was able to get rid of validation errors in the folders, npm generates (like node_modules), just by selecting a folder and check the "Derived" check mark under "Resource".
After a Project -> Clean the Errors are gone.
Go to Window > Preference > Validation
Find the type of validation you want to disable, for instance XML.
Right-click it and select "Settings":
In the "Exclude Group", click "Add rule", select "Folder or file name":
Note: I got here because I was searching for an easy way to exclude specific folders from validation in Eclipse. My answer does not work for the specific case detailed in the question (which is about hiding invalid XML files from validation).
How to exclude specific folders or files from validation in Eclipse?
When the folders is in the build path, and when the annoying issues are only warnings, there is a way that is straight forward:
Right Click Folder
Properties
Java Compiler
Check Ignore optional compile problems
Ok
The folders will still be validated, errors will be reported, but all the warnings will be ignored by Eclipse. For example, that's ideal for a folder of generated sources.
you may also adjust the output/view side. So go to Show-Menu of Problem-View and filter Display only for selected Items.