-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding capability to extending the model (#212)
- Loading branch information
1 parent
f559afc
commit e559bf2
Showing
32 changed files
with
1,406 additions
and
58 deletions.
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
Binary file added
BIN
+223 Bytes
...ptormodel.edit/icons/full/ctool16/CreateService_sourceBinding_SourceBinding.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+223 Bytes
...rmodel.edit/icons/full/ctool16/CreateWebService_sourceBinding_SourceBinding.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
135 changes: 135 additions & 0 deletions
135
....lyo.tools.adaptormodel.edit/src/adaptorinterface/provider/SourceBindingItemProvider.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,135 @@ | ||
/** | ||
*/ | ||
package adaptorinterface.provider; | ||
|
||
|
||
import adaptorinterface.AdaptorinterfacePackage; | ||
|
||
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.ItemProviderAdapter; | ||
|
||
/** | ||
* This is the item provider adapter for a {@link adaptorinterface.SourceBinding} object. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
public class SourceBindingItemProvider | ||
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 SourceBindingItemProvider(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); | ||
|
||
addSourcePropertyDescriptor(object); | ||
} | ||
return itemPropertyDescriptors; | ||
} | ||
|
||
/** | ||
* This adds a property descriptor for the Source feature. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
protected void addSourcePropertyDescriptor(Object object) { | ||
itemPropertyDescriptors.add | ||
(createItemPropertyDescriptor | ||
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), | ||
getResourceLocator(), | ||
getString("_UI_SourceBinding_source_feature"), | ||
getString("_UI_PropertyDescriptor_description", "_UI_SourceBinding_source_feature", "_UI_SourceBinding_type"), | ||
AdaptorinterfacePackage.Literals.SOURCE_BINDING__SOURCE, | ||
true, | ||
false, | ||
true, | ||
null, | ||
null, | ||
null)); | ||
} | ||
|
||
/** | ||
* This returns the label text for the adapted class. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
@Override | ||
public String getText(Object object) { | ||
return getString("_UI_SourceBinding_type"); | ||
} | ||
|
||
|
||
/** | ||
* 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); | ||
super.notifyChanged(notification); | ||
} | ||
|
||
/** | ||
* 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 AdaptorInterfaceEditPlugin.INSTANCE; | ||
} | ||
|
||
} |
Oops, something went wrong.