Bug 518368 - Section is refreshed twice in Propery section
* Implement workaround as double triggering happens in tabbed property
coding: Add check for same object in property section refresh method
Change-Id: I69c275ab916c7539ed1ec125539bd9dad8d1da3f
diff --git a/examples/org.eclipse.graphiti.examples.tutorial/src/org/eclipse/graphiti/examples/tutorial/property/TutorialEClassSection.java b/examples/org.eclipse.graphiti.examples.tutorial/src/org/eclipse/graphiti/examples/tutorial/property/TutorialEClassSection.java
index 29e16c5..31d9c08 100644
--- a/examples/org.eclipse.graphiti.examples.tutorial/src/org/eclipse/graphiti/examples/tutorial/property/TutorialEClassSection.java
+++ b/examples/org.eclipse.graphiti.examples.tutorial/src/org/eclipse/graphiti/examples/tutorial/property/TutorialEClassSection.java
@@ -32,6 +32,7 @@
public class TutorialEClassSection extends GFPropertySection implements ITabbedPropertyConstants {
private Text nameText;
+ private PictogramElement currentPe;
@Override
public void createControls(Composite parent, TabbedPropertySheetPage tabbedPropertySheetPage) {
@@ -60,7 +61,8 @@
@Override
public void refresh() {
PictogramElement pe = getSelectedPictogramElement();
- if (pe != null) {
+ if (pe != null && !pe.equals(currentPe)) {
+ currentPe = pe;
Object bo = Graphiti.getLinkService().getBusinessObjectForLinkedPictogramElement(pe);
// the filter assured, that it is a EClass
if (bo == null)