Is there a way to search only in files that have been changed in IntelliJ IDEA? - intellij-idea

Is there a way to search for a string in files that have changed? I want to search for the comments I've added before I commit them, but I only know how to search for comments in every file of my project.

Current accepted answer is outdated, this is how you currently search only in your changed files: (don't miss that you should scroll down, the scrollbar is hidden when it's still)

Searching changed files is an option in the "Find in Path" function.
In the scope of your find, select Custom, then use the dropdown to select Changed Files.

As of Intellij 2022.2.4 the option is located in the "Find in Files dialog" (at least on MacOS).

Related

PHPStorm Live templates not expanding

I've just started to play araound with PHPStorm and I can't get the live templates to work. For example there's one for a public function..'pubf' then tab to expand however when I tab mine out it looks like this...
<pubf></pubf>
What's going on? Is there a setting I need to enable to get it to work?
Thanks
Just for a little more clarity:
Even though you're under the PHP branch, you still need to apply the abbreviation to an application. Click the "Define" link and check the PHP box.
It was a question of scope for the template, just needed to select the appropriate file types.
Try:
Settings / Emmet and changing the default 'Expand abbreviation with' from tab to say custom
Make sure the context is selected underneath your template text. There is a small 'Change' link there where you set the context. I had to choose all contexts.

Intellij exclude file from being compiled

I am trying to exclude a particular file in my project from being compiled.
According to the Intellij IDEA documentation you do this by "marking the file as plain text".
However, the context menu in the project view where this functionality is supposedly located has no such action. I am using version 13.02 of Intellij. Here is what my context menu looks like:
Under File > Settings > Build, Execution, Deployment > Compiler > Excludes, add an entry.
Any attempts to run a path specified here will result in a ClassNotFoundException, and a very important class indicator as well.
Just to compound on Makoto's answer (would comment but don't have reputation), it looks like this feature does not apply to classes (.java) or assets (images)...for these types of files, it looks like you will need to actually go to the compiler and explicitly state that the file(s) should be excluded.
However, for .htm, .xml, or really anything that isn't a class or asset you will find and can use the 'Mark as plain text' option.
Edit: It looks like you can also go to the 'Messages Make' error / warnings view and Exclude from there, a little less work IMHO.
The answer that #Makoto has given is pretty much the way to go, but in case that you are like me and you get easily both distracted and frustrated looking for that menu, you could use this shortcut:
press ctrl + shift + a , and in the input box that appears type excludes, and select the first item that appears.

IntelliJ missing all inspections

I'm having an issue with IntelliJ, that I cannot seem to find a solution for myself. I have not changed any settings, yet when I started my IDE this morning, all Inspections and other highlighting has disappeared.
By highlighting, I mean stuff like variable names becoming purple, static finals shown with italic text, etc.
Inheritance seems to be broken as well, in that an implementing method links to the implemented interface method, but interface methods do not link to the implementing method.
My search for this tells me that there is an icon for this in the bottom right. That's set to "Inspections", and under configuration, it seems like everything is set to default.
Is there some way to un-break my IDE?
Another solution:
File -> Power Save mode
It needs to be disabled.
The (or at least one) answer to this is:
File -> Invalidate Caches
Make sure the folder the code is in is marked as the sources root. If it's not marked as the sources root, syntax highlighting will be very limited.
To mark a directory as the sources root, right click the directory, then navigate down to "Mark directory as" and select "Sources root."

Uploading all opened files in dreamweaver?

Is there a way to upload all the opened documents to the current site without having to load em manually?
At the moment for each opened document I select one and I press Ctrl+shift+U but it's kinda lame if you edited more than 10-20 files
thanks
There is no native function however I have this simple cheat I use:
Open up the find and replace dialogue
Do a search for a string that appears in all the open documents. The page title usually has something useful. Make sure "all open documents" is selected. Click "Find All"
The panel appears that shows you all the instances of your search (should be all the open files)
Highlight all the file names in the search results panel, right click, and click "put"
It actually only takes a few seconds and saves you the pain of having to put each file individually. This is obviously for cases where simply highlighting the files and clicking the put button isn't feasible (e.g. files in multiple directories, etc).
In CS6 (not sure about older versions), when viewing the local site, right-click on the project's parent directory, hover on 'Select' and then 'Checked Out Files.'
This will highlight all the files you have checked out and allow you to check them in with one click.
Note: As Dreamweaver gathers all of the check in status information from the server, this can take quite a while if it is a large project. Only suggested for smaller projects, in which case it seems to work great!
Following the same process, you can also select 'Recently Modified', which only searches your local site and is much faster (but doesn't directly answer the check in/out part of your question).
I hope this helps!
I was a big fan of the Get Put All Extension, but it does not work on CS4 or CS5.
Unfortunately, upload all open is not built in. A long while ago I wrote a Dreamweaver extension called Get Put All, which allows for getting or putting of all open documents. It should still be available for sale (probably $5 or under) at the CommunityMX web site (down for me at the moment). I no longer contribute to CommunityMX, so I won't see any proceeds. While written a while ago, it should work fine in newer versions of Dreamweaver.
Just found out how to do it.
Use ctr+select all the files in the tree view under files and then right click on the selected entries and click "put"
SOLUTION:
1) Click on "Site"
2) "Manage Sites" (Select the site you want to manage)
3) "Edit"
4) "Remote Info"
5) And tick the checkbox "Automatically upload files to server on save"
(See where I am going here)
Have all the files you want to upload OPEN on Dreamweaver
6) Then "Find" a common code each document has
7) And "Replace ALL" with the EXACT same code
*Make sure "Find in: OPEN DOCUMENTS" is selected before you do the replacement
Once Dreamweaver has find and replaced the exact code - all documents will be unsaved at this point.
8) Just click "Save All" and voila!!! Now your CTRL+SHIFT+U fingers can chill the F out!
Hope this helps!
Oh, Remember to uncheck "Automatically upload files to server on save" afterwards or when not needed
PS: When you click "Save All" - you might get Dreamweaver saying "NOT RESPONDING". Just leave dreamweaver alone until it's done because it's uploading files at a rapid rate depending how fast your internet is :)

How to search for code within a certain project in bazaar

How to search for code within a certain project in bazaar (e.g. say under https://launchpad.net/~play-developers)
the bzr-search plugin should be able to help
Click on the "Related projects" link, go to https://launchpad.net/play then click on Code link, go to https://code.launchpad.net/play and voila.
Yet another alternative is the bzr-grep plugin.
This command searches the specified files and revisions for a given pattern. The pattern is specified as a Python regular expression.