Replace string in under a directory in netbeans - netbeans-7

I want to replace some strings in a particular directory in netbeans 7.3
Is it possible?
mainly i need to replace
'Notifynotify' string by
'Notify'

In NetBeans press CTRL + SHIFT + H to open the Find and Replace option. There you can change any piece of text by another one, and in any folder / subfolder you want by changing the Scope parameter in the same window. You can select Current project (whole project), Open projects, An specific selection (If you highlight a package / folder in the project view) or a free browse option.
Answer in this link.

Related

How to create a file in a specific directory in Rubymine/PHPStorm/other JetBrains IDEs without leaving the home row

Currently, I am doing the following:
cmd-1 to go to the project structure view
Move to the arrow keys (not on the home row - I want to avoid this step), or, (horrors!) the mouse to navigate to the folder I want to create the file in
ctrl-alt-n to open the new file dialogue, which always created the file in the selected directory
Is there a better way to specify/move to the directory without having to use the arrow keys/mouse so that I can stay on the home row?
I have tried:
Moving to the root of the project structure pane using pageupand typing the name of the directory - this is good, but pageup is way off the home row. Also it often selects the wrong folder (e.g. the one in /spec, not the one in /app) and I can only get to the right one with the arrow keys again. There seems to be no way to type app/controllers as it doesn't process the slash as a directory separator for some reason.
Using the navigation bar via option-pageup, moving all the way left with the left arrow, then either navigating to the right directory with other arrow keys, or using ctrl-alt-n from the roor and typing the full path, but this is also way off the home row and no faster.
Type ⌘+SHIFT+O (or CTRL+SHIFT+N if you are using Linux/Windows keymap) to open the Navigate to file dialog (or hit SHIFT+SHIFT to open the Search Everywhere dialog).
Type the name of the directory you want to create the file in. Note that the directory name must end with / in order for IntelliJ to know that you want to open a directory not a file.
You can type just part of the path, such as webapp/resources/
Hit Enter and the selected directory will be opened in Project view.
Then you can use ⌘+N (ALT+Insert) to create new file as usual.

How to expand folder branch in Project Window Intellij IDEA?

Sometimes I close folder/package in Project Tool Window and then I should click every folder in it to open them . How to avoid this and open all folders/packages quickly?
* on numpad
Also see IDEA guide about Title bar context menu and customize project window as you need.
Navigate to any folder / package by name! Use the shortcut Shift+Ctrl+N(on Mac ⇧+⌘+N) in the pop-up window type name of folder / package, and end of name add /, for example src/. See here guide for more understanding.
Use the great feature Speed Search for quick navigation:
And also use shortcut Alt+1 to open, Shift+Esc to hide Project Tool Window.
after every press numpad * folders will be expaned more and more

IntelliJ IDEA: how to search for a folder / directory / package name?

I wish to search just directory (folder) names and packages within the modules of my current project.
How can I do this?
CTRL+Shift+N allows me to find a
class
CTRL+Shift+Alt+N allows
me to find a symbol
Is there a function for that allows me to search just directories, folders and package names?
I'd like the result of this search to be that the directory / package sought is highlighted in the "Project" box.
For example, if I type in "model.feed" then then I get this:
and preferably while I'm typing that a list of any directories matching would be shown in real time (in the same way as classes are when you do CTRL+Shift+N).
I'm using IntelliJ IDEA 12.0.4 (Ultimate).
In IntelliJ IDEA 13, you can use Goto File (Ctrl+Shift+N) and enter the directory/package name with a slash afterwards. Then you'll see all the matching directories in your project.
I propose this as a partial solution to your query.
The following steps will allow you to find a file or directory or package name or jar name that is visible in the project view.
Caveats stated explicitly below, but give this a go.
Click on the root folder in the Project View.
Start typing words that you want to search on to find packages/files/folders/jars in the project view
A tool tip will appear that contains the text Search For: along with the text that you have
entered.
The Project View will then highlight the first folder or file that matches the text that you have entered.
This may be close to what you are looking for.
The only caveat is that this search is constrained to those entities currently visible in the Project View so if you want to search a particular part of the project it appears that you have to expand those folder within the Project View. (From my testing of this in IntelliJ Ultimate Version 11.)
One way to work around this is to go to the root element in your project. Perform a partial traversal of where you want to go then by pressing enter you open the folder that you have landed on and then that search is completed.
Starting typing text again after pressing Enter will recommence the search from the current item in the Project View.
So by experimenting with this feature you can interactively walk around your project in the Project View in a dialog-box-free manner.
As a side note you can use the letters Camel Case style to traverse and find classes in the ProjectView
WINDOWS:
CTRL + SHIFT + N
MACOS:
⌘ command + ⇧ shift + O
If you try
CTRL + SHIFT + F
You can do a global file search (like eclipse CTRL + H).
In the file search, you can select which folder to search for, what file type to search for, case sensitive etc, all the normal stuff.
Global Replace is
CTRL + SHIFT + R
(Mac replace CTRL for CMD)
On mac it is
CMD + Shift + O
at least for intellij 14.1
If you have the file open in the editor and can't figure out the location in the project view
WINDOWS:
ALT + F1
From Select In... pick the first item, Project View
It seems IntelliJ doesn't directly support this. Here are the best alternatives I've thought of so far:
I suggest these steps if there is nothing in the folder yet (Windows):
Windows:
Right click on the project root, and choose "show in explorer"
In the search box on the top right, search for the folder you want (e.g. META-INF)
Right click, "open folder location"
Linux/Unix/Cygwin:
Copy the path instead, (in the right-click menu),
cd to the directory using a console or cygwin,
use the 'find' utility. E.g. type find . -iname 'SomeFolderName*'
If there is already something in the folder, I suggest you do this:
Ctrl-Shift-F to search for files
Enter the directory name inside a wildcard pattern (eg. */META-INF/*)
open the first file that occurs in that folder
Click on the circular target icon to "scroll from source" (at the top of the project panel).
If you find yourself wanting to search for folders/packages often, you can use the Go to File command (Ctrl + Shift + N) and set a filter on Directories so that you can quickly search for directories and packages. The filter will be saved for the next time you use Go to File. As a demonstration:
Use Go to File (Ctrl + Shift + N) and click on the filter icon (funnel-shaped) on the top right of the search box. Disable/unselect all other selections and only keep Directories selected.
Try searching -- you should only see directories and packages in the result.
Try using Go to File again -- you should find that the filter still exists

sublime text 3, indexing, and goto symbol/goto definition

so I downloaded sublime text 3 which allegedly "Sublime Text now scans the files in your project, and builds an index of which files contain which symbols. This backs the new features Goto Definition and Goto Symbol in Project".
I created a new project containing the source code of zend framework...I then attempt to do goto definition and goto symbol but they are all still only allow you to "Goto" definitions/symbols in the current file instead of the entire project.
How exactly should I configure sublime text 3 such that I can use the goto definition/symbol to any method in the project and not just the current file (akin to Eclipse's Ctrl + Shift + M Open method feature).
First off, make sure the relevant folders are added to your project by checking that they appear in the side bar under FOLDERS (which you can toggle using ⌘-K ⌘-B). If the Zend folder isn't there, add it by going to Project » Add Folder to Project....
Then you should use Goto » Goto Symbol in Project... (or ⇧-⌘-R). Goto Definition should search in the whole project. At least this is what it behaves like for me on Sublime 3 build 3019 for OS X.
Replace ⌘ with CTRL and ⇧ with SHIFT if on Windows.
Assuming this is not a shortcut issue (You can test this by trying to find symbol from the menu)
Try:
Quit Sublime Text 3.
Clear out the Sublime Text 3 Index folder
In OS X, delete the contents of ~/Library/Application
Support/Sublime Text 3/Index
In Windows, delete the contents of AppData\Local\Sublime Text 3\Index\
Open ST3 and your project
Open Console (View -> Show Console)
Check for errors
Most likely after step 3, your project will be back to normal, but if it isn't check what the problem is while indexing and try to search for that specific problem.
EDIT: Depending on the size of your project rebuilding cache might take looong

how do i change default sources folder in Netbeans 7.1.2

Does anybody know how to change the default sources folder in Netbeans 7.1.2
I've looked through the files but can't seem to locate where the default directory is stored - I have been through the forums but can't find anything useful..?
currently C:\Users\wayne\Documents\NetBeansProjects\PhpProject7
I have read that if you select a different directory then that becomes the default - this is not the case on my installation
Thanks
If you are using Windows 7 or vista, you are gonna find it here C:\Users\YourUserName\AppData\Roaming\NetBeans\7.1.2\config\Preferences\org\netbeans\modules\projectui.properties.
However if you you are using windowsXP remember the USERPROFILE enviromental variable is not Users but rather Documents and Settings. Enviromental variables change depending on the operating system you are using. To know whats the USERPROFILE variable for yours just open a command prompt window and type SET USERPROFILE. Or you can simply type %USERPROFILE%\AppData\Roaming\NetBeans\$ENTER_YOUR_NETBEANS_VERSION_NUMBER_HERE\config\Preferences\org\netbeans\modules\projectui.properties and that will send you to the correct directory.
It's actually pretty simple.
"C:\Users\wayne\.netbeans\7.1.2\config\Preferences\org\netbeans\modules there is a file called projectui"
is right on the money, but he forgot one detail that you need to keep in mind for changing the directory. If you want to set the default project folder to (in my case):
"C:\Program Files\glassfish-3.1.2.2\glassfish\domains\domain1\docroot"
then you have to double the slashes. Instead of the above link you have to put:
"C:\\Program Files\\glassfish-3.1.2.2\\glassfish\\domains\\domain1\\docroot"
without spaces. I had it that way originally but it hid one of each of them.
In newer versions, right-click on the project you want to move in the 'Projects' tab, and then click 'Move'. This will allow you to move the project to a new directory.
Tip! I found (on Windows 7) that the AppData folder is hidden, so doesn't appear in windows explorer files by default .
To make it visible, open a window for the USERPROFILE directory as above, and use
Organize ->
Folder and Search Options ->
View (tab) ->
Advanced settings list ->
Hidden files and folders radio button to show them.
(Or you can open it via search or run if you type it right)
I hope that saves you the several hours it cost me...