| 134 | |
| 135 | * the last thing is that you add the new property descriptor in you AItemProvider Class: |
| 136 | {{{ |
| 137 | /** |
| 138 | * This returns the property descriptors for the adapted class. |
| 139 | * <!-- begin-user-doc --> |
| 140 | * <!-- end-user-doc --> |
| 141 | * @generated NOT |
| 142 | */ |
| 143 | @Override |
| 144 | public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { |
| 145 | if (itemPropertyDescriptors == null) { |
| 146 | super.getPropertyDescriptors(object); |
| 147 | |
| 148 | addTitlePropertyDescriptor(object); |
| 149 | addDescriptionPropertyDescriptor(object); |
| 150 | // --------------- this is new ----------- |
| 151 | addBackgroundImageDescriptor(object); |
| 152 | // --------------------------------------- |
| 153 | } |
| 154 | return itemPropertyDescriptors; |
| 155 | } |
| 156 | }}} [[BR]] |
| 157 | and this is the new method: |
| 158 | {{{ |
| 159 | protected void addBackgroundImageDescriptor(Object object) |
| 160 | { |
| 161 | IItemPropertyDescriptor imagePropertyDescriptor = |
| 162 | new ImagePropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), |
| 163 | getResourceLocator(), |
| 164 | getString("_UI_Scene_backgroundImage_feature"), |
| 165 | getString("_UI_PropertyDescriptor_description", "_UI_Scene_backgroundImage_feature", "_UI_Scene_type"), |
| 166 | ExhibitionPackage.Literals.SCENE__BACKGROUND_IMAGE, |
| 167 | true, |
| 168 | false, |
| 169 | false, |
| 170 | ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, |
| 171 | null, |
| 172 | null); |
| 173 | itemPropertyDescriptors.add(imagePropertyDescriptor); |
| 174 | } |
| 175 | }}} |