How do I undo the removal of a method in Squeak Smalltalk?
'World Menu'->'open'->'simple change sorter'
In the top-right pane, select the class from which the method was removed.
In the middle pane, select the removed method.
Right click on the method name, bringing up a menu
Select "versions"
When the versions tool comes up, select the top (most recent) version, which is the one you deleted.
Click the "revert" button
When you browse your class, you will see that the method is restored.
If you use OmniBrowser and the Refactoring Tools you have unlimited undo/redo on all your code changes like in any other modern editor. Select in the context menu Refactor > Undo.
You can open your changes file:
Tools menu at the top of your screen.
File List (which should open in the right place).
In the upper right pane select the changes file (given an image called Foo.image, you'd look for Foo.changed).
Hit the "recent changes" button, browsing as far back as the latest (top) snapshot.
All method additions, alterations, deletions, DoIts are listed in the list that pops up.
Select the method/s you want, right click (I can never remember the colours for mouse buttons) and "fileIn selections".
Related
I am an aspiring keyboard user, using IntelliJ to do selective commits to my project.
To do this, I open the Commit dialog with Ctrl+K.
I then press Shift+Tab to switch to the file list, Home to select the root-level node, and Space to uncheck/de-select all files.
I then press the down arrow once or more to select a file, press Ctrl+D to display its diff. I press F7 to go to the first change in the file.
At this point, to the left of the right pane (with the new version of the file) is a checkbox. Not the one at the top which selects all the changes in the file, but the one which selects just the change displayed.
My question is: How do I select/un-select this checkbox without using the mouse cursor? I need to use the mouse as little as possible due to RSI.
Note: When asking questions like this, I sometimes get responses with other pointing device suggestions. Unless you're going to recommend a keyboard technique, I am not interested in your suggestion, and will flag/report your response if that's what it is.
By default there is no keyboard keymap for this action. But you can easily choose new keymap for this.
Go to File->Settings and search for "include" in the search box. What you need is to assign a keymap for "Include Lines Into Commit". Double click on this option and assign any keymap that you want. It is hard to find new keymap that didn't assign to any other action, but only for the demo I choosed Ctrl+T.
You can see what I did in the following image:
Click on Apply and then you can use the keymap that you choose to check/uncheck any individual change checkbox in Intellij commit diff dialog.
Anyone know how to make project and structure navigation set in splitting mode?
See images ( I was able doing this, but don't know how )
This took me a really long time to figure out.
For you to set this up, you need to
First: make sure each Tool Window is set to "Pinned Mode" and "Docked Mode" (you can do this by right clicking on the Project/Structure tab)
Second: the Tool Window you want on top should have the "Split Mode" NOT checked
Third: the Tool Window you want at the bottom should have the "Split Mode" checked
Step :
Preferences
Appearance & Behaviour
Appearance then untick side-by-side layout on the left at Window options
Project tab move to the left side and make sure untick split-mode
Structure tab move to the left side and make sure tick split-mode
Sure, just grab your "Structure" tool window button (the one on the left side, that has "7" in the title) and drag it to the bottom part of the same side.
Alternatively just right click on tool window button or title bar and choose "Split Mode" -- it will move it to the opposite part of the same side (e.g. will move from Left Top to Left Bottom -- just as per your image).
Official manual page.
As of version 2019.1, PHPStorm tool windows no longer behave the way the other answers say, that is, there is no explicit "split mode". Instead, it uses the location of the tab; you can no longer split tool windows if they are in the same tab group, but you can display two tool panes by putting them in different groups. So if you're looking for the standard projects half-pane at the top, and structure at the bottom, put structure in the top left group, and structure in the bottom left, and then enable them both - and the view will split.
To reiterate – if you have both project and structure in top left, there is no way to split them; you must move the tab.
To whom the other answers did not work:
At first go to Windows menu then click Restore Default Layout
Then go to View => Tool Windows => Project
Then go to View => Tool Windows => Structure
how do I find in XCode all caller functions of a specific function like eclipse's Call Hierarchy
Since the release of XCode 4.4, this functionality exists and is called "show related items".
There are multiple ways of accessing the pop-up menu that will allow you to view all callers and callees, among other things.
The fastest way is:
Mark method in code (using your cursor or double click name)
Press Ctrl+1
Select "Callers" from the pop-up menu
You can also go View->Standard Editor->show related items or press the tiny button just left of the arrow buttons in the line just above the editor window (where it shows your currently selected file and method).
There is a hotkey —> ^CmdShift + H
I am currently using xcode and I find it's lack of tabs quite disturbing.
I currently use command-shift-d to search through all the files, or ctrl-1 to open the history of files that were recently opened.
It works but I find it less effective than just tabbing through the few files i am currently working on.
Is there any way, third party or not, to enable some sort of tabbed organization?
If not, is there any other way to quickly navigate through a subset of files?
XCode 4 now supports tabs. You can enable by selecting "View / Show Tab Bar" menu.
Not really, but one alternative is View > Show Favorites Bar and drag five or six frequently-used source files into it. Not as flexible as tabs but satisfies your request for "quickly navigate through a subset of files".
The traditional way is to use the detail view. Get the files you want in the Detail view by one of these means:
Put them all in the same group, then select the group
Enter a filter expression in the Search Bubble that narrows the items shown
Define a Smartgroup that includes just the files you want
Get a list of the files as a Find in Project result, then select that item in Find Results
Then you can use the Detail View as your list of interesting files and navigate through it quickly with the up and down arrows.
First of all, you can use Textmate (which I believe has Xcode integration). Otherwise:
Window (Menu) -> Organizer (ctrl-command-o)
At the bottom of that window, if you don't have two panes, click the square to the right of the gear. Now drag code files of interest to the left, grey pane--a single click or arrow up/down will open the file in the editor pane.
If you do open a bunch of windows, as vog suggested, you'll need to command-~ through them--not alt-tab.
Cheers.
The Xcode source code editor allows you to choose the file from a list. It's two clicks instead of one (as it would be with tabbing), but it's better than nothing.
In addition, you can simply Alt-Tab through your open source code windows. This is not slower than tabbing, and has the same effect since the source code windows are usually placed exactly one in front of another.
You'll definitely want to read through this. (XCode Tips and Tricks you wish you know about two years ago - SO)
You can navigate between files using "Recent Files"
Write simple applescript:
tell application "Xcode"
tell application "System Events"
keystroke "1" using {control down} -- open "Related Files"
key code 125 -- choose "Recent Files" ("keystroke down" doesn't work)
keystroke return -- enter to "Recent Files"
key code 125 -- choose previous file
end tell
end tell
And bind it to some shortcut using for example FastScripts(free up to 10 bindings)
I have this script on "Control" + "`". (XCode 4)
Hope this will help
You may also try an Xcode plugin I've just released - it's called Code Pilot and solves a lot of issues of Xcode's navigation, making it more TextMate/Eclipse-like.
Check it out here: http://macoscope.net/en/mac/codepilot/
I hope this helps!
It is simple with XCode 7.2
GoTo View>>Show Tab Bar
This will show the tab bar.
RightClick on the New Tab and click -->"NEW TAB"
Then We can see all the files in tabs.
What is the quickest way to jump to a particular symbol/selector/class in Xcode? (I'm looking for keyboard shortcuts preferably).
Right now, I know two ways of doing this:
“Open Quickly” > Click on the Symbols dropdown menu at the top of the editor > Select the selector to jump to it.
Click on “Project Symbols” in the “Groups and Files” section on the left sidebar, and type in a name in the Search text field in the top right of the XCode window.
Is there a quicker way of doing this? (If I could even assign a shortcut to jump to the “Project Symbols”, that would suffice for me. Alternatively, if I can find a keyboard shortcut to jump to the symbol dropdown above an editor that would do it to).
For experienced Xcode programmers, what do you use to jump to a symbol?
In Xcode 3.2, the "Open Quickly" command (Shift-Control-D) lets you type in selectors and class names as well as file names. This would at least get you close to what you wanted.
Your idea about using the "Symbols" drop-down also works. You can use the keystroke Control-2 to bring up the Symbols drop-down menu, and then use the arrow keys, or start typing the name of the method that you want to reach.
Edit: In Xcode 4, the "Symbols" drop-down appears when pressing Control-6. You can change this in the Xcode settings by changing the key binding for "Standart Editor > Show Document Items".
If you're looking at the symbol in a source file and want to jump to its definition, ⌘-click it.
(command + double click) on your symbol/selector/class in any place of your implementation to jump to them
(option + double click) on framework classes/selectors to jump to their reference in help->documentation
One (arguably crude) way to do it seems to be as follows:
This is based on the fact that the Search field at the top right of the Xcode window seems to change behavior depending on what is selected in the Groups & Files sidebar.
Select “Project Symbols” in the “Groups & Files” sidebar
Press ⌥⌘F (That is Command+Option+F) to jump to the Search field
Enter the symbol to jump to, and an outline will quickly show up
(this will remain in effect until you click on something else in the Groups & Files sidebar)