Remove warnings caused by change to getAdaptable()
authorMarc Khouzam <marc.khouzam@ericsson.com>
Wed, 25 Mar 2015 14:58:12 +0000 (10:58 -0400)
committerMarc Khouzam <marc.khouzam@ericsson.com>
Wed, 25 Mar 2015 15:01:46 +0000 (11:01 -0400)
getAdaptable() in 4.5 M6 has changed to use generics, making casting its
result no longer necessary.

Change-Id: Idd943216a925576bb72c784b2c5a2a4b8e8b00d2
Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
270 files changed:
build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CygpathTranslator.java
build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/LocalTransferDropTargetListener.java
build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/BuildTargetAction.java
build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java
build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/views/MakeView.java
codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/CodanPartListener.java
codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/ToggleNatureAction.java
codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/BuildPropertyPage.java
codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java
codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java
codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/views/ProblemDetails.java
core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexUpdateTests.java
core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/AssemblyLanguage.java
core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Binary.java
core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CommitWorkingCopyOperation.java
core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/ast/tag/TagService.java
core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNode.java
core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java
core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVisitor.java
core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IndexFileSet.java
core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorName.java
core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorNode.java
core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MultiMacroExpansionExplorer.java
core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOM.java
core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMWriter.java
core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java
core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/AdapterUtil.java
core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/CygwinPEBinaryObject.java
core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/parser/GNUElfBinaryObject.java
core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/som/parser/SOMBinaryObject.java
core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/xcoff/parser/XCOFFBinaryObject.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CActionFilter.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/BlockCommentAction.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/DeleteResConfigsHandler.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/ExcludeFromBuildHandler.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/FindWordAction.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/GotoNextBookmarkAction.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/IndentAction.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/SelectionConverter.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePage.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHDropTargetListener.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHViewPart.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/BuildGroup.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CView.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/GotoActionGroup.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/MainActionGroup.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/OpenFileGroup.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/OpenProjectGroup.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/TextFieldNavigationHandler.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementLabelProvider.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathPropertyPage.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/IncludesSymbolsPropertyPage.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/FileTransferDragAdapter.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/ResourceTransferDragAdapter.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/ResourceTransferDropAdapter.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ASTProvider.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/AbstractCModelOutlinePage.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CDocumentProvider.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CElementHyperlinkDetector.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/DefaultBinaryFileEditor.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ExternalSearchDocumentProvider.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SpecificContentAssistAction.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SpecificContentAssistExecutor.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ToggleCommentAction.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/NamePatternFilter.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBConversions.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBViewPart.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/FileLanguageMappingPropertyPage.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/ProjectLanguageMappingPropertyPage.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/ProjectLanguageMappingWidget.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorBuildActionGroup.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorContentProvider.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorDropAdapterAssistant.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorLabelProvider.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorRefactorActionProvider.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/BuildLogPreferencePage.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CFileTypesPropertyPage.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistAdvancedConfigurationBlock.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/EditTemplateDialog.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/includes/IncludeOrganizer.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/RenameInformationPopup.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/TextSearchWrapper.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchResult.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindInWorkingSetAction.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/AbstractInformationControl.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionControl.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionExplorationControl.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistProcessor.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/KeywordCompletionProposalComputer.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CSelectAnnotationRulerAction.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CorrectionCommandHandler.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CorrectionCommandInstaller.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/proposals/ChangeCorrectionProposal.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/folding/DefaultCFoldingStructureProvider.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/typehierarchy/THDropTargetListener.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/typehierarchy/THViewPart.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/AbstractResourceActionHandler.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/EditorUtility.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/RemoteTreeViewer.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CDTContextActivator.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CElementImageProvider.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CElementLabels.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/WorkingSetFilter.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardUtil.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/filewizard/AbstractFileCreationWizardPage.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/CElementWorkingSetPage.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetConfigurationsPage.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetPropertyTester.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetProxy.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CDTUITools.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementSorter.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/ChangeBuildConfigActionBase.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/GenerateActionGroup.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/CHelpConfigurationPropertyPage.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/IndexerOptionPropertyPage.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/Page_head_general.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/AsmSourceViewerConfiguration.java
core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/CSourceViewerConfiguration.java
core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/ProjectSelectionPage.java
core/org.eclipse.cdt.ui/utils.ui/org/eclipse/cdt/utils/ui/controls/FileListControl.java
cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RSEHelper.java
debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/debug/application/ApplicationActionBarAdvisor.java
debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/internal/debug/application/CompilerOptionParser.java
debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java
debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/SessionManager.java
debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/executables/StandardSourceFileRemapping.java
debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/executables/StandardSourceFilesProvider.java
debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugElement.java
debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java
debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CMemoryBlockExtension.java
debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CRegisterGroup.java
debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CStackFrame.java
debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CThread.java
debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/Disassembly.java
debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyBlock.java
debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyRetrieval.java
debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupParticipant.java
debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceNotFoundElement.java
debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/srcfinder/CSourceFinder.java
debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/SetAutoSolibActionDelegate.java
debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/OptionsPropertyPage.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugUIUtils.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/EvaluationContextManager.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddGlobalsActionDelegate.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableVariablesActionDelegate.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/LoadSymbolsForAllActionDelegate.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/MoveToLineActionDelegate.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/MoveToLineAdapter.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/NumberFormatsContribution.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RemoveAllGlobalsActionDelegate.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RemoveGlobalsActionDelegate.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ResumeAtLineActionDelegate.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ResumeAtLineAdapter.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RetargetAction.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RunToLineAdapter.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ShowFullPathsAction.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleInstructionStepModeActionDelegate.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ViewFilterAction.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/CAddBreakpointInteractiveRulerAction.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/CAddDynamicPrintfInteractiveRulerAction.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleBreakpointAdapter.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleCBreakpointsTargetFactory.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointContext.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointFilteringPage.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/ThreadFilterEditor.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/AbstractRegisterGroupCommandHandler.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/ReverseToggleCommandHandler.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/commands/DisassemblyDisplayModeHandler.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/commands/SetSteppingModeHandler.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/CDIDisassemblyRetrieval.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/editor/DisassemblyEditor.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/editor/DisassemblyEditorManager.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/rendering/DisassemblyEditorInput.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/rendering/DisassemblyMemoryRendering.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentAnnotationProvider.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentContentProvider.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentLabelProvider.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DebugTextHover.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DelegatingDebugTextHover.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/CDebugElementProxyFactory.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CPropertyTester.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/DebugContextPinProvider.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/PinCloneUtils.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/CDebugPreferencePage.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/CSourceNotFoundEditor.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceContainerWorkbenchAdapter.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceDisplayAdapter.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/AddMemoryBlocks.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModuleContentProvider.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModuleLabelProvider.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModuleMementoProvider.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/signals/FlexibleSignalsView.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/ActionsPropertyPage.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/LogAction.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/ResumeAction.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/ReverseDebugAction.java
debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/AbstractToggleBreakpointAdapter.java
dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbPinProvider.java
dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/DsfLoadSymbolsCommandHandler.java
dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/ReverseDebuggingPropertyTester.java
dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/CBreakpointGdbThreadFilterPage.java
dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GDBDynamicPrintfPropertyPage.java
dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GDBTracepointPropertyPage.java
dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/GdbReverseToggleCommand.java
dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/ConsolePageParticipant.java
dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/TracepointActionsPropertyPage.java
dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/TraceControlView.java
dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/commands/RetargetDebugContextCommand.java
dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/GdbMemoryBlockRetrieval.java
dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java
dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2.java
dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/StartOrRestartProcessSequence_7_0.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/ToggleBreakpointsTargetFactory.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/actions/DisassemblyMoveToLineAdapter.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/actions/DisassemblyResumeAtLineAdapter.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/actions/DisassemblyRunToLineAdapter.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyBackendDsf.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyToggleBreakpointTester.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/SourceColorerJob.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/AbstractDisassemblyRulerActionDelegate.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/RulerToggleBreakpointHandler.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/BreakpointsAnnotationModel.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/presentation/CSourcePresentationCreator.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/provisional/DisassemblySelection.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPane.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/AbstractDsfDebugTextHover.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfCommandRunnable.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfStepIntoSelectionHyperlinkDetector.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/actions/AbstractVMProviderActionDelegate.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/actions/DefaultRefreshAllTarget.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/actions/VMHandlerUtils.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMNode.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionsChangedUpdateTester.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/WatchExpressionCellModifier.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/SyncVariableDataAccess.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/VariableCellModifier.java
dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/PropertiesBasedLabelProvider.java
dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/internal/provisional/model/MemoryBlockRetrievalFactory.java
dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/model/DsfMemoryBlockRetrieval.java
dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/breakpoints/PDABreakpointAdapter.java
dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/breakpoints/PDAEditorAdapterFactory.java
dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/PDAExpressionVMProvider.java
dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TriggerCellModifier.java
dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/debug/vm/launch/VMTest1.java
launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/refactoring/ResourceRenameParticipant.java
lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/lpgextensions/FixedBacktrackingParser.java
lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99ExpressionParser.java
lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99NoCastExpressionParser.java
lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99Parser.java
lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99SizeofExpressionParser.java
lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPExpressionParser.java
lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPNoCastExpressionParser.java
lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPNoFunctionDeclaratorParser.java
lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPParser.java
lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPSizeofExpressionParser.java
lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPTemplateTypeParameterParser.java
lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/gcc/GCCParser.java
lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/gcc/GCCSizeofExpressionParser.java
lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/gpp/GPPParser.java
lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/gpp/GPPSizeofExpressionParser.java
memory/org.eclipse.cdt.debug.ui.memory.floatingpoint/src/org/eclipse/cdt/debug/ui/memory/floatingpoint/FPRendering.java
memory/org.eclipse.cdt.debug.ui.memory.floatingpoint/src/org/eclipse/cdt/debug/ui/memory/floatingpoint/Rendering.java
memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java

index 3dca63c..8f12d1c 100644 (file)
@@ -53,7 +53,7 @@ public class CygpathTranslator {
                        for (int i = 0; i < parserRef.length; i++) {
                                try {
                                        IBinaryParser parser = CoreModelUtil.getBinaryParser(parserRef[i]);
-                                       ICygwinToolsFactroy cygwinToolFactory = (ICygwinToolsFactroy) parser.getAdapter(ICygwinToolsFactroy.class);
+                                       ICygwinToolsFactroy cygwinToolFactory = parser.getAdapter(ICygwinToolsFactroy.class);
                                        if (cygwinToolFactory != null) {
                                                cygPath = cygwinToolFactory.getCygPath();
                                        }
index 59a72c1..7f9a2dc 100644 (file)
@@ -209,7 +209,7 @@ public class LocalTransferDropTargetListener extends AbstractContainerAreaDropAd
                                continue;
                        } else if (isConvertibleToFile(element)) {
                                IAdaptable a = (IAdaptable)element;
-                               IFile file = (IFile)a.getAdapter(IFile.class);
+                               IFile file = a.getAdapter(IFile.class);
                                String fileName = file.getName();
                                String fileLocation = file.getLocation().toString();
 
index b216a50..260565b 100644 (file)
@@ -44,7 +44,7 @@ public class BuildTargetAction extends AbstractTargetAction {
 
        @Override
        public void init(IAction action) {
-               bindingService = (IBindingService) PlatformUI.getWorkbench().getService(IBindingService.class);
+               bindingService = PlatformUI.getWorkbench().getService(IBindingService.class);
                if (bindingService != null) {
                        bindingService.addBindingManagerListener(bindingManagerListener);
                        String keyBinding = bindingService.getBestActiveBindingFormattedFor(TARGET_BUILD_COMMAND);
index a5f3ece..3ee7885 100644 (file)
@@ -267,7 +267,7 @@ public class UpdateMakeProjectAction implements IWorkbenchWindowActionDelegate {
                if (fSelection instanceof IStructuredSelection) {
                        Object sel = ((IStructuredSelection) fSelection).getFirstElement();
                        if (sel instanceof IAdaptable) {
-                               IResource res = (IResource) ((IAdaptable) sel).getAdapter(IResource.class);
+                               IResource res = ((IAdaptable) sel).getAdapter(IResource.class);
                                try {
                                        if (res instanceof IProject && isOldProject((IProject) res)) {
                                                enabled = true;
index 8c0e5df..d1e4339 100644 (file)
@@ -152,7 +152,7 @@ public class MakeView extends ViewPart {
 
                updateActions((IStructuredSelection)fViewer.getSelection());
 
-               bindingService = (IBindingService) PlatformUI.getWorkbench().getService(IBindingService.class);
+               bindingService = PlatformUI.getWorkbench().getService(IBindingService.class);
                if (bindingService != null) {
                        bindingService.addBindingManagerListener(bindingManagerListener);
                }
index 9798681..01d8cc9 100644 (file)
@@ -61,7 +61,7 @@ class CodanPartListener implements IPartListener2 {
                                };
                        }
                        editor.addPostSaveListener(postSaveListener);
-                       IResource resource = (IResource) editor.getEditorInput().getAdapter(IResource.class);
+                       IResource resource = editor.getEditorInput().getAdapter(IResource.class);
                        processResource(resource, CheckerLaunchMode.RUN_ON_FILE_OPEN);
                }
        }
index 9a29c25..45a89c1 100644 (file)
@@ -36,7 +36,7 @@ public class ToggleNatureAction implements IObjectActionDelegate {
                                if (element instanceof IProject) {
                                        project = (IProject) element;
                                } else if (element instanceof IAdaptable) {
-                                       project = (IProject) ((IAdaptable) element).getAdapter(IProject.class);
+                                       project = ((IAdaptable) element).getAdapter(IProject.class);
                                }
                                if (project != null) {
                                        toggleNature(project, !hasCodanNature(project));
index 2f976f5..ae0d380 100644 (file)
@@ -72,7 +72,7 @@ public class BuildPropertyPage extends FieldEditorPreferencePage implements IWor
        @Override
        public IAdaptable getElement() {
                if (element.getAdapter(IProject.class) != null)
-                       return (IProject) element.getAdapter(IProject.class);
+                       return element.getAdapter(IProject.class);
                return null;
        }
 
index 1abbd53..1c76a41 100644 (file)
@@ -256,7 +256,7 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements IWork
                for (IEditorReference partRef : page.getEditorReferences()) {
                        IEditorPart editor = partRef.getEditor(false);
                        if (editor instanceof ICEditor) {
-                               IFile file = (IFile) editor.getEditorInput().getAdapter(IFile.class);
+                               IFile file = editor.getEditorInput().getAdapter(IFile.class);
                                if (file != null && resource.getFullPath().isPrefixOf(file.getFullPath())) {
                                        filesToUpdate.add(file);
                                }
index 39b860b..8c3a33b 100644 (file)
@@ -125,7 +125,7 @@ public abstract class FieldEditorOverlayPage extends FieldEditorPreferencePage i
                if (element == null)
                        return element;
                if (!(element instanceof IProject))
-                       return (IAdaptable) element.getAdapter(IProject.class);
+                       return element.getAdapter(IProject.class);
                return element;
        }
 
index 02bbfb8..8ff9b3d 100644 (file)
@@ -105,7 +105,7 @@ public class ProblemDetails extends ViewPart {
                description = new Link(area, SWT.WRAP);
                description.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
                description.addSelectionListener(linkSelAdapter);
-               ISelectionService ser = (ISelectionService) getSite().getService(ISelectionService.class);
+               ISelectionService ser = getSite().getService(ISelectionService.class);
                ser.addSelectionListener(new ISelectionListener() {
                        @Override
                        public void selectionChanged(IWorkbenchPart part, ISelection selection) {
@@ -125,7 +125,7 @@ public class ProblemDetails extends ViewPart {
                        Object firstElement = ((IStructuredSelection) selection).getFirstElement();
                        IMarker marker = null;
                        if (firstElement instanceof IAdaptable) {
-                               marker = (IMarker) ((IAdaptable) firstElement).getAdapter(IMarker.class);
+                               marker = ((IAdaptable) firstElement).getAdapter(IMarker.class);
                        } else if (firstElement instanceof IMarker) {
                                marker = (IMarker) firstElement;
                        }
index 69fbb52..7478912 100644 (file)
@@ -802,7 +802,7 @@ public class IndexUpdateTests extends IndexTestBase {
                        assertEquals(0, tpars[0].getParameterID());
                        assertEquals("T", tpars[0].getName());
                        assertNull(tpars[0].getDefaultValue());
-                       pdomid= ((PDOMNode)((IAdaptable) tpars[0]).getAdapter(PDOMNode.class)).getRecord();
+                       pdomid= ((IAdaptable) tpars[0]).getAdapter(PDOMNode.class).getRecord();
                } finally {
                        fIndex.releaseReadLock();
                }
@@ -902,7 +902,7 @@ public class IndexUpdateTests extends IndexTestBase {
                        assertTrue(tpars[0] instanceof ICPPTemplateTypeParameter);
                        assertEquals(0, tpars[0].getParameterID());
                        assertEquals("U", tpars[0].getName());
-                       assertEquals(pdomid, ((PDOMNode)((IAdaptable) tpars[0]).getAdapter(PDOMNode.class)).getBindingID());
+                       assertEquals(pdomid, ((IAdaptable) tpars[0]).getAdapter(PDOMNode.class).getBindingID());
                } finally {
                        fIndex.releaseReadLock();
                }
index f0899e5..37eff2c 100644 (file)
@@ -63,7 +63,7 @@ public class AssemblyLanguage extends AbstractLanguage implements IAsmLanguage,
        @Override
        public IContributedModelBuilder createModelBuilder(ITranslationUnit tu) {
                IContributedModelBuilder modelBuilder= null;
-               IContributedModelBuilder.Factory modelBuilderFactory= (IContributedModelBuilder.Factory)getAdapter(IContributedModelBuilder.Factory.class);
+               IContributedModelBuilder.Factory modelBuilderFactory= getAdapter(IContributedModelBuilder.Factory.class);
                if (modelBuilderFactory != null) {
                        modelBuilder= modelBuilderFactory.create(tu);
                }
index f918f7f..bb2dd24 100644 (file)
@@ -71,7 +71,7 @@ public class Binary extends Openable implements IBinary {
        }
 
        private boolean determineShowInBinaryContainer(IBinaryObject bin) {
-               BinaryFilePresentation presentation= (BinaryFilePresentation) bin.getAdapter(BinaryFilePresentation.class);
+               BinaryFilePresentation presentation= bin.getAdapter(BinaryFilePresentation.class);
                if (presentation != null) {
                        return presentation.showInBinaryContainer();
                }
@@ -314,7 +314,7 @@ public class Binary extends Openable implements IBinary {
                // Try to get the list of source files used to build the binary from the
                // symbol information.
 
-               ISymbolReader symbolreader = (ISymbolReader)obj.getAdapter(ISymbolReader.class);
+               ISymbolReader symbolreader = obj.getAdapter(ISymbolReader.class);
                if (symbolreader == null)
                        return false;
 
index f5d6e20..13b66a2 100644 (file)
@@ -100,10 +100,10 @@ public class CommitWorkingCopyOperation extends CModelOperation {
             ITextFileBuffer tuFileBuffer= null;
             ITextFileBuffer wcFileBuffer= null;
             if (tuBuffer instanceof IAdaptable) {
-                tuFileBuffer= (ITextFileBuffer) ((IAdaptable) tuBuffer).getAdapter(ITextFileBuffer.class);
+                tuFileBuffer= ((IAdaptable) tuBuffer).getAdapter(ITextFileBuffer.class);
             }
             if (wcBuffer instanceof IAdaptable) {
-                wcFileBuffer= (ITextFileBuffer) ((IAdaptable) wcBuffer).getAdapter(ITextFileBuffer.class);
+                wcFileBuffer= ((IAdaptable) wcBuffer).getAdapter(ITextFileBuffer.class);
             }
             
             if (wcFileBuffer != null) {
index c09acba..a59770e 100644 (file)
@@ -27,7 +27,7 @@ public class TagService implements ITagService {
                        return null;
 
                // Let the binding adapt to its own tag reader
-               ITagReader tagReader = (ITagReader) binding.getAdapter(ITagReader.class);
+               ITagReader tagReader = binding.getAdapter(ITagReader.class);
                if (tagReader != null)
                        return tagReader;
 
index a00915c..e0952e8 100644 (file)
@@ -137,7 +137,7 @@ public abstract class ASTNode implements IASTNode {
                if (length != 0) {
                        final IASTTranslationUnit tu= getTranslationUnit();
                        if (tu != null) {
-                               ILocationResolver l= (ILocationResolver) tu.getAdapter(ILocationResolver.class);
+                               ILocationResolver l= tu.getAdapter(ILocationResolver.class);
                                if (l != null) {
                                        locations= l.getLocations(getOffset(), length);
                                }
@@ -152,7 +152,7 @@ public abstract class ASTNode implements IASTNode {
     public IASTImageLocation getImageLocation() {
        final IASTTranslationUnit tu= getTranslationUnit();
        if (tu != null) {
-               ILocationResolver l= (ILocationResolver) tu.getAdapter(ILocationResolver.class);
+               ILocationResolver l= tu.getAdapter(ILocationResolver.class);
                if (l != null) {
                        return l.getImageLocation(getOffset(), length);
                }
@@ -165,7 +165,7 @@ public abstract class ASTNode implements IASTNode {
        final IASTFileLocation floc= originalNode.getFileLocation();
         final IASTTranslationUnit ast = originalNode.getTranslationUnit();
         if (floc != null && ast != null) {
-               ILocationResolver lr= (ILocationResolver) ast.getAdapter(ILocationResolver.class);
+               ILocationResolver lr= ast.getAdapter(ILocationResolver.class);
                if (lr != null) {
                        return lr.getUnpreprocessedSignature(floc);
                }
@@ -206,7 +206,7 @@ public abstract class ASTNode implements IASTNode {
         }
         IASTTranslationUnit ast = getTranslationUnit();
         if (ast != null) {
-               ILocationResolver lr= (ILocationResolver) ast.getAdapter(ILocationResolver.class);
+               ILocationResolver lr= ast.getAdapter(ILocationResolver.class);
                if (lr != null) {
                        fileLocation= lr.getMappedFileLocation(offset, length);
                } else {
@@ -221,7 +221,7 @@ public abstract class ASTNode implements IASTNode {
        public boolean isPartOfTranslationUnitFile() {
         IASTTranslationUnit ast = getTranslationUnit();
         if (ast != null) {
-               ILocationResolver lr= (ILocationResolver) ast.getAdapter(ILocationResolver.class);
+               ILocationResolver lr= ast.getAdapter(ILocationResolver.class);
                if (lr != null) {
                        return lr.isPartOfTranslationUnitFile(getOffset());
                }
@@ -232,7 +232,7 @@ public abstract class ASTNode implements IASTNode {
     public boolean isPartOfSourceFile() {
         IASTTranslationUnit ast = getTranslationUnit();
         if (ast != null) {
-               ILocationResolver lr= (ILocationResolver) ast.getAdapter(ILocationResolver.class);
+               ILocationResolver lr= ast.getAdapter(ILocationResolver.class);
                if (lr != null) {
                        return lr.isPartOfSourceFile(getOffset());
                }
@@ -310,7 +310,7 @@ public abstract class ASTNode implements IASTNode {
        if (!(tu instanceof ASTNode))
                throw new UnsupportedOperationException();
 
-       ILocationResolver lr= (ILocationResolver) tu.getAdapter(ILocationResolver.class);
+       ILocationResolver lr= tu.getAdapter(ILocationResolver.class);
        if (lr == null)
                throw new UnsupportedOperationException();
 
@@ -341,7 +341,7 @@ public abstract class ASTNode implements IASTNode {
        }
 
        char[] txt= lr.getUnpreprocessedSignature(total);
-       Lexer lex= new Lexer(txt, (LexerOptions) tu.getAdapter(LexerOptions.class), ILexerLog.NULL, null);
+       Lexer lex= new Lexer(txt, tu.getAdapter(LexerOptions.class), ILexerLog.NULL, null);
        try {
                        Token result= null;
                        Token last= null;
index df63b03..31b635a 100644 (file)
@@ -517,7 +517,7 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser {
     }
 
        protected final boolean isOnSameLine(int offset1, int offset2) {
-               ILocationResolver lr= (ILocationResolver) getTranslationUnit().getAdapter(ILocationResolver.class);
+               ILocationResolver lr= getTranslationUnit().getAdapter(ILocationResolver.class);
                IASTFileLocation floc= lr.getMappedFileLocation(offset1, offset2-offset1+1);
                return floc.getFileName().equals(lr.getContainingFilePath(offset1)) &&
                        floc.getStartingLineNumber() == floc.getEndingLineNumber();
index 38814e9..431ed11 100644 (file)
@@ -1093,7 +1093,7 @@ public class CVisitor extends ASTQueries {
                        tu= ((IASTInternalScope) scope).getPhysicalNode().getTranslationUnit();
                }
                if (tu != null) {
-                       final IIndexFileSet fs= (IIndexFileSet) tu.getAdapter(IIndexFileSet.class);
+                       final IIndexFileSet fs= tu.getAdapter(IIndexFileSet.class);
                        if (fs != null) {
                                fileSet= fs;
                        }
index 9852e90..907f9b9 100644 (file)
@@ -145,7 +145,7 @@ public class IndexFileSet implements IIndexFileSet {
                                if (binding instanceof IIndexFragmentBinding) {
                                        fb= (IIndexFragmentBinding) binding;
                                } else {
-                                       fb= (IIndexFragmentBinding) binding.getAdapter(IIndexFragmentBinding.class);
+                                       fb= binding.getAdapter(IIndexFragmentBinding.class);
                                }
                                try {
                                        if (fb != null && fb.isFileLocal()) {
index 2255fe4..fb3ed15 100644 (file)
@@ -229,7 +229,7 @@ class ASTMacroReferenceName extends ASTPreprocessorName {
                if (fImageLocationInfo != null) {
                        IASTTranslationUnit tu= getTranslationUnit();
                        if (tu != null) {
-                               LocationMap lr= (LocationMap) tu.getAdapter(LocationMap.class);
+                               LocationMap lr= tu.getAdapter(LocationMap.class);
                                if (lr != null) {
                                        return fImageLocationInfo.createLocation(lr, fImageLocationInfo);
                                }
index f3bd5e0..fc6cc1b 100644 (file)
@@ -68,7 +68,7 @@ abstract class ASTPreprocessorNode extends ASTNode {
        protected char[] getSource(int offset, int length) {
                final IASTTranslationUnit ast= getTranslationUnit();
         if (ast != null) {
-               ILocationResolver lr= (ILocationResolver) ast.getAdapter(ILocationResolver.class);
+               ILocationResolver lr= ast.getAdapter(ILocationResolver.class);
                if (lr != null) {
                        final IASTFileLocation loc= lr.getMappedFileLocation(offset, length);
                        if (loc != null) {
@@ -126,7 +126,7 @@ class ASTComment extends ASTPreprocessorNode implements IASTComment {
        public int getOffset() {
                if (fFilePath != null) {
                        // Perform lazy conversion to sequence number.
-                       ILocationResolver lr= (ILocationResolver) getTranslationUnit().getAdapter(ILocationResolver.class);
+                       ILocationResolver lr= getTranslationUnit().getAdapter(ILocationResolver.class);
                        if (lr != null) {
                                setOffset(lr.getSequenceNumberForFileOffset(fFilePath, super.getOffset()));
                                fFilePath= null;
@@ -552,7 +552,7 @@ class ASTMacroDefinition extends ASTPreprocessorNode implements IASTPreprocessor
                if (fExpansionNumber >= 0) {
                        IASTTranslationUnit ast = getTranslationUnit();
                        if (ast != null) {
-                               ILocationResolver lr= (ILocationResolver) ast.getAdapter(ILocationResolver.class);
+                               ILocationResolver lr= ast.getAdapter(ILocationResolver.class);
                                if (lr != null) {
                                        return lr.getMappedFileLocation(fExpansionNumber, getOffset() + getLength() - fExpansionNumber);
                                }
index bf6ae71..61c8847 100644 (file)
@@ -111,14 +111,14 @@ public class MultiMacroExpansionExplorer extends MacroExpansionExplorer {
                                fDelegates[++didx]= new SingleMacroExpansionExplorer(new String(fSource, from, to - from), 
                                                refs.toArray(new IASTName[refs.size()]), fMacroLocations,
                                                fFilePath, refLoc.getStartingLineNumber(), isPPCond, 
-                                               (LexerOptions) tu.getAdapter(LexerOptions.class));
+                                               tu.getAdapter(LexerOptions.class));
                        }
                }
                fBoundaries[++bidx]= fSource.length;
        }
 
        private ILocationResolver getResolver(IASTTranslationUnit tu) {
-               final ILocationResolver resolver = (ILocationResolver) tu.getAdapter(ILocationResolver.class);
+               final ILocationResolver resolver = tu.getAdapter(ILocationResolver.class);
                if (resolver == null) {
                        throw new IllegalArgumentException();
                }
index 5eea0bf..1f23c60 100644 (file)
@@ -1128,7 +1128,7 @@ public class PDOM extends PlatformObject implements IPDOM {
                if (binding == null) {
                        return null;
                }
-               PDOMNode pdomNode= (PDOMNode) binding.getAdapter(PDOMNode.class);
+               PDOMNode pdomNode= binding.getAdapter(PDOMNode.class);
                if (pdomNode instanceof IIndexFragmentBinding && pdomNode.getPDOM() == this) {
                        return (IIndexFragmentBinding) pdomNode;
                }
index 724d21f..c2b268f 100644 (file)
@@ -491,7 +491,7 @@ public abstract class PDOMWriter implements IPDOMASTProcessor {
                ast.accept(visitor);
 
                if ((fSkipReferences & SKIP_MACRO_REFERENCES) == 0) {
-                       LocationMap lm= (LocationMap) ast.getAdapter(LocationMap.class);
+                       LocationMap lm= ast.getAdapter(LocationMap.class);
                        if (lm != null) {
                                IASTName[] refs= lm.getMacroReferences();
                                for (IASTName name : refs) {
index 835fc40..e098a56 100644 (file)
@@ -204,7 +204,7 @@ public abstract class PDOMLinkage extends PDOMNamedNode implements IIndexLinkage
        }
        
        protected final PDOMBinding attemptFastAdaptBinding(final IBinding binding) throws CoreException {
-               PDOMBinding pdomBinding= (PDOMBinding) binding.getAdapter(PDOMBinding.class);
+               PDOMBinding pdomBinding= binding.getAdapter(PDOMBinding.class);
                // There is no guarantee, that the binding is from the same PDOM object.
                if (pdomBinding != null && pdomBinding.getPDOM() == getPDOM()) {
                        return pdomBinding;
index ad1c4a7..846b80f 100644 (file)
@@ -32,7 +32,7 @@ public class AdapterUtil {
                        return (T) object;
 
                if (object instanceof IAdaptable)
-                       return (T) ((IAdaptable) object).getAdapter(type);
+                       return ((IAdaptable) object).getAdapter(type);
 
                return null;
        }
index 84b9806..28b024b 100644 (file)
@@ -100,7 +100,7 @@ public class CygwinPEBinaryObject extends PEBinaryObject {
        }
 
        private Addr2line getAddr2line() {
-               ICygwinToolsFactroy factory = (ICygwinToolsFactroy)getBinaryParser().getAdapter(ICygwinToolsFactroy.class);
+               ICygwinToolsFactroy factory = getBinaryParser().getAdapter(ICygwinToolsFactroy.class);
                if (factory != null) {
                        return factory.getAddr2line(getPath());
                }
@@ -113,7 +113,7 @@ public class CygwinPEBinaryObject extends PEBinaryObject {
         * @see org.eclipse.cdt.utils.BinaryObjectAdapter#getCPPFilt()
         */
        protected CPPFilt getCPPFilt() {
-               ICygwinToolsFactroy factory = (ICygwinToolsFactroy)getBinaryParser().getAdapter(ICygwinToolsFactroy.class);
+               ICygwinToolsFactroy factory = getBinaryParser().getAdapter(ICygwinToolsFactroy.class);
                if (factory != null) {
                        return factory.getCPPFilt();
                }
@@ -126,7 +126,7 @@ public class CygwinPEBinaryObject extends PEBinaryObject {
         * @see org.eclipse.cdt.utils.BinaryObjectAdapter#getObjdump()
         */
        protected Objdump getObjdump() {
-               ICygwinToolsFactroy factory = (ICygwinToolsFactroy)getBinaryParser().getAdapter(ICygwinToolsFactroy.class);
+               ICygwinToolsFactroy factory = getBinaryParser().getAdapter(ICygwinToolsFactroy.class);
                if (factory != null) {
                        return factory.getObjdump(getPath());
                }
@@ -134,7 +134,7 @@ public class CygwinPEBinaryObject extends PEBinaryObject {
        }
 
        protected CygPath getCygPath() {
-               ICygwinToolsFactroy factory = (ICygwinToolsFactroy)getBinaryParser().getAdapter(ICygwinToolsFactroy.class);
+               ICygwinToolsFactroy factory = getBinaryParser().getAdapter(ICygwinToolsFactroy.class);
                if (factory != null) {
                        return factory.getCygPath();
                }
@@ -144,7 +144,7 @@ public class CygwinPEBinaryObject extends PEBinaryObject {
        /**
         */
        protected NM getNM() {
-               ICygwinToolsFactroy factory = (ICygwinToolsFactroy)getBinaryParser().getAdapter(ICygwinToolsFactroy.class);
+               ICygwinToolsFactroy factory = getBinaryParser().getAdapter(ICygwinToolsFactroy.class);
                if (factory != null) {
                        return factory.getNM(getPath());
                }
index 4af997b..f787daa 100644 (file)
@@ -97,7 +97,7 @@ public class GNUElfBinaryObject extends ElfBinaryObject {
        }
 
        private Addr2line getAddr2line() {
-               IGnuToolFactory factory = (IGnuToolFactory)getBinaryParser().getAdapter(IGnuToolFactory.class);
+               IGnuToolFactory factory = getBinaryParser().getAdapter(IGnuToolFactory.class);
                if (factory != null) {
                        return factory.getAddr2line(getPath());
                }
@@ -105,7 +105,7 @@ public class GNUElfBinaryObject extends ElfBinaryObject {
        }
  
        protected CPPFilt getCPPFilt() {
-               IGnuToolFactory factory = (IGnuToolFactory)getBinaryParser().getAdapter(IGnuToolFactory.class);
+               IGnuToolFactory factory = getBinaryParser().getAdapter(IGnuToolFactory.class);
                if (factory != null) {
                        return factory.getCPPFilt();
                }
@@ -113,7 +113,7 @@ public class GNUElfBinaryObject extends ElfBinaryObject {
        }
 
        protected Objdump getObjdump() {
-               IGnuToolFactory factory = (IGnuToolFactory)getBinaryParser().getAdapter(IGnuToolFactory.class);
+               IGnuToolFactory factory = getBinaryParser().getAdapter(IGnuToolFactory.class);
                if (factory != null) {
                        return factory.getObjdump(getPath());
                }
index e217c2d..c4ae5a9 100644 (file)
@@ -287,7 +287,7 @@ public class SOMBinaryObject extends BinaryObjectAdapter {
         * @return
         */
        private Addr2line getAddr2line() {
-               IGnuToolFactory factory = (IGnuToolFactory)getBinaryParser().getAdapter(IGnuToolFactory.class);
+               IGnuToolFactory factory = getBinaryParser().getAdapter(IGnuToolFactory.class);
                if (factory != null) {
                        return factory.getAddr2line(getPath());
                }
@@ -295,7 +295,7 @@ public class SOMBinaryObject extends BinaryObjectAdapter {
        }
 
        protected CPPFilt getCPPFilt() {
-               IGnuToolFactory factory = (IGnuToolFactory)getBinaryParser().getAdapter(IGnuToolFactory.class);
+               IGnuToolFactory factory = getBinaryParser().getAdapter(IGnuToolFactory.class);
                if (factory != null) {
                        return factory.getCPPFilt();
                }
@@ -303,7 +303,7 @@ public class SOMBinaryObject extends BinaryObjectAdapter {
        }
 
        protected Objdump getObjdump() {
-               IGnuToolFactory factory = (IGnuToolFactory)getBinaryParser().getAdapter(IGnuToolFactory.class);
+               IGnuToolFactory factory = getBinaryParser().getAdapter(IGnuToolFactory.class);
                if (factory != null) {
                        return factory.getObjdump(getPath());
                }
index 4975447..2a39d1e 100644 (file)
@@ -279,7 +279,7 @@ public class XCOFFBinaryObject extends BinaryObjectAdapter {
         * @return
         */
        private Addr2line getAddr2line() {
-               IGnuToolFactory factory = (IGnuToolFactory)getBinaryParser().getAdapter(IGnuToolFactory.class);
+               IGnuToolFactory factory = getBinaryParser().getAdapter(IGnuToolFactory.class);
                if (factory != null) {
                        return factory.getAddr2line(getPath());
                }
@@ -287,7 +287,7 @@ public class XCOFFBinaryObject extends BinaryObjectAdapter {
        }
 
        private CPPFilt getCPPFilt() {
-               IGnuToolFactory factory = (IGnuToolFactory)getBinaryParser().getAdapter(IGnuToolFactory.class);
+               IGnuToolFactory factory = getBinaryParser().getAdapter(IGnuToolFactory.class);
                if (factory != null) {
                        return factory.getCPPFilt();
                }
@@ -295,7 +295,7 @@ public class XCOFFBinaryObject extends BinaryObjectAdapter {
        }
 
        private Objdump getObjdump() {
-               IGnuToolFactory factory = (IGnuToolFactory)getBinaryParser().getAdapter(IGnuToolFactory.class);
+               IGnuToolFactory factory = getBinaryParser().getAdapter(IGnuToolFactory.class);
                if (factory != null) {
                        return factory.getObjdump(getPath());
                }
index a297259..67a7062 100644 (file)
@@ -30,7 +30,7 @@ public class CActionFilter implements IActionFilter {
                ICElement element = (ICElement) target;
                IResource resource = element.getResource();
                if (resource != null) {
-                       IActionFilter filter = (IActionFilter) resource.getAdapter(IActionFilter.class);
+                       IActionFilter filter = resource.getAdapter(IActionFilter.class);
                        if (filter != null) {
                                return filter.testAttribute(resource, name, value);
                        }
index 726b84d..9429701 100644 (file)
@@ -198,7 +198,7 @@ public abstract class BlockCommentAction extends TextEditorAction {
                else
                        return;
                
-               IRewriteTarget target= (IRewriteTarget)editor.getAdapter(IRewriteTarget.class);
+               IRewriteTarget target= editor.getAdapter(IRewriteTarget.class);
                if (target != null) {
                        target.beginCompoundChange();
                }
index 5694f23..bcfe8f0 100644 (file)
@@ -134,7 +134,7 @@ public class DeleteResConfigsHandler extends AbstractHandler {
                                if (editor != null) {
                                        IEditorInput input = editor.getEditorInput();
                                        if (input != null)
-                                               return (IFile) input.getAdapter(IFile.class);
+                                               return input.getAdapter(IFile.class);
                                }
                        }
                }
index e9a8578..10c6131 100644 (file)
@@ -153,7 +153,7 @@ public class ExcludeFromBuildHandler extends AbstractHandler {
                                if (editor != null) {
                                        IEditorInput input = editor.getEditorInput();
                                        if (input != null)
-                                               return (IFile) input.getAdapter(IFile.class);
+                                               return input.getAdapter(IFile.class);
                                }
                        }
                }
index 437aabe..6cc8b06 100644 (file)
@@ -73,7 +73,7 @@ public class FindWordAction extends TextEditorAction {
                if (document == null)
                        return;
                        
-               IResource resource = (IResource)(input).getAdapter(IResource.class);
+               IResource resource = (input).getAdapter(IResource.class);
                if (resource == null || !(resource instanceof IFile))
                        return;
 
index 99078e8..352fb58 100644 (file)
@@ -77,7 +77,7 @@ public class GotoNextBookmarkAction extends TextEditorAction {
                if (input == null)
                        return;
 
-               IResource resource = (IResource)(input).getAdapter(IResource.class);
+               IResource resource = (input).getAdapter(IResource.class);
                if (resource == null || !(resource instanceof IFile))
                        return;
 
index e407201..6360990 100644 (file)
@@ -115,7 +115,7 @@ public class IndentAction extends TextEditorAction {
                        Runnable runnable= new Runnable() {
                                @Override
                                public void run() {
-                                       IRewriteTarget target= (IRewriteTarget) getTextEditor().getAdapter(IRewriteTarget.class);
+                                       IRewriteTarget target= getTextEditor().getAdapter(IRewriteTarget.class);
                                        if (target != null)
                                                target.beginCompoundChange();
 
index ad4ce4e..d549d7b 100644 (file)
@@ -91,7 +91,7 @@ public class SelectionConverter {
                                if (e instanceof ICElement) {
                                        converted.add(e);
                                } else if (e instanceof IAdaptable) {
-                                       ICElement c = (ICElement) ((IAdaptable) e).getAdapter(ICElement.class);
+                                       ICElement c = ((IAdaptable) e).getAdapter(ICElement.class);
                                        if (c != null) {
                                                converted.add(c);
                                        } else if (keepNonCElements)
@@ -112,7 +112,7 @@ public class SelectionConverter {
                                if (e instanceof IResource) {
                                        converted.add(e);
                                } else if (e instanceof IAdaptable) {
-                                       IResource r = (IResource) ((IAdaptable) e).getAdapter(IResource.class);
+                                       IResource r = ((IAdaptable) e).getAdapter(IResource.class);
                                        if (r != null) {
                                                converted.add(r);
                                        }
@@ -128,7 +128,7 @@ public class SelectionConverter {
                        Object next = resources.next();
                        if (next instanceof IAdaptable) {
                                IAdaptable element = (IAdaptable) next;
-                               IResource resource = (IResource) element.getAdapter(IResource.class);
+                               IResource resource = element.getAdapter(IResource.class);
 
                                if (resource == null) {
                                        return false;
@@ -160,7 +160,7 @@ public class SelectionConverter {
                while (adaptables.hasNext()) {
                        Object next = adaptables.next();
                        if (next instanceof IAdaptable) {
-                               IResource resource = (IResource) ((IAdaptable) next).getAdapter(IResource.class);
+                               IResource resource = ((IAdaptable) next).getAdapter(IResource.class);
                                if (resource == null) {
                                        return null;
                                } else if (resourceIsType(resource, resourceMask)) {
index 78cfac6..084b9cc 100644 (file)
@@ -468,7 +468,7 @@ public class BuildConsolePage extends Page
                        if (input instanceof IResource) {
                                resource = (IResource)input;
                        } else {
-                               resource = (IResource)input.getAdapter(IResource.class);
+                               resource = input.getAdapter(IResource.class);
                        }
                        if (resource != null) {
                                project = resource.getProject();
index 3d57154..c0bb54f 100644 (file)
@@ -60,7 +60,7 @@ public class CHDropTargetListener implements DropTargetListener {
                                        return (ICElement) element;
                                }
                                if (element instanceof IAdaptable) {
-                                       ICElement adapter= (ICElement) ((IAdaptable) element).getAdapter(ICElement.class);
+                                       ICElement adapter= ((IAdaptable) element).getAdapter(ICElement.class);
                                        if (adapter != null) {
                                                return adapter;
                                        }
index 8899316..88ffa8c 100644 (file)
@@ -217,7 +217,7 @@ public class CHViewPart extends ViewPart {
         createActions();
         createContextMenu();
 
-               bindingService = (IBindingService) PlatformUI.getWorkbench().getService(IBindingService.class);
+               bindingService = PlatformUI.getWorkbench().getService(IBindingService.class);
                if (bindingService != null) {
                        bindingManagerListener = new IBindingManagerListener() {
                                @Override
@@ -237,7 +237,7 @@ public class CHViewPart extends ViewPart {
         
         initializeActionStates();
         
-       IContextService ctxService = (IContextService) getSite().getService(IContextService.class);
+       IContextService ctxService = getSite().getService(IContextService.class);
        if (ctxService != null) {
                fContextActivation= ctxService.activateContext(CUIPlugin.CVIEWS_SCOPE);
        }
@@ -281,7 +281,7 @@ public class CHViewPart extends ViewPart {
        @Override
        public void dispose() {
                if (fContextActivation != null) {
-                       IContextService ctxService = (IContextService)getSite().getService(IContextService.class);
+                       IContextService ctxService = getSite().getService(IContextService.class);
                        if (ctxService != null) {
                                ctxService.deactivateContext(fContextActivation);
                        }
index 1567d45..f6861ba 100644 (file)
@@ -66,7 +66,7 @@ public class BuildGroup extends CViewActionGroup {
            public void run() {
                // Ensure we correctly save files in all referenced projects before build
                Set<IProject> prjs = new HashSet<IProject>();
-               for (IResource resource : (List<IResource>)getSelectedResources()) {
+               for (IResource resource : getSelectedResources()) {
                        IProject project = resource.getProject();
                        if (project != null) {
                                prjs.add(project);
@@ -183,7 +183,7 @@ public class BuildGroup extends CViewActionGroup {
                        if (next instanceof IProject) {
                                project = (IProject) next;
                        } else if (next instanceof IAdaptable) {
-                               IResource res = (IResource)((IAdaptable)next).getAdapter(IResource.class);
+                               IResource res = ((IAdaptable)next).getAdapter(IResource.class);
                                if (res instanceof IProject) {
                                        project = (IProject) res;
                                }
index 433c21f..3be021b 100644 (file)
@@ -577,7 +577,7 @@ public class CView extends ViewPart implements ISetSelectionTarget, IPropertyCha
                }
                memento = null;
 
-       IContextService ctxService = (IContextService) getSite().getService(IContextService.class);
+       IContextService ctxService = getSite().getService(IContextService.class);
        if (ctxService != null) {
                fContextActivation= ctxService.activateContext(CUIPlugin.CVIEWS_SCOPE);
        }
@@ -607,7 +607,7 @@ public class CView extends ViewPart implements ISetSelectionTarget, IPropertyCha
        @Override
        public void dispose() {
                if (fContextActivation != null) {
-                       IContextService ctxService = (IContextService)getSite().getService(IContextService.class);
+                       IContextService ctxService = getSite().getService(IContextService.class);
                if (ctxService != null) {
                        ctxService.deactivateContext(fContextActivation);
                }
@@ -742,7 +742,7 @@ public class CView extends ViewPart implements ISetSelectionTarget, IPropertyCha
                                return ((IResource) o).getFullPath().makeRelative().toString();
                        } else if (o instanceof ICElement) {
                                ICElement celement = (ICElement) o;
-                               IResource res = (IResource) celement.getAdapter(IResource.class);
+                               IResource res = celement.getAdapter(IResource.class);
                                if (res != null) {
                                        return res.getFullPath().toString();
                                } else if (celement.getElementType() == ICElement.C_VCONTAINER) {
@@ -1085,7 +1085,7 @@ public class CView extends ViewPart implements ISetSelectionTarget, IPropertyCha
                }
                IEditorInput input = (IEditorInput) context.getInput();
                if (input != null) {
-                       IResource res = (IResource) input.getAdapter(IResource.class);
+                       IResource res = input.getAdapter(IResource.class);
                        if (res != null) {
                                selectReveal(new StructuredSelection(res));
                                return true;
index 74803f4..962fde4 100644 (file)
@@ -99,7 +99,7 @@ public class GotoActionGroup extends CViewActionGroup {
                        if (selection.size() == 1) {
                                Object object = selection.getFirstElement();
                                if (object instanceof IAdaptable) {
-                                       IResource resource = (IResource)((IAdaptable)object).getAdapter(IResource.class);
+                                       IResource resource = ((IAdaptable)object).getAdapter(IResource.class);
                                        if (resource instanceof IProject) {
                                                enable = ((IProject) resource).isOpen();
                                        } else if (resource instanceof IFolder) {
index a445f98..aec2b07 100644 (file)
@@ -263,7 +263,7 @@ public class MainActionGroup extends CViewActionGroup {
                Object obj = selection.getFirstElement();
                if (obj instanceof IAdaptable) {
                        IAdaptable element = (IAdaptable) obj;
-                       IResource resource = (IResource) element.getAdapter(IResource.class);
+                       IResource resource = element.getAdapter(IResource.class);
                        if (resource instanceof IFile) {
                                addBookmarkAction.selectionChanged(selection);
                                menu.add(addBookmarkAction);
index 2f81a17..7cc4859 100644 (file)
@@ -152,7 +152,7 @@ public class OpenFileGroup extends CViewActionGroup {
                        } catch (Exception e) {
                        }
                } else if (obj instanceof IAdaptable) {
-                       IResource element = (IResource)((IAdaptable)obj).getAdapter(IResource.class);
+                       IResource element = ((IAdaptable)obj).getAdapter(IResource.class);
                        if (element instanceof IFile) {
                                openFileAction.selectionChanged(selection);
                                openFileAction.run();
index 2fee3f2..2ae147c 100644 (file)
@@ -85,7 +85,7 @@ public class OpenProjectGroup extends CViewActionGroup {
                        if (next instanceof IProject) {
                                project = (IProject) next;
                        } else if (next instanceof IAdaptable) {
-                               IResource res = (IResource) ((IAdaptable) next).getAdapter(IResource.class);
+                               IResource res = ((IAdaptable) next).getAdapter(IResource.class);
                                if (res instanceof IProject) {
                                        project = (IProject)res;
                                }
index 26ddbab..7ab6bca 100644 (file)
@@ -364,8 +364,8 @@ public class TextFieldNavigationHandler {
 
                                                fSubmissions= new ArrayList<Submission>();
 
-                                               ICommandService commandService= (ICommandService) PlatformUI.getWorkbench().getAdapter(ICommandService.class);
-                                               IBindingService bindingService= (IBindingService) PlatformUI.getWorkbench().getAdapter(IBindingService.class);
+                                               ICommandService commandService= PlatformUI.getWorkbench().getAdapter(ICommandService.class);
+                                               IBindingService bindingService= PlatformUI.getWorkbench().getAdapter(IBindingService.class);
                                                if (commandService == null || bindingService == null)
                                                        return fSubmissions;
 
index 2e1f1b3..55787e6 100644 (file)
@@ -406,7 +406,7 @@ class CPElementLabelProvider extends LabelProvider implements IColorProvider {
                                        return CDTSharedImages.getImage(CDTSharedImages.IMG_OBJS_LIBRARY);
                                case -1 :
                                        IResource res = ((CPElementGroup)element).getResource();
-                                       IWorkbenchAdapter adapter = (IWorkbenchAdapter)res.getAdapter(IWorkbenchAdapter.class);
+                                       IWorkbenchAdapter adapter = res.getAdapter(IWorkbenchAdapter.class);
                                        ImageDescriptor imageDescriptor = adapter.getImageDescriptor(res);
                                        if (!res.exists()) {
                                                imageDescriptor = new CPListImageDescriptor(imageDescriptor, CPListImageDescriptor.WARNING, SMALL_SIZE);
index 0c5cf92..937128a 100644 (file)
@@ -149,7 +149,7 @@ public class CPathPropertyPage extends PropertyPage implements IStatusChangeList
        private IProject getProject() {
                IAdaptable adaptable = getElement();
                if (adaptable != null) {
-                       ICElement elem = (ICElement)adaptable.getAdapter(ICElement.class);
+                       ICElement elem = adaptable.getAdapter(ICElement.class);
                        if (elem instanceof ICProject) {
                                return ((ICProject)elem).getProject();
                        }
index edfc05f..148d9fc 100644 (file)
@@ -167,7 +167,7 @@ public class IncludesSymbolsPropertyPage extends PropertyPage implements IStatus
        private IProject getProject() {
                IAdaptable adaptable = getElement();
                if (adaptable != null) {
-                       IResource resource = (IResource)adaptable.getAdapter(IResource.class);
+                       IResource resource = adaptable.getAdapter(IResource.class);
                        return resource.getProject();
                }
                return null;
@@ -176,7 +176,7 @@ public class IncludesSymbolsPropertyPage extends PropertyPage implements IStatus
        protected ICElement getCElement() {
                IAdaptable adaptable = getElement();
                if (adaptable != null) {
-                       ICElement elem = (ICElement)adaptable.getAdapter(ICElement.class);
+                       ICElement elem = adaptable.getAdapter(ICElement.class);
                        return elem;
                }
                return null;
index c166352..bf6ea51 100644 (file)
@@ -136,7 +136,7 @@ public class FileTransferDragAdapter implements TransferDragSourceListener {
                                if (object instanceof IResource) {
                                        resource = (IResource) object;
                                } else if (object instanceof IAdaptable) {
-                                       resource = (IResource) ((IAdaptable) object).getAdapter(IResource.class);
+                                       resource = ((IAdaptable) object).getAdapter(IResource.class);
                                }
 
                                if (resource != null)
index ce129bf..d461e4d 100644 (file)
@@ -114,7 +114,7 @@ public class ResourceTransferDragAdapter implements TransferDragSourceListener {
                                        resource = (IResource)element;
                                } else if (element instanceof IAdaptable) {
                                        IAdaptable adaptable = (IAdaptable) element;
-                                       resource = (IResource) adaptable.getAdapter(IResource.class);
+                                       resource = adaptable.getAdapter(IResource.class);
                                }
                                if (resource != null) {
                                        resources.add(resource);
index c8c9025..b7ba2d6 100644 (file)
@@ -146,7 +146,7 @@ public class ResourceTransferDropAdapter extends CDTViewerDropAdapter implements
                                }
                                else if (o instanceof IAdaptable) {
                                        IAdaptable a = (IAdaptable) o;
-                                       IResource r = (IResource) a.getAdapter(IResource.class);
+                                       IResource r = a.getAdapter(IResource.class);
                                        if (r != null) {
                                                selectedResources.add(r);
                                        }
index 494bc39..5293ade 100644 (file)
@@ -237,7 +237,7 @@ public final class ASTProvider {
        private void activeEditorChanged(IWorkbenchPart editor) {
                ITranslationUnit tu = null;
                if (editor != null) {
-                       ITranslationUnitHolder provider = (ITranslationUnitHolder) editor.getAdapter(ITranslationUnitHolder.class);
+                       ITranslationUnitHolder provider = editor.getAdapter(ITranslationUnitHolder.class);
                        if (provider != null)
                                tu = provider.getTranslationUnit();
                }
index e514bee..e2d7f68 100644 (file)
@@ -526,7 +526,7 @@ public abstract class AbstractCModelOutlinePage extends Page
                fTreeViewer.setInput(fInput);
                PlatformUI.getWorkbench().getHelpSystem().setHelp(control, ICHelpContextIds.COUTLINE_VIEW);
                
-               IHandlerService handlerService= (IHandlerService) site.getService(IHandlerService.class);
+               IHandlerService handlerService= site.getService(IHandlerService.class);
                handlerService.activateHandler(CollapseAllHandler.COMMAND_ID, new ActionHandler(fCollapseAllAction));
        }
 
index 40eeb77..fd48c8c 100644 (file)
@@ -776,7 +776,7 @@ public class CDocumentProvider extends TextFileDocumentProvider {
                        original = input.getTranslationUnit();
                } else if (element instanceof IAdaptable) {
                        IAdaptable adaptable= (IAdaptable) element;
-                       ILocationProvider locationProvider= (ILocationProvider) adaptable.getAdapter(ILocationProvider.class);
+                       ILocationProvider locationProvider= adaptable.getAdapter(ILocationProvider.class);
                        if (locationProvider instanceof ILocationProviderExtension) {
                                URI uri= ((ILocationProviderExtension) locationProvider).getURI(element);
                                original= createTranslationUnit(uri);
index 9025483..c7fc670 100644 (file)
@@ -182,7 +182,7 @@ public class CElementHyperlinkDetector extends AbstractHyperlinkDetector {
        }
 
        private static boolean isLanguageKeyword(ILanguage lang, String word) {
-               ICLanguageKeywords keywords= (ICLanguageKeywords) lang.getAdapter(ICLanguageKeywords.class);
+               ICLanguageKeywords keywords= lang.getAdapter(ICLanguageKeywords.class);
                if (keywords != null) {
                        for (String keyword : keywords.getKeywords()) {
                                if (keyword.equals(word))
index 28eaddd..05bcfdd 100644 (file)
@@ -120,10 +120,10 @@ public class DefaultBinaryFileEditor extends AbstractTextEditor implements IReso
                @Override
                public IStorage getStorage() throws CoreException {
                        if (fStorage == null) {
-                               IBinaryParser.IBinaryObject object = (IBinaryParser.IBinaryObject) fBinary
+                               IBinaryParser.IBinaryObject object = fBinary
                                                .getAdapter(IBinaryParser.IBinaryObject.class);
                                if (object != null) {
-                                       IGnuToolFactory factory = (IGnuToolFactory) object.getBinaryParser().getAdapter(
+                                       IGnuToolFactory factory = object.getBinaryParser().getAdapter(
                                                        IGnuToolFactory.class);
                                        if (factory != null) {
                                                Objdump objdump = factory.getObjdump(object.getPath());
index 8b03ce4..fbd83ab 100644 (file)
@@ -83,7 +83,7 @@ public class ExternalSearchDocumentProvider extends TextFileDocumentProvider {
                }
                if (element instanceof IAdaptable) {
                        IAdaptable adaptable= (IAdaptable) element;
-                       ILocationProvider provider = (ILocationProvider) adaptable.getAdapter(ILocationProvider.class);
+                       ILocationProvider provider = adaptable.getAdapter(ILocationProvider.class);
                        if (provider != null) {
                                IPath location = provider.getPath(element);
                                if (location != null) {
index 278f342..c8ce0df 100644 (file)
@@ -98,7 +98,7 @@ final class SpecificContentAssistAction extends Action implements IUpdate {
        private boolean computeEnablement(ITextEditor editor) {
                if (editor == null)
                        return false;
-               ITextOperationTarget target= (ITextOperationTarget) editor.getAdapter(ITextOperationTarget.class);
+               ITextOperationTarget target= editor.getAdapter(ITextOperationTarget.class);
                boolean hasContentAssist= target != null && target.canDoOperation(ISourceViewer.CONTENTASSIST_PROPOSALS);
                if (!hasContentAssist)
                        return false;
index 0bbd56c..1e58620 100644 (file)
@@ -63,7 +63,7 @@ public final class SpecificContentAssistExecutor {
                }
                
                try {
-                       ITextOperationTarget target= (ITextOperationTarget) editor.getAdapter(ITextOperationTarget.class);
+                       ITextOperationTarget target= editor.getAdapter(ITextOperationTarget.class);
                        if (target != null && target.canDoOperation(ISourceViewer.CONTENTASSIST_PROPOSALS))
                                target.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS);
                } finally {
index f90ebb3..47110d3 100644 (file)
@@ -313,7 +313,7 @@ public final class ToggleCommentAction extends TextEditorAction {
 
                ITextEditor editor= getTextEditor();
                if (fOperationTarget == null && editor != null)
-                       fOperationTarget= (ITextOperationTarget) editor.getAdapter(ITextOperationTarget.class);
+                       fOperationTarget= editor.getAdapter(ITextOperationTarget.class);
 
                boolean isEnabled= (fOperationTarget != null && fOperationTarget.canDoOperation(ITextOperationTarget.PREFIX) &&
                                fOperationTarget.canDoOperation(ITextOperationTarget.STRIP_PREFIX));
index 7caba73..e4fb45f 100644 (file)
@@ -58,11 +58,11 @@ public class NamePatternFilter extends ViewerFilter {
                        matchName= ((ICElement) element).getElementName();
                } else if (element instanceof IAdaptable) {
                        IAdaptable adaptable= (IAdaptable) element;
-                       ICElement javaElement= (ICElement)adaptable.getAdapter(ICElement.class);
+                       ICElement javaElement= adaptable.getAdapter(ICElement.class);
                        if (javaElement != null)
                                matchName= javaElement.getElementName();
                        else {
-                               IResource resource= (IResource)adaptable.getAdapter(IResource.class);
+                               IResource resource= adaptable.getAdapter(IResource.class);
                                if (resource != null)
                                        matchName= resource.getName();
                        }
index d3fc56d..f41cc46 100644 (file)
@@ -82,16 +82,16 @@ public class IBConversions {
         }
         if (object instanceof IAdaptable) {
             IAdaptable adaptable = (IAdaptable) object;
-            ITranslationUnit result= (ITranslationUnit) adaptable.getAdapter(ITranslationUnit.class);
+            ITranslationUnit result= adaptable.getAdapter(ITranslationUnit.class);
             if (result != null) {
                 return result;
             }
-            IFile file= (IFile) adaptable.getAdapter(IFile.class);
+            IFile file= adaptable.getAdapter(IFile.class);
             if (file != null) {
                 return CoreModelUtil.findTranslationUnit(file);
             }
 
-            ILocationProvider locProvider= (ILocationProvider) adaptable.getAdapter(ILocationProvider.class);
+            ILocationProvider locProvider= adaptable.getAdapter(ILocationProvider.class);
             if (locProvider != null) {
                IPath path= locProvider.getPath(locProvider);
                if (path != null) {
index 1ac63c3..03f9935 100644 (file)
@@ -291,7 +291,7 @@ public class IBViewPart extends ViewPart implements IShowInSource, IShowInTarget
         createActions();
         createContextMenu();
 
-               bindingService = (IBindingService) PlatformUI.getWorkbench().getService(IBindingService.class);
+               bindingService = PlatformUI.getWorkbench().getService(IBindingService.class);
                if (bindingService != null) {
                        bindingManagerListener = new IBindingManagerListener() {
                                @Override
@@ -314,7 +314,7 @@ public class IBViewPart extends ViewPart implements IShowInSource, IShowInTarget
         restoreInput();
         fMemento= null;
 
-       IContextService ctxService = (IContextService) getSite().getService(IContextService.class);
+       IContextService ctxService = getSite().getService(IContextService.class);
        if (ctxService != null) {
                fContextActivation= ctxService.activateContext(CUIPlugin.CVIEWS_SCOPE);
        }
@@ -326,7 +326,7 @@ public class IBViewPart extends ViewPart implements IShowInSource, IShowInTarget
        public void dispose() {
                putDialogSettings();
                if (fContextActivation != null) {
-                       IContextService ctxService = (IContextService)getSite().getService(IContextService.class);
+                       IContextService ctxService = getSite().getService(IContextService.class);
                        if (ctxService != null) {
                                ctxService.deactivateContext(fContextActivation);
                        }
index 9bc26f3..7517051 100644 (file)
@@ -350,7 +350,7 @@ public class FileLanguageMappingPropertyPage extends PropertyPage {
        }
        
        private IFile getFile() {
-               return (IFile) getElement().getAdapter(IFile.class);
+               return getElement().getAdapter(IFile.class);
        }
 
        @Override
index 4792319..b801e83 100644 (file)
@@ -190,6 +190,6 @@ public class ProjectLanguageMappingPropertyPage extends PropertyPage {
        }
 
        private IProject getProject() {
-               return (IProject) getElement().getAdapter(IProject.class);
+               return getElement().getAdapter(IProject.class);
        }
 }
index 316f9dd..a93f8d8 100644 (file)
@@ -115,7 +115,7 @@ public class ProjectLanguageMappingWidget extends LanguageMappingWidget {
                addButton.addListener(SWT.Selection, new Listener() {
                        @Override
                        public void handleEvent(Event event) {
-                               IProject project = (IProject) getElement().getAdapter(IProject.class);
+                               IProject project = getElement().getAdapter(IProject.class);
                                ICProjectDescription description = CoreModel.getDefault().getProjectDescription(project, false);
                                ICConfigurationDescription[] configurations = description.getConfigurations();
                                ProjectContentTypeMappingDialog dialog = new ProjectContentTypeMappingDialog(fContents.getShell(), configurations);
@@ -213,7 +213,7 @@ public class ProjectLanguageMappingWidget extends LanguageMappingWidget {
 
                IContentTypeManager contentTypeManager = Platform.getContentTypeManager();
 
-               IProject project = (IProject) getElement().getAdapter(IProject.class);
+               IProject project = getElement().getAdapter(IProject.class);
                ICProjectDescription description = CoreModel.getDefault().getProjectDescription(project, false);
 
                while (mappings.hasNext()) {
index 3121c21..4094fa4 100644 (file)
@@ -96,7 +96,7 @@ public class CNavigatorBuildActionGroup extends AbstractCNavigatorActionGroup {
                        if (next instanceof IProject) {
                                project= (IProject) next;
                        } else if (next instanceof IAdaptable) {
-                               IResource res= (IResource)((IAdaptable)next).getAdapter(IResource.class);
+                               IResource res= ((IAdaptable)next).getAdapter(IResource.class);
                                if (res instanceof IProject) {
                                        project= (IProject) res;
                                }
index 46041a8..c137356 100644 (file)
@@ -280,7 +280,7 @@ public class CNavigatorContentProvider extends CViewContentProvider implements I
                        if (element instanceof IResource) {
                                resource= (IResource)element;
                        } else if (element instanceof IAdaptable) {
-                               resource= (IResource)((IAdaptable)element).getAdapter(IResource.class);
+                               resource= ((IAdaptable)element).getAdapter(IResource.class);
                        }
                        if (resource != null) {
                                int i= elementList.indexOf(resource);
index 2826ff0..505ff09 100644 (file)
@@ -520,7 +520,7 @@ public class CNavigatorDropAdapterAssistant extends CommonDropAdapterAssistant {
                                selectedResources.add(o);
                        } else if (o instanceof IAdaptable) {
                                IAdaptable a = (IAdaptable) o;
-                               IResource r = (IResource) a.getAdapter(IResource.class);
+                               IResource r = a.getAdapter(IResource.class);
                                if (r != null) {
                                        selectedResources.add(r);
                                }
index 83b877d..c96da43 100644 (file)
@@ -80,7 +80,7 @@ public class CNavigatorLabelProvider extends CViewLabelProvider implements IComm
                        return ((IResource) element).getFullPath().makeRelative().toString();
                } else if (element instanceof ICElement) {
                        ICElement celement = (ICElement) element;
-                       IResource res = (IResource) celement.getAdapter(IResource.class);
+                       IResource res = celement.getAdapter(IResource.class);
                        if (res != null) {
                                return res.getFullPath().toString();
                        } else if (celement.getElementType() == ICElement.C_VCONTAINER) {
index 27da16e..28d135a 100644 (file)
@@ -50,7 +50,7 @@ public class CNavigatorRefactorActionProvider extends CommonActionProvider {
                if (workbenchSite != null) {
                        final IWorkbenchPartSite partSite= workbenchSite.getSite();
                        resourceRefactorGroup= new CNavigatorRefactorActionGroup(partSite, (Tree)actionSite.getStructuredViewer().getControl());
-                       IUndoContext workspaceContext= (IUndoContext) ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class);
+                       IUndoContext workspaceContext= ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class);
                        undoRedoGroup = new UndoRedoActionGroup(partSite, workspaceContext, true);
                        cElementRefactorGroup= new CRefactoringActionGroup(workbenchSite.getPart());
                }
index 42539fb..395de63 100644 (file)
@@ -156,7 +156,7 @@ public class BuildLogPreferencePage extends PropertyPage implements ICOptionCont
                if (elem instanceof IProject) {
                        project= (IProject) elem;
                } else if (elem != null) {
-                       project= (IProject) elem.getAdapter(IProject.class);
+                       project= elem.getAdapter(IProject.class);
                }
                return project;
        }
index a1f3965..181a574 100644 (file)
@@ -209,7 +209,7 @@ public class CFileTypesPropertyPage extends PropertyPage {
                if (element instanceof IProject) {
                        project = (IProject) element;
                } else if (element instanceof IAdaptable) {
-                       project= (IProject) ((IAdaptable)element).getAdapter(IProject.class);
+                       project= ((IAdaptable)element).getAdapter(IProject.class);
                }
                return project;
        }
index bfdbdbf..f8e6559 100644 (file)
@@ -266,7 +266,7 @@ final class CodeAssistAdvancedConfigurationBlock extends OptionsConfigurationBlo
                
                ModelElement(CompletionProposalCategory category, PreferenceModel model) {
                        fCategory= category;
-                       ICommandService commandSvc= (ICommandService) PlatformUI.getWorkbench().getAdapter(ICommandService.class);
+                       ICommandService commandSvc= PlatformUI.getWorkbench().getAdapter(ICommandService.class);
                        fCommand= commandSvc.getCommand("org.eclipse.cdt.ui.specific_content_assist.command"); //$NON-NLS-1$
                        IParameter type;
                        try {
@@ -406,7 +406,7 @@ final class CodeAssistAdvancedConfigurationBlock extends OptionsConfigurationBlo
        }
 
        private void createDefaultLabel(Composite composite, int h_span) {
-           final ICommandService commandSvc= (ICommandService) PlatformUI.getWorkbench().getAdapter(ICommandService.class);
+           final ICommandService commandSvc= PlatformUI.getWorkbench().getAdapter(ICommandService.class);
                final Command command= commandSvc.getCommand(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
                ParameterizedCommand pCmd= new ParameterizedCommand(command, null);
                String key= getKeyboardShortcut(pCmd);
@@ -727,7 +727,7 @@ final class CodeAssistAdvancedConfigurationBlock extends OptionsConfigurationBlo
        private static BindingManager fgLocalBindingManager;
        static {
                fgLocalBindingManager= new BindingManager(new ContextManager(), new CommandManager());
-               final IBindingService bindingService= (IBindingService)PlatformUI.getWorkbench().getService(IBindingService.class);
+               final IBindingService bindingService= PlatformUI.getWorkbench().getService(IBindingService.class);
                final Scheme[] definedSchemes= bindingService.getDefinedSchemes();
                if (definedSchemes != null) {
                        try {
@@ -745,7 +745,7 @@ final class CodeAssistAdvancedConfigurationBlock extends OptionsConfigurationBlo
        }
 
        private static String getKeyboardShortcut(ParameterizedCommand command) {
-               IBindingService bindingService= (IBindingService) PlatformUI.getWorkbench().getAdapter(IBindingService.class);
+               IBindingService bindingService= PlatformUI.getWorkbench().getAdapter(IBindingService.class);
                fgLocalBindingManager.setBindings(bindingService.getBindings());
                try {
                        Scheme activeScheme= bindingService.getActiveScheme();
index 92f354f..c59bec3 100644 (file)
@@ -479,7 +479,7 @@ public class EditTemplateDialog extends StatusDialog {
 
        private void initializeActions() {
                final ArrayList<IHandlerActivation> handlerActivations= new ArrayList<IHandlerActivation>(3);
-               final IHandlerService handlerService= (IHandlerService) PlatformUI.getWorkbench().getAdapter(IHandlerService.class);
+               final IHandlerService handlerService= PlatformUI.getWorkbench().getAdapter(IHandlerService.class);
                getShell().addDisposeListener(new DisposeListener() {
                        @Override
                        public void widgetDisposed(DisposeEvent e) {
index dc5f0e7..42905eb 100644 (file)
@@ -820,11 +820,11 @@ public class IncludeOrganizer {
                        IIndexName[] indexNames;
                        if (binding instanceof IMacroBinding) {
                                indexNames = IIndexName.EMPTY_ARRAY;
-                       ILocationResolver resolver = (ILocationResolver) ast.getAdapter(ILocationResolver.class);
+                       ILocationResolver resolver = ast.getAdapter(ILocationResolver.class);
                        IASTName[] declarations = resolver.getDeclarations((IMacroBinding) binding);
                        for (IASTName name : declarations) {
                                if (name instanceof IAdaptable) {
-                                       IIndexName indexName = (IIndexName) ((IAdaptable) name).getAdapter(IIndexName.class);
+                                       IIndexName indexName = ((IAdaptable) name).getAdapter(IIndexName.class);
                                        if (indexName != null) {
                                                indexNames = Arrays.copyOf(indexNames, indexNames.length + 1);
                                                indexNames[indexNames.length - 1] = indexName;
index 795e3ad..14ca88c 100644 (file)
@@ -823,7 +823,7 @@ public class RenameInformationPopup implements IWidgetTokenKeeper, IWidgetTokenK
         * @return the keybinding for Refactor &gt; Rename
         */
        private static String getOpenDialogBinding() {
-               IBindingService bindingService= (IBindingService)PlatformUI.getWorkbench().getAdapter(IBindingService.class);
+               IBindingService bindingService= PlatformUI.getWorkbench().getAdapter(IBindingService.class);
                if (bindingService == null)
                        return ""; //$NON-NLS-1$
                String binding= bindingService.getBestActiveBindingFormattedFor(ICEditorActionDefinitionIds.RENAME_ELEMENT);
index ff05f28..ed39d00 100644 (file)
@@ -69,7 +69,7 @@ public class TextSearchWrapper {
             ArrayList<IResource> resources = new ArrayList<IResource>();
             for (int i = 0; i < adaptables.length; i++) {
                 IAdaptable adaptable = adaptables[i];
-                IResource resource= (IResource) adaptable.getAdapter(IResource.class);
+                IResource resource= adaptable.getAdapter(IResource.class);
                 if (resource != null) {
                     resources.add(resource);
                 }
index 88b9d25..f5234f0 100644 (file)
@@ -89,7 +89,7 @@ public class CSearchResult extends AbstractTextSearchResult implements IEditorMa
                } else if (input instanceof IPathEditorInput) {
                        path= ((IPathEditorInput) input).getPath();
                } else {
-                       ILocationProvider provider= (ILocationProvider) input.getAdapter(ILocationProvider.class);
+                       ILocationProvider provider= input.getAdapter(ILocationProvider.class);
                        if (provider != null) {
                                path= provider.getPath(input);
                        }
index dfb22b4..b513849 100644 (file)
@@ -74,7 +74,7 @@ public abstract class FindInWorkingSetAction extends FindAction {
                for (int i = 0; i < fWorkingSets.length; ++i) {
                        IAdaptable[] elements = fWorkingSets[i].getElements();
                        for (int j = 0; j < elements.length; ++j) {
-                               ICElement element = (ICElement)elements[j].getAdapter(ICElement.class);
+                               ICElement element = elements[j].getAdapter(ICElement.class);
                                if (element != null)
                                        scope.add(element);
                        }
index 18638e3..3467fbf 100644 (file)
@@ -157,13 +157,13 @@ public abstract class AbstractInformationControl extends PopupDialog implements
                super(parent, shellStyle, true, true, true, true, true, null, null);
                if (invokingCommandId != null) {
                        IWorkbench workbench = PlatformUI.getWorkbench();
-                       ICommandService commandSupport = (ICommandService)workbench.getAdapter(ICommandService.class);
+                       ICommandService commandSupport = workbench.getAdapter(ICommandService.class);
                        if (commandSupport != null)     {
                                fInvokingCommand = commandSupport.getCommand(invokingCommandId);
                                if (fInvokingCommand != null && !fInvokingCommand.isDefined())
                                        fInvokingCommand= null;
                                else {
-                                       IBindingService bindingService = (IBindingService) workbench.getService(IBindingService.class);
+                                       IBindingService bindingService = workbench.getService(IBindingService.class);
                                        fInvokingTriggerSequence = bindingService.getBestActiveBindingFor(invokingCommandId);
                                }
                        }
index 2ee2736..8f68c24 100644 (file)
@@ -82,7 +82,7 @@ public class CMacroExpansionControl extends AbstractSourceViewerInformationContr
                        return;
                }
                if (fInput.fExplorer.getExpansionStepCount() > 1) {
-                       IBindingService bindingService= (IBindingService)PlatformUI.getWorkbench().getAdapter(IBindingService.class);
+                       IBindingService bindingService= PlatformUI.getWorkbench().getAdapter(IBindingService.class);
                        if (bindingService != null) {
                                String keySequence= bindingService.getBestActiveBindingFormattedFor(ITextEditorActionDefinitionIds.SHOW_INFORMATION);
                                if (keySequence != null) {
index 888bd20..28f05e3 100644 (file)
@@ -314,8 +314,8 @@ public class CMacroExpansionExplorationControl extends AbstractCompareViewerInfo
         };
 
         IWorkbench workbench= PlatformUI.getWorkbench();
-        fHandlerService= (IHandlerService) workbench.getService(IHandlerService.class);
-        fContextService= (IContextService) workbench.getService(IContextService.class);
+        fHandlerService= workbench.getService(IHandlerService.class);
+        fContextService= workbench.getService(IContextService.class);
         fContextActivation= fContextService.activateContext(CONTEXT_ID_MACRO_EXPANSION_HOVER);
         fHandlerActivations= new ArrayList<IHandlerActivation>();
         fHandlerActivations.add(fHandlerService.activateHandler(COMMAND_ID_EXPANSION_BACK, backwardHandler));
@@ -399,7 +399,7 @@ public class CMacroExpansionExplorationControl extends AbstractCompareViewerInfo
         */
        private String getInfoText() {
                IWorkbench workbench= PlatformUI.getWorkbench();
-               IBindingService bindingService= (IBindingService) workbench.getService(IBindingService.class);
+               IBindingService bindingService= workbench.getService(IBindingService.class);
                String formattedBindingBack= bindingService.getBestActiveBindingFormattedFor(COMMAND_ID_EXPANSION_BACK);
                String formattedBindingForward= bindingService.getBestActiveBindingFormattedFor(COMMAND_ID_EXPANSION_FORWARD);
 
index 9663183..aae89b6 100644 (file)
@@ -555,7 +555,7 @@ public class ContentAssistProcessor implements IContentAssistProcessor {
        }
 
        private KeySequence getIterationBinding() {
-           final IBindingService bindingSvc= (IBindingService) PlatformUI.getWorkbench().getAdapter(IBindingService.class);
+           final IBindingService bindingSvc= PlatformUI.getWorkbench().getAdapter(IBindingService.class);
                TriggerSequence binding= bindingSvc.getBestActiveBindingFor(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
                if (binding instanceof KeySequence)
                        return (KeySequence) binding;
index 6205757..667d979 100644 (file)
@@ -67,7 +67,7 @@ public class KeywordCompletionProposalComputer extends ParsingBasedProposalCompu
         if(tu != null) {
                ILanguage language = tu.getLanguage();
                if(language != null)
-                       languageKeywords = (ICLanguageKeywords) language.getAdapter(ICLanguageKeywords.class);
+                       languageKeywords = language.getAdapter(ICLanguageKeywords.class);
         }
                
         if(languageKeywords == null)
index 172ce10..f3f0dae 100644 (file)
@@ -78,7 +78,7 @@ public class CSelectAnnotationRulerAction extends SelectMarkerRulerAction {
                }
        
         if (fHasCorrection) {
-            ITextOperationTarget operation= (ITextOperationTarget) fTextEditor.getAdapter(ITextOperationTarget.class);
+            ITextOperationTarget operation= fTextEditor.getAdapter(ITextOperationTarget.class);
             final int opCode= ISourceViewer.QUICK_ASSIST;
             if (operation != null && operation.canDoOperation(opCode)) {
                 fTextEditor.selectAndReveal(fPosition.getOffset(), fPosition.getLength());
index d67a14c..4563ba8 100644 (file)
@@ -182,7 +182,7 @@ public class CorrectionCommandHandler extends AbstractHandler {
        
        public static String getShortCutString(String proposalId) {
                if (proposalId != null) {
-                       IBindingService bindingService= (IBindingService) PlatformUI.getWorkbench().getAdapter(IBindingService.class);
+                       IBindingService bindingService= PlatformUI.getWorkbench().getAdapter(IBindingService.class);
                        if (bindingService != null) {
                                TriggerSequence[] activeBindingsFor= bindingService.getActiveBindingsFor(proposalId);
                                if (activeBindingsFor.length > 0) {
index b454b43..9df36ce 100644 (file)
@@ -46,8 +46,8 @@ public class CorrectionCommandInstaller {
        
        public void registerCommands(CEditor editor) {
                IWorkbench workbench= PlatformUI.getWorkbench();
-               ICommandService commandService= (ICommandService) workbench.getAdapter(ICommandService.class);
-               IHandlerService handlerService= (IHandlerService) workbench.getAdapter(IHandlerService.class);
+               ICommandService commandService= workbench.getAdapter(ICommandService.class);
+               IHandlerService handlerService= workbench.getAdapter(IHandlerService.class);
                if (commandService == null || handlerService == null) {
                        return;
                }
@@ -71,7 +71,7 @@ public class CorrectionCommandInstaller {
        }
        
        public void deregisterCommands() {
-               IHandlerService handlerService= (IHandlerService) PlatformUI.getWorkbench().getAdapter(IHandlerService.class);
+               IHandlerService handlerService= PlatformUI.getWorkbench().getAdapter(IHandlerService.class);
                if (handlerService != null && fCorrectionHandlerActivations != null) {
                        handlerService.deactivateHandlers(fCorrectionHandlerActivations);
                        fCorrectionHandlerActivations= null;
index 85ecbb6..7fdb505 100644 (file)
@@ -113,7 +113,7 @@ public class ChangeCorrectionProposal implements ICCompletionProposal, ICommandA
                                        LinkedModeModel.closeAllModels(document);
                                }
                                if (activeEditor != null) {
-                                       rewriteTarget= (IRewriteTarget) activeEditor.getAdapter(IRewriteTarget.class);
+                                       rewriteTarget= activeEditor.getAdapter(IRewriteTarget.class);
                                        if (rewriteTarget != null) {
                                                rewriteTarget.beginCompoundChange();
                                        }
index 20c7adb..33ace58 100644 (file)
@@ -1783,7 +1783,7 @@ public class DefaultCFoldingStructureProvider implements ICFoldingStructureProvi
        }
        
        private ProjectionAnnotationModel getModel() {
-               return (ProjectionAnnotationModel) fEditor.getAdapter(ProjectionAnnotationModel.class);
+               return fEditor.getAdapter(ProjectionAnnotationModel.class);
        }
 
        private IDocument getDocument() {
index 62f5027..e3f631d 100644 (file)
@@ -63,7 +63,7 @@ public class THDropTargetListener implements DropTargetListener {
                                        return (ICElement) element;
                                }
                                if (element instanceof IAdaptable) {
-                                       ICElement adapter= (ICElement) ((IAdaptable) element).getAdapter(ICElement.class);
+                                       ICElement adapter= ((IAdaptable) element).getAdapter(ICElement.class);
                                        if (adapter != null) {
                                                return adapter;
                                        }
index d2e3ad1..6cbf681 100644 (file)
@@ -239,7 +239,7 @@ public class THViewPart extends ViewPart implements ITHModelPresenter {
         setMessage(Messages.THViewPart_instruction);
         initializeActionStates();
         
-       IContextService ctxService = (IContextService) getSite().getService(IContextService.class);
+       IContextService ctxService = getSite().getService(IContextService.class);
        if (ctxService != null) {
                fContextActivation= ctxService.activateContext(CUIPlugin.CVIEWS_SCOPE);
        }
@@ -250,7 +250,7 @@ public class THViewPart extends ViewPart implements ITHModelPresenter {
        @Override
        public void dispose() {
                if (fContextActivation != null) {
-                       IContextService ctxService = (IContextService)getSite().getService(IContextService.class);
+                       IContextService ctxService = getSite().getService(IContextService.class);
                if (ctxService != null) {
                        ctxService.deactivateContext(fContextActivation);
                }
@@ -998,7 +998,7 @@ public class THViewPart extends ViewPart implements ITHModelPresenter {
                                        return (ICElement) cand;
                                }
                                if (cand instanceof IAdaptable) {
-                                       ICElement elem= (ICElement) ((IAdaptable) cand).getAdapter(ICElement.class);
+                                       ICElement elem= ((IAdaptable) cand).getAdapter(ICElement.class);
                                        if (elem != null) {
                                                return elem;
                                        }
@@ -1133,7 +1133,7 @@ public class THViewPart extends ViewPart implements ITHModelPresenter {
 
        @Override
        public IWorkbenchSiteProgressService getProgressService() {
-               return (IWorkbenchSiteProgressService) getSite().getAdapter(IWorkbenchSiteProgressService.class);       
+               return getSite().getAdapter(IWorkbenchSiteProgressService.class);       
        }
 
        private static class CopyTypeHierarchyAction extends CopyTreeAction {
index 1fb3c0f..b5e29e9 100644 (file)
@@ -120,7 +120,7 @@ public abstract class AbstractResourceActionHandler extends AbstractHandler {
     if (activeWindow == null) {
       return null;
     }
-    IHandlerService service = (IHandlerService) activeWindow.getService(IHandlerService.class);
+    IHandlerService service = activeWindow.getService(IHandlerService.class);
     return service.getCurrentState();
   }
 
index 01213d1..c80954f 100644 (file)
@@ -548,7 +548,7 @@ public class EditorUtility {
                if (editorInput == null) {
                        return null;
                }
-               return (ICElement) editorInput.getAdapter(ICElement.class);
+               return editorInput.getAdapter(ICElement.class);
        }
 
        /**
@@ -857,7 +857,7 @@ public class EditorUtility {
                 * If <code>saveUnknownEditors</code> is <code>true</code>, save all editors
                 * whose implementation is probably not based on file buffers.
                 */
-               IResource resource= (IResource) input.getAdapter(IResource.class);
+               IResource resource= input.getAdapter(IResource.class);
                if (resource == null)
                        return saveUnknownEditors;
 
index a16ea48..3a47727 100644 (file)
@@ -331,7 +331,7 @@ public class RemoteTreeViewer extends ProblemTreeViewer {
     private void addAllParents(List<Object> list, Object element) {
        if (element instanceof IAdaptable) {
                IAdaptable adaptable = (IAdaptable) element;
-               IWorkbenchAdapter adapter = (IWorkbenchAdapter) adaptable.getAdapter(IWorkbenchAdapter.class);
+               IWorkbenchAdapter adapter = adaptable.getAdapter(IWorkbenchAdapter.class);
                if (adapter != null) {
                        Object parent = adapter.getParent(element);
                        if (parent != null) {
index 393c3ac..c8a9883 100644 (file)
@@ -133,7 +133,7 @@ public class CDTContextActivator implements IWindowListener, IPartListener2 {
                if (page instanceof CContentOutlinePage) {
                        if (!fActivationPerOutline.containsKey(outline)){
                                // cdt outline activated for the first time
-                               IContextService ctxtService = (IContextService)outline.getViewSite().getService(IContextService.class);
+                               IContextService ctxtService = outline.getViewSite().getService(IContextService.class);
                                IContextActivation activateContext = ctxtService.activateContext(CUIPlugin.CVIEWS_SCOPE);
                                fActivationPerOutline.put(outline,activateContext);
                        }
@@ -142,7 +142,7 @@ public class CDTContextActivator implements IWindowListener, IPartListener2 {
                        IContextActivation activation = fActivationPerOutline.remove(outline); 
                        if (activation != null) {
                                // other outline page brought to front
-                               IContextService ctxtService = (IContextService)outline.getViewSite().getService(IContextService.class);
+                               IContextService ctxtService = outline.getViewSite().getService(IContextService.class);
                                ctxtService.deactivateContext(activation);
                        }
                }
@@ -155,7 +155,7 @@ public class CDTContextActivator implements IWindowListener, IPartListener2 {
 
                public SelectionListener(IWorkbenchPartSite site) {
                        fSite= site;
-                       fCtxService= (IContextService)fSite.getService(IContextService.class);
+                       fCtxService= fSite.getService(IContextService.class);
                        ISelectionProvider sp= site.getSelectionProvider();
                        
                        if (sp != null && fCtxService != null) {
index fef2ccf..5aa0ae3 100644 (file)
@@ -310,7 +310,7 @@ public class CElementImageProvider {
         * Returns <code>null</code> if no image could be found.
         */     
        public ImageDescriptor getWorkbenchImageDescriptor(IAdaptable adaptable, int flags) {
-               IWorkbenchAdapter wbAdapter= (IWorkbenchAdapter) adaptable.getAdapter(IWorkbenchAdapter.class);
+               IWorkbenchAdapter wbAdapter= adaptable.getAdapter(IWorkbenchAdapter.class);
                if (wbAdapter == null) {
                        return null;
                }
@@ -331,7 +331,7 @@ public class CElementImageProvider {
        public ImageDescriptor getBaseImageDescriptor(ICElement celement, int renderFlags) {
                // Allow contributed languages to provide icons for their extensions to the ICElement hierarchy
                if (celement instanceof IContributedCElement)
-                   return (ImageDescriptor)((IContributedCElement)celement).getAdapter(ImageDescriptor.class);
+                   return ((IContributedCElement)celement).getAdapter(ImageDescriptor.class);
                
                int type = celement.getElementType();
                switch (type) {
@@ -389,7 +389,7 @@ public class CElementImageProvider {
                                ICProject cp= (ICProject)celement;
                                if (cp.getProject().isOpen()) {
                                        IProject project= cp.getProject();
-                                       IWorkbenchAdapter adapter= (IWorkbenchAdapter)project.getAdapter(IWorkbenchAdapter.class);
+                                       IWorkbenchAdapter adapter= project.getAdapter(IWorkbenchAdapter.class);
                                        if (adapter != null) {
                                                ImageDescriptor result= adapter.getImageDescriptor(project);
                                                if (result != null)
index 9ba9244..868b2cd 100644 (file)
@@ -259,7 +259,7 @@ public class CElementLabels {
                        return BasicElementLabels.getResourceName(((IStorage) obj).getName());
 
                } else if (obj instanceof IAdaptable) {
-                       IWorkbenchAdapter wbadapter= (IWorkbenchAdapter) ((IAdaptable)obj).getAdapter(IWorkbenchAdapter.class);
+                       IWorkbenchAdapter wbadapter= ((IAdaptable)obj).getAdapter(IWorkbenchAdapter.class);
                        if (wbadapter != null) {
                                return Strings.markLTR(wbadapter.getLabel(obj));
                        }
@@ -288,7 +288,7 @@ public class CElementLabels {
                        return getStyledStorageLabel((IStorage) obj);
 
                } else if (obj instanceof IAdaptable) {
-                       IWorkbenchAdapter wbadapter= (IWorkbenchAdapter) ((IAdaptable)obj).getAdapter(IWorkbenchAdapter.class);
+                       IWorkbenchAdapter wbadapter= ((IAdaptable)obj).getAdapter(IWorkbenchAdapter.class);
                        if (wbadapter != null) {
                                return Strings.markLTR(new StyledString(wbadapter.getLabel(obj)));
                        }
index 955ce99..a08fde1 100644 (file)
@@ -82,7 +82,7 @@ public class WorkingSetFilter {
             fResourceFilter = new HashMap<IPath, Object>();
             for (int i = 0; i < input.length; i++) {
                 IAdaptable adaptable = input[i];
-                IResource res = (IResource) adaptable.getAdapter(IResource.class);
+                IResource res = adaptable.getAdapter(IResource.class);
                 if (res != null) {
                     fResourceFilter.put(res.getFullPath(), ACCEPT);
                 }
index 0c979f1..7fbd3c2 100644 (file)
@@ -179,12 +179,12 @@ public class NewClassWizardUtil {
             if (selectedElement instanceof IAdaptable) {
                 IAdaptable adaptable = (IAdaptable) selectedElement;            
                 
-                celem = (ICElement) adaptable.getAdapter(ICElement.class);
+                celem = adaptable.getAdapter(ICElement.class);
                 if (celem == null) {
-                    IResource resource = (IResource) adaptable.getAdapter(IResource.class);
+                    IResource resource = adaptable.getAdapter(IResource.class);
                     if (resource != null && resource.getType() != IResource.ROOT) {
                         while (celem == null && resource.getType() != IResource.PROJECT) {
-                            celem = (ICElement) resource.getAdapter(ICElement.class);
+                            celem = resource.getAdapter(ICElement.class);
                             resource = resource.getParent();
                         }
                         if (celem == null) {
@@ -218,7 +218,7 @@ public class NewClassWizardUtil {
         if (celem == null && part instanceof CEditor) {
             IEditorInput input = ((IEditorPart)part).getEditorInput();
             if (input != null) {
-                final IResource res = (IResource) input.getAdapter(IResource.class);
+                final IResource res = input.getAdapter(IResource.class);
                 if (res != null && res instanceof IFile) {
                     celem = CoreModel.getDefault().create((IFile)res);
                 }
index 6ff77b5..507e8f9 100644 (file)
@@ -314,12 +314,12 @@ public abstract class AbstractFileCreationWizardPage extends NewElementWizardPag
                if (selectedElement instanceof IAdaptable) {
                        IAdaptable adaptable = (IAdaptable) selectedElement;
 
-                       celem = (ICElement) adaptable.getAdapter(ICElement.class);
+                       celem = adaptable.getAdapter(ICElement.class);
                        if (celem == null) {
-                               IResource resource = (IResource) adaptable.getAdapter(IResource.class);
+                               IResource resource = adaptable.getAdapter(IResource.class);
                                if (resource != null && resource.getType() != IResource.ROOT) {
                                        while (celem == null && resource.getType() != IResource.PROJECT) {
-                                               celem = (ICElement) resource.getAdapter(ICElement.class);
+                                               celem = resource.getAdapter(ICElement.class);
                                                resource = resource.getParent();
                                        }
                                        if (celem == null) {
@@ -345,7 +345,7 @@ public abstract class AbstractFileCreationWizardPage extends NewElementWizardPag
                if (celem == null && part instanceof CEditor) {
                        IEditorInput input = ((IEditorPart)part).getEditorInput();
                        if (input != null) {
-                                       final IResource res = (IResource) input.getAdapter(IResource.class);
+                                       final IResource res = input.getAdapter(IResource.class);
                                        if (res != null && res instanceof IFile) {
                                            celem = CoreModel.getDefault().create((IFile)res);
                                        }
index 32e45d0..555624a 100644 (file)
@@ -200,7 +200,7 @@ public class CElementWorkingSetPage extends WizardPage implements IWorkingSetPag
                                if (oldItem instanceof IResource) {
                                        oldResource= (IResource)oldItem;
                                } else {
-                                       oldResource= (IResource)oldItem.getAdapter(IResource.class);
+                                       oldResource= oldItem.getAdapter(IResource.class);
                                }
                                if (oldResource != null && oldResource.isAccessible() == false) {
                                        IProject project= oldResource.getProject();
@@ -256,7 +256,7 @@ public class CElementWorkingSetPage extends WizardPage implements IWorkingSetPag
                if (child == null)
                        return;
                if (child instanceof IAdaptable) {
-                       IResource resource= (IResource)((IAdaptable)child).getAdapter(IResource.class);
+                       IResource resource= ((IAdaptable)child).getAdapter(IResource.class);
                        if (resource != null && !resource.isAccessible())
                                return;
                }
@@ -308,7 +308,7 @@ public class CElementWorkingSetPage extends WizardPage implements IWorkingSetPag
                                                elements= SelectionConverter.getStructuredSelection(part).toArray();
                                                for (int i= 0; i < elements.length; i++) {
                                                        if (elements[i] instanceof IResource) {
-                                                               ICElement ce= (ICElement)((IResource)elements[i]).getAdapter(ICElement.class);
+                                                               ICElement ce= ((IResource)elements[i]).getAdapter(ICElement.class);
                                                                if (ce != null && ce.exists() &&  ce.getCProject().isOnSourceRoot((IResource)elements[i]))
                                                                        elements[i]= ce;
                                                        }
@@ -348,7 +348,7 @@ public class CElementWorkingSetPage extends WizardPage implements IWorkingSetPag
                                                setSubtreeChecked(element, true, true);
                                                
                                        if (element instanceof IAdaptable) {
-                                               IResource resource= (IResource) ((IAdaptable)element).getAdapter(IResource.class);
+                                               IResource resource= ((IAdaptable)element).getAdapter(IResource.class);
                                                if (resource != null && !resource.isAccessible())
                                                        continue;
                                        }
@@ -391,7 +391,7 @@ public class CElementWorkingSetPage extends WizardPage implements IWorkingSetPag
        private void setSubtreeChecked(Object parent, boolean state, boolean checkExpandedState) {
                if (!(parent instanceof IAdaptable))
                        return;
-               IContainer container= (IContainer)((IAdaptable)parent).getAdapter(IContainer.class);
+               IContainer container= ((IAdaptable)parent).getAdapter(IContainer.class);
                if ((!fTree.getExpandedState(parent) && checkExpandedState) || (container != null && !container.isAccessible()))
                        return;
                
index d846f47..64e7a4d 100644 (file)
@@ -71,7 +71,7 @@ public class WorkingSetConfigurationsPage extends PropertyPage {
 
        private IWorkingSetProxy.ISnapshot getWorkingSet(WorkspaceSnapshot workspace) {
                IWorkingSetProxy.ISnapshot result = null;
-               IWorkingSet realWorkingSet = (IWorkingSet) getElement().getAdapter(IWorkingSet.class);
+               IWorkingSet realWorkingSet = getElement().getAdapter(IWorkingSet.class);
 
                if (realWorkingSet != null) {
                        result = workspace.getWorkingSet(realWorkingSet.getName());
index d7e52ff..2bd2cbb 100644 (file)
@@ -53,7 +53,7 @@ public class WorkingSetPropertyTester extends PropertyTester {
                if (object instanceof IWorkingSet) {
                        result = (IWorkingSet) object;
                } else if (object instanceof IAdaptable) {
-                       result = (IWorkingSet) ((IAdaptable) object).getAdapter(IWorkingSet.class);
+                       result = ((IAdaptable) object).getAdapter(IWorkingSet.class);
                }
                
                return result;
@@ -66,7 +66,7 @@ public class WorkingSetPropertyTester extends PropertyTester {
                        IAdaptable[] members = workingSet.getElements();
                        
                        for (IAdaptable next : members) {
-                               IProject project = (IProject) next.getAdapter(IProject.class);
+                               IProject project = next.getAdapter(IProject.class);
                                
                                if ((project != null) && CoreModel.hasCNature(project)) {
                                        result = true;
index eebf7fb..50242e8 100644 (file)
@@ -76,7 +76,7 @@ public class WorkingSetProxy implements IWorkingSetProxy {
                IWorkingSet resolvedWS = resolve();
                if (resolvedWS != null) {
                        for (IAdaptable next : resolvedWS.getElements()) {
-                               IProject proj = (IProject) next.getAdapter(IProject.class);
+                               IProject proj = next.getAdapter(IProject.class);
 
                                if (proj != null) {
                                        result.add(proj);
index 2b8ffa2..9f00db1 100644 (file)
@@ -138,7 +138,7 @@ public final class CDTUITools {
                if (tu != null)
                        return tu;
 
-               return (ICElement)editorInput.getAdapter(ICElement.class);
+               return editorInput.getAdapter(ICElement.class);
        }
 
        /**
index 58485bb..fbe048e 100644 (file)
@@ -280,8 +280,8 @@ public class CElementSorter extends ViewerSorter {
                @SuppressWarnings("unchecked")
                final Comparator<Object> comparator = getComparator();
                if (cat1 == PROJECTS) {
-                       IWorkbenchAdapter a1= (IWorkbenchAdapter)((IAdaptable)e1).getAdapter(IWorkbenchAdapter.class);
-                       IWorkbenchAdapter a2= (IWorkbenchAdapter)((IAdaptable)e2).getAdapter(IWorkbenchAdapter.class);
+                       IWorkbenchAdapter a1= ((IAdaptable)e1).getAdapter(IWorkbenchAdapter.class);
+                       IWorkbenchAdapter a2= ((IAdaptable)e2).getAdapter(IWorkbenchAdapter.class);
                        return comparator.compare(a1.getLabel(e1), a2.getLabel(e2));
                }
 
index b9f57b4..7095e00 100644 (file)
@@ -256,7 +256,7 @@ public class ChangeBuildConfigActionBase {
                                                IWorkbenchPart part = page.getActivePart();
                                                if (part instanceof IEditorPart) {
                                                        IEditorPart epart = (IEditorPart) part;
-                                                       IResource resource = (IResource) epart.getEditorInput().getAdapter(IResource.class);
+                                                       IResource resource = epart.getEditorInput().getAdapter(IResource.class);
                                                        if (resource != null)
                                                        {
                                                                IProject project = resource.getProject();
index 241d3bc..3c2af09 100644 (file)
@@ -352,7 +352,7 @@ public class GenerateActionGroup extends ActionGroup implements ISelectionChange
        }
 
        private void installQuickAccessAction() {
-               fHandlerService= (IHandlerService)fSite.getService(IHandlerService.class);
+               fHandlerService= fSite.getService(IHandlerService.class);
                if (fHandlerService != null) {
                        IHandler handler= new CDTQuickMenuCreator(fEditor) {
                                @Override
index 8f3dc95..e6cddd2 100644 (file)
@@ -175,7 +175,7 @@ public class CHelpConfigurationPropertyPage extends PropertyPage implements
                if (element instanceof IResource) {
                        return (IResource)element;
                }
-               return (IResource)element.getAdapter(IResource.class);
+               return element.getAdapter(IResource.class);
        }
 
        @Override
index 9295a7b..6236451 100644 (file)
@@ -73,7 +73,7 @@ public class IndexerOptionPropertyPage extends PropertyPage implements ICOptionC
                if (elem instanceof IProject) {
                        project= (IProject) elem;
                } else if (elem != null) {
-                       project= (IProject) elem.getAdapter(IProject.class);
+                       project= elem.getAdapter(IProject.class);
                }
                return project;
        }
index 19ab697..d845a82 100644 (file)
@@ -1261,7 +1261,7 @@ implements
                else if (el instanceof IResource)
                        internalElement = (IResource)el;
                else
-                   internalElement = (IResource) el.getAdapter(IResource.class);
+                   internalElement = el.getAdapter(IResource.class);
                if (internalElement == null) return false;
                isProject = internalElement instanceof IProject;
                isFolder  = internalElement instanceof IFolder;
index 4318a4c..66f7bed 100644 (file)
@@ -70,7 +70,7 @@ public class Page_head_general extends PropertyPage implements ICOptionContainer
                if (elem instanceof IProject) {
                        project= (IProject) elem;
                } else if (elem != null) {
-                       project= (IProject) elem.getAdapter(IProject.class);
+                       project= elem.getAdapter(IProject.class);
                }
                return project;
        }
index 1a40c7e..f4e6ebf 100644 (file)
@@ -181,7 +181,7 @@ public class AsmSourceViewerConfiguration extends TextSourceViewerConfiguration
                        IAsmLanguage asmLang= (IAsmLanguage)language;
                        scanner = new AsmCodeScanner(getTokenStoreFactory(), asmLang);
                } else if (language != null) {
-                       ILanguageUI languageUI = (ILanguageUI)language.getAdapter(ILanguageUI.class);
+                       ILanguageUI languageUI = language.getAdapter(ILanguageUI.class);
                        if (languageUI != null)
                                scanner = languageUI.getCodeScanner();
                }
@@ -347,7 +347,7 @@ public class AsmSourceViewerConfiguration extends TextSourceViewerConfiguration
                                IPath path = ((IPathEditorInput)input).getPath();
                                contentType = CCorePlugin.getContentType(path.lastSegment());
                        } else {
-                               ILocationProvider locationProvider = (ILocationProvider)input.getAdapter(ILocationProvider.class);
+                               ILocationProvider locationProvider = input.getAdapter(ILocationProvider.class);
                                if (locationProvider != null) {
                                        IPath path = locationProvider.getPath(input);
                                        contentType = CCorePlugin.getContentType(path.lastSegment());
index aae8aa8..4db59d1 100644 (file)
@@ -393,12 +393,12 @@ public class CSourceViewerConfiguration extends TextSourceViewerConfiguration {
                RuleBasedScanner scanner= null;
                
                if(language != null) {
-                       ICLanguageKeywords keywords = (ICLanguageKeywords) language.getAdapter(ICLanguageKeywords.class);
+                       ICLanguageKeywords keywords = language.getAdapter(ICLanguageKeywords.class);
                        if(keywords != null) {
                                scanner = new CCodeScanner(getTokenStoreFactory(), keywords);
                        }
                        else {
-                               ILanguageUI languageUI = (ILanguageUI)language.getAdapter(ILanguageUI.class);
+                               ILanguageUI languageUI = language.getAdapter(ILanguageUI.class);
                                if (languageUI != null)
                                        scanner = languageUI.getCodeScanner();
                        }
@@ -958,7 +958,7 @@ public class CSourceViewerConfiguration extends TextSourceViewerConfiguration {
                                IPath path = ((IPathEditorInput)input).getPath();
                                contentType = CCorePlugin.getContentType(path.lastSegment());
                        } else {
-                               ILocationProvider locationProvider = (ILocationProvider)input.getAdapter(ILocationProvider.class);
+                               ILocationProvider locationProvider = input.getAdapter(ILocationProvider.class);
                                if (locationProvider != null) {
                                        IPath path = locationProvider.getPath(input);
                                        if (path != null) {
index 0c98782..71a10ef 100644 (file)
@@ -122,7 +122,7 @@ public class ProjectSelectionPage extends WizardPage implements IWizardDataPage
                        if (part != null) {
                                IEditorInput editorInput= part.getEditorInput();
                                if (editorInput != null) {
-                                       return (ICElement)editorInput.getAdapter(ICElement.class);
+                                       return editorInput.getAdapter(ICElement.class);
                                }
                        }
                }
index 946dc31..a1ca2de 100644 (file)
@@ -684,7 +684,7 @@ public class FileListControl {
 
                // Add command handlers for undo to the control
                try {
-                       IFocusService fs = (IFocusService)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+                       IFocusService fs = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
                                                                .getActivePart().getSite().getService(IFocusService.class);
                        fs.addFocusTracker(list, "org.eclipse.cdt.ui.FileListControl"); //$NON-NLS-1$
                } catch (Exception e) {
index 20198fc..5bc1e86 100644 (file)
@@ -96,7 +96,7 @@ public class RSEHelper {
                        if (!subsystem.isConnected())
                                throw new Exception(Messages.RemoteRunLaunchDelegate_5);
 
-                       return (IShellService) subsystem.getSubSystemConfiguration()
+                       return subsystem.getSubSystemConfiguration()
                                        .getService(currentConnection).getAdapter(
                                                        IShellService.class);
                } else {
@@ -114,7 +114,7 @@ public class RSEHelper {
        public static IShellService getShellService(IHost host) {
                ISubSystem ss = getSubSystemWithShellService(host);
                if (ss != null) {
-                       return (IShellService) ss.getSubSystemConfiguration().getService(
+                       return ss.getSubSystemConfiguration().getService(
                                        host).getAdapter(IShellService.class);
                }
                return null;
@@ -136,7 +136,7 @@ public class RSEHelper {
                        IService svc = subSystems[i].getSubSystemConfiguration()
                                        .getService(host);
                        if (svc != null) {
-                               ssvc = (IShellService) svc.getAdapter(IShellService.class);
+                               ssvc = svc.getAdapter(IShellService.class);
                                if (ssvc != null) {
                                        return subSystems[i];
                                }
index 511856f..33a0d5e 100644 (file)
@@ -268,7 +268,7 @@ public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
                 ISharedImages sharedImages = getWindow().getWorkbench()
                                 .getSharedImages();
 
-                IActionCommandMappingService acms = (IActionCommandMappingService) getWindow()
+                IActionCommandMappingService acms = getWindow()
                                 .getService(IActionCommandMappingService.class);
                 acms.map(actionId, commandId);
 
index b69e9b9..752587d 100644 (file)
@@ -67,7 +67,7 @@ public class CompilerOptionParser implements IWorkspaceRunnable {
                        GNUElfParser binParser = new GNUElfParser();
                        IBinaryFile bf = binParser
                                        .getBinary(new Path(executable));
-                       ISymbolReader reader = (ISymbolReader)bf.getAdapter(ISymbolReader.class);
+                       ISymbolReader reader = bf.getAdapter(ISymbolReader.class);
                        String[] sourceFiles = reader
                                        .getSourceFiles();
                        monitor.beginTask(Messages.GetCompilerOptions, sourceFiles.length * 2 + 1);
index 1cf08dc..c9c0f80 100644 (file)
@@ -1536,7 +1536,7 @@ public class CBreakpointManager implements IBreakpointsListener, IBreakpointMana
        }
        
        private ICBreakpointFilterExtension getFilterExtension(ICBreakpoint bp) throws CoreException{
-           return (ICBreakpointFilterExtension)bp.getExtension(
+           return bp.getExtension(
                CDIDebugModel.getPluginIdentifier(), ICBreakpointFilterExtension.class);
        }
 }
index f4a0d72..1ead91b 100644 (file)
@@ -56,7 +56,7 @@ public class SessionManager implements IDebugEventSetListener {
                        if ( event.getKind() == DebugEvent.TERMINATE ) {
                                Object element = event.getSource();
                                if ( element instanceof IDebugTarget && ((IDebugTarget)element).getAdapter( ICDITarget.class ) != null ) {
-                                       handleTerminateEvent( ((IDebugTarget)element).getLaunch(), ((ICDITarget)((IDebugTarget)element).getAdapter( ICDITarget.class )).getSession() );
+                                       handleTerminateEvent( ((IDebugTarget)element).getLaunch(), ((IDebugTarget)element).getAdapter( ICDITarget.class ).getSession() );
                                }
                        }
                }
@@ -66,7 +66,7 @@ public class SessionManager implements IDebugEventSetListener {
                IDebugTarget[] targets = launch.getDebugTargets();
                boolean terminate = true;
                for( int i = 0; i < targets.length; ++i ) {
-                       if ( targets[i].getAdapter( ICDITarget.class ) != null && session.equals( ((ICDITarget)targets[i].getAdapter( ICDITarget.class )).getSession() ) && !targets[i].isTerminated() && !targets[i].isDisconnected() )
+                       if ( targets[i].getAdapter( ICDITarget.class ) != null && session.equals( targets[i].getAdapter( ICDITarget.class ).getSession() ) && !targets[i].isTerminated() && !targets[i].isDisconnected() )
                                terminate = false;
                }
                if ( terminate ) {
index 7cba557..8762f8d 100644 (file)
@@ -21,7 +21,7 @@ public class StandardSourceFileRemapping implements ISourceFileRemapping {
        ISourceFinder srcFinder;
 
        public StandardSourceFileRemapping(IBinary binary) {
-               srcFinder = (ISourceFinder) binary.getAdapter(ISourceFinder.class);
+               srcFinder = binary.getAdapter(ISourceFinder.class);
        }
        
        @Override
index 9fa7edf..62568e5 100644 (file)
@@ -117,7 +117,7 @@ public class StandardSourceFilesProvider extends PlatformObject implements ISour
 
                IBinaryFile bin = createBinaryFile(executable);
                if (bin != null) {
-                       ISymbolReader symbolreader = (ISymbolReader) bin.getAdapter(ISymbolReader.class);
+                       ISymbolReader symbolreader = bin.getAdapter(ISymbolReader.class);
                        if (symbolreader != null) {
                                return symbolreader.getSourceFiles(monitor);
                        }
index 98d2248..088cc51 100644 (file)
@@ -220,7 +220,7 @@ abstract public class CDebugElement extends PlatformObject implements ICDebugEle
         * @return the underlying CDI target
         */
        public ICDITarget getCDITarget() {
-               return (ICDITarget)getDebugTarget().getAdapter( ICDITarget.class );
+               return getDebugTarget().getAdapter( ICDITarget.class );
        }
 
        /**
index 65f70a3..69a5451 100644 (file)
@@ -363,13 +363,13 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
        protected void initializeSourceManager() {
                ISourceLocator locator = getLaunch().getSourceLocator();
                if (locator instanceof IAdaptable) {
-                       ICSourceLocator clocator = (ICSourceLocator)((IAdaptable)locator).getAdapter(ICSourceLocator.class);
+                       ICSourceLocator clocator = ((IAdaptable)locator).getAdapter(ICSourceLocator.class);
                        if (clocator instanceof IAdaptable) {
-                               CSourceManager sm = (CSourceManager)((IAdaptable)clocator).getAdapter(CSourceManager.class);
+                               CSourceManager sm = ((IAdaptable)clocator).getAdapter(CSourceManager.class);
                                if (sm != null)
                                        sm.setDebugTarget(this);
                        }
-                       IResourceChangeListener listener = (IResourceChangeListener)((IAdaptable)locator).getAdapter(IResourceChangeListener.class);
+                       IResourceChangeListener listener = ((IAdaptable)locator).getAdapter(IResourceChangeListener.class);
                        if (listener != null)
                                CCorePlugin.getWorkspace().addResourceChangeListener(listener);
                }
@@ -1600,7 +1600,7 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
        protected void disposeSourceManager() {
                ISourceLocator locator = getSourceLocator();
                if (locator instanceof IAdaptable) {
-                       IResourceChangeListener listener = (IResourceChangeListener)((IAdaptable)locator).getAdapter(IResourceChangeListener.class);
+                       IResourceChangeListener listener = ((IAdaptable)locator).getAdapter(IResourceChangeListener.class);
                        if (listener != null)
                                CCorePlugin.getWorkspace().removeResourceChangeListener(listener);
                }
index d03e41c..895f4cc 100644 (file)
@@ -276,7 +276,7 @@ public class CMemoryBlockExtension extends CDebugElement implements IMemorySpace
        }
 
        private boolean isBigEndian() {
-               IExecFileInfo info = (IExecFileInfo)getDebugTarget().getAdapter( IExecFileInfo.class );
+               IExecFileInfo info = getDebugTarget().getAdapter( IExecFileInfo.class );
                if ( info != null ) {
                        return !info.isLittleEndian();
                }
@@ -288,7 +288,7 @@ public class CMemoryBlockExtension extends CDebugElement implements IMemorySpace
         */
        @Override
        public IMemoryBlockRetrieval getMemoryBlockRetrieval() {
-               return (IMemoryBlockRetrieval)getDebugTarget().getAdapter( IMemoryBlockRetrieval.class );
+               return getDebugTarget().getAdapter( IMemoryBlockRetrieval.class );
        }
 
        /* (non-Javadoc)
index eef50a7..612daac 100644 (file)
@@ -251,7 +251,7 @@ public class CRegisterGroup extends CDebugElement implements IPersistableRegiste
        }
 
        private CRegisterManager getRegisterManager() {
-               return (CRegisterManager)getDebugTarget().getAdapter( CRegisterManager.class );
+               return getDebugTarget().getAdapter( CRegisterManager.class );
        }
 
        private void invalidate() {
index bfde391..ac1155f 100644 (file)
@@ -201,7 +201,7 @@ public class CStackFrame extends CDebugElement implements ICStackFrame, IRestart
                if ( isSuspended() ) {
                        ISourceLocator locator = ((CDebugTarget)getDebugTarget()).getSourceLocator();
                        if ( locator != null && locator instanceof IAdaptable && ((IAdaptable)locator).getAdapter( ICSourceLocator.class ) != null )
-                               return ((ICSourceLocator)((IAdaptable)locator).getAdapter( ICSourceLocator.class )).getLineNumber( this );
+                               return ((IAdaptable)locator).getAdapter( ICSourceLocator.class ).getLineNumber( this );
                        
                        final ICDIStackFrame cdiFrame = getCDIStackFrame();
                        if ( cdiFrame != null && cdiFrame.getLocator() != null )
index c98aaf1..b3b693b 100644 (file)
@@ -727,7 +727,7 @@ public class CThread extends CDebugElement implements ICThread, IRestart, IResum
        protected synchronized void preserveStackFrames() {
                Iterator it = fStackFrames.iterator();
                while( it.hasNext() ) {
-                       CStackFrame frame = (CStackFrame)(((IAdaptable)it.next()).getAdapter( CStackFrame.class ));
+                       CStackFrame frame = (((IAdaptable)it.next()).getAdapter( CStackFrame.class ));
                        if ( frame != null ) {
                                frame.preserve();
                        }
@@ -758,7 +758,7 @@ public class CThread extends CDebugElement implements ICThread, IRestart, IResum
                Iterator it = fStackFrames.iterator();
                int counter = 0;
                while( it.hasNext() ) {
-                       CStackFrame frame = (CStackFrame)(((IAdaptable)it.next()).getAdapter( CStackFrame.class ));
+                       CStackFrame frame = (((IAdaptable)it.next()).getAdapter( CStackFrame.class ));
                        if ( frame != null && counter >= index && counter < index + length ) {
                                frame.dispose();
                                removeList.add( frame );
index 43bfe7a..828b0db 100644 (file)
@@ -62,7 +62,7 @@ public class Disassembly extends CDebugElement implements IDisassembly, ICDIEven
        }
 
        private DisassemblyBlock createBlock( ICStackFrame frame ) throws DebugException {
-               ICDITarget target = (ICDITarget)getDebugTarget().getAdapter( ICDITarget.class );
+               ICDITarget target = getDebugTarget().getAdapter( ICDITarget.class );
                if ( target != null ) {
                        String fileName = frame.getFile();
                        int lineNumber = frame.getLineNumber();
@@ -111,7 +111,7 @@ public class Disassembly extends CDebugElement implements IDisassembly, ICDIEven
        }
        
        private DisassemblyBlock createBlock( IAddress startAddress, IAddress endAddress) throws DebugException {
-               ICDITarget target = (ICDITarget)getDebugTarget().getAdapter( ICDITarget.class );
+               ICDITarget target = getDebugTarget().getAdapter( ICDITarget.class );
                if ( target != null ) {
                        ICDIMixedInstruction[] mixedInstrs = new ICDIMixedInstruction[0];
                        if ( mixedInstrs.length == 0 ||
index 119dc3b..0660543 100644 (file)
@@ -101,7 +101,7 @@ public class DisassemblyBlock implements IDisassemblyBlock, IAdaptable {
        public String getModuleFile() {
                IDisassembly d = getDisassembly();
                if ( d != null ) {
-                       IExecFileInfo info = (IExecFileInfo)d.getAdapter( IExecFileInfo.class );
+                       IExecFileInfo info = d.getAdapter( IExecFileInfo.class );
                        if ( info != null && info.getExecFile() != null ) {
                                return info.getExecFile().getPath().toOSString();
                        }
index 01cd7f3..2ef7871 100644 (file)
@@ -234,7 +234,7 @@ public class DisassemblyRetrieval extends CDebugElement implements ICDIEventList
 
     private IDisassemblyLine[] disassemble( BigInteger startAddress, BigInteger endAddress, boolean mixed ) throws DebugException {
         List<IDisassemblyLine> list = new ArrayList<IDisassemblyLine>();
-        ICDITarget cdiTarget = (ICDITarget)getDebugTarget().getAdapter( ICDITarget.class );
+        ICDITarget cdiTarget = getDebugTarget().getAdapter( ICDITarget.class );
         try {
             ICDIMixedInstruction[] mixedInstructions = null;
             ICDIInstruction[] asmInstructions = null;
index 16b721f..681753b 100644 (file)
@@ -65,7 +65,7 @@ public class CSourceLookupParticipant extends AbstractSourceLookupParticipant {
                        return (String)object;
                }
                if (object instanceof IAdaptable) {
-                       ICStackFrame frame = (ICStackFrame)((IAdaptable)object).getAdapter(ICStackFrame.class);
+                       ICStackFrame frame = ((IAdaptable)object).getAdapter(ICStackFrame.class);
                        if (frame != null) {
                                String name = frame.getFile();
                                return (name != null && name.trim().length() > 0) ? name : null;
@@ -88,7 +88,7 @@ public class CSourceLookupParticipant extends AbstractSourceLookupParticipant {
                String name = null;
                IBreakpoint breakpoint = null;
                if (object instanceof IAdaptable) {
-                       ICStackFrame frame = (ICStackFrame)((IAdaptable)object).getAdapter(ICStackFrame.class);
+                       ICStackFrame frame = ((IAdaptable)object).getAdapter(ICStackFrame.class);
                        if (frame != null) {
                                name = frame.getFile().trim();
                                if (name == null || name.length() == 0)
@@ -102,9 +102,9 @@ public class CSourceLookupParticipant extends AbstractSourceLookupParticipant {
                                }
                        }
                        // See if findSourceElements(...) is the result of a Breakpoint Hit Event
-                       ICDebugTarget target =  (ICDebugTarget)((IAdaptable)object).getAdapter(ICDebugTarget.class);
+                       ICDebugTarget target =  ((IAdaptable)object).getAdapter(ICDebugTarget.class);
                        if (target != null) {
-                               CBreakpointManager bmanager = (CBreakpointManager)target.getAdapter(CBreakpointManager.class);
+                               CBreakpointManager bmanager = target.getAdapter(CBreakpointManager.class);
                                Object stateInfo = target.getCurrentStateInfo();
                                if (bmanager != null && stateInfo instanceof ICDIBreakpointHit) {
                                        breakpoint = bmanager.getBreakpoint(((ICDIBreakpointHit)stateInfo).getBreakpoint());
index c019d9b..0a7bf3e 100644 (file)
@@ -50,7 +50,7 @@ public class CSourceNotFoundElement {
         * @return a description string or null if not available
         */
        public String getDescription() {
-               ICSourceNotFoundDescription description = (ICSourceNotFoundDescription) element.getAdapter(ICSourceNotFoundDescription.class);
+               ICSourceNotFoundDescription description = element.getAdapter(ICSourceNotFoundDescription.class);
                if (description != null)
                        return description.getDescription();
                else
index 25525d3..7ffff89 100644 (file)
@@ -197,7 +197,7 @@ public class CSourceFinder implements ISourceFinder, ILaunchConfigurationListene
        public String toLocalPath(IAdaptable _launch, String compilationPath) {
                Object foundElement = null;
                
-               ILaunch launch = (ILaunch)_launch.getAdapter(ILaunch.class);
+               ILaunch launch = _launch.getAdapter(ILaunch.class);
                if (launch != null) {
                        ISourceLocator locator = launch.getSourceLocator();
                        // in practice, a launch locator is always an ISourceLookupDirector
@@ -268,7 +268,7 @@ public class CSourceFinder implements ISourceFinder, ILaunchConfigurationListene
         * @return true if the launch config targets our binary, false otherwise
         */
        private boolean isMatch(ILaunchConfiguration config) {
-               IResource resource = (IResource)fBinary.getAdapter(IResource.class);
+               IResource resource = fBinary.getAdapter(IResource.class);
                if (resource != null) {
                        String binaryPath = resource.getFullPath().toString();
                        try {
index 6accc0d..8b82dbe 100644 (file)
@@ -252,7 +252,7 @@ public class SetAutoSolibActionDelegate implements IViewActionDelegate, ISelecti
 
        private SharedLibraryManager getSharedLibraryManager( IAdaptable element ) {
                if ( element != null ) {
-                       ICDISession session = (ICDISession)element.getAdapter( ICDISession.class );
+                       ICDISession session = element.getAdapter( ICDISession.class );
                        if ( session instanceof Session )
                                return ((Session)session).getSharedLibraryManager();
                }
@@ -261,7 +261,7 @@ public class SetAutoSolibActionDelegate implements IViewActionDelegate, ISelecti
 
        private Target getTarget( IAdaptable element ) {
                if (element != null) {
-                       ICDITarget target = (ICDITarget)element.getAdapter( ICDITarget.class );
+                       ICDITarget target = element.getAdapter( ICDITarget.class );
                        if (target instanceof Target) {
                                return (Target)target;
                        }
index aa03642..0acdee5 100644 (file)
@@ -59,7 +59,7 @@ public class OptionsPropertyPage extends PropertyPage {
 
        private void initialize() {
                boolean solibUpdate = true;
-               ICDISession session = (ICDISession)getElement().getAdapter( ICDISession.class );
+               ICDISession session = getElement().getAdapter( ICDISession.class );
                if ( session instanceof Session ) {
                        solibUpdate = ((Session)session).getSharedLibraryManager().isAutoUpdate();
                }
@@ -80,8 +80,8 @@ public class OptionsPropertyPage extends PropertyPage {
        }
 
        private void storeValues() {
-               ICDISession session = (ICDISession)getElement().getAdapter( ICDISession.class );
-               final ICDITarget target = (ICDITarget)getElement().getAdapter( ICDITarget.class );
+               ICDISession session = getElement().getAdapter( ICDISession.class );
+               final ICDITarget target = getElement().getAdapter( ICDITarget.class );
                if ( session instanceof Session ) {
                        final boolean solibUpdate = fRefreshSolibsButton.getSelection();
                        final Session miSession = ((Session)session);
index 9e13f55..0ada2ef 100644 (file)
@@ -168,7 +168,7 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
                        if (marker == null || !marker.exists())
                                return null;
                        // If the BP's marker is on an IFile, job done
-                       IFile file = (IFile)marker.getResource().getAdapter(IFile.class);
+                       IFile file = marker.getResource().getAdapter(IFile.class);
                        if (file == null) {
                                try {
                                        // Not backed by an IFile, try its source handle (may be workspace / project based)
@@ -204,7 +204,7 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
                        if ( file != null )
                                return new FileEditorInput( file );
                        // There is no file associated with this breakpoint. See if another editor is available from an adapter
-                       ISourcePresentation srcPres = (ISourcePresentation) Platform.getAdapterManager().getAdapter(b, ISourcePresentation.class);
+                       ISourcePresentation srcPres = Platform.getAdapterManager().getAdapter(b, ISourcePresentation.class);
                        if ( srcPres != null ) {
                                IEditorInput editor = srcPres.getEditorInput(b);
                                if ( editor != null ) {
@@ -243,7 +243,7 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
                        }
                        else if ( element instanceof ICBreakpoint ) {
                                // There is no associated editor ID for this breakpoint, see if an alternative can be supplied from an adapter.
-                               ISourcePresentation sourcePres = (ISourcePresentation) Platform.getAdapterManager().getAdapter(element, ISourcePresentation.class);
+                               ISourcePresentation sourcePres = Platform.getAdapterManager().getAdapter(element, ISourcePresentation.class);
                                if ( sourcePres != null ) {
                                        String lid = sourcePres.getEditorId(input, element);
                                        if ( lid != null ) {
@@ -343,7 +343,7 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
        }
 
        protected Image getRegisterGroupImage( IRegisterGroup element ) {
-               IEnableDisableTarget target = (IEnableDisableTarget)element.getAdapter( IEnableDisableTarget.class );
+               IEnableDisableTarget target = element.getAdapter( IEnableDisableTarget.class );
                if ( target != null && !target.isEnabled() )
                        return fDebugImageRegistry.get( CDebugImages.DESC_OBJS_REGISTER_GROUP_DISABLED );
                return fDebugImageRegistry.get( CDebugImages.DESC_OBJS_REGISTER_GROUP );
@@ -351,7 +351,7 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
 
        protected Image getBreakpointImage( ICBreakpoint breakpoint ) {
                // if adapter installed for breakpoint, call the adapter
-               ILabelProvider adapter = (ILabelProvider) Platform.getAdapterManager().getAdapter(breakpoint, ILabelProvider.class);
+               ILabelProvider adapter = Platform.getAdapterManager().getAdapter(breakpoint, ILabelProvider.class);
                if (adapter!=null) { 
                        Image image = adapter.getImage(breakpoint);
                        if (image!=null) return image;
@@ -509,7 +509,7 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
                        }
                        if ( element instanceof IBreakpoint ) {
                                // if adapter installed for breakpoint, call adapter
-                               ILabelProvider adapter = (ILabelProvider) Platform.getAdapterManager().getAdapter(element, ILabelProvider.class);
+                               ILabelProvider adapter = Platform.getAdapterManager().getAdapter(element, ILabelProvider.class);
                                if (adapter!=null) { 
                                        String text = adapter.getText(element);
                                        if (text!=null) return text;
@@ -739,7 +739,7 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
        }
 
        protected String getTargetText( IDebugTarget target, boolean qualified ) throws DebugException {
-               ICDebugTarget t = (ICDebugTarget)target.getAdapter( ICDebugTarget.class );
+               ICDebugTarget t = target.getAdapter( ICDebugTarget.class );
                if ( t != null ) {
                        if ( !t.isPostMortem() ) {
                                CDebugElementState state = t.getState();
@@ -765,7 +765,7 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
        }
 
        protected String getThreadText( IThread thread, boolean qualified ) throws DebugException {
-               ICDebugTarget target = (ICDebugTarget)thread.getDebugTarget().getAdapter( ICDebugTarget.class );
+               ICDebugTarget target = thread.getDebugTarget().getAdapter( ICDebugTarget.class );
                if ( target.isPostMortem() ) {
                        return getFormattedString( CDebugUIMessages.getString( "CDTDebugModelPresentation.8" ), thread.getName() ); //$NON-NLS-1$
                }
@@ -780,7 +780,7 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
                }
                if ( thread.isSuspended() ) {
                        String reason = ""; //$NON-NLS-1$
-                       ICDebugElement element = (ICDebugElement)thread.getAdapter( ICDebugElement.class );
+                       ICDebugElement element = thread.getAdapter( ICDebugElement.class );
                        if ( element != null ) {
                                Object info = element.getCurrentStateInfo();
                                if ( info instanceof ICDISignalReceived ) {
@@ -862,7 +862,7 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
 
        @Override
        public Color getForeground(Object element) {
-               IColorProvider colorProv = (IColorProvider) Platform.getAdapterManager().getAdapter(element, IColorProvider.class);
+               IColorProvider colorProv = Platform.getAdapterManager().getAdapter(element, IColorProvider.class);
                if ( colorProv != null ) {
                        return colorProv.getForeground(element);
                }
@@ -871,7 +871,7 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode
 
        @Override
        public Color getBackground(Object element) {
-               IColorProvider colorProv = (IColorProvider) Platform.getAdapterManager().getAdapter(element, IColorProvider.class);
+               IColorProvider colorProv = Platform.getAdapterManager().getAdapter(element, IColorProvider.class);
                if ( colorProv != null ) {
                        return colorProv.getBackground(element);
                }
index a7b561e..4496fc7 100644 (file)
@@ -245,7 +245,7 @@ public class CDebugUIUtils {
                        baseText.append( MessageFormat.format( " <{0}>", new Object[] { ((ICDebugElementStatus)element).getMessage() } ) ); //$NON-NLS-1$
                }
                if ( element instanceof IAdaptable ) {
-                       IEnableDisableTarget target = (IEnableDisableTarget)((IAdaptable)element).getAdapter( IEnableDisableTarget.class );
+                       IEnableDisableTarget target = ((IAdaptable)element).getAdapter( IEnableDisableTarget.class );
                        if ( target != null ) {
                                if ( !target.isEnabled() ) {
                                        baseText.append( ' ' );
index 2bd74b3..257f89c 100644 (file)
@@ -138,7 +138,7 @@ public class EvaluationContextManager implements IWindowListener, IPageListener,
                        if (ss.size() == 1) {
                                Object element = ss.getFirstElement();
                                if (element instanceof IAdaptable) {
-                                       ICDebugTarget target = (ICDebugTarget)((IAdaptable)element).getAdapter(ICDebugTarget.class);
+                                       ICDebugTarget target = ((IAdaptable)element).getAdapter(ICDebugTarget.class);
                                        if (target != null) {
                                                setContext(page, target);
                                                return;
index 3f68222..cf571f5 100644 (file)
@@ -293,8 +293,8 @@ public class AddGlobalsActionDelegate extends ActionDelegate implements IViewAct
                if ( getView() == null )
                        return;
                if ( element != null && element instanceof IDebugElement ) {
-                       IExecFileInfo info = (IExecFileInfo)((IDebugElement)element).getDebugTarget().getAdapter( IExecFileInfo.class );
-                       ICGlobalVariableManager gvm = (ICGlobalVariableManager)((IDebugElement)element).getDebugTarget().getAdapter( ICGlobalVariableManager.class );
+                       IExecFileInfo info = ((IDebugElement)element).getDebugTarget().getAdapter( IExecFileInfo.class );
+                       ICGlobalVariableManager gvm = ((IDebugElement)element).getDebugTarget().getAdapter( ICGlobalVariableManager.class );
                        if ( info != null && gvm != null ) {
                                fGlobals = info.getGlobals();
                                ListSelectionDialog dlg = createDialog();
index 819c642..6bccb07 100644 (file)
@@ -152,7 +152,7 @@ public class EnableVariablesActionDelegate implements IViewActionDelegate {
        protected IEnableDisableTarget getEnableDisableTarget( Object obj ) {
                IEnableDisableTarget target = null;
                if ( obj instanceof IAdaptable ) {
-                       target = (IEnableDisableTarget)((IAdaptable)obj).getAdapter( IEnableDisableTarget.class );
+                       target = ((IAdaptable)obj).getAdapter( IEnableDisableTarget.class );
                }
                return target;
        }
index 82e2034..71556bc 100644 (file)
@@ -52,7 +52,7 @@ public class LoadSymbolsForAllActionDelegate extends AbstractViewActionDelegate
        protected void doAction() throws DebugException {
                ICDebugTarget target = getDebugTarget( getView().getViewer().getInput() );
                if ( target != null ) {
-                       final IModuleRetrieval mr = (IModuleRetrieval)target.getAdapter( IModuleRetrieval.class );
+                       final IModuleRetrieval mr = target.getAdapter( IModuleRetrieval.class );
                        if ( mr != null ) {
                                DebugPlugin.getDefault().asyncExec( 
                                        new Runnable() {
@@ -92,7 +92,7 @@ public class LoadSymbolsForAllActionDelegate extends AbstractViewActionDelegate
 
        private ICDebugTarget getDebugTarget( Object element ) {
                if ( element instanceof IAdaptable ) {
-                       return (ICDebugTarget)((IAdaptable)element).getAdapter( ICDebugTarget.class );
+                       return ((IAdaptable)element).getAdapter( ICDebugTarget.class );
                }
                return null;
        }
index 213dd7f..2a0ed27 100644 (file)
@@ -177,7 +177,7 @@ public class MoveToLineActionDelegate implements IEditorActionDelegate, IActionD
                        IWorkbenchWindow workbenchWindow = part.getSite().getWorkbenchWindow();
                        IDebugContextService service = manager.getContextService(workbenchWindow);
                        service.addDebugContextListener(fContextListener);
-                       fPartTarget  = (IMoveToLineTarget) part.getAdapter(IMoveToLineTarget.class);
+                       fPartTarget  = part.getAdapter(IMoveToLineTarget.class);
                        if (fPartTarget == null) {
                                IAdapterManager adapterManager = Platform.getAdapterManager();
                                // TODO: we could restrict loading to cases when the debugging context is on
index 98fe0c8..f8a5cc9 100644 (file)
@@ -73,7 +73,7 @@ public class MoveToLineAdapter implements IMoveToLineTarget {
                                        final int lineNumber = textSelection.getStartLine() + 1;
                                        if ( target instanceof IAdaptable ) {
                                                final IPath path = convertPath( fileName, debugTarget );
-                                               final IMoveToLine moveToLine = (IMoveToLine)((IAdaptable)target).getAdapter( IMoveToLine.class );
+                                               final IMoveToLine moveToLine = ((IAdaptable)target).getAdapter( IMoveToLine.class );
                                                if ( moveToLine != null && moveToLine.canMoveToLine( path.toPortableString(), lineNumber ) ) {
                                                        Runnable r = new Runnable() {
                                                                @Override
@@ -106,7 +106,7 @@ public class MoveToLineAdapter implements IMoveToLineTarget {
        public boolean canMoveToLine( IWorkbenchPart part, ISelection selection, ISuspendResume target ) {
                if ( target instanceof IAdaptable ) {
                        if ( part instanceof IEditorPart ) {
-                               IMoveToLine moveToLine = (IMoveToLine)((IAdaptable)target).getAdapter( IMoveToLine.class );
+                               IMoveToLine moveToLine = ((IAdaptable)target).getAdapter( IMoveToLine.class );
                                if ( moveToLine == null)
                                        return false;
                                IEditorPart editorPart = (IEditorPart)part;
index 1569d6f..26d29c5 100644 (file)
@@ -93,7 +93,7 @@ public class NumberFormatsContribution extends CompoundContributionItem implemen
 
        @Override
        protected IContributionItem[] getContributionItems() {
-               ISelectionService service = (ISelectionService) fServiceLocator.getService(ISelectionService.class);
+               ISelectionService service = fServiceLocator.getService(ISelectionService.class);
                ISelection selection = service.getSelection();
 
 
index 78d9400..e16e027 100644 (file)
@@ -76,7 +76,7 @@ public class RemoveAllGlobalsActionDelegate extends ActionDelegate implements IV
        public void run( IAction action ) {
                IAdaptable context = DebugUITools.getDebugContext();
                if ( context instanceof IDebugElement ) {
-                       final ICGlobalVariableManager gvm = (ICGlobalVariableManager)((IDebugElement)context).getDebugTarget().getAdapter( ICGlobalVariableManager.class );
+                       final ICGlobalVariableManager gvm = ((IDebugElement)context).getDebugTarget().getAdapter( ICGlobalVariableManager.class );
                        if ( gvm != null ) {
                                DebugPlugin.getDefault().asyncExec( 
                                                new Runnable() {
@@ -99,7 +99,7 @@ public class RemoveAllGlobalsActionDelegate extends ActionDelegate implements IV
                        final IAdaptable context = DebugUITools.getDebugContext();
                        boolean enabled = false;
                        if (context instanceof IDebugElement) {
-                               final ICGlobalVariableManager gvm = (ICGlobalVariableManager) ((IDebugElement) context)
+                               final ICGlobalVariableManager gvm = ((IDebugElement) context)
                                                .getDebugTarget().getAdapter(
                                                                ICGlobalVariableManager.class);
                                if (gvm != null) {
index bbf5cb5..eb75b7d 100644 (file)
@@ -66,7 +66,7 @@ public class RemoveGlobalsActionDelegate extends ActionDelegate implements IView
                if ( list.size() == 0 )
                        return;
                final ICGlobalVariable[] globals = (ICGlobalVariable[])list.toArray( new ICGlobalVariable[list.size()] );
-               final ICGlobalVariableManager gvm = (ICGlobalVariableManager)globals[0].getDebugTarget().getAdapter( ICGlobalVariableManager.class );
+               final ICGlobalVariableManager gvm = globals[0].getDebugTarget().getAdapter( ICGlobalVariableManager.class );
                if ( gvm == null )
                        return;
                Runnable r = new Runnable() {
index 1591f55..c7a1493 100644 (file)
@@ -177,7 +177,7 @@ public class ResumeAtLineActionDelegate implements IEditorActionDelegate, IActio
                        IWorkbenchWindow workbenchWindow = part.getSite().getWorkbenchWindow();
                        IDebugContextService service = manager.getContextService(workbenchWindow);
                        service.addDebugContextListener(fContextListener);
-                       fPartTarget  = (IResumeAtLineTarget) part.getAdapter(IResumeAtLineTarget.class);
+                       fPartTarget  = part.getAdapter(IResumeAtLineTarget.class);
                        if (fPartTarget == null) {
                                IAdapterManager adapterManager = Platform.getAdapterManager();
                                // TODO: we could restrict loading to cases when the debugging context is on
index 7503f8f..853c1fd 100644 (file)
@@ -72,7 +72,7 @@ public class ResumeAtLineAdapter implements IResumeAtLineTarget {
                                        ITextSelection textSelection = (ITextSelection)selection;
                                        final int lineNumber = textSelection.getStartLine() + 1;
                                        if ( target instanceof IAdaptable ) {
-                                               final IResumeAtLine resumeAtLine = (IResumeAtLine)((IAdaptable)target).getAdapter( IResumeAtLine.class );
+                                               final IResumeAtLine resumeAtLine = ((IAdaptable)target).getAdapter( IResumeAtLine.class );
                                                if ( resumeAtLine != null && resumeAtLine.canResumeAtLine( path.toPortableString(), lineNumber ) ) {
                                                        Runnable r = new Runnable() {
                                                                @Override
@@ -105,7 +105,7 @@ public class ResumeAtLineAdapter implements IResumeAtLineTarget {
        public boolean canResumeAtLine( IWorkbenchPart part, ISelection selection, ISuspendResume target ) {
                if ( target instanceof IAdaptable ) {                   
                        if ( part instanceof IEditorPart ) {
-                               IResumeAtLine resumeAtLine = (IResumeAtLine)((IAdaptable)target).getAdapter( IResumeAtLine.class );
+                               IResumeAtLine resumeAtLine = ((IAdaptable)target).getAdapter( IResumeAtLine.class );
                                if ( resumeAtLine == null)
                                        return false;
                                IEditorPart editorPart = (IEditorPart)part;
index 1bbe188..34d1049 100644 (file)
@@ -166,9 +166,9 @@ public abstract class RetargetAction implements IWorkbenchWindowActionDelegate,
        @Override
        public void partActivated(IWorkbenchPart part) {
                fActivePart = part;
-               IResource resource = (IResource) part.getAdapter(IResource.class);
+               IResource resource = part.getAdapter(IResource.class);
                if (resource == null && part instanceof IEditorPart) {
-                       resource = (IResource) ((IEditorPart)part).getEditorInput().getAdapter(IResource.class);
+                       resource = ((IEditorPart)part).getEditorInput().getAdapter(IResource.class);
                }
                if (resource != null) {
                        fTargetAdapter = getAdapter(resource);
index a9ca8aa..eb7be12 100644 (file)
@@ -75,7 +75,7 @@ public class RunToLineAdapter implements IRunToLineTarget {
                                        ITextSelection textSelection = (ITextSelection)selection;
                                        final int lineNumber = textSelection.getStartLine() + 1;
                                        if ( target instanceof IAdaptable ) {
-                                               final IRunToLine runToLine = (IRunToLine)((IAdaptable)target).getAdapter( IRunToLine.class );
+                                               final IRunToLine runToLine = ((IAdaptable)target).getAdapter( IRunToLine.class );
                                                if ( runToLine != null && runToLine.canRunToLine( path.toPortableString(), lineNumber ) ) {
                                                        Runnable r = new Runnable() {
                                                                
@@ -109,7 +109,7 @@ public class RunToLineAdapter implements IRunToLineTarget {
        public boolean canRunToLine( IWorkbenchPart part, ISelection selection, ISuspendResume target ) {
                if ( target instanceof IAdaptable ) {                   
                        if ( part instanceof IEditorPart ) {
-                               IRunToLine runToLine = (IRunToLine)((IAdaptable)target).getAdapter( IRunToLine.class );
+                               IRunToLine runToLine = ((IAdaptable)target).getAdapter( IRunToLine.class );
                                if ( runToLine == null )
                                        return false;
                                IEditorPart editorPart = (IEditorPart)part;
index 6c933ff..83f75b2 100644 (file)
@@ -60,7 +60,7 @@ public class ShowFullPathsAction extends ViewFilterAction {
        @Override
        public void run( IAction action ) {
                final StructuredViewer viewer = getStructuredViewer();
-               IDebugView view = (IDebugView)getView().getAdapter( IDebugView.class );
+               IDebugView view = getView().getAdapter( IDebugView.class );
                if (view != null) {
                        IDebugModelPresentation pres = view.getPresentation( CDIDebugModel.getPluginIdentifier() );
                        if ( pres != null ) {
@@ -92,7 +92,7 @@ public class ShowFullPathsAction extends ViewFilterAction {
         /** @since 7.0 */
        @Override
        public void selectionChanged(IAction action, ISelection selection) {
-               IDebugView view = (IDebugView)getView().getAdapter(IDebugView.class);
+               IDebugView view = getView().getAdapter(IDebugView.class);
                
                // Debug view
                if (view instanceof LaunchView) {
index d119707..bc34cb5 100644 (file)
@@ -197,7 +197,7 @@ public class ToggleInstructionStepModeActionDelegate extends ActionDelegate
                }
                if (target == null) {
                        if (element instanceof IAdaptable) {
-                               target= (ISteppingModeTarget) ((IAdaptable)element).getAdapter(ISteppingModeTarget.class);
+                               target= ((IAdaptable)element).getAdapter(ISteppingModeTarget.class);
                        }
                }
                return target;
index 9090089..5dbee67 100644 (file)
@@ -124,7 +124,7 @@ public abstract class ViewFilterAction extends ViewerFilter implements IViewActi
        @Override
        public void selectionChanged(IAction action, ISelection selection) {
                boolean enable = false;
-               IDebugView view = (IDebugView)getView().getAdapter(IDebugView.class);
+               IDebugView view = getView().getAdapter(IDebugView.class);
                
                // Debug view
                if (view instanceof LaunchView) {
@@ -183,7 +183,7 @@ public abstract class ViewFilterAction extends ViewerFilter implements IViewActi
        }
        
        protected StructuredViewer getStructuredViewer() {
-               IDebugView view = (IDebugView)getView().getAdapter(IDebugView.class);
+               IDebugView view = getView().getAdapter(IDebugView.class);
                if (view != null) {
                        Viewer viewer = view.getViewer();
                        if (viewer instanceof StructuredViewer) {
index a9643cd..1db300b 100644 (file)
@@ -153,7 +153,7 @@ public class CAddBreakpointInteractiveRulerAction extends Action implements IUpd
                                return provider.getDocument(editor.getEditorInput());
                }
                
-               IDocument doc = (IDocument) fPart.getAdapter(IDocument.class);
+               IDocument doc = fPart.getAdapter(IDocument.class);
                if (doc != null) {
                        return doc;
                }
index b00dd33..4a127e7 100644 (file)
@@ -145,7 +145,7 @@ public class CAddDynamicPrintfInteractiveRulerAction extends Action implements I
                                return provider.getDocument(editor.getEditorInput());
                }
                
-               IDocument doc = (IDocument) fPart.getAdapter(IDocument.class);
+               IDocument doc = fPart.getAdapter(IDocument.class);
                if (doc != null) {
                        return doc;
                }
index 92888f2..ac04a92 100644 (file)
@@ -118,10 +118,10 @@ public class ToggleBreakpointAdapter extends AbstractToggleBreakpointAdapter {
         ICDIMemorySpaceManagement memMgr = null;
         
         if ( debugViewElement != null ) {
-            ICDebugTarget debugTarget = (ICDebugTarget)debugViewElement.getAdapter(ICDebugTarget.class);
+            ICDebugTarget debugTarget = debugViewElement.getAdapter(ICDebugTarget.class);
             
             if ( debugTarget != null ){
-                ICDITarget target = (ICDITarget)debugTarget.getAdapter(ICDITarget.class);
+                ICDITarget target = debugTarget.getAdapter(ICDITarget.class);
             
                 if (target instanceof ICDIMemorySpaceManagement)
                     memMgr = (ICDIMemorySpaceManagement)target;
index 567809a..867eeec 100644 (file)
@@ -57,7 +57,7 @@ public class ToggleCBreakpointsTargetFactory implements IToggleBreakpointsTarget
         Object element = getDebugContext(part).getFirstElement();
         if (element instanceof IAdaptable) {
             IDebugModelProvider modelProvider = 
-                (IDebugModelProvider)((IAdaptable)element).getAdapter(IDebugModelProvider.class);
+                ((IAdaptable)element).getAdapter(IDebugModelProvider.class);
             if (modelProvider != null) {
                 String[] models = modelProvider.getModelIdentifiers();
                 for (String model : models) {
index 4801540..557e233 100644 (file)
@@ -146,7 +146,7 @@ class CBreakpointContextActionFilter implements IActionFilter {
             Object debugElement = ((IStructuredSelection)debugContext).getFirstElement();
             if (debugElement instanceof IAdaptable) {
                 IDebugModelProvider debugModelProvider = 
-                    (IDebugModelProvider)((IAdaptable)debugElement).getAdapter(IDebugModelProvider.class);
+                    ((IAdaptable)debugElement).getAdapter(IDebugModelProvider.class);
                 if (debugModelProvider != null) {
                     return debugModelProvider.getModelIdentifiers();
                 } else if (debugElement instanceof IDebugElement) {
index a74f470..7807ea5 100644 (file)
@@ -41,7 +41,7 @@ public class CBreakpointFilteringPage extends PropertyPage {
        }
 
     public ICBreakpoint getBreakpoint() {
-        return (ICBreakpoint)getElement().getAdapter(ICBreakpoint.class);
+        return getElement().getAdapter(ICBreakpoint.class);
     }
 
        public ICBreakpointFilterExtension getFilterExtension() {
index 2ada2e6..5b282c2 100644 (file)
@@ -417,7 +417,7 @@ public class CBreakpointPropertyPage extends FieldEditorPreferencePage implement
             ICDebugTarget debugTarget = (ICDebugTarget)DebugPlugin.getAdapter(debugViewElement, ICDebugTarget.class);
             
             if ( debugTarget != null ){
-                ICDITarget target = (ICDITarget)debugTarget.getAdapter(ICDITarget.class);
+                ICDITarget target = debugTarget.getAdapter(ICDITarget.class);
             
                 if (target instanceof ICDIMemorySpaceManagement)
                     memMgr = (ICDIMemorySpaceManagement)target;
@@ -572,7 +572,7 @@ public class CBreakpointPropertyPage extends FieldEditorPreferencePage implement
             }
            }
            
-           IWorkbenchAdapter labelProvider = (IWorkbenchAdapter)getElement().getAdapter(IWorkbenchAdapter.class);
+           IWorkbenchAdapter labelProvider = getElement().getAdapter(IWorkbenchAdapter.class);
            if (labelProvider != null) {
                return labelProvider.getLabel(getElement());
            }
@@ -710,12 +710,12 @@ public class CBreakpointPropertyPage extends FieldEditorPreferencePage implement
                } else if (element instanceof ICBreakpointContext) {
                    return ((ICBreakpointContext)element).getBreakpoint();
                } else {
-                   return (ICBreakpoint)element.getAdapter(ICBreakpoint.class);
+                   return element.getAdapter(ICBreakpoint.class);
                }
        }
 
        protected Object getDebugContext() {
-        IDebugContextProvider provider = (IDebugContextProvider)getElement().getAdapter(IDebugContextProvider.class);
+        IDebugContextProvider provider = getElement().getAdapter(IDebugContextProvider.class);
         if (provider != null) {
             ISelection selection = provider.getActiveContext();
             if (selection instanceof IStructuredSelection) {
index cb341c3..f595e10 100644 (file)
@@ -138,7 +138,7 @@ public class ThreadFilterEditor {
                @Override
                public Object[] getChildren( Object parent ) {
                        if ( parent instanceof IDebugTarget ) {
-                               ICDebugTarget target = (ICDebugTarget)((IDebugTarget)parent).getAdapter( ICDebugTarget.class );
+                               ICDebugTarget target = ((IDebugTarget)parent).getAdapter( ICDebugTarget.class );
                                if ( target != null ) {
                                        try {
                                                return ((ICDebugTarget)parent).getThreads();
@@ -156,7 +156,7 @@ public class ThreadFilterEditor {
                                for( int i = 0, numLaunches = launches.length; i < numLaunches; i++ ) {
                                        targets = launches[i].getDebugTargets();
                                        for( int j = 0, numTargets = targets.length; j < numTargets; j++ ) {
-                                               target = (ICDebugTarget)targets[j].getAdapter( ICDebugTarget.class );
+                                               target = targets[j].getAdapter( ICDebugTarget.class );
                                                if ( target != null && !target.isDisconnected() && !target.isTerminated() ) {
                                                        children.add( target );
                                                }
index 53629e7..0b01f94 100644 (file)
@@ -137,7 +137,7 @@ public abstract class AbstractRegisterGroupCommandHandler extends AbstractHandle
                Object element = selection.getFirstElement();
 
                if (element instanceof IDebugElement) {
-                       return (ICDebugTarget) ((IDebugElement) element).getDebugTarget().getAdapter(ICDebugTarget.class);
+                       return ((IDebugElement) element).getDebugTarget().getAdapter(ICDebugTarget.class);
                }
                return null;
        }
index 64f1a4e..5d27c7b 100644 (file)
@@ -107,14 +107,14 @@ public class ReverseToggleCommandHandler extends DebugCommandHandler implements
             }
         }
 
-        ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
+        ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class);
         if (commandService != null) {
            commandService.refreshElements(REVERSE_TOGGLE_COMMAND_ID, null);
         }
     }
 
     private IReverseToggleHandler getAdapter(IAdaptable adaptable) {
-       IReverseToggleHandler adapter  = (IReverseToggleHandler)adaptable.getAdapter(IReverseToggleHandler.class);
+       IReverseToggleHandler adapter  = adaptable.getAdapter(IReverseToggleHandler.class);
         if (adapter == null) {
             IAdapterManager adapterManager = Platform.getAdapterManager();
             if (adapterManager.hasAdapter(adaptable, getCommandType().getName())) {
@@ -138,13 +138,13 @@ public class ReverseToggleCommandHandler extends DebugCommandHandler implements
                        public IStatus runInUIThread(IProgressMonitor monitor) {
                        // Request re-evaluation of property "org.eclipse.cdt.debug.ui.isReverseDebuggingEnabled" to update 
                            // visibility of reverse stepping commands.
-                           IEvaluationService exprService = (IEvaluationService) PlatformUI.getWorkbench().getService(IEvaluationService.class);
+                           IEvaluationService exprService = PlatformUI.getWorkbench().getService(IEvaluationService.class);
                            if (exprService != null) {
                                exprService.requestEvaluation("org.eclipse.cdt.debug.ui.isReverseDebuggingEnabled"); //$NON-NLS-1$
                            }
                            // Refresh reverse toggle commands with the new state of reverse enabled. 
                            // This is in order to keep multiple toggle actions in UI in sync.
-                           ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
+                           ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class);
                        if (commandService != null) {
                           commandService.refreshElements(REVERSE_TOGGLE_COMMAND_ID, null);
                        }
index 7e05314..854ea0e 100644 (file)
@@ -61,7 +61,7 @@ public class DisassemblyDisplayModeHandler extends AbstractHandler implements IE
     @Override
        @SuppressWarnings("unchecked")
     public void updateElement( UIElement element, Map parameters ) {
-        IWorkbenchPartSite site = (IWorkbenchPartSite)element.getServiceLocator().getService( IWorkbenchPartSite.class );
+        IWorkbenchPartSite site = element.getServiceLocator().getService( IWorkbenchPartSite.class );
         if ( site != null ) {
             IWorkbenchPart part = site.getPart();
             if ( part instanceof ITextEditor ) {
index 731672c..28bdb61 100644 (file)
@@ -58,7 +58,7 @@ public class SetSteppingModeHandler extends AbstractHandler implements IElementU
         CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_STEP_MODE, fCurrentValue );
 
         IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked( event );
-        ICommandService service = (ICommandService)window.getService( ICommandService.class );
+        ICommandService service = window.getService( ICommandService.class );
         service.refreshElements( event.getCommand().getId(), null );
 
         return null;
@@ -99,7 +99,7 @@ public class SetSteppingModeHandler extends AbstractHandler implements IElementU
         if ( selection instanceof IStructuredSelection ) {
             Object element = ((IStructuredSelection)selection).getFirstElement();
             if ( element instanceof IAdaptable )
-                return (ISteppingModeTarget)((IAdaptable)element).getAdapter( ISteppingModeTarget.class );
+                return ((IAdaptable)element).getAdapter( ISteppingModeTarget.class );
         }
         return null;
     }
index db14e2b..a6bed89 100644 (file)
@@ -52,7 +52,7 @@ public class CDIDisassemblyRetrieval implements IDisassemblyRetrieval {
                Runnable op= new Runnable() {
                        @Override
                        public void run() {
-                               ICDITarget cdiTarget= (ICDITarget) fDebugTarget.getAdapter(ICDITarget.class);
+                               ICDITarget cdiTarget= fDebugTarget.getAdapter(ICDITarget.class);
                                try {
                                        ICDIMixedInstruction[] mixedInstructions= null;
                                        ICDIInstruction[] asmInstructions= null;
index bcc888c..e5384cd 100644 (file)
@@ -212,7 +212,7 @@ public class DisassemblyEditor extends EditorPart implements ITextEditor, IReusa
         }
         else if ( element instanceof IAdaptable ) {
             IAdaptable adaptable = (IAdaptable)element;
-            adapter = (IDisassemblyContextProvider)adaptable.getAdapter( IDisassemblyContextProvider.class );
+            adapter = adaptable.getAdapter( IDisassemblyContextProvider.class );
         }
         return adapter;
     }
index 34c661f..efeed38 100644 (file)
@@ -324,7 +324,7 @@ public class DisassemblyEditorManager implements IWindowListener, IDisassemblyCo
         }
         else if ( element instanceof IAdaptable ) {
             IAdaptable adaptable = (IAdaptable)element;
-            adapter = (IDisassemblyContextProvider)adaptable.getAdapter( IDisassemblyContextProvider.class );
+            adapter = adaptable.getAdapter( IDisassemblyContextProvider.class );
         }
         return adapter;
     }
@@ -333,7 +333,7 @@ public class DisassemblyEditorManager implements IWindowListener, IDisassemblyCo
         if ( debugContext instanceof ISteppingModeTarget )
             return (ISteppingModeTarget)debugContext;
         if ( debugContext instanceof IAdaptable )
-            return (ISteppingModeTarget)((IAdaptable)debugContext).getAdapter( ISteppingModeTarget.class );
+            return ((IAdaptable)debugContext).getAdapter( ISteppingModeTarget.class );
         return null;
     }
 }
index 0adaa91..c472732 100644 (file)
@@ -156,7 +156,7 @@ public class DisassemblyEditorInput implements IEditorInput {
                if ( fBlock != null ) {
                        IDisassembly dis = fBlock.getDisassembly();
                        if ( dis != null ) {
-                               ICDebugTarget target = (ICDebugTarget)dis.getDebugTarget().getAdapter( ICDebugTarget.class );
+                               ICDebugTarget target = dis.getDebugTarget().getAdapter( ICDebugTarget.class );
                                if ( target != null ) {
                                        try {
                                                IAddress address = target.getBreakpointAddress( breakpoint );
@@ -341,7 +341,7 @@ public class DisassemblyEditorInput implements IEditorInput {
                Assert.isTrue( address != null );
                IDisassembly dis = getDisassembly();
                if ( dis != null ) {
-                       ICDebugTarget bt = (ICDebugTarget)dis.getDebugTarget().getAdapter( ICDebugTarget.class );
+                       ICDebugTarget bt = dis.getDebugTarget().getAdapter( ICDebugTarget.class );
                        if ( bt != null ) {
                                String modelId = CDIDebugModel.getPluginIdentifier();
                                IBreakpoint[] bps = DebugPlugin.getDefault().getBreakpointManager().getBreakpoints( modelId );
index f95a0e8..50f4206 100644 (file)
@@ -96,7 +96,7 @@ public class DisassemblyMemoryRendering extends AbstractMemoryRendering {
         }
         else if ( element instanceof IAdaptable ) {
             IAdaptable adaptable = (IAdaptable)element;
-            adapter = (IDisassemblyContextProvider)adaptable.getAdapter( IDisassemblyContextProvider.class );
+            adapter = adaptable.getAdapter( IDisassemblyContextProvider.class );
         }
         return adapter;
     }
index 94d167b..b1aa820 100644 (file)
@@ -89,7 +89,7 @@ public class DocumentAnnotationProvider {
         }
         else if ( element instanceof IAdaptable ) {
             IAdaptable adaptable = (IAdaptable)element;
-            adapter = (IDocumentElementAnnotationProvider)adaptable.getAdapter( IDocumentElementAnnotationProvider.class );
+            adapter = adaptable.getAdapter( IDocumentElementAnnotationProvider.class );
         }
         return adapter;
     }
index 96420d8..ad10dff 100644 (file)
@@ -97,7 +97,7 @@ public class DocumentContentProvider implements IModelChangedListener {
         }
         else if ( element instanceof IAdaptable ) {
             IAdaptable adaptable = (IAdaptable)element;
-            adapter = (IDocumentElementContentProvider)adaptable.getAdapter( IDocumentElementContentProvider.class );
+            adapter = adaptable.getAdapter( IDocumentElementContentProvider.class );
         }
         return adapter;
     }
@@ -381,7 +381,7 @@ public class DocumentContentProvider implements IModelChangedListener {
         }
         else if ( element instanceof IAdaptable ) {
             IAdaptable adaptable = (IAdaptable)element;
-            adapter = (IModelProxyFactory)adaptable.getAdapter( IModelProxyFactory.class );
+            adapter = adaptable.getAdapter( IModelProxyFactory.class );
         }
         return adapter;
     }
index db498be..92f00ff 100644 (file)
@@ -103,7 +103,7 @@ public class DocumentLabelProvider extends BaseLabelProvider {
         }
         else if ( element instanceof IAdaptable ) {
             IAdaptable adaptable = (IAdaptable)element;
-            adapter = (IDocumentElementLabelProvider)adaptable.getAdapter( IDocumentElementLabelProvider.class );
+            adapter = adaptable.getAdapter( IDocumentElementLabelProvider.class );
         }
         return adapter;
     }
index f396b25..0e9b31a 100644 (file)
@@ -31,7 +31,7 @@ public class DebugTextHover extends AbstractDebugTextHover {
        protected ICStackFrame getFrame() {
         IAdaptable adaptable = getSelectionAdaptable();
         if (adaptable != null) {
-            return (ICStackFrame) adaptable.getAdapter(ICStackFrame.class);
+            return adaptable.getAdapter(ICStackFrame.class);
         }
         return null;
        }
index 963d9f5..c01d0c1 100644 (file)
@@ -95,7 +95,7 @@ public class DelegatingDebugTextHover implements ICEditorTextHover, ITextHoverEx
     private ICEditorTextHover getDelegate() {
         IAdaptable context = DebugUITools.getDebugContext();
         if (context != null) {
-            ICEditorTextHover hover = (ICEditorTextHover) context.getAdapter(ICEditorTextHover.class);
+            ICEditorTextHover hover = context.getAdapter(ICEditorTextHover.class);
             if (hover != null) {
                 hover.setEditor(fEditor);
             }
index cd90cd5..06b5182 100644 (file)
@@ -35,9 +35,9 @@ public class CDebugElementProxyFactory extends DefaultModelProxyFactory {
         if ( IDebugUIConstants.ID_MODULE_VIEW.equals( context.getId() ) ) {
             IModuleRetrieval mr = null;
             if ( element instanceof IAdaptable ) {
-                ICDebugTarget target = (ICDebugTarget)((IAdaptable)element).getAdapter( ICDebugTarget.class );
+                ICDebugTarget target = ((IAdaptable)element).getAdapter( ICDebugTarget.class );
                 if ( target != null )
-                    mr = (IModuleRetrieval)target.getAdapter( IModuleRetrieval.class );
+                    mr = target.getAdapter( IModuleRetrieval.class );
             }
             if ( mr != null ) {
                 return new ModulesViewModelProxy( mr );
index 89962e2..7bea55a 100644 (file)
@@ -405,7 +405,7 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut2 {
                                                        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) {
index 0920a0b..73e5ee8 100644 (file)
@@ -36,7 +36,7 @@ public class CPropertyTester extends PropertyTester {
        private boolean isExecutable(Object receiver) {
                ICElement celement = null;
                if (receiver instanceof IAdaptable) {
-                       IResource res = (IResource) ((IAdaptable) receiver).getAdapter(IResource.class);
+                       IResource res = ((IAdaptable) receiver).getAdapter(IResource.class);
                        if (res != null) {
                                celement = CoreModel.getDefault().create(res);
                        }
index e127552..b6b6731 100644 (file)
@@ -125,7 +125,7 @@ public class DebugContextPinProvider extends AbstractDebugContextProvider implem
                        for (Object element : ((IStructuredSelection)selection).toList()) {
                                IPinProvider pinProvider = null;
                                if (element instanceof IAdaptable) {
-                                       pinProvider = (IPinProvider) ((IAdaptable)element).getAdapter(IPinProvider.class);                                      
+                                       pinProvider = ((IAdaptable)element).getAdapter(IPinProvider.class);                                     
                                }
                                
                                if (pinProvider != null) {
index 197029a..9c28cb1 100644 (file)
@@ -181,7 +181,7 @@ public class PinCloneUtils {
                                
                                /* IPinProvider */
                                if (element instanceof IAdaptable) {                                    
-                                       IPinProvider pinProvider = (IPinProvider) ((IAdaptable)element).getAdapter(IPinProvider.class);
+                                       IPinProvider pinProvider = ((IAdaptable)element).getAdapter(IPinProvider.class);
                                        if (pinProvider != null) {
                                                if (pinProvider.isPinnable(part,  element))
                                                        pinnable = true;
@@ -216,7 +216,7 @@ public class PinCloneUtils {
         for (IPinElementHandle handle : handles) {
                if (debugContext instanceof IAdaptable) {
 
-                       IPinProvider pinProvider = (IPinProvider) ((IAdaptable) debugContext).getAdapter(IPinProvider.class);
+                       IPinProvider pinProvider = ((IAdaptable) debugContext).getAdapter(IPinProvider.class);
                        if (pinProvider != null) {
                                if (pinProvider.isPinnedTo(debugContext, handle)) {
                                colorDesc = handle.getPinElementColorDescriptor();
@@ -249,7 +249,7 @@ public class PinCloneUtils {
        public static boolean isPinnedTo(Set<IPinElementHandle> handles, Object debugContext) {
                for (IPinElementHandle handle : handles) {
                if (debugContext instanceof IAdaptable) {
-                       IPinProvider pinProvider = (IPinProvider) ((IAdaptable) debugContext).getAdapter(IPinProvider.class);
+                       IPinProvider pinProvider = ((IAdaptable) debugContext).getAdapter(IPinProvider.class);
                        if (pinProvider != null) {
                                if (pinProvider.isPinnedTo(debugContext, handle)) {
                                        return true;
index 663281b..178a730 100644 (file)
@@ -375,7 +375,7 @@ public class CDebugPreferencePage extends PreferencePage implements IWorkbenchPr
        protected void refreshViews( IWorkbenchPage page, String viewID ) {
                IViewPart part = page.findView( viewID );
                if ( part != null ) {
-                       IDebugView adapter = (IDebugView)part.getAdapter( IDebugView.class );
+                       IDebugView adapter = part.getAdapter( IDebugView.class );
                        if ( adapter != null ) {
                                Viewer viewer = adapter.getViewer();
                                if ( viewer instanceof StructuredViewer ) {
index 3f098fa..260e291 100644 (file)
@@ -131,7 +131,7 @@ public class CSourceNotFoundEditor extends CommonSourceNotFoundEditor {
                        if (context == null)
                                return super.getText();
                        String contextDescription;
-                       ICSourceNotFoundDescription description = (ICSourceNotFoundDescription) context.getAdapter(ICSourceNotFoundDescription.class);
+                       ICSourceNotFoundDescription description = context.getAdapter(ICSourceNotFoundDescription.class);
                        if (description != null)
                                contextDescription = description.getDescription();
                        else
@@ -295,7 +295,7 @@ public class CSourceNotFoundEditor extends CommonSourceNotFoundEditor {
                                IWorkbenchPage page = getEditorSite().getPage();
                                
                                if (isDebugElement) {
-                                       ISourceDisplay adapter = (ISourceDisplay)context.getAdapter(ISourceDisplay.class);
+                                       ISourceDisplay adapter = context.getAdapter(ISourceDisplay.class);
                                        if (adapter != null) {                                          
                                                adapter.displaySource(context, page, true);
                                        }                                       
index df7c540..dba0dee 100644 (file)
@@ -65,7 +65,7 @@ public class SourceContainerWorkbenchAdapter implements IWorkbenchAdapter {
        }
 
        protected ImageDescriptor getImageDescriptor(ICElement element) {
-               IWorkbenchAdapter adapter = (IWorkbenchAdapter)element.getAdapter(IWorkbenchAdapter.class);
+               IWorkbenchAdapter adapter = element.getAdapter(IWorkbenchAdapter.class);
                if (adapter != null) {
                        return adapter.getImageDescriptor(element);
                }
index c28129c..34d89a5 100644 (file)
@@ -278,7 +278,7 @@ public class SourceDisplayAdapter implements ISourceDisplay {
                 displayDisassembly(page, frame);
             } else {
                 DelegatingStackFrame delegatingFrame = new DelegatingStackFrame((ICStackFrame)element);
-                ISourceDisplay sd = (ISourceDisplay)Platform.getAdapterManager().getAdapter(delegatingFrame, ISourceDisplay.class);
+                ISourceDisplay sd = Platform.getAdapterManager().getAdapter(delegatingFrame, ISourceDisplay.class);
                 if (sd != null)
                     sd.displaySource(element, page, forceSourceLookup);
             }
index 57d05bd..bf5dd4b 100644 (file)
@@ -97,7 +97,7 @@ public class AddMemoryBlocks implements IAddMemoryBlocksTarget {
                final IAdaptable debugViewElement = DebugUITools.getDebugContext();
 
 
-               IMemoryBlockRetrieval retrieval = (IMemoryBlockRetrieval)debugViewElement.getAdapter(IMemoryBlockRetrieval.class);
+               IMemoryBlockRetrieval retrieval = debugViewElement.getAdapter(IMemoryBlockRetrieval.class);
                if (retrieval == null && debugViewElement instanceof IDebugElement) {
                        // Added logic for CDI (which is based on the standard debug model)
                        retrieval = ((IDebugElement)debugViewElement).getDebugTarget();
@@ -363,7 +363,7 @@ public class AddMemoryBlocks implements IAddMemoryBlocksTarget {
                CMemoryBlockRetrievalExtension cdtRetrieval = null;
 
                {
-                       IMemoryBlockRetrieval retrieval = (IMemoryBlockRetrieval)debugViewElement.getAdapter(IMemoryBlockRetrieval.class);
+                       IMemoryBlockRetrieval retrieval = debugViewElement.getAdapter(IMemoryBlockRetrieval.class);
 
                        if (retrieval == null && debugViewElement instanceof IDebugElement)
                                retrieval = ((IDebugElement)debugViewElement).getDebugTarget();
index 0263e7e..5c628bb 100644 (file)
@@ -56,13 +56,13 @@ public class ModuleContentProvider extends ElementContentProvider {
                        return ((IModuleRetrieval)parent).getModules();
                }
                else if ( parent instanceof ICThread || parent instanceof ICStackFrame ) {
-                       IModuleRetrieval mr = (IModuleRetrieval)((IAdaptable)parent).getAdapter( IModuleRetrieval.class );
+                       IModuleRetrieval mr = ((IAdaptable)parent).getAdapter( IModuleRetrieval.class );
                        if ( mr != null ) {
                                return mr.getModules();
                        }
                }
                else if ( parent instanceof ICModule ) {
-                       IBinary binary = (IBinary)((ICModule)parent).getAdapter( IBinary.class );
+                       IBinary binary = ((ICModule)parent).getAdapter( IBinary.class );
                        if ( binary != null ) {
                                try {
                                        return binary.getChildren();
index 17c4414..1fc7077 100644 (file)
@@ -41,7 +41,7 @@ public class ModuleLabelProvider extends ElementLabelProvider {
                        return presentation.getText( element );
                }
                if ( element instanceof IAdaptable ) {
-                       IWorkbenchAdapter adapter = (IWorkbenchAdapter)(((IAdaptable)element).getAdapter( IWorkbenchAdapter.class ));
+                       IWorkbenchAdapter adapter = (((IAdaptable)element).getAdapter( IWorkbenchAdapter.class ));
                        if ( adapter != null )
                                return adapter.getLabel( element );
                }
@@ -70,7 +70,7 @@ public class ModuleLabelProvider extends ElementLabelProvider {
                        }
                }
                if ( element instanceof ICElement ) {
-                       IWorkbenchAdapter adapter = (IWorkbenchAdapter)(((IAdaptable)element).getAdapter( IWorkbenchAdapter.class ));
+                       IWorkbenchAdapter adapter = (((IAdaptable)element).getAdapter( IWorkbenchAdapter.class ));
                        if ( adapter != null )
                                return adapter.getImageDescriptor( element );
                }
index ac921a6..89a186a 100644 (file)
@@ -40,7 +40,7 @@ public class ModuleMementoProvider extends ElementMementoProvider {
        @Override
        protected boolean encodeElement( Object element, IMemento memento, IPresentationContext context ) throws CoreException {
                if ( element instanceof ICDebugTarget || element instanceof ICThread || element instanceof ICStackFrame ) {
-                       IModuleRetrieval mr = (IModuleRetrieval)((IAdaptable)element).getAdapter( IModuleRetrieval.class );
+                       IModuleRetrieval mr = ((IAdaptable)element).getAdapter( IModuleRetrieval.class );
                        if ( mr != null ) {
                                memento.putString( ELEMENT_NAME, mr.toString() );
                        }
@@ -70,7 +70,7 @@ public class ModuleMementoProvider extends ElementMementoProvider {
                if ( mementoName != null ) {
                        String elementName = null;
                        if ( element instanceof ICDebugTarget || element instanceof ICThread || element instanceof ICStackFrame ) {
-                               IModuleRetrieval mr = (IModuleRetrieval)((IAdaptable)element).getAdapter( IModuleRetrieval.class );
+                               IModuleRetrieval mr = ((IAdaptable)element).getAdapter( IModuleRetrieval.class );
                                elementName = ( mr != null ) ? mr.toString() : CDIDebugModel.getPluginIdentifier();
                        }
                        else if ( element instanceof ICModule ) {
index a9dd50c..834c289 100644 (file)
@@ -178,7 +178,7 @@ public class FlexibleSignalsView extends AbstractDebugView implements IViewerUpd
        @Override
        public void viewerUpdatesBegin() {
         IWorkbenchSiteProgressService progressService = 
-            (IWorkbenchSiteProgressService)getSite().getAdapter(IWorkbenchSiteProgressService.class);
+            getSite().getAdapter(IWorkbenchSiteProgressService.class);
         if (progressService != null) {
             progressService.incrementBusy();
         }
@@ -190,7 +190,7 @@ public class FlexibleSignalsView extends AbstractDebugView implements IViewerUpd
        @Override
        public void viewerUpdatesComplete() {
         IWorkbenchSiteProgressService progressService = 
-            (IWorkbenchSiteProgressService)getSite().getAdapter(IWorkbenchSiteProgressService.class);
+            getSite().getAdapter(IWorkbenchSiteProgressService.class);
         if (progressService != null) {
             progressService.decrementBusy();
         }       
index 704c6df..7fccf69 100644 (file)
@@ -41,7 +41,7 @@ public class ActionsPropertyPage extends PropertyPage {
        public Control createContents(Composite parent) {
                Composite container = new Composite(parent, SWT.NULL);
 
-               IBreakpoint breakpoint = (IBreakpoint) this.getElement().getAdapter(org.eclipse.debug.core.model.IBreakpoint.class);
+               IBreakpoint breakpoint = this.getElement().getAdapter(org.eclipse.debug.core.model.IBreakpoint.class);
                breakpointMarker = breakpoint.getMarker();
                savedActionNames = breakpointMarker.getAttribute(BreakpointActionManager.BREAKPOINT_ACTION_ATTRIBUTE, ""); //$NON-NLS-1$
 
index 1de08d0..6b9c950 100644 (file)
@@ -66,7 +66,7 @@ public class LogAction extends AbstractBreakpointAction {
                        String logMessage = getMessage();
 
                        if (isEvaluateExpression()) {
-                               ILogActionEnabler enabler = (ILogActionEnabler) context.getAdapter(ILogActionEnabler.class);
+                               ILogActionEnabler enabler = context.getAdapter(ILogActionEnabler.class);
                                if (enabler != null)
                                        logMessage = enabler.evaluateExpression(logMessage);
                        }
index 1dde0b7..b16a088 100644 (file)
@@ -53,7 +53,7 @@ public class ResumeAction extends AbstractBreakpointAction {
        public IStatus execute(IBreakpoint breakpoint, IAdaptable context, IProgressMonitor monitor) {
                IStatus errorStatus = null;
                long endTime = System.currentTimeMillis() + getPauseTime()*1000;
-               IResumeActionEnabler enabler = (IResumeActionEnabler) context.getAdapter(IResumeActionEnabler.class);
+               IResumeActionEnabler enabler = context.getAdapter(IResumeActionEnabler.class);
 
                if (enabler != null) {
                        try {
index 02ce0ec..5570fae 100644 (file)
@@ -81,7 +81,7 @@ public class ReverseDebugAction extends AbstractBreakpointAction{
        public IStatus execute(IBreakpoint breakpoint, IAdaptable context, IProgressMonitor monitor) {
                IStatus errorStatus = null;
                
-               IReverseDebugEnabler enabler = (IReverseDebugEnabler) context.getAdapter(IReverseDebugEnabler.class);
+               IReverseDebugEnabler enabler = context.getAdapter(IReverseDebugEnabler.class);
                if (enabler != null) {
                        try {
                                switch (fOperation) {
index d38d993..b87ef78 100644 (file)
@@ -249,7 +249,7 @@ abstract public class AbstractToggleBreakpointAdapter
     private boolean hasBreakpoint(IWorkbenchPart part) {
        if (part instanceof ITextEditor) {
                ITextEditor textEditor = (ITextEditor) part;
-               IVerticalRulerInfo rulerInfo = (IVerticalRulerInfo) textEditor.getAdapter(IVerticalRulerInfo.class);
+               IVerticalRulerInfo rulerInfo = textEditor.getAdapter(IVerticalRulerInfo.class);
                IBreakpoint breakpoint = CDebugUIUtils.getBreakpointFromEditor(textEditor, rulerInfo);
                return breakpoint != null;
        }
@@ -634,7 +634,7 @@ abstract public class AbstractToggleBreakpointAdapter
             Object obj = ((IStructuredSelection)selection).getFirstElement();
             if (obj != null) {
                 if (obj instanceof IAdaptable) {
-                    return (IRepositionableMemoryRendering) ((IAdaptable)obj).getAdapter(IRepositionableMemoryRendering.class);
+                    return ((IAdaptable)obj).getAdapter(IRepositionableMemoryRendering.class);
                 }
             }
         }
@@ -647,9 +647,9 @@ abstract public class AbstractToggleBreakpointAdapter
             Object obj = ((IStructuredSelection)selection).getFirstElement();
             if (obj != null) {
                 if (obj instanceof IAdaptable) {
-                    ICWatchpointTarget target = (ICWatchpointTarget) ((IAdaptable)obj).getAdapter(ICWatchpointTarget.class);
+                    ICWatchpointTarget target = ((IAdaptable)obj).getAdapter(ICWatchpointTarget.class);
                     if (target == null) {
-                        target = (ICWatchpointTarget) ((IAdaptable)obj).getAdapter(
+                        target = ((IAdaptable)obj).getAdapter(
                             org.eclipse.cdt.debug.internal.core.ICWatchpointTarget.class);
                     }
                     return target;
@@ -666,7 +666,7 @@ abstract public class AbstractToggleBreakpointAdapter
         * @param part Workbench part where action was invoked.
         */
        protected void report( String message, IWorkbenchPart part ) {
-               IEditorStatusLine statusLine = (IEditorStatusLine)part.getAdapter( IEditorStatusLine.class );
+               IEditorStatusLine statusLine = part.getAdapter( IEditorStatusLine.class );
                if ( statusLine != null ) {
                        if ( message != null ) {
                                statusLine.setMessage( true, message, null );
@@ -706,7 +706,7 @@ abstract public class AbstractToggleBreakpointAdapter
                if ( resource != null )
                        return resource;
                /* This file is not in a project, let default case handle it */
-               ILocationProvider provider = (ILocationProvider)editorInput.getAdapter( ILocationProvider.class );
+               ILocationProvider provider = editorInput.getAdapter( ILocationProvider.class );
                if ( provider != null ) {
                        IPath location = provider.getPath( editorInput );
                        if ( location != null ) {
@@ -805,7 +805,7 @@ abstract public class AbstractToggleBreakpointAdapter
        private boolean toggleBreakpointEnable(IWorkbenchPart part) {
         ITextEditor textEditor = getTextEditor(part);
         if(textEditor != null) {
-            IVerticalRulerInfo info = (IVerticalRulerInfo) textEditor.getAdapter(IVerticalRulerInfo.class);
+            IVerticalRulerInfo info = textEditor.getAdapter(IVerticalRulerInfo.class);
             if(info != null) {
                 EnableDisableBreakpointRulerAction enableAction = new EnableDisableBreakpointRulerAction(part, info);
                 enableAction.update();
@@ -827,7 +827,7 @@ abstract public class AbstractToggleBreakpointAdapter
         if (part instanceof ITextEditor) {
             return (ITextEditor) part;
         }
-        return (ITextEditor) part.getAdapter(ITextEditor.class);
+        return part.getAdapter(ITextEditor.class);
     }
 
     /**
index e666949..5718e2f 100644 (file)
@@ -214,7 +214,7 @@ public class GdbPinProvider implements IPinProvider {
                
                IDMContext dmc = null;
                if (debugContext instanceof IAdaptable) {
-                       dmc = (IDMContext) ((IAdaptable) debugContext).getAdapter(IDMContext.class);
+                       dmc = ((IAdaptable) debugContext).getAdapter(IDMContext.class);
                        
                        if (dmc != null) {
                                sessionId = dmc.getSessionId() + "."; //$NON-NLS-1$
@@ -256,7 +256,7 @@ public class GdbPinProvider implements IPinProvider {
                // dispatch the event to update the handle DM context
                Object debugContext = handle.getDebugContext();
                if (debugContext instanceof IAdaptable) {
-                       IDMContext dmc = (IDMContext) ((IAdaptable) debugContext).getAdapter(IDMContext.class);
+                       IDMContext dmc = ((IAdaptable) debugContext).getAdapter(IDMContext.class);
                        GdbPinColorTracker.INSTANCE.removeRef(dmc.getSessionId() + "." + handle.getLabel()); //$NON-NLS-1$
                        dispatchChangedEvent(dmc);
                        
@@ -272,8 +272,8 @@ public class GdbPinProvider implements IPinProvider {
                Object handleDebugContext = handle.getDebugContext();
                
                if (debugContext instanceof IAdaptable && handleDebugContext instanceof IAdaptable) {                   
-                       IDMContext dmc = (IDMContext) ((IAdaptable) debugContext).getAdapter(IDMContext.class);
-                       IDMContext hDmc = (IDMContext) ((IAdaptable) handleDebugContext).getAdapter(IDMContext.class);
+                       IDMContext dmc = ((IAdaptable) debugContext).getAdapter(IDMContext.class);
+                       IDMContext hDmc = ((IAdaptable) handleDebugContext).getAdapter(IDMContext.class);
                        
                        if (dmc != null && hDmc != null) {
                                if (dmc.getSessionId().equals(hDmc.getSessionId())) {                           
@@ -326,7 +326,7 @@ public class GdbPinProvider implements IPinProvider {
                                                PinElementHandle handle = ((PinElementHandle)h);                                                
                                                Object handleDebugContext = handle.getDebugContext();
                                                if (handleDebugContext instanceof IAdaptable) {                                         
-                                                       IDMContext handleDmc = (IDMContext) ((IAdaptable) handleDebugContext).getAdapter(IDMContext.class);
+                                                       IDMContext handleDmc = ((IAdaptable) handleDebugContext).getAdapter(IDMContext.class);
                                                        if (handleDmc != null) {
                                                                DsfSession session = DsfSession.getSession(handleDmc.getSessionId());
                                                                if (session == null || !session.isActive()) {                                                   
index 0aacba4..eb626ae 100644 (file)
@@ -99,7 +99,7 @@ public class DsfLoadSymbolsCommandHandler extends AbstractHandler {
        @ConfinedToDsfExecutor("session.getExecutor()")
        private void queueLoadAllSymbols(final DsfSession session) {
                IAdaptable debugContext = DebugUITools.getDebugContext();
-               IDMContext dmcontext = (IDMContext) debugContext.getAdapter(IDMContext.class);
+               IDMContext dmcontext = debugContext.getAdapter(IDMContext.class);
                ISymbolDMContext symDmc = DMContexts.getAncestorOfType(dmcontext, ISymbolDMContext.class);
                if (symDmc != null) {
                        DsfServicesTracker tracker = new DsfServicesTracker(GdbUIPlugin.getBundleContext(), session.getId());
index 7b913d3..6bf1fcd 100644 (file)
@@ -45,7 +45,7 @@ public class ReverseDebuggingPropertyTester extends PropertyTester {
        boolean result = false;
                ICommandControlDMContext controlDmc = DMContexts.getAncestorOfType(context.getDMContext(), ICommandControlDMContext.class);
                if (controlDmc != null) {
-                       IReverseToggleHandler toggle = (IReverseToggleHandler)(controlDmc.getAdapter(IReverseToggleHandler.class));
+                       IReverseToggleHandler toggle = (controlDmc.getAdapter(IReverseToggleHandler.class));
                        if (toggle != null) {
                                result = toggle.isReverseToggled(controlDmc);
                        }
index 00f5800..5fda2c7 100644 (file)
@@ -43,7 +43,7 @@ public class CBreakpointGdbThreadFilterPage extends PropertyPage {
        }
 
     public ICBreakpoint getBreakpoint() {
-        return (ICBreakpoint)getElement().getAdapter(ICBreakpoint.class);
+        return getElement().getAdapter(ICBreakpoint.class);
     }
 
        public IDsfBreakpointExtension getFilterExtension() {
index 66c6b89..3168822 100644 (file)
@@ -243,7 +243,7 @@ public class GDBDynamicPrintfPropertyPage extends FieldEditorPreferencePage impl
        }
 
        private String getDynamicPrintfMainLabel(ICDynamicPrintf dprintf) {
-           IWorkbenchAdapter labelProvider = (IWorkbenchAdapter)getElement().getAdapter(IWorkbenchAdapter.class);
+           IWorkbenchAdapter labelProvider = getElement().getAdapter(IWorkbenchAdapter.class);
            if (labelProvider != null) {
                return labelProvider.getLabel(getElement());
            }
@@ -330,11 +330,11 @@ public class GDBDynamicPrintfPropertyPage extends FieldEditorPreferencePage impl
                        assert false : "Should always have a dprintf"; //$NON-NLS-1$
                }
 
-               return (ICDynamicPrintf)element.getAdapter(ICDynamicPrintf.class);
+               return element.getAdapter(ICDynamicPrintf.class);
        }
 
        protected Object getDebugContext() {
-        IDebugContextProvider provider = (IDebugContextProvider)getElement().getAdapter(IDebugContextProvider.class);
+        IDebugContextProvider provider = getElement().getAdapter(IDebugContextProvider.class);
         if (provider != null) {
             ISelection selection = provider.getActiveContext();
             if (selection instanceof IStructuredSelection) {
index 306e281..0b0cffe 100644 (file)
@@ -251,7 +251,7 @@ public class GDBTracepointPropertyPage extends FieldEditorPreferencePage impleme
        }
 
        private String getTracepointMainLabel(ICTracepoint tracepoint) {
-           IWorkbenchAdapter labelProvider = (IWorkbenchAdapter)getElement().getAdapter(IWorkbenchAdapter.class);
+           IWorkbenchAdapter labelProvider = getElement().getAdapter(IWorkbenchAdapter.class);
            if (labelProvider != null) {
                return labelProvider.getLabel(getElement());
            }
@@ -328,11 +328,11 @@ public class GDBTracepointPropertyPage extends FieldEditorPreferencePage impleme
                        assert false : "Should always have a tracepoint"; //$NON-NLS-1$
                }
 
-               return (ICTracepoint)element.getAdapter(ICTracepoint.class);
+               return element.getAdapter(ICTracepoint.class);
        }
 
        protected Object getDebugContext() {
-        IDebugContextProvider provider = (IDebugContextProvider)getElement().getAdapter(IDebugContextProvider.class);
+        IDebugContextProvider provider = getElement().getAdapter(IDebugContextProvider.class);
         if (provider != null) {
             ISelection selection = provider.getActiveContext();
             if (selection instanceof IStructuredSelection) {
index d02a500..dd7a716 100644 (file)
@@ -236,13 +236,13 @@ public class GdbReverseToggleCommand extends AbstractDebugCommand implements IRe
                        public IStatus runInUIThread(IProgressMonitor monitor) {
                        // Request re-evaluation of property "org.eclipse.cdt.debug.ui.isReverseDebuggingEnabled" to update 
                            // visibility of reverse stepping commands.
-                           IEvaluationService exprService = (IEvaluationService) PlatformUI.getWorkbench().getService(IEvaluationService.class);
+                           IEvaluationService exprService = PlatformUI.getWorkbench().getService(IEvaluationService.class);
                            if (exprService != null) {
                                exprService.requestEvaluation("org.eclipse.cdt.debug.ui.isReverseDebuggingEnabled"); //$NON-NLS-1$
                            }
                            // Refresh reverse toggle commands with the new state of reverse enabled. 
                            // This is in order to keep multiple toggle actions in UI in sync.
-                           ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
+                           ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class);
                        if (commandService != null) {
                           commandService.refreshElements("org.eclipse.cdt.debug.ui.command.reverseToggle", null); //$NON-NLS-1$
                        }
index a35f1e8..6f28435 100644 (file)
@@ -155,10 +155,10 @@ public class ConsolePageParticipant implements IConsolePageParticipant, IDebugCo
 
                if (context != null) {
                        // Look for the process that this context refers to, so we can select its console
-                       IDMContext dmc = (IDMContext)context.getAdapter(IDMContext.class);
+                       IDMContext dmc = context.getAdapter(IDMContext.class);
                        IMIContainerDMContext container = DMContexts.getAncestorOfType(dmc, IMIContainerDMContext.class);
                        if (container != null) {
-                               ILaunch launch = (ILaunch)context.getAdapter(ILaunch.class);
+                               ILaunch launch = context.getAdapter(ILaunch.class);
                                if (launch != null) {
                                IProcess[] processes = launch.getProcesses();
                                if (processes != null && processes.length > 0) {
index 8e9e19c..c12fbaf 100644 (file)
@@ -46,7 +46,7 @@ public class TracepointActionsPropertyPage extends PropertyPage {
        public Control createContents(Composite parent) {
                Composite container = new Composite(parent, SWT.NULL);
 
-               IBreakpoint tracepoint = (IBreakpoint) this.getElement().getAdapter(org.eclipse.debug.core.model.IBreakpoint.class);
+               IBreakpoint tracepoint = this.getElement().getAdapter(org.eclipse.debug.core.model.IBreakpoint.class);
                tracepointMarker = tracepoint.getMarker();
                savedActionNames = tracepointMarker.getAttribute(BreakpointActionManager.BREAKPOINT_ACTION_ATTRIBUTE, ""); //$NON-NLS-1$
 
index ed90ae4..f665b10 100644 (file)
@@ -273,7 +273,7 @@ public class TraceControlView extends ViewPart implements IViewPart {
                        @Override
                        public void widgetSelected(SelectionEvent e) {
                                // Run action
-                               IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
+                               IHandlerService handlerService = getSite().getService(IHandlerService.class);
                                if (handlerService == null) {
                                GdbUIPlugin.log(new Status(IStatus.ERROR, GdbUIPlugin.PLUGIN_ID, "Missing command handler service")); //$NON-NLS-1$
                                return;
@@ -498,7 +498,7 @@ public class TraceControlView extends ViewPart implements IViewPart {
                        
                        @Override
                        public void widgetSelected(SelectionEvent e) {
-                       IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
+                       IHandlerService handlerService = getSite().getService(IHandlerService.class);
                        if (e.detail == SWT.ARROW_DOWN) {
                                try {
                                        handlerService.executeCommand("org.eclipse.cdt.dsf.gdb.ui.command.selectNextTraceRecord", null); //$NON-NLS-1$
index ccbde94..ad16dcc 100644 (file)
@@ -122,7 +122,7 @@ abstract public class RetargetDebugContextCommand extends AbstractHandler implem
                setBaseEnabled(enabled);
         
         if (fCommandId != null) {
-               ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
+               ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class);
                if (commandService != null) {
                        commandService.refreshElements(fCommandId, null);
                }
index bb010ee..d7c7aab 100644 (file)
@@ -120,7 +120,7 @@ public class GdbMemoryBlockRetrieval extends DsfMemoryBlockRetrieval implements
                        dmc = (IDMContext) context;
                } else {
                if (context instanceof IAdaptable) {
-                       dmc = (IDMContext)((IAdaptable)context).getAdapter(IDMContext.class);
+                       dmc = ((IAdaptable)context).getAdapter(IDMContext.class);
                }
                }
                
@@ -142,7 +142,7 @@ public class GdbMemoryBlockRetrieval extends DsfMemoryBlockRetrieval implements
         IMemoryDMContext memoryDmc = null;
         IDMContext dmc = null;
         if (context instanceof IAdaptable) {
-               dmc = (IDMContext)((IAdaptable)context).getAdapter(IDMContext.class);
+               dmc = ((IAdaptable)context).getAdapter(IDMContext.class);
             if (dmc != null) {
                 memoryDmc = DMContexts.getAncestorOfType(dmc, IMemoryDMContext.class);
             }
@@ -243,7 +243,7 @@ public class GdbMemoryBlockRetrieval extends DsfMemoryBlockRetrieval implements
                        public void run() {
                        IDMContext dmc = null;
                        if (context instanceof IAdaptable) {
-                               dmc = (IDMContext)((IAdaptable)context).getAdapter(IDMContext.class);
+                               dmc = ((IAdaptable)context).getAdapter(IDMContext.class);
                            if (dmc != null) {
                                        IMemorySpaces service = fMemorySpaceServiceTracker.getService();
                                if (service != null) {
index 0d654f5..89f7eac 100644 (file)
@@ -937,7 +937,7 @@ public class GDBProcesses_7_0 extends AbstractDsfService
                                                public void execute(RequestMonitor rm) {                                                                
                                                                IReverseRunControl reverseService = getServicesTracker().getService(IReverseRunControl.class);
                                                                if (reverseService != null) {
-                                                                       ILaunch launch = (ILaunch)procCtx.getAdapter(ILaunch.class);
+                                                                       ILaunch launch = procCtx.getAdapter(ILaunch.class);
                                                                        if (launch != null) {
                                                                                try {
                                                                                        boolean reverseEnabled = 
index ab6cef3..b9ebfb2 100644 (file)
@@ -411,7 +411,7 @@ public class GDBProcesses_7_2 extends GDBProcesses_7_1 implements IMultiTerminat
                                    public void execute(RequestMonitor rm) {                                                            
                                                                IReverseRunControl reverseService = getServicesTracker().getService(IReverseRunControl.class);
                                                                if (reverseService != null) {
-                                                                       ILaunch launch = (ILaunch)procCtx.getAdapter(ILaunch.class);
+                                                                       ILaunch launch = procCtx.getAdapter(ILaunch.class);
                                                                        if (launch != null) {
                                                                                try {
                                                                                        boolean reverseEnabled = 
@@ -451,7 +451,7 @@ public class GDBProcesses_7_2 extends GDBProcesses_7_1 implements IMultiTerminat
        }
        
        private void connectToTarget(IProcessDMContext procCtx, RequestMonitor rm) {
-               ILaunch launch = (ILaunch)procCtx.getAdapter(ILaunch.class);
+               ILaunch launch = procCtx.getAdapter(ILaunch.class);
                assert launch != null;
                if (launch != null) {
                        Map<String, Object> attributes = null;
index 436d322..4a09806 100644 (file)
@@ -311,7 +311,7 @@ public class StartOrRestartProcessSequence_7_0 extends ReflectionSequence {
                }
 
                final Process inferior = inferiorProcess;
-               final ILaunch launch = (ILaunch)getContainerContext().getAdapter(ILaunch.class);
+               final ILaunch launch = getContainerContext().getAdapter(ILaunch.class);
 
                // This is the groupId of the new process that will be started, even in the
                // case of a restart.
index 67a906f..3a0f054 100644 (file)
@@ -76,7 +76,7 @@ public class ToggleBreakpointsTargetFactory implements IToggleBreakpointsTargetF
                Object element = getDebugContext(part).getFirstElement();
                if (element instanceof IAdaptable) {
                    IDebugModelProvider modelProvider = 
-                       (IDebugModelProvider)((IAdaptable)element).getAdapter(IDebugModelProvider.class);
+                       ((IAdaptable)element).getAdapter(IDebugModelProvider.class);
                    if (modelProvider != null) {
                        String[] models = modelProvider.getModelIdentifiers();
                        for (String model : models) {
index 275a458..ea4500b 100644 (file)
@@ -47,7 +47,7 @@ public class DisassemblyMoveToLineAdapter implements IMoveToLineTarget {
                        final IAddress address = disassemblySelection.getStartAddress();
                
                if (address != null && target instanceof IAdaptable) {
-                       final IMoveToAddress moveToAddress = (IMoveToAddress)((IAdaptable)target).getAdapter(IMoveToAddress.class);
+                       final IMoveToAddress moveToAddress = ((IAdaptable)target).getAdapter(IMoveToAddress.class);
                        if (moveToAddress != null && moveToAddress.canMoveToAddress(address)) {
                                try {
                                        moveToAddress.moveToAddress(address);                                                           
@@ -63,7 +63,7 @@ public class DisassemblyMoveToLineAdapter implements IMoveToLineTarget {
        @Override
        public boolean canMoveToLine(IWorkbenchPart part, ISelection selection, ISuspendResume target) {
                if (target instanceof IAdaptable && part instanceof IDisassemblyPart && selection instanceof ITextSelection) {
-                       IMoveToAddress moveToAddress = (IMoveToAddress)((IAdaptable)target).getAdapter(IMoveToAddress.class);
+                       IMoveToAddress moveToAddress = ((IAdaptable)target).getAdapter(IMoveToAddress.class);
                        if (moveToAddress == null) {
                                return false;
                        }
index 76664b8..917ccda 100644 (file)
@@ -47,7 +47,7 @@ public class DisassemblyResumeAtLineAdapter implements IResumeAtLineTarget {
                        final IAddress address = disassemblySelection.getStartAddress();
 
                if (address != null && target instanceof IAdaptable) {
-                       final IResumeAtAddress resumeAtAddress = (IResumeAtAddress)((IAdaptable)target).getAdapter(IResumeAtAddress.class);
+                       final IResumeAtAddress resumeAtAddress = ((IAdaptable)target).getAdapter(IResumeAtAddress.class);
                        if (resumeAtAddress != null && resumeAtAddress.canResumeAtAddress(address)) {
                                try {
                                        resumeAtAddress.resumeAtAddress(address);                                                               
@@ -63,7 +63,7 @@ public class DisassemblyResumeAtLineAdapter implements IResumeAtLineTarget {
        @Override
        public boolean canResumeAtLine(IWorkbenchPart part, ISelection selection, ISuspendResume target) {
                if (target instanceof IAdaptable && part instanceof IDisassemblyPart && selection instanceof ITextSelection) {
-                       IResumeAtAddress resumeAtAddress = (IResumeAtAddress)((IAdaptable)target).getAdapter(IResumeAtAddress.class);
+                       IResumeAtAddress resumeAtAddress = ((IAdaptable)target).getAdapter(IResumeAtAddress.class);
                        if (resumeAtAddress == null) {
                                return false;
                        }
index 7b13412..7113642 100644 (file)
@@ -52,7 +52,7 @@ public class DisassemblyRunToLineAdapter implements IRunToLineTarget {
                        final IAddress address = disassemblySelection.getStartAddress();
 
                        if (address != null && target instanceof IAdaptable) {
-                               final IRunToAddress runToAddress = (IRunToAddress)((IAdaptable)target).getAdapter(IRunToAddress.class);
+                               final IRunToAddress runToAddress = ((IAdaptable)target).getAdapter(IRunToAddress.class);
                                if (runToAddress != null && runToAddress.canRunToAddress(address)) {
                                        try {
                                                boolean skipBreakpoints = DebugUITools.getPreferenceStore().getBoolean(IDebugUIConstants.PREF_SKIP_BREAKPOINTS_DURING_RUN_TO_LINE);
@@ -72,7 +72,7 @@ public class DisassemblyRunToLineAdapter implements IRunToLineTarget {
        @Override
        public boolean canRunToLine(IWorkbenchPart part, ISelection selection, ISuspendResume target) {
                if (target instanceof IAdaptable && part instanceof IDisassemblyPart && selection instanceof ITextSelection) {
-                       IRunToAddress runToAddress = (IRunToAddress)((IAdaptable)target).getAdapter(IRunToAddress.class);
+                       IRunToAddress runToAddress = ((IAdaptable)target).getAdapter(IRunToAddress.class);
                        if (runToAddress == null) {
                                return false;
                        }
index 2b25648..8d5fc6b 100644 (file)
@@ -109,7 +109,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
        }
 
     public static boolean supportsDebugContext_(IAdaptable context) {
-        IDMVMContext dmvmContext = (IDMVMContext) context.getAdapter(IDMVMContext.class);
+        IDMVMContext dmvmContext = context.getAdapter(IDMVMContext.class);
         return dmvmContext != null && hasDisassemblyService(dmvmContext.getDMContext());
     }
     
@@ -166,7 +166,7 @@ public class DisassemblyBackendDsf extends AbstractDisassemblyBackend implements
        @Override
        public SetDebugContextResult setDebugContext(IAdaptable context) {
                assert supportsDebugContext(context) : "caller should not have invoked us"; //$NON-NLS-1$
-               IDMVMContext vmContext = (IDMVMContext) context.getAdapter(IDMVMContext.class);
+               IDMVMContext vmContext = context.getAdapter(IDMVMContext.class);
                IDMContext dmContext = vmContext.getDMContext();
                
                SetDebugContextResult result = new SetDebugContextResult();
index 8ac52f3..9be5d9f 100644 (file)
@@ -816,7 +816,7 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
                fDebugContextListener = null;
            }
                if (fHandlerActivations != null) {
-                       IHandlerService handlerService = (IHandlerService)site.getService(IHandlerService.class);
+                       IHandlerService handlerService = site.getService(IHandlerService.class);
                        handlerService.deactivateHandlers(fHandlerActivations);
                        fHandlerActivations = null;
                }
@@ -1317,7 +1317,7 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
                        @Override
                        public void mouseDoubleClick(final MouseEvent e) {
                                // invoke toggle breakpoint
-                               IHandlerService handlerService = (IHandlerService) getSite().getService(IHandlerService.class);
+                               IHandlerService handlerService = getSite().getService(IHandlerService.class);
                                if (handlerService != null) {
                                        try {
                                            Event event= new Event();
@@ -1360,7 +1360,7 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
                if (fHandlerActivations == null) {
                        fHandlerActivations = new ArrayList<IHandlerActivation>(5);
                }
-               IHandlerService handlerService = (IHandlerService)getSite().getService(IHandlerService.class);
+               IHandlerService handlerService = getSite().getService(IHandlerService.class);
                fHandlerActivations.add(handlerService.activateHandler(action.getActionDefinitionId(), new ActionHandler(action)));
        }
 
@@ -1892,14 +1892,14 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
                fDebugSessionId = null;
                boolean needUpdate = false;
                if (fDebugContext != null) {
-                       IDisassemblyBackend contextBackend = (IDisassemblyBackend)fDebugContext.getAdapter(IDisassemblyBackend.class);
+                       IDisassemblyBackend contextBackend = fDebugContext.getAdapter(IDisassemblyBackend.class);
                        // Need to compare the backend classes to prevent reusing the same backend object.
                        // sub class can overwrite the standard disassembly backend to provide its own customization.
                        if ((prevBackend != null) && (contextBackend != null) && prevBackend.getClass().equals(contextBackend.getClass()) && prevBackend.supportsDebugContext(fDebugContext)) {
                                newBackend = prevBackend;
                        } else {
                                needUpdate = true;
-                               newBackend = (IDisassemblyBackend)fDebugContext.getAdapter(IDisassemblyBackend.class);
+                               newBackend = fDebugContext.getAdapter(IDisassemblyBackend.class);
                                if (newBackend != null) {
                                        if (newBackend.supportsDebugContext(fDebugContext)) {
                                                newBackend.init(this);
@@ -3003,14 +3003,14 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
        }
        
        public void activateDisassemblyContext() {
-               IContextService ctxService = (IContextService)getSite().getService(IContextService.class);
+               IContextService ctxService = getSite().getService(IContextService.class);
                if (ctxService!=null)
                        fContextActivation = ctxService.activateContext(KEY_BINDING_CONTEXT_DISASSEMBLY);
        }
        
        public void deactivateDisassemblyContext() {
                if (fContextActivation != null) {
-                       IContextService ctxService = (IContextService)getSite().getService(IContextService.class);
+                       IContextService ctxService = getSite().getService(IContextService.class);
                        ctxService.deactivateContext(fContextActivation);
                }
        }
index 15ccef7..a670270 100644 (file)
@@ -41,7 +41,7 @@ public class DisassemblyToggleBreakpointTester extends PropertyTester {
                        
                        IAdaptable element = DebugUITools.getPartDebugContext(view.getSite());                  
                if (element != null) {
-                   IDebugModelProvider modelProvider = (IDebugModelProvider)element.getAdapter(IDebugModelProvider.class);
+                   IDebugModelProvider modelProvider = element.getAdapter(IDebugModelProvider.class);
                    if (modelProvider != null) {
                        String[] models = modelProvider.getModelIdentifiers();
                        for (String model : models) {
index 2c712f2..a80573f 100644 (file)
@@ -68,7 +68,7 @@ class SourceColorerJob extends UIJob implements Runnable {
         */
        @Override
        public void run() {
-               IWorkbenchSiteProgressService progressService = (IWorkbenchSiteProgressService)fDisassemblyPart.getSite().getAdapter(IWorkbenchSiteProgressService.class);
+               IWorkbenchSiteProgressService progressService = fDisassemblyPart.getSite().getAdapter(IWorkbenchSiteProgressService.class);
                if(progressService != null) {
                        progressService.schedule(this, 0, true);
                } else {
index 74ed357..9996dc7 100644 (file)
@@ -80,7 +80,7 @@ public abstract class AbstractDisassemblyRulerActionDelegate extends ActionDeleg
 
        private void setTargetPart(IAction callerAction, IWorkbenchPart targetPart) {
                if (fDisassemblyPart != null) {
-                       IVerticalRulerInfo rulerInfo= (IVerticalRulerInfo) fDisassemblyPart.getAdapter(IVerticalRulerInfo.class);
+                       IVerticalRulerInfo rulerInfo= fDisassemblyPart.getAdapter(IVerticalRulerInfo.class);
                        if (rulerInfo != null) {
                                Control control= rulerInfo.getControl();
                                if (control != null && !control.isDisposed())
@@ -90,14 +90,14 @@ public abstract class AbstractDisassemblyRulerActionDelegate extends ActionDeleg
                        fDisassemblyPart.removeRulerContextMenuListener(this);
                }
 
-               fDisassemblyPart= (IDisassemblyPart)(targetPart == null ? null : targetPart.getAdapter(IDisassemblyPart.class));
+               fDisassemblyPart= targetPart == null ? null : targetPart.getAdapter(IDisassemblyPart.class);
                fCallerAction= callerAction;
                fAction= null;
 
                if (fDisassemblyPart != null) {
                                fDisassemblyPart.addRulerContextMenuListener(this);
 
-                       IVerticalRulerInfo rulerInfo= (IVerticalRulerInfo) fDisassemblyPart.getAdapter(IVerticalRulerInfo.class);
+                       IVerticalRulerInfo rulerInfo= fDisassemblyPart.getAdapter(IVerticalRulerInfo.class);
                        if (rulerInfo != null) {
                                fAction= createAction(fDisassemblyPart, rulerInfo);
                                update();
index 38ed0ac..479d1ef 100644 (file)
@@ -35,7 +35,7 @@ public class RulerToggleBreakpointHandler extends AbstractHandler {
                if (part instanceof IDisassemblyPart) {
                        IDisassemblyPart disassemblyPart = (IDisassemblyPart) part;
                        IDocument document = disassemblyPart.getTextViewer().getDocument();
-                       final IVerticalRulerInfo rulerInfo= (IVerticalRulerInfo) part.getAdapter(IVerticalRulerInfo.class);
+                       final IVerticalRulerInfo rulerInfo= part.getAdapter(IVerticalRulerInfo.class);
                        if (rulerInfo != null) {
                                final ToggleBreakpointAction toggleBpAction= new ToggleBreakpointAction(part, document, rulerInfo);
                                try {
index 3272571..ddd6f77 100644 (file)
@@ -160,7 +160,7 @@ public class BreakpointsAnnotationModel extends DisassemblyAnnotationModel imple
        }
        
        private Position createPositionFromBreakpoint(IBreakpoint breakpoint) throws CoreException {
-               IBreakpointLocationProvider locationProvider = (IBreakpointLocationProvider) breakpoint.getAdapter(IBreakpointLocationProvider.class);
+               IBreakpointLocationProvider locationProvider = breakpoint.getAdapter(IBreakpointLocationProvider.class);
                        
                /* if there is a location provider, than use the provider to retrieve the location */
                if (locationProvider != null) {
index 0e14084..b393654 100644 (file)
@@ -367,7 +367,7 @@ public class CSourcePresentationCreator extends PresentationReconciler implement
                } else {
                        IEditorInput input= CDTUITools.getEditorInputForLocation(storage.getFullPath(), null);
                        if (input != null) {
-                               tUnit= (ITranslationUnit) input.getAdapter(ITranslationUnit.class);
+                               tUnit= input.getAdapter(ITranslationUnit.class);
                        }
                }
                if (tUnit != null) {
index d90eeb4..efd6f02 100644 (file)
@@ -151,7 +151,7 @@ public class DisassemblySelection implements IDisassemblySelection {
        @Override
        public IFile getSourceFile() {
                if (fSourceFile != null) {
-                       IResource resource = (IResource) fSourceFile.getAdapter(IResource.class);
+                       IResource resource = fSourceFile.getAdapter(IResource.class);
                        if (resource instanceof IFile) {
                                return (IFile) resource;
                        }
@@ -176,7 +176,7 @@ public class DisassemblySelection implements IDisassemblySelection {
        @Override
        public URI getSourceLocationURI() {
                if (fSourceFile != null) {
-                       IResource resource = (IResource) fSourceFile.getAdapter(IResource.class);
+                       IResource resource = fSourceFile.getAdapter(IResource.class);
                        if (resource instanceof IFile) {
                                return resource.getLocationURI();
                        } else {
index 604d19a..2310126 100644 (file)
@@ -621,7 +621,7 @@ public class NumberFormatDetailPane implements IDetailPane2, IAdaptable, IProper
         Object firstElement = selection.getFirstElement();
         if (firstElement instanceof IAdaptable) {
             IDebugModelProvider debugModelProvider = 
-                (IDebugModelProvider)((IAdaptable)firstElement).getAdapter(IDebugModelProvider.class);
+                ((IAdaptable)firstElement).getAdapter(IDebugModelProvider.class);
             if (debugModelProvider != null) {
                 String[] ids = debugModelProvider.getModelIdentifiers();
                 if (ids != null && ids.length > 0) {
index f55c8a8..ebd433b 100644 (file)
@@ -99,7 +99,7 @@ abstract public class AbstractDsfDebugTextHover extends AbstractDebugTextHover i
        protected IFrameDMContext getFrame() {
            IAdaptable adaptable = getSelectionAdaptable();
            if (adaptable != null) {
-               return (IFrameDMContext) adaptable.getAdapter(IFrameDMContext.class);
+               return adaptable.getAdapter(IFrameDMContext.class);
                }
                return null;
        }
@@ -112,7 +112,7 @@ abstract public class AbstractDsfDebugTextHover extends AbstractDebugTextHover i
            
                IAdaptable adaptable = getSelectionAdaptable();
                if (adaptable != null) {
-                   IDebugModelProvider modelProvider = (IDebugModelProvider)adaptable.getAdapter(IDebugModelProvider.class);
+                   IDebugModelProvider modelProvider = adaptable.getAdapter(IDebugModelProvider.class);
                    if (modelProvider != null) {
                        String[] models = modelProvider.getModelIdentifiers();
                        String myModel = getModelId();
index 7b1426f..50fcae5 100644 (file)
@@ -54,7 +54,7 @@ public abstract class DsfCommandRunnable extends DsfRunnable {
         */
     public SteppingController getSteppingController() {
        if (fContexts != null && fContexts.length > 0) {
-               return (SteppingController) fContexts[0].getAdapter(SteppingController.class);
+               return fContexts[0].getAdapter(SteppingController.class);
        }
        return null;
     }
index 7095126..cff45b3 100644 (file)
@@ -206,7 +206,7 @@ public class DsfStepIntoSelectionHyperlinkDetector extends AbstractHyperlinkDete
        }
 
        private static boolean isLanguageKeyword(ILanguage lang, String word) {
-               ICLanguageKeywords keywords = (ICLanguageKeywords) lang.getAdapter(ICLanguageKeywords.class);
+               ICLanguageKeywords keywords = lang.getAdapter(ICLanguageKeywords.class);
                if (keywords != null) {
                        for (String keyword : keywords.getKeywords()) {
                                if (keyword.equals(word))
index 370cab1..46331c5 100644 (file)
@@ -211,7 +211,7 @@ public class DsfSourceDisplayAdapter implements ISourceDisplay, ISteppingControl
                                        presentation = (ISourcePresentation) fSourceLookup;
                                } else {
                                    if (dmc != null) {
-                                       presentation = (ISourcePresentation) dmc.getAdapter(ISourcePresentation.class);
+                                       presentation = dmc.getAdapter(ISourcePresentation.class);
                                    }
                                }
                    if (presentation != null) {
@@ -327,7 +327,7 @@ public class DsfSourceDisplayAdapter implements ISourceDisplay, ISteppingControl
                 if (editor instanceof ITextEditor) {                    
                     textEditor = (ITextEditor)editor;
                 } else {
-                    textEditor = (ITextEditor) editor.getAdapter(ITextEditor.class);
+                    textEditor = editor.getAdapter(ITextEditor.class);
                 }
                 if (textEditor != null) {
                     if (positionEditor(textEditor, fFrameData)) {
index 168b63e..d079f2e 100644 (file)
@@ -91,7 +91,7 @@ abstract public class AbstractVMProviderActionDelegate implements IViewActionDel
            IPresentationContext presentationContext = getPresentationContext();
            
         if (viewerInput instanceof IAdaptable && presentationContext != null) {
-            IVMAdapter adapter = (IVMAdapter) ((IAdaptable)viewerInput).getAdapter(IVMAdapter.class);
+            IVMAdapter adapter = ((IAdaptable)viewerInput).getAdapter(IVMAdapter.class);
 
             if ( adapter != null ) {
                 return adapter.getVMProvider(presentationContext);
index fdb754a..12c5128 100644 (file)
@@ -47,7 +47,7 @@ public class DefaultRefreshAllTarget implements IRefreshAllTarget {
         if (debugContext instanceof IStructuredSelection) {
             Object activeElement = ((IStructuredSelection)debugContext).getFirstElement();
             if (activeElement instanceof IAdaptable) {
-                return (IVMAdapter)((IAdaptable)activeElement).getAdapter(IVMAdapter.class);
+                return ((IAdaptable)activeElement).getAdapter(IVMAdapter.class);
             }
         }
         return null;
index 9da8fb7..bfc4d98 100644 (file)
@@ -56,7 +56,7 @@ public class VMHandlerUtils {
         ISelection selection = null;
         
         ISelectionService selectionService = 
-            (ISelectionService)serviceLocator.getService(ISelectionService.class);
+            serviceLocator.getService(ISelectionService.class);
         if (selectionService != null) {
             selection = selectionService.getSelection();
         }
@@ -66,7 +66,7 @@ public class VMHandlerUtils {
         }
         else {
             IWorkbenchPart part = null;        
-            IPartService partService = (IPartService)serviceLocator.getService(IPartService.class);
+            IPartService partService = serviceLocator.getService(IPartService.class);
             if (partService != null) {
                 part = partService.getActivePart();
                 return getVMProviderForPart(part);
@@ -103,7 +103,7 @@ public class VMHandlerUtils {
      */
     static public ISelection getSelection(IServiceLocator serviceLocator) {
         ISelectionService selectionService = 
-            (ISelectionService)serviceLocator.getService(ISelectionService.class);
+            serviceLocator.getService(ISelectionService.class);
         if (selectionService != null) {
             return selectionService.getSelection();
         }
@@ -128,7 +128,7 @@ public class VMHandlerUtils {
             Viewer viewer = ((IDebugView)part).getViewer();
             if (input instanceof IAdaptable && viewer instanceof TreeModelViewer) {
                 IPresentationContext presContext = ((TreeModelViewer)viewer).getPresentationContext();
-                IVMAdapter vmAdapter = (IVMAdapter)((IAdaptable)input).getAdapter(IVMAdapter.class);
+                IVMAdapter vmAdapter = ((IAdaptable)input).getAdapter(IVMAdapter.class);
                 if (vmAdapter != null) {
                     return vmAdapter.getVMProvider(presContext);
                 }
index 5d49511..bb84d0a 100644 (file)
@@ -55,7 +55,7 @@ public class BreakpointVMNode extends AbstractBreakpointVMNode implements IEleme
         
         for (final ILabelUpdate update : updates) {
             final IBreakpoint bp = ((BreakpointVMContext)update.getElement()).getBreakpoint();
-            IElementLabelProvider provider = (IElementLabelProvider)bp.getAdapter(IElementLabelProvider.class);
+            IElementLabelProvider provider = bp.getAdapter(IElementLabelProvider.class);
             if (provider == null) {
                 update.done();
                 continue;
@@ -120,7 +120,7 @@ public class BreakpointVMNode extends AbstractBreakpointVMNode implements IEleme
         
         for (final IElementMementoRequest update : updates) {
             final IBreakpoint bp = ((BreakpointVMContext)update.getElement()).getBreakpoint();
-            IElementMementoProvider provider = (IElementMementoProvider)bp.getAdapter(IElementMementoProvider.class);
+            IElementMementoProvider provider = bp.getAdapter(IElementMementoProvider.class);
             if (provider == null) {
                 update.done();
                 continue;
@@ -167,7 +167,7 @@ public class BreakpointVMNode extends AbstractBreakpointVMNode implements IEleme
         
         for (final IElementCompareRequest update : updates) {
             final IBreakpoint bp = ((BreakpointVMContext)update.getElement()).getBreakpoint();
-            IElementMementoProvider provider = (IElementMementoProvider)bp.getAdapter(IElementMementoProvider.class);
+            IElementMementoProvider provider = bp.getAdapter(IElementMementoProvider.class);
             if (provider == null) {
                 update.done();
                 continue;
index 5750662..cf8ad9c 100644 (file)
@@ -46,7 +46,7 @@ class ExpressionsChangedUpdateTester implements IElementUpdateTester {
     
     private boolean eventContainsElement(Object element) {
         if (element instanceof IAdaptable) {
-            IExpression expression = (IExpression)((IAdaptable)element).getAdapter(IExpression.class);
+            IExpression expression = ((IAdaptable)element).getAdapter(IExpression.class);
             if (expression != null) {
                 for (int i = 0; i < fEvent.getExpressions().length; i++) {
                     if (expression.equals(fEvent.getExpressions()[i])) {
index 71f792b..e52cf73 100644 (file)
@@ -189,7 +189,7 @@ public class WatchExpressionCellModifier implements ICellModifier {
 
        private IWatchExpression getWatchExpression(Object element) {
         if (element instanceof IAdaptable) {
-            return (IWatchExpression)((IAdaptable)element).getAdapter(IWatchExpression.class);
+            return ((IAdaptable)element).getAdapter(IWatchExpression.class);
         }
         return null;
     }
index 3894b02..dca680e 100644 (file)
@@ -510,7 +510,7 @@ public class StackFramesVMNode extends AbstractDMVMNode
                return;
         }
         IRunControl runControlService = getServicesTracker().getService(IRunControl.class); 
-        SteppingController stepQueueMgr = (SteppingController) execDmc.getAdapter(SteppingController.class); 
+        SteppingController stepQueueMgr = execDmc.getAdapter(SteppingController.class); 
         if (runControlService == null || stepQueueMgr == null) return;
         
         String imageKey = null;
index c2e737c..96c93f5 100644 (file)
@@ -93,7 +93,7 @@ public class SyncVariableDataAccess {
     
     public IExpressionDMContext getVariableDMC(Object element) {
         if (element instanceof IAdaptable) {
-            return (IExpressionDMContext) ((IAdaptable) element).getAdapter(IExpressionDMContext.class);
+            return ((IAdaptable) element).getAdapter(IExpressionDMContext.class);
         }
         return null;
     }
@@ -145,7 +145,7 @@ public class SyncVariableDataAccess {
 
     public IExpressionDMContext getExpressionDMC(Object element) {
         if (element instanceof IAdaptable) {
-            return (IExpressionDMContext) ((IAdaptable) element).getAdapter(IExpressionDMContext.class);
+            return ((IAdaptable) element).getAdapter(IExpressionDMContext.class);
         }
         return null;
     }
@@ -280,7 +280,7 @@ public class SyncVariableDataAccess {
 
     public IFormattedDataDMContext getFormattedDMC(Object element) {
         if (element instanceof IAdaptable) {
-            return (IFormattedDataDMContext) ((IAdaptable) element).getAdapter(IFormattedDataDMContext.class);
+            return ((IAdaptable) element).getAdapter(IFormattedDataDMContext.class);
         }
         return null;
     }
index 6d674ad..f310d17 100644 (file)
@@ -38,7 +38,7 @@ public class VariableCellModifier extends WatchExpressionCellModifier {
      */
     private IExpressionDMContext getVariableDMC(Object element) {
         if (element instanceof IAdaptable) {
-            return (IExpressionDMContext)((IAdaptable)element).getAdapter(IExpressionDMContext.class);
+            return ((IAdaptable)element).getAdapter(IExpressionDMContext.class);
         }
         return null;
     }
index 1151cbf..8b5208f 100644 (file)
@@ -244,7 +244,7 @@ public class PropertiesBasedLabelProvider
 
     private IElementPropertiesProvider getElementPropertiesProvider(Object element) {
         if (element instanceof IAdaptable) {
-            return (IElementPropertiesProvider)((IAdaptable)element).getAdapter(IElementPropertiesProvider.class);
+            return ((IAdaptable)element).getAdapter(IElementPropertiesProvider.class);
         }
         return null;
     }
index d4c51de..4bef5b6 100644 (file)
@@ -35,7 +35,7 @@ public class MemoryBlockRetrievalFactory implements IAdapterFactory {
                        if (adapterType.equals(IMemoryBlockRetrieval.class)) {
                                IAdaptable adaptable = (IAdaptable) adaptableObject;
                                //Retrieve the session's Memory Block Retrieval Manager
-                               IMemoryBlockRetrievalManager retrievalManager = ((IMemoryBlockRetrievalManager) adaptable
+                               IMemoryBlockRetrievalManager retrievalManager = (adaptable
                                                .getAdapter(IMemoryBlockRetrievalManager.class));
                                if (retrievalManager != null) {
                                        //resolve the specific Memory Block Retrieval associated to the memory context of adaptableObject
index dc4038b..c449550 100644 (file)
@@ -400,7 +400,7 @@ public class DsfMemoryBlockRetrieval extends PlatformObject implements IMemoryBl
         IMemoryDMContext memoryDmc = null;
         IDMContext dmc = null;
         if (context instanceof IAdaptable) {
-               dmc = (IDMContext)((IAdaptable)context).getAdapter(IDMContext.class);
+               dmc = ((IAdaptable)context).getAdapter(IDMContext.class);
             if (dmc != null) {
                 memoryDmc = DMContexts.getAncestorOfType(dmc, IMemoryDMContext.class);
             }
index 356cf1a..7128938 100644 (file)
@@ -45,7 +45,7 @@ public class PDABreakpointAdapter implements IToggleBreakpointsTargetExtension {
        public void toggleLineBreakpoints(IWorkbenchPart part, ISelection selection) throws CoreException {
                ITextEditor textEditor = getEditor(part);
                if (textEditor != null) {
-                       IResource resource = (IResource) textEditor.getEditorInput().getAdapter(IResource.class);
+                       IResource resource = textEditor.getEditorInput().getAdapter(IResource.class);
                        ITextSelection textSelection = (ITextSelection) selection;
                        int lineNumber = textSelection.getStartLine();
                        IBreakpoint[] breakpoints = DebugPlugin.getDefault().getBreakpointManager().getBreakpoints(PDAPlugin.ID_PDA_DEBUG_MODEL);
@@ -82,7 +82,7 @@ public class PDABreakpointAdapter implements IToggleBreakpointsTargetExtension {
        private ITextEditor getEditor(IWorkbenchPart part) {
                if (part instanceof ITextEditor) {
                        ITextEditor editorPart = (ITextEditor) part;
-                       IResource resource = (IResource) editorPart.getEditorInput().getAdapter(IResource.class);
+                       IResource resource = editorPart.getEditorInput().getAdapter(IResource.class);
                        if (resource != null) {
                                String extension = resource.getFileExtension();
                                if (extension != null && extension.equals("pda")) {
@@ -112,7 +112,7 @@ public class PDABreakpointAdapter implements IToggleBreakpointsTargetExtension {
            if (variableAndFunctionName != null && part instanceof ITextEditor && selection instanceof ITextSelection) {
                ITextEditor editorPart = (ITextEditor)part;
                int lineNumber = ((ITextSelection)selection).getStartLine();
-               IResource resource = (IResource) editorPart.getEditorInput().getAdapter(IResource.class);
+               IResource resource = editorPart.getEditorInput().getAdapter(IResource.class);
                String var = variableAndFunctionName[0];
                String fcn = variableAndFunctionName[1];
                // look for existing watchpoint to delete
index a274955..628e308 100644 (file)
@@ -32,7 +32,7 @@ public class PDAEditorAdapterFactory implements IAdapterFactory {
     public Object getAdapter(Object adaptableObject, Class adapterType) {
                if (adaptableObject instanceof PDAEditor) {
                        ITextEditor editorPart = (ITextEditor) adaptableObject;
-                       IResource resource = (IResource) editorPart.getEditorInput().getAdapter(IResource.class);
+                       IResource resource = editorPart.getEditorInput().getAdapter(IResource.class);
                        if (resource != null) {
                                String extension = resource.getFileExtension();
                                if (extension != null && extension.equals("pda")) {
index 91ea58f..e8c9cc7 100644 (file)
@@ -64,7 +64,7 @@ public class PDAExpressionVMProvider extends ExpressionVMProvider implements IEl
                        // register and bit field context are covered here.
                        // When these show up in expression view, the register/bit field vm node's associateExpression has called
                        // RegisterVMC/BitFieldVMC's setExpression
-                       IExpression y = (IExpression) ((IVMContext) x).getAdapter(IExpression.class);
+                       IExpression y = ((IVMContext) x).getAdapter(IExpression.class);
                        if (y == null) {
                                rm.setData(null);
                        } else {
@@ -98,7 +98,7 @@ public class PDAExpressionVMProvider extends ExpressionVMProvider implements IEl
                                persistable.setValue(ctx.getExpression(), format);
                                changed.add((IDMVMContext) x);
                        } else if (x instanceof IDMVMContext) {
-                               IExpression y = (IExpression) ((IVMContext) x).getAdapter(IExpression.class);
+                               IExpression y = ((IVMContext) x).getAdapter(IExpression.class);
                                if (y == null)
                                        continue;
                                persistable.setValue(y.getExpressionText(), format);
index 9370094..623d9fc 100644 (file)
@@ -152,7 +152,7 @@ public class TriggerCellModifier implements ICellModifier {
 
     private TriggerDMContext getAlarmDMC(Object element) {
         if (element instanceof IAdaptable) {
-            return (TriggerDMContext)((IAdaptable)element).getAdapter(TriggerDMContext.class);
+            return ((IAdaptable)element).getAdapter(TriggerDMContext.class);
         }
         return null;
     }
index fb2aa03..ff4951a 100644 (file)
@@ -113,7 +113,7 @@ public class VMTest1 extends VMTestBase implements IViewerUpdatesListenerConstan
         final IDMVMContext containerVMC = _containerVMC;
         final TreePath containerPath = launchPath.createChildPath(containerVMC);
         final IElementPropertiesProvider containerPropProvider = 
-            (IElementPropertiesProvider)containerVMC.getAdapter(IElementPropertiesProvider.class);
+            containerVMC.getAdapter(IElementPropertiesProvider.class);
         Assert.assertNotNull(containerPropProvider);
         
         // Check if container is suspended.
index d198203..ea17bf7 100644 (file)
@@ -59,7 +59,7 @@ public class ResourceRenameParticipant extends RenameParticipant implements IExe
                if (element instanceof IResource) {
                        resourceBeingRenamed = (IResource) element;
                } else if (element instanceof IAdaptable) {
-                       resourceBeingRenamed = (IResource) ((IAdaptable) element).getAdapter(IResource.class);
+                       resourceBeingRenamed = ((IAdaptable) element).getAdapter(IResource.class);
                }
 
                return true;
index e002668..9c3f5e0 100644 (file)
@@ -65,7 +65,7 @@ public class FixedBacktrackingParser extends Stacks
     public FixedBacktrackingParser(TokenStream tokStream, ParseTable prs, RuleAction ra) throws BadParseSymFileException,
                                                                                            NotBacktrackParseTableException
     {
-        this.tokStream = (PrsStream) tokStream;
+        this.tokStream = tokStream;
         this.prs = prs;
         this.ra = ra;
 
index ff4a7f5..025a4b6 100644 (file)
@@ -109,7 +109,7 @@ public class C99ExpressionParser extends PrsStream implements RuleAction, IToken
     public String[] orderedTerminalSymbols() { return C99ExpressionParsersym.orderedTerminalSymbols; }
     public String getTokenKindName(int kind) { return C99ExpressionParsersym.orderedTerminalSymbols[kind]; }
     public int getEOFTokenKind() { return C99ExpressionParserprs.EOFT_SYMBOL; }
-    public PrsStream getParseStream() { return (PrsStream) this; }
+    public PrsStream getParseStream() { return this; }
     
     //
     // Report error message for given error_token.
@@ -148,7 +148,7 @@ public class C99ExpressionParser extends PrsStream implements RuleAction, IToken
     {
         try
         {
-            btParser = new FixedBacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this);
+            btParser = new FixedBacktrackingParser(monitor, this, prs, this);
         }
         catch (NotBacktrackParseTableException e)
         {
index b6b22f2..c6faee7 100644 (file)
@@ -109,7 +109,7 @@ public class C99NoCastExpressionParser extends PrsStream implements RuleAction,
     public String[] orderedTerminalSymbols() { return C99NoCastExpressionParsersym.orderedTerminalSymbols; }
     public String getTokenKindName(int kind) { return C99NoCastExpressionParsersym.orderedTerminalSymbols[kind]; }
     public int getEOFTokenKind() { return C99NoCastExpressionParserprs.EOFT_SYMBOL; }
-    public PrsStream getParseStream() { return (PrsStream) this; }
+    public PrsStream getParseStream() { return this; }
     
     //
     // Report error message for given error_token.
@@ -148,7 +148,7 @@ public class C99NoCastExpressionParser extends PrsStream implements RuleAction,
     {
         try
         {
-            btParser = new FixedBacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this);
+            btParser = new FixedBacktrackingParser(monitor, this, prs, this);
         }
         catch (NotBacktrackParseTableException e)
         {
index 731f244..afc4412 100644 (file)
@@ -105,7 +105,7 @@ public class C99Parser extends PrsStream implements RuleAction, ITokenStream,
     public String[] orderedTerminalSymbols() { return C99Parsersym.orderedTerminalSymbols; }
     public String getTokenKindName(int kind) { return C99Parsersym.orderedTerminalSymbols[kind]; }
     public int getEOFTokenKind() { return C99Parserprs.EOFT_SYMBOL; }
-    public PrsStream getParseStream() { return (PrsStream) this; }
+    public PrsStream getParseStream() { return this; }
     
     //
     // Report error message for given error_token.
@@ -144,7 +144,7 @@ public class C99Parser extends PrsStream implements RuleAction, ITokenStream,
     {
         try
         {
-            btParser = new FixedBacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this);
+            btParser = new FixedBacktrackingParser(monitor, this, prs, this);
         }
         catch (NotBacktrackParseTableException e)
         {
index 7b47fc6..0a2607b 100644 (file)
@@ -109,7 +109,7 @@ public class C99SizeofExpressionParser extends PrsStream implements RuleAction,
     public String[] orderedTerminalSymbols() { return C99SizeofExpressionParsersym.orderedTerminalSymbols; }
     public String getTokenKindName(int kind) { return C99SizeofExpressionParsersym.orderedTerminalSymbols[kind]; }
     public int getEOFTokenKind() { return C99SizeofExpressionParserprs.EOFT_SYMBOL; }
-    public PrsStream getParseStream() { return (PrsStream) this; }
+    public PrsStream getParseStream() { return this; }
     
     //
     // Report error message for given error_token.
@@ -148,7 +148,7 @@ public class C99SizeofExpressionParser extends PrsStream implements RuleAction,
     {
         try
         {
-            btParser = new FixedBacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this);
+            btParser = new FixedBacktrackingParser(monitor, this, prs, this);
         }
         catch (NotBacktrackParseTableException e)
         {
index 1394071..5eab88d 100644 (file)
@@ -110,7 +110,7 @@ public class CPPExpressionParser extends PrsStream implements RuleAction, IToken
     public String[] orderedTerminalSymbols() { return CPPExpressionParsersym.orderedTerminalSymbols; }
     public String getTokenKindName(int kind) { return CPPExpressionParsersym.orderedTerminalSymbols[kind]; }
     public int getEOFTokenKind() { return CPPExpressionParserprs.EOFT_SYMBOL; }
-    public PrsStream getParseStream() { return (PrsStream) this; }
+    public PrsStream getParseStream() { return this; }
     
     //
     // Report error message for given error_token.
@@ -149,7 +149,7 @@ public class CPPExpressionParser extends PrsStream implements RuleAction, IToken
     {
         try
         {
-            btParser = new FixedBacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this);
+            btParser = new FixedBacktrackingParser(monitor, this, prs, this);
         }
         catch (NotBacktrackParseTableException e)
         {
index 063bcac..b1b87d4 100644 (file)
@@ -110,7 +110,7 @@ public class CPPNoCastExpressionParser extends PrsStream implements RuleAction,
     public String[] orderedTerminalSymbols() { return CPPNoCastExpressionParsersym.orderedTerminalSymbols; }
     public String getTokenKindName(int kind) { return CPPNoCastExpressionParsersym.orderedTerminalSymbols[kind]; }
     public int getEOFTokenKind() { return CPPNoCastExpressionParserprs.EOFT_SYMBOL; }
-    public PrsStream getParseStream() { return (PrsStream) this; }
+    public PrsStream getParseStream() { return this; }
     
     //
     // Report error message for given error_token.
@@ -149,7 +149,7 @@ public class CPPNoCastExpressionParser extends PrsStream implements RuleAction,
     {
         try
         {
-            btParser = new FixedBacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this);
+            btParser = new FixedBacktrackingParser(monitor, this, prs, this);
         }
         catch (NotBacktrackParseTableException e)
         {
index d97915c..cac36b0 100644 (file)
@@ -110,7 +110,7 @@ public class CPPNoFunctionDeclaratorParser extends PrsStream implements RuleActi
     public String[] orderedTerminalSymbols() { return CPPNoFunctionDeclaratorParsersym.orderedTerminalSymbols; }
     public String getTokenKindName(int kind) { return CPPNoFunctionDeclaratorParsersym.orderedTerminalSymbols[kind]; }
     public int getEOFTokenKind() { return CPPNoFunctionDeclaratorParserprs.EOFT_SYMBOL; }
-    public PrsStream getParseStream() { return (PrsStream) this; }
+    public PrsStream getParseStream() { return this; }
     
     //
     // Report error message for given error_token.
@@ -149,7 +149,7 @@ public class CPPNoFunctionDeclaratorParser extends PrsStream implements RuleActi
     {
         try
         {
-            btParser = new FixedBacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this);
+            btParser = new FixedBacktrackingParser(monitor, this, prs, this);
         }
         catch (NotBacktrackParseTableException e)
         {
index b9bad00..cb9db91 100644 (file)
@@ -106,7 +106,7 @@ public class CPPParser extends PrsStream implements RuleAction, ITokenStream,
     public String[] orderedTerminalSymbols() { return CPPParsersym.orderedTerminalSymbols; }
     public String getTokenKindName(int kind) { return CPPParsersym.orderedTerminalSymbols[kind]; }
     public int getEOFTokenKind() { return CPPParserprs.EOFT_SYMBOL; }
-    public PrsStream getParseStream() { return (PrsStream) this; }
+    public PrsStream getParseStream() { return this; }
     
     //
     // Report error message for given error_token.
@@ -145,7 +145,7 @@ public class CPPParser extends PrsStream implements RuleAction, ITokenStream,
     {
         try
         {
-            btParser = new FixedBacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this);
+            btParser = new FixedBacktrackingParser(monitor, this, prs, this);
         }
         catch (NotBacktrackParseTableException e)
         {
index 89a3853..ff1b409 100644 (file)
@@ -110,7 +110,7 @@ public class CPPSizeofExpressionParser extends PrsStream implements RuleAction,
     public String[] orderedTerminalSymbols() { return CPPSizeofExpressionParsersym.orderedTerminalSymbols; }
     public String getTokenKindName(int kind) { return CPPSizeofExpressionParsersym.orderedTerminalSymbols[kind]; }
     public int getEOFTokenKind() { return CPPSizeofExpressionParserprs.EOFT_SYMBOL; }
-    public PrsStream getParseStream() { return (PrsStream) this; }
+    public PrsStream getParseStream() { return this; }
     
     //
     // Report error message for given error_token.
@@ -149,7 +149,7 @@ public class CPPSizeofExpressionParser extends PrsStream implements RuleAction,
     {
         try
         {
-            btParser = new FixedBacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this);
+            btParser = new FixedBacktrackingParser(monitor, this, prs, this);
         }
         catch (NotBacktrackParseTableException e)
         {
index 4b1927b..9c70bef 100644 (file)
@@ -112,7 +112,7 @@ public class CPPTemplateTypeParameterParser extends PrsStream implements RuleAct
     public String[] orderedTerminalSymbols() { return CPPTemplateTypeParameterParsersym.orderedTerminalSymbols; }
     public String getTokenKindName(int kind) { return CPPTemplateTypeParameterParsersym.orderedTerminalSymbols[kind]; }
     public int getEOFTokenKind() { return CPPTemplateTypeParameterParserprs.EOFT_SYMBOL; }
-    public PrsStream getParseStream() { return (PrsStream) this; }
+    public PrsStream getParseStream() { return this; }
     
     //
     // Report error message for given error_token.
@@ -151,7 +151,7 @@ public class CPPTemplateTypeParameterParser extends PrsStream implements RuleAct
     {
         try
         {
-            btParser = new FixedBacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this);
+            btParser = new FixedBacktrackingParser(monitor, this, prs, this);
         }
         catch (NotBacktrackParseTableException e)
         {
index bec3327..72d18fb 100644 (file)
@@ -110,7 +110,7 @@ public class GCCParser extends PrsStream implements RuleAction, ITokenStream,
     public String[] orderedTerminalSymbols() { return GCCParsersym.orderedTerminalSymbols; }
     public String getTokenKindName(int kind) { return GCCParsersym.orderedTerminalSymbols[kind]; }
     public int getEOFTokenKind() { return GCCParserprs.EOFT_SYMBOL; }
-    public PrsStream getParseStream() { return (PrsStream) this; }
+    public PrsStream getParseStream() { return this; }
     
     //
     // Report error message for given error_token.
@@ -149,7 +149,7 @@ public class GCCParser extends PrsStream implements RuleAction, ITokenStream,
     {
         try
         {
-            btParser = new FixedBacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this);
+            btParser = new FixedBacktrackingParser(monitor, this, prs, this);
         }
         catch (NotBacktrackParseTableException e)
         {
index c48b02c..6c04c8e 100644 (file)
@@ -114,7 +114,7 @@ public class GCCSizeofExpressionParser extends PrsStream implements RuleAction,
     public String[] orderedTerminalSymbols() { return GCCSizeofExpressionParsersym.orderedTerminalSymbols; }
     public String getTokenKindName(int kind) { return GCCSizeofExpressionParsersym.orderedTerminalSymbols[kind]; }
     public int getEOFTokenKind() { return GCCSizeofExpressionParserprs.EOFT_SYMBOL; }
-    public PrsStream getParseStream() { return (PrsStream) this; }
+    public PrsStream getParseStream() { return this; }
     
     //
     // Report error message for given error_token.
@@ -153,7 +153,7 @@ public class GCCSizeofExpressionParser extends PrsStream implements RuleAction,
     {
         try
         {
-            btParser = new FixedBacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this);
+            btParser = new FixedBacktrackingParser(monitor, this, prs, this);
         }
         catch (NotBacktrackParseTableException e)
         {
index 5060f8c..eade3f1 100644 (file)
@@ -112,7 +112,7 @@ public class GPPParser extends PrsStream implements RuleAction, ITokenStream,
     public String[] orderedTerminalSymbols() { return GPPParsersym.orderedTerminalSymbols; }
     public String getTokenKindName(int kind) { return GPPParsersym.orderedTerminalSymbols[kind]; }
     public int getEOFTokenKind() { return GPPParserprs.EOFT_SYMBOL; }
-    public PrsStream getParseStream() { return (PrsStream) this; }
+    public PrsStream getParseStream() { return this; }
     
     //
     // Report error message for given error_token.
@@ -151,7 +151,7 @@ public class GPPParser extends PrsStream implements RuleAction, ITokenStream,
     {
         try
         {
-            btParser = new FixedBacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this);
+            btParser = new FixedBacktrackingParser(monitor, this, prs, this);
         }
         catch (NotBacktrackParseTableException e)
         {
index e0b1234..1089558 100644 (file)
@@ -116,7 +116,7 @@ public class GPPSizeofExpressionParser extends PrsStream implements RuleAction,
     public String[] orderedTerminalSymbols() { return GPPSizeofExpressionParsersym.orderedTerminalSymbols; }
     public String getTokenKindName(int kind) { return GPPSizeofExpressionParsersym.orderedTerminalSymbols[kind]; }
     public int getEOFTokenKind() { return GPPSizeofExpressionParserprs.EOFT_SYMBOL; }
-    public PrsStream getParseStream() { return (PrsStream) this; }
+    public PrsStream getParseStream() { return this; }
     
     //
     // Report error message for given error_token.
@@ -155,7 +155,7 @@ public class GPPSizeofExpressionParser extends PrsStream implements RuleAction,
     {
         try
         {
-            btParser = new FixedBacktrackingParser(monitor, (TokenStream) this, prs, (RuleAction) this);
+            btParser = new FixedBacktrackingParser(monitor, this, prs, this);
         }
         catch (NotBacktrackParseTableException e)
         {
index 8c67759..35e9115 100644 (file)
@@ -412,7 +412,7 @@ public class FPRendering extends AbstractMemoryRendering
         super.activated();
 
         IWorkbench workbench = PlatformUI.getWorkbench();
-        ICommandService commandSupport = (ICommandService) workbench.getAdapter(ICommandService.class);
+        ICommandService commandSupport = workbench.getAdapter(ICommandService.class);
 
         if (commandSupport != null)
         {
@@ -437,7 +437,7 @@ public class FPRendering extends AbstractMemoryRendering
     public void deactivated()
     {
         IWorkbench workbench = PlatformUI.getWorkbench();
-        ICommandService commandSupport = (ICommandService) workbench.getAdapter(ICommandService.class);
+        ICommandService commandSupport = workbench.getAdapter(ICommandService.class);
 
         if (commandSupport != null)
         {
index 625c656..c12df97 100644 (file)
@@ -667,7 +667,7 @@ public class Rendering extends Composite implements IDebugEventSetListener
     {
         IMemoryBlock block = fParent.getMemoryBlock();
         if (block != null)
-            return (IMemoryBlockExtension) block.getAdapter(IMemoryBlockExtension.class);
+            return block.getAdapter(IMemoryBlockExtension.class);
 
         return null;
     }
index 5430277..24af992 100644 (file)
@@ -837,7 +837,8 @@ public class MemoryBrowser extends ViewPart implements IDebugContextListener, IM
                        public IDebugTarget getDebugTarget() { return null; }\r
                        public ILaunch getLaunch() { return null; }\r
                        public String getModelIdentifier() { return null; }\r
-                       public <T> T getAdapter(Class<T> adapter) { return null; }\r
+                       @SuppressWarnings({ "rawtypes", "unchecked" })\r
+                       public Object getAdapter(Class adapter) { return null; }\r
                });\r
        }\r
 \r