-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 568711 Design model for grant acquisition
GrantAquisition class is identified, binds FeatureGrant, User and actual acquisition date Signed-off-by: eparovyshnaya <[email protected]>
- Loading branch information
1 parent
263f6a7
commit cf4902f
Showing
15 changed files
with
1,113 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
219 changes: 219 additions & 0 deletions
219
.../src-gen/org/eclipse/passage/lic/floating/edit/providers/GrantAcqisitionItemProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,219 @@ | ||
/** | ||
*/ | ||
package org.eclipse.passage.lic.floating.edit.providers; | ||
|
||
import java.util.Collection; | ||
import java.util.List; | ||
|
||
import org.eclipse.emf.common.notify.AdapterFactory; | ||
import org.eclipse.emf.common.notify.Notification; | ||
|
||
import org.eclipse.emf.common.util.ResourceLocator; | ||
|
||
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; | ||
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; | ||
import org.eclipse.emf.edit.provider.IItemLabelProvider; | ||
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; | ||
import org.eclipse.emf.edit.provider.IItemPropertySource; | ||
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider; | ||
import org.eclipse.emf.edit.provider.ITreeItemContentProvider; | ||
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; | ||
import org.eclipse.emf.edit.provider.ItemProviderAdapter; | ||
import org.eclipse.emf.edit.provider.ViewerNotification; | ||
|
||
import org.eclipse.passage.lic.floating.edit.FLoatingLicensesEditPlugin; | ||
|
||
import org.eclipse.passage.lic.floating.model.api.GrantAcqisition; | ||
|
||
import org.eclipse.passage.lic.floating.model.meta.FloatingPackage; | ||
|
||
/** | ||
* This is the item provider adapter for a {@link org.eclipse.passage.lic.floating.model.api.GrantAcqisition} object. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
public class GrantAcqisitionItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider, | ||
IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource { | ||
/** | ||
* This constructs an instance from a factory and a notifier. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
public GrantAcqisitionItemProvider(AdapterFactory adapterFactory) { | ||
super(adapterFactory); | ||
} | ||
|
||
/** | ||
* This returns the property descriptors for the adapted class. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
@Override | ||
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) { | ||
if (itemPropertyDescriptors == null) { | ||
super.getPropertyDescriptors(object); | ||
|
||
addIdentifierPropertyDescriptor(object); | ||
addFeaturePropertyDescriptor(object); | ||
addGrantPropertyDescriptor(object); | ||
addUserPropertyDescriptor(object); | ||
addCreatedPropertyDescriptor(object); | ||
} | ||
return itemPropertyDescriptors; | ||
} | ||
|
||
/** | ||
* This adds a property descriptor for the Identifier feature. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
protected void addIdentifierPropertyDescriptor(Object object) { | ||
itemPropertyDescriptors | ||
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), | ||
getResourceLocator(), getString("_UI_GrantAcqisition_identifier_feature"), //$NON-NLS-1$ | ||
getString("_UI_PropertyDescriptor_description", "_UI_GrantAcqisition_identifier_feature", //$NON-NLS-1$//$NON-NLS-2$ | ||
"_UI_GrantAcqisition_type"), //$NON-NLS-1$ | ||
FloatingPackage.eINSTANCE.getGrantAcqisition_Identifier(), true, false, false, | ||
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); | ||
} | ||
|
||
/** | ||
* This adds a property descriptor for the Feature feature. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
protected void addFeaturePropertyDescriptor(Object object) { | ||
itemPropertyDescriptors | ||
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), | ||
getResourceLocator(), getString("_UI_GrantAcqisition_feature_feature"), //$NON-NLS-1$ | ||
getString("_UI_PropertyDescriptor_description", "_UI_GrantAcqisition_feature_feature", //$NON-NLS-1$//$NON-NLS-2$ | ||
"_UI_GrantAcqisition_type"), //$NON-NLS-1$ | ||
FloatingPackage.eINSTANCE.getGrantAcqisition_Feature(), true, false, false, | ||
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); | ||
} | ||
|
||
/** | ||
* This adds a property descriptor for the Grant feature. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
protected void addGrantPropertyDescriptor(Object object) { | ||
itemPropertyDescriptors | ||
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), | ||
getResourceLocator(), getString("_UI_GrantAcqisition_grant_feature"), //$NON-NLS-1$ | ||
getString("_UI_PropertyDescriptor_description", "_UI_GrantAcqisition_grant_feature", //$NON-NLS-1$//$NON-NLS-2$ | ||
"_UI_GrantAcqisition_type"), //$NON-NLS-1$ | ||
FloatingPackage.eINSTANCE.getGrantAcqisition_Grant(), true, false, false, | ||
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); | ||
} | ||
|
||
/** | ||
* This adds a property descriptor for the User feature. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
protected void addUserPropertyDescriptor(Object object) { | ||
itemPropertyDescriptors | ||
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), | ||
getResourceLocator(), getString("_UI_GrantAcqisition_user_feature"), //$NON-NLS-1$ | ||
getString("_UI_PropertyDescriptor_description", "_UI_GrantAcqisition_user_feature", //$NON-NLS-1$//$NON-NLS-2$ | ||
"_UI_GrantAcqisition_type"), //$NON-NLS-1$ | ||
FloatingPackage.eINSTANCE.getGrantAcqisition_User(), true, false, false, | ||
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); | ||
} | ||
|
||
/** | ||
* This adds a property descriptor for the Created feature. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
protected void addCreatedPropertyDescriptor(Object object) { | ||
itemPropertyDescriptors | ||
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), | ||
getResourceLocator(), getString("_UI_GrantAcqisition_created_feature"), //$NON-NLS-1$ | ||
getString("_UI_PropertyDescriptor_description", "_UI_GrantAcqisition_created_feature", //$NON-NLS-1$//$NON-NLS-2$ | ||
"_UI_GrantAcqisition_type"), //$NON-NLS-1$ | ||
FloatingPackage.eINSTANCE.getGrantAcqisition_Created(), true, false, false, | ||
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null)); | ||
} | ||
|
||
/** | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
@Override | ||
protected boolean shouldComposeCreationImage() { | ||
return true; | ||
} | ||
|
||
/** | ||
* This returns the label text for the adapted class. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
@Override | ||
public String getText(Object object) { | ||
String label = ((GrantAcqisition) object).getIdentifier(); | ||
return label == null || label.length() == 0 ? getString("_UI_GrantAcqisition_type") : //$NON-NLS-1$ | ||
getString("_UI_GrantAcqisition_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$ | ||
} | ||
|
||
/** | ||
* This handles model notifications by calling {@link #updateChildren} to update any cached | ||
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
@Override | ||
public void notifyChanged(Notification notification) { | ||
updateChildren(notification); | ||
|
||
switch (notification.getFeatureID(GrantAcqisition.class)) { | ||
case FloatingPackage.GRANT_ACQISITION__IDENTIFIER: | ||
case FloatingPackage.GRANT_ACQISITION__FEATURE: | ||
case FloatingPackage.GRANT_ACQISITION__GRANT: | ||
case FloatingPackage.GRANT_ACQISITION__USER: | ||
case FloatingPackage.GRANT_ACQISITION__CREATED: | ||
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); | ||
return; | ||
default: | ||
super.notifyChanged(notification); | ||
return; | ||
} | ||
} | ||
|
||
/** | ||
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children | ||
* that can be created under this object. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
@Override | ||
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { | ||
super.collectNewChildDescriptors(newChildDescriptors, object); | ||
} | ||
|
||
/** | ||
* Return the resource locator for this item provider's resources. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
@Override | ||
public ResourceLocator getResourceLocator() { | ||
return FLoatingLicensesEditPlugin.INSTANCE; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.