disable sources scan for a specific folder in netbeans 7.1 RC2 - netbeans

I'm having an issue with netbeans scanning a large directory of PHP files
The scan takes about 2 hours and totally blocks the IDE's autocompletion and slows it down a lot
I tried a few things:
disabling auto-scanning of sources as mentionned here
adding the pattern of the files in the "Files ignored by the IDE" box
adding the directory to the ignored folder list in my project properties
None of the above worked.
An idea anyone?

You also might be able to ignore just some files from the automatic source scan.
See netbeans wiki

You need to close the "Tasks" tab to stop it.

Related

Intellij Idea creates eclipse files and folders

I'm using InteliJ Idea Ultimate 2019.2 and I seem to have some misconfigurations that I cannot figure out. And I cannot find anything in the documentation. While scanning and indexing idea is auto creating some eclipse specific folders and files that I don't want to have in my enviroment. The ide creates .settings folder with eclipse prefs files, the .classpath file, the .factorypath for annotation processing and a .project file.
It seems that the maven project itself could be the key. But there are no updates on the plugins.
I want to get rid of that stuff and I simply cannot figure out what should have been done earlier.
Since I couldn't find any configuration issues, I stopped every program on the computer one at a time. My MS Visual Code was the problem. I use it for text editing. It uses a maven plugin which is connected to eclipse. I deactivated the plugin and now the folders and file will not appear again. I should switch back to Sublime or Notepad++. Sorry about this question but this strange bahaivour was driving me nuts for two day.

Scaffolding a new Angular app with Yeoman and Bower causes Eclipse out of memory

I've just started with Yoeman, Bower and Grunt, and on two separate projects I've used Yoeman and Bower to scaffold an Angular application.
Eclipse (STS 3.4.0) both times immediately huffed and puffed and ran out of memory.
This is strange to say the least, because Eclipse has a lot of memory available.
I thought at first that I might exclude that massive 'node_modules' folder from validation, but I've already excluded all javascript files from any validation.
Has anybody got any clue why Eclipse dies on me when I use Bower?
I finally solved this by excluding the top Grunt node-modules folder from javascript validation.
A bit odd, because I had already disabled javascript validation for the project.
In Eclipse open the Preferences for the project with the problem, then click on 'Validation' in the left-hand column.
Then on the right-hand side click on 'settings' for Client-side javascript.
Then you add an Exclude Group, adding a rule for the folder you want to exclude.
This finally solved my problem.
Actually it was not a definitive solution. When I opened a new node project I got the same problem and my solution above was not effective.
The best solution is the last answer here, which I used to exclude the node_modules folder:
How to exclude specific folders or files from validation in Eclipse?

Eclipse file search finds the same file multiple times

In Eclipse I have two maven projects A and B, where A is a parent for B. The directory structure is the following:
A/pom.xml
A/B/pom.xml
A/B/...
Then I use File search (Ctrl+H) to find any file in the project B. The search result window shows the file two times with different relative paths:
A/B/<my_file>
B/<my_file>
So, the same file is shown twice. Obviously, the first search result is reduntant. Is there a way to exclude these duplicate search results?
What I personally do to avoid this is marking each module in the parent project as derived (right-click on the folder > properties > Attributes: Derived).
Then when you perform a file search, uncheck "Consider derived resources" (I don't think it is checked by default) and you won't get the A/B/<my_file>.
The only inconvenience is that you must do this for each module, and each time a new module is added.
In an open resource window (cntrl+shift+R), click on the arrow on top-right and check "Filter Duplicated Resources". This worked for me.
Checking Window -> Preferences -> Maven -> Hide folders of physically nested modules (experimental) worked for me in Mars.1 Release (4.5.1).
After checking it I closed all projects within eclipse, deleted eclipse project files (.project, .classpath and .settings) and reimported my maven projects.
I had similar problem.
My solution for this problem was
Create eclipse "working set" of projects to search
Set this working set as option into search dialog
Search in it
Windows - Preferences - Maven - Hide folders of physically nested modules
I agree with Damon Horrell.
Go to Windows - Preferences - Maven - Hide folders of physically nested modules (make sure the checkbox is checked).
Note: Make sure to re-import the maven project into eclipse to see the changes.
Within the parent project, child ones were already visually hidden in my case, but still found through search and Ctrl-click links.
I solved this by using Resource filters:
Right-click (parent) project > Properties > Resource > Resource Filters
Click Add Filter..., select Applies to -> Folders and enter one child project's folder name, click OK
Repeat 2. for all child project folders
By the end, you should have something like this:
There is an ancient bug which requests Eclipse to support nested projects. Opened 2008, won't happen soon, I guess.
Since Eclipse doesn't support Maven's default nested module layout, you have to import each module individually which doesn't confuse Eclipse but it can confuse you as you can see in the search results. Similar things happen when you start to save launch configs in a module.
There are several possible solutions:
Get used to ignoring half the search results. Takes some discipline but no magic.
Make sure your root project doesn't contain anything important that you might want to open from Eclipse (i.e. move the parent POM to a new module which must be a child of the root project). Now you can close the root project.
Takes some discipline where to put things in your project and it's clumsy when you have to add new modules.
Use the flat multi-module approach. This is an extension to #2, it looks odd and there might be plugins that are offended by that. So if you use a lot of nonstandard plugins, you should check whether they like the new layout.
As a new joiner, still couldn't comment but I'd really like to add something to the best answer. It works! It not only removed the duplicate files for me (one from child module and one from parent module), it also removed the class files from parent module).
But it added the folder to my .gitignore which will cause problem for new files/directories added later. I just reverted the change to .gitignore and it still works in eclipse.
Find this answer to disable auto change of .gitignore
EGit and Eclipse modifies .gitignore file but it should not
You can solve this problem using a flat multi-module approach.
Caveats may apply if you're using the maven-release-plugin with a version control system other than Subversion.
In addition to "Hide folders of physically nested modules" mentioned, you could uncheck parent modules when importing Maven project:

Eclipse search directories outside workspace?

I'm trying to search folders and files outside the workspace in Eclipse 3.0.2 on Windows 7. These links helped:
http://eclipse.dzone.com/articles/5-best-eclipse-plugins-system
https://bugs.eclipse.org/bugs/show_bug.cgi?id=192767
Unfortunately I can only get Desktop Search to work, not System Search. I've tried both the nokia system search download links:
https://bugs.eclipse.org/bugs/attachment.cgi?id=106032
http://www.steinerberg.com/EmbeddedComponents/System%20Search/com.nokia.search.system_2.0.0.201102171254.jar
I put either com.nokia.search.system or com.nokia.search.system_2.0.0.201102171254.jar in c:\eclipse-php\plugins. I also tried putting com.nokia.search.system.feature in c:\eclipse-php\features but it still didn't work because the folder is empty so I get this message in eclipse's error log:
!MESSAGE Unable to find feature.xml in directory: C:\eclipse-php\features\com.nokia.search.system-feature
I take directory search for granted in tools like TextWrangler and Xcode on the Mac and am flabbergasted that the Eclipse developers don't include arbitrary file search in their IDE.
Another possibility is to somehow add the C drive to Eclipse's workspace. I mainly need this to search directories like pear. I guess a free app might be an ok solution, if there's a way to tie it into Eclipse somehow, that would be helpful.
Thanks in advance for any help you can provide,
Zack
If I understnad your question, you are trying to search folders/files outside of the eclipse workspace. My advice would be to create a new folder through new -> wizard select it as a "linked" folder and point it to the folder in your file system that you want to include in the search.
Say you want your C drive included in search. Create new folder, click on advanced which opens more otpions and select link to alternate location (linked folder) and click browse and select your c:\ drive. This will create folder in your workspace that is a pointer to the c drive and will be included in search queries.
First off, Duncan, thanks for your answer. It is the best for the purposes described in the original question.
I see this thread is a bit old but I would like to give some useful suggestions:
Additional plugins only slow down Eclipse. It already has so many plug-ins that come with it. I try to keep mine as slim as possible (a lean version of STS) and use external tools for tasks I perform outside of core development, like version control - I removed all my Git and SVN plug-ins manually.
Linked folders work best because you narrow down the search. If you try to search the entire file system you are probably better off using your OS and its built-in utilities designed specifically for that. They are faster and support all sort of searches that you would otherwise not be able to execute from Eclipse.
I haven't tried this on 3.0.2 but I came across this question after trying to setup a new Eclipse and working out which plugin I had before that allowed me to do this.
Turns out you need RSE (Remote System Explorer) which gives you Remote Search and you can use a local connection to select a folder on your local machine.

Eclipse CDT Invalid Project Path

I have a C project that is built using a makefile, Eclipse constantly warns about "Invalid project path: Duplicate path entries", but I cannot figure out what the hell it wants me to do. I would like to disable this warning and continue with my life.
My application compiles and runs fine, with not a single warning except this one. Being a conscientious developer I am keen to fix this problem so I have the warm fuzzies only a clean build can bring.
This worked for me with Eclipse 3.7.2 and CDT 8.0.2:
Open the project properties | C/C++ Build | Discovery Options.
Click the button by Clear discovered entries now:.
Rebuild.
It is seems to be a new feature in CDT 8. I have had this "Invalid project path: Duplicate path entries" problem for years, and this is apparently the newly provided solution.
Before doing this there were duplicate paths under C/C++ General | Paths and Symbols | Includes tab. I could not get rid of these. They only appear when Show built-in values is checked, so they are apparently generated somehow. After doing the above they were replaced with a set that did not have duplicates. The only difference is that the same settings appeared under Assembly, GNU C, and GNU C++. Previously they were different sets. The ones for Assembly were empty, for example.
So far the problem has not returned.
This problem is a real pain to deal with. It doesn't work very well.
This is applicable to Eclipse 3.4.1 / CDT 5.0.1
From what I can tell, when you create a "C/C++ Project" within CDT, it will try to auto-detect your include paths. Great idea, but the implementation is horrid.
If you delete or rename a directory, the old directory is leftover. If you rename the project, the old directory is leftover. When Eclipse can't find that old directory, it gives you that warning.
My solution is turning the automated discovery off entirely and managing my include paths manually. You need this list of include paths for things like ctrl-click (auto-navigate to defines/functions/files/etc) and shading out #define blocks. It builds the index off this list.
Here's what you need to do:
Right click on your project in the project explorer and go to properties.
Go to C/C++ Build -> Discovery Options
Uncheck "Automate discovery of paths and symbols"
Now go to C/C++ General -> Paths and Symbols
You'll see under the Includes tab Assembly, C and C++ languages with corresponding auto-discovered include directories.
Go to all 3 languages and delete everything.
Open your makefile and transcribe your includes into the corresponding language.
A project rename will still cause the indexer to break. ${project_name} and other globals do not seem to work. If you're having trouble, use the "Workspace" button to browse to the directory you want to include, as that seems to always work but entering it manually does NOT.
Hit apply, then OK.
Right click your project, go to index->rebuild
Restart eclipse.
This should fix things forever. Any time something improperly is shaded out due to a #define or #ifdef block, it's because that list of files is outdated. You'll also know that list is outdated if you get "unresolved inclusions" on #include lines.
Doug Schaefer, hopefully Google indexes this, you find your name, and you fix this awful implementation. =)
I found this bug report to help my problem. I had moved some include paths and couldn't get rid of the old paths.
I've seen this problem too, old paths
are never deleted. To manually fix the
file you need to move/delete the
${projectname}.sc file found under
${workspace}/.metadata/.plugins/org.eclipse.cdt.make.core
https://bugs.eclipse.org/bugs/show_bug.cgi?id=206372
Using Eclipse Luna and CDT 8.5
I fixed the issue by
Open the project properties | C/C++ General | Paths and Symbols
Look at the Source Location tab, I had renamed a directory and it was not updated in this list.
Rebuild
Here I just found another way to re-detect the path automatically:
Open "Workspace Settings-> C/C++ -> Build -> Settings -> Discovery"
Find "CDT Build-in Compiler Settings [Shard]"
Click "Clear Entries" and "Reset" button on the right
Rebuild projects and Done
Hope this will help.
Reference:
http://qing.blog.sina.com.cn/1802712302/6b7334ee33004def.html
It seems like a bug in CDT.
If you really want to get rid of it, you should try getting rid of the spaces in the project path; this was suggested in a search result for the error. If that doesn't work, you can try to open the .cproject file -it's where all the CDT settings lie- and check for an actual path with duplicate entries.
You should check if you have manually defined a symbol that eclipse can figure out from your makefile. I have a project that has a manually written makefile and the problem was solved by removing symbols that I had manually added to C/C++ General -> Paths and Symbols -> Symbols.
No needs to remove .metadata guys, just delete all path located in C/C++ General -> Paths and Symbols -> Symbols and replace them on using click buttom but don't give the path manually
Here's a late answer for Eclipse 4.4 (which does not have a Discovery option).
Delete the project's infoPath file. Eclipse or the ADT plugin (not sure which) will recreate it, and populate it with the correct paths.
You can find the project's infoPath file at <Eclipse workspace>/.metadata/.plugins/com.android.ide.eclipse.ndk/<project>.pathInfo.
I think Eclipse or the ADT plugin determines the new paths from two places: (1) the NDK directory set under Eclipse preferences, and (2) paths in Application.mk. All those paths become "Built-in" paths under Eclipse.
Also see How to change built-in C/C++ paths pointing to a deleted android-ndk-r9 installation?