Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.team.ui')
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPage.java8
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/FileTypeTable.java9
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractTreeViewerAdvisor.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StructuredViewerAdvisor.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java7
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TreeViewerAdvisor.java20
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ExpandAllAction.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalRefreshWizardSelectionPage.java10
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/MergeActionHandler.java10
13 files changed, 36 insertions, 68 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPage.java
index f639405ee..56e7f7d17 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/history/LocalHistoryPage.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
@@ -390,7 +390,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
@Override
public void widgetSelected(SelectionEvent e) {
compareAction.setCurrentFileRevision(getCurrentFileRevision());
- compareAction.selectionChanged((IStructuredSelection) treeViewer.getSelection());
+ compareAction.selectionChanged(treeViewer.getStructuredSelection());
}
});
@@ -401,7 +401,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
treeViewer.getTree().addSelectionListener(new SelectionAdapter(){
@Override
public void widgetSelected(SelectionEvent e) {
- openAction.selectionChanged((IStructuredSelection) treeViewer.getSelection());
+ openAction.selectionChanged(treeViewer.getStructuredSelection());
}
});
@@ -410,7 +410,7 @@ public class LocalHistoryPage extends HistoryPage implements IHistoryCompareAdap
treeViewer.getTree().addSelectionListener(new SelectionAdapter(){
@Override
public void widgetSelected(SelectionEvent e) {
- openWithMenu.selectionChanged((IStructuredSelection) treeViewer.getSelection());
+ openWithMenu.selectionChanged(treeViewer.getStructuredSelection());
}
});
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/FileTypeTable.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/FileTypeTable.java
index 0eef4dd9b..c29257cb4 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/FileTypeTable.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/preferences/FileTypeTable.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2007 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
@@ -65,9 +65,6 @@ public class FileTypeTable implements ICellModifier, IStructuredContentProvider,
public Item(String name, boolean contributed) { this.name= name; this.contributed = contributed; save= true; mode= Team.BINARY; }
- /* (non-Javadoc)
- * @see java.lang.Comparable#compareTo(java.lang.Object)
- */
@Override
public int compareTo(Object o) {
return name.compareTo(((Item)o).name);
@@ -196,7 +193,7 @@ public class FileTypeTable implements ICellModifier, IStructuredContentProvider,
@Override
public void modify(Object element, String property, Object value) {
- final IStructuredSelection selection = (IStructuredSelection)fTableViewer.getSelection();
+ final IStructuredSelection selection = fTableViewer.getStructuredSelection();
final Item item= (Item)selection.getFirstElement();
if (item == null)
return;
@@ -270,7 +267,7 @@ public class FileTypeTable implements ICellModifier, IStructuredContentProvider,
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
public IStructuredSelection getSelection() {
- return (IStructuredSelection)fTableViewer.getSelection();
+ return fTableViewer.getStructuredSelection();
}
public void setInput(List items) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.java
index de9a9ec3d..c300416d3 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractSynchronizeModelProvider.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
@@ -404,7 +404,7 @@ public abstract class AbstractSynchronizeModelProvider implements ISynchronizeMo
*/
protected IResource[] getSelectedResources() {
StructuredViewer viewer = getViewer();
- return getResources(((IStructuredSelection) viewer.getSelection()).toArray());
+ return getResources(viewer.getStructuredSelection().toArray());
}
/*
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractTreeViewerAdvisor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractTreeViewerAdvisor.java
index 64e7edc28..e7fb11159 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractTreeViewerAdvisor.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/AbstractTreeViewerAdvisor.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
@@ -59,7 +59,7 @@ public abstract class AbstractTreeViewerAdvisor extends StructuredViewerAdvisor
if (!noNextChange) {
// Check to see if the selected element can be opened.
// If it can't, try the next one
- Object selectedObject = AbstractTreeViewerAdvisor.this.getFirstElement((IStructuredSelection)getViewer().getSelection());
+ Object selectedObject = AbstractTreeViewerAdvisor.this.getFirstElement(getViewer().getStructuredSelection());
if (!hasCompareInput(selectedObject)) {
return selectChange(next);
}
@@ -101,7 +101,7 @@ public abstract class AbstractTreeViewerAdvisor extends StructuredViewerAdvisor
private CompareNavigator getSubNavigator() {
IWorkbenchSite ws = AbstractTreeViewerAdvisor.this.getConfiguration().getSite().getWorkbenchSite();
if (ws instanceof IWorkbenchPartSite) {
- Object selectedObject = AbstractTreeViewerAdvisor.this.getFirstElement((IStructuredSelection)getViewer().getSelection());
+ Object selectedObject = AbstractTreeViewerAdvisor.this.getFirstElement(getViewer().getStructuredSelection());
IEditorPart editor = OpenInCompareAction.findOpenCompareEditor((IWorkbenchPartSite)ws, selectedObject, getConfiguration().getParticipant());
if(editor != null) {
// if an existing editor is open on the current selection, use it
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StructuredViewerAdvisor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StructuredViewerAdvisor.java
index 2b7b3194e..f7b55174e 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StructuredViewerAdvisor.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/StructuredViewerAdvisor.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
@@ -148,7 +148,7 @@ public abstract class StructuredViewerAdvisor extends AbstractViewerAdvisor {
viewer.addDoubleClickListener(event -> handleDoubleClick(viewer, event));
- viewer.addSelectionChangedListener(event -> updateActionBars((IStructuredSelection)viewer.getSelection()));
+ viewer.addSelectionChangedListener(event -> updateActionBars(viewer.getStructuredSelection()));
TeamUIPlugin.getPlugin().getPreferenceStore().addPropertyChangeListener(propertyListener);
}
@@ -367,7 +367,7 @@ public abstract class StructuredViewerAdvisor extends AbstractViewerAdvisor {
*/
protected void fillActionBars(IActionBars actionBars) {
getActionGroup().fillActionBars(actionBars);
- updateActionBars((IStructuredSelection) getViewer().getSelection());
+ updateActionBars(getViewer().getStructuredSelection());
Object input = getViewer().getInput();
if (input instanceof ISynchronizeModelElement) {
getActionGroup().modelChanged((ISynchronizeModelElement) input);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java
index 8bd19e955..d56c4d060 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeView.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
@@ -900,7 +900,7 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
}
private boolean inputIsSelected(IEditorInput input) {
- IStructuredSelection selection= (IStructuredSelection) getViewer().getSelection();
+ IStructuredSelection selection= getViewer().getStructuredSelection();
if (selection.size() != 1)
return false;
IEditorInput selectionAsInput= getEditorInput(selection.getFirstElement());
@@ -1019,9 +1019,6 @@ public class SynchronizeView extends PageBookView implements ISynchronizeView, I
return selection.getFirstElement();
}
- /* (non-Javadoc)
- * @see org.eclipse.ui.part.IShowInTarget#show(org.eclipse.ui.part.ShowInContext)
- */
@Override
public boolean show(ShowInContext context) {
Object selection = getSingleElement(context.getSelection());
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TreeViewerAdvisor.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TreeViewerAdvisor.java
index 72ae10e2f..9c3b37b5b 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TreeViewerAdvisor.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/TreeViewerAdvisor.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
@@ -169,21 +169,15 @@ public class TreeViewerAdvisor extends AbstractTreeViewerAdvisor {
return modelManager;
}
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.viewers.StructuredViewerAdvisor#initializeViewer(org.eclipse.jface.viewers.StructuredViewer)
- */
@Override
public boolean validateViewer(StructuredViewer viewer) {
return viewer instanceof AbstractTreeViewer;
}
- /* (non-Javadoc)
- * @see org.eclipse.team.ui.synchronize.viewers.StructuredViewerAdvisor#initializeListeners(org.eclipse.jface.viewers.StructuredViewer)
- */
@Override
protected void initializeListeners(final StructuredViewer viewer) {
super.initializeListeners(viewer);
- viewer.addSelectionChangedListener(event -> updateStatusLine((IStructuredSelection) event.getSelection()));
+ viewer.addSelectionChangedListener(event -> updateStatusLine(event.getStructuredSelection()));
}
/* private */ void updateStatusLine(IStructuredSelection selection) {
@@ -261,7 +255,7 @@ public class TreeViewerAdvisor extends AbstractTreeViewerAdvisor {
@Override
public void dragStart(DragSourceEvent event) {
- final IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
+ final IStructuredSelection selection = viewer.getStructuredSelection();
final Object [] array= selection.toArray();
event.doit= Utils.getResources(array).length > 0;
}
@@ -270,7 +264,7 @@ public class TreeViewerAdvisor extends AbstractTreeViewerAdvisor {
public void dragSetData(DragSourceEvent event) {
if (ResourceTransfer.getInstance().isSupportedType(event.dataType)) {
- final IStructuredSelection selection= (IStructuredSelection)viewer.getSelection();
+ final IStructuredSelection selection= viewer.getStructuredSelection();
final Object [] array= selection.toArray();
event.data= Utils.getResources(array);
}
@@ -314,9 +308,6 @@ public class TreeViewerAdvisor extends AbstractTreeViewerAdvisor {
return new DecoratingColorLabelProvider(provider, decorators);
}
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#dispose()
- */
@Override
public void dispose() {
if (statusLine != null) {
@@ -325,9 +316,6 @@ public class TreeViewerAdvisor extends AbstractTreeViewerAdvisor {
super.dispose();
}
- /* (non-Javadoc)
- * @see org.eclipse.team.internal.ui.synchronize.StructuredViewerAdvisor#initializeStatusLine(org.eclipse.ui.IActionBars)
- */
@Override
protected void initializeStatusLine(IActionBars actionBars) {
statusLine = new SyncInfoSetStatusLineContributionGroup(
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ExpandAllAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ExpandAllAction.java
index 5d586ee18..7cd5e9e03 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ExpandAllAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/ExpandAllAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 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
@@ -32,9 +32,9 @@ public class ExpandAllAction extends Action implements ISelectionChangedListener
protected void expandAllFromSelection() {
AbstractTreeViewer tree = viewer;
if (tree == null) return;
- ISelection selection = tree.getSelection();
+ IStructuredSelection selection = tree.getStructuredSelection();
if(! selection.isEmpty()) {
- Iterator elements = ((IStructuredSelection)selection).iterator();
+ Iterator elements = selection.iterator();
try {
tree.getControl().setRedraw(false);
while (elements.hasNext()) {
@@ -46,9 +46,7 @@ public class ExpandAllAction extends Action implements ISelectionChangedListener
}
}
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
- */
+
@Override
public void selectionChanged(SelectionChangedEvent event) {
ISelection selection = event.getSelection();
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java
index 74c820758..ee65cf432 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.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
@@ -207,7 +207,7 @@ public class ConfigureProjectWizardMainPage extends WizardPage {
@Override
public IWizardPage getNextPage() {
if (selectedWizard == null) return null;
- if(! WorkbenchActivityHelper.allowUseOf(getTriggerPoint(), ((IStructuredSelection)viewer.getSelection()).getFirstElement())) return null;
+ if(! WorkbenchActivityHelper.allowUseOf(getTriggerPoint(), viewer.getStructuredSelection().getFirstElement())) return null;
return selectedWizard.getStartingPage();
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.java
index 1165f337f..260b79743 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ExportProjectSetLocationPage.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
@@ -314,7 +314,7 @@ public class ExportProjectSetLocationPage extends TeamWizardPage {
}
private void getSelectedContainer() {
- Object obj = ((IStructuredSelection) wsTreeViewer.getSelection()).getFirstElement();
+ Object obj = wsTreeViewer.getStructuredSelection().getFirstElement();
if (obj instanceof IContainer)
wsContainer = (IContainer) obj;
@@ -339,7 +339,7 @@ public class ExportProjectSetLocationPage extends TeamWizardPage {
void setupListeners() {
wsTreeViewer.addSelectionChangedListener(event -> {
- IStructuredSelection s = (IStructuredSelection) event.getSelection();
+ IStructuredSelection s = event.getStructuredSelection();
Object obj = s.getFirstElement();
if (obj != null) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalRefreshWizardSelectionPage.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalRefreshWizardSelectionPage.java
index 15f61a3d7..97651b3ea 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalRefreshWizardSelectionPage.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/GlobalRefreshWizardSelectionPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 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
@@ -90,9 +90,6 @@ public class GlobalRefreshWizardSelectionPage extends WizardPage implements IDou
setTitle(TeamUIMessages.GlobalRefreshParticipantSelectionPage_2);
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#dispose()
- */
@Override
public void dispose() {
if (createdImages != null) {
@@ -110,16 +107,13 @@ public class GlobalRefreshWizardSelectionPage extends WizardPage implements IDou
if (fViewer.getControl().isDisposed())
return;
- final IStructuredSelection selection= (IStructuredSelection)fViewer.getSelection();
+ final IStructuredSelection selection= fViewer.getStructuredSelection();
final Object selected= selection.getFirstElement();
if (!(selected instanceof SynchronizeWizardDescription))
return;
getDialogSettings().put(DEFAULT_SELECTION, ((SynchronizeWizardDescription)selected).getId());
}
- /* (non-Javadoc)
- * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
- */
@Override
public void createControl(Composite parent2) {
Composite top = new Composite(parent2, SWT.NULL);
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java
index 276e97b74..b7e712905 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/WorkingSetsDialog.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
@@ -111,7 +111,7 @@ public class WorkingSetsDialog extends TitleAreaDialog {
void setupListeners() {
wsTableViewer.addSelectionChangedListener(event -> {
- IStructuredSelection s = (IStructuredSelection) event.getSelection();
+ IStructuredSelection s = event.getStructuredSelection();
Object obj = s.getFirstElement();
if (obj instanceof IWorkingSet)
wsNameText.setText(((IWorkingSet) obj).getName());
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/MergeActionHandler.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/MergeActionHandler.java
index a56c8ca73..44e56bfb3 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/MergeActionHandler.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/mapping/MergeActionHandler.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
@@ -83,7 +83,7 @@ public abstract class MergeActionHandler extends AbstractHandler {
}
/* private */ void updatedEnablement(SelectionChangedEvent event) {
- updateEnablement((IStructuredSelection)event.getSelection());
+ updateEnablement(event.getStructuredSelection());
}
/**
@@ -118,9 +118,6 @@ public abstract class MergeActionHandler extends AbstractHandler {
return selection;
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
- */
@Override
public boolean isEnabled() {
return enabled;
@@ -137,9 +134,6 @@ public abstract class MergeActionHandler extends AbstractHandler {
}
}
- /* (non-Javadoc)
- * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent)
- */
@Override
public Object execute(final ExecutionEvent event) throws ExecutionException {
try {

Back to the top