When I use eclipse and see my name in the javadocs as the author, I also find the spellchecker marking my name as it does not understand that it is a proper name. Thus, I get the option of:
Add {word} to dictionary
but when I click on it, It says the user dictionary is missing and asks if I would like to create a new one. When I say yes, it just shows the spell checking preferences with a blank user dictionary field where I have the option to only add an existing user dictionary and no option to create a new one.
How do I create the user dictionary so that I can configure it for use in eclipse?
When in C/C++, you must change the "Select spelling engine to use" option at the top of that options page to be "C/C++ spelling engine".
Yes, you can.
Create a text (.txt) file in a directory on your computer. Your Eclipse workspace may be appropriate. Add a new word on each line in the .txt file. You don't have to remember every word, that's what the help option is for, when you type a misspelling/a word eclipse doesn't know.
Go to Window → Preferences → General → Editors → Text Editors → Spelling and find the User defined dictionary section. To the right of that is a button called "Browse" click it, navigate to your text file, and choose it. You'll need to restart Eclipse in order for the changes to take effect.
You can also just type in the text box next to "User defined dictionary" in the Spelling Menu the path to where you want the file to be. It doesn't have to exist, but you must be familiar with paths if you want to do this.
The user dictionary is just a plain text file with one word per line.
You do not have to create this file, just put the path to where you want to store the file in the 'User defined dictionary' configuration that Eclipse shows you and it will create the file.
Another thing to watch out for, at least in Eclipse Kepler, is that the dictionary cannot be located in C:\ProgramFiles\eclipse. I could not add words to the dictionary when I put the file there, maybe because it doesn't have permission to that directory.
I'm late to the party, but for Eclipse I kept having a spelling check error pop up for the word "accessor" that I was using in a comment for a school project. I found that using #DonyorM / #Gabriel Staples comment helped me solve this problem.
I just went to Window → Preferences → General → Editors → Text Editors → Spelling and typed in the word I needed to add next to the "User defined dictionary" box. I then clicked browse, created a folder in my workspace labeled as "ECLIPSE DICTIONARY", then created a text file labeled as "DICTIONARY" in that folder. After creating and directing eclipse to use that pathway, it added the word automatically to the text file.
(Also, for clarification you don't have to label the folder and text file to what I labeled it as. I'm sure you could name it whatever you wanted.)
Now I don't have to look at that pesky red line underneath that particular word.
Related
The default English dictionary bundled with Eclipse is a bit weak, missing many words that are then wrongly marked as errors. I would thus like to change to a user dictionary; this seems to be possible in the dialogue Window > Preferences > General > Text Editors > Spelling.
I have tried providing the paths to the .gz and .rws files found in the aspell folders, but Eclipse accepts none. Which file is Eclipse exactly expecting in this dialogue?
The expected spelling dictionary format is a plain text file with one word per line.
I'll point to the preference page where it says this right under the text field:
If I sound annoyed, I am. Not by the questioner, but by the people that deleted #greg-449's original answer, who seemed to have little activity in any of the tags on this question, and by SO itself for having them review it.
Is there any option to make Eclipse highlight same occurrence of word in random extension file?
Eclipse works for known file types (.java, .php, py...), and it matches and highlights same occurrence but it won't match same words in random file types i.e. extension of .abcxyz?
According to the official Eclipse documentation:
To associate editors with various file types in the Workbench:
Open the command link General > Editors > File Associations
preference page.
Select the file type from the File types list, or
click Add to add a type that is not already on the list.
In the Associated editors list, select the editor that you want to
associate with that file type. To add an editor to the list:
a. Click Add. The Editor Selection dialog box opens.
b. Select Internal Editors or External Programs, depending on whether the editor that you want was built for the Workbench or runs
outside the Workbench.
c. If you select External Programs, you can click the Browse button to browse the file system.
d. Select the editor from the list and click OK.
Click on OK to finish associating the editor with the selected file type.
After doing this, Eclipse will be able to properly open files with any custom extension. The tricky part is the highlight thing, i.e., "how to highlight same occurrence of word". For that, you might need to create your custom syntax highlighting rules. According to this question and answer:
The Eclipse framework uses a fairly complex document model to do
syntax coloring (they call it coloring, not highlighting), it is not
as simple as it is in other editors.
If you really want to try and mess with it, you may want to read the
following from the Eclipse plug-in developer guide.
(The above link is now dead. This may be a similar document or this.)
In my Eclipse project, I have a mixture of java files, xml, and various files with different file extensions. I want to perform searches on a regular basis on everything except for the java files, to look for certain settings.
Is there a way to tell Eclipse to search all the files, EXCEPT the one's with a .java extension?
The best thing you can do inside the file search dialog is to press the button "Choose" for the "File name patterns", then press "select all" and deselect "*.java".
But beware! This doesn't look for all file extensions in your project and lists them. It's a predefined set of extensions.
Yes, in your file search dialog, there is a "Choose" button next to the "file name patterns" textbox. It allows you to filter Select Types. After selection, you should just realize it is just regex of everything except for *.java.
IDEs are wonderful for many things. But I dislike how they make me use a GUI for something I can do faster typing in a command line. For example, opening a known specific file. If I know the name of a file, from the command line I can just type the name of my editor and the filename. With tab-completion I can accomplish this very quickly in a reliable amount of time. No searching through output or moving my fingers off the keyboard.
Is there a way in Eclipse to open a known file simply by typing its path+filename? Maybe through a plugin?
The "Open Resource" shortcut (ctrl-shift-R) is almost it, but it only lets you type the name of the file, not the path. If you have several files of the same name in different directories, you must again hunt with the mouse for what you want.
Actually, if you are using Helios (Eclipse 3.6) you can use paths; for details, see "New features in Open Resource dialog" in that version's "New and Noteworthy" page.
Also, you can Tab to the list of results and use the arrows to pick the right one.
Well, there's the general File>Open option which is meant for opening arbitrary, but I don't know what that does if you point it to a file inside your workspace. This opens your normal platform open dialog which you might be more comfortable using quickly.
I think Open Resource is the closest you're going to get. You shouldn't have more than a couple of files with the same name, I would think, plus you can use wildcards to open files quickly. Also, remember that files you open more recently appear higher up the list of matches so you may find that the file you want is at/near the top of the list already.
In the "Open File" dialog, if you just start typing or paste from clipboard by Ctrl+V, the desired file will be selected.
The dialog before typing something:
The dialog after pasting the file location:
I'm using Neon.3 Release (4.6.3).
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.