From 7c7bbf4f48426639192b80ff4da057454fd6072c Mon Sep 17 00:00:00 2001 From: Gun Kim Date: Thu, 22 Sep 2016 11:12:51 +0900 Subject: [PATCH] MISC: fix a bug about openning error dialog On Disassemlby viewer, the same error dialogs are opened twice. Fix it. Change-Id: Id5bee27096a3832933cf53b5f629db213b5745da Signed-off-by: Gun Kim --- .../actions/AddressBarContributionItem.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/AddressBarContributionItem.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/AddressBarContributionItem.java index d2976da..92d3d17 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/AddressBarContributionItem.java +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/AddressBarContributionItem.java @@ -9,6 +9,11 @@ * Texas Instruments - Initial API and implementation * Patrick Chuong (Texas Instruments) - Bug fix (329682) *******************************************************************************/ +/* + * 2016-09-22 Gun Kim gune.kim@samsung.com + * Modification by S-Core Co., Ltd. + * 1. fix a bug of opening error dialog twice. + */ package org.eclipse.cdt.dsf.debug.internal.ui.disassembly.actions; import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin; @@ -51,6 +56,9 @@ public class AddressBarContributionItem extends ContributionItem { private Image warningImage = null; private Label warningLabel = null; private String warningText = null; + /* Tizen */ + private static long time = 0; + /* ===== */ /** * Use this constructor to create an AddressBarContributionItem. @@ -276,6 +284,18 @@ public class AddressBarContributionItem extends ContributionItem { @Override public void keyTraversed(TraverseEvent e) { if (e.detail == SWT.TRAVERSE_RETURN) { + /* Tizen */ + /* + * TODO: This is ad-hoc code. + * When the Combo widget will be fixed, it must be removed + * @author gune.kim@samsung.com + * @since 2016-09-22 + */ + if (time == e.time) { + return; + } + time = e.time; + /* ===== */ String addressBoxStr = addressBox.getText(); // don't accept the initial text -- 2.7.4