diff options
author | Michael Rennie | 2011-05-05 16:13:14 +0000 |
---|---|---|
committer | Michael Rennie | 2011-05-05 16:13:14 +0000 |
commit | aba39fdfa424d2163b08cb228455e785efa0b92f (patch) | |
tree | 6569d9fcf55a75dbf54d724860c3533f9a73d31c /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui | |
parent | 52a7179f749eee503973209f024e02122d3d7d0c (diff) | |
download | eclipse.platform.debug-aba39fdfa424d2163b08cb228455e785efa0b92f.tar.gz eclipse.platform.debug-aba39fdfa424d2163b08cb228455e785efa0b92f.tar.xz eclipse.platform.debug-aba39fdfa424d2163b08cb228455e785efa0b92f.zip |
Copyright updates
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui')
22 files changed, 338 insertions, 338 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowTargetBreakpointsAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowTargetBreakpointsAction.java index b6821f131..c9f0bff4e 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowTargetBreakpointsAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpoints/ShowTargetBreakpointsAction.java @@ -1,63 +1,63 @@ -/*****************************************************************
- * Copyright (c) 2009 Texas Instruments 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:
- * Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 238956)
- *****************************************************************/
-package org.eclipse.debug.internal.ui.actions.breakpoints;
-
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
-import org.eclipse.debug.internal.ui.actions.ActionMessages;
-import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.Action;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * This class implements the show target breakpoint action.
- *
- * @since 3.6
- */
-public class ShowTargetBreakpointsAction extends Action {
- /**
- * Breakpoints view
- */
- BreakpointsView fView;
-
- /**
- * Constructor.
- *
- * @param view the breakpoints view
- */
- public ShowTargetBreakpointsAction(BreakpointsView view) {
- super();
-
- fView = view;
-
- setText(ActionMessages.ShowSupportedBreakpointsAction_Show_For_Selected);
- setToolTipText(ActionMessages.ShowSupportedBreakpointsAction_tooltip);
-
- setImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_OBJS_DEBUG_TARGET));
- setChecked(false);
- setId(DebugUIPlugin.getUniqueIdentifier() + ".ShowSupportedBreakpointsAction"); //$NON-NLS-1$
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.SHOW_BREAKPOINTS_FOR_MODEL_ACTION);
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.jface.action.Action#run()
- */
- public void run() {
- if (fView.getViewer().getControl().isDisposed()) {
- return;
- }
- fView.setFilterSelection(isChecked());
- }
-}
+/***************************************************************** + * Copyright (c) 2009, 2010 Texas Instruments 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: + * Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 238956) + *****************************************************************/ +package org.eclipse.debug.internal.ui.actions.breakpoints; + +import org.eclipse.debug.internal.ui.DebugPluginImages; +import org.eclipse.debug.internal.ui.DebugUIPlugin; +import org.eclipse.debug.internal.ui.IDebugHelpContextIds; +import org.eclipse.debug.internal.ui.actions.ActionMessages; +import org.eclipse.debug.internal.ui.views.breakpoints.BreakpointsView; +import org.eclipse.debug.ui.IDebugUIConstants; +import org.eclipse.jface.action.Action; +import org.eclipse.ui.PlatformUI; + +/** + * This class implements the show target breakpoint action. + * + * @since 3.6 + */ +public class ShowTargetBreakpointsAction extends Action { + /** + * Breakpoints view + */ + BreakpointsView fView; + + /** + * Constructor. + * + * @param view the breakpoints view + */ + public ShowTargetBreakpointsAction(BreakpointsView view) { + super(); + + fView = view; + + setText(ActionMessages.ShowSupportedBreakpointsAction_Show_For_Selected); + setToolTipText(ActionMessages.ShowSupportedBreakpointsAction_tooltip); + + setImageDescriptor(DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_OBJS_DEBUG_TARGET)); + setChecked(false); + setId(DebugUIPlugin.getUniqueIdentifier() + ".ShowSupportedBreakpointsAction"); //$NON-NLS-1$ + + PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IDebugHelpContextIds.SHOW_BREAKPOINTS_FOR_MODEL_ACTION); + } + + /* + * (non-Javadoc) + * @see org.eclipse.jface.action.Action#run() + */ + public void run() { + if (fView.getViewer().getControl().isDisposed()) { + return; + } + fView.setFilterSelection(isChecked()); + } +} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/breakpoints/provisional/IBreakpointUIConstants.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/breakpoints/provisional/IBreakpointUIConstants.java index 85784cdba..ad55c0751 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/breakpoints/provisional/IBreakpointUIConstants.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/breakpoints/provisional/IBreakpointUIConstants.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009 Wind River Systems and others. + * Copyright (c) 2009, 2010 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 diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultBreakpointsViewInput.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultBreakpointsViewInput.java index 27a161a3a..a525bdf95 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultBreakpointsViewInput.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultBreakpointsViewInput.java @@ -1,74 +1,74 @@ -/*****************************************************************
- * Copyright (c) 2009 Texas Instruments 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:
- * Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 238956)
- * Wind River Systems - ongoing enhancements and bug fixing
- *****************************************************************/
-package org.eclipse.debug.internal.ui.elements.adapters;
-
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-
-/**
- * The default breakpoints view input populates the view with content
- * from the default breakpoint manager.
- *
- * @since 3.6
- */
-public class DefaultBreakpointsViewInput {
-
- /**
- * The presentation context of the breakpoints view.
- */
- final private IPresentationContext fContext;
-
- /**
- * Constructor.
- *
- * @param context the presentation context for this input
- */
- public DefaultBreakpointsViewInput(IPresentationContext context) {
- fContext = context;
- }
-
- /**
- * Returns the presentation context for this input.
- *
- * @return the presentation context
- */
- public IPresentationContext getContext() {
- return fContext;
- }
-
- /*
- * (non-Javadoc)
- * @see java.lang.Object#hashCode()
- */
- public int hashCode() {
- if (getContext() != null) {
- return getContext().hashCode();
- } else {
- return 1;
- }
- }
-
- /*
- * (non-Javadoc)
- * @see java.lang.Object#equals(java.lang.Object)
- */
- public boolean equals(Object arg0) {
- if ( (arg0 != null) && arg0.getClass().equals(this.getClass()) ) {
-
- IPresentationContext context = ((DefaultBreakpointsViewInput) arg0).getContext();
- if (getContext() != null && context != null)
- return getContext().equals(context);
- }
-
- return super.equals(arg0);
- }
-
-}
+/***************************************************************** + * Copyright (c) 2009, 2010 Texas Instruments 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: + * Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 238956) + * Wind River Systems - ongoing enhancements and bug fixing + *****************************************************************/ +package org.eclipse.debug.internal.ui.elements.adapters; + +import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext; + +/** + * The default breakpoints view input populates the view with content + * from the default breakpoint manager. + * + * @since 3.6 + */ +public class DefaultBreakpointsViewInput { + + /** + * The presentation context of the breakpoints view. + */ + final private IPresentationContext fContext; + + /** + * Constructor. + * + * @param context the presentation context for this input + */ + public DefaultBreakpointsViewInput(IPresentationContext context) { + fContext = context; + } + + /** + * Returns the presentation context for this input. + * + * @return the presentation context + */ + public IPresentationContext getContext() { + return fContext; + } + + /* + * (non-Javadoc) + * @see java.lang.Object#hashCode() + */ + public int hashCode() { + if (getContext() != null) { + return getContext().hashCode(); + } else { + return 1; + } + } + + /* + * (non-Javadoc) + * @see java.lang.Object#equals(java.lang.Object) + */ + public boolean equals(Object arg0) { + if ( (arg0 != null) && arg0.getClass().equals(this.getClass()) ) { + + IPresentationContext context = ((DefaultBreakpointsViewInput) arg0).getContext(); + if (getContext() != null && context != null) + return getContext().equals(context); + } + + return super.equals(arg0); + } + +} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultViewerInputProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultViewerInputProvider.java index 04997ef06..258cc1ec4 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultViewerInputProvider.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/DefaultViewerInputProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2009 Wind River Systems and others. + * Copyright (c) 2007, 2010 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 diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/StackFrameSourceDisplayAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/StackFrameSourceDisplayAdapter.java index 74dd07cd0..03a373071 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/StackFrameSourceDisplayAdapter.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/StackFrameSourceDisplayAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2009 IBM Corporation and others. + * Copyright (c) 2005, 2011 IBM Corporation 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 diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerContentProvider.java index dc883ecf8..f4c4cb4cb 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerContentProvider.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerContentProvider.java @@ -1,5 +1,5 @@ /***************************************************************** - * Copyright (c) 2009, 2010 Texas Instruments and others + * Copyright (c) 2009, 2011 Texas Instruments 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 diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/PromptingResolver.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/PromptingResolver.java index d1c3bb4cd..fc00f409e 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/PromptingResolver.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/stringsubstitution/PromptingResolver.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2005 Matt Conway and others. + * Copyright (c) 2000, 2006 Matt Conway 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 diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ElementCompareRequest.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ElementCompareRequest.java index 882a7df4e..ffa062c1e 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ElementCompareRequest.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ElementCompareRequest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2009 IBM Corporation and others. + * Copyright (c) 2006, 2010 IBM Corporation 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 diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelContentProvider.java index e4d5f3dc3..bad08fb73 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelContentProvider.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/ITreeModelContentProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009 Wind River Systems and others. + * Copyright (c) 2009, 2010 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 diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java index e542b826b..1f356c1dc 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2010 IBM Corporation and others. + * Copyright (c) 2006, 2011 IBM Corporation 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 diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/LabelUpdate.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/LabelUpdate.java index 3ffc28db7..764eecc60 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/LabelUpdate.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/LabelUpdate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2009 IBM Corporation and others. + * Copyright (c) 2006, 2010 IBM Corporation 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 diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java index ab1136b1e..aa1e21dac 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/TreeModelContentProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2010 IBM Corporation and others. + * Copyright (c) 2006, 2011 IBM Corporation 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 diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualItem.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualItem.java index e5e022e2e..1365c5ff2 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualItem.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualItem.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 Wind River Systems and others. + * Copyright (c) 2008, 2009 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 diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualTree.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualTree.java index 89c2f366f..9cd993390 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualTree.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/VirtualTree.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008 Wind River Systems and others. + * Copyright (c) 2008, 2009 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 diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointManagerProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointManagerProxy.java index 570eaec04..639872ca6 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointManagerProxy.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/BreakpointManagerProxy.java @@ -1,182 +1,182 @@ -/*****************************************************************
- * Copyright (c) 2009 Texas Instruments 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:
- * Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 238956)
- * Wind River Systems - ongoing enhancements and bug fixing
- *****************************************************************/
-package org.eclipse.debug.internal.ui.viewers.update;
-
-import java.util.Iterator;
-import java.util.LinkedList;
-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.core.runtime.jobs.Job;
-import org.eclipse.debug.internal.ui.elements.adapters.DefaultBreakpointsViewInput;
-import org.eclipse.debug.internal.ui.model.elements.BreakpointManagerContentProvider;
-import org.eclipse.debug.internal.ui.viewers.model.ViewerAdapterService;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta;
-import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
-import org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.progress.WorkbenchJob;
-
-/**
- * Breakpoint manager model proxy.
- *
- * @since 3.6
- */
-public class BreakpointManagerProxy extends AbstractModelProxy {
- /**
- * The breakpoint manager content provider for this model proxy
- */
- final private BreakpointManagerContentProvider fProvider;
-
- /**
- * The breakpoint manager input for this model proxy
- */
- final private DefaultBreakpointsViewInput fInput;
-
- /**
- * Job to fire posted deltas.
- */
- private Job fFireModelChangedJob;
-
- /**
- * Object used for describing a posted delta.
- */
- private static class DeltaInfo {
- final boolean fSelect;
- final IModelDelta fDelta;
-
- DeltaInfo(boolean selectDelta, IModelDelta delta) {
- fSelect = selectDelta;
- fDelta = delta;
- }
- }
-
- /**
- * List of posted deltas ready to be fired.
- */
- private List/*<DeltaInfo>*/ fPendingDeltas = new LinkedList();
-
-
- /**
- * Constructor.
- *
- * @param input the breakpoint manager input
- * @param context the presentation context for this model proxy
- */
- public BreakpointManagerProxy(Object input, IPresentationContext context) {
- super();
-
- DefaultBreakpointsViewInput bpmInput = null;
- BreakpointManagerContentProvider bpmProvider = null;
- if (input instanceof DefaultBreakpointsViewInput) {
- bpmInput = (DefaultBreakpointsViewInput) input;
-
- // cache the required data and pass to the provider when this model is installed
- IElementContentProvider provider = ViewerAdapterService.getContentProvider(input);
- if (provider instanceof BreakpointManagerContentProvider) {
- bpmProvider = (BreakpointManagerContentProvider) provider;
- }
- }
- fInput = bpmInput;
- fProvider = bpmProvider;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy#installed(org.eclipse.jface.viewers.Viewer)
- */
- public void installed(Viewer viewer) {
- super.installed(viewer);
- if (fProvider != null) {
- fProvider.registerModelProxy(fInput, this);
- }
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy#dispose()
- */
- public void dispose() {
- fProvider.unregisterModelProxy(fInput, this);
- synchronized(this) {
- if (fFireModelChangedJob != null) {
- fFireModelChangedJob.cancel();
- fFireModelChangedJob = null;
- }
- fPendingDeltas.clear();
- }
-
- super.dispose();
- }
-
- /**
- * Posts a given delta to be fired by the proxy. Posting a delta places it
- * in a queue which is later emptied by a job that fires the deltas.
- * <p>
- * If the delta is used only to select a breakpiont and does not change the
- * viewer content, the caller should set the <code>select</code> parameter
- * to <code>true</code>. When a select delta is added to the delta queue,
- * any previous select deltas are removed.
- *
- * @param delta Delta to be posted to the viewer.
- * @param select Flag indicating that the delta is only to change the
- * viewer selection.
- */
- public synchronized void postModelChanged(IModelDelta delta, boolean select) {
- // Check for proxy being disposed.
- if (isDisposed()) {
- return;
- }
- // Check for viewer being disposed.
- Widget viewerControl = getViewer().getControl();
- if (viewerControl == null) {
- return;
- }
-
- // If we are processing a select delta, remove the previous select delta.
- if (select) {
- for (Iterator itr = fPendingDeltas.iterator(); itr.hasNext(); ) {
- if ( ((DeltaInfo)itr.next()).fSelect ) {
- itr.remove();
- }
- }
- }
- fPendingDeltas.add(new DeltaInfo(select, delta));
-
- if (fFireModelChangedJob == null) {
- fFireModelChangedJob = new WorkbenchJob(viewerControl.getDisplay(), "Select Breakpoint Job") { //$NON-NLS-1$
- {
- setSystem(true);
- }
-
- public IStatus runInUIThread(IProgressMonitor monitor) {
- Object[] deltas;
- synchronized(BreakpointManagerProxy.this) {
- deltas = fPendingDeltas.toArray();
- fPendingDeltas.clear();
- fFireModelChangedJob = null;
- }
- for (int i = 0; i < deltas.length; i++) {
- fireModelChanged( ((DeltaInfo)deltas[i]).fDelta );
- }
- return Status.OK_STATUS;
- }
- };
- fFireModelChangedJob.schedule();
- }
- }
-
-}
+/***************************************************************** + * Copyright (c) 2009, 2010 Texas Instruments 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: + * Patrick Chuong (Texas Instruments) - Initial API and implementation (Bug 238956) + * Wind River Systems - ongoing enhancements and bug fixing + *****************************************************************/ +package org.eclipse.debug.internal.ui.viewers.update; + +import java.util.Iterator; +import java.util.LinkedList; +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.core.runtime.jobs.Job; +import org.eclipse.debug.internal.ui.elements.adapters.DefaultBreakpointsViewInput; +import org.eclipse.debug.internal.ui.model.elements.BreakpointManagerContentProvider; +import org.eclipse.debug.internal.ui.viewers.model.ViewerAdapterService; +import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider; +import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelDelta; +import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext; +import org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.swt.widgets.Widget; +import org.eclipse.ui.progress.WorkbenchJob; + +/** + * Breakpoint manager model proxy. + * + * @since 3.6 + */ +public class BreakpointManagerProxy extends AbstractModelProxy { + /** + * The breakpoint manager content provider for this model proxy + */ + final private BreakpointManagerContentProvider fProvider; + + /** + * The breakpoint manager input for this model proxy + */ + final private DefaultBreakpointsViewInput fInput; + + /** + * Job to fire posted deltas. + */ + private Job fFireModelChangedJob; + + /** + * Object used for describing a posted delta. + */ + private static class DeltaInfo { + final boolean fSelect; + final IModelDelta fDelta; + + DeltaInfo(boolean selectDelta, IModelDelta delta) { + fSelect = selectDelta; + fDelta = delta; + } + } + + /** + * List of posted deltas ready to be fired. + */ + private List/*<DeltaInfo>*/ fPendingDeltas = new LinkedList(); + + + /** + * Constructor. + * + * @param input the breakpoint manager input + * @param context the presentation context for this model proxy + */ + public BreakpointManagerProxy(Object input, IPresentationContext context) { + super(); + + DefaultBreakpointsViewInput bpmInput = null; + BreakpointManagerContentProvider bpmProvider = null; + if (input instanceof DefaultBreakpointsViewInput) { + bpmInput = (DefaultBreakpointsViewInput) input; + + // cache the required data and pass to the provider when this model is installed + IElementContentProvider provider = ViewerAdapterService.getContentProvider(input); + if (provider instanceof BreakpointManagerContentProvider) { + bpmProvider = (BreakpointManagerContentProvider) provider; + } + } + fInput = bpmInput; + fProvider = bpmProvider; + } + + /* + * (non-Javadoc) + * @see org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy#installed(org.eclipse.jface.viewers.Viewer) + */ + public void installed(Viewer viewer) { + super.installed(viewer); + if (fProvider != null) { + fProvider.registerModelProxy(fInput, this); + } + } + + /* + * (non-Javadoc) + * @see org.eclipse.debug.internal.ui.viewers.provisional.AbstractModelProxy#dispose() + */ + public void dispose() { + fProvider.unregisterModelProxy(fInput, this); + synchronized(this) { + if (fFireModelChangedJob != null) { + fFireModelChangedJob.cancel(); + fFireModelChangedJob = null; + } + fPendingDeltas.clear(); + } + + super.dispose(); + } + + /** + * Posts a given delta to be fired by the proxy. Posting a delta places it + * in a queue which is later emptied by a job that fires the deltas. + * <p> + * If the delta is used only to select a breakpiont and does not change the + * viewer content, the caller should set the <code>select</code> parameter + * to <code>true</code>. When a select delta is added to the delta queue, + * any previous select deltas are removed. + * + * @param delta Delta to be posted to the viewer. + * @param select Flag indicating that the delta is only to change the + * viewer selection. + */ + public synchronized void postModelChanged(IModelDelta delta, boolean select) { + // Check for proxy being disposed. + if (isDisposed()) { + return; + } + // Check for viewer being disposed. + Widget viewerControl = getViewer().getControl(); + if (viewerControl == null) { + return; + } + + // If we are processing a select delta, remove the previous select delta. + if (select) { + for (Iterator itr = fPendingDeltas.iterator(); itr.hasNext(); ) { + if ( ((DeltaInfo)itr.next()).fSelect ) { + itr.remove(); + } + } + } + fPendingDeltas.add(new DeltaInfo(select, delta)); + + if (fFireModelChangedJob == null) { + fFireModelChangedJob = new WorkbenchJob(viewerControl.getDisplay(), "Select Breakpoint Job") { //$NON-NLS-1$ + { + setSystem(true); + } + + public IStatus runInUIThread(IProgressMonitor monitor) { + Object[] deltas; + synchronized(BreakpointManagerProxy.this) { + deltas = fPendingDeltas.toArray(); + fPendingDeltas.clear(); + fFireModelChangedJob = null; + } + for (int i = 0; i < deltas.length; i++) { + fireModelChanged( ((DeltaInfo)deltas[i]).fDelta ); + } + return Status.OK_STATUS; + } + }; + fFireModelChangedJob.schedule(); + } + } + +} diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java index c029c2bf5..96cda0564 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2010 IBM Corporation and others. + * Copyright (c) 2006, 2011 IBM Corporation 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 diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionDropAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionDropAdapter.java index 207cd4bad..b63b1c8b1 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionDropAdapter.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/expression/ExpressionDropAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 IBM Corporation and others. + * Copyright (c) 2007, 2010 IBM Corporation 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 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 4180d3c88..ced87df39 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2010 IBM Corporation and others. + * Copyright (c) 2000, 2011 IBM Corporation 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 diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingContentProvider.java index 1959b45a9..5a7402e27 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingContentProvider.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/renderings/TableRenderingContentProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2009 IBM Corporation and others. + * Copyright (c) 2004, 2010 IBM Corporation 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 diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/modules/ModulesViewMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/modules/ModulesViewMessages.properties index b8c3458e9..c275074f7 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/modules/ModulesViewMessages.properties +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/modules/ModulesViewMessages.properties @@ -1,5 +1,5 @@ ######################################################################### -# Copyright (c) 2004, 2008 QNX Software Systems and others. +# Copyright (c) 2004, 2010 QNX Software 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 diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/registers/RegistersView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/registers/RegistersView.java index acee47c8e..d0fa27aff 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/registers/RegistersView.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/registers/RegistersView.java @@ -1,5 +1,5 @@ /********************************************************************** - * Copyright (c) 2004, 2005 QNX Software Systems and others. + * Copyright (c) 2004, 2006 QNX Software 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 diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/registers/RegistersViewMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/registers/RegistersViewMessages.properties index b6d185868..f7c8e3413 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/registers/RegistersViewMessages.properties +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/registers/RegistersViewMessages.properties @@ -1,5 +1,5 @@ ######################################################################### -# Copyright (c) 2004, 2005 QNX Software Systems and others. +# Copyright (c) 2004, 2010 QNX Software 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 |