summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2013-01-16 23:48:19 (EST)
committer Pawel Piech2013-02-27 13:34:53 (EST)
commit552635fba630d89f6e4ddecba9e4ca0aacb087e1 (patch)
treeffe61a48cbf18a5ee84ba8aa8a568fa6abba0dad
parentc958779d1cc310491ca2d8b6960fa8633ed0474f (diff)
downloadeclipse.platform.debug-552635fba630d89f6e4ddecba9e4ca0aacb087e1.zip
eclipse.platform.debug-552635fba630d89f6e4ddecba9e4ca0aacb087e1.tar.gz
eclipse.platform.debug-552635fba630d89f6e4ddecba9e4ca0aacb087e1.tar.bz2
Bug 372181 - Working set support for Expressions View
Refactored working set support to consolidate functionality in Expressions View.
-rw-r--r--org.eclipse.debug.ui/plugin.properties3
-rw-r--r--org.eclipse.debug.ui/plugin.xml6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/AssignWorkingSetsAction.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/ExpressionWorkingSetsAction.java (renamed from org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionWorkingSetsAction.java)11
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionWorkingSetFilterManager.java405
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/IExpressionWorkingSetConstants.java25
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionManagerContentProvider.java47
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/IAddNewExpression.java20
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionLabelProvider.java (renamed from org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionLabelProvider.java)2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionView.java85
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionWorkingSetElementAdapter.java (renamed from org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionWorkingSetElementAdapter.java)2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionWorkingSetFilter.java (renamed from org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionWorkingSetFilter.java)24
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionWorkingSetMessages.java (renamed from org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionWorkingSetMessages.java)2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionWorkingSetMessages.properties (renamed from org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionWorkingSetMessages.properties)0
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionWorkingSetPage.java (renamed from org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionWorkingSetPage.java)2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/IDebugUIConstants.java18
18 files changed, 148 insertions, 514 deletions
diff --git a/org.eclipse.debug.ui/plugin.properties b/org.eclipse.debug.ui/plugin.properties
index 2a491dd..6f83288 100644
--- a/org.eclipse.debug.ui/plugin.properties
+++ b/org.eclipse.debug.ui/plugin.properties
@@ -11,6 +11,7 @@
# Wind River Systems - Pawel Piech - Added Modules view (bug 211158)
# Wind River Systems - Ted Williams -[Memory View] Memory View: Workflow Enhancements (bug 215432)
# Patrick Chuong (Texas Instruments) - Move debug toolbar actions to main window (Bug 332784)
+# Abeer Bagul (Tensilica) - Working set support for Expressions view (Bug 372181)
###############################################################################
pluginName=Debug UI
@@ -272,6 +273,8 @@ addWatchExpressionAction.label=&Add Watch Expression...
addWatchExpressionAction.tooltip=Create a new watch expression
convertToWatchExpressionAction.label=Convert to &Watch Expression
convertToWatchExpressionAction.tooltip=Convert an inspect expression to a watch expression
+assignWatchExpressionToWorkingSet.label=Assign Working Sets
+assignWatchExpressionToWorkingSet.tooltip=Assign selected watch expressions to a working set
Watch.label=Wa&tch
Watch.description=Create a watch expression from the current selection and add it to the Expressions view
diff --git a/org.eclipse.debug.ui/plugin.xml b/org.eclipse.debug.ui/plugin.xml
index ce52c69..15a24ea 100644
--- a/org.eclipse.debug.ui/plugin.xml
+++ b/org.eclipse.debug.ui/plugin.xml
@@ -3172,8 +3172,8 @@ M4 = Platform-specific fourth key
name="%ExpressionWorkingSet.name"
description="%ExpressionWorkingSet.description"
icon="icons/full/obj16/expression_workingset.gif"
- pageClass="org.eclipse.debug.internal.ui.expression.workingset.ExpressionWorkingSetPage"
- elementAdapterClass="org.eclipse.debug.internal.ui.expression.workingset.ExpressionWorkingSetElementAdapter"
+ pageClass="org.eclipse.debug.internal.ui.views.expression.ExpressionWorkingSetPage"
+ elementAdapterClass="org.eclipse.debug.internal.ui.views.expression.ExpressionWorkingSetElementAdapter"
/>
</extension>
@@ -3183,7 +3183,7 @@ M4 = Platform-specific fourth key
targetID="org.eclipse.debug.ui.ExpressionView"
id="org.eclipse.debug.ui.expressionview.toolbar.workingset">
<action
- class="org.eclipse.debug.internal.ui.expression.workingset.ExpressionWorkingSetsAction"
+ class="org.eclipse.debug.internal.ui.actions.expressions.ExpressionWorkingSetsAction"
helpContextId="expression_working_sets_action_context"
id="org.eclipse.debug.ui.expressionView.toolbar.workingSets"
label="%ExpressionWorkingSet.manageAction.label"
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
index 5893e5b..d9292f6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugUIPlugin.java
@@ -560,7 +560,7 @@ public class DebugUIPlugin extends AbstractUIPlugin implements ILaunchListener,
BreakpointOrganizerManager.getDefault();
//start the expression workingset manager
- ExpressionWorkingSetFilterManager.getInstance().init();
+// ExpressionWorkingSetFilterManager.getInstance().init();
getLaunchConfigurationManager().startup();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/AssignWorkingSetsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/AssignWorkingSetsAction.java
index 0902623..a3c2a47 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/AssignWorkingSetsAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/AssignWorkingSetsAction.java
@@ -16,7 +16,7 @@ import java.util.List;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.debug.core.model.IWatchExpression;
-import org.eclipse.debug.internal.ui.expression.workingset.IExpressionWorkingSetConstants;
+import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ActionContributionItem;
import org.eclipse.jface.action.IAction;
@@ -130,7 +130,7 @@ public class AssignWorkingSetsAction extends WatchExpressionAction {
public void run() {
IWorkingSetManager manager = PlatformUI.getWorkbench().getWorkingSetManager();
IWorkingSetNewWizard wizard = manager.createWorkingSetNewWizard(
- new String[] {IExpressionWorkingSetConstants.EXPRESSION_WORKINGSET_ID});
+ new String[] {IDebugUIConstants.EXPRESSION_WORKINGSET_ID});
if (wizard != null)
{
WizardDialog dialog = new WizardDialog(
@@ -215,7 +215,7 @@ public class AssignWorkingSetsAction extends WatchExpressionAction {
for (int i=0; i<allWorkingSets.length; i++)
{
IWorkingSet workingSet = allWorkingSets[i];
- if (IExpressionWorkingSetConstants.EXPRESSION_WORKINGSET_ID.equals(workingSet.getId()))
+ if (IDebugUIConstants.EXPRESSION_WORKINGSET_ID.equals(workingSet.getId()))
expressionWorkingSets.add(workingSet);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionWorkingSetsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/ExpressionWorkingSetsAction.java
index 646ffd7..3b91e5a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionWorkingSetsAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/expressions/ExpressionWorkingSetsAction.java
@@ -8,9 +8,10 @@
* Contributors:
* Abeer Bagul (Tensilica Inc) - initial API and implementation (Bug 372181)
*******************************************************************************/
-package org.eclipse.debug.internal.ui.expression.workingset;
+package org.eclipse.debug.internal.ui.actions.expressions;
import org.eclipse.debug.internal.ui.views.expression.ExpressionView;
+import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.window.Window;
@@ -24,6 +25,7 @@ import org.eclipse.ui.dialogs.IWorkingSetSelectionDialog;
/**
* Opens the Working set wizard where user can define expression working sets.
+ *
* @since 3.9
*/
public class ExpressionWorkingSetsAction implements IViewActionDelegate,
@@ -35,9 +37,9 @@ public class ExpressionWorkingSetsAction implements IViewActionDelegate,
IWorkingSetSelectionDialog selectionDialog = PlatformUI.getWorkbench().getWorkingSetManager().createWorkingSetSelectionDialog(
PlatformUI.getWorkbench().getDisplay().getActiveShell(),
true,
- new String[] {IExpressionWorkingSetConstants.EXPRESSION_WORKINGSET_ID});
+ new String[] {IDebugUIConstants.EXPRESSION_WORKINGSET_ID});
- selectionDialog.setSelection(ExpressionWorkingSetFilterManager.getWorkingSets(fView));
+ selectionDialog.setSelection(fView.getWorkingSets());
if (selectionDialog.open() != Window.OK)
return;
@@ -45,8 +47,7 @@ public class ExpressionWorkingSetsAction implements IViewActionDelegate,
IWorkingSet[] selectedWorkingSets = selectionDialog.getSelection();
if (selectedWorkingSets == null)
return;
-
- ExpressionWorkingSetFilterManager.applyWorkingSets(fView, selectedWorkingSets);
+ fView.applyWorkingSets(selectedWorkingSets);
}
public void selectionChanged(IAction action, ISelection selection) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionWorkingSetFilterManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionWorkingSetFilterManager.java
deleted file mode 100644
index bcaee16..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionWorkingSetFilterManager.java
+++ /dev/null
@@ -1,405 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 Tensilica Inc 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:
- * Abeer Bagul (Tensilica Inc) - initial API and implementation (Bug 372181)
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.expression.workingset;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
-import org.eclipse.debug.internal.ui.views.expression.ExpressionView;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.util.IPropertyChangeListener;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.jface.viewers.ViewerFilter;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IPartListener2;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IViewReference;
-import org.eclipse.ui.IWindowListener;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPartReference;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkingSet;
-import org.eclipse.ui.IWorkingSetManager;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.WorkbenchException;
-import org.eclipse.ui.XMLMemento;
-import org.eclipse.ui.progress.WorkbenchJob;
-
-/**
- * Manages expression working set filters for all expression views in the workbench.
- * <p>
- * It saves info about which working sets are applied to each expression view,
- * and restores the info and filter when an expression view is opened.
- *
- * @since 3.9
- */
-public class ExpressionWorkingSetFilterManager implements IPropertyChangeListener
-{
-
- private static final String PREF_WORKINGSETS = "expressionWorkingSets"; //$NON-NLS-1$
- private static final String ELEMENT_WORKINGSETS = "expressionWorkingsets"; //$NON-NLS-1$
- private static final String ELEMENT_EXPRESSIONVIEW = "expressionView"; //$NON-NLS-1$
- private static final String ELEMENT_WORKINGSET = "workingSet"; //$NON-NLS-1$
-
- private static ExpressionWorkingSetFilterManager INSTANCE;
-
- private static boolean fInitialized = false;
-
- private ExpressionWorkingSetFilterManager()
- {
-
- }
-
- synchronized public static ExpressionWorkingSetFilterManager getInstance() {
- if (INSTANCE == null) {
- INSTANCE = new ExpressionWorkingSetFilterManager();
- }
- return INSTANCE;
- }
-
- synchronized public void init() {
- if (fInitialized) return;
- fInitialized = true;
-
- initListeners();
-
- final XMLMemento fworkingSetsMemento = getMemento();
-
- new WorkbenchJob("Initializing expression view working sets") { //$NON-NLS-1$
- { setSystem(true); }
- public IStatus runInUIThread(IProgressMonitor monitor) {
- IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
- for (int i=0; i<windows.length; i++) {
- IWorkbenchWindow window = windows[i];
- IViewReference[] viewRefs = window.getActivePage().getViewReferences();
- for (int j=0; j<viewRefs.length; j++) {
- IViewReference viewRef = viewRefs[j];
- try {
- if (IDebugUIConstants.ID_EXPRESSION_VIEW.equals(viewRef.getId()))
- {
- IViewPart expressionView = viewRef.getView(false);
- if (expressionView != null)
- applyFilter(expressionView, fworkingSetsMemento);
- }
- }
- finally {
-
- }
- }
- }
- return Status.OK_STATUS;
- }
- }.schedule();
- }
-
- private void applyFilter(IViewPart expressionView, XMLMemento workingSetsMemento)
- {
- String mementoID = expressionView.getViewSite().getId() +
- expressionView.getViewSite().getSecondaryId();
-
- List workingSets = new ArrayList();
-
- if (workingSetsMemento != null)
- {
- IMemento[] viewMementos = workingSetsMemento.getChildren(ELEMENT_EXPRESSIONVIEW);
- for (int i=0; i<viewMementos.length; i++) {
- IMemento viewMemento = viewMementos[i];
- if (mementoID.equals(viewMemento.getID())) {
- IMemento[] workingsetMementos = viewMemento.getChildren(ELEMENT_WORKINGSET);
- for (int j=0; j<workingsetMementos.length; j++) {
- IMemento workingSetMemento = workingsetMementos[j];
- String workingSetName = workingSetMemento.getID();
- IWorkingSet workingSet = PlatformUI.getWorkbench().getWorkingSetManager().getWorkingSet(workingSetName);
- if (workingSet != null)
- workingSets.add(workingSet);
- }
-
- break;
- }
- }
- }
-
- applyWorkingSets((ExpressionView) expressionView, (IWorkingSet[]) workingSets.toArray(new IWorkingSet[0]));
- }
-
- private void initListeners() {
- IWorkbench wb = PlatformUI.getWorkbench();
-
- final IPartListener2 partListener = new IPartListener2() {
-
- public void partVisible(IWorkbenchPartReference partRef) {}
-
- public void partInputChanged(IWorkbenchPartReference partRef) {}
-
- public void partHidden(IWorkbenchPartReference partRef) {}
-
- public void partDeactivated(IWorkbenchPartReference partRef) {}
-
- public void partBroughtToTop(IWorkbenchPartReference partRef) {}
-
- public void partActivated(IWorkbenchPartReference partRef) {}
-
- public void partOpened(IWorkbenchPartReference partRef) {
- if (partRef instanceof IViewReference) {
- if (! partRef.getId().equals(IDebugUIConstants.ID_EXPRESSION_VIEW))
- return;
- IViewPart part = ((IViewReference) partRef).getView(false);
- if (part != null)
- {
- applyFilter(part, getMemento());
- }
- }
- }
-
- public void partClosed(IWorkbenchPartReference partRef) {}
- };
- // subscribe to existing workbench window listener
- IWorkbenchWindow[] windows = wb.getWorkbenchWindows();
- for (int i=0; i<windows.length; i++) {
- IWorkbenchWindow ww = windows[i];
- ww.getPartService().addPartListener(partListener);
- }
-
- // subscribe to new workbench window listener
- wb.addWindowListener(new IWindowListener() {
-
- public void windowDeactivated(IWorkbenchWindow window) {}
-
- public void windowActivated(IWorkbenchWindow window) {}
-
- public void windowClosed(IWorkbenchWindow window) {}
-
- public void windowOpened(IWorkbenchWindow window) {
- window.getPartService().addPartListener(partListener);
- }
- });
-
- PlatformUI.getWorkbench().getWorkingSetManager().addPropertyChangeListener(this);
- }
-
- private static XMLMemento getMemento()
- {
- IPreferenceStore prefStore = DebugUIPlugin.getDefault().getPreferenceStore();
- String workingSetsMementoRaw = prefStore.getString(PREF_WORKINGSETS);
- workingSetsMementoRaw = workingSetsMementoRaw.trim();
- if (workingSetsMementoRaw.length() == 0)
- return null;
- XMLMemento workingSetsMemento = null;
- try {
- workingSetsMemento = XMLMemento.createReadRoot(new StringReader(workingSetsMementoRaw));
- } catch (WorkbenchException e) {
- DebugUIPlugin.log(e);
- }
- return workingSetsMemento;
- }
-
- public static void applyWorkingSets(ExpressionView exprView, IWorkingSet[] selectedWorkingSets)
- {
- ExpressionWorkingSetFilter workingSetFilter = getFilter(exprView);
-
- workingSetFilter.setSelectedWorkingSets(selectedWorkingSets);
-
- exprView.getViewer().refresh();
-
- saveWorkingSets(exprView, selectedWorkingSets);
- }
-
- private static ExpressionWorkingSetFilter getFilter(ExpressionView exprView)
- {
- ExpressionWorkingSetFilter workingSetFilter = null;
-
- ViewerFilter[] existingFilters = ((TreeModelViewer) exprView.getViewer()).getFilters();
- for (int i=0; i<existingFilters.length; i++) {
- ViewerFilter existingFilter = existingFilters[i];
- if (existingFilter instanceof ExpressionWorkingSetFilter)
- {
- workingSetFilter = (ExpressionWorkingSetFilter) existingFilter;
- break;
- }
- }
-
- if (workingSetFilter == null)
- {
- workingSetFilter = new ExpressionWorkingSetFilter();
- ((TreeModelViewer) exprView.getViewer()).addFilter(workingSetFilter);
- }
-
- return workingSetFilter;
- }
-
- private static ExpressionView[] getExpressionViews()
- {
- List expressionViews = new ArrayList();
-
- IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
- for (int i=0; i<windows.length; i++) {
- IWorkbenchWindow window = windows[i];
- IViewReference[] viewRefs = window.getActivePage().getViewReferences();
- for (int j=0; j<viewRefs.length; j++) {
- IViewReference viewRef = viewRefs[j];
- if (IDebugUIConstants.ID_EXPRESSION_VIEW.equals(viewRef.getId())) {
- IViewPart expressionView = viewRef.getView(false);
- if (expressionView != null)
- expressionViews.add(expressionView);
- }
- }
- }
-
- return (ExpressionView[]) expressionViews.toArray(new ExpressionView[0]);
- }
-
- public static IWorkingSet[] getWorkingSets(ExpressionView exprView)
- {
- ExpressionWorkingSetFilter workingSetFilter = getFilter(exprView);
- if (workingSetFilter == null)
- return null;
-
- return workingSetFilter.getSelectedWorkingSets();
- }
-
- private static void saveWorkingSets(ExpressionView exprView, IWorkingSet[] selectedWorkingSets)
- {
- String mementoID = exprView.getViewSite().getId() +
- exprView.getViewSite().getSecondaryId();
-
- XMLMemento rootMemento = XMLMemento.createWriteRoot(ELEMENT_WORKINGSETS);
-
- XMLMemento savedMemento = getMemento();
-
- if (savedMemento != null) {
- IMemento[] viewMementos = savedMemento.getChildren(ELEMENT_EXPRESSIONVIEW);
- for (int i=0; i<viewMementos.length; i++) {
- IMemento savedViewMemento = viewMementos[i];
- if (!mementoID.equals(savedViewMemento.getID()))
- {
- IMemento newViewMemento = rootMemento.createChild(ELEMENT_EXPRESSIONVIEW, savedViewMemento.getID());
-
- IMemento[] savedWorkingSetMementos = savedViewMemento.getChildren(ELEMENT_WORKINGSET);
- for (int j=0; j<savedWorkingSetMementos.length; j++) {
- IMemento savedWorkingSetMemento = savedWorkingSetMementos[j];
- newViewMemento.createChild(ELEMENT_WORKINGSET, savedWorkingSetMemento.getID());
- }
- }
- }
- }
-
- IMemento viewMemento = rootMemento.createChild(ELEMENT_EXPRESSIONVIEW, mementoID);
-
- for (int i=0; i<selectedWorkingSets.length; i++) {
- IWorkingSet workingSet = selectedWorkingSets[i];
- viewMemento.createChild(ELEMENT_WORKINGSET, workingSet.getName());
- }
-
- ByteArrayOutputStream mementoOutputStream = new ByteArrayOutputStream();
- try {
- rootMemento.save(new OutputStreamWriter(mementoOutputStream));
- } catch (IOException e) {
- DebugUIPlugin.log(e);
- }
-
- String workingSetsMementoRaw = mementoOutputStream.toString();
-
- IPreferenceStore prefStore = DebugUIPlugin.getDefault().getPreferenceStore();
- prefStore.setValue(PREF_WORKINGSETS, workingSetsMementoRaw);
- }
-
-// private static IWorkingSet[] getExpressionWorkingSets()
-// {
-// List expressionWorkingSets = new ArrayList();
-//
-// IWorkingSetManager workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager();
-// IWorkingSet[] workingSets = workingSetManager.getWorkingSets();
-// for (int i=0; i<workingSets.length; i++) {
-// IWorkingSet workingSet = workingSets[i];
-// if (workingSet.getId().equals(IExpressionWorkingSetConstants.EXPRESSION_WORKINGSET_ID))
-// {
-// expressionWorkingSets.add(workingSet);
-// }
-// }
-//
-// return (IWorkingSet[]) expressionWorkingSets.toArray(new IWorkingSet[0]);
-// }
-
- public void propertyChange(PropertyChangeEvent event) {
- if (IWorkingSetManager.CHANGE_WORKING_SET_REMOVE.equals(event.getProperty()))
- {
- IWorkingSet removedWorkingSet = (IWorkingSet) event.getOldValue();
-
- ExpressionView[] views = getExpressionViews();
- for (int i=0; i<views.length; i++) {
- ExpressionView expressionView = views[i];
- IWorkingSet[] appliedWorkingSets = getWorkingSets(expressionView);
- if (appliedWorkingSets == null)
- continue;
- if (appliedWorkingSets.length == 0)
- continue;
-
- List remainingWorkingSets = new ArrayList();
-
- boolean isRemoved = false;
- for (int j=0; j<appliedWorkingSets.length; j++) {
- IWorkingSet appliedWorkingSet = appliedWorkingSets[j];
- if (removedWorkingSet.getName().equals(appliedWorkingSet.getName()))
- {
- isRemoved = true;
- continue;
- }
- remainingWorkingSets.add(appliedWorkingSet);
- }
-
- if (isRemoved)
- applyWorkingSets(expressionView, (IWorkingSet[]) remainingWorkingSets.toArray(new IWorkingSet[0]));
- }
- }
- else if (IWorkingSetManager.CHANGE_WORKING_SET_CONTENT_CHANGE.equals(event.getProperty()))
- {
- IWorkingSet changedWorkingSet = (IWorkingSet) event.getNewValue();
-
- ExpressionView[] views = getExpressionViews();
- for (int i=0; i<views.length; i++) {
- ExpressionView expressionView = views[i];
- IWorkingSet[] appliedWorkingSets = getWorkingSets(expressionView);
- if (appliedWorkingSets == null)
- continue;
- if (appliedWorkingSets.length == 0)
- continue;
-
- List remainingWorkingSets = new ArrayList();
-
- boolean isChanged = false;
- for (int j=0; j<appliedWorkingSets.length; j++) {
- IWorkingSet appliedWorkingSet = appliedWorkingSets[j];
- if (changedWorkingSet.getName().equals(appliedWorkingSet.getName()))
- {
- isChanged = true;
- }
- remainingWorkingSets.add(appliedWorkingSet);
- }
-
- if (isChanged)
- applyWorkingSets(expressionView, (IWorkingSet[]) remainingWorkingSets.toArray(new IWorkingSet[0]));
- }
- }
-
- }
-
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/IExpressionWorkingSetConstants.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/IExpressionWorkingSetConstants.java
deleted file mode 100644
index b1146d8..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/IExpressionWorkingSetConstants.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 Tensilica Inc 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:
- * Abeer Bagul (Tensilica Inc) - initial API and implementation (Bug 372181)
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.expression.workingset;
-
-/**
- * @since 3.9
- */
-public interface IExpressionWorkingSetConstants
-{
- /**
- * Identifier for expression working set type.
- * <br>
- * Value is: <code>org.eclipse.cdt.dsf.ui.expressionWorkingSet</code>
- *
- */
- public static final String EXPRESSION_WORKINGSET_ID = "org.eclipse.debug.ui.expressionWorkingSet"; //$NON-NLS-1$
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionManagerContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionManagerContentProvider.java
index 227b6fe..4ab2346 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionManagerContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionManagerContentProvider.java
@@ -23,13 +23,11 @@ import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
import org.eclipse.debug.internal.ui.DebugUIMessages;
import org.eclipse.debug.internal.ui.DefaultLabelProvider;
import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
-import org.eclipse.debug.internal.ui.expression.workingset.ExpressionWorkingSetFilterManager;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementEditor;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
-import org.eclipse.debug.internal.ui.views.expression.ExpressionView;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.jface.resource.JFaceResources;
@@ -39,7 +37,6 @@ import org.eclipse.jface.viewers.TextCellEditor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.PlatformUI;
@@ -54,33 +51,11 @@ public class ExpressionManagerContentProvider extends ElementContentProvider {
*
* @since 3.6
*/
- private static class AddNewExpressionElement implements IElementLabelProvider, IElementEditor, ICellModifier, IAddNewExpression {
+ private static class AddNewExpressionElement implements IElementLabelProvider, IElementEditor, IAddNewExpression {
- /* Record the working sets applied to this view (none if null).
- * When a new expression is created, add it to applied working sets.
- */
- private String[] workingSetNames = null;
-
public void update(ILabelUpdate[] updates) {
- workingSetNames = null;
-
for (int i = 0; i < updates.length; i++) {
-
- if (i == 0)
- {
- //from the presentation context, find out the list of
- //working sets applied to this view.
- IWorkbenchPart expressionView = updates[i].getPresentationContext().getPart();
- IWorkingSet[] workingSets = ExpressionWorkingSetFilterManager.getWorkingSets((ExpressionView) expressionView);
- if (workingSets.length > 0)
- workingSetNames = new String[workingSets.length];
- for (int j=0; j<workingSets.length; j++)
- {
- workingSetNames[j] = workingSets[j].getName();
- }
- }
-
String[] columnIds = updates[i].getColumnIds();
if (columnIds == null) {
updateLabel(updates[i], 0);
@@ -114,9 +89,17 @@ public class ExpressionManagerContentProvider extends ElementContentProvider {
}
public ICellModifier getCellModifier(IPresentationContext context, Object element) {
- return this;
- }
-
+ return new AddNewExpressionCellModifider(context);
+ }
+ }
+
+ private static class AddNewExpressionCellModifider implements ICellModifier {
+
+ private final IPresentationContext fPresentationContext;
+
+ AddNewExpressionCellModifider(IPresentationContext presentationContext) {
+ fPresentationContext = presentationContext;
+ }
public boolean canModify(Object element, String property) {
return (IDebugUIConstants.COLUMN_ID_VARIABLE_NAME.equals(property));
}
@@ -140,8 +123,10 @@ public class ExpressionManagerContentProvider extends ElementContentProvider {
//if any working sets are applied to this view,
//add this expression to all applied working sets,
//otherwise it will be filtered out from the view.
- if (workingSetNames != null)
+ Object workingSetsProp = fPresentationContext.getProperty(IDebugUIConstants.PROP_EXPRESSIONS_WORKING_SETS);
+ if (workingSetsProp instanceof String[])
{
+ String[] workingSetNames = (String[])workingSetsProp;
for (int i=0; i<workingSetNames.length; i++)
{
String workingSetName = workingSetNames[i];
@@ -155,7 +140,7 @@ public class ExpressionManagerContentProvider extends ElementContentProvider {
}
}
}
-
+
private IDebugElement getContext() {
IAdaptable object = DebugUITools.getDebugContext();
IDebugElement context = null;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/IAddNewExpression.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/IAddNewExpression.java
deleted file mode 100644
index 77aeebd..0000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/IAddNewExpression.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 Tensilica Inc 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:
- * Abeer Bagul (Tensilica Inc) - initial API and implementation (Bug 372181)
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.model.elements;
-
-/**
- * A marker interface to be implemented by objects which represent the "Add new expression" node in Expressions view.
- * An object which implements this interface will always be visible in the view,
- * even if user has selected working sets to filter expressions visible in the view.
- */
-public interface IAddNewExpression {
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionLabelProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionLabelProvider.java
index 01c3f98..99801db 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionLabelProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionLabelProvider.java
@@ -8,7 +8,7 @@
* Contributors:
* Abeer Bagul (Tensilica Inc) - initial API and implementation (Bug 372181)
*******************************************************************************/
-package org.eclipse.debug.internal.ui.expression.workingset;
+package org.eclipse.debug.internal.ui.views.expression;
import org.eclipse.debug.core.model.IExpression;
import org.eclipse.debug.ui.DebugUITools;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionView.java
index 54f3d96..8a9cbc0 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionView.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionView.java
@@ -13,6 +13,9 @@
package org.eclipse.debug.internal.ui.views.expression;
+import java.util.ArrayList;
+import java.util.List;
+
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.debug.core.DebugPlugin;
@@ -20,11 +23,14 @@ import org.eclipse.debug.core.IExpressionManager;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.model.IDebugElement;
import org.eclipse.debug.core.model.IWatchExpression;
+import org.eclipse.debug.internal.ui.DebugUIPlugin;
import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
import org.eclipse.debug.internal.ui.actions.expressions.EditWatchExpressinInPlaceAction;
import org.eclipse.debug.internal.ui.actions.expressions.PasteWatchExpressionsAction;
import org.eclipse.debug.internal.ui.actions.variables.ChangeVariableValueAction;
import org.eclipse.debug.internal.ui.preferences.IDebugPreferenceConstants;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerInputUpdate;
import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewer;
import org.eclipse.debug.internal.ui.views.variables.AvailableLogicalStructuresAction;
@@ -41,14 +47,19 @@ import org.eclipse.jface.action.Separator;
import org.eclipse.jface.util.LocalSelectionTransfer;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.swt.dnd.Clipboard;
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.TextTransfer;
import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IMemento;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchCommandConstants;
+import org.eclipse.ui.IWorkingSet;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionFactory;
@@ -58,9 +69,18 @@ import org.eclipse.ui.actions.ActionFactory;
*/
public class ExpressionView extends VariablesView {
+ /**
+ * the preference name for the view part of the sash form
+ * @since 3.9
+ */
+ private static final String PREF_ELEMENT_WORKINGSET = DebugUIPlugin.getUniqueIdentifier() + ".workingSet"; //$NON-NLS-1$
+
+
private PasteWatchExpressionsAction fPasteAction;
private EditWatchExpressinInPlaceAction fEditInPlaceAction;
+ private IWorkingSet[] fWorkingSets;
+
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.views.variables.VariablesView#getHelpContextId()
*/
@@ -253,5 +273,70 @@ public class ExpressionView extends VariablesView {
}
}
+ public Viewer createViewer(Composite parent) {
+ TreeModelViewer viewer = (TreeModelViewer)super.createViewer(parent);
+
+ List list = new ArrayList();
+ IMemento[] workingsetMementos = getMemento().getChildren(PREF_ELEMENT_WORKINGSET);
+ for (int j=0; j<workingsetMementos.length; j++) {
+ IMemento workingSetMemento = workingsetMementos[j];
+ String workingSetName = workingSetMemento.getID();
+ IWorkingSet workingSet = PlatformUI.getWorkbench().getWorkingSetManager().getWorkingSet(workingSetName);
+ if (workingSet != null)
+ list.add(workingSet);
+ }
+ fWorkingSets = (IWorkingSet[]) list.toArray(new IWorkingSet[list.size()]);
+ getWorkingSetFilter(viewer).setSelectedWorkingSets(fWorkingSets);
+ updateWorkingSetsProperty(viewer.getPresentationContext());
+
+ return viewer;
+ }
+
+ public void saveViewerState(IMemento memento) {
+ super.saveViewerState(memento);
+
+
+ for (int i=0; i<fWorkingSets.length; i++) {
+ memento.createChild(PREF_ELEMENT_WORKINGSET, fWorkingSets[i].getName());
+ }
+ }
+
+ public void applyWorkingSets(IWorkingSet[] selectedWorkingSets) {
+ fWorkingSets = selectedWorkingSets;
+ TreeModelViewer viewer = (TreeModelViewer)getViewer();
+ getWorkingSetFilter(viewer).setSelectedWorkingSets(fWorkingSets);
+ updateWorkingSetsProperty(viewer.getPresentationContext());
+ getViewer().refresh();
+ }
+
+ private void updateWorkingSetsProperty(IPresentationContext presentationContext) {
+ if (fWorkingSets.length > 0) {
+ String[] workingSetNames = new String[fWorkingSets.length];
+ for (int j=0; j<fWorkingSets.length; j++) {
+ workingSetNames[j] = fWorkingSets[j].getName();
+ }
+ presentationContext.setProperty(IDebugUIConstants.PROP_EXPRESSIONS_WORKING_SETS, workingSetNames);
+ } else {
+ presentationContext.setProperty(IDebugUIConstants.PROP_EXPRESSIONS_WORKING_SETS, new String[0]);
+ }
+ }
+ public IWorkingSet[] getWorkingSets() {
+ return fWorkingSets;
+ }
+
+ private ExpressionWorkingSetFilter getWorkingSetFilter(ITreeModelViewer viewer) {
+ ViewerFilter[] existingFilters = viewer.getFilters();
+ for (int i=0; i<existingFilters.length; i++) {
+ ViewerFilter existingFilter = existingFilters[i];
+ if (existingFilter instanceof ExpressionWorkingSetFilter) {
+ return (ExpressionWorkingSetFilter) existingFilter;
+ }
+ }
+
+ ExpressionWorkingSetFilter workingSetFilter = new ExpressionWorkingSetFilter();
+ viewer.addFilter(workingSetFilter);
+ return workingSetFilter;
+ }
+
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionWorkingSetElementAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionWorkingSetElementAdapter.java
index 5a99063..b4e514e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionWorkingSetElementAdapter.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionWorkingSetElementAdapter.java
@@ -8,7 +8,7 @@
* Contributors:
* Abeer Bagul (Tensilica Inc) - initial API and implementation (Bug 372181)
*******************************************************************************/
-package org.eclipse.debug.internal.ui.expression.workingset;
+package org.eclipse.debug.internal.ui.views.expression;
import java.util.ArrayList;
import java.util.List;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionWorkingSetFilter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionWorkingSetFilter.java
index d169b63..4a2b199 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionWorkingSetFilter.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionWorkingSetFilter.java
@@ -8,11 +8,10 @@
* Contributors:
* Abeer Bagul (Tensilica Inc) - initial API and implementation (Bug 372181)
*******************************************************************************/
-package org.eclipse.debug.internal.ui.expression.workingset;
+package org.eclipse.debug.internal.ui.views.expression;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.debug.core.model.IExpression;
-import org.eclipse.debug.internal.ui.model.elements.IAddNewExpression;
import org.eclipse.debug.internal.ui.viewers.model.provisional.ITreeModelViewer;
import org.eclipse.debug.internal.ui.viewers.model.provisional.TreeModelViewerFilter;
import org.eclipse.jface.viewers.Viewer;
@@ -40,25 +39,18 @@ public class ExpressionWorkingSetFilter extends TreeModelViewerFilter {
public boolean select(Viewer viewer, Object parentElement, Object element) {
- if (selectedWorkingSets == null)
- return true;
+ if (selectedWorkingSets == null || selectedWorkingSets.length == 0) return true;
- if (selectedWorkingSets.length == 0)
- return true;
-
- if (element instanceof IAddNewExpression)
- return true;
-
- if (element instanceof IAdaptable)
- {
+ if (element instanceof IAdaptable) {
IExpression expressionToFilter = (IExpression) ((IAdaptable) element).getAdapter(IExpression.class);
- if (expressionToFilter != null)
- {
+ if (expressionToFilter != null) {
return isInWorkingSet(expressionToFilter);
- }
+ }
}
- return false;
+ // Do not filter out elements which do not adapt to IExpression. These may
+ // include special elements, such as the "Add New Expression..." element.
+ return true;
}
private boolean isInWorkingSet(IExpression expression)
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionWorkingSetMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionWorkingSetMessages.java
index efd40b1..93eceae 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionWorkingSetMessages.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionWorkingSetMessages.java
@@ -8,7 +8,7 @@
* Contributors:
* Abeer Bagul (Tensilica Inc) - initial API and implementation (Bug 372181)
*******************************************************************************/
-package org.eclipse.debug.internal.ui.expression.workingset;
+package org.eclipse.debug.internal.ui.views.expression;
import org.eclipse.osgi.util.NLS;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionWorkingSetMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionWorkingSetMessages.properties
index c721e6c..c721e6c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionWorkingSetMessages.properties
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionWorkingSetMessages.properties
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionWorkingSetPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionWorkingSetPage.java
index c7cfc9a..1834fcd 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/expression/workingset/ExpressionWorkingSetPage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionWorkingSetPage.java
@@ -8,7 +8,7 @@
* Contributors:
* Abeer Bagul (Tensilica Inc) - initial API and implementation (Bug 372181)
*******************************************************************************/
-package org.eclipse.debug.internal.ui.expression.workingset;
+package org.eclipse.debug.internal.ui.views.expression;
import java.util.ArrayList;
import java.util.Iterator;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java
index 29c6d62..d9d8c7d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/AbstractDebugView.java
@@ -270,7 +270,7 @@ public abstract class AbstractDebugView extends PageBookView implements IDebugVi
*/
public void createControl(Composite parent) {
Viewer viewer = createViewer(parent);
- setViewer(viewer);
+ setViewer(viewer);
}
/**
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 bc849b7..0605fb9 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
@@ -1153,6 +1153,16 @@ public interface IDebugUIConstants {
public static final String BREAKPOINT_WORKINGSET_ID = "org.eclipse.debug.ui.breakpointWorkingSet"; //$NON-NLS-1$
/**
+ * Identifier for expression working set type.
+ * <br>
+ * Value is: <code>org.eclipse.debug.ui.expressionWorkingSet</code>
+ *
+ * @since 3.9
+ */
+ public static final String EXPRESSION_WORKINGSET_ID = "org.eclipse.debug.ui.expressionWorkingSet"; //$NON-NLS-1$
+
+
+ /**
* Memory view identifier (value <code>"org.eclipse.debug.ui.MemoryView"</code>).
*
* @since 3.2
@@ -1324,4 +1334,12 @@ public interface IDebugUIConstants {
* @since 3.8
*/
public final static String COLUMN_ID_VARIABLE_VALUE_TYPE = COLUMN_PRESENTATION_ID_VARIABLE + ".COL_VALUE_TYPE"; //$NON-NLS-1$
+
+ /**
+ * Expression view property used to store the currently selected working
+ * set names. The working set names are stored as a <code>String[]</code>.
+ *
+ * @since 3.9
+ */
+ public final static String PROP_EXPRESSIONS_WORKING_SETS = IDebugUIConstants.PLUGIN_ID + ".PROP_EXPRESSION_WORKING_SETS"; //$NON-NLS-1$
}