From d292d014fed3ec588ec26be7790191ab642ee84d Mon Sep 17 00:00:00 2001 From: Lars Vogel Date: Thu, 31 Mar 2016 10:19:12 +0200 Subject: Bug 490755 - Take advantage of default methods from IContentProvider in org.eclipse.debug.ui Change-Id: I4b58b82b79901c71c3c4739254cb7f64809530c2 Signed-off-by: Lars Vogel --- .../breakpointGroups/GroupBreakpointsByDialog.java | 9 ++------- .../ExportLaunchConfigurationsWizardPage.java | 9 ++------- .../LaunchConfigurationTreeContentProvider.java | 18 ++---------------- .../preferences/LaunchPerspectivePreferencePage.java | 8 ++------ .../ui/preferences/LaunchersPreferencePage.java | 8 ++------ .../sourcelookup/BasicContainerContentProvider.java | 19 ++----------------- .../ui/sourcelookup/SourceContainerViewer.java | 19 ++----------------- 7 files changed, 14 insertions(+), 76 deletions(-) (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug') diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByDialog.java index 19adea573..f29ae9992 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2013 IBM Corporation and others. + * Copyright (c) 2004, 2016 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,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Lars Vogel - Bug 490755 *******************************************************************************/ package org.eclipse.debug.internal.ui.actions.breakpointGroups; @@ -494,12 +495,6 @@ public class GroupBreakpointsByDialog extends TrayDialog { } return new Object[0]; } - @Override - public void dispose() { - } - @Override - public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { - } } /** diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java index c5c25cbd8..28f9faf39 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2015 IBM Corporation and others. + * Copyright (c) 2007, 2016 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,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Lars Vogel - Bug 490755 *******************************************************************************/ package org.eclipse.debug.internal.ui.importexport.launchconfigurations; @@ -46,7 +47,6 @@ import org.eclipse.jface.viewers.CheckStateChangedEvent; import org.eclipse.jface.viewers.CheckboxTreeViewer; import org.eclipse.jface.viewers.ICheckStateListener; import org.eclipse.jface.viewers.ITreeContentProvider; -import org.eclipse.jface.viewers.Viewer; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.swt.SWT; import org.eclipse.swt.events.ModifyEvent; @@ -112,11 +112,6 @@ public class ExportLaunchConfigurationsWizardPage extends WizardPage { public Object[] getElements(Object inputElement) { return lm.getLaunchConfigurationTypes(); } - @Override - public void dispose() {lm = null;} - @Override - public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {} - } private String OVERWRITE = "overwrite"; //$NON-NLS-1$ private String OLD_PATH = "oldpath"; //$NON-NLS-1$ diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTreeContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTreeContentProvider.java index 2d9415b6f..3eb95a87a 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTreeContentProvider.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationTreeContentProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2013 IBM Corporation and others. + * Copyright (c) 2000, 2016 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,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Lars Vogel - Bug 490755 *******************************************************************************/ package org.eclipse.debug.internal.ui.launchConfigurations; @@ -22,7 +23,6 @@ import org.eclipse.debug.core.ILaunchConfigurationType; import org.eclipse.debug.core.ILaunchManager; import org.eclipse.debug.internal.ui.DebugUIPlugin; import org.eclipse.jface.viewers.ITreeContentProvider; -import org.eclipse.jface.viewers.Viewer; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.activities.WorkbenchActivityHelper; @@ -153,20 +153,6 @@ public class LaunchConfigurationTreeContentProvider implements ITreeContentProvi } return filteredTypes; } - - /* (non-Javadoc) - * @see org.eclipse.jface.viewers.IContentProvider#dispose() - */ - @Override - public void dispose() { - } - - /* (non-Javadoc) - * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object) - */ - @Override - public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { - } /** * Return true if the specified launch configuration type should diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchPerspectivePreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchPerspectivePreferencePage.java index abfa8367b..4c6f21563 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchPerspectivePreferencePage.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchPerspectivePreferencePage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2014 IBM Corporation and others. + * Copyright (c) 2006, 2016 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,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Lars Vogel - Bug 490755 *******************************************************************************/ package org.eclipse.debug.internal.ui.preferences; @@ -46,7 +47,6 @@ import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TreeViewer; -import org.eclipse.jface.viewers.Viewer; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; @@ -145,10 +145,6 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I public boolean hasChildren(Object element) {return element instanceof ILaunchConfigurationType;} @Override public Object getParent(Object element) {return null;} - @Override - public void dispose() {} - @Override - public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {} } /** 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 b45909497..cd0e146cd 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2009 IBM Corporation and others. + * Copyright (c) 2006, 2016 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,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Lars Vogel - Bug 490755 *******************************************************************************/ package org.eclipse.debug.internal.ui.preferences; @@ -38,7 +39,6 @@ import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TreeViewer; -import org.eclipse.jface.viewers.Viewer; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; @@ -138,10 +138,6 @@ public class LaunchersPreferencePage extends PreferencePage implements IWorkbenc } @Override public Object getParent(Object element) {return null;} - @Override - public void dispose() {} - @Override - public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {} } private TreeViewer fTreeViewer = null; diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/BasicContainerContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/BasicContainerContentProvider.java index d968d4496..69dcd3983 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/BasicContainerContentProvider.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/BasicContainerContentProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2003, 2013 IBM Corporation and others. + * Copyright (c) 2003, 2016 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,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Lars Vogel - Bug 490755 *******************************************************************************/ package org.eclipse.debug.internal.ui.sourcelookup; @@ -16,7 +17,6 @@ import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IWorkspaceRoot; import org.eclipse.jface.viewers.ITreeContentProvider; -import org.eclipse.jface.viewers.Viewer; /** * Provides content for a tree viewer that shows only containers. * @@ -30,13 +30,6 @@ public class BasicContainerContentProvider implements ITreeContentProvider { */ public BasicContainerContentProvider() { } - /** - * The visual part that is using this content provider is about - * to be disposed. Deallocate all allocated SWT resources. - */ - @Override - public void dispose() { - } /* (non-Javadoc) * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object) @@ -84,12 +77,4 @@ public class BasicContainerContentProvider implements ITreeContentProvider { public boolean hasChildren(Object element) { return getChildren(element).length > 0; } - - /* (non-Javadoc) - * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object) - */ - @Override - public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { - - } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerViewer.java index fe1310564..a60d73c36 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerViewer.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerViewer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2003, 2013 IBM Corporation and others. + * Copyright (c) 2003, 2016 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 @@ -9,6 +9,7 @@ * IBM Corporation - initial API and implementation * Pawel Piech - Bug 173306: When editing source lookup, new source * containers should be added at the top of the list + * Lars Vogel - Bug 490755 *******************************************************************************/ package org.eclipse.debug.internal.ui.sourcelookup; @@ -19,13 +20,11 @@ import java.util.List; import org.eclipse.core.runtime.CoreException; import org.eclipse.debug.core.sourcelookup.ISourceContainer; import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector; -import org.eclipse.jface.viewers.IContentProvider; import org.eclipse.jface.viewers.IStructuredContentProvider; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.ITreeContentProvider; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.jface.viewers.TreeViewer; -import org.eclipse.jface.viewers.Viewer; import org.eclipse.swt.widgets.Composite; /** @@ -60,20 +59,6 @@ public class SourceContainerViewer extends TreeViewer { return getEntries(); } - /** - * @see IContentProvider#dispose() - */ - @Override - public void dispose() { - } - - /** - * @see IContentProvider#inputChanged(Viewer, Object, Object) - */ - @Override - public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { - } - /** * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object) */ -- cgit v1.2.3