Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 215113 Details for
Bug 378554
[debug view] Debug view toolbar show/hide doesn't update contributed items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Updted patch with comments.
0001-Bug-378554-debug-view-Debug-view-toolbar-show-hide-d.patch (text/plain), 6.62 KB, created by
Pawel Piech
on 2012-05-04 18:15:25 EDT
(
hide
)
Description:
Updted patch with comments.
Filename:
MIME Type:
Creator:
Pawel Piech
Created:
2012-05-04 18:15:25 EDT
Size:
6.62 KB
patch
obsolete
>From b11a8ed473e28e10d64019c045eb10b53c49410c Mon Sep 17 00:00:00 2001 >From: Pawel Piech <pawel.piech@windriver.com> >Date: Fri, 4 May 2012 14:28:42 -0700 >Subject: [PATCH] Bug 378554 - [debug view] Debug view toolbar show/hide > doesn't update contributed items > >--- > org.eclipse.debug.ui/plugin.xml | 14 +++++++++- > .../launch/DebugViewToolbarVisibleTester.java | 29 ++++++++++++++++++++ > .../debug/internal/ui/views/launch/LaunchView.java | 13 ++++++++- > .../ui/org/eclipse/debug/ui/IDebugUIConstants.java | 16 +++++++++-- > 4 files changed, 67 insertions(+), 5 deletions(-) > create mode 100644 org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugViewToolbarVisibleTester.java > >diff --git a/org.eclipse.debug.ui/plugin.xml b/org.eclipse.debug.ui/plugin.xml >index db070de..a5a1a12 100644 >--- a/org.eclipse.debug.ui/plugin.xml >+++ b/org.eclipse.debug.ui/plugin.xml >@@ -948,6 +948,19 @@ > tooltip="%memoryViewPrefAction.label"/> > </viewContribution> > </extension> >+ >+ <extension >+ point="org.eclipse.core.expressions.propertyTesters"> >+ <propertyTester >+ class="org.eclipse.debug.internal.ui.views.launch.DebugViewToolbarVisibleTester" >+ id="org.eclipse.debug.ui.debugViewToolbarVisibleTester" >+ namespace="org.eclipse.debug.ui" >+ properties="isDebugViewToolbarVisible" >+ type="java.lang.Object"> >+ </propertyTester> >+ </extension> >+ >+ > <extension > point="org.eclipse.ui.popupMenus"> > >@@ -3138,5 +3151,4 @@ M4 = Platform-specific fourth key > </bundle> > </component> > </extension> >- > </plugin> >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugViewToolbarVisibleTester.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugViewToolbarVisibleTester.java >new file mode 100644 >index 0000000..bd9c0ea >--- /dev/null >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugViewToolbarVisibleTester.java >@@ -0,0 +1,29 @@ >+/******************************************************************************* >+ * Copyright (c) 2012 Wind River Systems and others. >+ * 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: >+ * Wind River Systems - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.debug.internal.ui.views.launch; >+ >+import org.eclipse.core.expressions.PropertyTester; >+import org.eclipse.debug.ui.IDebugUIConstants; >+ >+/** >+ * >+ */ >+public class DebugViewToolbarVisibleTester extends PropertyTester { >+ >+ private static final String VISIBLE = "isDebugViewToolbarVisible"; //$NON-NLS-1$ >+ >+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { >+ if (VISIBLE.equals(property)) { >+ return "true".equals(System.getProperty(IDebugUIConstants.DEBUG_VIEW_TOOBAR_VISIBLE)); //$NON-NLS-1$ >+ } >+ return false; >+ } >+} >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java >index 6983a31..d69900e 100644 >--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/LaunchView.java >@@ -119,6 +119,7 @@ import org.eclipse.ui.IWorkbenchPart; > import org.eclipse.ui.IWorkbenchPartReference; > import org.eclipse.ui.IWorkbenchWindow; > import org.eclipse.ui.PartInitException; >+import org.eclipse.ui.PlatformUI; > import org.eclipse.ui.WorkbenchException; > import org.eclipse.ui.XMLMemento; > import org.eclipse.ui.actions.SelectionListenerAction; >@@ -133,6 +134,7 @@ import org.eclipse.ui.part.Page; > import org.eclipse.ui.part.ShowInContext; > import org.eclipse.ui.progress.IWorkbenchSiteProgressService; > import org.eclipse.ui.progress.UIJob; >+import org.eclipse.ui.services.IEvaluationService; > import org.eclipse.ui.texteditor.IUpdate; > > public class LaunchView extends AbstractDebugView >@@ -1062,10 +1064,19 @@ public class LaunchView extends AbstractDebugView > } else { > removeDebugToolbarActions(tbm); > } >- getViewSite().getActionBars().updateActionBars(); > > // Update system property used by contributed actions. > System.setProperty(IDebugUIConstants.DEBUG_VIEW_TOOBAR_VISIBLE, Boolean.toString(show)); >+ >+ // Request re-evaluation of property "org.eclipse.debug.ui.isDebugViewToolbarVisible" >+ // to update contributed toolbar commands. >+ IEvaluationService exprService = (IEvaluationService) PlatformUI.getWorkbench().getService(IEvaluationService.class); >+ if (exprService != null) { >+ exprService.requestEvaluation("org.eclipse.debug.ui.isDebugViewToolbarVisible"); //$NON-NLS-1$ >+ } >+ >+ >+ getViewSite().getActionBars().updateActionBars(); > } > > >diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java >index e05ebfc..047d4f2 100644 >--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java >+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java >@@ -629,9 +629,19 @@ public interface IDebugUIConstants { > /** > * System property which indicates whether the common debugging actions > * should be shown in the Debug view, as opposed to the top level >- * toolbar. Actions contributing to the debug view can use this property >- * to control their visibility. >- * >+ * toolbar. >+ * <p> >+ * This system property can be used to control the visibility of menu contributions. >+ * Clients should use the <code>org.eclipse.debug.ui.isDebugViewToolbarVisible</code> >+ * property to do this instead of using the system property, because the expression >+ * service notifies listeners as soon as the property is updated. The example below >+ * will cause a toolbar contribution to appear/disappear as the toolbar visibility >+ * is toggled. >+ * <pre> >+ * <visibleWhen checkEnabled="false"> >+ * <test property="org.eclipse.debug.ui.isDebugViewToolbarVisible"/> >+ * </visibleWhen> >+ * </pre> > * @since 3.8 > */ > public static final String DEBUG_VIEW_TOOBAR_VISIBLE = PLUGIN_ID + ".debugViewToolbarVisible"; //$NON-NLS-1$ >-- >1.7.5.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 378554
:
215109
| 215113