The Rproj icon is now missing or blank on my Rproj files in Finder on mac - rstudio

Not sure why but all of a sudden my .Rproj files dont have an icon. See example screenshot.
Running most recent R Studio, tried deleting R studio and reinstalling. Tried switching the file to have a different default programme then switching back....
Anyone know how to restore the default icon for this file type?

Related

VS 2019 periodically can't save csproj files when I make a change to the files in my solution

I have a relatively new installation of VS 2019, running on a relatively new PC with Windows 11 (all about 2 months old). I also have Resharper and Web Compliler installed. All are up to date.
Within the last two weeks VS has begun having intermittent problems saving the csproj files when I add a new file to the project, or rename an existing file. It opens a file save dialog prompting me to save the csproj file, but when I click save, it then presents an alert dialog stating:
An error occurred saving the project file X.csproj
Clicking OK then returns me to the file save dialog. If I continue to click Save and then OK the alert, after a few tries, it usually saves eventually. Though sometimes it goes on so long that I abandon it.
Sometimes I can add/rename a file and it doesn't exhibit this problem at all.
I've noticed that when it's prompting me to save the csproj file, the existing file doesn't actually exist, so it doesn't appear to be a permissions issue, as the original file has seemingly disapppeared.
In addition to this, sometimes, if I try to duplicate a file in the project by clicking the file in the Solution Explorer, then hitting Ctrl+C then Ctrl+V, it gives me an empty error dialog (no error text), and the file doesn't duplicate. Again, persisting usually works eventually.
I've tried this on multiple Solutions, and I've tried suspending Resharper, but the problem remains.
I've tried repairing the VS installation, but that didn't work either.

How do I delete a font in IntelliJ?

I am trying to replace the Inconsolata font with its older version in IntelliJ (the newer version added things that I'm not happy with)
IntelliJ seemingly refused to remove a font that I wish to be removed.
The font in question is Inconsolata, and the picture below shows me trying to delete it. It works, at this stage.
However, after doing that, and restarting the PC, IntelliJ insists that the font exists.
It will give a strange name to the font, but the entry exists. This causes problem on my end - there's some reference caching the IntelliJ is doing, and if I were to replace the font with the older version, it'll still be using the newer cache, but will give a strange output if the cache is pointing to something that doesn't exists.
I've tried
Deleting the settings folder
Reinstalling IntelliJ and then restarting
Is there a way to delete a font in IntelliJ properly?
It looks like Windows doesn't properly delete a font. Unfortunately, this causes problems for some apps.
The fix
Head towards C:\Windows\Fonts from your terminal. Do not use a file browser, as that will open up the control panel item.
Delete all traces of inconsolata (There was Inconsolata-Bold.ttf, Inconsolata-Regular.ttf, inconsolata.otf) using a terminal
Now your IDE will no longer have the Inconsolata font.

How to rebuild Windows Icon Cache without closing explorer.exe or restarting Windows? [duplicate]

This question already has an answer here:
Refresh IconCache.db programmatically
(1 answer)
Closed 6 months ago.
Task
I am trying to customise a folder icon from within my Application but due to the way Windows caches icons and thumbnails I am struggling to get the changed folder to update it's new icon.
In Windows there are two ways that I know of to customise a folders icon, the simplest way is to right click the folder from Windows Explorer, Properties and then select the Customize tab and change its icon, this method is no good though as it requires manually changing the folder properties.
The second way which I am doing from my program is to create a desktop.ini file and place it inside the folder that requires the icon changing, documentation on desktop.ini can be found here: http://hwiegman.home.xs4all.nl/desktopini.html and an article here: http://helpdeskgeek.com/how-to/customize-folder-icons-desktop-ini/
As shown below though, the folder icon in Windows is not updated although you can see from the folder properties that the icon has changed, just Windows is not showing the updated folder icon:
I am fully aware of Windows caching icons and thumbnails, I have searched and read several pages on ways to supposedly rebuild the icon cache and thus get Windows to display the newly changed icon and not the cached one, however I am unable to get this to work from my Application without restarting Windows or the Explorer.exe process, this needs to be done without interrupting Windows though so closing Explorer.exe or requiring a restart is absolutely not an option.
Interestingly though, when changing a folder icon from the first way I described earlier, Windows somehow manages to flush and rebuild the icon cache as the changed folder is promptly updated to show the new icon, however I cannot see what tricks Windows does to achieve this.
Attempts
A few things I tried unsucessfully, (in no particular order):
Executing the following: ie4uinit.exe -ClearIconCache
Running this code in Lazarus: SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, nil, nil);
Deleting the IconCache.db file from AppData\Local
Toggling the "Always show icons, never thumbnails" Explorer option from the registry, located here: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced which is stored in the IconsOnly value
Changing the icon size from the registry and back, located here: HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics which is stored in the Shell Icon Size value
This link provides an apparent solution in Delphi which I was unable to convert in Lazarus: http://www.aha-soft.com/faq/q18.htm
I am aware of cached db files here: AppData\Local\Microsoft\Windows\Explorer although I am not sure if they are of any help, attempting to delete some of them does not seem possible as they may be locked etc.
Renaming the folder and then rename back to original name.
Right click an empty space in Windows Explorer and selecting Refresh does not seem to update the folder icon either.
Have also tried performing some of the above in combination with no luck.
Question
When changing a folder icon directly from Windows Explorer, using the properties context menu and customize tab, when applying and closing this dialog the folder icon is changed almost immediately, there is no closing explorer.exe or restarting Windows, the change happens very much right away.
How can I achieve this from my Application programmatically the same way Windows Explorer does? Is there a way to find out how Windows Explorer does this?
My Operating System is Windows 10 which could explain why some of the older methods don't work for me.
I don't think this is anything to do with icon caching; you just need to inform Explorer that the folder's icon has changed. You can do this using the SHChangeNotify function.
LPCWSTR pszFolder = L"c:\\path\\to\\folder";
SHChangeNotify(SHCNE_UPDATEITEM, SHCNF_PATH, pszFolder, NULL);

Android Studio: Refactoring cannot be performed when importing images

All of a sudden this morning I am unable to drag png files into my drawable folders in Android Studio. I get the message "Refactoring cannot be performed - the file is read-only". I have confirmed that these files are not read only and have tried this with numerous image files in different locations on my Mac. Any ideas as to how this can be fixed please?
PS - This is occurring in all my Android Studio projects. I am running Android Studio 0.5.9 on OS X 10.9.3
I managed to solve it somehow. Just copy and paste the *.png you need in your drawable folder instead of dragging it. Turns out there's a problem with moving it
Later edit: holding ALT whilst dragging the files should also do the job. Thanks #RunLoop
Right click the file you're attempting to add to, go to "Show in explorer" and then drag the files there. Worked for me!
Update to the most recent JDK here. The currently accepted answer by user DDsix worked for me, but that is a workaround. Updating the JDK will bring full functionality back.
I believe this is related to the following issue on the AOSP bug tracker.

Xcode 4 adding images to a project

Coming from a background of Visual Studio I had no idea how good that IDE truly was until I had to work with Xcode. One of the more pressing oddities that it has just thrown up is the following.
I'm upgrading a project to a retina display and so have to add a bunch of new #X2 files. This is fine, I have the files and I go into Xcode, choose the project group where I want to add them, select them all and click 'Add'.
"Multiple errors occured" Xcode helpfully blurts and then returns to whatever it was doing before. No break down of what those errors might be, or what actually happened or why.
So I do some looking and some of the files are actually in the directory but Xcode ignores them, I can't figure out a way of adding them (it says they're already there!) but they won't appear in the xcode project.
Can I 'refresh' xcode so it looks in the directory and shows them?
==============================
PS. While I'm here and can rant a little, anyone with a VS background now using Xcode, am I wrong in thinking the following points are hugely annoying:
1) The debugger - frustratingly slow.
2) The file explorer - can't easily sort by name
3) The file explorer - column on the right listing the file names doesn't change the file highlight when you move from file to file within the editor window.
4) Adding files to a project - see above!
Some of these probably stem from lack of experience with the IDE but still, they irk.
Files in the XCode directories don't necessarily have to be in the project.
For some reason, XCode doesn't like overwriting files, and that's the warning message that I usually get when this happens too - "Multiple errors occured."
What I suggest you do is remove all of the #2x files from your project directory, and add them back into XCode using "Add Files..." Make sure you select "Copy files into project directory if necessary" though, otherwise they will just be referenced to their current location on disk.

Resources