Remove subfolder from Visual Studio Code Workspace - visual-studio-code

My current workspace shows this directory. I would like to remove it so it doesn't appear in my workspace.
According to the documentation that I've read the way to do this is to go to File->Preferenceces -> Workspace Tab and the Add a pattern in the excludes.
However, no pattern that I've tried has worked.
I've tried
**/IVAPI/BKP_OLD_CODE/*
**/BKP_OLD_CODE/*
**/*BKP_OLD_CODE*
**/BKP_OLD_CODE
Then I click the refresh button on the worksapce explorer but the directory stills shows up. How can I add a patter so that BKP_OLD_CODE does not show up anymore?

You were very close, the fact is that, since its a folder, it does not have an extension or prefix! So just use the name of the folder (BKP_OLD_CODE in this case) and you are all done!

Related

Eclipse to IntelliJ transfer

I have copied my src package structure from eclipse to intellij and it makes this structure within src folder:
How do I make it dz1.drugi so I can one click expand all to my classes?
Another question is how to select default project folder as it is "workspace" at \Users\{Name} for eclipse. Right now, when I create new project like this:
it saves it without workspace (or projects folder) at \Users\{Name}.
Click on the cog icon at the top-right of the explorer view, and check the "Flatten packages" option.
That said, If you get used to keyboard shortcuts top open classes and files, and navigate through recently opened files, you'll quickly see that you'll amost never use the explorer view anymore.
Project view has an option to compact empty middle packages, enable it. You can also use Flatten packages option. Actually, your question is a duplicate of this one.
IntelliJ IDEA remembers the last location you've used when creating a new project. Once you want to create another project, the location one level upper of the previous project directory would be suggested. So, create a project in C:\Users\someuser\workspace\myproject1 and IDE will suggest C:\Users\someuser\workspace\myproject2 for your new myproject2.

Removing a file or folder using VS Code

When I bring up VS Code I see options for adding a file or folder but I do not see options to delete a file or folder or rename such. Any hints?
Deleting file is strait forward. To delete a folder created using MS Code explorer,
press Ctrl + Shift + P then it will show a command prompt like
section at top.
Search 'remove' in that. A command will be shown -"Workspaces: Remove folder from workspace...". Click on that.
Intended folder name will be shown for removing.
After clicking the same, it will be removed from explorer, without affecting actual
files on the operating file system.
Thank you I figured it out. It doesn't seem immediately obvious to me but on a MAC using VSCode selecting a file and entering the return key lets you rename a file, selecting a file and then using command-del deletes a file.
The Rename and Delete actions are there, but you have to select the file in the bottom part of Explorer, under the project directory. When you select it under Open Editors or right click on the tab bar, there is no Delete and that is confusing. In this case you can choose Reveal in Side bar in the tab context menu to get to that entry. But that won't help (will select the tab under Open Editors) if the file is out of the project tree, in this case the most convenient action would probably be to Open Containing Folder and delete it manually in the file manager.
Using extension:
Install File Utils extension
https://marketplace.visualstudio.com/items?itemName=sleistner.vscode-fileutils
Press Ctr + Shift + P
Type File Utils > Delete
In VSCode, make sure you are in Explorer. Also make sure you are right-clicking the file shown in the directory/folder. Here either hitting Del for windows and command+del for Mac will delete the file.
A common issue is trying to delete a file when in source control. You must be in explorer.
VSCode 1.50 (Sept 2020) still has the feature for file deletion, and improves it with microsoft/vscode issue 71315
##Should maintain row focus after deleting a file
Use case:
Use the keyboard to focus a file in the explorer and delete it
Now the whole tree has focus
Press the down arrow key
The first item is selected
I want to get back to where I was looking before.
The search tree focuses the next item in the list when one is removed.
I don't know whether the explorer did this previously with the old tree. But it would be nice for the explorer to do the same thing.
Just right click on the file or folder you will get the options to delete the file as well as of renaming the file.
For directory delete type in VScode terminal:
rm -r directoryName
For file delete type in VScode terminal:
rm fileName.tx
No way to delete a folder by a right-click. However, you may remove it from the IDE: File > Close Folder.

(Xcode 6) - Code completion not work (UIKit, Foundation...)

I need help with Xcode 6.
It only happens with the project I'm working with. For the other one, code suggestion works.
What's wrong with my project?
The answer was to delete ~/Library/Developer/Xcode/DerivedData/ModuleCache (while Xcode is closed)
I have been researching the same issue on StackOverflow and here are what most threads suggest: delete Derived Data folder files (or maybe just the files relevant to your troublesome project!). It worked for me hence this answer. Details below:
Fix manually by deleting all the files in ~/Library/Developer/Xcode/DerivedData
Note: If Library folder is new to you, follow this CultOfMac article:
Library access on.
Open a Finder window and then navigate to the Home folder. That’s the one represented by the cute little house icon over in the sidebar. If you don’t see it, click on something like the Desktop or Documents folder, and then Command-click on the title bar of the window. You’ll get a drop-down menu that shows the file path of the current folder, which–if you’ve picked a folder from your Home directory–will show the Home folder somewhere in the list. Click on it to go to the Home folder.
Now, once you’re there, hit Command-J to bring up the View Options panel. You’ll see a checkbox to “Show Library Folder” somewhere in that panel, depending on the view your Finder window is in. Simply check it to show your User account’s Library folder. Now you can go in there and mess around to your heart’s content.
Note: Some StackOverflow members suggested pressing 'Escape' key or Command and + keys after the dot (.), others suggested typing a white space (control+space bar). However, your post seems to suggest it's project-specific (works for the other project) so it may prove useful to try different approaches. Hope this helps.
Swift files will NOT have code completion for UI classes (e.g. UIImage, UIDevice) unless there is an "import UIKit" at the top of the file.

Show the name of the containing folder in the Eclipse tab of a file

I have the same set of files in N folders, one of them, say, blank.xhtml. The files contain somewhat similar information and it is becoming overwhelming to figure out which file comes from which folder every time I switch between the tabs. When I open one of them to edit and happen to open a file with the same name from another folder I get confused and more often than not end up editing the wrong file: nullifying my hard work. So I am wondering if there is a way to show the name of a containing folder in the tab like this G-06/blank.xhtml or G-07/blank.xhtml. I will be very very thankful to anybody who has pointers to how I can make this happen.
As an addition to the Maroun's answer there is an alternative solution.
It's not exactly what you want (full name in the tab's title), but may be useful sometimes.
In the "Project Explore" view (the same goes to "Navigator" view) click the "Link with Editor" button. That way, whenever you choose some file opened in the editor, it will be automatically selected/highlighted (see the picture) in the "Project Explorer" view.
Here is the picture:
Maybe this will be useful to you too.
If you hover the mouse over the tab containing the file name then a popup appears showing the full path. Not exactly what you wanted, but it should help. (This with Eclipse Neon.3 Release 4.6.3 on a Mac).
Not quite what you're looking for, but ctrl+shft+e will open the switch editor window that shows all the open editors with their filepaths. I use this shortcut for the same reason. I'll have multiple build.gradle files open from multiple projects and this helps pick the correct one

Eclipse: shortcut for "open project"?

Is there a shortcut in Eclipse for "open project"? Ideally, I'd like something like the "Open Resource" dialog.
I want this because I have a "testing" project, which I use whenever I want to try something out… But it's annoying to scroll through the massive Navigator trying to find it and click it when it gets closed.
Not by default. The action is defined here, with no keyboard shortcut.
http://eclipse-tools.sourceforge.net/Keyboard_shortcuts_(3.0).pdf
You could add a Working Set that contains only your test project, and use 'Select Working Set...' functionality from the Navigator tab's view menu:
While this won't open the project for you, it WILL make it the only thing you see in navigator or package explorer.
Once you've added it, it will be in a list and you won't need to open the 'Select Working Set...' dialog, just select 'my test project' from the popup menu. It's triggered by that small triangle in the upper right of Navigator, I'm not sure if there is a shortcut.
To switch back to your normal work, simply 'Deselect Working Set' and you will then see everything again.
I also find the 'Collapse All' button/shortcut to be handy when finding things in the Package Explorer or Navigator tabs.
I'll offer a solution to a problem I've had which, if I've interpreted the question correctly, is very similar to yours.
I find that when I have a lot of projects with loads of expanded directories/packages inside Project Explorer, trying to find a particular project is irritating because I have to scroll through all this. I could collapse all projects down but then I also lose my current position in every project.
I'd just like to be able to search for a particular project by name and open it, in the Project Explorer tree. Opening a file inside the project using Open Resource isn't a good enough workaround, as having to think of the name of a file inside that project completely out of context is often equally annoying!
A solution that works great (at least in Eclipse Juno, Mac OSX) is, with the Project Explorer focused, to hold Shift and start typing the project name. This dynamically selects the best matching project in the Explorer as you type. Then with your hands still on the keyboard you can use the arrow keys to open up and browse the project.
It ain't pretty but it gets the job done, and saves some valuable seconds :)
You could also:
switch workspace (in a workspace with only this test project in it) (no shortcut: you can define one)
install mylyn and select a "test" task (which would immediately empty your Navigator view, leaving only the relevant classes/methods).
If the test project is already opened and you know the name of the class in it, you could go to this class with Navigate -> Open Type (There is a shorcut also, on mac osx is Shift + Command + T)
I find it easier to move with this method, but I didn't know it until someone else showed me, maybe it helps.
You can set a shortcut at Preferences->General->Keys, search for Open Project. However, for me it does not work from the editor itself. I have to click the package explorer, for example. Also, if you have a lot of projects, there will be a huge list of them as well, as expected.