Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2020-06-05 16:22:52 +0000
committerLars Vogel2020-06-07 11:35:18 +0000
commita06f5209e64e878bb7b5a6f849239d0bca0a273a (patch)
tree306ea0df1255f7644a9135da35f832273a60b496 /org.eclipse.debug.ui
parent74e65d674a3f41350f8fef6aaa0d4479133389fd (diff)
downloadeclipse.platform.debug-a06f5209e64e878bb7b5a6f849239d0bca0a273a.tar.gz
eclipse.platform.debug-a06f5209e64e878bb7b5a6f849239d0bca0a273a.tar.xz
eclipse.platform.debug-a06f5209e64e878bb7b5a6f849239d0bca0a273a.zip
Using ArrayContentProvider.getInstance() instead of new instance
ArrayContentProvider does not hold any data, hence it can be shared across instances. Change-Id: Ib12140bfad3bcec6596640a0227400520e9b20f1 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
Diffstat (limited to 'org.eclipse.debug.ui')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchersPreferencePage.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/RunDebugPropertiesPage.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java2
3 files changed, 3 insertions, 3 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchersPreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchersPreferencePage.java
index cc9fbc128..fb67ff250 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchersPreferencePage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchersPreferencePage.java
@@ -221,7 +221,7 @@ public class LaunchersPreferencePage extends PreferencePage implements IWorkbenc
fTableViewer = new CheckboxTableViewer(table);
fTableViewer.setComparator(new WorkbenchViewerComparator());
fTableViewer.setLabelProvider(new LabelProvider());
- fTableViewer.setContentProvider(new ArrayContentProvider());
+ fTableViewer.setContentProvider(ArrayContentProvider.getInstance());
fTableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/RunDebugPropertiesPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/RunDebugPropertiesPage.java
index 4ccd13514..e730eeb71 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/RunDebugPropertiesPage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/RunDebugPropertiesPage.java
@@ -177,7 +177,7 @@ public class RunDebugPropertiesPage extends PropertyPage {
protected TableViewer createViewer(Composite parent){
TableViewer viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.BORDER);
viewer.setLabelProvider(new DefaultLabelProvider());
- viewer.setContentProvider(new ArrayContentProvider());
+ viewer.setContentProvider(ArrayContentProvider.getInstance());
viewer.setComparator(new LaunchConfigurationComparator());
Table builderTable = viewer.getTable();
GridData tableGridData = new GridData(GridData.FILL_BOTH);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java
index dbfb44d1c..9bd1776c2 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java
@@ -100,7 +100,7 @@ public class AddSourceContainerDialog extends TitleAreaDialog {
});
fViewer.setLabelProvider(new SourceContainerLabelProvider());
- fViewer.setContentProvider(new ArrayContentProvider());
+ fViewer.setContentProvider(ArrayContentProvider.getInstance());
fViewer.setComparator(new ViewerComparator());
fViewer.addSelectionChangedListener(new ISelectionChangedListener() {
@Override

Back to the top