Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnsgar Radermacher2018-01-03 13:06:25 +0000
committerPatrick Tessier2018-01-29 09:34:38 +0000
commit42935f2d4a91eface566edcc5b3f3d525daa018f (patch)
tree8c3827f6824285aebef1f73ef4a3c2c0458df1ed /plugins/infra
parent82b6a28cdd95db60879d018c5e58817b3943e895 (diff)
downloadorg.eclipse.papyrus-42935f2d4a91eface566edcc5b3f3d525daa018f.tar.gz
org.eclipse.papyrus-42935f2d4a91eface566edcc5b3f3d525daa018f.tar.xz
org.eclipse.papyrus-42935f2d4a91eface566edcc5b3f3d525daa018f.zip
Bug 526162 - [Element Types] Referencing existing element types is very inefficient
- Modify the label used for specializations and meta-model elements. Instead of prefixing the label with "Specialization Type Configuration" or "Metamodel Type Configuration", the information is added in parenthesis after the original label. This implies that the user can find element type configuration quickly by typing a prefix of its name Signed-off-by: Ansgar Radermacher <ansgar.radermacher@cea.fr>
Diffstat (limited to 'plugins/infra')
-rw-r--r--plugins/infra/types/org.eclipse.papyrus.infra.types.edit/src-gen/org/eclipse/papyrus/infra/types/provider/MetamodelTypeConfigurationItemProvider.java9
-rw-r--r--plugins/infra/types/org.eclipse.papyrus.infra.types.edit/src-gen/org/eclipse/papyrus/infra/types/provider/SpecializationTypeConfigurationItemProvider.java10
2 files changed, 8 insertions, 11 deletions
diff --git a/plugins/infra/types/org.eclipse.papyrus.infra.types.edit/src-gen/org/eclipse/papyrus/infra/types/provider/MetamodelTypeConfigurationItemProvider.java b/plugins/infra/types/org.eclipse.papyrus.infra.types.edit/src-gen/org/eclipse/papyrus/infra/types/provider/MetamodelTypeConfigurationItemProvider.java
index e2daded37c0..b4509dddbe0 100644
--- a/plugins/infra/types/org.eclipse.papyrus.infra.types.edit/src-gen/org/eclipse/papyrus/infra/types/provider/MetamodelTypeConfigurationItemProvider.java
+++ b/plugins/infra/types/org.eclipse.papyrus.infra.types.edit/src-gen/org/eclipse/papyrus/infra/types/provider/MetamodelTypeConfigurationItemProvider.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2014 CEA LIST.
+ * Copyright (c) 2014, 2017 CEA LIST.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@
*
* Contributors:
* CEA LIST - Initial API and implementation
+ * Ansgar Radermacher - Bug 526162 (use different label for references)
*/
package org.eclipse.papyrus.infra.types.provider;
@@ -18,12 +19,10 @@ import java.util.List;
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.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
-
import org.eclipse.papyrus.infra.types.ElementTypesConfigurationsPackage;
import org.eclipse.papyrus.infra.types.MetamodelTypeConfiguration;
@@ -120,14 +119,14 @@ public class MetamodelTypeConfigurationItemProvider extends ElementTypeConfigura
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
+ * @generated NOT
*/
@Override
public String getText(Object object) {
String label = ((MetamodelTypeConfiguration)object).getName();
return label == null || label.length() == 0 ?
getString("_UI_MetamodelTypeConfiguration_type") :
- getString("_UI_MetamodelTypeConfiguration_type") + " " + label;
+ String.format("%s (%s)", label, getString("_UI_MetamodelTypeConfiguration_type"));
}
diff --git a/plugins/infra/types/org.eclipse.papyrus.infra.types.edit/src-gen/org/eclipse/papyrus/infra/types/provider/SpecializationTypeConfigurationItemProvider.java b/plugins/infra/types/org.eclipse.papyrus.infra.types.edit/src-gen/org/eclipse/papyrus/infra/types/provider/SpecializationTypeConfigurationItemProvider.java
index 8fdb8d2b6ba..2c8ecc766ee 100644
--- a/plugins/infra/types/org.eclipse.papyrus.infra.types.edit/src-gen/org/eclipse/papyrus/infra/types/provider/SpecializationTypeConfigurationItemProvider.java
+++ b/plugins/infra/types/org.eclipse.papyrus.infra.types.edit/src-gen/org/eclipse/papyrus/infra/types/provider/SpecializationTypeConfigurationItemProvider.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2014 CEA LIST.
+ * Copyright (c) 2014, 2017 CEA LIST.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@
*
* Contributors:
* CEA LIST - Initial API and implementation
+ * Ansgar Radermacher - Bug 526162 (use different label for references)
*/
package org.eclipse.papyrus.infra.types.provider;
@@ -18,13 +19,10 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
-
import org.eclipse.emf.ecore.EStructuralFeature;
-
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
-
import org.eclipse.papyrus.infra.types.ElementTypesConfigurationsFactory;
import org.eclipse.papyrus.infra.types.ElementTypesConfigurationsPackage;
import org.eclipse.papyrus.infra.types.SpecializationTypeConfiguration;
@@ -131,14 +129,14 @@ public class SpecializationTypeConfigurationItemProvider extends ElementTypeConf
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
+ * @generated NOT
*/
@Override
public String getText(Object object) {
String label = ((SpecializationTypeConfiguration)object).getName();
return label == null || label.length() == 0 ?
getString("_UI_SpecializationTypeConfiguration_type") :
- getString("_UI_SpecializationTypeConfiguration_type") + " " + label;
+ String.format("%s (%s)", label, getString("_UI_SpecializationTypeConfiguration_type"));
}

Back to the top