tildeio/ember-extension — pull request #36 by teddyzeenny (2013-08-02 20:25:01+00:00)
Title: Add the ability to customize properties in object inspector

By adding a `_debugInfo` method to an object, we can now customize how the properties will appear in the object inspector.

There will be a PR in parallel to Ember Data to add `_debugInfo` to `DS.Model`.

Example with Ember Data:

![extension_screenshot](https://f.cloud.github.com/assets/1061742/903690/5a951104-fbb1-11e2-9c5a-ae736c119ca5.png)

`_debugInfo` returned value:

```javascript

propertyInfo: {
// include other mixins/properties not listed here
includeOtherProperties: true,
// do not display these properties
skipProperties: [],
// do not display these mixins along with their properties
skipMixins: [],
// don't calculate these CPs automatically (unless cached)
expensiveProperties: [
'businessLine',
'organization',
'linkedOrganization',
'planGroupsProducts',
'productConditionsClauses'
],
groups: [
{
name: 'Attributes',
properties: ['id', 'code', 'name' ],
expand: true // open by default
},
{
name: 'Belongs To',
properties: [ 'businessLine', 'organization', 'linkedOrganization' ],
expand: true
},
{
name: 'Has Many',
properties: [ 'planGroupsProducts', 'productConditionClauses' ],
expand: true
},
{
name: 'Flags',
properties: ['isLoaded', 'isDirty', 'isSaving', 'isDeleted', 'isError', 'isNew', 'isValid']
}
]
}
```