Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonah Graham2018-11-20 11:20:42 -0500
committerJonah Graham2018-11-22 16:53:35 -0500
commit8844a8f9f22802fedffa3cb2a8a21b041aa64b74 (patch)
tree311bce2a3fbe500e879b44c270b0d2ee24fe01af
parent8985c7b63f04ad139e8b93160798e642d2addc55 (diff)
downloadorg.eclipse.cdt-8844a8f9f22802fedffa3cb2a8a21b041aa64b74.tar.gz
org.eclipse.cdt-8844a8f9f22802fedffa3cb2a8a21b041aa64b74.tar.xz
org.eclipse.cdt-8844a8f9f22802fedffa3cb2a8a21b041aa64b74.zip
Bug 540373: Cleanup: Remove unnecessary casts
This was done by selecting all projects in Eclipse then Source -> Clean Up... -> choosing: - Remove unnecessary casts and completing the wizard Change-Id: I287d4066b12fc19d7f73a016e11c9405abb4ceb9
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java2
-rw-r--r--core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/FindIASTNameDialog.java6
-rw-r--r--core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/ShowInDOMViewAction.java2
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/search/SearchReferencesAcrossLanguagesTest.java2
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FoldingTest.java2
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FoldingTestBase.java2
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/BaseSelectionTests.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsoleViewer.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMProvider.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/concurrent/DisplayDsfExecutor.java2
-rw-r--r--launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerLaunchConfigurationDelegate.java6
-rw-r--r--launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerTab.java2
-rw-r--r--launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/LaunchShortcut.java2
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/GoToAddressBarWidget.java4
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java10
-rwxr-xr-xmemory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/Rendering.java2
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/RenderingAddressInfo.java2
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/TraditionalRendering.java4
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/AbstractQtPDOMClass.java2
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMASTProcessor.java2
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMLinkage.java4
-rw-r--r--qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMQObject.java2
-rw-r--r--qt/org.eclipse.cdt.qt.ui.tests/src/org/eclipse/cdt/qt/tests/QtRegressionTests.java2
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/QObjectDeclarationCompletion.java2
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/assist/QPropertyAttributeProposal.java2
-rw-r--r--qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/editor/QMLHyperlinkDetector.java2
-rw-r--r--remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/core/RemoteCommandLauncher.java2
-rwxr-xr-xvisualizer/org.eclipse.cdt.visualizer.core/src/org/eclipse/cdt/visualizer/core/ExtensionElement.java2
-rw-r--r--visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/VirtualBoundsGraphicObject.java4
-rwxr-xr-xvisualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/ListenerList.java2
-rw-r--r--visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionUtils.java6
-rw-r--r--xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/c/XlcCParser.java4
-rw-r--r--xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/cpp/XlcCPPParser.java4
-rw-r--r--xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/XLCompilerPropertyPage.java6
35 files changed, 53 insertions, 53 deletions
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java
index 562fe463cc..c48e0d08e4 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java
@@ -336,7 +336,7 @@ public abstract class FieldEditorOverlayPage extends FieldEditorPreferencePage i
protected void configureWorkspaceSettings() {
try {
// create a new instance of the current class
- IPreferencePage page = (IPreferencePage) this.getClass().newInstance();
+ IPreferencePage page = this.getClass().newInstance();
page.setTitle(getTitle());
page.setImageDescriptor(image);
// and show it
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java
index 76500a515d..d3d099b603 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java
@@ -1029,7 +1029,7 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
pdomBinding = createBinding(type, method, fileLocalRec);
} else if (!getPDOM().hasLastingDefinition(pdomBinding)) {
pdomBinding.update(this, method);
- old.remove((ICPPMethod) pdomBinding);
+ old.remove(pdomBinding);
// Update the tags based on the tags from the new binding. This was in
// PDOMBinding.update, but not all subclasses (e.g., PDOMCPPFunction)
diff --git a/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/FindIASTNameDialog.java b/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/FindIASTNameDialog.java
index 797545fc72..431d37f4fb 100644
--- a/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/FindIASTNameDialog.java
+++ b/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/FindIASTNameDialog.java
@@ -85,7 +85,7 @@ class FindIASTNameDialog extends Dialog {
updateCombo(fFindField, fFindHistory);
if (!fFindHistory.equals(oldList) && !fFindHistory.isEmpty())
- fFindField.setText((String) fFindHistory.get(0));
+ fFindField.setText(fFindHistory.get(0));
else
fFindField.setText(oldText);
if (findFieldHadFocus())
@@ -880,7 +880,7 @@ class FindIASTNameDialog extends Dialog {
} else {
if (BLANK_STRING.equals(fFindField.getText())) {
if (fFindHistory.size() > 0)
- fFindField.setText((String) fFindHistory.get(0));
+ fFindField.setText(fFindHistory.get(0));
else
fFindField.setText(BLANK_STRING);
}
@@ -1032,7 +1032,7 @@ class FindIASTNameDialog extends Dialog {
if (editor == null)
return null;
- return (IEditorStatusLine) editor.getAdapter(IEditorStatusLine.class);
+ return editor.getAdapter(IEditorStatusLine.class);
}
/**
diff --git a/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/ShowInDOMViewAction.java b/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/ShowInDOMViewAction.java
index 01171a1154..df477f2d7f 100644
--- a/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/ShowInDOMViewAction.java
+++ b/core/org.eclipse.cdt.ui.tests/src/org/eclipse/cdt/ui/tests/DOMAST/ShowInDOMViewAction.java
@@ -148,7 +148,7 @@ public class ShowInDOMViewAction extends ActionDelegate implements IEditorAction
return location.toOSString();
}
}
- ILocationProvider locationProvider = (ILocationProvider) input.getAdapter(ILocationProvider.class);
+ ILocationProvider locationProvider = input.getAdapter(ILocationProvider.class);
if (locationProvider != null) {
IPath location = locationProvider.getPath(input);
if (location != null) {
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/search/SearchReferencesAcrossLanguagesTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/search/SearchReferencesAcrossLanguagesTest.java
index 610e011d39..bac067c2ec 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/search/SearchReferencesAcrossLanguagesTest.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/search/SearchReferencesAcrossLanguagesTest.java
@@ -105,7 +105,7 @@ public class SearchReferencesAcrossLanguagesTest extends BaseUITestCase {
assertNotNull(page);
IEditorPart editor = IDE.openEditor(page, f_h, CUIPlugin.EDITOR_ID);
assertNotNull(editor);
- CEditor ceditor = (CEditor) editor.getAdapter(CEditor.class);
+ CEditor ceditor = editor.getAdapter(CEditor.class);
assertNotNull(ceditor);
ceditor.selectAndReveal(hcontent.indexOf("m1"), 2);
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FoldingTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FoldingTest.java
index 493ec75d84..0fad01f43f 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FoldingTest.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FoldingTest.java
@@ -131,7 +131,7 @@ public class FoldingTest extends FoldingTestBase {
}
private void assertNoKeyCollisions() {
- ProjectionAnnotationModel model = (ProjectionAnnotationModel) fEditor
+ ProjectionAnnotationModel model = fEditor
.getAdapter(ProjectionAnnotationModel.class);
assertNotNull(model);
int annotations = 0;
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FoldingTestBase.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FoldingTestBase.java
index ebe8123d7d..8cec47298e 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FoldingTestBase.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/FoldingTestBase.java
@@ -253,7 +253,7 @@ abstract public class FoldingTestBase extends BaseUITestCase {
protected PositionAndCollapsed[] getFoldingPositions() {
List<PositionAndCollapsed> positionAndCollapseds = new ArrayList<PositionAndCollapsed>();
- ProjectionAnnotationModel model = (ProjectionAnnotationModel) fEditor
+ ProjectionAnnotationModel model = fEditor
.getAdapter(ProjectionAnnotationModel.class);
assertNotNull(model);
for (Iterator<Annotation> iter = model.getAnnotationIterator(); iter.hasNext();) {
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/BaseSelectionTests.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/BaseSelectionTests.java
index 1fcaceb245..0cdc9c8856 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/BaseSelectionTests.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/BaseSelectionTests.java
@@ -141,7 +141,7 @@ public abstract class BaseSelectionTests extends BaseUITestCase {
final IASTName[] result = { null };
if (sel instanceof ITextSelection) {
final ITextSelection textSel = (ITextSelection) sel;
- ITranslationUnit tu = (ITranslationUnit) editor.getInputCElement();
+ ITranslationUnit tu = editor.getInputCElement();
IStatus ok = ASTProvider.getASTProvider().runOnAST(tu, ASTProvider.WAIT_IF_OPEN, monitor,
new ASTRunnable() {
@Override
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsoleViewer.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsoleViewer.java
index 205f713f1f..a1725ec287 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsoleViewer.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsoleViewer.java
@@ -274,7 +274,7 @@ public class BuildConsoleViewer extends TextViewer
if (partitioner == null)
return;
- BuildConsolePartition partition = (BuildConsolePartition) partitioner.getPartition(event.lineOffset);
+ BuildConsolePartition partition = partitioner.getPartition(event.lineOffset);
// Set background for error partitions
if (partition != null) {
String type = partition.getType();
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMProvider.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMProvider.java
index b1ffa77368..eca21d6b62 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMProvider.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMProvider.java
@@ -138,7 +138,7 @@ public class BreakpointVMProvider extends AbstractVMProvider {
if (independentCategories != null) {
for (IAdaptable category : independentCategories) {
if (!bpsLists.containsKey(category)) {
- bpsLists.put(category, (List<IBreakpoint>) Collections.EMPTY_LIST);
+ bpsLists.put(category, Collections.EMPTY_LIST);
}
}
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/concurrent/DisplayDsfExecutor.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/concurrent/DisplayDsfExecutor.java
index 8b308a9445..33ce2e84d8 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/concurrent/DisplayDsfExecutor.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/concurrent/DisplayDsfExecutor.java
@@ -278,6 +278,6 @@ public class DisplayDsfExecutor extends DefaultDsfExecutor {
@SuppressWarnings({ "cast", "unchecked" })
@Override
public List<Runnable> shutdownNow() {
- return (List<Runnable>) Collections.EMPTY_LIST;
+ return Collections.EMPTY_LIST;
}
}
diff --git a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerLaunchConfigurationDelegate.java b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerLaunchConfigurationDelegate.java
index 0aedb2981c..a011e60ce1 100644
--- a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerLaunchConfigurationDelegate.java
+++ b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerLaunchConfigurationDelegate.java
@@ -243,7 +243,7 @@ public class ContainerLaunchConfigurationDelegate extends GdbLaunchDelegate impl
}
String image = configuration.getAttribute(ILaunchConstants.ATTR_IMAGE, (String) null);
- String connectionUri = configuration.getAttribute(ILaunchConstants.ATTR_CONNECTION_URI, (String) "");
+ String connectionUri = configuration.getAttribute(ILaunchConstants.ATTR_CONNECTION_URI, "");
boolean keepContainer = configuration.getAttribute(ILaunchConstants.ATTR_KEEP_AFTER_LAUNCH, false);
boolean supportStdin = configuration.getAttribute(ILaunchConstants.ATTR_STDIN_SUPPORT, false);
@@ -356,7 +356,7 @@ public class ContainerLaunchConfigurationDelegate extends GdbLaunchDelegate impl
}
String image = configuration.getAttribute(ILaunchConstants.ATTR_IMAGE, (String) null);
- String connectionUri = configuration.getAttribute(ILaunchConstants.ATTR_CONNECTION_URI, (String) "");
+ String connectionUri = configuration.getAttribute(ILaunchConstants.ATTR_CONNECTION_URI, "");
boolean isLocalConnection = true;
try {
Pattern ipaddrPattern = Pattern.compile("[a-z]*://([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)[:]*[0-9]*");
@@ -448,7 +448,7 @@ public class ContainerLaunchConfigurationDelegate extends GdbLaunchDelegate impl
* @throws CoreException
*/
private String getProgramArguments(ILaunchConfiguration config) throws CoreException {
- String args = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, (String) "");
+ String args = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, "");
if (args != null && args.length() > 0) {
args = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(args);
}
diff --git a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerTab.java b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerTab.java
index 150c49a6da..40223b4548 100644
--- a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerTab.java
+++ b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ContainerTab.java
@@ -612,7 +612,7 @@ public class ContainerTab extends AbstractLaunchConfigurationTab
tableViewer.setChecked(m, true);
}
}
- connectionUri = configuration.getAttribute(ILaunchConstants.ATTR_CONNECTION_URI, (String) "");
+ connectionUri = configuration.getAttribute(ILaunchConstants.ATTR_CONNECTION_URI, "");
int defaultIndex = 0;
connections = DockerConnectionManager.getInstance().getConnections();
if (connections.length > 0) {
diff --git a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/LaunchShortcut.java b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/LaunchShortcut.java
index f40abf3441..4372251be5 100644
--- a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/LaunchShortcut.java
+++ b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/LaunchShortcut.java
@@ -128,7 +128,7 @@ public class LaunchShortcut 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/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/GoToAddressBarWidget.java b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/GoToAddressBarWidget.java
index 27bd53d662..c718418a81 100644
--- a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/GoToAddressBarWidget.java
+++ b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/GoToAddressBarWidget.java
@@ -456,7 +456,7 @@ public class GoToAddressBarWidget {
ILaunch launch = null;
if (context instanceof IAdaptable) {
adaptable = (IAdaptable) context;
- launch = ((ILaunch) adaptable.getAdapter(ILaunch.class));
+ launch = (adaptable.getAdapter(ILaunch.class));
}
return launch;
@@ -476,7 +476,7 @@ public class GoToAddressBarWidget {
String id = UNKNOWN_CONTEXT_ID;
if (context instanceof IAdaptable) {
IAdaptable adaptable = (IAdaptable) context;
- IRecurringDebugContext recurringDebugContext = (IRecurringDebugContext) adaptable
+ IRecurringDebugContext recurringDebugContext = adaptable
.getAdapter(IRecurringDebugContext.class);
if (recurringDebugContext != null) {
try {
diff --git a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java
index 2631f91abf..920d59d2e1 100644
--- a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java
+++ b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java
@@ -665,7 +665,7 @@ public class MemoryBrowser extends ViewPart
// Memory view support this (it was done in the call to
// rendering.getLabel() above)
IMemoryBlock block = rendering.getMemoryBlock();
- ILabelDecorator labelDec = (ILabelDecorator) block.getAdapter(ILabelDecorator.class);
+ ILabelDecorator labelDec = block.getAdapter(ILabelDecorator.class);
if (labelDec != null) {
String newLabel = labelDec.decorateText(label, rendering);
if (newLabel != null) {
@@ -1059,8 +1059,8 @@ public class MemoryBrowser extends ViewPart
if (context instanceof IAdaptable) {
adaptable = (IAdaptable) context;
- retrieval = ((IMemoryBlockRetrieval) adaptable.getAdapter(IMemoryBlockRetrieval.class));
- launch = ((ILaunch) adaptable.getAdapter(ILaunch.class));
+ retrieval = (adaptable.getAdapter(IMemoryBlockRetrieval.class));
+ launch = (adaptable.getAdapter(ILaunch.class));
}
if (retrieval != null && launch != null && !launch.isTerminated()) {
@@ -1113,7 +1113,7 @@ public class MemoryBrowser extends ViewPart
CTabFolder tabFolder = fContextFolders.get(retrieval);
if (tabFolder != null) {
fStackLayout.topControl = tabFolder;
- CTabItem tabItem = (CTabItem) tabFolder.getSelection();
+ CTabItem tabItem = tabFolder.getSelection();
if (tabItem != null) {
getSite().getSelectionProvider()
.setSelection(new StructuredSelection(tabItem.getData(KEY_RENDERING)));
@@ -1412,7 +1412,7 @@ public class MemoryBrowser extends ViewPart
if (retrieval instanceof IMemoryBlockRetrievalExtension) {
retrievalExtension = (IMemoryBlockRetrievalExtension) retrieval;
} else if (retrieval instanceof IAdaptable) {
- retrievalExtension = (IMemoryBlockRetrievalExtension) ((IAdaptable) retrieval)
+ retrievalExtension = ((IAdaptable) retrieval)
.getAdapter(IMemoryBlockRetrievalExtension.class);
}
if (retrievalExtension != null) {
diff --git a/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/Rendering.java b/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/Rendering.java
index a3af958d28..05b5fb8245 100755
--- a/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/Rendering.java
+++ b/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/Rendering.java
@@ -605,7 +605,7 @@ public class Rendering extends Composite implements IDebugEventSetListener {
protected IMemoryBlockExtension getMemoryBlock() {
IMemoryBlock block = fParent.getMemoryBlock();
if (block != null)
- return (IMemoryBlockExtension) block.getAdapter(IMemoryBlockExtension.class);
+ return block.getAdapter(IMemoryBlockExtension.class);
return null;
}
diff --git a/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/RenderingAddressInfo.java b/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/RenderingAddressInfo.java
index 4ca6e60250..09d7ed74cc 100644
--- a/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/RenderingAddressInfo.java
+++ b/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/RenderingAddressInfo.java
@@ -225,7 +225,7 @@ public class RenderingAddressInfo extends Rendering implements IDebugContextList
if (context instanceof IAdaptable) {
IAdaptable adaptable = (IAdaptable) context;
- final IMemoryBlockAddressInfoRetrieval addrInfo = ((IMemoryBlockAddressInfoRetrieval) adaptable
+ final IMemoryBlockAddressInfoRetrieval addrInfo = (adaptable
.getAdapter(IMemoryBlockAddressInfoRetrieval.class));
if (addrInfo == null) {
diff --git a/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/TraditionalRendering.java b/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/TraditionalRendering.java
index c9767e2845..ff75ae5832 100644
--- a/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/TraditionalRendering.java
+++ b/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/TraditionalRendering.java
@@ -415,7 +415,7 @@ public class TraditionalRendering extends AbstractMemoryRendering implements IRe
super.activated();
IWorkbench workbench = PlatformUI.getWorkbench();
- ICommandService commandSupport = (ICommandService) workbench.getAdapter(ICommandService.class);
+ ICommandService commandSupport = workbench.getAdapter(ICommandService.class);
if (commandSupport != null) {
Command gotoCommand = commandSupport.getCommand(ID_GO_TO_ADDRESS_COMMAND);
@@ -449,7 +449,7 @@ public class TraditionalRendering extends AbstractMemoryRendering implements IRe
@Override
public void deactivated() {
IWorkbench workbench = PlatformUI.getWorkbench();
- ICommandService commandSupport = (ICommandService) workbench.getAdapter(ICommandService.class);
+ ICommandService commandSupport = workbench.getAdapter(ICommandService.class);
if (commandSupport != null) {
// remove handler
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/AbstractQtPDOMClass.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/AbstractQtPDOMClass.java
index 6776497b29..fabed2893d 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/AbstractQtPDOMClass.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/AbstractQtPDOMClass.java
@@ -63,7 +63,7 @@ public abstract class AbstractQtPDOMClass extends QtPDOMBinding {
IBinding cppBinding = getPDOM().findBinding(cppName);
if (cppBinding != null) {
- IPDOMBinding cppPDOMBinding = (IPDOMBinding) cppBinding.getAdapter(IPDOMBinding.class);
+ IPDOMBinding cppPDOMBinding = cppBinding.getAdapter(IPDOMBinding.class);
if (cppPDOMBinding != null) {
if (cppPDOMBinding.getLinkage() != null
&& cppPDOMBinding.getLinkage().getLinkageID() == ILinkage.CPP_LINKAGE_ID)
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMASTProcessor.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMASTProcessor.java
index dc9a872edf..7dc290d65b 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMASTProcessor.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMASTProcessor.java
@@ -21,7 +21,7 @@ import org.eclipse.core.runtime.CoreException;
public class QtPDOMASTProcessor extends IPDOMASTProcessor.Abstract {
@Override
public int process(IASTTranslationUnit ast, IIndexSymbols symbols) throws CoreException {
- ast.accept(new QtASTVisitor(symbols, (LocationMap) ast.getAdapter(LocationMap.class)));
+ ast.accept(new QtASTVisitor(symbols, ast.getAdapter(LocationMap.class)));
return ILinkage.QT_LINKAGE_ID;
}
}
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMLinkage.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMLinkage.java
index 4eb826d5ae..253fa534b9 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMLinkage.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMLinkage.java
@@ -126,7 +126,7 @@ public class QtPDOMLinkage extends PDOMLinkage {
return null;
// If a binding has already been persisted for this instance then return it now.
- QtPDOMBinding pdomBinding = (QtPDOMBinding) binding.getAdapter(QtPDOMBinding.class);
+ QtPDOMBinding pdomBinding = binding.getAdapter(QtPDOMBinding.class);
if (pdomBinding != null && pdomBinding.getLinkage() == this)
return pdomBinding;
@@ -149,7 +149,7 @@ public class QtPDOMLinkage extends PDOMLinkage {
if (binding == null)
return 0;
- IPDOMBinding pdomBinding = (IPDOMBinding) binding.getAdapter(IPDOMBinding.class);
+ IPDOMBinding pdomBinding = binding.getAdapter(IPDOMBinding.class);
if (pdomBinding == null)
return 0;
diff --git a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMQObject.java b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMQObject.java
index 3446571419..5fcaaaefb1 100644
--- a/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMQObject.java
+++ b/qt/org.eclipse.cdt.qt.core/src/org/eclipse/cdt/internal/qt/core/pdom/QtPDOMQObject.java
@@ -133,7 +133,7 @@ public class QtPDOMQObject extends AbstractQtPDOMClass {
if (baseCls == null)
continue;
- PDOMBinding pdomBinding = (PDOMBinding) baseCls.getAdapter(PDOMBinding.class);
+ PDOMBinding pdomBinding = baseCls.getAdapter(PDOMBinding.class);
QtPDOMQObject baseQObj = ASTNameReference.findFromBinding(QtPDOMQObject.class, pdomBinding);
if (baseQObj != null)
bases.add(baseQObj);
diff --git a/qt/org.eclipse.cdt.qt.ui.tests/src/org/eclipse/cdt/qt/tests/QtRegressionTests.java b/qt/org.eclipse.cdt.qt.ui.tests/src/org/eclipse/cdt/qt/tests/QtRegressionTests.java
index 729ed46442..55e2d3eb5b 100644
--- a/qt/org.eclipse.cdt.qt.ui.tests/src/org/eclipse/cdt/qt/tests/QtRegressionTests.java
+++ b/qt/org.eclipse.cdt.qt.ui.tests/src/org/eclipse/cdt/qt/tests/QtRegressionTests.java
@@ -369,7 +369,7 @@ public class QtRegressionTests extends BaseQtTestCase {
assertNotNull(page);
IEditorPart editor = IDE.openEditor(page, file, CUIPlugin.EDITOR_ID);
assertNotNull(editor);
- CEditor ceditor = (CEditor) editor.getAdapter(CEditor.class);
+ CEditor ceditor = editor.getAdapter(CEditor.class);
assertNotNull(ceditor);
// NOTE: This offset relies on the above comment being exactly as expected. If it is edited,
diff --git a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/QObjectDeclarationCompletion.java b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/QObjectDeclarationCompletion.java
index f9d8f6e93f..473afce493 100644
--- a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/QObjectDeclarationCompletion.java
+++ b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/QObjectDeclarationCompletion.java
@@ -60,7 +60,7 @@ public class QObjectDeclarationCompletion {
}
private static Position getPosition(ICEditorContentAssistInvocationContext context) {
- ITextEditor textEditor = (ITextEditor) context.getEditor().getAdapter(ITextEditor.class);
+ ITextEditor textEditor = context.getEditor().getAdapter(ITextEditor.class);
if (textEditor == null)
return null;
diff --git a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/assist/QPropertyAttributeProposal.java b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/assist/QPropertyAttributeProposal.java
index 8767bee2eb..c64b5d1494 100644
--- a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/assist/QPropertyAttributeProposal.java
+++ b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/assist/QPropertyAttributeProposal.java
@@ -467,7 +467,7 @@ public class QPropertyAttributeProposal {
if (binding == null)
return null;
- return (ICPPClassType) binding.getAdapter(ICPPClassType.class);
+ return binding.getAdapter(ICPPClassType.class);
} catch (CoreException e) {
Activator.log(e);
}
diff --git a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/editor/QMLHyperlinkDetector.java b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/editor/QMLHyperlinkDetector.java
index 1c830b3cfc..de8a3cb723 100644
--- a/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/editor/QMLHyperlinkDetector.java
+++ b/qt/org.eclipse.cdt.qt.ui/src/org/eclipse/cdt/internal/qt/ui/editor/QMLHyperlinkDetector.java
@@ -23,7 +23,7 @@ public class QMLHyperlinkDetector extends AbstractHyperlinkDetector {
// TODO is length of region ever > 0?
IRegion wordRegion = QMLEditor.findWord(textViewer.getDocument(), region.getOffset());
if (wordRegion != null) {
- ITextEditor editor = (ITextEditor) getAdapter(ITextEditor.class);
+ ITextEditor editor = getAdapter(ITextEditor.class);
return new IHyperlink[] { new QMLHyperlink(wordRegion, textViewer, editor) };
}
return null;
diff --git a/remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/core/RemoteCommandLauncher.java b/remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/core/RemoteCommandLauncher.java
index 97c2ec2eac..52359e8fd0 100644
--- a/remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/core/RemoteCommandLauncher.java
+++ b/remote/org.eclipse.cdt.remote.core/src/org/eclipse/cdt/remote/core/RemoteCommandLauncher.java
@@ -151,7 +151,7 @@ public class RemoteCommandLauncher implements ICommandLauncher {
fLocalLauncher = localLauncher;
}
if (getProject() != null) {
- IRemoteResource remRes = (IRemoteResource) getProject().getAdapter(IRemoteResource.class);
+ IRemoteResource remRes = getProject().getAdapter(IRemoteResource.class);
if (remRes != null) {
URI uri = remRes.getActiveLocationURI();
IRemoteServicesManager remoteServicesManager = Activator.getService(IRemoteServicesManager.class);
diff --git a/visualizer/org.eclipse.cdt.visualizer.core/src/org/eclipse/cdt/visualizer/core/ExtensionElement.java b/visualizer/org.eclipse.cdt.visualizer.core/src/org/eclipse/cdt/visualizer/core/ExtensionElement.java
index 7bedb65711..61c1faee6c 100755
--- a/visualizer/org.eclipse.cdt.visualizer.core/src/org/eclipse/cdt/visualizer/core/ExtensionElement.java
+++ b/visualizer/org.eclipse.cdt.visualizer.core/src/org/eclipse/cdt/visualizer/core/ExtensionElement.java
@@ -113,7 +113,7 @@ public class ExtensionElement {
for (int i = 0; i < argumentsLength; ++i) {
argumentTypes[i] = (arguments[i] == null) ? NullType.class : arguments[i].getClass();
}
- Constructor<?> constructor = (Constructor<?>) instance.getConstructor(argumentTypes);
+ Constructor<?> constructor = instance.getConstructor(argumentTypes);
// Invoke the constructor.
result = (T) constructor.newInstance(arguments);
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/VirtualBoundsGraphicObject.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/VirtualBoundsGraphicObject.java
index acb692ae51..b24b59f7f3 100644
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/VirtualBoundsGraphicObject.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/canvas/VirtualBoundsGraphicObject.java
@@ -234,9 +234,9 @@ public class VirtualBoundsGraphicObject extends GraphicObject {
float ow = 0.0f;
float oh = 0.0f;
- ox = (float) this.getBounds().x
+ ox = this.getBounds().x
+ childsVirtualBounds.x * ((float) this.getBounds().width / (this.getVirtualBounds().width));
- oy = (float) this.getBounds().y
+ oy = this.getBounds().y
+ childsVirtualBounds.y * ((float) this.getBounds().height / this.getVirtualBounds().height);
ow = ((float) childsVirtualBounds.width / this.getVirtualBounds().width) * this.getBounds().width;
oh = ((float) childsVirtualBounds.height / this.getVirtualBounds().height) * this.getBounds().height;
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/ListenerList.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/ListenerList.java
index 7126718f46..35c25ecee6 100755
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/ListenerList.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/ListenerList.java
@@ -110,7 +110,7 @@ abstract public class ListenerList {
}
int count = (listeners == null) ? 0 : listeners.size();
for (int i = 0; i < count; i++) {
- Object listener = (Object) listeners.get(i);
+ Object listener = listeners.get(i);
try {
raise(listener, event);
} catch (Throwable t) {
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionUtils.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionUtils.java
index f84b3a2943..b9cde13336 100644
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionUtils.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/util/SelectionUtils.java
@@ -113,7 +113,7 @@ public class SelectionUtils {
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
result = structuredSelection.size();
} else if (selection instanceof ISelection) {
- result = ((ISelection) selection).isEmpty() ? 0 : 1;
+ result = selection.isEmpty() ? 0 : 1;
}
// collections are not ISelections, this just makes the method a little more generic
else if (selection instanceof Collection) {
@@ -135,7 +135,7 @@ public class SelectionUtils {
List<Object> result = null;
if (selection instanceof IStructuredSelection) {
IStructuredSelection structuredSelection = (IStructuredSelection) selection;
- result = new ArrayList<Object>((List<?>) structuredSelection.toList());
+ result = new ArrayList<Object>(structuredSelection.toList());
} else if (selection instanceof Collection) {
Collection<?> collection = (Collection<?>) selection;
result = new ArrayList<Object>(collection);
@@ -260,7 +260,7 @@ public class SelectionUtils {
result = workbench.getActiveWorkbenchWindow();
if (result == null) {
if (workbench.getWorkbenchWindowCount() > 0) {
- result = (IWorkbenchWindow) workbench.getWorkbenchWindows()[0];
+ result = workbench.getWorkbenchWindows()[0];
}
}
}
diff --git a/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/c/XlcCParser.java b/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/c/XlcCParser.java
index b886f2f2b4..72b62e87b0 100644
--- a/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/c/XlcCParser.java
+++ b/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/c/XlcCParser.java
@@ -169,7 +169,7 @@ public class XlcCParser extends PrsStream
}
public PrsStream getParseStream() {
- return (PrsStream) this;
+ return this;
}
//
@@ -200,7 +200,7 @@ public class XlcCParser extends PrsStream
public void parser(Monitor monitor, int error_repair_count) {
try {
- btParser = new FixedBacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this);
+ btParser = new FixedBacktrackingParser(monitor, this, prs, this);
} catch (NotBacktrackParseTableException e) {
throw new Error(
new NotBacktrackParseTableException("Regenerate XlcCParserprs.java with -BACKTRACK option"));
diff --git a/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/cpp/XlcCPPParser.java b/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/cpp/XlcCPPParser.java
index bdd9032c9e..4d05f69e37 100644
--- a/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/cpp/XlcCPPParser.java
+++ b/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/internal/core/lrparser/xlc/cpp/XlcCPPParser.java
@@ -171,7 +171,7 @@ public class XlcCPPParser extends PrsStream
}
public PrsStream getParseStream() {
- return (PrsStream) this;
+ return this;
}
//
@@ -202,7 +202,7 @@ public class XlcCPPParser extends PrsStream
public void parser(Monitor monitor, int error_repair_count) {
try {
- btParser = new FixedBacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this);
+ btParser = new FixedBacktrackingParser(monitor, this, prs, this);
} catch (NotBacktrackParseTableException e) {
throw new Error(
new NotBacktrackParseTableException("Regenerate XlcCPPParserprs.java with -BACKTRACK option"));
diff --git a/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/XLCompilerPropertyPage.java b/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/XLCompilerPropertyPage.java
index 8e55e62e63..c44882f9b4 100644
--- a/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/XLCompilerPropertyPage.java
+++ b/xlc/org.eclipse.cdt.managedbuilder.xlc.ui/src/org/eclipse/cdt/managedbuilder/xlc/ui/properties/XLCompilerPropertyPage.java
@@ -82,7 +82,7 @@ public class XLCompilerPropertyPage extends FieldEditorPreferencePage implements
addField(fPathEditor);
- IProject project = ((IResource) (getElement().getAdapter(IResource.class))).getProject();
+ IProject project = (getElement().getAdapter(IResource.class)).getProject();
String currentPath = null;
@@ -106,7 +106,7 @@ public class XLCompilerPropertyPage extends FieldEditorPreferencePage implements
protected void createVersionEditor() {
- IProject project = ((IResource) (getElement().getAdapter(IResource.class))).getProject();
+ IProject project = (getElement().getAdapter(IResource.class)).getProject();
String[] versionEntries = { PreferenceConstants.P_XL_COMPILER_VERSION_8_NAME,
PreferenceConstants.P_XL_COMPILER_VERSION_9_NAME, PreferenceConstants.P_XL_COMPILER_VERSION_10_NAME,
PreferenceConstants.P_XL_COMPILER_VERSION_11_NAME };
@@ -181,7 +181,7 @@ public class XLCompilerPropertyPage extends FieldEditorPreferencePage implements
public boolean performOk() {
// store the value in the owner text field
try {
- IProject project = ((IResource) (getElement().getAdapter(IResource.class))).getProject();
+ IProject project = (getElement().getAdapter(IResource.class)).getProject();
if (fPathEditor != null) {
project.setPersistentProperty(new QualifiedName("", //$NON-NLS-1$

Back to the top