Question: Here T could be an array or a single object. How can add the array to an arraylist or add a single object to the same arraylist. This gives me a build-time error that the overloaded match for `AddRange` has invalid arguments.

```
T loadedContent;
if (typeof(T).IsArray)
{
    contentArrayList.AddRange(loadedContent);
}
else
{
    contentArrayList.Add(loadedContent);
}

```

Answer: 
Make sure you have set the correct editor associations and content types

Go to settings (`Window -> preferences`)

**Content Types**

1. Type in `Content Types` in the search box (should show under `General -> Types`
2. Click on the arrow next to `Text`, select `PHP Content Type`
3. Add `*.ctp` by clicking on the Add button on the right side

**File Association**

1. Type in `File Associations` in the search box on the left
2. Add \*.ctp (click the Add button on the top right side)
3. Associate the proper editor for it by clicking Add (on the bottom right side) and selecting PHP Editor
You can change the extension that CakePHP uses for view files to an extension that Eclipse likes. In the controller (or app\_controller) add the following variable:

```
var $ext = '.tpl';

```

If you change the extension to "PHP" you may have problems because CakePHP will try to load a class that matches the filename.