Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorashatalin2006-06-19 12:41:57 +0000
committerashatalin2006-06-19 12:41:57 +0000
commit74f824575d84b4777871615db700ba6921c08a87 (patch)
tree666e008a15a58c1a64ea8983e8b8daea7d9f63d3 /plugins/org.eclipse.gmf.codegen.edit
parent064823f6c89a206ac6dc764e1bf1c1a08c86009b (diff)
downloadorg.eclipse.gmf-tooling-74f824575d84b4777871615db700ba6921c08a87.tar.gz
org.eclipse.gmf-tooling-74f824575d84b4777871615db700ba6921c08a87.tar.xz
org.eclipse.gmf-tooling-74f824575d84b4777871615db700ba6921c08a87.zip
[mgolubev] #145863 Colors defined in the gmfgraph model should be used by the generated polyline connections
Diffstat (limited to 'plugins/org.eclipse.gmf.codegen.edit')
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/plugin.properties6
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GMFGenItemProviderAdapterFactory.java23
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/StyleAttributesItemProvider.java202
-rw-r--r--plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/ViewmapItemProvider.java5
4 files changed, 235 insertions, 1 deletions
diff --git a/plugins/org.eclipse.gmf.codegen.edit/plugin.properties b/plugins/org.eclipse.gmf.codegen.edit/plugin.properties
index 5d9ea9f18..37c821ef2 100644
--- a/plugins/org.eclipse.gmf.codegen.edit/plugin.properties
+++ b/plugins/org.eclipse.gmf.codegen.edit/plugin.properties
@@ -450,5 +450,9 @@ _UI_GenLanguage_regexp_literal = regexp
_UI_GenLanguage_nregexp_literal = nregexp
-_UI_BatchValidation_validationDecoratorProviderPriority_feature = Validation Decorator Provider Priority
+_UI_BatchValidation_validationDecoratorProviderPriority_feature = Validation Decorator Provider Priority
_UI_DesignLabelModelFacet_type = Design Label Model Facet
+_UI_StyleAttributes_type = Style Attributes
+_UI_StyleAttributes_fixedFont_feature = Fixed Font
+_UI_StyleAttributes_fixedForeground_feature = Fixed Foreground
+_UI_StyleAttributes_fixedBackground_feature = Fixed Background
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GMFGenItemProviderAdapterFactory.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GMFGenItemProviderAdapterFactory.java
index 819d82b2f..241473ebd 100644
--- a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GMFGenItemProviderAdapterFactory.java
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/GMFGenItemProviderAdapterFactory.java
@@ -602,6 +602,28 @@ public class GMFGenItemProviderAdapterFactory extends GMFGenAdapterFactory imple
}
/**
+ * This keeps track of the one adapter used for all {@link org.eclipse.gmf.codegen.gmfgen.StyleAttributes} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected StyleAttributesItemProvider styleAttributesItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.gmf.codegen.gmfgen.StyleAttributes}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Adapter createStyleAttributesAdapter() {
+ if (styleAttributesItemProvider == null) {
+ styleAttributesItemProvider = new StyleAttributesItemProvider(this);
+ }
+
+ return styleAttributesItemProvider;
+ }
+
+ /**
* This keeps track of the one adapter used for all {@link org.eclipse.gmf.codegen.gmfgen.ResizeConstraints} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1337,6 +1359,7 @@ public class GMFGenItemProviderAdapterFactory extends GMFGenAdapterFactory imple
if (compositeFeatureLabelModelFacetItemProvider != null) compositeFeatureLabelModelFacetItemProvider.dispose();
if (designLabelModelFacetItemProvider != null) designLabelModelFacetItemProvider.dispose();
if (colorAttributesItemProvider != null) colorAttributesItemProvider.dispose();
+ if (styleAttributesItemProvider != null) styleAttributesItemProvider.dispose();
if (resizeConstraintsItemProvider != null) resizeConstraintsItemProvider.dispose();
if (defaultSizeAttributesItemProvider != null) defaultSizeAttributesItemProvider.dispose();
if (labelOffsetAttributesItemProvider != null) labelOffsetAttributesItemProvider.dispose();
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/StyleAttributesItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/StyleAttributesItemProvider.java
new file mode 100644
index 000000000..bd1ceb2ca
--- /dev/null
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/StyleAttributesItemProvider.java
@@ -0,0 +1,202 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.eclipse.gmf.codegen.gmfgen.provider;
+
+
+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.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.gmf.codegen.gmfgen.GMFGenPackage;
+import org.eclipse.gmf.codegen.gmfgen.StyleAttributes;
+
+import org.eclipse.gmf.codegen.gmfgen.presentation.EditorPlugin;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.gmf.codegen.gmfgen.StyleAttributes} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class StyleAttributesItemProvider
+ 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 StyleAttributesItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public List getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addFixedFontPropertyDescriptor(object);
+ addFixedForegroundPropertyDescriptor(object);
+ addFixedBackgroundPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Fixed Font feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addFixedFontPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_StyleAttributes_fixedFont_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_StyleAttributes_fixedFont_feature", "_UI_StyleAttributes_type"),
+ GMFGenPackage.eINSTANCE.getStyleAttributes_FixedFont(),
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Fixed Foreground feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addFixedForegroundPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_StyleAttributes_fixedForeground_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_StyleAttributes_fixedForeground_feature", "_UI_StyleAttributes_type"),
+ GMFGenPackage.eINSTANCE.getStyleAttributes_FixedForeground(),
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Fixed Background feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addFixedBackgroundPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_StyleAttributes_fixedBackground_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_StyleAttributes_fixedBackground_feature", "_UI_StyleAttributes_type"),
+ GMFGenPackage.eINSTANCE.getStyleAttributes_FixedBackground(),
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns StyleAttributes.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/StyleAttributes"));
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getText(Object object) {
+ StyleAttributes styleAttributes = (StyleAttributes)object;
+ return getString("_UI_StyleAttributes_type") + " " + styleAttributes.isFixedFont();
+ }
+
+ /**
+ * 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
+ */
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(StyleAttributes.class)) {
+ case GMFGenPackage.STYLE_ATTRIBUTES__FIXED_FONT:
+ case GMFGenPackage.STYLE_ATTRIBUTES__FIXED_FOREGROUND:
+ case GMFGenPackage.STYLE_ATTRIBUTES__FIXED_BACKGROUND:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
+ * describing all of the children that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+ /**
+ * Return the resource locator for this item provider's resources.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ResourceLocator getResourceLocator() {
+ return EditorPlugin.INSTANCE;
+ }
+
+}
diff --git a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/ViewmapItemProvider.java b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/ViewmapItemProvider.java
index 6016541d5..da7a9f518 100644
--- a/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/ViewmapItemProvider.java
+++ b/plugins/org.eclipse.gmf.codegen.edit/src/org/eclipse/gmf/codegen/gmfgen/provider/ViewmapItemProvider.java
@@ -183,6 +183,11 @@ public class ViewmapItemProvider
newChildDescriptors.add
(createChildParameter
(GMFGenPackage.eINSTANCE.getViewmap_Attributes(),
+ GMFGenFactory.eINSTANCE.createStyleAttributes()));
+
+ newChildDescriptors.add
+ (createChildParameter
+ (GMFGenPackage.eINSTANCE.getViewmap_Attributes(),
GMFGenFactory.eINSTANCE.createResizeConstraints()));
newChildDescriptors.add

Back to the top