Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2015-11-30 00:31:24 +0000
committerMarkus Keller2015-12-01 01:50:42 +0000
commit0bbe21e0e553957dd09eda0b29e8c77a98f38048 (patch)
treefead9c0316a908536fe74bec66592b1018ccc31a /org.eclipse.ui.editors
parent64b34b614087b96e6cc92c72143768b98ae32602 (diff)
downloadeclipse.platform.text-0bbe21e0e553957dd09eda0b29e8c77a98f38048.tar.gz
eclipse.platform.text-0bbe21e0e553957dd09eda0b29e8c77a98f38048.tar.xz
eclipse.platform.text-0bbe21e0e553957dd09eda0b29e8c77a98f38048.zip
Bug 478673: remove unused casts
Diffstat (limited to 'org.eclipse.ui.editors')
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/EditorsUI.java2
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/EncodingActionGroup.java4
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextFileDocumentProvider.java6
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/quickdiff/LastSaveReferenceProvider.java2
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/quickdiff/QuickDiffRestoreAction.java6
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java4
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AddMarkerAction.java2
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ChangeEncodingAction.java4
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/DocumentProviderRegistry.java2
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerAnnotation.java2
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerRulerAction.java4
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/SelectMarkerRulerAction.java6
12 files changed, 22 insertions, 22 deletions
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/EditorsUI.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/EditorsUI.java
index dbcd3f534..d5f3e7b53 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/EditorsUI.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/EditorsUI.java
@@ -239,7 +239,7 @@ public final class EditorsUI {
if (!getPreferenceStore().getBoolean(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SHOW_TEXT_HOVER_AFFORDANCE))
return null;
- IBindingService bindingService= (IBindingService)PlatformUI.getWorkbench().getAdapter(IBindingService.class);
+ IBindingService bindingService= PlatformUI.getWorkbench().getAdapter(IBindingService.class);
if (bindingService == null)
return null;
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/EncodingActionGroup.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/EncodingActionGroup.java
index 8eec21f8c..7499d0637 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/EncodingActionGroup.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/EncodingActionGroup.java
@@ -106,7 +106,7 @@ public class EncodingActionGroup extends ActionGroup {
private IEncodingSupport getEncodingSupport() {
ITextEditor editor= getTextEditor();
if (editor != null)
- return (IEncodingSupport) editor.getAdapter(IEncodingSupport.class);
+ return editor.getAdapter(IEncodingSupport.class);
return null;
}
@@ -253,7 +253,7 @@ public class EncodingActionGroup extends ActionGroup {
if (editor == null)
return;
- IEncodingSupport encodingSupport= (IEncodingSupport) editor.getAdapter(IEncodingSupport.class);
+ IEncodingSupport encodingSupport= editor.getAdapter(IEncodingSupport.class);
if (encodingSupport == null)
return;
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextFileDocumentProvider.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextFileDocumentProvider.java
index b7b051a8c..b5676271d 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextFileDocumentProvider.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextFileDocumentProvider.java
@@ -552,14 +552,14 @@ public class TextFileDocumentProvider implements IDocumentProvider, IDocumentPro
ITextFileBuffer fileBuffer= null;
LocationKind locationKind= null;
- file= (IFile)adaptable.getAdapter(IFile.class);
+ file= adaptable.getAdapter(IFile.class);
if (file != null) {
IPath location= file.getFullPath();
locationKind= LocationKind.IFILE;
manager.connect(location, locationKind,getProgressMonitor());
fileBuffer= manager.getTextFileBuffer(location, locationKind);
} else {
- ILocationProvider provider= (ILocationProvider) adaptable.getAdapter(ILocationProvider.class);
+ ILocationProvider provider= adaptable.getAdapter(ILocationProvider.class);
if (provider instanceof ILocationProviderExtension) {
URI uri= ((ILocationProviderExtension)provider).getURI(element);
if (ResourcesPlugin.getWorkspace().getRoot().findFilesForLocationURI(uri).length == 0) {
@@ -1063,7 +1063,7 @@ public class TextFileDocumentProvider implements IDocumentProvider, IDocumentPro
if (status.getCode() == IResourceStatus.OUT_OF_SYNC_LOCAL) {
String message= status.getMessage();
- IBindingService bindingService= (IBindingService)PlatformUI.getWorkbench().getService(IBindingService.class);
+ IBindingService bindingService= PlatformUI.getWorkbench().getService(IBindingService.class);
String keySequence= bindingService.getBestActiveBindingFormattedFor(IWorkbenchCommandConstants.FILE_REFRESH);
if (keySequence != null)
message= message + NLSUtility.format(TextEditorMessages.TextFileDocumentProvider_error_outOfSyncHintWithKeyBinding, keySequence);
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/quickdiff/LastSaveReferenceProvider.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/quickdiff/LastSaveReferenceProvider.java
index aa3391391..d691d7055 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/quickdiff/LastSaveReferenceProvider.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/quickdiff/LastSaveReferenceProvider.java
@@ -269,7 +269,7 @@ public class LastSaveReferenceProvider implements IQuickDiffReferenceProvider, I
if (storage instanceof ISchedulingRule)
return (ISchedulingRule) storage;
else if (storage != null)
- return (ISchedulingRule) storage.getAdapter(ISchedulingRule.class);
+ return storage.getAdapter(ISchedulingRule.class);
return null;
}
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/quickdiff/QuickDiffRestoreAction.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/quickdiff/QuickDiffRestoreAction.java
index 438b1e8e8..c64aaf9fd 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/quickdiff/QuickDiffRestoreAction.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/quickdiff/QuickDiffRestoreAction.java
@@ -75,7 +75,7 @@ public abstract class QuickDiffRestoreAction extends TextEditorAction implements
ITextEditor editor= getTextEditor();
if (editor == null || !validateEditorInputState())
return;
- IRewriteTarget target= (IRewriteTarget)editor.getAdapter(IRewriteTarget.class);
+ IRewriteTarget target= editor.getAdapter(IRewriteTarget.class);
if (target != null)
target.beginCompoundChange();
runCompoundChange();
@@ -206,7 +206,7 @@ public abstract class QuickDiffRestoreAction extends TextEditorAction implements
*/
protected IVerticalRulerInfo getRuler() {
if (getTextEditor() != null)
- return (IVerticalRulerInfo)getTextEditor().getAdapter(IVerticalRulerInfo.class);
+ return getTextEditor().getAdapter(IVerticalRulerInfo.class);
return null;
}
@@ -217,7 +217,7 @@ public abstract class QuickDiffRestoreAction extends TextEditorAction implements
*/
protected void setStatus(String string) {
if (getTextEditor() != null) {
- IEditorStatusLine statusLine= (IEditorStatusLine) getTextEditor().getAdapter(IEditorStatusLine.class);
+ IEditorStatusLine statusLine= getTextEditor().getAdapter(IEditorStatusLine.class);
if (statusLine != null) {
statusLine.setMessage(true, string, null);
}
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java
index 8b2775ffb..0e3c41377 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java
@@ -1971,7 +1971,7 @@ public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
menu.appendToGroup(ITextEditorActionConstants.GROUP_SAVE, new Separator(ITextEditorActionConstants.GROUP_OPEN));
IEditorInput editorInput= getEditorInput();
- if (((IResource)editorInput.getAdapter(IResource.class)) instanceof IFile) {
+ if ((editorInput.getAdapter(IResource.class)) instanceof IFile) {
MenuManager openWithSubMenu= new MenuManager(TextEditorMessages.AbstractDecoratedTextEditor_openWith_menu);
final IWorkbenchPage page= getEditorSite().getPage();
@@ -2056,7 +2056,7 @@ public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
private String getShowInMenuLabel() {
String keyBinding= null;
- IBindingService bindingService= (IBindingService)PlatformUI.getWorkbench().getAdapter(IBindingService.class);
+ IBindingService bindingService= PlatformUI.getWorkbench().getAdapter(IBindingService.class);
if (bindingService != null)
keyBinding= bindingService.getBestActiveBindingFormattedFor(IWorkbenchCommandConstants.NAVIGATE_SHOW_IN_QUICK_MENU);
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AddMarkerAction.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AddMarkerAction.java
index 6df61f5fc..82ee3f86c 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AddMarkerAction.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AddMarkerAction.java
@@ -331,7 +331,7 @@ public class AddMarkerAction extends TextEditorAction {
ITextEditor editor= getTextEditor();
if (editor != null) {
IEditorInput input= editor.getEditorInput();
- return (IResource) ((IAdaptable) input).getAdapter(IResource.class);
+ return ((IAdaptable) input).getAdapter(IResource.class);
}
return null;
}
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ChangeEncodingAction.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ChangeEncodingAction.java
index 020bf34d9..c11ed17ca 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ChangeEncodingAction.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/ChangeEncodingAction.java
@@ -208,7 +208,7 @@ public class ChangeEncodingAction extends TextEditorAction {
*/
private IResource getResource() {
if (getTextEditor() != null && getTextEditor().getEditorInput() != null)
- return (IResource)getTextEditor().getEditorInput().getAdapter(IResource.class);
+ return getTextEditor().getEditorInput().getAdapter(IResource.class);
return null;
}
@@ -220,7 +220,7 @@ public class ChangeEncodingAction extends TextEditorAction {
*/
private IEncodingSupport getEncodingSupport() {
if (getTextEditor() != null)
- return (IEncodingSupport)getTextEditor().getAdapter(IEncodingSupport.class);
+ return getTextEditor().getAdapter(IEncodingSupport.class);
return null;
}
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/DocumentProviderRegistry.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/DocumentProviderRegistry.java
index f37a93a57..f15e9a6b6 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/DocumentProviderRegistry.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/DocumentProviderRegistry.java
@@ -308,7 +308,7 @@ public class DocumentProviderRegistry {
IDocumentProvider provider= null;
- IFile file= (IFile) editorInput.getAdapter(IFile.class);
+ IFile file= editorInput.getAdapter(IFile.class);
if (file != null)
provider= getDocumentProvider(file.getFileExtension());
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerAnnotation.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerAnnotation.java
index 92271a50a..d4ec1e35f 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerAnnotation.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerAnnotation.java
@@ -321,7 +321,7 @@ public class MarkerAnnotation extends SimpleMarkerAnnotation implements IQuickFi
IMarker marker= getMarker();
if (marker.exists()) {
- IWorkbenchAdapter adapter= (IWorkbenchAdapter) marker.getAdapter(IWorkbenchAdapter.class);
+ IWorkbenchAdapter adapter= marker.getAdapter(IWorkbenchAdapter.class);
if (adapter != null) {
ImageDescriptor descriptor= adapter.getImageDescriptor(marker);
if (descriptor != null)
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerRulerAction.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerRulerAction.java
index 16538f92e..2c0de048e 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerRulerAction.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/MarkerRulerAction.java
@@ -249,10 +249,10 @@ public class MarkerRulerAction extends ResourceAction implements IUpdate {
protected IResource getResource() {
IEditorInput input= fTextEditor.getEditorInput();
- IResource resource= (IResource) input.getAdapter(IFile.class);
+ IResource resource= input.getAdapter(IFile.class);
if (resource == null)
- resource= (IResource) input.getAdapter(IResource.class);
+ resource= input.getAdapter(IResource.class);
return resource;
}
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/SelectMarkerRulerAction.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/SelectMarkerRulerAction.java
index eb8fc635b..d2db5b778 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/SelectMarkerRulerAction.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/SelectMarkerRulerAction.java
@@ -127,7 +127,7 @@ public class SelectMarkerRulerAction extends ResourceAction implements IUpdate {
private void gotoMarker(IMarker marker) {
// Use the provided adapter if any
- IGotoMarker gotoMarkerAdapter= (IGotoMarker)fTextEditor.getAdapter(IGotoMarker.class);
+ IGotoMarker gotoMarkerAdapter= fTextEditor.getAdapter(IGotoMarker.class);
if (gotoMarkerAdapter != null) {
gotoMarkerAdapter.gotoMarker(marker);
return;
@@ -245,10 +245,10 @@ public class SelectMarkerRulerAction extends ResourceAction implements IUpdate {
protected final IResource getResource() {
IEditorInput input= fTextEditor.getEditorInput();
- IResource resource= (IResource) input.getAdapter(IFile.class);
+ IResource resource= input.getAdapter(IFile.class);
if (resource == null)
- resource= (IResource) input.getAdapter(IResource.class);
+ resource= input.getAdapter(IResource.class);
return resource;
}

Back to the top