Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/facet/org.eclipse.papyrus.emf.facet.efacet.edit/src/org/eclipse/papyrus/emf/facet/efacet/provider/QueryResultItemProvider.java')
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.efacet.edit/src/org/eclipse/papyrus/emf/facet/efacet/provider/QueryResultItemProvider.java176
1 files changed, 95 insertions, 81 deletions
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.edit/src/org/eclipse/papyrus/emf/facet/efacet/provider/QueryResultItemProvider.java b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.edit/src/org/eclipse/papyrus/emf/facet/efacet/provider/QueryResultItemProvider.java
index 89eea1e6e91..79de643f06e 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.edit/src/org/eclipse/papyrus/emf/facet/efacet/provider/QueryResultItemProvider.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.efacet.edit/src/org/eclipse/papyrus/emf/facet/efacet/provider/QueryResultItemProvider.java
@@ -1,15 +1,15 @@
/**
* Copyright (c) 2011 Mia-Software.
- *
+ *
* 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:
* Gregoire Dupe (Mia-Software) - Design
* Nicolas Guyomar (Mia-Software) - Implementation
- *
+ *
*/
package org.eclipse.papyrus.emf.facet.efacet.provider;
@@ -40,16 +40,17 @@ import org.eclipse.papyrus.emf.facet.efacet.QueryResult;
* This is the item provider adapter for a {@link org.eclipse.papyrus.emf.facet.efacet.QueryResult} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @deprecated use the new eFacet metamodel in org.eclipse.papyrus.emf.facet.efacet.metamodel. Cf.
* https://bugs.eclipse.org/bugs/show_bug.cgi?id=373672
*/
@Deprecated
-//generated code
+// generated code
@SuppressWarnings("all")
public class QueryResultItemProvider
- extends ItemProviderAdapter
- implements
+ extends ItemProviderAdapter
+ implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
@@ -59,6 +60,7 @@ public class QueryResultItemProvider
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public QueryResultItemProvider(AdapterFactory adapterFactory) {
@@ -69,6 +71,7 @@ public class QueryResultItemProvider
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -89,118 +92,123 @@ public class QueryResultItemProvider
* This adds a property descriptor for the Query feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected void addQueryPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_QueryResult_query_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_QueryResult_query_feature", "_UI_QueryResult_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EFacetPackage.Literals.QUERY_RESULT__QUERY,
- true,
- false,
- true,
- null,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_QueryResult_query_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_QueryResult_query_feature", "_UI_QueryResult_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EFacetPackage.Literals.QUERY_RESULT__QUERY,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
}
/**
* This adds a property descriptor for the Scope feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected void addScopePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_QueryResult_scope_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_QueryResult_scope_feature", "_UI_QueryResult_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EFacetPackage.Literals.QUERY_RESULT__SCOPE,
- true,
- false,
- true,
- null,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_QueryResult_scope_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_QueryResult_scope_feature", "_UI_QueryResult_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EFacetPackage.Literals.QUERY_RESULT__SCOPE,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
}
/**
* This adds a property descriptor for the Result feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected void addResultPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_QueryResult_result_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_QueryResult_result_feature", "_UI_QueryResult_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EFacetPackage.Literals.QUERY_RESULT__RESULT,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_QueryResult_result_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_QueryResult_result_feature", "_UI_QueryResult_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EFacetPackage.Literals.QUERY_RESULT__RESULT,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
}
/**
* This adds a property descriptor for the Exception feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected void addExceptionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_QueryResult_exception_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_QueryResult_exception_feature", "_UI_QueryResult_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EFacetPackage.Literals.QUERY_RESULT__EXCEPTION,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_QueryResult_exception_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_QueryResult_exception_feature", "_UI_QueryResult_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EFacetPackage.Literals.QUERY_RESULT__EXCEPTION,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
}
/**
* 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_QueryResult_source_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_QueryResult_source_feature", "_UI_QueryResult_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- EFacetPackage.Literals.QUERY_RESULT__SOURCE,
- true,
- false,
- true,
- null,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_QueryResult_source_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_QueryResult_source_feature", "_UI_QueryResult_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ EFacetPackage.Literals.QUERY_RESULT__SOURCE,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
}
/**
- * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -215,6 +223,7 @@ public class QueryResultItemProvider
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -229,6 +238,7 @@ public class QueryResultItemProvider
* This returns QueryResult.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -240,15 +250,16 @@ public class QueryResultItemProvider
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public String getText(Object object) {
- Object labelValue = ((QueryResult)object).getResult();
+ Object labelValue = ((QueryResult) object).getResult();
String label = labelValue == null ? null : labelValue.toString();
return label == null || label.length() == 0 ?
- getString("_UI_QueryResult_type") : //$NON-NLS-1$
- getString("_UI_QueryResult_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ getString("_UI_QueryResult_type") : //$NON-NLS-1$
+ getString("_UI_QueryResult_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
/**
@@ -256,6 +267,7 @@ public class QueryResultItemProvider
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -263,13 +275,13 @@ public class QueryResultItemProvider
updateChildren(notification);
switch (notification.getFeatureID(QueryResult.class)) {
- case EFacetPackage.QUERY_RESULT__RESULT:
- case EFacetPackage.QUERY_RESULT__EXCEPTION:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case EFacetPackage.QUERY_RESULT__PARAMETER_VALUES:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
+ case EFacetPackage.QUERY_RESULT__RESULT:
+ case EFacetPackage.QUERY_RESULT__EXCEPTION:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case EFacetPackage.QUERY_RESULT__PARAMETER_VALUES:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
}
super.notifyChanged(notification);
}
@@ -279,6 +291,7 @@ public class QueryResultItemProvider
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -286,20 +299,21 @@ public class QueryResultItemProvider
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add
- (createChildParameter
+ (createChildParameter
(EFacetPackage.Literals.QUERY_RESULT__PARAMETER_VALUES,
- EFacetFactory.eINSTANCE.createParameterValue()));
+ EFacetFactory.eINSTANCE.createParameterValue()));
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public ResourceLocator getResourceLocator() {
- return ((IChildCreationExtender)adapterFactory).getResourceLocator();
+ return ((IChildCreationExtender) adapterFactory).getResourceLocator();
}
}

Back to the top