-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feat]Add on global regions extension availabilityzone as a resource …
…not a mixin.
- Loading branch information
GOURDIN Christophe
committed
Jun 7, 2018
1 parent
2cdbff9
commit dc5a704
Showing
25 changed files
with
978 additions
and
151 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
36 changes: 36 additions & 0 deletions
36
...-gen/org/eclipse/cmf/occi/multicloud/regions/connector/AvailabilityzonelinkConnector.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,36 @@ | ||
/** | ||
* Copyright (c) 2016-2017 Inria | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* - Philippe Merle <[email protected]> | ||
* - Faiez Zalila <[email protected]> | ||
* | ||
* Generated at Thu May 03 15:45:31 CEST 2018 from platform:/resource/org.eclipse.cmf.occi.multicloud.regions/model/regions.occie by org.eclipse.cmf.occi.core.gen.connector | ||
*/ | ||
package org.eclipse.cmf.occi.multicloud.regions.connector; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
public class AvailabilityzonelinkConnector extends org.eclipse.cmf.occi.multicloud.regions.impl.AvailabilityzonelinkImpl { | ||
/** | ||
* Initialize the logger. | ||
*/ | ||
private static Logger LOGGER = LoggerFactory.getLogger(AvailabilityzoneConnector.class); | ||
|
||
// Start of user code Availabilityzoneconnector_constructor | ||
/** | ||
* Constructs a availabilityzone connector. | ||
*/ | ||
AvailabilityzonelinkConnector() | ||
{ | ||
LOGGER.debug("Constructor called on " + this); | ||
// TODO: Implement this constructor. | ||
} | ||
// End of user code | ||
} |
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
+129 Bytes
...ipse.cmf.occi.multicloud.regions.edit/icons/full/obj16/Availabilityzonelink.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
157 changes: 157 additions & 0 deletions
157
...en/org/eclipse/cmf/occi/multicloud/regions/provider/AvailabilityzonelinkItemProvider.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,157 @@ | ||
/** | ||
* Copyright (c) 2015-2017 Obeo, Inria | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* - William Piers <[email protected]> | ||
* - Philippe Merle <[email protected]> | ||
* - Faiez Zalila <[email protected]> | ||
*/ | ||
package org.eclipse.cmf.occi.multicloud.regions.provider; | ||
|
||
|
||
import java.util.Collection; | ||
import java.util.List; | ||
|
||
import org.eclipse.cmf.occi.core.OCCIPackage; | ||
|
||
import org.eclipse.cmf.occi.core.provider.LinkItemProvider; | ||
|
||
import org.eclipse.cmf.occi.multicloud.regions.Availabilityzonelink; | ||
import org.eclipse.cmf.occi.multicloud.regions.RegionsFactory; | ||
|
||
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.IItemPropertyDescriptor; | ||
|
||
/** | ||
* This is the item provider adapter for a {@link org.eclipse.cmf.occi.multicloud.regions.Availabilityzonelink} object. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
public class AvailabilityzonelinkItemProvider extends LinkItemProvider { | ||
/** | ||
* This constructs an instance from a factory and a notifier. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
public AvailabilityzonelinkItemProvider(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); | ||
|
||
} | ||
return itemPropertyDescriptors; | ||
} | ||
|
||
/** | ||
* This returns Availabilityzonelink.gif. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
@Override | ||
public Object getImage(Object object) { | ||
return overlayImage(object, getResourceLocator().getImage("full/obj16/Availabilityzonelink")); | ||
} | ||
|
||
/** | ||
* This returns the label text for the adapted class. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
@Override | ||
public String getText(Object object) { | ||
String label = ((Availabilityzonelink)object).getId(); | ||
return label == null || label.length() == 0 ? | ||
getString("_UI_Availabilityzonelink_type") : | ||
getString("_UI_Availabilityzonelink_type") + " " + label; | ||
} | ||
|
||
|
||
/** | ||
* 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); | ||
|
||
newChildDescriptors.add | ||
(createChildParameter | ||
(OCCIPackage.Literals.ENTITY__PARTS, | ||
RegionsFactory.eINSTANCE.createEurope())); | ||
|
||
newChildDescriptors.add | ||
(createChildParameter | ||
(OCCIPackage.Literals.ENTITY__PARTS, | ||
RegionsFactory.eINSTANCE.createNorthamerica())); | ||
|
||
newChildDescriptors.add | ||
(createChildParameter | ||
(OCCIPackage.Literals.ENTITY__PARTS, | ||
RegionsFactory.eINSTANCE.createSouthamerica())); | ||
|
||
newChildDescriptors.add | ||
(createChildParameter | ||
(OCCIPackage.Literals.ENTITY__PARTS, | ||
RegionsFactory.eINSTANCE.createAsiapacific())); | ||
|
||
newChildDescriptors.add | ||
(createChildParameter | ||
(OCCIPackage.Literals.ENTITY__PARTS, | ||
RegionsFactory.eINSTANCE.createAfrica())); | ||
|
||
newChildDescriptors.add | ||
(createChildParameter | ||
(OCCIPackage.Literals.ENTITY__PARTS, | ||
RegionsFactory.eINSTANCE.createChina())); | ||
} | ||
|
||
/** | ||
* Return the resource locator for this item provider's resources. | ||
* <!-- begin-user-doc --> | ||
* <!-- end-user-doc --> | ||
* @generated | ||
*/ | ||
@Override | ||
public ResourceLocator getResourceLocator() { | ||
return RegionsEditPlugin.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
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.