Link the open file to file system tree in c9 IDE - editor

In C9 IDE, when I open a file, is it possible to expand the file system tree to that file.
I need something similar to "Link with Editor" button of Eclipse.

Yes, use Cmd-Shift-L on a mac (I think it's Ctrl-Shift-L on win/linux). There's also a setting to do this automatically as a tab becomes active. You can also right click on a tab and choose "reveal in file tree"

Related

Visual Studio Code closes my file when I search for new ones

I'm using Visual Studio Code for working and I use ctrl-P command to search for files in my directory.
The problem appears when I want to search for another file, it opens it in the place of the first searched file, closing it.
Is any setting for avoiding this pain?
By default, VSCode opens files in preview mode. This is indicated by their name being italic in the menu bar. As John noted, you can double click on the file to fully open it.
To disable this behavior, try setting:
"workbench.editor.enablePreview": false
When you select a file from search result -> you will see the file open with file name italicized. This means that the file is open in preview mode. Now any other file you choose to select will replace its content in this tab.
To make this tab stick among the open tabs you can:
double click to select the file
or
double click on already selected file in search pane -> you will see the name of file is not italicized anymore(meaning the file is now pinned as a tab)
Alternatively,
You can use the below setting to have all selected files open as a separate tab:
"workbench.editor.enablePreview": false
This setting is found here : Files -> Preferences-> Settings
But the downside of using this is that all files you click on will remain opened and you would then need to clean tabs after your search.
Ctrl+P -- For targetting a file
Alt+Enter -- For Opening that file into next tab
Double click on the files instead of a single click. That worked for me.

Cloud9, open file from tree on single click?

My question is pretty basic but I can't find anything on the user preferences (file or from the UI) inside the editor, or on the web about it.
I simply want the files to be opened when I click on them, not double click, but single click.
How can I do that?
Enable the "Enable Preview On Tree Selection" option under:
Cloud9->Preferences->User Settings->Tree & Navigate

Find missing files in Xcode

I am re-arranging files in my file system for my Xcode projects. Therefore, when I open the Xcode project, all of the files are red.
I can add each file manually, but is there a way for Xcode to quickly find these files for me? All of the files are located in one directory.
If you have a bunch of missing (red) files that now live in the same directory, you can improve on the "fix each path individually in the inspector" method by selecting (Cmd-click) all the files at once. You'll see "multiple values" in the inspector, like so:
Clicking the button under the Location dropdown will bring up a directory selector -- note that the prompt says "Choose folder containing..." rather than "Choose file and location".
As far as I know, Xcode doesn't have a way to automatically locate moved files. You can reconnect a reference to its file using the Inspector (panel on the right) but it is somewhat tedious to do so. In your case, it would probably be faster to simply delete the references and then add the files back to your project.
I agree with the answers already given. In a real pinch, or as a last resort, you can open the project file in a text editor and fix the path references by hand.
Close the project in Xcode
Backup the project file someplace safe
In the Finder, right-click on the project file and select "Show Package Contents"
Drag project.pbxproj to BBEdit (or TextEdit or whatever)
Edit whatever "path = xxx" references you want
In this case i do this steps:
1) Add a new group with name Res
2) Click "Add Files to ..."
3) Find a folder with resources, and click CMD + A
4) Set check box on "Create folder references for any added folders".
And in source code i use e.g. "fonts/font1.xml".
5) Then for refresh, i just Removing a Res group references
6) And do steps from 1 to 4
Hope this will be a useful

How to open interface builder in Xcode 4?

I am following a book tutorial to create a iPhone application.
But I am stuck at the step where it say click on a certain file .xib I think to open up the interface builder. Can anyone advise me where to ind that file?
Another question is that I notice apple will add my project codes to git repository. I think this is good but how do I use git related commands in xcode?
If the .xib file is in your project, you should be able to find it in the project explorer (press CMD-1 to open the project explorer if it is not already open); (example picture)
If it is not in your project, it may be close to the files in your project, so right-click a file in the project explorer, and select "Show in Finder". You can then hunt around for a .xib file.
If you cannot find it, it is possible that the tutorial wants you to create one, in which case
CMD-N will open the "create file" dialog, and you can select the appropriate template under "user interface", all of which will create .xib files.
To commit files with git, right-click on files that you wish to commit to the repository, navigate down to "Source Control", and select "Commit Selected Files". Here is the official Apple git+xcode reference guide which you may find useful.

Ada - GNAT GPS IDE not binding and linking

I'm trying to learn Ada from Wikibooks. I've downloaded and installed GNAT GPL 2011, created a project in the GPS IDE which comes with it and written an example hello world programme.
The problem I have is that the GPS IDE doesn't bind and link my programme. From here I've found out that gnatbind and gnatlink must be run after gcc. If I do it manually from the command line, the build succeeds and an executable file is correctly generated. But if I click "Build All" in GPS all I get is
gnatmake -d -PD:\path\to\project.gpr
gcc -c -I- -gnatA D:\path\to\hello.adb
[2011-06-23 13:05:17] process terminated successfully (elapsed time: 00.35s)
and only *.o and *.ali files are generated.
How do I make GPS bind and link my app?
In the Project menu, select "Edit Project Properties". Click the "Main Files" tab. Click the "Add" button.
You'll see a list of the files in your project.
Click the checkbox of the file that contains your main procedure. Just highlighting the line with the filename isn't enough, you have to check the box.
"Okay" your way out of the dialogs.
Now you can build by pressing F4, clicking Build/Project/Build All, or clicking on whichever of those icons is the "Build All" one.
You have to tell GPS (or rather gnatmake), which file should be considered the main routine.
This is done in the gpr-file with for Main use ("foo.adb"); or via the project properties in the tab "Main files".
Click F4.
That should be the shortcut to "Build Main Number 1". Check your shortcuts in Edit/Key shortcuts/Build
Good luck!

Resources