Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2015-03-26 09:11:14 +0000
committerAlexander Kurtakov2015-03-26 09:38:56 +0000
commit55c54bce79cc1f9b30d4e2ef594c08f03a1c7f9f (patch)
tree4e96548167c3012acc38b8b910fe7693e7118c84
parent7eee91e610d31b67d6266b7744cf78b87e0bb883 (diff)
downloadorg.eclipse.linuxtools-55c54bce79cc1f9b30d4e2ef594c08f03a1c7f9f.tar.gz
org.eclipse.linuxtools-55c54bce79cc1f9b30d4e2ef594c08f03a1c7f9f.tar.xz
org.eclipse.linuxtools-55c54bce79cc1f9b30d4e2ef594c08f03a1c7f9f.zip
Remove unneeded casts.
Mars M6 has way more generified methods thus returning the proper types. Change-Id: Ie0976279bb7d55eaad798772a5fe15fb96bdd559 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com> Reviewed-on: https://git.eclipse.org/r/44659 Tested-by: Hudson CI
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/PrepareChangeLogAction.java2
-rw-r--r--changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/PrepareChangelogKeyHandler.java6
-rw-r--r--profiling/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/utils/STSymbolManager.java2
-rw-r--r--profiling/org.eclipse.linuxtools.profiling.launch/src/org/eclipse/linuxtools/internal/profiling/launch/provider/AbstractProviderPropertyTab.java2
-rw-r--r--profiling/org.eclipse.linuxtools.profiling.launch/src/org/eclipse/linuxtools/profiling/launch/ProfileLaunchShortcut.java2
-rw-r--r--profiling/org.eclipse.linuxtools.rdt.proxy/src/org/eclipse/linuxtools/internal/rdt/proxy/RDTCommandLauncher.java2
-rw-r--r--profiling/org.eclipse.linuxtools.rdt.proxy/src/org/eclipse/linuxtools/internal/rdt/proxy/RDTFileProxy.java2
-rw-r--r--profiling/org.eclipse.linuxtools.tools.launch.ui/src/org/eclipse/linuxtools/internal/tools/launch/ui/properties/LinuxtoolsPathPropertyPage.java2
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RPMHandlerUtils.java2
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/compare/SpecStructureCreator.java2
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/ErrorLineMatcher.java2
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/handlers/SpecfileEditorRPMBuildHandler.java2
-rw-r--r--rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/popup/actions/StubifyHandler.java2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/AddStapProbeHandler.java2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/IndentHandler.java2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/ToggleCommentHandler.java3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/launcher/SystemTapRegexGenerator.java2
17 files changed, 19 insertions, 20 deletions
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/PrepareChangeLogAction.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/PrepareChangeLogAction.java
index b3ee36ba1e..649492abbe 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/PrepareChangeLogAction.java
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/PrepareChangeLogAction.java
@@ -274,7 +274,7 @@ public class PrepareChangeLogAction extends ChangeLogAction {
ISynchronizeModelElement sme = (ISynchronizeModelElement)element;
resource = sme.getResource();
} else if (element instanceof IAdaptable) {
- resource = (IResource)((IAdaptable)element).getAdapter(IResource.class);
+ resource = ((IAdaptable)element).getAdapter(IResource.class);
}
if (resource == null)
diff --git a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/PrepareChangelogKeyHandler.java b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/PrepareChangelogKeyHandler.java
index 5c3f139e20..4284e26b36 100644
--- a/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/PrepareChangelogKeyHandler.java
+++ b/changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/actions/PrepareChangelogKeyHandler.java
@@ -49,7 +49,7 @@ public class PrepareChangelogKeyHandler extends AbstractHandler {
// that belongs to a project in the workspace
IEditorPart editorPart = (IEditorPart)part;
IEditorInput input = editorPart.getEditorInput();
- IResource r = (IResource)input.getAdapter(IResource.class);
+ IResource r = input.getAdapter(IResource.class);
if (r != null) {
// We have an IResource to work with, so create a selection we can use
// in PrepareChangeLogAction
@@ -66,7 +66,7 @@ public class PrepareChangelogKeyHandler extends AbstractHandler {
if (o instanceof ISynchronizeModelElement) {
r = ((ISynchronizeModelElement)o).getResource();
} else if (o instanceof IAdaptable) {
- r = (IResource)((IAdaptable)o).getAdapter(IResource.class);
+ r = ((IAdaptable)o).getAdapter(IResource.class);
}
if (r != null)
tempResult = iss;
@@ -91,7 +91,7 @@ public class PrepareChangelogKeyHandler extends AbstractHandler {
if (element instanceof ISynchronizeModelElement) {
r = ((ISynchronizeModelElement)element).getResource();
} else if (element instanceof IAdaptable) {
- r = (IResource)((IAdaptable)element).getAdapter(IResource.class);
+ r = ((IAdaptable)element).getAdapter(IResource.class);
}
if (r != null) {
diff --git a/profiling/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/utils/STSymbolManager.java b/profiling/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/utils/STSymbolManager.java
index 3423adb503..e879347519 100644
--- a/profiling/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/utils/STSymbolManager.java
+++ b/profiling/org.eclipse.linuxtools.binutils/src/org/eclipse/linuxtools/binutils/utils/STSymbolManager.java
@@ -467,7 +467,7 @@ public class STSymbolManager {
for (IBinary binary : b) {
IResource r = binary.getResource();
if (r.equals(c)) {
- IBinaryObject binaryObject = (IBinaryObject) binary.getAdapter(IBinaryObject.class);
+ IBinaryObject binaryObject = binary.getAdapter(IBinaryObject.class);
return validateBinary(binaryObject);
}
}
diff --git a/profiling/org.eclipse.linuxtools.profiling.launch/src/org/eclipse/linuxtools/internal/profiling/launch/provider/AbstractProviderPropertyTab.java b/profiling/org.eclipse.linuxtools.profiling.launch/src/org/eclipse/linuxtools/internal/profiling/launch/provider/AbstractProviderPropertyTab.java
index bbb8730c19..afd9048d35 100644
--- a/profiling/org.eclipse.linuxtools.profiling.launch/src/org/eclipse/linuxtools/internal/profiling/launch/provider/AbstractProviderPropertyTab.java
+++ b/profiling/org.eclipse.linuxtools.profiling.launch/src/org/eclipse/linuxtools/internal/profiling/launch/provider/AbstractProviderPropertyTab.java
@@ -63,7 +63,7 @@ public abstract class AbstractProviderPropertyTab extends AbstractCPropertyTab {
usercomp.setLayout(new GridLayout(2, true));
// Get the property provider (project, file, folder) and fine the project.
- IResource resource = (IResource)page.getElement().getAdapter(IResource.class);
+ IResource resource = page.getElement().getAdapter(IResource.class);
IProject project = resource.getProject();
// Create the preference store to use
diff --git a/profiling/org.eclipse.linuxtools.profiling.launch/src/org/eclipse/linuxtools/profiling/launch/ProfileLaunchShortcut.java b/profiling/org.eclipse.linuxtools.profiling.launch/src/org/eclipse/linuxtools/profiling/launch/ProfileLaunchShortcut.java
index 518c07c74d..b1b6a6d9fb 100644
--- a/profiling/org.eclipse.linuxtools.profiling.launch/src/org/eclipse/linuxtools/profiling/launch/ProfileLaunchShortcut.java
+++ b/profiling/org.eclipse.linuxtools.profiling.launch/src/org/eclipse/linuxtools/profiling/launch/ProfileLaunchShortcut.java
@@ -210,7 +210,7 @@ public abstract class ProfileLaunchShortcut implements ILaunchShortcut {
IProgressMonitor sub = new SubProgressMonitor(pm, 1);
for (int i = 0; i < nElements; i++) {
if (elements[i] instanceof IAdaptable) {
- IResource r = (IResource) ((IAdaptable) elements[i]).getAdapter(IResource.class);
+ IResource r = ((IAdaptable) elements[i]).getAdapter(IResource.class);
if (r != null) {
ICProject cproject = CoreModel.getDefault().create(r.getProject());
if (cproject != null) {
diff --git a/profiling/org.eclipse.linuxtools.rdt.proxy/src/org/eclipse/linuxtools/internal/rdt/proxy/RDTCommandLauncher.java b/profiling/org.eclipse.linuxtools.rdt.proxy/src/org/eclipse/linuxtools/internal/rdt/proxy/RDTCommandLauncher.java
index b3ea742e71..4fa6fd228a 100644
--- a/profiling/org.eclipse.linuxtools.rdt.proxy/src/org/eclipse/linuxtools/internal/rdt/proxy/RDTCommandLauncher.java
+++ b/profiling/org.eclipse.linuxtools.rdt.proxy/src/org/eclipse/linuxtools/internal/rdt/proxy/RDTCommandLauncher.java
@@ -62,7 +62,7 @@ public class RDTCommandLauncher implements IRemoteCommandLauncher {
fShowCommand = false;
try {
if (project.hasNature(RDTProxyManager.SYNC_NATURE)) {
- IRemoteResource remoteRes = (IRemoteResource)project.getAdapter(IRemoteResource.class);
+ IRemoteResource remoteRes = project.getAdapter(IRemoteResource.class);
uri = remoteRes.getActiveLocationURI();
} else{
uri = project.getLocationURI();
diff --git a/profiling/org.eclipse.linuxtools.rdt.proxy/src/org/eclipse/linuxtools/internal/rdt/proxy/RDTFileProxy.java b/profiling/org.eclipse.linuxtools.rdt.proxy/src/org/eclipse/linuxtools/internal/rdt/proxy/RDTFileProxy.java
index 72f481936e..134cf00b0a 100644
--- a/profiling/org.eclipse.linuxtools.rdt.proxy/src/org/eclipse/linuxtools/internal/rdt/proxy/RDTFileProxy.java
+++ b/profiling/org.eclipse.linuxtools.rdt.proxy/src/org/eclipse/linuxtools/internal/rdt/proxy/RDTFileProxy.java
@@ -55,7 +55,7 @@ public class RDTFileProxy implements IRemoteFileProxy {
IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
IResource resource = workspaceRoot.findMember(project.getName());
if (resource != null) {
- remoteRes = (IRemoteResource)resource.getAdapter(IRemoteResource.class);
+ remoteRes = resource.getAdapter(IRemoteResource.class);
if (project.hasNature(RDTProxyManager.SYNC_NATURE)) {
uri = remoteRes.getActiveLocationURI();
}
diff --git a/profiling/org.eclipse.linuxtools.tools.launch.ui/src/org/eclipse/linuxtools/internal/tools/launch/ui/properties/LinuxtoolsPathPropertyPage.java b/profiling/org.eclipse.linuxtools.tools.launch.ui/src/org/eclipse/linuxtools/internal/tools/launch/ui/properties/LinuxtoolsPathPropertyPage.java
index fd868f2511..b41ce4ba26 100644
--- a/profiling/org.eclipse.linuxtools.tools.launch.ui/src/org/eclipse/linuxtools/internal/tools/launch/ui/properties/LinuxtoolsPathPropertyPage.java
+++ b/profiling/org.eclipse.linuxtools.tools.launch.ui/src/org/eclipse/linuxtools/internal/tools/launch/ui/properties/LinuxtoolsPathPropertyPage.java
@@ -231,7 +231,7 @@ public class LinuxtoolsPathPropertyPage extends PropertyPage {
return element;
}
if (!(element instanceof IProject)) {
- return (IAdaptable) element.getAdapter(IProject.class);
+ return element.getAdapter(IProject.class);
}
return element;
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RPMHandlerUtils.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RPMHandlerUtils.java
index 5cbacf7d7c..75d7c6793f 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RPMHandlerUtils.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/RPMHandlerUtils.java
@@ -74,7 +74,7 @@ public class RPMHandlerUtils {
return (IResource) element;
} else if (element instanceof IAdaptable) {
IAdaptable adaptable = (IAdaptable) element;
- return (IResource) adaptable.getAdapter(IResource.class);
+ return adaptable.getAdapter(IResource.class);
} else {
return null;
}
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/compare/SpecStructureCreator.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/compare/SpecStructureCreator.java
index 376cdfcc6c..d7624c4a6f 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/compare/SpecStructureCreator.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/compare/SpecStructureCreator.java
@@ -256,7 +256,7 @@ public class SpecStructureCreator extends StructureCreator {
IFile file = null;
if (input instanceof IResourceProvider) {
IResource res = ((IResourceProvider)input).getResource();
- file = (IFile) res.getAdapter(IFile.class);
+ file = res.getAdapter(IFile.class);
}
DocumentRangeNode rootNode = new StructureRootNode(document, input, this, adapter) {
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/ErrorLineMatcher.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/ErrorLineMatcher.java
index b126826d84..50a9a040c8 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/ErrorLineMatcher.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/ErrorLineMatcher.java
@@ -46,7 +46,7 @@ public class ErrorLineMatcher implements IPatternMatchListenerDelegate {
int lineNumber = Integer.parseInt(line.substring(12,
line.indexOf(':', line.indexOf(LINE))).trim());
FileLink fileLink = new FileLink(
- (IFile) console.getSpecfile().getAdapter(IFile.class),
+ console.getSpecfile().getAdapter(IFile.class),
"org.eclipse.linuxtools.rpm.ui.editor.SpecfileEditor", -1, -1, lineNumber); //$NON-NLS-1$
console.addHyperlink(fileLink, 7,
line.indexOf(':', line.indexOf(LINE)) - 7);
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/handlers/SpecfileEditorRPMBuildHandler.java b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/handlers/SpecfileEditorRPMBuildHandler.java
index db2bd85b96..678adc9e60 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/handlers/SpecfileEditorRPMBuildHandler.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui/src/org/eclipse/linuxtools/internal/rpm/ui/handlers/SpecfileEditorRPMBuildHandler.java
@@ -103,7 +103,7 @@ public class SpecfileEditorRPMBuildHandler extends AbstractHandler {
return (IResource) element;
} else if (element instanceof IAdaptable) {
IAdaptable adaptable = (IAdaptable) element;
- return (IResource) adaptable.getAdapter(IResource.class);
+ return adaptable.getAdapter(IResource.class);
} else {
return null;
}
diff --git a/rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/popup/actions/StubifyHandler.java b/rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/popup/actions/StubifyHandler.java
index b33699e8e1..45ac25826b 100644
--- a/rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/popup/actions/StubifyHandler.java
+++ b/rpm/org.eclipse.linuxtools.rpmstubby/src/org/eclipse/linuxtools/internal/rpmstubby/popup/actions/StubifyHandler.java
@@ -39,7 +39,7 @@ public abstract class StubifyHandler extends AbstractHandler {
if (element instanceof IFile) {
featureFile = (IFile) element;
} else if (element instanceof IAdaptable) {
- featureFile = (IFile) ((IAdaptable) element)
+ featureFile = ((IAdaptable) element)
.getAdapter(IFile.class);
}
if (featureFile != null) {
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/AddStapProbeHandler.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/AddStapProbeHandler.java
index ca54ba87c5..075c172fae 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/AddStapProbeHandler.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/AddStapProbeHandler.java
@@ -46,7 +46,7 @@ public class AddStapProbeHandler extends AbstractHandler {
Messages.AddStapProbe_editorError, e);
throw new ExecutionException(Messages.AddStapProbe_editorError, e);
}
- IVerticalRulerInfo rulerInfo = (IVerticalRulerInfo) editor.getAdapter(IVerticalRulerInfo.class);
+ IVerticalRulerInfo rulerInfo = editor.getAdapter(IVerticalRulerInfo.class);
Shell shell = editor.getSite().getShell();
shell.setCursor(shell.getDisplay().getSystemCursor(
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/IndentHandler.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/IndentHandler.java
index 129e8022cf..06f35bf07b 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/IndentHandler.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/IndentHandler.java
@@ -119,7 +119,7 @@ public class IndentHandler extends AbstractHandler {
Runnable runnable = new STPRunnable(editor) {
@Override
public void run() {
- IRewriteTarget target = (IRewriteTarget) getTextEditor()
+ IRewriteTarget target = getTextEditor()
.getAdapter(IRewriteTarget.class);
if (target != null) {
target.beginCompoundChange();
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/ToggleCommentHandler.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/ToggleCommentHandler.java
index c18e6bb993..0990a37cb5 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/ToggleCommentHandler.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/ToggleCommentHandler.java
@@ -302,8 +302,7 @@ public class ToggleCommentHandler extends AbstractHandler {
*/
private void updateOpTarget(ITextEditor editor) {
if (editor != null) {
- operationTarget = (ITextOperationTarget) editor
- .getAdapter(ITextOperationTarget.class);
+ operationTarget = editor.getAdapter(ITextOperationTarget.class);
}
}
}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/launcher/SystemTapRegexGenerator.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/launcher/SystemTapRegexGenerator.java
index 3a679d7c46..11a584b004 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/launcher/SystemTapRegexGenerator.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/launcher/SystemTapRegexGenerator.java
@@ -58,7 +58,7 @@ public class SystemTapRegexGenerator {
root.getFile(scriptPath.makeRelativeTo(root.getLocation())));
if (editor != null) {
// If editor of this file is open, take current file contents.
- ITextEditor tEditor = (ITextEditor) editor.getAdapter(ITextEditor.class);
+ ITextEditor tEditor = editor.getAdapter(ITextEditor.class);
IDocument document = tEditor.getDocumentProvider().
getDocument(tEditor.getEditorInput());
contents = CommentRemover.exec(document.get());

Back to the top