Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Rennie2013-07-31 12:44:16 -0400
committerMike Rennie2013-07-31 12:44:16 -0400
commitd975f27f12707ae6598994c5e3c6bd5e271d46c4 (patch)
treec7d1b2b1a202e19c0c2ccaaff959f4dd25286f0d /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model
parent4fcde1ffaf34791bd406d47ce72d17e2801432a3 (diff)
downloadeclipse.platform.debug-d975f27f12707ae6598994c5e3c6bd5e271d46c4.tar.gz
eclipse.platform.debug-d975f27f12707ae6598994c5e3c6bd5e271d46c4.tar.xz
eclipse.platform.debug-d975f27f12707ae6598994c5e3c6bd5e271d46c4.zip
Bug 352626 - Move platform debug to Java 1.6 BREE
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointContainerLabelProvider.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointContainerMementoProvider.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointContentProvider.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointLabelProvider.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerContentProvider.java139
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerInputMementoProvider.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointMementoProvider.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugElementLabelProvider.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugElementMementoProvider.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugTargetContentProvider.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementContentProvider.java6
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementLabelProvider.java19
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementMementoProvider.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionContentProvider.java60
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionLabelProvider.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionManagerContentProvider.java25
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionManagerMementoProvider.java1
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionMementoProvider.java1
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/LaunchContentProvider.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/LaunchManagerContentProvider.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryBlockContentProvider.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryBlockLabelProvider.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryRetrievalContentProvider.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryViewElementMementoProvider.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ProcessContentProvider.java3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/RegisterGroupContentProvider.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/RegisterGroupLabelProvider.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/RegisterGroupMementoProvider.java1
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/StackFrameContentProvider.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/StackFrameMementoProvider.java1
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ThreadContentProvider.java4
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableContentProvider.java11
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableEditor.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableLabelProvider.java5
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableMementoProvider.java1
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ViewerInputProvider.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/WatchExpressionEditor.java2
37 files changed, 245 insertions, 105 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointContainerLabelProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointContainerLabelProvider.java
index 1bf8cfe5e..3ca3eaf7f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointContainerLabelProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointContainerLabelProvider.java
@@ -35,6 +35,7 @@ public class BreakpointContainerLabelProvider extends DebugElementLabelProvider
* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.DebugElementLabelProvider#getImageDescriptor(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String)
*/
+ @Override
protected ImageDescriptor getImageDescriptor(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
ImageDescriptor desc = super.getImageDescriptor(elementPath, presentationContext, columnId);
int flags = computeAdornmentFlags();
@@ -51,6 +52,7 @@ public class BreakpointContainerLabelProvider extends DebugElementLabelProvider
* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider#getChecked(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
*/
+ @Override
public boolean getChecked(TreePath path, IPresentationContext presentationContext) throws CoreException {
Object lastSegment = path.getLastSegment();
if (lastSegment instanceof IBreakpointContainer) {
@@ -70,6 +72,7 @@ public class BreakpointContainerLabelProvider extends DebugElementLabelProvider
* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider#getGrayed(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
*/
+ @Override
public boolean getGrayed(TreePath path, IPresentationContext presentationContext) throws CoreException {
Object lastSegment = path.getLastSegment();
if (lastSegment instanceof IBreakpointContainer) {
@@ -100,6 +103,7 @@ public class BreakpointContainerLabelProvider extends DebugElementLabelProvider
}
// Forward font data requests to the workbench adapter
+ @Override
protected FontData getFontData(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
Object element = elementPath.getLastSegment();
FontData fontData = super.getFontData(elementPath, presentationContext, columnId);
@@ -114,6 +118,7 @@ public class BreakpointContainerLabelProvider extends DebugElementLabelProvider
}
// Forward foreground color requests to the workbench adapter
+ @Override
protected RGB getForeground(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
Object element = elementPath.getLastSegment();
RGB rgb = super.getForeground(elementPath, presentationContext, columnId);
@@ -128,6 +133,7 @@ public class BreakpointContainerLabelProvider extends DebugElementLabelProvider
}
// Forward background color requests to the workbench adapter
+ @Override
protected RGB getBackground(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
Object element = elementPath.getLastSegment();
RGB rgb = super.getBackground(elementPath, presentationContext, columnId);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointContainerMementoProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointContainerMementoProvider.java
index aaa5a05f3..9f4c8dbb6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointContainerMementoProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointContainerMementoProvider.java
@@ -28,6 +28,7 @@ public class BreakpointContainerMementoProvider extends DebugElementMementoProvi
* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.DebugElementMementoProvider#getElementName(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
*/
+ @Override
protected String getElementName(Object element, IPresentationContext context) throws CoreException {
if (element instanceof IBreakpointContainer) {
IBreakpointContainer container = (IBreakpointContainer) element;
@@ -46,6 +47,7 @@ public class BreakpointContainerMementoProvider extends DebugElementMementoProvi
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementMementoProvider#isEqual(java.lang.Object, org.eclipse.ui.IMemento, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
*/
+ @Override
protected boolean supportsContextId(String id) {
return IDebugUIConstants.ID_BREAKPOINT_VIEW.equals(id);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointContentProvider.java
index c66ac4bac..925489fee 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointContentProvider.java
@@ -25,6 +25,7 @@ public class BreakpointContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
*/
+ @Override
protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
return 0;
}
@@ -32,6 +33,7 @@ public class BreakpointContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
*/
+ @Override
protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
return null;
}
@@ -39,6 +41,7 @@ public class BreakpointContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#supportsContextId(java.lang.String)
*/
+ @Override
protected boolean supportsContextId(String id) {
return id.equals(IDebugUIConstants.ID_BREAKPOINT_VIEW);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointLabelProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointLabelProvider.java
index 5e21aada1..59a7c246a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointLabelProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointLabelProvider.java
@@ -28,6 +28,7 @@ public class BreakpointLabelProvider extends DebugElementLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider#getLabel(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String, int)
*/
+ @Override
protected String getLabel(TreePath elementPath, IPresentationContext presentationContext, String columnId, int columnIndex) throws CoreException {
if (columnIndex == 0)
return super.getLabel(elementPath, presentationContext, columnId, columnIndex);
@@ -38,6 +39,7 @@ public class BreakpointLabelProvider extends DebugElementLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider#getImageDescriptor(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String, int)
*/
+ @Override
protected ImageDescriptor getImageDescriptor(TreePath elementPath, IPresentationContext presentationContext, String columnId, int columnIndex) throws CoreException {
if (columnIndex == 0)
return super.getImageDescriptor(elementPath, presentationContext, columnId, columnIndex);
@@ -49,6 +51,7 @@ public class BreakpointLabelProvider extends DebugElementLabelProvider {
* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider#getChecked(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
*/
+ @Override
public boolean getChecked(TreePath path, IPresentationContext presentationContext) throws CoreException {
Object lastSegment = path.getLastSegment();
if (lastSegment instanceof IBreakpoint) {
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 7337ff05e..8d7282b73 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
@@ -21,6 +21,7 @@ import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.Set;
import org.eclipse.core.resources.IMarkerDelta;
@@ -86,7 +87,7 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
/**
* Model proxy of the input
*/
- final private List/*<AbstractModelProxy>*/ fProxies = new ArrayList(1);
+ final private List<BreakpointManagerProxy> fProxies = new ArrayList<BreakpointManagerProxy>(1);
/**
* Element comparator, use to compare the ordering of elements for the model
@@ -109,20 +110,23 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
private IStructuredSelection fDebugContext = StructuredSelection.EMPTY;
private IPropertyChangeListener fOrganizersListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
+ @Override
+ public void propertyChange(PropertyChangeEvent event) {
// For any property changes in breakpoint organizers, refresh the containers.
updateContainers();
}
};
private IPropertyChangeListener fPresentationContextListener = new IPropertyChangeListener() {
- public void propertyChange(PropertyChangeEvent event) {
+ @Override
+ public void propertyChange(PropertyChangeEvent event) {
presentationPropertyChanged(event);
}
};
private IDebugContextListener fDebugContextListener = new IDebugContextListener() {
- public void debugContextChanged(DebugContextEvent event) {
+ @Override
+ public void debugContextChanged(DebugContextEvent event) {
InputData.this.debugContextChanged(event);
}
};
@@ -209,7 +213,7 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
}
synchronized BreakpointManagerProxy[] getProxies() {
- return (BreakpointManagerProxy[])fProxies.toArray(new BreakpointManagerProxy[fProxies.size()]);
+ return fProxies.toArray(new BreakpointManagerProxy[fProxies.size()]);
}
/**
@@ -342,7 +346,7 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
}
synchronized(this) {
- Set existingBreakpoints = new HashSet(Arrays.asList(fContainer.getBreakpoints()));
+ Set<IBreakpoint> existingBreakpoints = new HashSet<IBreakpoint>(Arrays.asList(fContainer.getBreakpoints()));
// Bug 310879
// Process breakpoints in two passes: first remove breakpoints, then add new ones.
@@ -375,7 +379,7 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
return;
}
- Iterator iter = selection.iterator();
+ Iterator<?> iter = selection.iterator();
Object firstElement = iter.next();
if (firstElement == null || iter.hasNext()) {
return;
@@ -390,7 +394,7 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
}
IBreakpoint[] breakpoints = thread.getBreakpoints();
- Set bpsSet = new HashSet(breakpoints.length * 4/3);
+ Set<IBreakpoint> bpsSet = new HashSet<IBreakpoint>(breakpoints.length * 4 / 3);
for (int i = 0; i< breakpoints.length; i++) {
bpsSet.add(breakpoints[i]);
}
@@ -419,7 +423,7 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
* @param breakpoints Breakpoint set to be selected.
* @return whether we found a breakpoint to select
*/
- private boolean buildTrackSelectionDelta(ModelDelta delta, BreakpointContainer container, Set breakpoints) {
+ private boolean buildTrackSelectionDelta(ModelDelta delta, BreakpointContainer container, Set<IBreakpoint> breakpoints) {
Object[] children = container.getChildren();
delta.setChildCount(children.length);
for (int i = 0; i < children.length; i++) {
@@ -516,9 +520,9 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
ModelDelta delta = new ModelDelta(fInput, IModelDelta.NO_CHANGE);
// If the change caused a breakpoint to be added (installed) or remove (un-installed) update accordingly.
- List removed = new ArrayList();
- List added = new ArrayList();
- List filteredAsList = Arrays.asList(filteredBreakpoints);
+ List<IBreakpoint> removed = new ArrayList<IBreakpoint>();
+ List<IBreakpoint> added = new ArrayList<IBreakpoint>();
+ List<IBreakpoint> filteredAsList = Arrays.asList(filteredBreakpoints);
for (int i = 0; i < breakpoints.length; i++) {
IBreakpoint bp = breakpoints[i];
boolean oldContainedBp = fContainer.contains(bp);
@@ -530,13 +534,15 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
}
}
if (!added.isEmpty()) {
- breakpointsAdded((IBreakpoint[]) added.toArray(new IBreakpoint[added.size()]));
+ breakpointsAdded(added.toArray(new IBreakpoint[added.size()]));
}
if (!removed.isEmpty()) {
- breakpointsRemoved((IBreakpoint[]) removed.toArray(new IBreakpoint[removed.size()]));
+ breakpointsRemoved(removed.toArray(new IBreakpoint[removed.size()]));
}
for (int i = 0; i < filteredBreakpoints.length; ++i)
- appendModelDelta(fContainer, delta, IModelDelta.STATE | IModelDelta.CONTENT, filteredBreakpoints[i]); // content flag triggers detail refresh
+ {
+ appendModelDelta(fContainer, delta, IModelDelta.STATE | IModelDelta.CONTENT, filteredBreakpoints[i]); // content flag triggers detail refresh
+ }
if (DebugUIPlugin.DEBUG_BREAKPOINT_DELTAS) {
DebugUIPlugin.trace("POST BREAKPOINT DELTA (breakpointsChanged)\n"); //$NON-NLS-1$
@@ -594,8 +600,9 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
BreakpointContainer.addChildContainer(container, (BreakpointContainer) refChildren[i], containerDelta);
} else if(refChildren[i] instanceof IBreakpoint) {
BreakpointContainer.addBreakpoint(container, (IBreakpoint) refChildren[i], containerDelta);
- if (newBreakpoint == null)
- newBreakpoint = (IBreakpoint) refChildren[i];
+ if (newBreakpoint == null) {
+ newBreakpoint = (IBreakpoint) refChildren[i];
+ }
}
// if a child exist in container, than recursively search into container. And also update the organizer of
@@ -650,14 +657,17 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
* @see #deleteRemovedElements
*/
private Object getElement(Object[] collection, Object element) {
- for (int i = 0; i < collection.length; ++i)
- if (collection[i] instanceof BreakpointContainer && element instanceof BreakpointContainer) {
- if (collection[i].equals(element))
- return collection[i];
+ for (int i = 0; i < collection.length; ++i) {
+ if (collection[i] instanceof BreakpointContainer && element instanceof BreakpointContainer) {
+ if (collection[i].equals(element)) {
+ return collection[i];
+ }
} else {
- if (collection[i].equals(element))
- return collection[i];
+ if (collection[i].equals(element)) {
+ return collection[i];
+ }
}
+ }
return null;
}
@@ -693,21 +703,22 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
*/
synchronized private void postModelChanged(final IModelDelta delta, boolean select) {
for (int i = 0; fProxies != null && i < fProxies.size(); i++) {
- ((BreakpointManagerProxy)fProxies.get(i)).postModelChanged(delta, select);
+ fProxies.get(i).postModelChanged(delta, select);
}
}
}
- private class InputDataMap extends LinkedHashMap {
+ private class InputDataMap<K, V> extends LinkedHashMap<K, V> {
private static final long serialVersionUID = 1L;
public InputDataMap() {
super(1, (float)0.75, true);
}
- protected boolean removeEldestEntry(java.util.Map.Entry arg0) {
+ @Override
+ protected boolean removeEldestEntry(java.util.Map.Entry<K, V> arg0) {
InputData data = (InputData)arg0.getValue();
if (size() > getMaxInputsCache() && data.fProxies.isEmpty()) {
data.dispose();
@@ -723,11 +734,13 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
*/
private ISchedulingRule fBreakpointsListenerSchedulingRule = new ISchedulingRule() {
- public boolean isConflicting(ISchedulingRule rule) {
+ @Override
+ public boolean isConflicting(ISchedulingRule rule) {
return rule == this;
}
- public boolean contains(ISchedulingRule rule) {
+ @Override
+ public boolean contains(ISchedulingRule rule) {
return rule == this;
}
};
@@ -735,7 +748,7 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
/**
* A map of input to info data cache
*/
- final private Map fInputToData = Collections.synchronizedMap(new InputDataMap());
+ final private Map<DefaultBreakpointsViewInput, InputData> fInputToData = Collections.synchronizedMap(new InputDataMap<DefaultBreakpointsViewInput, InputData>());
/**
* Flag indicating whether the content provider is currently a breakpoints listener.
@@ -757,15 +770,16 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
*/
protected IBreakpoint[] filterBreakpoints(DefaultBreakpointsViewInput input, IStructuredSelection selectionFilter, IBreakpoint[] breakpoints) {
if (selectionFilter != null && !selectionFilter.isEmpty()) {
- List targets = getDebugTargets(selectionFilter);
- ArrayList retVal = new ArrayList();
+ List<IDebugTarget> targets = getDebugTargets(selectionFilter);
+ ArrayList<IBreakpoint> retVal = new ArrayList<IBreakpoint>();
if (targets != null) {
for (int i = 0; i < breakpoints.length; ++i) {
- if (supportsBreakpoint(targets, breakpoints[i]))
- retVal.add(breakpoints[i]);
+ if (supportsBreakpoint(targets, breakpoints[i])) {
+ retVal.add(breakpoints[i]);
+ }
}
}
- return (IBreakpoint[]) retVal.toArray(new IBreakpoint[retVal.size()]);
+ return retVal.toArray(new IBreakpoint[retVal.size()]);
} else {
return breakpoints;
}
@@ -789,10 +803,10 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
* @param breakpoint the breakpoint.
* @return true if breakpoint contains in the list of targets.
*/
- protected boolean supportsBreakpoint(List targets, IBreakpoint breakpoint) {
+ protected boolean supportsBreakpoint(List<IDebugTarget> targets, IBreakpoint breakpoint) {
boolean exist = targets.size() == 0 ? true : false;
for (int i = 0; !exist && i < targets.size(); ++i) {
- IDebugTarget target = (IDebugTarget) targets.get(i);
+ IDebugTarget target = targets.get(i);
exist |= target.supportsBreakpoint(breakpoint);
}
return exist;
@@ -804,10 +818,10 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
* @param ss the selection.
* @return list of IDebugTarget object.
*/
- protected List getDebugTargets(IStructuredSelection ss) {
- List debugTargets = new ArrayList(2);
+ protected List<IDebugTarget> getDebugTargets(IStructuredSelection ss) {
+ List<IDebugTarget> debugTargets = new ArrayList<IDebugTarget>(2);
if (ss != null) {
- Iterator i = ss.iterator();
+ Iterator<?> i = ss.iterator();
while (i.hasNext()) {
Object next = i.next();
if (next instanceof IDebugElement) {
@@ -855,11 +869,11 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
* @param context Presentation context that was disposed.
*/
protected void contextDisposed(IPresentationContext context) {
- List removed = new ArrayList(1);
+ List<InputData> removed = new ArrayList<InputData>(1);
synchronized (fInputToData) {
- for (Iterator itr = fInputToData.entrySet().iterator(); itr.hasNext();) {
- Map.Entry entry = (Map.Entry)itr.next();
- IPresentationContext entryContext = ((DefaultBreakpointsViewInput)entry.getKey()).getContext();
+ for (Iterator<Entry<DefaultBreakpointsViewInput, InputData>> itr = fInputToData.entrySet().iterator(); itr.hasNext();) {
+ Map.Entry<DefaultBreakpointsViewInput, InputData> entry = itr.next();
+ IPresentationContext entryContext = entry.getKey().getContext();
if (context.equals(entryContext)) {
removed.add(entry.getValue());
itr.remove();
@@ -869,7 +883,7 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
// Dispose the removed input data
for (int i = 0; i < removed.size(); i++) {
- ((InputData)removed.get(i)).dispose();
+ removed.get(i).dispose();
}
}
@@ -899,7 +913,7 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
* @param proxy the manager proxy
*/
public void unregisterModelProxy(DefaultBreakpointsViewInput input, BreakpointManagerProxy proxy) {
- InputData inputData = (InputData)fInputToData.get(input);
+ InputData inputData = fInputToData.get(input);
if (inputData != null) {
inputData.proxyDisposed(proxy);
@@ -921,7 +935,7 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
InputData data = null;
synchronized (fInputToData) {
- data = (InputData)fInputToData.get(input);
+ data = fInputToData.get(input);
if (data == null) {
data = new InputData(input);
fInputToData.put(input, data);
@@ -950,14 +964,16 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#supportsContextId(java.lang.String)
*/
- protected boolean supportsContextId(String id) {
+ @Override
+ protected boolean supportsContextId(String id) {
return id.equals(IDebugUIConstants.ID_BREAKPOINT_VIEW);
}
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
*/
- protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
+ @Override
+ protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
Object input = monitor.getViewerInput();
if (input instanceof DefaultBreakpointsViewInput) {
DefaultBreakpointsViewInput bpManagerInput = (DefaultBreakpointsViewInput)input;
@@ -972,7 +988,8 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
*/
- protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
+ @Override
+ protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
Object input = monitor.getViewerInput();
if (input instanceof DefaultBreakpointsViewInput) {
DefaultBreakpointsViewInput bpManagerInput = (DefaultBreakpointsViewInput)input;
@@ -990,15 +1007,17 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
* (non-Javadoc)
* @see org.eclipse.debug.core.IBreakpointsListener#breakpointsAdded(org.eclipse.debug.core.model.IBreakpoint[])
*/
- public void breakpointsAdded(final IBreakpoint[] breakpoints) {
+ @Override
+ public void breakpointsAdded(final IBreakpoint[] breakpoints) {
new Job("Breakpoints View Update Job") { //$NON-NLS-1$
{
setSystem(true);
setRule(fBreakpointsListenerSchedulingRule);
}
- protected IStatus run(IProgressMonitor monitor) {
- InputData[] datas = (InputData[])fInputToData.values().toArray(new InputData[0]);
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ InputData[] datas = fInputToData.values().toArray(new InputData[0]);
for (int i = 0; i < datas.length; i++) {
datas[i].breakpointsAdded(breakpoints);
}
@@ -1011,15 +1030,17 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
* (non-Javadoc)
* @see org.eclipse.debug.core.IBreakpointsListener#breakpointsRemoved(org.eclipse.debug.core.model.IBreakpoint[], org.eclipse.core.resources.IMarkerDelta[])
*/
- public void breakpointsRemoved(final IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
+ @Override
+ public void breakpointsRemoved(final IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
new Job("Breakpoints View Update Job") { //$NON-NLS-1$
{
setSystem(true);
setRule(fBreakpointsListenerSchedulingRule);
}
- protected IStatus run(IProgressMonitor monitor) {
- InputData[] datas = (InputData[])fInputToData.values().toArray(new InputData[0]);
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ InputData[] datas = fInputToData.values().toArray(new InputData[0]);
for (int i = 0; i < datas.length; i++) {
datas[i].breakpointsRemoved(breakpoints);
}
@@ -1032,15 +1053,17 @@ public class BreakpointManagerContentProvider extends ElementContentProvider
* (non-Javadoc)
* @see org.eclipse.debug.core.IBreakpointsListener#breakpointsChanged(org.eclipse.debug.core.model.IBreakpoint[], org.eclipse.core.resources.IMarkerDelta[])
*/
- public void breakpointsChanged(final IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
+ @Override
+ public void breakpointsChanged(final IBreakpoint[] breakpoints, IMarkerDelta[] deltas) {
new Job("Breakpoints View Update Job") { //$NON-NLS-1$
{
setSystem(true);
setRule(fBreakpointsListenerSchedulingRule);
}
- protected IStatus run(IProgressMonitor monitor) {
- InputData[] datas = (InputData[])fInputToData.values().toArray(new InputData[0]);
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ InputData[] datas = fInputToData.values().toArray(new InputData[0]);
for (int i = 0; i < datas.length; i++) {
datas[i].breakpointsChanged(breakpoints);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerInputMementoProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerInputMementoProvider.java
index 672a91ea9..ad707d6a2 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerInputMementoProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointManagerInputMementoProvider.java
@@ -24,6 +24,7 @@ public class BreakpointManagerInputMementoProvider extends DebugElementMementoPr
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.DebugElementMementoProvider#getElementName(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
*/
+ @Override
protected String getElementName(Object element, IPresentationContext context) throws CoreException {
return "BreakpointInputMemento"; //$NON-NLS-1$
}
@@ -31,6 +32,7 @@ public class BreakpointManagerInputMementoProvider extends DebugElementMementoPr
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementMementoProvider#isEqual(java.lang.Object, org.eclipse.ui.IMemento, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
*/
+ @Override
protected boolean supportsContextId(String id) {
return IDebugUIConstants.ID_BREAKPOINT_VIEW.equals(id);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointMementoProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointMementoProvider.java
index ae3cbc083..1b40c721a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointMementoProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointMementoProvider.java
@@ -47,6 +47,7 @@ public class BreakpointMementoProvider extends ElementMementoProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementMementoProvider#encodeElement(java.lang.Object, org.eclipse.ui.IMemento, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
*/
+ @Override
protected boolean encodeElement(Object element, IMemento memento, IPresentationContext context) throws CoreException {
if (element instanceof IBreakpoint) {
@@ -69,6 +70,7 @@ public class BreakpointMementoProvider extends ElementMementoProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementMementoProvider#isEqual(java.lang.Object, org.eclipse.ui.IMemento, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
*/
+ @Override
protected boolean isEqual(Object element, IMemento memento, IPresentationContext context) throws CoreException {
if (element instanceof IBreakpoint) {
IBreakpoint breakpoint =(IBreakpoint)element;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugElementLabelProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugElementLabelProvider.java
index 8dd7a59d3..a34f815d7 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugElementLabelProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugElementLabelProvider.java
@@ -28,6 +28,7 @@ import org.eclipse.swt.graphics.RGB;
*/
public class DebugElementLabelProvider extends ElementLabelProvider {
+ @Override
protected String getLabel(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
Object element = elementPath.getLastSegment();
if (presentationContext instanceof DebugModelPresentationContext) {
@@ -37,6 +38,7 @@ public class DebugElementLabelProvider extends ElementLabelProvider {
return DebugElementHelper.getLabel(element);
}
+ @Override
protected RGB getBackground(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
Object element = elementPath.getLastSegment();
if (presentationContext instanceof DebugModelPresentationContext) {
@@ -46,6 +48,7 @@ public class DebugElementLabelProvider extends ElementLabelProvider {
return DebugElementHelper.getBackground(element);
}
+ @Override
protected FontData getFontData(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
Object element = elementPath.getLastSegment();
if (presentationContext instanceof DebugModelPresentationContext) {
@@ -56,6 +59,7 @@ public class DebugElementLabelProvider extends ElementLabelProvider {
return DebugElementHelper.getFont(element);
}
+ @Override
protected RGB getForeground(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
Object element = elementPath.getLastSegment();
if (presentationContext instanceof DebugModelPresentationContext) {
@@ -65,6 +69,7 @@ public class DebugElementLabelProvider extends ElementLabelProvider {
return DebugElementHelper.getForeground(element);
}
+ @Override
protected ImageDescriptor getImageDescriptor(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
Object element = elementPath.getLastSegment();
if (presentationContext instanceof DebugModelPresentationContext) {
@@ -95,7 +100,8 @@ public class DebugElementLabelProvider extends ElementLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider#requiresUIJob(org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate[])
*/
- protected boolean requiresUIJob(ILabelUpdate[] updates) {
+ @Override
+ protected boolean requiresUIJob(ILabelUpdate[] updates) {
if (updates.length > 0) {
ILabelUpdate update = updates[0];
IPresentationContext context = update.getPresentationContext();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugElementMementoProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugElementMementoProvider.java
index 3340c752b..5f2529c89 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugElementMementoProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugElementMementoProvider.java
@@ -23,6 +23,7 @@ public abstract class DebugElementMementoProvider extends ElementMementoProvider
protected static final String ELEMENT_NAME = "ELEMENT_NAME"; //$NON-NLS-1$
+ @Override
protected boolean encodeElement(Object element, IMemento memento, IPresentationContext context) throws CoreException {
if (supportsContext(context)) {
String name = getElementName(element, context);
@@ -32,6 +33,7 @@ public abstract class DebugElementMementoProvider extends ElementMementoProvider
return false;
}
+ @Override
protected boolean isEqual(Object element, IMemento memento, IPresentationContext context) throws CoreException {
String mementoName = memento.getString(ELEMENT_NAME);
if (mementoName != null) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugTargetContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugTargetContentProvider.java
index 599594503..9ba0d1c77 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugTargetContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/DebugTargetContentProvider.java
@@ -26,6 +26,7 @@ public class DebugTargetContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
+ @Override
protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
String id = context.getId();
if (id.equals(IDebugUIConstants.ID_DEBUG_VIEW))
@@ -42,6 +43,7 @@ public class DebugTargetContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#supportsContextId(java.lang.String)
*/
+ @Override
protected boolean supportsContextId(String id) {
return IDebugUIConstants.ID_DEBUG_VIEW.equals(id) || IDebugUIConstants.ID_MEMORY_VIEW.equals(id);
}
@@ -49,10 +51,12 @@ public class DebugTargetContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
+ @Override
protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
return getElements(getAllChildren(parent, context, monitor), index, length);
}
+ @Override
protected boolean hasChildren(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
String id = context.getId();
if (id.equals(IDebugUIConstants.ID_DEBUG_VIEW))
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementContentProvider.java
index d9c2166ef..115888790 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementContentProvider.java
@@ -33,8 +33,10 @@ public abstract class ElementContentProvider implements IElementContentProvider
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider#updateChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IElementRequestMonitor)
*/
+ @Override
public void update(final IChildrenUpdate[] updates) {
Job job = new Job("children update") { //$NON-NLS-1$
+ @Override
protected IStatus run(IProgressMonitor monitor) {
for (int i = 0; i < updates.length; i++) {
IChildrenUpdate update = updates[i];
@@ -54,8 +56,10 @@ public abstract class ElementContentProvider implements IElementContentProvider
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider#update(org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate)
*/
+ @Override
public void update(final IChildrenCountUpdate[] updates) {
Job job = new Job("child count update") { //$NON-NLS-1$
+ @Override
protected IStatus run(IProgressMonitor monitor) {
for (int i = 0; i < updates.length; i++) {
IChildrenCountUpdate update = updates[i];
@@ -191,8 +195,10 @@ public abstract class ElementContentProvider implements IElementContentProvider
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider#update(org.eclipse.debug.internal.ui.viewers.model.provisional.IHasChildrenUpdate[])
*/
+ @Override
public void update(final IHasChildrenUpdate[] updates) {
Job job = new Job("has children update") { //$NON-NLS-1$
+ @Override
protected IStatus run(IProgressMonitor monitor) {
for (int i = 0; i < updates.length; i++) {
IHasChildrenUpdate update = updates[i];
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementLabelProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementLabelProvider.java
index d35e9219b..35fdefee2 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementLabelProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementLabelProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * Copyright (c) 2006, 2013 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
@@ -70,6 +70,7 @@ public abstract class ElementLabelProvider implements IElementLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
protected IStatus run(IProgressMonitor monitor) {
fUpdater.run();
return Status.OK_STATUS;
@@ -78,6 +79,7 @@ public abstract class ElementLabelProvider implements IElementLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider.ILabelJob#queue(org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate)
*/
+ @Override
public boolean queue(ILabelUpdate[] updates) {
return fUpdater.queue(updates);
}
@@ -85,6 +87,7 @@ public abstract class ElementLabelProvider implements IElementLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.core.runtime.jobs.Job#shouldRun()
*/
+ @Override
public boolean shouldRun() {
return fUpdater.shouldRun();
}
@@ -107,6 +110,7 @@ public abstract class ElementLabelProvider implements IElementLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
public IStatus runInUIThread(IProgressMonitor monitor) {
fUpdater.run();
return Status.OK_STATUS;
@@ -115,6 +119,7 @@ public abstract class ElementLabelProvider implements IElementLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider.ILabelJob#queue(org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate)
*/
+ @Override
public boolean queue(ILabelUpdate[] updates) {
return fUpdater.queue(updates);
}
@@ -122,6 +127,7 @@ public abstract class ElementLabelProvider implements IElementLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.core.runtime.jobs.Job#shouldRun()
*/
+ @Override
public boolean shouldRun() {
return fUpdater.shouldRun();
}
@@ -131,9 +137,8 @@ public abstract class ElementLabelProvider implements IElementLabelProvider {
* Queue of label updates
*/
class LabelUpdater implements Runnable {
-
- LinkedList fQueue = new LinkedList();
-
+ LinkedList<ILabelUpdate> fQueue = new LinkedList<ILabelUpdate>();
+
public synchronized boolean queue(ILabelUpdate[] updates) {
if (fQueue == null) {
return false;
@@ -148,6 +153,7 @@ public abstract class ElementLabelProvider implements IElementLabelProvider {
/* (non-Javadoc)
* @see java.lang.Runnable#run()
*/
+ @Override
public void run() {
ILabelUpdate update = getNextUpdate();
while (update != null) {
@@ -182,7 +188,7 @@ public abstract class ElementLabelProvider implements IElementLabelProvider {
}
ILabelUpdate update = null;
try {
- update = (ILabelUpdate) fQueue.removeFirst();
+ update = fQueue.removeFirst();
} catch (NoSuchElementException e) {
fQueue = null;
}
@@ -345,7 +351,8 @@ public abstract class ElementLabelProvider implements IElementLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementLabelProvider#update(org.eclipse.debug.internal.ui.viewers.model.provisional.ILabelUpdate[])
*/
- public synchronized void update(ILabelUpdate[] updates) {
+ @Override
+ public synchronized void update(ILabelUpdate[] updates) {
if (fLabelJob == null) {
fLabelJob = newLabelJob(updates);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementMementoProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementMementoProvider.java
index 536fb5b18..592384413 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementMementoProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ElementMementoProvider.java
@@ -30,8 +30,10 @@ public abstract class ElementMementoProvider implements IElementMementoProvider
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider#compareElements(org.eclipse.debug.internal.ui.viewers.model.provisional.IElementCompareRequest[])
*/
+ @Override
public void compareElements(final IElementCompareRequest[] requests) {
Job job = new Job("compare element") { //$NON-NLS-1$
+ @Override
protected IStatus run(IProgressMonitor monitor) {
for (int i = 0; i < requests.length; i++) {
IElementCompareRequest request = requests[i];
@@ -63,8 +65,10 @@ public abstract class ElementMementoProvider implements IElementMementoProvider
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoProvider#encodeElements(org.eclipse.debug.internal.ui.viewers.model.provisional.IElementMementoRequest[])
*/
+ @Override
public void encodeElements(final IElementMementoRequest[] requests) {
Job job = new Job("encode element") { //$NON-NLS-1$
+ @Override
protected IStatus run(IProgressMonitor monitor) {
for (int i = 0; i < requests.length; i++) {
IElementMementoRequest request = requests[i];
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionContentProvider.java
index ab6e841d0..6b5730216 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionContentProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2012 IBM Corporation and others.
+ * Copyright (c) 2006, 2013 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
@@ -7,13 +7,12 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
- * Wind Rvier Systems - added support for columns (bug 235646)
+ * Wind River Systems - added support for columns (bug 235646)
*******************************************************************************/
package org.eclipse.debug.internal.ui.model.elements;
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
@@ -56,7 +55,8 @@ public class ExpressionContentProvider extends VariableContentProvider {
private final String fMessage;
- public void update(ILabelUpdate[] updates) {
+ @Override
+ public void update(ILabelUpdate[] updates) {
for (int i = 0; i < updates.length; i++) {
String[] columnIds = updates[i].getColumnIds();
if (columnIds == null) {
@@ -86,60 +86,60 @@ public class ExpressionContentProvider extends VariableContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#update(org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenCountUpdate[])
*/
+ @Override
public void update(IChildrenCountUpdate[] updates) {
// See if we can delegate to a model specific content provider
- Map delegateMap = new HashMap();
- List notDelegated = new ArrayList();
+ Map<IElementContentProvider, List<IViewerUpdate>> delegateMap = new HashMap<IElementContentProvider, List<IViewerUpdate>>();
+ List<IViewerUpdate> notDelegated = new ArrayList<IViewerUpdate>();
findDelegates(delegateMap, notDelegated, updates);
// Batch the updates and send them to the delegates
- for (Iterator iterator = delegateMap.keySet().iterator(); iterator.hasNext();) {
- IElementContentProvider delegate = (IElementContentProvider) iterator.next();
- List updateList = (List)delegateMap.get(delegate);
- delegate.update((IChildrenCountUpdate[])updateList.toArray(new IChildrenCountUpdate[updateList.size()]));
+ for (IElementContentProvider delegate : delegateMap.keySet()) {
+ List<IViewerUpdate> updateList = delegateMap.get(delegate);
+ delegate.update(updateList.toArray(new IChildrenCountUpdate[updateList.size()]));
}
if (notDelegated.size() > 0){
- super.update((IChildrenCountUpdate[])notDelegated.toArray(new IChildrenCountUpdate[notDelegated.size()]));
+ super.update(notDelegated.toArray(new IChildrenCountUpdate[notDelegated.size()]));
}
}
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#update(org.eclipse.debug.internal.ui.viewers.model.provisional.IHasChildrenUpdate[])
*/
+ @Override
public void update(IHasChildrenUpdate[] updates) {
// See if we can delegate to a model specific content provider
- Map delegateMap = new HashMap();
- List notDelegated = new ArrayList();
+ Map<IElementContentProvider, List<IViewerUpdate>> delegateMap = new HashMap<IElementContentProvider, List<IViewerUpdate>>();
+ List<IViewerUpdate> notDelegated = new ArrayList<IViewerUpdate>();
findDelegates(delegateMap, notDelegated, updates);
// Batch the updates and send them to the delegates
- for (Iterator iterator = delegateMap.keySet().iterator(); iterator.hasNext();) {
- IElementContentProvider delegate = (IElementContentProvider) iterator.next();
- List updateList = (List)delegateMap.get(delegate);
- delegate.update((IHasChildrenUpdate[])updateList.toArray(new IHasChildrenUpdate[updateList.size()]));
+ for (IElementContentProvider delegate : delegateMap.keySet()) {
+ List<IViewerUpdate> updateList = delegateMap.get(delegate);
+ delegate.update(updateList.toArray(new IHasChildrenUpdate[updateList.size()]));
}
if (notDelegated.size() > 0){
- super.update((IHasChildrenUpdate[])notDelegated.toArray(new IHasChildrenUpdate[notDelegated.size()]));
+ super.update(notDelegated.toArray(new IHasChildrenUpdate[notDelegated.size()]));
}
}
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#update(org.eclipse.debug.internal.ui.viewers.model.provisional.IChildrenUpdate[])
*/
+ @Override
public void update(IChildrenUpdate[] updates) {
// See if we can delegate to a model specific content provider
- Map delegateMap = new HashMap();
- List notDelegated = new ArrayList();
+ Map<IElementContentProvider, List<IViewerUpdate>> delegateMap = new HashMap<IElementContentProvider, List<IViewerUpdate>>();
+ List<IViewerUpdate> notDelegated = new ArrayList<IViewerUpdate>();
findDelegates(delegateMap, notDelegated, updates);
// Batch the updates and send them to the delegates
- for (Iterator iterator = delegateMap.keySet().iterator(); iterator.hasNext();) {
- IElementContentProvider delegate = (IElementContentProvider) iterator.next();
- List updateList = (List)delegateMap.get(delegate);
- delegate.update((IChildrenUpdate[])updateList.toArray(new IChildrenUpdate[updateList.size()]));
+ for (IElementContentProvider delegate : delegateMap.keySet()) {
+ List<IViewerUpdate> updateList = delegateMap.get(delegate);
+ delegate.update(updateList.toArray(new IChildrenUpdate[updateList.size()]));
}
if (notDelegated.size() > 0){
- super.update((IChildrenUpdate[])notDelegated.toArray(new IChildrenUpdate[notDelegated.size()]));
+ super.update(notDelegated.toArray(new IChildrenUpdate[notDelegated.size()]));
}
}
@@ -153,14 +153,14 @@ public class ExpressionContentProvider extends VariableContentProvider {
* @param updates array of updates that can be handled by delegates
* @since 3.4
*/
- private void findDelegates(Map delegateMap, List notDelegated, IViewerUpdate[] updates){
+ private void findDelegates(Map<IElementContentProvider, List<IViewerUpdate>> delegateMap, List<IViewerUpdate> notDelegated, IViewerUpdate[] updates) {
for (int i = 0; i < updates.length; i++) {
if (updates[i] instanceof ViewerUpdateMonitor && !((ViewerUpdateMonitor)updates[i]).isDelegated() && updates[i].getElement() instanceof IExpression){
IElementContentProvider delegate = ViewerAdapterService.getContentProvider(((IExpression)updates[i].getElement()).getValue());
if (delegate != null){
- List updateList = (List)delegateMap.get(delegate);
+ List<IViewerUpdate> updateList = delegateMap.get(delegate);
if (updateList == null){
- updateList = new ArrayList();
+ updateList = new ArrayList<IViewerUpdate>();
delegateMap.put(delegate, updateList);
}
((ViewerUpdateMonitor)updates[i]).setDelegated(true);
@@ -173,12 +173,13 @@ public class ExpressionContentProvider extends VariableContentProvider {
}
+ @Override
protected Object[] getAllChildren(Object parent, IPresentationContext context) throws CoreException {
if (parent instanceof IErrorReportingExpression) {
IErrorReportingExpression expression = (IErrorReportingExpression) parent;
if (expression.hasErrors()) {
String[] messages = expression.getErrorMessages();
- LinkedHashSet set = new LinkedHashSet(messages.length);
+ LinkedHashSet<ErrorMessageElement> set = new LinkedHashSet<ErrorMessageElement>(messages.length);
for (int i = 0; i < messages.length; i++) {
set.add(new ErrorMessageElement(messages[i]));
}
@@ -195,6 +196,7 @@ public class ExpressionContentProvider extends VariableContentProvider {
return EMPTY;
}
+ @Override
protected boolean hasChildren(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
if (element instanceof IErrorReportingExpression) {
IErrorReportingExpression expression = (IErrorReportingExpression) element;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionLabelProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionLabelProvider.java
index 9e0a2e748..d0a17e81e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionLabelProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionLabelProvider.java
@@ -30,6 +30,7 @@ public class ExpressionLabelProvider extends VariableLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.VariableLabelProvider#getForeground(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String)
*/
+ @Override
protected RGB getForeground(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
Object element = elementPath.getLastSegment();
if (element instanceof IErrorReportingExpression) {
@@ -43,7 +44,8 @@ public class ExpressionLabelProvider extends VariableLabelProvider {
return super.getForeground(elementPath, presentationContext, columnId);
}
- protected String getLabel(TreePath elementPath, IPresentationContext context, String columnId) throws CoreException {
+ @Override
+protected String getLabel(TreePath elementPath, IPresentationContext context, String columnId) throws CoreException {
if (columnId == null) {
return super.getLabel(elementPath, context, columnId);
} else {
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 629d83ca7..08ad0d331 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
@@ -50,7 +50,8 @@ public class ExpressionManagerContentProvider extends ElementContentProvider {
*/
private static class AddNewExpressionElement implements IElementLabelProvider, IElementEditor, ICellModifier {
- public void update(ILabelUpdate[] updates) {
+ @Override
+ public void update(ILabelUpdate[] updates) {
for (int i = 0; i < updates.length; i++) {
String[] columnIds = updates[i].getColumnIds();
if (columnIds == null) {
@@ -69,7 +70,8 @@ public class ExpressionManagerContentProvider extends ElementContentProvider {
}
}
- private void updateLabel(ILabelUpdate update, int columnIndex) {
+ @SuppressWarnings("deprecation")
+ private void updateLabel(ILabelUpdate update, int columnIndex) {
update.setLabel(DebugUIMessages.ExpressionManagerContentProvider_1, columnIndex);
update.setImageDescriptor(DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_LCL_MONITOR_EXPRESSION), columnIndex);
@@ -80,23 +82,28 @@ public class ExpressionManagerContentProvider extends ElementContentProvider {
update.setFontData(fontData, columnIndex);
}
- public CellEditor getCellEditor(IPresentationContext context, String columnId, Object element, Composite parent) {
+ @Override
+ public CellEditor getCellEditor(IPresentationContext context, String columnId, Object element, Composite parent) {
return new TextCellEditor(parent);
}
- public ICellModifier getCellModifier(IPresentationContext context, Object element) {
+ @Override
+ public ICellModifier getCellModifier(IPresentationContext context, Object element) {
return this;
}
- public boolean canModify(Object element, String property) {
+ @Override
+ public boolean canModify(Object element, String property) {
return (IDebugUIConstants.COLUMN_ID_VARIABLE_NAME.equals(property));
}
- public Object getValue(Object element, String property) {
+ @Override
+ public Object getValue(Object element, String property) {
return IInternalDebugCoreConstants.EMPTY_STRING;
}
- public void modify(Object element, String property, Object value) {
+ @Override
+ public void modify(Object element, String property, Object value) {
// If an expression is entered, add a new watch expression to the
// manager.
if (value instanceof String &&
@@ -128,6 +135,7 @@ public class ExpressionManagerContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
+ @Override
protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
// Add the "Add new expression" element only if columns are displayed.
return ((IExpressionManager) element).getExpressions().length +
@@ -137,6 +145,7 @@ public class ExpressionManagerContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
+ @Override
protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
if (context.getColumns() != null) {
return getElements(((IExpressionManager) parent).getExpressions(), ADD_NEW_EXPRESSION_ELEMENT, index, length);
@@ -173,6 +182,7 @@ public class ExpressionManagerContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#supportsContextId(java.lang.String)
*/
+ @Override
protected boolean supportsContextId(String id) {
return id.equals(IDebugUIConstants.ID_EXPRESSION_VIEW);
}
@@ -180,6 +190,7 @@ public class ExpressionManagerContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#hasChildren(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
*/
+ @Override
protected boolean hasChildren(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
return true;
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionManagerMementoProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionManagerMementoProvider.java
index 8c4194adc..3130cd85f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionManagerMementoProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionManagerMementoProvider.java
@@ -26,6 +26,7 @@ public class ExpressionManagerMementoProvider extends DebugElementMementoProvide
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.DebugElementMementoProvider#getElementName(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
*/
+ @Override
protected String getElementName(Object element, IPresentationContext context) throws CoreException {
if (element instanceof IExpressionManager) {
return EXP_MGR;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionMementoProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionMementoProvider.java
index 6bb4fe271..edb12339e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionMementoProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ExpressionMementoProvider.java
@@ -24,6 +24,7 @@ public class ExpressionMementoProvider extends DebugElementMementoProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.DebugElementMementoProvider#getElementName(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
*/
+ @Override
protected String getElementName(Object element, IPresentationContext context) throws CoreException {
if (element instanceof IExpression) {
return ((IExpression) element).getExpressionText();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/LaunchContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/LaunchContentProvider.java
index c350078b5..98caaa296 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/LaunchContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/LaunchContentProvider.java
@@ -24,6 +24,7 @@ public class LaunchContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
+ @Override
protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
return ((ILaunch)element).getChildren().length;
}
@@ -31,6 +32,7 @@ public class LaunchContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#supportsContextId(java.lang.String)
*/
+ @Override
protected boolean supportsContextId(String id) {
return IDebugUIConstants.ID_DEBUG_VIEW.equals(id);
}
@@ -38,10 +40,12 @@ public class LaunchContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
+ @Override
protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
return getElements(((ILaunch)parent).getChildren(), index, length);
}
+ @Override
protected boolean hasChildren(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
return ((ILaunch)element).hasChildren();
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/LaunchManagerContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/LaunchManagerContentProvider.java
index 81883a39b..d89e4da31 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/LaunchManagerContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/LaunchManagerContentProvider.java
@@ -24,6 +24,7 @@ public class LaunchManagerContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
+ @Override
protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
return ((ILaunchManager)element).getLaunches().length;
}
@@ -31,6 +32,7 @@ public class LaunchManagerContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#supportsContextId(java.lang.String)
*/
+ @Override
protected boolean supportsContextId(String id) {
return IDebugUIConstants.ID_DEBUG_VIEW.equals(id);
}
@@ -38,6 +40,7 @@ public class LaunchManagerContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
+ @Override
protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
return getElements(((ILaunchManager)parent).getLaunches(),index, length);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryBlockContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryBlockContentProvider.java
index bb4008fd5..7c30ea758 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryBlockContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryBlockContentProvider.java
@@ -30,17 +30,20 @@ import org.eclipse.debug.ui.IDebugUIConstants;
*/
public class MemoryBlockContentProvider extends ElementContentProvider {
+ @Override
protected int getChildCount(Object element, IPresentationContext context,
IViewerUpdate monitor) throws CoreException {
return 0;
}
+ @Override
protected Object[] getChildren(Object parent, int index, int length,
IPresentationContext context, IViewerUpdate monitor)
throws CoreException {
return EMPTY;
}
+ @Override
protected boolean supportsContextId(String id) {
if (id.equals(IDebugUIConstants.ID_MEMORY_VIEW))
return true;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryBlockLabelProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryBlockLabelProvider.java
index 91233a4d4..bd80f6d09 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryBlockLabelProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryBlockLabelProvider.java
@@ -21,6 +21,7 @@ import org.eclipse.jface.viewers.TreePath;
public class MemoryBlockLabelProvider extends DebugElementLabelProvider {
+ @Override
protected String getLabel(TreePath elementPath,
IPresentationContext presentationContext, String columnId)
throws CoreException {
@@ -32,6 +33,7 @@ public class MemoryBlockLabelProvider extends DebugElementLabelProvider {
return super.getLabel(elementPath, presentationContext, columnId);
}
+ @Override
protected ImageDescriptor getImageDescriptor(TreePath elementPath,
IPresentationContext presentationContext, String columnId)
throws CoreException {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryRetrievalContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryRetrievalContentProvider.java
index fc38de376..ab0c12b5e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryRetrievalContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryRetrievalContentProvider.java
@@ -19,11 +19,13 @@ import org.eclipse.debug.ui.IDebugUIConstants;
public class MemoryRetrievalContentProvider extends ElementContentProvider {
+ @Override
protected int getChildCount(Object element, IPresentationContext context,
IViewerUpdate monitor) throws CoreException {
return getAllChildren(element, context, monitor).length;
}
+ @Override
protected Object[] getChildren(Object parent, int index, int length,
IPresentationContext context, IViewerUpdate monitor)
throws CoreException {
@@ -53,6 +55,7 @@ public class MemoryRetrievalContentProvider extends ElementContentProvider {
return EMPTY;
}
+ @Override
protected boolean supportsContextId(String id) {
return id.equals(IDebugUIConstants.ID_MEMORY_VIEW);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryViewElementMementoProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryViewElementMementoProvider.java
index ca4727c53..a71f468d6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryViewElementMementoProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/MemoryViewElementMementoProvider.java
@@ -21,6 +21,7 @@ public class MemoryViewElementMementoProvider extends ElementMementoProvider {
private static final String OBJECT_ID = "OBJECT_ID"; //$NON-NLS-1$
+ @Override
protected boolean encodeElement(Object element, IMemento memento,
IPresentationContext context) throws CoreException {
String id = context.getId();
@@ -35,6 +36,7 @@ public class MemoryViewElementMementoProvider extends ElementMementoProvider {
return false;
}
+ @Override
protected boolean isEqual(Object element, IMemento memento,
IPresentationContext context) throws CoreException {
String id = context.getId();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ProcessContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ProcessContentProvider.java
index 7b25c8dfd..d8b62d646 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ProcessContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ProcessContentProvider.java
@@ -26,6 +26,7 @@ public class ProcessContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
*/
+ @Override
protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) {
return EMPTY;
}
@@ -33,6 +34,7 @@ public class ProcessContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
*/
+ @Override
protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) {
return 0;
}
@@ -40,6 +42,7 @@ public class ProcessContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#supportsContextId(java.lang.String)
*/
+ @Override
protected boolean supportsContextId(String id) {
return IDebugUIConstants.ID_DEBUG_VIEW.equals(id);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/RegisterGroupContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/RegisterGroupContentProvider.java
index 8d3016462..ede5a6ccf 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/RegisterGroupContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/RegisterGroupContentProvider.java
@@ -23,18 +23,22 @@ import org.eclipse.debug.ui.IDebugUIConstants;
*/
public class RegisterGroupContentProvider extends ElementContentProvider {
+ @Override
protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
return ((IRegisterGroup)element).getRegisters().length;
}
+ @Override
protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
return getElements(((IRegisterGroup)parent).getRegisters(), index, length);
}
+ @Override
protected boolean hasChildren(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
return ((IRegisterGroup)element).hasRegisters();
}
+ @Override
protected boolean supportsContextId(String id) {
return IDebugUIConstants.ID_REGISTER_VIEW.equals(id);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/RegisterGroupLabelProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/RegisterGroupLabelProvider.java
index c6ec98748..79ffd45b6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/RegisterGroupLabelProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/RegisterGroupLabelProvider.java
@@ -25,6 +25,7 @@ public class RegisterGroupLabelProvider extends DebugElementLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.DebugElementLabelProvider#getImageDescriptor(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String)
*/
+ @Override
protected ImageDescriptor getImageDescriptor(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
if (columnId == null || IDebugUIConstants.COLUMN_ID_VARIABLE_NAME.equals(columnId)) {
return super.getImageDescriptor(elementPath, presentationContext, columnId);
@@ -35,6 +36,7 @@ public class RegisterGroupLabelProvider extends DebugElementLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.DebugElementLabelProvider#getLabel(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String)
*/
+ @Override
protected String getLabel(TreePath elementPath, IPresentationContext context, String columnId) throws CoreException {
if (columnId == null || IDebugUIConstants.COLUMN_ID_VARIABLE_NAME.equals(columnId)) {
return super.getLabel(elementPath, context, columnId);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/RegisterGroupMementoProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/RegisterGroupMementoProvider.java
index 9d2f9401e..31a5bf5ac 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/RegisterGroupMementoProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/RegisterGroupMementoProvider.java
@@ -24,6 +24,7 @@ public class RegisterGroupMementoProvider extends DebugElementMementoProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.DebugElementMementoProvider#getElementName(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
*/
+ @Override
protected String getElementName(Object element, IPresentationContext context) throws CoreException {
if (element instanceof IRegisterGroup) {
return ((IRegisterGroup) element).getName();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/StackFrameContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/StackFrameContentProvider.java
index 61ce7cef0..d47b283fa 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/StackFrameContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/StackFrameContentProvider.java
@@ -24,6 +24,7 @@ public class StackFrameContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
+ @Override
protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
return getAllChildren(element, context, monitor).length;
}
@@ -31,6 +32,7 @@ public class StackFrameContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
+ @Override
protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
return getElements(getAllChildren(parent, context, monitor), index, length);
}
@@ -61,6 +63,7 @@ public class StackFrameContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#supportsContextId(java.lang.String)
*/
+ @Override
protected boolean supportsContextId(String id) {
return id.equals(IDebugUIConstants.ID_VARIABLE_VIEW) || id.equals(IDebugUIConstants.ID_REGISTER_VIEW);
}
@@ -68,6 +71,7 @@ public class StackFrameContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#hasChildren(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
protected boolean hasChildren(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
String id = context.getId();
IStackFrame frame = (IStackFrame) element;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/StackFrameMementoProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/StackFrameMementoProvider.java
index 450ce046c..0f3c9efd4 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/StackFrameMementoProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/StackFrameMementoProvider.java
@@ -25,6 +25,7 @@ public class StackFrameMementoProvider extends DebugElementMementoProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.DebugElementMementoProvider#getElementName(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
*/
+ @Override
protected String getElementName(Object element, IPresentationContext context) throws CoreException {
if (element instanceof IStackFrame) {
IStackFrame frame = (IStackFrame) element;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ThreadContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ThreadContentProvider.java
index dd99e6650..5aa59f87a 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ThreadContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ThreadContentProvider.java
@@ -24,6 +24,7 @@ public class ThreadContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
+ @Override
protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
return ((IThread)element).getStackFrames().length;
}
@@ -31,6 +32,7 @@ public class ThreadContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#supportsContextId(java.lang.String)
*/
+ @Override
protected boolean supportsContextId(String id) {
return IDebugUIConstants.ID_DEBUG_VIEW.equals(id);
}
@@ -38,10 +40,12 @@ public class ThreadContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
+ @Override
protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
return getElements(((IThread)parent).getStackFrames(), index, length);
}
+ @Override
protected boolean hasChildren(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
return ((IThread)element).hasStackFrames();
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableContentProvider.java
index 8c050f792..62667824d 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableContentProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableContentProvider.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 IBM Corporation and others.
+ * Copyright (c) 2006, 2013 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
@@ -44,6 +44,7 @@ public class VariableContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
+ @Override
protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
return getAllChildren(element, context).length;
}
@@ -51,6 +52,7 @@ public class VariableContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext)
*/
+ @Override
protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
return getElements(getAllChildren(parent, context), index, length);
}
@@ -58,6 +60,7 @@ public class VariableContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#hasChildren(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
*/
+ @Override
protected boolean hasChildren(Object element, IPresentationContext context, IViewerUpdate monitor) throws CoreException {
return ((IVariable)element).getValue().hasVariables();
}
@@ -65,6 +68,7 @@ public class VariableContentProvider extends ElementContentProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#supportsContextId(java.lang.String)
*/
+ @Override
protected boolean supportsContextId(String id) {
return id.equals(IDebugUIConstants.ID_EXPRESSION_VIEW) || id.equals(IDebugUIConstants.ID_VARIABLE_VIEW) || id.equals(IDebugUIConstants.ID_REGISTER_VIEW);
}
@@ -117,7 +121,7 @@ public class VariableContentProvider extends ElementContentProvider {
* @return logical value for the raw value
*/
protected IValue getLogicalValue(IValue value, IPresentationContext context) throws CoreException {
- return getLogicalValue(value, new ArrayList(), context);
+ return getLogicalValue(value, new ArrayList<String>(), context);
}
/**
@@ -212,7 +216,7 @@ public class VariableContentProvider extends ElementContentProvider {
* Callers should always pass in a new, empty list.
* @return logical value if one is calculated, otherwise the raw value is returned
*/
- protected IValue getLogicalValue(IValue value, List previousStructureIds, IPresentationContext context) throws CoreException {
+ protected IValue getLogicalValue(IValue value, List<String> previousStructureIds, IPresentationContext context) throws CoreException {
if (isShowLogicalStructure(context)) {
ILogicalStructureType[] types = DebugPlugin.getLogicalStructureTypes(value);
if (types.length > 0) {
@@ -239,6 +243,7 @@ public class VariableContentProvider extends ElementContentProvider {
fgLogicalCache = new LogicalStructureCache();
// Add a listener to clear the cache when resuming, terminating, or suspending
DebugPlugin.getDefault().addDebugEventListener(new IDebugEventSetListener(){
+ @Override
public void handleDebugEvents(DebugEvent[] events) {
for (int i = 0; i < events.length; i++) {
if (events[i].getKind() == DebugEvent.TERMINATE){
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableEditor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableEditor.java
index b886d20ed..49911d35b 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableEditor.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableEditor.java
@@ -26,6 +26,7 @@ public class VariableEditor implements IElementEditor {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementEditor#getCellEditor(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String, java.lang.Object, org.eclipse.swt.widgets.Composite)
*/
+ @Override
public CellEditor getCellEditor(IPresentationContext context, String columnId, Object element, Composite parent) {
return new TextCellEditor(parent);
}
@@ -33,6 +34,7 @@ public class VariableEditor implements IElementEditor {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementEditor#getCellModifier(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.Object)
*/
+ @Override
public ICellModifier getCellModifier(IPresentationContext context, Object element) {
return new DefaultVariableCellModifier();
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableLabelProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableLabelProvider.java
index 98fba8aa8..3e425b4d4 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableLabelProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableLabelProvider.java
@@ -33,6 +33,7 @@ public class VariableLabelProvider extends DebugElementLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.DebugElementLabelProvider#getBackground(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String)
*/
+ @Override
protected RGB getBackground(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
Object element = elementPath.getLastSegment();
if (columnId != null) {
@@ -49,6 +50,7 @@ public class VariableLabelProvider extends DebugElementLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.DebugElementLabelProvider#getForeground(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String)
*/
+ @Override
protected RGB getForeground(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
Object element = elementPath.getLastSegment();
if (columnId == null) {
@@ -65,6 +67,7 @@ public class VariableLabelProvider extends DebugElementLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.DebugElementLabelProvider#getImageDescriptor(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String)
*/
+ @Override
protected ImageDescriptor getImageDescriptor(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
if (columnId == null || IDebugUIConstants.COLUMN_ID_VARIABLE_NAME.equals(columnId)) {
return super.getImageDescriptor(elementPath, presentationContext, columnId);
@@ -75,6 +78,7 @@ public class VariableLabelProvider extends DebugElementLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.DebugElementLabelProvider#getFontData(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String)
*/
+ @Override
protected FontData getFontData(TreePath elementPath, IPresentationContext presentationContext, String columnId) throws CoreException {
return JFaceResources.getFontDescriptor(IDebugUIConstants.PREF_VARIABLE_TEXT_FONT).getFontData()[0];
}
@@ -82,6 +86,7 @@ public class VariableLabelProvider extends DebugElementLabelProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.DebugElementLabelProvider#getLabel(org.eclipse.jface.viewers.TreePath, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String)
*/
+ @Override
protected String getLabel(TreePath elementPath, IPresentationContext context, String columnId) throws CoreException {
if (columnId == null) {
return super.getLabel(elementPath, context, columnId);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableMementoProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableMementoProvider.java
index f64ff8b7a..42a1b9c95 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableMementoProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/VariableMementoProvider.java
@@ -24,6 +24,7 @@ public class VariableMementoProvider extends DebugElementMementoProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.model.elements.DebugElementMementoProvider#getElementName(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext)
*/
+ @Override
protected String getElementName(Object element, IPresentationContext context) throws CoreException {
if (element instanceof IVariable) {
return ((IVariable) element).getName();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ViewerInputProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ViewerInputProvider.java
index d974a0fc3..92ce722a4 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ViewerInputProvider.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ViewerInputProvider.java
@@ -33,8 +33,10 @@ public abstract class ViewerInputProvider implements IViewerInputProvider {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider#updateChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IElementRequestMonitor)
*/
+ @Override
public void update(final IViewerInputUpdate update) {
Job job = new Job("viewer input resolution") { //$NON-NLS-1$
+ @Override
protected IStatus run(IProgressMonitor monitor) {
if (!update.isCanceled()) {
retrieveInput(update);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/WatchExpressionEditor.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/WatchExpressionEditor.java
index 88c329e71..d54ad21ba 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/WatchExpressionEditor.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/WatchExpressionEditor.java
@@ -26,6 +26,7 @@ public class WatchExpressionEditor implements IElementEditor {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementEditor#getCellEditor(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.String, java.lang.Object, org.eclipse.swt.widgets.Composite)
*/
+ @Override
public CellEditor getCellEditor(IPresentationContext context, String columnId, Object element, Composite parent) {
return new TextCellEditor(parent);
}
@@ -33,6 +34,7 @@ public class WatchExpressionEditor implements IElementEditor {
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.model.provisional.IElementEditor#getCellModifier(org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, java.lang.Object)
*/
+ @Override
public ICellModifier getCellModifier(IPresentationContext context, Object element) {
return new WatchExpressionCellModifier();
}

Back to the top