/** | |
* Copyright (c) 2009-2010 Thales Corporate Services S.A.S. | |
* This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License v2.0 | |
* which accompanies this distribution, and is available at | |
* https://www.eclipse.org/legal/epl-v2.0 | |
* | |
* SPDX-License-Identifier: EPL-2.0 | |
* | |
* Contributors: | |
* Thales Corporate Services S.A.S - initial API and implementation | |
* | |
* $Id$ | |
*/ | |
package org.eclipse.egf.portfolio.eclipse.build.buildstep.provider; | |
import java.util.Collection; | |
import java.util.List; | |
import org.eclipse.egf.portfolio.eclipse.build.buildstep.BuildstepPackage; | |
import org.eclipse.egf.portfolio.eclipse.build.buildstep.PublishStep; | |
import org.eclipse.emf.common.notify.AdapterFactory; | |
import org.eclipse.emf.common.notify.Notification; | |
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.ViewerNotification; | |
/** | |
* This is the item provider adapter for a {@link org.eclipse.egf.portfolio.eclipse.build.buildstep.PublishStep} object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public class PublishStepItemProvider | |
extends ResultStepItemProvider | |
implements | |
IEditingDomainItemProvider, | |
IStructuredItemContentProvider, | |
ITreeItemContentProvider, | |
IItemLabelProvider, | |
IItemPropertySource { | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public static final String copyright = " Copyright (c) 2009-2010 Thales Corporate Services S.A.S.\r\n This program and the accompanying materials\r\n are made available under the terms of the Eclipse Public License v2.0\r\n which accompanies this distribution, and is available at\r\n https://www.eclipse.org/legal/epl-v2.0\r\n \r\n SPDX-License-Identifier: EPL-2.0\r\n \r\n Contributors:\r\n Thales Corporate Services S.A.S - initial API and implementation"; | |
/** | |
* This constructs an instance from a factory and a notifier. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public PublishStepItemProvider(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); | |
addComponentPropertyDescriptor(object); | |
addSigningPropertyDescriptor(object); | |
addGenerateSourcesPropertyDescriptor(object); | |
addGenerateDropinsPropertyDescriptor(object); | |
} | |
return itemPropertyDescriptors; | |
} | |
/** | |
* This adds a property descriptor for the Component feature. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected void addComponentPropertyDescriptor(Object object) { | |
itemPropertyDescriptors.add | |
(createItemPropertyDescriptor | |
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), | |
getResourceLocator(), | |
getString("_UI_PublishStep_component_feature"), | |
getString("_UI_PropertyDescriptor_description", "_UI_PublishStep_component_feature", "_UI_PublishStep_type"), | |
BuildstepPackage.Literals.PUBLISH_STEP__COMPONENT, | |
true, | |
false, | |
true, | |
null, | |
null, | |
null)); | |
} | |
/** | |
* This adds a property descriptor for the Signing feature. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected void addSigningPropertyDescriptor(Object object) { | |
itemPropertyDescriptors.add | |
(createItemPropertyDescriptor | |
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), | |
getResourceLocator(), | |
getString("_UI_PublishStep_signing_feature"), | |
getString("_UI_PropertyDescriptor_description", "_UI_PublishStep_signing_feature", "_UI_PublishStep_type"), | |
BuildstepPackage.Literals.PUBLISH_STEP__SIGNING, | |
true, | |
false, | |
false, | |
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, | |
null, | |
null)); | |
} | |
/** | |
* This adds a property descriptor for the Generate Sources feature. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected void addGenerateSourcesPropertyDescriptor(Object object) { | |
itemPropertyDescriptors.add | |
(createItemPropertyDescriptor | |
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), | |
getResourceLocator(), | |
getString("_UI_PublishStep_generateSources_feature"), | |
getString("_UI_PropertyDescriptor_description", "_UI_PublishStep_generateSources_feature", "_UI_PublishStep_type"), | |
BuildstepPackage.Literals.PUBLISH_STEP__GENERATE_SOURCES, | |
true, | |
false, | |
false, | |
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, | |
null, | |
null)); | |
} | |
/** | |
* This adds a property descriptor for the Generate Dropins feature. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
protected void addGenerateDropinsPropertyDescriptor(Object object) { | |
itemPropertyDescriptors.add | |
(createItemPropertyDescriptor | |
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), | |
getResourceLocator(), | |
getString("_UI_PublishStep_generateDropins_feature"), | |
getString("_UI_PropertyDescriptor_description", "_UI_PublishStep_generateDropins_feature", "_UI_PublishStep_type"), | |
BuildstepPackage.Literals.PUBLISH_STEP__GENERATE_DROPINS, | |
true, | |
false, | |
false, | |
ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, | |
null, | |
null)); | |
} | |
/** | |
* This returns PublishStep.gif. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public Object getImage(Object object) { | |
return overlayImage(object, getResourceLocator().getImage("full/obj16/PublishStep")); | |
} | |
/** | |
* This returns the label text for the adapted class. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
@Override | |
public String getText(Object object) { | |
PublishStep publishStep = (PublishStep)object; | |
if (publishStep.getComponent() != null) | |
return getString("_UI_PublishStep_type") + " " + publishStep.getComponent().getId(); | |
return super.getText(object); | |
} | |
/** | |
* 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(PublishStep.class)) { | |
case BuildstepPackage.PUBLISH_STEP__SIGNING: | |
case BuildstepPackage.PUBLISH_STEP__GENERATE_SOURCES: | |
case BuildstepPackage.PUBLISH_STEP__GENERATE_DROPINS: | |
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); | |
return; | |
} | |
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); | |
} | |
} |