Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-04-18 07:45:47 -0400
committerAlexander Kurtakov2018-04-18 07:45:47 -0400
commit8b69a4c5b85a4d0b56b91c14a61a434298849456 (patch)
tree828ff6f4cace68f942e5b1191fefe13af11821f2
parent13ff8430aaf8568f5fb6f2f326d87222ba0e0ef6 (diff)
downloadeclipse.platform.debug-8b69a4c5b85a4d0b56b91c14a61a434298849456.tar.gz
eclipse.platform.debug-8b69a4c5b85a4d0b56b91c14a61a434298849456.tar.xz
eclipse.platform.debug-8b69a4c5b85a4d0b56b91c14a61a434298849456.zip
Bug 533751 - Direct use of IStructuredSelection
Instead of getSelection and cast. Remove useless @see comments in touched files too. Change-Id: I60d49967e9e56ccaf047817a1ac25d9add2075da Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/breakpointGroups/GroupBreakpointsByDialog.java18
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/hover/ExpressionInformationControlCreator.java67
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardExportBreakpointsPage.java10
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java23
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationViewer.java16
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java64
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutSelectionDialog.java28
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchersDialog.java37
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchPerspectivePreferencePage.java27
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchersPreferencePage.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/RunDebugPropertiesPage.java28
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java14
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/AddSourceContainerDialog.java18
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerAction.java10
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerViewer.java17
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetPage.java7
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java47
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java54
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/PrototypeTab.java66
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java2
-rw-r--r--org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/TreeAndListGroup.java2
21 files changed, 63 insertions, 500 deletions
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 f3b604566..77d6f029f 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, 2016 IBM Corporation and others.
+ * Copyright (c) 2004, 2018 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
@@ -295,7 +295,7 @@ public class GroupBreakpointsByDialog extends TrayDialog {
* to the tree of "selected" factories.
*/
public void handleAddPressed() {
- IStructuredSelection selection= (IStructuredSelection) fAvailableViewer.getSelection();
+ IStructuredSelection selection = fAvailableViewer.getStructuredSelection();
if (selection.size() < 1) {
return;
}
@@ -311,7 +311,7 @@ public class GroupBreakpointsByDialog extends TrayDialog {
* to the list of "available" factories.
*/
public void handleRemovePressed() {
- IStructuredSelection selection= (IStructuredSelection) fSelectedViewer.getSelection();
+ IStructuredSelection selection = fSelectedViewer.getStructuredSelection();
if (selection.size() < 1) {
return;
}
@@ -326,7 +326,7 @@ public class GroupBreakpointsByDialog extends TrayDialog {
* Moves each selected item up in the tree of selected containers
*/
public void handleMoveUpPressed() {
- IStructuredSelection selection = (IStructuredSelection) fSelectedViewer.getSelection();
+ IStructuredSelection selection = fSelectedViewer.getStructuredSelection();
Iterator<?> iter = selection.iterator();
while (iter.hasNext()) {
fSelectedOrganizersProvider.moveUp(iter.next());
@@ -338,7 +338,7 @@ public class GroupBreakpointsByDialog extends TrayDialog {
* Moves each selected item down in the tree of selected containers
*/
public void handleMoveDownPressed() {
- IStructuredSelection selection = (IStructuredSelection) fSelectedViewer.getSelection();
+ IStructuredSelection selection = fSelectedViewer.getStructuredSelection();
Object[] elements= selection.toArray();
for (int i= elements.length - 1; i >= 0; i--) {
fSelectedOrganizersProvider.moveDown(elements[i]);
@@ -367,18 +367,18 @@ public class GroupBreakpointsByDialog extends TrayDialog {
}
public void updateAddButton() {
- IStructuredSelection selection = (IStructuredSelection) fAvailableViewer.getSelection();
+ IStructuredSelection selection = fAvailableViewer.getStructuredSelection();
fAddButton.setEnabled(selection.size() > 0);
}
public void updateRemoveButton() {
- IStructuredSelection selection = (IStructuredSelection) fSelectedViewer.getSelection();
+ IStructuredSelection selection = fSelectedViewer.getStructuredSelection();
fRemoveButton.setEnabled(selection.size() > 0);
}
public void updateMoveUpButton() {
boolean enabled= true;
- IStructuredSelection selection = (IStructuredSelection) fSelectedViewer.getSelection();
+ IStructuredSelection selection = fSelectedViewer.getStructuredSelection();
if (selection.size() == 0) {
enabled= false;
} else {
@@ -393,7 +393,7 @@ public class GroupBreakpointsByDialog extends TrayDialog {
public void updateMoveDownButton() {
boolean enabled= true;
- IStructuredSelection selection = (IStructuredSelection) fSelectedViewer.getSelection();
+ IStructuredSelection selection = fSelectedViewer.getStructuredSelection();
if (selection.size() == 0) {
enabled= false;
} else {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/hover/ExpressionInformationControlCreator.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/hover/ExpressionInformationControlCreator.java
index 8ef66ef3b..17a9aa789 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/hover/ExpressionInformationControlCreator.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/hover/ExpressionInformationControlCreator.java
@@ -1,5 +1,5 @@
/****************************************************************************
-* Copyright (c) 2017 Red Hat Inc. and others.
+* Copyright (c) 2017, 2018 Red Hat Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -101,24 +101,16 @@ public class ExpressionInformationControlCreator implements IInformationControlC
* Creates the content for the root element of the tree viewer in the hover
*/
private class TreeRoot 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 1;
}
- /* (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 new Object[] { fVariable };
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#supportsContextId(java.lang.String)
- */
@Override
protected boolean supportsContextId(String id) {
return true;
@@ -131,49 +123,31 @@ public class ExpressionInformationControlCreator implements IInformationControlC
*/
private class DetailPaneContainer implements IDetailPaneContainer{
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#getCurrentPaneID()
- */
@Override
public String getCurrentPaneID() {
return fDetailPane.getCurrentPaneID();
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#getCurrentSelection()
- */
@Override
public IStructuredSelection getCurrentSelection() {
- return (IStructuredSelection)fViewer.getSelection();
+ return fViewer.getStructuredSelection();
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#refreshDetailPaneContents()
- */
@Override
public void refreshDetailPaneContents() {
fDetailPane.display(getCurrentSelection());
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#getParentComposite()
- */
@Override
public Composite getParentComposite() {
return fDetailPaneComposite;
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#getWorkbenchPartSite()
- */
@Override
public IWorkbenchPartSite getWorkbenchPartSite() {
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#paneChanged(java.lang.String)
- */
@Override
public void paneChanged(String newPaneID) {
if (newPaneID.equals(DefaultDetailPane.ID)){
@@ -242,9 +216,6 @@ public class ExpressionInformationControlCreator implements IInformationControlC
}
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.AbstractInformationControl#dispose()
- */
@Override
public void dispose() {
persistSettings(getShell());
@@ -271,9 +242,6 @@ public class ExpressionInformationControlCreator implements IInformationControlC
}
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.AbstractInformationControl#setVisible(boolean)
- */
@Override
public void setVisible(boolean visible) {
if (!visible) {
@@ -282,9 +250,6 @@ public class ExpressionInformationControlCreator implements IInformationControlC
super.setVisible(visible);
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.AbstractInformationControl#createContent(org.eclipse.swt.widgets.Composite)
- */
@Override
protected void createContent(Composite parent) {
@@ -333,7 +298,7 @@ public class ExpressionInformationControlCreator implements IInformationControlC
fTree.addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent e) {
- fDetailPane.display((IStructuredSelection)fViewer.getSelection());
+ fDetailPane.display(fViewer.getStructuredSelection());
}
@Override
public void widgetDefaultSelected(SelectionEvent e) {}
@@ -406,9 +371,6 @@ public class ExpressionInformationControlCreator implements IInformationControlC
}
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.AbstractInformationControl#setForegroundColor(org.eclipse.swt.graphics.Color)
- */
@Override
public void setForegroundColor(Color foreground) {
super.setForegroundColor(foreground);
@@ -416,9 +378,6 @@ public class ExpressionInformationControlCreator implements IInformationControlC
fTree.setForeground(foreground);
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.AbstractInformationControl#setBackgroundColor(org.eclipse.swt.graphics.Color)
- */
@Override
public void setBackgroundColor(Color background) {
super.setBackgroundColor(background);
@@ -426,26 +385,17 @@ public class ExpressionInformationControlCreator implements IInformationControlC
fTree.setBackground(background);
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.AbstractInformationControl#setFocus()
- */
@Override
public void setFocus() {
super.setFocus();
fTree.setFocus();
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.IInformationControlExtension#hasContents()
- */
@Override
public boolean hasContents() {
return fVariable != null;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.IInformationControlExtension2#setInput(java.lang.Object)
- */
@Override
public void setInput(Object input) {
if (input instanceof IVariable) {
@@ -454,15 +404,9 @@ public class ExpressionInformationControlCreator implements IInformationControlC
}
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.AbstractInformationControl#getInformationPresenterControlCreator()
- */
@Override
public IInformationControlCreator getInformationPresenterControlCreator() {
return new ExpressionInformationControlCreator() {
- /* (non-Javadoc)
- * @see org.eclipse.jdt.internal.debug.ui.ExpressionInformationControlCreator#createInformationControl(org.eclipse.swt.widgets.Shell)
- */
@Override
public IInformationControl createInformationControl(Shell shell) {
return new ExpressionInformationControl(shell, true);
@@ -471,9 +415,6 @@ public class ExpressionInformationControlCreator implements IInformationControlC
}
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.text.IInformationControlCreator#createInformationControl(org.eclipse.swt.widgets.Shell)
- */
@Override
public IInformationControl createInformationControl(Shell parent) {
return new ExpressionInformationControl(parent, false);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardExportBreakpointsPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardExportBreakpointsPage.java
index b3d426333..00b670904 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardExportBreakpointsPage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/breakpoints/WizardExportBreakpointsPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2017 IBM Corporation and others.
+ * Copyright (c) 2006, 2018 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
@@ -121,7 +121,7 @@ public class WizardExportBreakpointsPage extends WizardPage implements Listener
private void handleSelectAllPressed() {
BreakpointsViewer viewer = fTView.getViewer();
viewer.getTree().selectAll();
- viewer.setCheckedElements(((IStructuredSelection)viewer.getSelection()).toArray());
+ viewer.setCheckedElements(viewer.getStructuredSelection().toArray());
viewer.setGrayedElements(new Object[] {});
viewer.getTree().deselectAll();
setPageComplete(detectPageComplete());
@@ -168,9 +168,6 @@ public class WizardExportBreakpointsPage extends WizardPage implements Listener
}
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
@Override
public void createControl(Composite parent) {
initializeDialogUnits(parent);
@@ -200,9 +197,6 @@ public class WizardExportBreakpointsPage extends WizardPage implements Listener
Dialog.applyDialogFont(parent);
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#getImage()
- */
@Override
public Image getImage() {
return DebugUITools.getImage(IInternalDebugUIConstants.IMG_WIZBAN_EXPORT_BREAKPOINTS);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java
index 1f226d786..f8db85b88 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/FavoritesDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 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
@@ -161,7 +161,7 @@ public class FavoritesDialog extends TrayDialog {
* The 'remove favorites' button has been pressed
*/
protected void removeSelectedFavorites() {
- IStructuredSelection sel = (IStructuredSelection)getFavoritesTable().getSelection();
+ IStructuredSelection sel = getFavoritesTable().getStructuredSelection();
Iterator<?> iter = sel.iterator();
while (iter.hasNext()) {
Object config = iter.next();
@@ -177,9 +177,6 @@ public class FavoritesDialog extends TrayDialog {
handleMove(-1);
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#getInitialSize()
- */
@Override
protected Point getInitialSize() {
return new Point(350, 400);
@@ -197,7 +194,7 @@ public class FavoritesDialog extends TrayDialog {
* @param direction the direction to make the move (up or down)
*/
protected void handleMove(int direction) {
- IStructuredSelection sel = (IStructuredSelection)getFavoritesTable().getSelection();
+ IStructuredSelection sel = getFavoritesTable().getStructuredSelection();
List<?> selList = sel.toList();
Object[] movedFavs= new Object[getFavorites().size()];
int i;
@@ -229,9 +226,6 @@ public class FavoritesDialog extends TrayDialog {
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite) super.createDialogArea(parent);
@@ -241,9 +235,6 @@ public class FavoritesDialog extends TrayDialog {
return composite;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createContents(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createContents(Composite parent) {
Control contents = super.createContents(parent);
@@ -349,7 +340,7 @@ public class FavoritesDialog extends TrayDialog {
* The selection in the favorites list has changed
*/
protected void handleFavoriteSelectionChanged() {
- IStructuredSelection selection = (IStructuredSelection)getFavoritesTable().getSelection();
+ IStructuredSelection selection = getFavoritesTable().getStructuredSelection();
List<ILaunchConfiguration> favs = getFavorites();
boolean notEmpty = !selection.isEmpty();
Iterator<?> elements = selection.iterator();
@@ -451,18 +442,12 @@ public class FavoritesDialog extends TrayDialog {
return list.toArray(new ILaunchConfiguration[list.size()]);
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
@Override
protected void okPressed() {
saveFavorites();
super.okPressed();
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#getDialogBoundsSettings()
- */
@Override
protected IDialogSettings getDialogBoundsSettings() {
IDialogSettings settings = DebugUIPlugin.getDefault().getDialogSettings();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationViewer.java
index b6bcae62b..a7d597135 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationViewer.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationViewer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2013 IBM Corporation and others.
+ * Copyright (c) 2006, 2018 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
@@ -50,12 +50,9 @@ public class LaunchConfigurationViewer extends TreeViewer {
this(new Tree(parent, style));
}
- /**
- * @see org.eclipse.jface.viewers.StructuredViewer#preservingSelection(java.lang.Runnable)
- */
@Override
protected void preservingSelection(Runnable updateCode) {
- IStructuredSelection selection = (IStructuredSelection) getSelection();
+ IStructuredSelection selection = getStructuredSelection();
if(!selection.isEmpty()) {
int[] indices = collectIndices(selection.getFirstElement());
updateCode.run();
@@ -153,27 +150,18 @@ public class LaunchConfigurationViewer extends TreeViewer {
return fTotalCount;
}
- /**
- * @see org.eclipse.jface.viewers.AbstractTreeViewer#remove(java.lang.Object)
- */
@Override
public void remove(Object elementsOrTreePaths) {
super.remove(elementsOrTreePaths);
fTotalCount--;
}
- /**
- * @see org.eclipse.jface.viewers.TreeViewer#internalAdd(org.eclipse.swt.widgets.Widget, java.lang.Object, java.lang.Object[])
- */
@Override
protected void internalAdd(Widget widget, Object parentElement, Object[] childElements) {
super.internalAdd(widget, parentElement, childElements);
fTotalCount++;
}
- /**
- * @see org.eclipse.jface.viewers.AbstractTreeViewer#inputChanged(java.lang.Object, java.lang.Object)
- */
@Override
protected void inputChanged(Object input, Object oldInput) {
super.inputChanged(input, oldInput);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
index 7ef512afa..c88f51d06 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 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
@@ -341,9 +341,6 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
return IDialogConstants.NO_ID;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.window.Window#close()
- */
@Override
public boolean close() {
if (!isSafeToClose()) {
@@ -373,9 +370,6 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
shell.setText(getShellTitle());
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.window.Window#create()
- */
@Override
public void create() {
super.create();
@@ -384,9 +378,6 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
}
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createButtonBar(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createButtonBar(Composite parent) {
Font font = parent.getFont();
@@ -473,9 +464,6 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
createButton(parent, ID_CLOSE_BUTTON, LaunchConfigurationsMessages.LaunchConfigurationDialog_Close_1, false);
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.window.Window#createContents(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createContents(Composite parent) {
Control contents = super.createContents(parent);
@@ -484,9 +472,6 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
return contents;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createDialogArea(Composite parent) {
Composite dialogComp = (Composite)super.createDialogArea(parent);
@@ -674,9 +659,6 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
fLaunchConfigurationView.getViewer().setSelection(fInitialSelection);
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationDialog#generateName(java.lang.String)
- */
@Override
public String generateName(String name) {
if (name == null) {
@@ -702,9 +684,6 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
return ((LaunchManager)getLaunchManager()).generateUniqueLaunchConfigurationNameFrom(name, reservednames);
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationDialog#getActiveTab()
- */
@Override
public ILaunchConfigurationTab getActiveTab() {
return fTabViewer.getActiveTab();
@@ -759,9 +738,6 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
return getDialogSettings();
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#getDialogBoundsStrategy()
- */
@Override
protected int getDialogBoundsStrategy() {
return DIALOG_PERSISTSIZE;
@@ -867,9 +843,6 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
return fGroup;
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationDialog#getMode()
- */
@Override
public String getMode() {
return getLaunchGroup().getMode();
@@ -947,9 +920,6 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
return fOpenMode;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IPageChangeProvider#getSelectedPage()
- */
public Object getSelectedPage() {
return getActiveTab();
}
@@ -981,9 +951,6 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationDialog#getTabs()
- */
@Override
public ILaunchConfigurationTab[] getTabs() {
if (getTabGroup() == null) {
@@ -1033,7 +1000,7 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
protected void handleLaunchConfigurationSelectionChanged(SelectionChangedEvent event) {
Object input = fTabViewer.getInput();
Object newInput = null;
- IStructuredSelection selection = (IStructuredSelection) event.getSelection();
+ IStructuredSelection selection = event.getStructuredSelection();
if (selection.size() == 1) {
newInput = selection.getFirstElement();
}
@@ -1140,9 +1107,6 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
ErrorDialog.openError(getShell(), title, null, status);
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.window.Window#initializeBounds()
- */
@Override
protected void initializeBounds() {
IDialogSettings settings = getDialogSettings();
@@ -1167,9 +1131,6 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
super.initializeBounds();
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.TitleAreaDialog#getInitialSize()
- */
@Override
protected Point getInitialSize() {
try {
@@ -1398,9 +1359,6 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
}
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.operation.IRunnableContext#run(boolean, boolean, org.eclipse.jface.operation.IRunnableWithProgress)
- */
@Override
public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws InvocationTargetException, InterruptedException {
if (getShell() != null && getShell().isVisible()) {
@@ -1462,17 +1420,11 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
getDialogArea().setEnabled(enabled);
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationDialog#setActiveTab(org.eclipse.debug.ui.ILaunchConfigurationTab)
- */
@Override
public void setActiveTab(ILaunchConfigurationTab tab) {
fTabViewer.setActiveTab(tab);
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationDialog#setActiveTab(int)
- */
@Override
public void setActiveTab(int index) {
fTabViewer.setActiveTab(index);
@@ -1534,9 +1486,6 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
setTitleImage(getBannerImage());
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationDialog#setName(java.lang.String)
- */
@Override
public void setName(String name) {
fTabViewer.setName(name);
@@ -1662,9 +1611,6 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
return showDiscardChangesDialog();
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationDialog#updateButtons()
- */
@Override
public void updateButtons() {
if (!fSettingInput) {
@@ -1683,9 +1629,6 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
}
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationDialog#updateMessage()
- */
@Override
public void updateMessage() {
if (!fSettingInput) {
@@ -1707,9 +1650,6 @@ public class LaunchConfigurationsDialog extends TitleAreaDialog implements ILaun
return fLaunchConfigurationView.getTreeViewer().getSelection().isEmpty();
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)
- */
@Override
public void propertyChange(final PropertyChangeEvent event) {
WorkbenchJob job = new WorkbenchJob(IInternalDebugCoreConstants.EMPTY_STRING) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutSelectionDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutSelectionDialog.java
index d528a2d8c..4c0ba41e5 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutSelectionDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchShortcutSelectionDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 IBM Corporation and others.
+ * Copyright (c) 2007, 2018 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
@@ -21,7 +21,6 @@ import org.eclipse.debug.internal.ui.IDebugHelpContextIds;
import org.eclipse.debug.internal.ui.SWTFactory;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
@@ -75,34 +74,25 @@ public class LaunchShortcutSelectionDialog extends AbstractDebugListSelectionDia
setTitle(MessageFormat.format(LaunchConfigurationsMessages.LaunchShortcutSelectionDialog_0, new Object[] { fModeName }));
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getHelpContextId()
- */
@Override
protected String getHelpContextId() {
return IDebugHelpContextIds.SELECT_LAUNCH_METHOD_DIALOG;
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getDialogSettingsId()
- */
@Override
protected String getDialogSettingsId() {
return DIALOG_SETTINGS;
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugListSelectionDialog#addViewerListeners(org.eclipse.jface.viewers.StructuredViewer)
- */
@Override
protected void addViewerListeners(StructuredViewer viewer) {
super.addViewerListeners(viewer);
viewer.addSelectionChangedListener(new ISelectionChangedListener(){
@Override
public void selectionChanged(SelectionChangedEvent event) {
- ISelection selection = event.getSelection();
+ IStructuredSelection selection = event.getStructuredSelection();
if (!selection.isEmpty()) {
- LaunchShortcutExtension shortcutSource = (LaunchShortcutExtension) ((IStructuredSelection)selection).getFirstElement();
+ LaunchShortcutExtension shortcutSource = (LaunchShortcutExtension) selection.getFirstElement();
String description = shortcutSource.getShortcutDescription(fMode);
fDescriptionText.setText((description == null ? LaunchConfigurationsMessages.LaunchShortcutSelectionDialog_3 : description));
}
@@ -110,9 +100,6 @@ public class LaunchShortcutSelectionDialog extends AbstractDebugListSelectionDia
});
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#addCustomFooterControls(org.eclipse.swt.widgets.Composite)
- */
@Override
protected void addCustomFooterControls(Composite parent) {
super.addCustomFooterControls(parent);
@@ -123,17 +110,11 @@ public class LaunchShortcutSelectionDialog extends AbstractDebugListSelectionDia
fDescriptionText.setBackground(group.getBackground());
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getViewerInput()
- */
@Override
protected Object getViewerInput() {
return fShortcuts;
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getViewerLabel()
- */
@Override
protected String getViewerLabel() {
if(fResource == null) {
@@ -145,9 +126,6 @@ public class LaunchShortcutSelectionDialog extends AbstractDebugListSelectionDia
}
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugListSelectionDialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
- */
@Override
protected void createButtonsForButtonBar(Composite parent) {
super.createButtonsForButtonBar(parent);
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchersDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchersDialog.java
index 01662e6ee..c91343822 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchersDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/SelectLaunchersDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2013 IBM Corporation and others.
+ * Copyright (c) 2006, 2018 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
@@ -98,9 +98,6 @@ public class SelectLaunchersDialog extends AbstractDebugListSelectionDialog {
fLaunchMode = launchmode;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#getInitialSize()
- */
@Override
protected Point getInitialSize() {
IDialogSettings settings = getDialogBoundsSettings();
@@ -119,41 +116,26 @@ public class SelectLaunchersDialog extends AbstractDebugListSelectionDialog {
return new Point(450, 450);
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getDialogSettingsId()
- */
@Override
protected String getDialogSettingsId() {
return IDebugUIConstants.PLUGIN_ID + ".SELECT_LAUNCHERS_DIALOG"; //$NON-NLS-1$
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getHelpContextId()
- */
@Override
protected String getHelpContextId() {
return IDebugHelpContextIds.SELECT_LAUNCHERS_DIALOG;
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getLabelProvider()
- */
@Override
protected IBaseLabelProvider getLabelProvider() {
return new DelegatesLabelProvider();
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getViewerInput()
- */
@Override
protected Object getViewerInput() {
return fDelegates;
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#addCustomHeaderControls(org.eclipse.swt.widgets.Composite)
- */
@Override
protected void addCustomHeaderControls(Composite parent) {
Composite comp = SWTFactory.createComposite(parent, parent.getFont(), 2, 1, GridData.FILL_HORIZONTAL, 0, 0);
@@ -197,9 +179,6 @@ public class SelectLaunchersDialog extends AbstractDebugListSelectionDialog {
return (ILaunchDelegate) selection.getFirstElement();
}
- /**
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
@Override
protected void okPressed() {
ILaunchDelegate delegate = null;
@@ -240,9 +219,6 @@ public class SelectLaunchersDialog extends AbstractDebugListSelectionDialog {
catch (CoreException ce) {DebugUIPlugin.log(ce);}
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#addCustomFooterControls(org.eclipse.swt.widgets.Composite)
- */
@Override
protected void addCustomFooterControls(Composite parent) {
Group group = SWTFactory.createGroup(parent, LaunchConfigurationsMessages.SelectLaunchersDialog_5, 1, 1, GridData.FILL_BOTH);
@@ -263,16 +239,13 @@ public class SelectLaunchersDialog extends AbstractDebugListSelectionDialog {
return modes;
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.AbstractDebugCheckboxSelectionDialog#addViewerListeners(org.eclipse.jface.viewers.StructuredViewer)
- */
@Override
protected void addViewerListeners(StructuredViewer viewer) {
// Override super to use custom listeners
viewer.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection ss = (IStructuredSelection) event.getSelection();
+ IStructuredSelection ss = event.getStructuredSelection();
if(ss != null && !ss.isEmpty()) {
SelectLaunchersDialog.this.description.setText(((ILaunchDelegate)ss.getFirstElement()).getDescription());
}
@@ -284,9 +257,6 @@ public class SelectLaunchersDialog extends AbstractDebugListSelectionDialog {
super.addViewerListeners(viewer);
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#initializeControls()
- */
@Override
protected void initializeControls() {
final Viewer viewer = getViewer();
@@ -304,9 +274,6 @@ public class SelectLaunchersDialog extends AbstractDebugListSelectionDialog {
catch (CoreException ce) {DebugUIPlugin.log(ce);}
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getViewerLabel()
- */
@Override
protected String getViewerLabel() {
return LaunchConfigurationsMessages.SelectLaunchersDialog_launchers;
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 27389d0b5..b84d11aed 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, 2016 IBM Corporation and others.
+ * Copyright (c) 2006, 2018 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
@@ -252,9 +252,6 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I
*/
public LaunchPerspectivePreferencePage() {}
- /**
- * @see org.eclipse.jface.dialogs.DialogPage#dispose()
- */
@Override
public void dispose() {
PlatformUI.getWorkbench().getActivitySupport().getActivityManager().removeActivityManagerListener(this);
@@ -270,18 +267,12 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I
super.dispose();
}
- /**
- * @see org.eclipse.jface.preference.PreferencePage#createControl(org.eclipse.swt.widgets.Composite)
- */
@Override
public void createControl(Composite parent) {
super.createControl(parent);
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IDebugHelpContextIds.PERSPECTIVE_PREFERENCE_PAGE);
}
- /**
- * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createContents(Composite parent) {
@@ -337,7 +328,7 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I
fTreeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
- fPerspectivesPanel.refreshPanel((IStructuredSelection) event.getSelection());
+ fPerspectivesPanel.refreshPanel(event.getStructuredSelection());
}
});
fTreeViewer.addDoubleClickListener(new IDoubleClickListener() {
@@ -401,7 +392,7 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I
*/
private String getComboSelection(Set<String> modes) {
String text = DebugPreferencesMessages.PerspectivePreferencePage_4;
- IStructuredSelection ss = (IStructuredSelection) fTreeViewer.getSelection();
+ IStructuredSelection ss = fTreeViewer.getStructuredSelection();
if(ss != null && !ss.isEmpty()) {
Object o = null;
Set<String> tmp = new HashSet<>();
@@ -543,9 +534,6 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I
fSwitchSuspend.load();
}
- /**
- * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
- */
@Override
protected void performDefaults() {
fgChangeSet.clear();
@@ -580,9 +568,6 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I
super.performDefaults();
}
- /**
- * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
- */
@Override
public void init(IWorkbench workbench) {
setPreferenceStore(DebugUIPlugin.getDefault().getPreferenceStore());
@@ -604,9 +589,6 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I
fgPerspectiveLabels = labels.toArray(new String[labels.size()]);
}
- /**
- * @see org.eclipse.ui.activities.IActivityManagerListener#activityManagerChanged(org.eclipse.ui.activities.ActivityManagerEvent)
- */
@Override
public void activityManagerChanged(ActivityManagerEvent activityManagerEvent) {
if(!fTree.isDisposed()) {
@@ -614,9 +596,6 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I
}
}
- /**
- * @see org.eclipse.jface.preference.PreferencePage#performOk()
- */
@Override
public boolean performOk() {
fSwitchLaunch.store();
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 c872ff102..edc7c3ec7 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, 2017 IBM Corporation and others.
+ * Copyright (c) 2006, 2018 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
@@ -190,7 +190,7 @@ public class LaunchersPreferencePage extends PreferencePage implements IWorkbenc
fTreeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
- Object obj = ((IStructuredSelection) event.getSelection()).getFirstElement();
+ Object obj = event.getStructuredSelection().getFirstElement();
if(obj instanceof DuplicateDelegate) {
fTableViewer.setAllChecked(false);
DuplicateDelegate dd = (DuplicateDelegate) obj;
@@ -222,7 +222,7 @@ public class LaunchersPreferencePage extends PreferencePage implements IWorkbenc
fTableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection ss = (IStructuredSelection) event.getSelection();
+ IStructuredSelection ss = event.getStructuredSelection();
if(ss != null && !ss.isEmpty()) {
ILaunchDelegate delegate = (ILaunchDelegate)ss.getFirstElement();
fDescription.setText(delegate.getDescription());
@@ -246,7 +246,7 @@ public class LaunchersPreferencePage extends PreferencePage implements IWorkbenc
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=233233
fTableViewer.setSelection(new StructuredSelection(element));
//persist the selection
- Object obj = ((IStructuredSelection) fTreeViewer.getSelection()).getFirstElement();
+ Object obj = fTreeViewer.getStructuredSelection().getFirstElement();
if(obj instanceof DuplicateDelegate) {
fDupeSelections.remove(obj);
if(checked) {
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 9f497e2aa..41cc0840b 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 IBM Corporation and others.
+ * Copyright (c) 2007, 2018 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
@@ -101,9 +101,6 @@ public class RunDebugPropertiesPage extends PropertyPage {
private Button fDuplicateButton = null;
private Button fDeleteButton = null;
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createContents(Composite parent) {
PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IDebugHelpContextIds.RUN_DEBUG_RESOURCE_PROPERTY_PAGE);
@@ -211,9 +208,6 @@ public class RunDebugPropertiesPage extends PropertyPage {
return viewer;
}
- /**
- * @see org.eclipse.jface.dialogs.DialogPage#dispose()
- */
@Override
public void dispose() {
if(fOriginalCandidates != null) {
@@ -309,9 +303,6 @@ public class RunDebugPropertiesPage extends PropertyPage {
return resource;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#performOk()
- */
@Override
public boolean performOk() {
//delete
@@ -336,9 +327,6 @@ public class RunDebugPropertiesPage extends PropertyPage {
return super.performOk();
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.preference.PreferencePage#performDefaults()
- */
@Override
protected void performDefaults() {
setErrorMessage(null);
@@ -374,7 +362,7 @@ public class RunDebugPropertiesPage extends PropertyPage {
* @return selected configurations
*/
private ILaunchConfigurationWorkingCopy[] getSelectedConfigurations() {
- IStructuredSelection ss = (IStructuredSelection) fViewer.getSelection();
+ IStructuredSelection ss = fViewer.getStructuredSelection();
return (ILaunchConfigurationWorkingCopy[]) ss.toList().toArray(new ILaunchConfigurationWorkingCopy[ss.size()]);
}
@@ -478,33 +466,21 @@ public class RunDebugPropertiesPage extends PropertyPage {
SelectionDialog dialog = new AbstractDebugListSelectionDialog(getShell()){
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getDialogSettingsId()
- */
@Override
protected String getDialogSettingsId() {
return DebugUIPlugin.getUniqueIdentifier() + ".SELECT_CONFIGURATION_TYPE_DIALOG"; //$NON-NLS-1$
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getViewerInput()
- */
@Override
protected Object getViewerInput() {
return typeCandidates;
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getHelpContextId()
- */
@Override
protected String getHelpContextId() {
return IDebugHelpContextIds.SELECT_CONFIGURATION_TYPE_DIALOG;
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getViewerLabel()
- */
@Override
protected String getViewerLabel() {
return DebugPreferencesMessages.DefaultLaunchConfigurationsPropertiesPage_12;
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java
index 90eccc775..0ebc2bc7c 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 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
@@ -109,9 +109,6 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor
setDescription(DebugPreferencesMessages.SimpleVariablePreferencePage_6);
}
- /**
- * @see PreferencePage#createControl(Composite)
- */
@Override
public void createControl(Composite parent) {
super.createControl(parent);
@@ -341,7 +338,7 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor
}
private void handleEditButtonPressed() {
- IStructuredSelection selection= (IStructuredSelection) variableTable.getSelection();
+ IStructuredSelection selection = variableTable.getStructuredSelection();
VariableWrapper variable= (VariableWrapper) selection.getFirstElement();
if (variable == null || variable.isReadOnly()) {
return;
@@ -370,7 +367,7 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor
* Remove the selection variables.
*/
private void handleRemoveButtonPressed() {
- IStructuredSelection selection= (IStructuredSelection) variableTable.getSelection();
+ IStructuredSelection selection = variableTable.getStructuredSelection();
List<VariableWrapper> variablesToRemove = selection.toList();
StringBuffer contributedVariablesToRemove= new StringBuffer();
Iterator<VariableWrapper> iter = variablesToRemove.iterator();
@@ -398,7 +395,7 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor
* @param event the selection change event
*/
protected void handleTableSelectionChanged(SelectionChangedEvent event) {
- IStructuredSelection selection = ((IStructuredSelection)event.getSelection());
+ IStructuredSelection selection = (event.getStructuredSelection());
VariableWrapper variable= (VariableWrapper) selection.getFirstElement();
if (variable == null || variable.isReadOnly()) {
envEditButton.setEnabled(false);
@@ -734,9 +731,6 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor
class VariableFilter extends ViewerFilter {
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- */
@Override
public boolean select(Viewer viewer, Object parentElement, Object element) {
return !((VariableWrapper)element).isRemoved();
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 c1b7f707d..c76a80430 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2013 IBM Corporation and others.
+ * Copyright (c) 2003, 2018 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
@@ -27,7 +27,6 @@ import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
-import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
@@ -68,9 +67,6 @@ public class AddSourceContainerDialog extends TitleAreaDialog {
fDirector = director;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.TitleAreaDialog#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createDialogArea(Composite parent) {
@@ -106,9 +102,9 @@ public class AddSourceContainerDialog extends TitleAreaDialog {
fViewer.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
- ISelection selection = event.getSelection();
+ IStructuredSelection selection = event.getStructuredSelection();
if (!selection.isEmpty()) {
- ISourceContainerType type = (ISourceContainerType) ((IStructuredSelection)selection).getFirstElement();
+ ISourceContainerType type = (ISourceContainerType) selection.getFirstElement();
setMessage(type.getDescription());
getButton(IDialogConstants.OK_ID).setEnabled(true);
}
@@ -126,9 +122,6 @@ public class AddSourceContainerDialog extends TitleAreaDialog {
return comp;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse.swt.widgets.Composite)
- */
@Override
protected void createButtonsForButtonBar(Composite parent) {
super.createButtonsForButtonBar(parent);
@@ -138,12 +131,9 @@ public class AddSourceContainerDialog extends TitleAreaDialog {
}
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.Dialog#okPressed()
- */
@Override
protected void okPressed() {
- ISourceContainerType type = (ISourceContainerType) ((IStructuredSelection) fViewer.getSelection()).getFirstElement();
+ ISourceContainerType type = (ISourceContainerType) fViewer.getStructuredSelection().getFirstElement();
if (type != null) {
ISourceContainerBrowser browser = DebugUITools.getSourceContainerBrowser(type.getId());
if (browser != null) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerAction.java
index 6712d2fab..7a331dad0 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/sourcelookup/SourceContainerAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2013 IBM Corporation and others.
+ * Copyright (c) 2003, 2018 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
@@ -15,7 +15,6 @@ import java.util.Iterator;
import java.util.List;
import org.eclipse.debug.core.sourcelookup.ISourceContainer;
-import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
@@ -77,7 +76,7 @@ public abstract class SourceContainerAction extends SelectionListenerAction {
*/
protected List<ISourceContainer> getOrderedSelection() {
List<ISourceContainer> targets = new ArrayList<>();
- List<Object> selection = ((IStructuredSelection) getViewer().getSelection()).toList();
+ List<Object> selection = getViewer().getStructuredSelection().toList();
ISourceContainer[] entries = getViewer().getEntries();
for (int i = 0; i < entries.length; i++) {
ISourceContainer target = entries[i];
@@ -141,9 +140,6 @@ public abstract class SourceContainerAction extends SelectionListenerAction {
});
}
- /**
- * @see IAction#setEnabled(boolean)
- */
@Override
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
@@ -156,7 +152,7 @@ public abstract class SourceContainerAction extends SelectionListenerAction {
* Updates the enabled state.
*/
protected void update() {
- selectionChanged((IStructuredSelection) getViewer().getSelection());
+ selectionChanged(getViewer().getStructuredSelection());
}
/**
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 224d5fa21..74c9dfd38 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, 2016 IBM Corporation and others.
+ * Copyright (c) 2003, 2018 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
@@ -20,7 +20,6 @@ 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.IStructuredContentProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.StructuredSelection;
@@ -51,17 +50,11 @@ public class SourceContainerViewer extends TreeViewer {
class ContentProvider implements ITreeContentProvider {
- /**
- * @see IStructuredContentProvider#getElements(Object)
- */
@Override
public Object[] getElements(Object inputElement) {
return getEntries();
}
- /**
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(java.lang.Object)
- */
@Override
public Object[] getChildren(Object parentElement) {
try {
@@ -71,17 +64,11 @@ public class SourceContainerViewer extends TreeViewer {
}
}
- /**
- * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
- */
@Override
public Object getParent(Object element) {
return null;
}
- /**
- * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
- */
@Override
public boolean hasChildren(Object element) {
return ((ISourceContainer)element).isComposite();
@@ -147,7 +134,7 @@ public class SourceContainerViewer extends TreeViewer {
*/
public void addEntries(ISourceContainer[] entries) {
int index = 0;
- IStructuredSelection sel = (IStructuredSelection)getSelection();
+ IStructuredSelection sel = getStructuredSelection();
if (!sel.isEmpty()) {
index = fEntries.indexOf(sel.getFirstElement());
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetPage.java
index 38bf9d72f..9c96ecb4e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetPage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointWorkingSetPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 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
@@ -69,9 +69,6 @@ public class BreakpointWorkingSetPage extends WizardPage implements IWorkingSetP
fFirstCheck= true;
}
- /*
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
@Override
public void createControl(Composite parent) {
initializeDialogUnits(parent);
@@ -117,7 +114,7 @@ public class BreakpointWorkingSetPage extends WizardPage implements IWorkingSetP
public void widgetSelected(SelectionEvent selectionEvent) {
BreakpointsViewer viewer = fTViewer.getViewer();
viewer.getTree().selectAll();
- viewer.setCheckedElements(((IStructuredSelection)viewer.getSelection()).toArray());
+ viewer.setCheckedElements(viewer.getStructuredSelection().toArray());
viewer.setGrayedElements(new Object[] {});
viewer.getTree().deselectAll();
validateInput();
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java
index fbe25e6a9..b0aa4abcd 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 Keith Seitz and others.
+ * Copyright (c) 2000, 2018 Keith Seitz 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
@@ -196,9 +196,6 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab {
setHelpContextId(IDebugHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_ENVIRONMENT_TAB);
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
- */
@Override
public void createControl(Composite parent) {
// Create main composite
@@ -294,7 +291,7 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab {
* @param event the selection change event
*/
protected void handleTableSelectionChanged(SelectionChangedEvent event) {
- int size = ((IStructuredSelection)event.getSelection()).size();
+ int size = event.getStructuredSelection().size();
envEditButton.setEnabled(size == 1);
envRemoveButton.setEnabled(size > 0);
}
@@ -434,7 +431,7 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab {
* Creates an editor for the value of the selected environment variable.
*/
private void handleEnvEditButtonSelected() {
- IStructuredSelection sel= (IStructuredSelection) environmentTable.getSelection();
+ IStructuredSelection sel = environmentTable.getStructuredSelection();
EnvironmentVariable var= (EnvironmentVariable) sel.getFirstElement();
if (var == null) {
return;
@@ -470,7 +467,7 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab {
* Removes the selected environment variable from the table.
*/
private void handleEnvRemoveButtonSelected() {
- IStructuredSelection sel = (IStructuredSelection) environmentTable.getSelection();
+ IStructuredSelection sel = environmentTable.getStructuredSelection();
try {
environmentTable.getControl().setRedraw(false);
for (Iterator<?> i = sel.iterator(); i.hasNext();) {
@@ -492,17 +489,11 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab {
environmentTable.setInput(configuration);
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
- */
@Override
public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
configuration.removeAttribute(ILaunchManager.ATTR_APPEND_ENVIRONMENT_VARIABLES);
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
- */
@Override
public void initializeFrom(ILaunchConfiguration configuration) {
boolean append= true;
@@ -563,9 +554,6 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab {
}
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
- */
@Override
public String getName() {
return LaunchConfigurationsMessages.EnvironmentTab_Environment_7;
@@ -581,25 +569,16 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab {
return "org.eclipse.debug.ui.environmentTab"; //$NON-NLS-1$
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getImage()
- */
@Override
public Image getImage() {
return DebugPluginImages.getImage(IDebugUIConstants.IMG_OBJS_ENVIRONMENT);
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#activated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
- */
@Override
public void activated(ILaunchConfigurationWorkingCopy workingCopy) {
// do nothing when activated
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#deactivated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
- */
@Override
public void deactivated(ILaunchConfigurationWorkingCopy workingCopy) {
// do nothing when deactivated
@@ -629,41 +608,26 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab {
setShowSelectAllButtons(true);
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getDialogSettingsId()
- */
@Override
protected String getDialogSettingsId() {
return IDebugUIConstants.PLUGIN_ID + ".ENVIRONMENT_TAB.NATIVE_ENVIROMENT_DIALOG"; //$NON-NLS-1$
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getHelpContextId()
- */
@Override
protected String getHelpContextId() {
return IDebugHelpContextIds.SELECT_NATIVE_ENVIRONMENT_DIALOG;
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getViewerInput()
- */
@Override
protected Object getViewerInput() {
return fInput;
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getViewerLabel()
- */
@Override
protected String getViewerLabel() {
return LaunchConfigurationsMessages.EnvironmentTab_19;
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getLabelProvider()
- */
@Override
protected IBaseLabelProvider getLabelProvider() {
return new ILabelProvider() {
@@ -693,9 +657,6 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab {
};
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.launchConfigurations.AbstractDebugSelectionDialog#getContentProvider()
- */
@Override
protected IContentProvider getContentProvider() {
return new IStructuredContentProvider() {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java
index a31300078..c20265f64 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2013 IBM Corporation and others.
+ * Copyright (c) 2005, 2018 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
@@ -91,9 +91,6 @@ public class InspectPopupDialog extends DebugPopup {
fExpression = expression;
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.DebugPopup#createDialogArea(org.eclipse.swt.widgets.Composite)
- */
@Override
protected Control createDialogArea(Composite parent) {
Composite composite = new Composite(parent, parent.getStyle());
@@ -128,7 +125,7 @@ public class InspectPopupDialog extends DebugPopup {
fTree.addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent e) {
- fDetailPane.display((IStructuredSelection)fViewer.getSelection());
+ fDetailPane.display(fViewer.getStructuredSelection());
}
@Override
public void widgetDefaultSelected(SelectionEvent e) {}
@@ -195,9 +192,6 @@ public class InspectPopupDialog extends DebugPopup {
fSashForm.setWeights(DEFAULT_SASH_WEIGHTS);
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.PopupDialog#saveDialogBounds(org.eclipse.swt.widgets.Shell)
- */
@Override
protected void saveDialogBounds(Shell shell) {
super.saveDialogBounds(shell);
@@ -224,24 +218,15 @@ public class InspectPopupDialog extends DebugPopup {
*
*/
private class TreeRoot 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 1;
}
- /* (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 new Object[] { fExpression };
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.viewers.model.provisional.elements.ElementContentProvider#supportsContextId(java.lang.String)
- */
@Override
protected boolean supportsContextId(String id) {
return true;
@@ -269,9 +254,6 @@ public class InspectPopupDialog extends DebugPopup {
return variablesView;
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.DebugPopup#close()
- */
@Override
public boolean close() {
if (!wasPersisted()) {
@@ -282,17 +264,11 @@ public class InspectPopupDialog extends DebugPopup {
return super.close();
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.DebugPopup#getActionText()
- */
@Override
protected String getActionText() {
return DebugUIViewsMessages.InspectPopupDialog_0;
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.ui.DebugPopup#persist()
- */
@Override
protected void persist() {
super.persist();
@@ -311,9 +287,6 @@ public class InspectPopupDialog extends DebugPopup {
}
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.PopupDialog#getInitialSize()
- */
@Override
protected Point getInitialSize() {
Point initialSize = super.getInitialSize();
@@ -322,9 +295,6 @@ public class InspectPopupDialog extends DebugPopup {
return initialSize;
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.PopupDialog#getBackgroundColorExclusions()
- */
@Override
protected List<Control> getBackgroundColorExclusions() {
List<Control> list = super.getBackgroundColorExclusions();
@@ -338,49 +308,31 @@ public class InspectPopupDialog extends DebugPopup {
*/
private class DetailPaneContainer implements IDetailPaneContainer{
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#getCurrentPaneID()
- */
@Override
public String getCurrentPaneID() {
return fDetailPane.getCurrentPaneID();
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#getCurrentSelection()
- */
@Override
public IStructuredSelection getCurrentSelection() {
- return (IStructuredSelection)fViewer.getSelection();
+ return fViewer.getStructuredSelection();
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#refreshDetailPaneContents()
- */
@Override
public void refreshDetailPaneContents() {
fDetailPane.display(getCurrentSelection());
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#getParentComposite()
- */
@Override
public Composite getParentComposite() {
return fDetailPaneComposite;
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#getWorkbenchPartSite()
- */
@Override
public IWorkbenchPartSite getWorkbenchPartSite() {
return null;
}
- /* (non-Javadoc)
- * @see org.eclipse.debug.internal.ui.views.variables.details.IDetailPaneContainer#paneChanged(java.lang.String)
- */
@Override
public void paneChanged(String newPaneID) {
if (newPaneID.equals(DefaultDetailPane.ID)){
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/PrototypeTab.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/PrototypeTab.java
index 97fae077f..155c968fe 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/PrototypeTab.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/PrototypeTab.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2017 Obeo.
+ * Copyright (c) 2017,2018 Obeo 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
@@ -113,12 +113,6 @@ public class PrototypeTab extends AbstractLaunchConfigurationTab {
setHelpContextId(IDebugHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_PROTOTYPE_TAB);
}
- /*
- * (non-Javadoc)
- * @see
- * org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.
- * swt.widgets.Composite)
- */
@Override
public void createControl(Composite parent) {
Composite comp = SWTFactory.createComposite(parent, 1, 1, GridData.FILL_BOTH);
@@ -377,43 +371,21 @@ public class PrototypeTab extends AbstractLaunchConfigurationTab {
columnValue.getColumn().setText(PROTOTYPE_VALUE);
}
- /*
- * (non-Javadoc)
- * @see
- * org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.
- * debug.core.ILaunchConfiguration)
- */
@Override
public void initializeFrom(ILaunchConfiguration configuration) {
initialize(configuration);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.ui.AbstractLaunchConfigurationTab#dispose()
- */
@Override
public void dispose() {
super.dispose();
}
- /*
- * (non-Javadoc)
- * @see
- * org.eclipse.debug.ui.ILaunchConfigurationTab#activated(org.eclipse.debug.
- * core.ILaunchConfigurationWorkingCopy)
- */
@Override
public void activated(ILaunchConfigurationWorkingCopy workingCopy) {
initialize(workingCopy);
}
- /*
- * (non-Javadoc)
- * @see
- * org.eclipse.debug.ui.ILaunchConfigurationTab#deactivated(org.eclipse.
- * debug.core.ILaunchConfigurationWorkingCopy)
- */
@Override
public void deactivated(ILaunchConfigurationWorkingCopy workingCopy) {
}
@@ -486,12 +458,6 @@ public class PrototypeTab extends AbstractLaunchConfigurationTab {
});
}
- /*
- * (non-Javadoc)
- * @see
- * org.eclipse.debug.ui.ILaunchConfigurationTab#isValid(org.eclipse.debug.
- * core.ILaunchConfiguration)
- */
@Override
public boolean isValid(ILaunchConfiguration config) {
setMessage(null);
@@ -504,30 +470,14 @@ public class PrototypeTab extends AbstractLaunchConfigurationTab {
return !config.isPrototype();
}
- /*
- * (non-Javadoc)
- * @see
- * org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.
- * debug.core.ILaunchConfigurationWorkingCopy)
- */
@Override
public void setDefaults(ILaunchConfigurationWorkingCopy config) {
}
- /*
- * (non-Javadoc)
- * @see
- * org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.
- * debug.core.ILaunchConfigurationWorkingCopy)
- */
@Override
public void performApply(ILaunchConfigurationWorkingCopy configuration) {
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#postApply()
- */
@Override
public void postApply() {
super.postApply();
@@ -537,19 +487,11 @@ public class PrototypeTab extends AbstractLaunchConfigurationTab {
}
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
- */
@Override
public String getName() {
return LaunchConfigurationsMessages.PrototypeTab_Prototype_1;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#getImage()
- */
@Override
public Image getImage() {
return DebugUITools.getImage(IInternalDebugUIConstants.IMG_OBJS_PROTO_TAB);
@@ -564,10 +506,6 @@ public class PrototypeTab extends AbstractLaunchConfigurationTab {
return PROTOTYPE_TAB_ID;
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.debug.ui.ILaunchConfigurationTab#canSave()
- */
@Override
public boolean canSave() {
return true;
@@ -755,7 +693,7 @@ public class PrototypeTab extends AbstractLaunchConfigurationTab {
@Override
public void run() {
- IStructuredSelection selection = (IStructuredSelection) fAttributesTreeViewer.getSelection();
+ IStructuredSelection selection = fAttributesTreeViewer.getStructuredSelection();
try {
ILaunchConfigurationWorkingCopy workingCopy = getWorkingCopy();
for (Object element : selection.toList()) {
diff --git a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java
index 551c092ba..5de79ecd5 100644
--- a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java
+++ b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/BuilderPropertyPage.java
@@ -554,7 +554,7 @@ public final class BuilderPropertyPage extends PropertyPage implements ICheckSta
* The user has pressed the remove button. Delete the selected builder.
*/
private void handleRemoveButtonPressed() {
- IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
+ IStructuredSelection selection = viewer.getStructuredSelection();
if (selection != null) {
int numSelected= selection.size();
userHasMadeChanges= true;
diff --git a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/TreeAndListGroup.java b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/TreeAndListGroup.java
index 58cb3255a..eaa52c017 100644
--- a/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/TreeAndListGroup.java
+++ b/org.eclipse.ui.externaltools/External Tools Base/org/eclipse/ui/externaltools/internal/ui/TreeAndListGroup.java
@@ -245,7 +245,7 @@ public class TreeAndListGroup implements ISelectionChangedListener {
@Override
public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection selection = (IStructuredSelection) event.getSelection();
+ IStructuredSelection selection = event.getStructuredSelection();
Object selectedElement = selection.getFirstElement();
if (selectedElement == null) {
currentTreeSelection = null;

Back to the top