Join Joe Marini for an in-depth discussion in this video Using Content Assist, part of Up and Running with Aptana Studio 3.
So as you might expect, code editing in the Aptana editors are pretty straightforward. I can just click anywhere and just start adding some text. But Aptana Studio has a couple of nice code editing features, one of those is a feature called Content Assist, and you've probably seen this before in other editors, sometimes they call it Statement Completion, sometimes they call it Auto Complete, and Aptana Studio is no different, they also have it. So let me switch over to a simpler file. And you'll notice, for example, that when I type an opening bracket, I get this nice little window that pops up. This is the content assist function and Aptana has detected that this is probably going to be an HTML tag, so I can choose to put a tag in, so here I've put in a link tag.
And if I hit the spacebar inside the opening tag, you'll see that once again I get the content assist, only this time it's for the attributes and events for that tag. So the content assist is being pretty smart about what it lets me insert at what point. And you can also see that it's giving me a hint about what attributes are available in what browser. So I am going to go ahead and click on class, and now to bring up content assist manually here inside the class attribute, I can type Ctrl+Space, and if you're on the Mac, Ctrl+A will work as well.
And you can see that now Aptana Studio is giving me options for what style sheet I actually want to refer to. So it knows that I have CSS styles in my project, and I can choose to insert the academic or the alumni or the branding or whatever kind of stylesheet that I have to find in my CSS, it's detected that, and I can choose to enter that stylesheet. Content Assist is a pretty cool feature. There is also a set of preferences that go along with it, so let's go take a look at those now. So I am going to bring up the Preferences, and on the Mac you can do this under the App Name menu.
One of the things I've been doing up until now is just going to the right place in the Preferences dialog. What I am going to do up here in the filter text is just type content assist, and you can see that we get filtered down right to the preference we want, so I am going to choose Content Assist. Inside the Content Assist you can set a couple of different settings. First, you can choose what the nature of the project is, and you can choose either PHP, Rails, Ruby, Web, or whatever the project you're working on is. In this case, Aptana has detected that the file that I am looking at is a PHP file. And I can choose which browsers/user agents are shown in content assist.
Right now, I've only got Chrome, Firefox ,and IE selected, but I can choose to turn on Opera and Safari as well. And I have some other options here. I can choose how long I want to wait before the content assist is displayed, and I can also choose whether or not I want to Show information on hover. Now normally I turn this off because personally it annoys me, but I'm just going to leave it on for the purpose of this title. So I am going to click OK. So that's pretty much using Content Assist and writing code in the Aptana Editor, nothing really more complex than that.
Let's move on now and take a look at some higher level editing features, starting with Snippets.
- Installing Aptana Studio on Windows and OS X
- Creating a new file from scratch or from a template
- Creating a new web project
- Importing an existing web project
- Editing code
- Viewing code changes with Quick Diff
- Keeping track of your to-do list with Tasks
- Adding new code snippets and templates with bundles
- Previewing projects
- Deploying your website to an FTP server