0

I used to be on Dreamweaver, but I have since really gotten into Aptana Studio 3. I have finally gotten the code coloring down correctly, but one thing I really miss from Dreamweaver is the dynamic discovery and completion using custom classes. I cannot figure out how to do that in Aptana Studio though. Here is what I mean:

With Dreamweaver I could create a file such as class.php

<?php 

class Test {

  function __construct(){
  }

  function something(){
    $var = "test";
    return $var;
  }

}

?>

And then I could include it in say index.php

<?php 
include_once("class.php");

$test = new Test();
echo $test->something;

?>

Once I included the class in my code and then typed "$test = new " Dreamweaver would then automatically popup "Test()" for me to chooose. And then of course any variables to pass along. Also, when I typed "$test->" Dreamweaver would also pop up a list of the functions within that class for me to choose from as well and it would do this dynamically.

So my question is "How do I get this same functionality with Aptana Studio 3?" I am currently using Aptana Studio with the remote explorer to open and edit files from a webserver. I have found a few suggestions via Google about using projects, but I am not really interested in projects right now. I just want to open the file and edit it and/or just create a new file directly on the server.

So, is there anyone out there who knows how to get Aptana Studio to dynamically detect custom classes and use them for code completion like Dreamweaver does?

Thanks to everyone in advance.

4

1 回答 1

1

I'm putting this in as an answer because it is too long for a comment.

It is nice that Aptana can edit and save to the server, though I haven't found it to be nearly as reliable as local saving (I sure don't count on it).

To make a project from an existing site (which I do frequently), you just find a spot on your computer you want to keep your files, make a folder (name it after your site, probably), then go into Aptana and choose File > Import. Under 'General' there is an option for 'Existing Folder as New Project'. Choose that, click next, Browse to the folder you made, check the box next to the Project Type you want (PHP probably) and hit Finish. This will create a project (which is just an empty folder so far. Then you probably want to link the Project to the remote Connection you have been using(1). Now you can pull down the files you want to work from (grab your includes too, if you want them indexed) and edit them and upload them just like you have been (Ctrl + Shift + U FTW).

Added bonus: now you can do global search and replace on everything you've downloaded.

Projects are a huge part of Aptana, they are really worth the disk space (at least to me) - especially since you don't have to make a complete copy of your site to use them.

  1. Window > Show View > Project Explorer, expand the Project in this window and double click 'Connections' where you can show the Project which connection to use.
于 2013-02-21T21:35:16.383 回答