Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Khouzam2015-03-25 10:58:12 -0400
committerMarc Khouzam2015-03-25 11:01:46 -0400
commit37890019cbe3b6b861def0d80d0f08e91ef18865 (patch)
treef7af0f410166df8c49144dd98f0d043671837b63
parented97b40808590029c095499811c22e123862ac9c (diff)
downloadorg.eclipse.cdt-37890019cbe3b6b861def0d80d0f08e91ef18865.tar.gz
org.eclipse.cdt-37890019cbe3b6b861def0d80d0f08e91ef18865.tar.xz
org.eclipse.cdt-37890019cbe3b6b861def0d80d0f08e91ef18865.zip
Remove warnings caused by change to getAdaptable()
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>
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CygpathTranslator.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/LocalTransferDropTargetListener.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/BuildTargetAction.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java2
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/views/MakeView.java2
-rw-r--r--codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/CodanPartListener.java2
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/ToggleNatureAction.java2
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/BuildPropertyPage.java2
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java2
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java2
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/views/ProblemDetails.java4
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexUpdateTests.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/AssemblyLanguage.java2
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Binary.java4
-rw-r--r--core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CommitWorkingCopyOperation.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/ast/tag/TagService.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNode.java16
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVisitor.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IndexFileSet.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorName.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorNode.java6
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MultiMacroExpansionExplorer.java4
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOM.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMWriter.java2
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/AdapterUtil.java2
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/CygwinPEBinaryObject.java10
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/parser/GNUElfBinaryObject.java6
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/som/parser/SOMBinaryObject.java6
-rw-r--r--core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/xcoff/parser/XCOFFBinaryObject.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CActionFilter.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/BlockCommentAction.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/DeleteResConfigsHandler.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/ExcludeFromBuildHandler.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/FindWordAction.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/GotoNextBookmarkAction.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/IndentAction.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/SelectionConverter.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHDropTargetListener.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHViewPart.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/BuildGroup.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CView.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/GotoActionGroup.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/MainActionGroup.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/OpenFileGroup.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/OpenProjectGroup.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/TextFieldNavigationHandler.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementLabelProvider.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathPropertyPage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/IncludesSymbolsPropertyPage.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/FileTransferDragAdapter.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/ResourceTransferDragAdapter.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/ResourceTransferDropAdapter.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ASTProvider.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/AbstractCModelOutlinePage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CDocumentProvider.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CElementHyperlinkDetector.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/DefaultBinaryFileEditor.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ExternalSearchDocumentProvider.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SpecificContentAssistAction.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SpecificContentAssistExecutor.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ToggleCommentAction.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/NamePatternFilter.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBConversions.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBViewPart.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/FileLanguageMappingPropertyPage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/ProjectLanguageMappingPropertyPage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/ProjectLanguageMappingWidget.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorBuildActionGroup.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorContentProvider.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorDropAdapterAssistant.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorLabelProvider.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorRefactorActionProvider.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/BuildLogPreferencePage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CFileTypesPropertyPage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistAdvancedConfigurationBlock.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/EditTemplateDialog.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/includes/IncludeOrganizer.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/RenameInformationPopup.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/TextSearchWrapper.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchResult.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindInWorkingSetAction.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/AbstractInformationControl.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionControl.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionExplorationControl.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistProcessor.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/KeywordCompletionProposalComputer.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CSelectAnnotationRulerAction.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CorrectionCommandHandler.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CorrectionCommandInstaller.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/proposals/ChangeCorrectionProposal.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/folding/DefaultCFoldingStructureProvider.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/typehierarchy/THDropTargetListener.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/typehierarchy/THViewPart.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/AbstractResourceActionHandler.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/EditorUtility.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/RemoteTreeViewer.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CDTContextActivator.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CElementImageProvider.java6
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CElementLabels.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/WorkingSetFilter.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardUtil.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/filewizard/AbstractFileCreationWizardPage.java8
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/CElementWorkingSetPage.java10
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetConfigurationsPage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetPropertyTester.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetProxy.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CDTUITools.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementSorter.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/ChangeBuildConfigActionBase.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/GenerateActionGroup.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/CHelpConfigurationPropertyPage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/IndexerOptionPropertyPage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/Page_head_general.java2
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/AsmSourceViewerConfiguration.java4
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/CSourceViewerConfiguration.java6
-rw-r--r--core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/ProjectSelectionPage.java2
-rw-r--r--core/org.eclipse.cdt.ui/utils.ui/org/eclipse/cdt/utils/ui/controls/FileListControl.java2
-rw-r--r--cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RSEHelper.java6
-rw-r--r--debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/debug/application/ApplicationActionBarAdvisor.java2
-rw-r--r--debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/internal/debug/application/CompilerOptionParser.java2
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java2
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/SessionManager.java4
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/executables/StandardSourceFileRemapping.java2
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/executables/StandardSourceFilesProvider.java2
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugElement.java2
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java8
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CMemoryBlockExtension.java4
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CRegisterGroup.java2
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CStackFrame.java2
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CThread.java4
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/Disassembly.java4
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyBlock.java2
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyRetrieval.java2
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupParticipant.java8
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceNotFoundElement.java2
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/srcfinder/CSourceFinder.java4
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/SetAutoSolibActionDelegate.java4
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/OptionsPropertyPage.java6
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java22
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugUIUtils.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/EvaluationContextManager.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddGlobalsActionDelegate.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableVariablesActionDelegate.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/LoadSymbolsForAllActionDelegate.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/MoveToLineActionDelegate.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/MoveToLineAdapter.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/NumberFormatsContribution.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RemoveAllGlobalsActionDelegate.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RemoveGlobalsActionDelegate.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ResumeAtLineActionDelegate.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ResumeAtLineAdapter.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RetargetAction.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RunToLineAdapter.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ShowFullPathsAction.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleInstructionStepModeActionDelegate.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ViewFilterAction.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/CAddBreakpointInteractiveRulerAction.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/CAddDynamicPrintfInteractiveRulerAction.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleBreakpointAdapter.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleCBreakpointsTargetFactory.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointContext.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointFilteringPage.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java8
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/ThreadFilterEditor.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/AbstractRegisterGroupCommandHandler.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/ReverseToggleCommandHandler.java8
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/commands/DisassemblyDisplayModeHandler.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/commands/SetSteppingModeHandler.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/CDIDisassemblyRetrieval.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/editor/DisassemblyEditor.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/editor/DisassemblyEditorManager.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/rendering/DisassemblyEditorInput.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/rendering/DisassemblyMemoryRendering.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentAnnotationProvider.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentContentProvider.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentLabelProvider.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DebugTextHover.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DelegatingDebugTextHover.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/CDebugElementProxyFactory.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CPropertyTester.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/DebugContextPinProvider.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/PinCloneUtils.java6
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/CDebugPreferencePage.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/CSourceNotFoundEditor.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceContainerWorkbenchAdapter.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceDisplayAdapter.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/AddMemoryBlocks.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModuleContentProvider.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModuleLabelProvider.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModuleMementoProvider.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/signals/FlexibleSignalsView.java4
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/ActionsPropertyPage.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/LogAction.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/ResumeAction.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/ReverseDebugAction.java2
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/AbstractToggleBreakpointAdapter.java16
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbPinProvider.java10
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/DsfLoadSymbolsCommandHandler.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/ReverseDebuggingPropertyTester.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/CBreakpointGdbThreadFilterPage.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GDBDynamicPrintfPropertyPage.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GDBTracepointPropertyPage.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/GdbReverseToggleCommand.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/ConsolePageParticipant.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/TracepointActionsPropertyPage.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/TraceControlView.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/commands/RetargetDebugContextCommand.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/GdbMemoryBlockRetrieval.java6
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java2
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2.java4
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/StartOrRestartProcessSequence_7_0.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/ToggleBreakpointsTargetFactory.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/actions/DisassemblyMoveToLineAdapter.java4
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/actions/DisassemblyResumeAtLineAdapter.java4
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/actions/DisassemblyRunToLineAdapter.java4
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyBackendDsf.java4
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java14
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyToggleBreakpointTester.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/SourceColorerJob.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/AbstractDisassemblyRulerActionDelegate.java6
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/RulerToggleBreakpointHandler.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/BreakpointsAnnotationModel.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/presentation/CSourcePresentationCreator.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/provisional/DisassemblySelection.java4
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPane.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/AbstractDsfDebugTextHover.java4
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfCommandRunnable.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfStepIntoSelectionHyperlinkDetector.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java4
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/actions/AbstractVMProviderActionDelegate.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/actions/DefaultRefreshAllTarget.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/actions/VMHandlerUtils.java8
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMNode.java6
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionsChangedUpdateTester.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/WatchExpressionCellModifier.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/SyncVariableDataAccess.java6
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/VariableCellModifier.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/PropertiesBasedLabelProvider.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/internal/provisional/model/MemoryBlockRetrievalFactory.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/model/DsfMemoryBlockRetrieval.java2
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/breakpoints/PDABreakpointAdapter.java6
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/breakpoints/PDAEditorAdapterFactory.java2
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/PDAExpressionVMProvider.java4
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TriggerCellModifier.java2
-rw-r--r--dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/debug/vm/launch/VMTest1.java2
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/refactoring/ResourceRenameParticipant.java2
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/lpgextensions/FixedBacktrackingParser.java2
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99ExpressionParser.java4
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99NoCastExpressionParser.java4
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99Parser.java4
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99SizeofExpressionParser.java4
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPExpressionParser.java4
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPNoCastExpressionParser.java4
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPNoFunctionDeclaratorParser.java4
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPParser.java4
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPSizeofExpressionParser.java4
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPTemplateTypeParameterParser.java4
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/gcc/GCCParser.java4
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/gcc/GCCSizeofExpressionParser.java4
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/gpp/GPPParser.java4
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/gpp/GPPSizeofExpressionParser.java4
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.floatingpoint/src/org/eclipse/cdt/debug/ui/memory/floatingpoint/FPRendering.java4
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.floatingpoint/src/org/eclipse/cdt/debug/ui/memory/floatingpoint/Rendering.java2
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java3
270 files changed, 463 insertions, 462 deletions
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CygpathTranslator.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CygpathTranslator.java
index 3dca63cf0c..8f12d1c132 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CygpathTranslator.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/CygpathTranslator.java
@@ -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();
}
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/LocalTransferDropTargetListener.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/LocalTransferDropTargetListener.java
index 59a72c117e..7f9a2dc7b1 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/LocalTransferDropTargetListener.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/LocalTransferDropTargetListener.java
@@ -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();
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/BuildTargetAction.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/BuildTargetAction.java
index b216a50c07..260565b9ef 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/BuildTargetAction.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/BuildTargetAction.java
@@ -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);
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java
index a5f3ecedfd..3ee788583a 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/actions/UpdateMakeProjectAction.java
@@ -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;
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/views/MakeView.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/views/MakeView.java
index 8c0e5df196..d1e43393c2 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/views/MakeView.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/views/MakeView.java
@@ -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);
}
diff --git a/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/CodanPartListener.java b/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/CodanPartListener.java
index 9798681944..01d8cc9398 100644
--- a/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/CodanPartListener.java
+++ b/codan/org.eclipse.cdt.codan.ui.cxx/src/org/eclipse/cdt/codan/internal/ui/cxx/CodanPartListener.java
@@ -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);
}
}
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/ToggleNatureAction.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/ToggleNatureAction.java
index 9a29c25fa9..45a89c1681 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/ToggleNatureAction.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/actions/ToggleNatureAction.java
@@ -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));
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/BuildPropertyPage.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/BuildPropertyPage.java
index 2f976f5f2f..ae0d380c6f 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/BuildPropertyPage.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/BuildPropertyPage.java
@@ -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;
}
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java
index 1abbd53851..1c76a41a50 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/CodanPreferencePage.java
@@ -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);
}
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java
index 39b860b716..8c3a33b61f 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/preferences/FieldEditorOverlayPage.java
@@ -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;
}
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/views/ProblemDetails.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/views/ProblemDetails.java
index 02bbfb8f4a..8ff9b3d52a 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/views/ProblemDetails.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/views/ProblemDetails.java
@@ -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;
}
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexUpdateTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexUpdateTests.java
index 69fbb526aa..7478912878 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexUpdateTests.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexUpdateTests.java
@@ -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();
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/AssemblyLanguage.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/AssemblyLanguage.java
index f0899e5683..37eff2c3ea 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/AssemblyLanguage.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/core/model/AssemblyLanguage.java
@@ -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);
}
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Binary.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Binary.java
index f918f7f0fb..bb2dd246dc 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Binary.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Binary.java
@@ -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;
diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CommitWorkingCopyOperation.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CommitWorkingCopyOperation.java
index f5d6e2090e..13b66a2816 100644
--- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CommitWorkingCopyOperation.java
+++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CommitWorkingCopyOperation.java
@@ -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) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/ast/tag/TagService.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/ast/tag/TagService.java
index c09acbac42..a59770e8ac 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/ast/tag/TagService.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/ast/tag/TagService.java
@@ -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;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNode.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNode.java
index a00915cd41..e0952e8af9 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNode.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ASTNode.java
@@ -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;
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java
index df63b03c61..31b635a531 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java
@@ -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();
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVisitor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVisitor.java
index 38814e9f11..431ed11c8b 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVisitor.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CVisitor.java
@@ -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;
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IndexFileSet.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IndexFileSet.java
index 9852e90e40..907f9b909d 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IndexFileSet.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IndexFileSet.java
@@ -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()) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorName.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorName.java
index 2255fe4d17..fb3ed157b5 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorName.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorName.java
@@ -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);
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorNode.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorNode.java
index f3bd5e0fb6..fc6cc1bb21 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorNode.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTPreprocessorNode.java
@@ -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);
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MultiMacroExpansionExplorer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MultiMacroExpansionExplorer.java
index bf6ae71682..61c8847c85 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MultiMacroExpansionExplorer.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/MultiMacroExpansionExplorer.java
@@ -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();
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOM.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOM.java
index 5eea0bf852..1f23c6022f 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOM.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOM.java
@@ -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;
}
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMWriter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMWriter.java
index 724d21f029..c2b268f4e4 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMWriter.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMWriter.java
@@ -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) {
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java
index 835fc405e8..e098a56ad7 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java
@@ -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;
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/AdapterUtil.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/AdapterUtil.java
index ad1c4a715a..846b80f614 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/AdapterUtil.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/internal/core/AdapterUtil.java
@@ -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;
}
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/CygwinPEBinaryObject.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/CygwinPEBinaryObject.java
index 84b9806577..28b024b764 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/CygwinPEBinaryObject.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/coff/parser/CygwinPEBinaryObject.java
@@ -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());
}
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/parser/GNUElfBinaryObject.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/parser/GNUElfBinaryObject.java
index 4af997ba3e..f787daa449 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/parser/GNUElfBinaryObject.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/parser/GNUElfBinaryObject.java
@@ -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());
}
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/som/parser/SOMBinaryObject.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/som/parser/SOMBinaryObject.java
index e217c2d388..c4ae5a97d9 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/som/parser/SOMBinaryObject.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/som/parser/SOMBinaryObject.java
@@ -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());
}
diff --git a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/xcoff/parser/XCOFFBinaryObject.java b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/xcoff/parser/XCOFFBinaryObject.java
index 4975447d5c..2a39d1e177 100644
--- a/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/xcoff/parser/XCOFFBinaryObject.java
+++ b/core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/xcoff/parser/XCOFFBinaryObject.java
@@ -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());
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CActionFilter.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CActionFilter.java
index a297259088..67a7062f65 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CActionFilter.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/CActionFilter.java
@@ -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);
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/BlockCommentAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/BlockCommentAction.java
index 726b84d9bf..9429701bd0 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/BlockCommentAction.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/BlockCommentAction.java
@@ -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();
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/DeleteResConfigsHandler.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/DeleteResConfigsHandler.java
index 5694f23b76..bcfe8f066e 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/DeleteResConfigsHandler.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/DeleteResConfigsHandler.java
@@ -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);
}
}
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/ExcludeFromBuildHandler.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/ExcludeFromBuildHandler.java
index e9a8578553..10c613116f 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/ExcludeFromBuildHandler.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/ExcludeFromBuildHandler.java
@@ -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);
}
}
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/FindWordAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/FindWordAction.java
index 437aabee30..6cc8b0671c 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/FindWordAction.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/FindWordAction.java
@@ -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;
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/GotoNextBookmarkAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/GotoNextBookmarkAction.java
index 99078e87d4..352fb58922 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/GotoNextBookmarkAction.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/GotoNextBookmarkAction.java
@@ -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;
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/IndentAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/IndentAction.java
index e407201dda..63609906ab 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/IndentAction.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/IndentAction.java
@@ -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();
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/SelectionConverter.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/SelectionConverter.java
index ad4ce4eba3..d549d7b839 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/SelectionConverter.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/SelectionConverter.java
@@ -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)) {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePage.java
index 78cfac6423..084b9cc558 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/buildconsole/BuildConsolePage.java
@@ -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();
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHDropTargetListener.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHDropTargetListener.java
index 3d5715460b..c0bb54fe53 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHDropTargetListener.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHDropTargetListener.java
@@ -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;
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHViewPart.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHViewPart.java
index 88993160b5..88ffa8c4ca 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHViewPart.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/callhierarchy/CHViewPart.java
@@ -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);
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/BuildGroup.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/BuildGroup.java
index 1567d45c24..f6861ba582 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/BuildGroup.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/BuildGroup.java
@@ -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;
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CView.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CView.java
index 433c21f467..3be021bae4 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CView.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/CView.java
@@ -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;
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/GotoActionGroup.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/GotoActionGroup.java
index 74803f4a46..962fde48f7 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/GotoActionGroup.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/GotoActionGroup.java
@@ -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) {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/MainActionGroup.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/MainActionGroup.java
index a445f98388..aec2b07168 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/MainActionGroup.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/MainActionGroup.java
@@ -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);
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/OpenFileGroup.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/OpenFileGroup.java
index 2f81a17730..7cc4859695 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/OpenFileGroup.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/OpenFileGroup.java
@@ -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();
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/OpenProjectGroup.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/OpenProjectGroup.java
index 2fee3f2ecc..2ae147ca75 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/OpenProjectGroup.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/cview/OpenProjectGroup.java
@@ -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;
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/TextFieldNavigationHandler.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/TextFieldNavigationHandler.java
index 26ddbab5c4..7ab6bca4b6 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/TextFieldNavigationHandler.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/TextFieldNavigationHandler.java
@@ -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;
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementLabelProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementLabelProvider.java
index 2e1f1b3a95..55787e673d 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementLabelProvider.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementLabelProvider.java
@@ -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);
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathPropertyPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathPropertyPage.java
index 0c5cf9243b..937128a271 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathPropertyPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathPropertyPage.java
@@ -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();
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/IncludesSymbolsPropertyPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/IncludesSymbolsPropertyPage.java
index edfc05f8b1..148d9fc6a9 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/IncludesSymbolsPropertyPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/IncludesSymbolsPropertyPage.java
@@ -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;
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/FileTransferDragAdapter.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/FileTransferDragAdapter.java
index c166352c5e..bf6ea51aff 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/FileTransferDragAdapter.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/FileTransferDragAdapter.java
@@ -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)
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/ResourceTransferDragAdapter.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/ResourceTransferDragAdapter.java
index ce129bfb5c..d461e4d775 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/ResourceTransferDragAdapter.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/ResourceTransferDragAdapter.java
@@ -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);
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/ResourceTransferDropAdapter.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/ResourceTransferDropAdapter.java
index c8c9025187..b7ba2d6086 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/ResourceTransferDropAdapter.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dnd/ResourceTransferDropAdapter.java
@@ -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);
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ASTProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ASTProvider.java
index 494bc39b58..5293ade7e3 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ASTProvider.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ASTProvider.java
@@ -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();
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/AbstractCModelOutlinePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/AbstractCModelOutlinePage.java
index e514bee2bb..e2d7f68138 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/AbstractCModelOutlinePage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/AbstractCModelOutlinePage.java
@@ -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));
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CDocumentProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CDocumentProvider.java
index 40eeb77362..fd48c8ce20 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CDocumentProvider.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CDocumentProvider.java
@@ -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);
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CElementHyperlinkDetector.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CElementHyperlinkDetector.java
index 9025483811..c7fc670694 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CElementHyperlinkDetector.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CElementHyperlinkDetector.java
@@ -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))
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/DefaultBinaryFileEditor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/DefaultBinaryFileEditor.java
index 28eadddbab..05bcfdd62b 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/DefaultBinaryFileEditor.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/DefaultBinaryFileEditor.java
@@ -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());
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ExternalSearchDocumentProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ExternalSearchDocumentProvider.java
index 8b03ce4725..fbd83ab888 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ExternalSearchDocumentProvider.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ExternalSearchDocumentProvider.java
@@ -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) {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SpecificContentAssistAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SpecificContentAssistAction.java
index 278f342108..c8ce0df2f4 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SpecificContentAssistAction.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SpecificContentAssistAction.java
@@ -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;
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SpecificContentAssistExecutor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SpecificContentAssistExecutor.java
index 0bbd56cbee..1e58620186 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SpecificContentAssistExecutor.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/SpecificContentAssistExecutor.java
@@ -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 {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ToggleCommentAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ToggleCommentAction.java
index f90ebb3a64..47110d3ccc 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ToggleCommentAction.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ToggleCommentAction.java
@@ -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));
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/NamePatternFilter.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/NamePatternFilter.java
index 7caba73f3d..e4fb45fdeb 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/NamePatternFilter.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/filters/NamePatternFilter.java
@@ -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();
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBConversions.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBConversions.java
index d3fc56d6fe..f41cc466c8 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBConversions.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBConversions.java
@@ -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) {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBViewPart.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBViewPart.java
index 1ac63c3958..03f993550e 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBViewPart.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/includebrowser/IBViewPart.java
@@ -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);
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/FileLanguageMappingPropertyPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/FileLanguageMappingPropertyPage.java
index 9bc26f32c5..7517051fd8 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/FileLanguageMappingPropertyPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/FileLanguageMappingPropertyPage.java
@@ -350,7 +350,7 @@ public class FileLanguageMappingPropertyPage extends PropertyPage {
}
private IFile getFile() {
- return (IFile) getElement().getAdapter(IFile.class);
+ return getElement().getAdapter(IFile.class);
}
@Override
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/ProjectLanguageMappingPropertyPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/ProjectLanguageMappingPropertyPage.java
index 47923197af..b801e835b4 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/ProjectLanguageMappingPropertyPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/ProjectLanguageMappingPropertyPage.java
@@ -190,6 +190,6 @@ public class ProjectLanguageMappingPropertyPage extends PropertyPage {
}
private IProject getProject() {
- return (IProject) getElement().getAdapter(IProject.class);
+ return getElement().getAdapter(IProject.class);
}
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/ProjectLanguageMappingWidget.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/ProjectLanguageMappingWidget.java
index 316f9dd94b..a93f8d86c7 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/ProjectLanguageMappingWidget.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/language/ProjectLanguageMappingWidget.java
@@ -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()) {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorBuildActionGroup.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorBuildActionGroup.java
index 3121c21f16..4094fa4e24 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorBuildActionGroup.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorBuildActionGroup.java
@@ -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;
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorContentProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorContentProvider.java
index 46041a8c97..c1373564fe 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorContentProvider.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorContentProvider.java
@@ -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);
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorDropAdapterAssistant.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorDropAdapterAssistant.java
index 2826ff0c62..505ff09ed9 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorDropAdapterAssistant.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorDropAdapterAssistant.java
@@ -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);
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorLabelProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorLabelProvider.java
index 83b877d3e6..c96da4319e 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorLabelProvider.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorLabelProvider.java
@@ -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) {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorRefactorActionProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorRefactorActionProvider.java
index 27da16e842..28d135a44d 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorRefactorActionProvider.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/navigator/CNavigatorRefactorActionProvider.java
@@ -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());
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/BuildLogPreferencePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/BuildLogPreferencePage.java
index 42539fb9db..395de63a2d 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/BuildLogPreferencePage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/BuildLogPreferencePage.java
@@ -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;
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CFileTypesPropertyPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CFileTypesPropertyPage.java
index a1f39654be..181a574a82 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CFileTypesPropertyPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CFileTypesPropertyPage.java
@@ -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;
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistAdvancedConfigurationBlock.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistAdvancedConfigurationBlock.java
index bfdbdbf41f..f8e65595d6 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistAdvancedConfigurationBlock.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/CodeAssistAdvancedConfigurationBlock.java
@@ -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();
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/EditTemplateDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/EditTemplateDialog.java
index 92f354f7b5..c59bec357a 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/EditTemplateDialog.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/preferences/EditTemplateDialog.java
@@ -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) {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/includes/IncludeOrganizer.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/includes/IncludeOrganizer.java
index dc5f0e7c67..42905ebcf0 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/includes/IncludeOrganizer.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/includes/IncludeOrganizer.java
@@ -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;
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/RenameInformationPopup.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/RenameInformationPopup.java
index 795e3ad6e1..14ca88c7e2 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/RenameInformationPopup.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/RenameInformationPopup.java
@@ -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);
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/TextSearchWrapper.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/TextSearchWrapper.java
index ff05f281ea..ed39d00e95 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/TextSearchWrapper.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/TextSearchWrapper.java
@@ -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);
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchResult.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchResult.java
index 88b9d25957..f5234f0fd7 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchResult.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/CSearchResult.java
@@ -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);
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindInWorkingSetAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindInWorkingSetAction.java
index dfb22b4639..b51384985d 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindInWorkingSetAction.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindInWorkingSetAction.java
@@ -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);
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/AbstractInformationControl.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/AbstractInformationControl.java
index 18638e38e2..3467fbff01 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/AbstractInformationControl.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/AbstractInformationControl.java
@@ -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);
}
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionControl.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionControl.java
index 2ee273679d..8f68c24250 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionControl.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionControl.java
@@ -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) {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionExplorationControl.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionExplorationControl.java
index 888bd2050a..28f05e3687 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionExplorationControl.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/c/hover/CMacroExpansionExplorationControl.java
@@ -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);
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistProcessor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistProcessor.java
index 96631839a5..aae89b6224 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistProcessor.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistProcessor.java
@@ -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;
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/KeywordCompletionProposalComputer.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/KeywordCompletionProposalComputer.java
index 6205757e37..667d97969c 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/KeywordCompletionProposalComputer.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/KeywordCompletionProposalComputer.java
@@ -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)
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CSelectAnnotationRulerAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CSelectAnnotationRulerAction.java
index 172ce109fa..f3f0daec9f 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CSelectAnnotationRulerAction.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CSelectAnnotationRulerAction.java
@@ -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());
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CorrectionCommandHandler.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CorrectionCommandHandler.java
index d67a14ca10..4563ba8666 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CorrectionCommandHandler.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CorrectionCommandHandler.java
@@ -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) {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CorrectionCommandInstaller.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CorrectionCommandInstaller.java
index b454b430c1..9df36cef49 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CorrectionCommandInstaller.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/CorrectionCommandInstaller.java
@@ -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;
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/proposals/ChangeCorrectionProposal.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/proposals/ChangeCorrectionProposal.java
index 85ecbb6cae..7fdb505216 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/proposals/ChangeCorrectionProposal.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/correction/proposals/ChangeCorrectionProposal.java
@@ -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();
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/folding/DefaultCFoldingStructureProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/folding/DefaultCFoldingStructureProvider.java
index 20c7adb0de..33ace5803f 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/folding/DefaultCFoldingStructureProvider.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/folding/DefaultCFoldingStructureProvider.java
@@ -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() {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/typehierarchy/THDropTargetListener.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/typehierarchy/THDropTargetListener.java
index 62f5027f6d..e3f631d4f9 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/typehierarchy/THDropTargetListener.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/typehierarchy/THDropTargetListener.java
@@ -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;
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/typehierarchy/THViewPart.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/typehierarchy/THViewPart.java
index d2e3ad1981..6cbf681c73 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/typehierarchy/THViewPart.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/typehierarchy/THViewPart.java
@@ -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 {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/AbstractResourceActionHandler.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/AbstractResourceActionHandler.java
index 1fb3c0f705..b5e29e9263 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/AbstractResourceActionHandler.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/AbstractResourceActionHandler.java
@@ -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();
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/EditorUtility.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/EditorUtility.java
index 01213d138a..c80954f16b 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/EditorUtility.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/EditorUtility.java
@@ -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;
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/RemoteTreeViewer.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/RemoteTreeViewer.java
index a16ea485bc..3a477273f4 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/RemoteTreeViewer.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/util/RemoteTreeViewer.java
@@ -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) {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CDTContextActivator.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CDTContextActivator.java
index 393c3ac219..c8a9883640 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CDTContextActivator.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CDTContextActivator.java
@@ -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) {
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CElementImageProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CElementImageProvider.java
index fef2ccffa2..5aa0ae3d6e 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CElementImageProvider.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CElementImageProvider.java
@@ -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)
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CElementLabels.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CElementLabels.java
index 9ba924447e..868b2cdd2a 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CElementLabels.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/CElementLabels.java
@@ -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)));
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/WorkingSetFilter.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/WorkingSetFilter.java
index 955ce99315..a08fde1ca2 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/WorkingSetFilter.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/viewsupport/WorkingSetFilter.java
@@ -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);
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardUtil.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardUtil.java
index 0c979f1f1c..7fbd3c2465 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardUtil.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/classwizard/NewClassWizardUtil.java
@@ -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);
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/filewizard/AbstractFileCreationWizardPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/filewizard/AbstractFileCreationWizardPage.java
index 6ff77b5bd1..507e8f9070 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/filewizard/AbstractFileCreationWizardPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/filewizard/AbstractFileCreationWizardPage.java
@@ -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);
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/CElementWorkingSetPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/CElementWorkingSetPage.java
index 32e45d059b..555624aa00 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/CElementWorkingSetPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/CElementWorkingSetPage.java
@@ -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;
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetConfigurationsPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetConfigurationsPage.java
index d846f47c8c..64e7a4d9c0 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetConfigurationsPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetConfigurationsPage.java
@@ -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());
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetPropertyTester.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetPropertyTester.java
index d7e52ff79f..2bd2cbb9e5 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetPropertyTester.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetPropertyTester.java
@@ -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;
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetProxy.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetProxy.java
index eebf7fb78b..50242e8020 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetProxy.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/workingsets/WorkingSetProxy.java
@@ -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);
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CDTUITools.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CDTUITools.java
index 2b8ffa2a24..9f00db17db 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CDTUITools.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CDTUITools.java
@@ -138,7 +138,7 @@ public final class CDTUITools {
if (tu != null)
return tu;
- return (ICElement)editorInput.getAdapter(ICElement.class);
+ return editorInput.getAdapter(ICElement.class);
}
/**
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementSorter.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementSorter.java
index 58485bb855..fbe048e0e0 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementSorter.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/CElementSorter.java
@@ -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));
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/ChangeBuildConfigActionBase.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/ChangeBuildConfigActionBase.java
index b9f57b438b..7095e00b06 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/ChangeBuildConfigActionBase.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/ChangeBuildConfigActionBase.java
@@ -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();
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/GenerateActionGroup.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/GenerateActionGroup.java
index 241d3bce7a..3c2af09949 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/GenerateActionGroup.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/actions/GenerateActionGroup.java
@@ -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
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/CHelpConfigurationPropertyPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/CHelpConfigurationPropertyPage.java
index 8f3dc9501e..e6cddd23c7 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/CHelpConfigurationPropertyPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/CHelpConfigurationPropertyPage.java
@@ -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
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/IndexerOptionPropertyPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/IndexerOptionPropertyPage.java
index 9295a7bb22..6236451d1e 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/IndexerOptionPropertyPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/dialogs/IndexerOptionPropertyPage.java
@@ -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;
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java
index 19ab697da2..d845a82577 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/AbstractPage.java
@@ -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;
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/Page_head_general.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/Page_head_general.java
index 4318a4c3c6..66f7bed64a 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/Page_head_general.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/Page_head_general.java
@@ -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;
}
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/AsmSourceViewerConfiguration.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/AsmSourceViewerConfiguration.java
index 1a40c7ecf6..f4e6ebfc60 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/AsmSourceViewerConfiguration.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/AsmSourceViewerConfiguration.java
@@ -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());
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/CSourceViewerConfiguration.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/CSourceViewerConfiguration.java
index aae8aa838b..4db59d10ee 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/CSourceViewerConfiguration.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/text/CSourceViewerConfiguration.java
@@ -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) {
diff --git a/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/ProjectSelectionPage.java b/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/ProjectSelectionPage.java
index 0c98782ba3..71a10efa39 100644
--- a/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/ProjectSelectionPage.java
+++ b/core/org.eclipse.cdt.ui/templateengine/org/eclipse/cdt/ui/templateengine/ProjectSelectionPage.java
@@ -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);
}
}
}
diff --git a/core/org.eclipse.cdt.ui/utils.ui/org/eclipse/cdt/utils/ui/controls/FileListControl.java b/core/org.eclipse.cdt.ui/utils.ui/org/eclipse/cdt/utils/ui/controls/FileListControl.java
index 946dc31ecc..a1ca2de5a9 100644
--- a/core/org.eclipse.cdt.ui/utils.ui/org/eclipse/cdt/utils/ui/controls/FileListControl.java
+++ b/core/org.eclipse.cdt.ui/utils.ui/org/eclipse/cdt/utils/ui/controls/FileListControl.java
@@ -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) {
diff --git a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RSEHelper.java b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RSEHelper.java
index 20198fcd04..5bc1e86749 100644
--- a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RSEHelper.java
+++ b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/RSEHelper.java
@@ -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];
}
diff --git a/debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/debug/application/ApplicationActionBarAdvisor.java b/debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/debug/application/ApplicationActionBarAdvisor.java
index 511856f18d..33a0d5e032 100644
--- a/debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/debug/application/ApplicationActionBarAdvisor.java
+++ b/debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/debug/application/ApplicationActionBarAdvisor.java
@@ -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);
diff --git a/debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/internal/debug/application/CompilerOptionParser.java b/debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/internal/debug/application/CompilerOptionParser.java
index b69e9b984c..752587d0a6 100644
--- a/debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/internal/debug/application/CompilerOptionParser.java
+++ b/debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/internal/debug/application/CompilerOptionParser.java
@@ -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);
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java
index 1cf08dc458..c9c0f80dfd 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java
@@ -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);
}
}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/SessionManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/SessionManager.java
index f4a0d72bbb..1ead91b908 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/SessionManager.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/SessionManager.java
@@ -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 ) {
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/executables/StandardSourceFileRemapping.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/executables/StandardSourceFileRemapping.java
index 7cba5571ca..8762f8d545 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/executables/StandardSourceFileRemapping.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/executables/StandardSourceFileRemapping.java
@@ -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
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/executables/StandardSourceFilesProvider.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/executables/StandardSourceFilesProvider.java
index 9fa7edf9ca..62568e5d22 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/executables/StandardSourceFilesProvider.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/executables/StandardSourceFilesProvider.java
@@ -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);
}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugElement.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugElement.java
index 98d2248ebb..088cc5183d 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugElement.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugElement.java
@@ -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 );
}
/**
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java
index 65f70a3634..69a54515f8 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java
@@ -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);
}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CMemoryBlockExtension.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CMemoryBlockExtension.java
index d03e41c837..895f4cc5d2 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CMemoryBlockExtension.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CMemoryBlockExtension.java
@@ -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)
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CRegisterGroup.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CRegisterGroup.java
index eef50a75e9..612daac515 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CRegisterGroup.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CRegisterGroup.java
@@ -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() {
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CStackFrame.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CStackFrame.java
index bfde391491..ac1155f9b6 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CStackFrame.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CStackFrame.java
@@ -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 )
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CThread.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CThread.java
index c98aaf1f0a..b3b693b614 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CThread.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CThread.java
@@ -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 );
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/Disassembly.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/Disassembly.java
index 43bfe7adca..828b0dbefb 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/Disassembly.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/Disassembly.java
@@ -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 ||
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyBlock.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyBlock.java
index 119dc3bcb5..066054382e 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyBlock.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyBlock.java
@@ -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();
}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyRetrieval.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyRetrieval.java
index 01cd7f35f8..2ef7871968 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyRetrieval.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/DisassemblyRetrieval.java
@@ -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;
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupParticipant.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupParticipant.java
index 16b721fe1f..681753b051 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupParticipant.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLookupParticipant.java
@@ -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());
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceNotFoundElement.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceNotFoundElement.java
index c019d9b194..0a7bf3ee59 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceNotFoundElement.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceNotFoundElement.java
@@ -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
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/srcfinder/CSourceFinder.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/srcfinder/CSourceFinder.java
index 25525d3433..7ffff8904a 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/srcfinder/CSourceFinder.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/srcfinder/CSourceFinder.java
@@ -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 {
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/SetAutoSolibActionDelegate.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/SetAutoSolibActionDelegate.java
index 6accc0d5ca..8b82dbe603 100644
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/SetAutoSolibActionDelegate.java
+++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/SetAutoSolibActionDelegate.java
@@ -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;
}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/OptionsPropertyPage.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/OptionsPropertyPage.java
index aa03642506..0acdee5782 100644
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/OptionsPropertyPage.java
+++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/propertypages/OptionsPropertyPage.java
@@ -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);
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java
index 9e13f55d30..0ada2ef8bb 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java
@@ -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);
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugUIUtils.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugUIUtils.java
index a7b561ee4f..4496fc7c52 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugUIUtils.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugUIUtils.java
@@ -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( ' ' );
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/EvaluationContextManager.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/EvaluationContextManager.java
index 2bd74b34b2..257f89c953 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/EvaluationContextManager.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/EvaluationContextManager.java
@@ -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;
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddGlobalsActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddGlobalsActionDelegate.java
index 3f68222e94..cf571f55c2 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddGlobalsActionDelegate.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/AddGlobalsActionDelegate.java
@@ -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();
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableVariablesActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableVariablesActionDelegate.java
index 819c642ad9..6bccb0700c 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableVariablesActionDelegate.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/EnableVariablesActionDelegate.java
@@ -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;
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/LoadSymbolsForAllActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/LoadSymbolsForAllActionDelegate.java
index 82e2034c78..71556bc919 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/LoadSymbolsForAllActionDelegate.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/LoadSymbolsForAllActionDelegate.java
@@ -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;
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/MoveToLineActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/MoveToLineActionDelegate.java
index 213dd7f1ca..2a0ed274a3 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/MoveToLineActionDelegate.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/MoveToLineActionDelegate.java
@@ -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
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/MoveToLineAdapter.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/MoveToLineAdapter.java
index 98fe0c88f2..f8a5cc9511 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/MoveToLineAdapter.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/MoveToLineAdapter.java
@@ -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;
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/NumberFormatsContribution.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/NumberFormatsContribution.java
index 1569d6f040..26d29c5cf0 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/NumberFormatsContribution.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/NumberFormatsContribution.java
@@ -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();
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RemoveAllGlobalsActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RemoveAllGlobalsActionDelegate.java
index 78d94000c1..e16e027bcb 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RemoveAllGlobalsActionDelegate.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RemoveAllGlobalsActionDelegate.java
@@ -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) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RemoveGlobalsActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RemoveGlobalsActionDelegate.java
index bbf5cb56b6..eb75b7de24 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RemoveGlobalsActionDelegate.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RemoveGlobalsActionDelegate.java
@@ -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() {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ResumeAtLineActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ResumeAtLineActionDelegate.java
index 1591f55db7..c7a1493b0f 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ResumeAtLineActionDelegate.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ResumeAtLineActionDelegate.java
@@ -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
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ResumeAtLineAdapter.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ResumeAtLineAdapter.java
index 7503f8fe84..853c1fd5f6 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ResumeAtLineAdapter.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ResumeAtLineAdapter.java
@@ -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;
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RetargetAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RetargetAction.java
index 1bbe1882f9..34d10494c2 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RetargetAction.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RetargetAction.java
@@ -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);
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RunToLineAdapter.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RunToLineAdapter.java
index a9ca8aa26b..eb7be127ce 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RunToLineAdapter.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/RunToLineAdapter.java
@@ -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;
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ShowFullPathsAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ShowFullPathsAction.java
index 6c933ffca9..83f75b2c35 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ShowFullPathsAction.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ShowFullPathsAction.java
@@ -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) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleInstructionStepModeActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleInstructionStepModeActionDelegate.java
index d1197073c8..bc34cb5194 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleInstructionStepModeActionDelegate.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleInstructionStepModeActionDelegate.java
@@ -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;
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ViewFilterAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ViewFilterAction.java
index 90900895df..5dbee67f79 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ViewFilterAction.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ViewFilterAction.java
@@ -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) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/CAddBreakpointInteractiveRulerAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/CAddBreakpointInteractiveRulerAction.java
index a9643cd36c..1db300b2ca 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/CAddBreakpointInteractiveRulerAction.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/CAddBreakpointInteractiveRulerAction.java
@@ -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;
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/CAddDynamicPrintfInteractiveRulerAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/CAddDynamicPrintfInteractiveRulerAction.java
index b00dd3353d..4a127e7521 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/CAddDynamicPrintfInteractiveRulerAction.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/CAddDynamicPrintfInteractiveRulerAction.java
@@ -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;
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleBreakpointAdapter.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleBreakpointAdapter.java
index 92888f262e..ac04a922b6 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleBreakpointAdapter.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleBreakpointAdapter.java
@@ -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;
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleCBreakpointsTargetFactory.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleCBreakpointsTargetFactory.java
index 567809aa60..867eeec8a6 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleCBreakpointsTargetFactory.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/breakpoints/ToggleCBreakpointsTargetFactory.java
@@ -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) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointContext.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointContext.java
index 4801540779..557e2330dd 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointContext.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointContext.java
@@ -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) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointFilteringPage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointFilteringPage.java
index a74f4707bb..7807ea5475 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointFilteringPage.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointFilteringPage.java
@@ -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() {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java
index 2ada2e60f5..5b282c2081 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/CBreakpointPropertyPage.java
@@ -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) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/ThreadFilterEditor.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/ThreadFilterEditor.java
index cb341c364b..f595e1093d 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/ThreadFilterEditor.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/breakpoints/ThreadFilterEditor.java
@@ -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 );
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/AbstractRegisterGroupCommandHandler.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/AbstractRegisterGroupCommandHandler.java
index 53629e7bb1..0b01f94838 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/AbstractRegisterGroupCommandHandler.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/AbstractRegisterGroupCommandHandler.java
@@ -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;
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/ReverseToggleCommandHandler.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/ReverseToggleCommandHandler.java
index 64f1a4e5cc..5d27c7b516 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/ReverseToggleCommandHandler.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/commands/ReverseToggleCommandHandler.java
@@ -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);
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/commands/DisassemblyDisplayModeHandler.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/commands/DisassemblyDisplayModeHandler.java
index 7e05314cdd..854ea0e565 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/commands/DisassemblyDisplayModeHandler.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/commands/DisassemblyDisplayModeHandler.java
@@ -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 ) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/commands/SetSteppingModeHandler.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/commands/SetSteppingModeHandler.java
index 731672c0ed..28bdb61592 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/commands/SetSteppingModeHandler.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/commands/SetSteppingModeHandler.java
@@ -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;
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/CDIDisassemblyRetrieval.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/CDIDisassemblyRetrieval.java
index db14e2b09a..a6bed89a5b 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/CDIDisassemblyRetrieval.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/dsf/CDIDisassemblyRetrieval.java
@@ -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;
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/editor/DisassemblyEditor.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/editor/DisassemblyEditor.java
index bcc888c780..e5384cd8cd 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/editor/DisassemblyEditor.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/editor/DisassemblyEditor.java
@@ -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;
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/editor/DisassemblyEditorManager.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/editor/DisassemblyEditorManager.java
index 34c661f8ae..efeed3855d 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/editor/DisassemblyEditorManager.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/editor/DisassemblyEditorManager.java
@@ -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;
}
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/rendering/DisassemblyEditorInput.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/rendering/DisassemblyEditorInput.java
index 0adaa91459..c472732d25 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/rendering/DisassemblyEditorInput.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/rendering/DisassemblyEditorInput.java
@@ -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 );
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/rendering/DisassemblyMemoryRendering.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/rendering/DisassemblyMemoryRendering.java
index f95a0e8b87..50f4206e28 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/rendering/DisassemblyMemoryRendering.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/rendering/DisassemblyMemoryRendering.java
@@ -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;
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentAnnotationProvider.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentAnnotationProvider.java
index 94d167b375..b1aa820a69 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentAnnotationProvider.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentAnnotationProvider.java
@@ -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;
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentContentProvider.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentContentProvider.java
index 96420d87bb..ad10dff29f 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentContentProvider.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentContentProvider.java
@@ -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;
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentLabelProvider.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentLabelProvider.java
index db498beeca..92f00ffd0d 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentLabelProvider.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/disassembly/viewer/DocumentLabelProvider.java
@@ -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;
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DebugTextHover.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DebugTextHover.java
index f396b25da7..0e9b31a7d4 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DebugTextHover.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DebugTextHover.java
@@ -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;
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DelegatingDebugTextHover.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DelegatingDebugTextHover.java
index 963d9f5640..c01d0c1d9f 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DelegatingDebugTextHover.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DelegatingDebugTextHover.java
@@ -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);
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/CDebugElementProxyFactory.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/CDebugElementProxyFactory.java
index cd90cd5c2a..06b5182b86 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/CDebugElementProxyFactory.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/elements/adapters/CDebugElementProxyFactory.java
@@ -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 );
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java
index 89962e2940..7bea55a0ef 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CApplicationLaunchShortcut.java
@@ -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) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CPropertyTester.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CPropertyTester.java
index 0920a0be13..73e5ee8c74 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CPropertyTester.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/launch/CPropertyTester.java
@@ -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);
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/DebugContextPinProvider.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/DebugContextPinProvider.java
index e12755251a..b6b67318f0 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/DebugContextPinProvider.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/DebugContextPinProvider.java
@@ -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) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/PinCloneUtils.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/PinCloneUtils.java
index 197029a7b2..9c28cb1105 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/PinCloneUtils.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/pinclone/PinCloneUtils.java
@@ -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;
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/CDebugPreferencePage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/CDebugPreferencePage.java
index 663281b89e..178a730942 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/CDebugPreferencePage.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/preferences/CDebugPreferencePage.java
@@ -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 ) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/CSourceNotFoundEditor.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/CSourceNotFoundEditor.java
index 3f098fa350..260e291c07 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/CSourceNotFoundEditor.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/CSourceNotFoundEditor.java
@@ -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);
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceContainerWorkbenchAdapter.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceContainerWorkbenchAdapter.java
index df7c540234..dba0deeb65 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceContainerWorkbenchAdapter.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceContainerWorkbenchAdapter.java
@@ -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);
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceDisplayAdapter.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceDisplayAdapter.java
index c28129cb34..34d89a5d2c 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceDisplayAdapter.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/sourcelookup/SourceDisplayAdapter.java
@@ -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);
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/AddMemoryBlocks.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/AddMemoryBlocks.java
index 57d05bdfdc..bf5dd4bcc1 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/AddMemoryBlocks.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/memory/AddMemoryBlocks.java
@@ -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();
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModuleContentProvider.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModuleContentProvider.java
index 0263e7e1b2..5c628bb704 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModuleContentProvider.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModuleContentProvider.java
@@ -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();
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModuleLabelProvider.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModuleLabelProvider.java
index 17c4414c0a..1fc7077c53 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModuleLabelProvider.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModuleLabelProvider.java
@@ -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 );
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModuleMementoProvider.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModuleMementoProvider.java
index ac921a6955..89a186ac4c 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModuleMementoProvider.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/modules/ModuleMementoProvider.java
@@ -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 ) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/signals/FlexibleSignalsView.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/signals/FlexibleSignalsView.java
index a9dd50c363..834c2892a0 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/signals/FlexibleSignalsView.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/signals/FlexibleSignalsView.java
@@ -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();
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/ActionsPropertyPage.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/ActionsPropertyPage.java
index 704c6df3c5..7fccf6987b 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/ActionsPropertyPage.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/ActionsPropertyPage.java
@@ -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$
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/LogAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/LogAction.java
index 1de08d0c32..6b9c950bd9 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/LogAction.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/LogAction.java
@@ -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);
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/ResumeAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/ResumeAction.java
index 1dde0b7f61..b16a088d8c 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/ResumeAction.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/ResumeAction.java
@@ -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 {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/ReverseDebugAction.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/ReverseDebugAction.java
index 02ce0ecc24..5570fae88e 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/ReverseDebugAction.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpointactions/ReverseDebugAction.java
@@ -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) {
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/AbstractToggleBreakpointAdapter.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/AbstractToggleBreakpointAdapter.java
index d38d993512..b87ef7854c 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/AbstractToggleBreakpointAdapter.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/breakpoints/AbstractToggleBreakpointAdapter.java
@@ -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);
}
/**
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbPinProvider.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbPinProvider.java
index e666949c88..5718e2f2c9 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbPinProvider.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbPinProvider.java
@@ -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()) {
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/DsfLoadSymbolsCommandHandler.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/DsfLoadSymbolsCommandHandler.java
index 0aacba40da..eb626ae318 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/DsfLoadSymbolsCommandHandler.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/DsfLoadSymbolsCommandHandler.java
@@ -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());
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/ReverseDebuggingPropertyTester.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/ReverseDebuggingPropertyTester.java
index 7b913d3aaf..6bf1fcd881 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/ReverseDebuggingPropertyTester.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/actions/ReverseDebuggingPropertyTester.java
@@ -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);
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/CBreakpointGdbThreadFilterPage.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/CBreakpointGdbThreadFilterPage.java
index 00f5800443..5fda2c79e0 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/CBreakpointGdbThreadFilterPage.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/CBreakpointGdbThreadFilterPage.java
@@ -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() {
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GDBDynamicPrintfPropertyPage.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GDBDynamicPrintfPropertyPage.java
index 66c6b89d79..31688226d2 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GDBDynamicPrintfPropertyPage.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GDBDynamicPrintfPropertyPage.java
@@ -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) {
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GDBTracepointPropertyPage.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GDBTracepointPropertyPage.java
index 306e281ad6..0b0cffe11a 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GDBTracepointPropertyPage.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/breakpoints/GDBTracepointPropertyPage.java
@@ -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) {
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/GdbReverseToggleCommand.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/GdbReverseToggleCommand.java
index d02a500821..dd7a71656d 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/GdbReverseToggleCommand.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/commands/GdbReverseToggleCommand.java
@@ -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$
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/ConsolePageParticipant.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/ConsolePageParticipant.java
index a35f1e86ac..6f28435957 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/ConsolePageParticipant.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/console/ConsolePageParticipant.java
@@ -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) {
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/TracepointActionsPropertyPage.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/TracepointActionsPropertyPage.java
index 8e9e19c169..c12fbafec9 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/TracepointActionsPropertyPage.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepointactions/TracepointActionsPropertyPage.java
@@ -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$
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/TraceControlView.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/TraceControlView.java
index ed90ae4603..f665b107de 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/TraceControlView.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/tracepoints/TraceControlView.java
@@ -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$
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/commands/RetargetDebugContextCommand.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/commands/RetargetDebugContextCommand.java
index ccbde94b82..ad16dcca32 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/commands/RetargetDebugContextCommand.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/commands/RetargetDebugContextCommand.java
@@ -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);
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/GdbMemoryBlockRetrieval.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/GdbMemoryBlockRetrieval.java
index bb010ee0b6..d7c7aab5a7 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/GdbMemoryBlockRetrieval.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/GdbMemoryBlockRetrieval.java
@@ -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) {
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java
index 0d654f5159..89f7eac35e 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java
@@ -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 =
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2.java
index ab6cef33da..b9ebfb20a4 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2.java
@@ -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;
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/StartOrRestartProcessSequence_7_0.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/StartOrRestartProcessSequence_7_0.java
index 436d32262e..4a09806bc5 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/StartOrRestartProcessSequence_7_0.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/StartOrRestartProcessSequence_7_0.java
@@ -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.
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/ToggleBreakpointsTargetFactory.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/ToggleBreakpointsTargetFactory.java
index 67a906f7ce..3a0f054a3c 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/ToggleBreakpointsTargetFactory.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/ToggleBreakpointsTargetFactory.java
@@ -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) {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/actions/DisassemblyMoveToLineAdapter.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/actions/DisassemblyMoveToLineAdapter.java
index 275a458a56..ea4500bbbe 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/actions/DisassemblyMoveToLineAdapter.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/actions/DisassemblyMoveToLineAdapter.java
@@ -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;
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/actions/DisassemblyResumeAtLineAdapter.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/actions/DisassemblyResumeAtLineAdapter.java
index 76664b8eb6..917ccda737 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/actions/DisassemblyResumeAtLineAdapter.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/actions/DisassemblyResumeAtLineAdapter.java
@@ -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;
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/actions/DisassemblyRunToLineAdapter.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/actions/DisassemblyRunToLineAdapter.java
index 7b13412a2e..7113642580 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/actions/DisassemblyRunToLineAdapter.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/actions/DisassemblyRunToLineAdapter.java
@@ -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;
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyBackendDsf.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyBackendDsf.java
index 2b25648691..8d5fc6beb2 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyBackendDsf.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyBackendDsf.java
@@ -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();
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java
index 8ac52f3bd9..9be5d9f5a1 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java
@@ -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);
}
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyToggleBreakpointTester.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyToggleBreakpointTester.java
index 15ccef7e1c..a6702705ed 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyToggleBreakpointTester.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyToggleBreakpointTester.java
@@ -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) {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/SourceColorerJob.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/SourceColorerJob.java
index 2c712f2722..a80573fe59 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/SourceColorerJob.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/SourceColorerJob.java
@@ -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 {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/AbstractDisassemblyRulerActionDelegate.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/AbstractDisassemblyRulerActionDelegate.java
index 74ed357643..9996dc7e09 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/AbstractDisassemblyRulerActionDelegate.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/AbstractDisassemblyRulerActionDelegate.java
@@ -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();
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/RulerToggleBreakpointHandler.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/RulerToggleBreakpointHandler.java
index 38ed0aca95..479d1eff09 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/RulerToggleBreakpointHandler.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/actions/RulerToggleBreakpointHandler.java
@@ -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 {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/BreakpointsAnnotationModel.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/BreakpointsAnnotationModel.java
index 3272571648..ddd6f77125 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/BreakpointsAnnotationModel.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/model/BreakpointsAnnotationModel.java
@@ -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) {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/presentation/CSourcePresentationCreator.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/presentation/CSourcePresentationCreator.java
index 0e140845d3..b393654a79 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/presentation/CSourcePresentationCreator.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/presentation/CSourcePresentationCreator.java
@@ -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) {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/provisional/DisassemblySelection.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/provisional/DisassemblySelection.java
index d90eeb4810..efd6f0271f 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/provisional/DisassemblySelection.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/provisional/DisassemblySelection.java
@@ -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 {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPane.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPane.java
index 604d19a567..2310126e28 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPane.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/viewmodel/numberformat/detail/NumberFormatDetailPane.java
@@ -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) {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/AbstractDsfDebugTextHover.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/AbstractDsfDebugTextHover.java
index f55c8a8c52..ebd433b743 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/AbstractDsfDebugTextHover.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/AbstractDsfDebugTextHover.java
@@ -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();
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfCommandRunnable.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfCommandRunnable.java
index 7b1426fee0..50fcae56ba 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfCommandRunnable.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfCommandRunnable.java
@@ -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;
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfStepIntoSelectionHyperlinkDetector.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfStepIntoSelectionHyperlinkDetector.java
index 7095126cda..cff45b3af8 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfStepIntoSelectionHyperlinkDetector.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/actions/DsfStepIntoSelectionHyperlinkDetector.java
@@ -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))
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java
index 370cab1635..46331c52af 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java
@@ -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)) {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/actions/AbstractVMProviderActionDelegate.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/actions/AbstractVMProviderActionDelegate.java
index 168b63e1aa..d079f2e210 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/actions/AbstractVMProviderActionDelegate.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/actions/AbstractVMProviderActionDelegate.java
@@ -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);
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/actions/DefaultRefreshAllTarget.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/actions/DefaultRefreshAllTarget.java
index fdb754abdb..12c5128fa3 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/actions/DefaultRefreshAllTarget.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/actions/DefaultRefreshAllTarget.java
@@ -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;
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/actions/VMHandlerUtils.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/actions/VMHandlerUtils.java
index 9da8fb7fd0..bfc4d987de 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/actions/VMHandlerUtils.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/actions/VMHandlerUtils.java
@@ -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);
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMNode.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMNode.java
index 5d495111d8..bb84d0a1b2 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMNode.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/breakpoints/BreakpointVMNode.java
@@ -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;
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionsChangedUpdateTester.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionsChangedUpdateTester.java
index 57506621d5..cf8ad9ccff 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionsChangedUpdateTester.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/ExpressionsChangedUpdateTester.java
@@ -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])) {
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/WatchExpressionCellModifier.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/WatchExpressionCellModifier.java
index 71f792b448..e52cf73b18 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/WatchExpressionCellModifier.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/expression/WatchExpressionCellModifier.java
@@ -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;
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java
index 3894b020c9..dca680e189 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java
@@ -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;
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/SyncVariableDataAccess.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/SyncVariableDataAccess.java
index c2e737c2c9..96c93f5611 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/SyncVariableDataAccess.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/SyncVariableDataAccess.java
@@ -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;
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/VariableCellModifier.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/VariableCellModifier.java
index 6d674ad0ff..f310d17153 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/VariableCellModifier.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/variable/VariableCellModifier.java
@@ -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;
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/PropertiesBasedLabelProvider.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/PropertiesBasedLabelProvider.java
index 1151cbf973..8b5208f021 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/PropertiesBasedLabelProvider.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/ui/viewmodel/properties/PropertiesBasedLabelProvider.java
@@ -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;
}
diff --git a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/internal/provisional/model/MemoryBlockRetrievalFactory.java b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/internal/provisional/model/MemoryBlockRetrievalFactory.java
index d4c51de1e3..4bef5b64ef 100644
--- a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/internal/provisional/model/MemoryBlockRetrievalFactory.java
+++ b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/internal/provisional/model/MemoryBlockRetrievalFactory.java
@@ -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
diff --git a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/model/DsfMemoryBlockRetrieval.java b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/model/DsfMemoryBlockRetrieval.java
index dc4038b3d0..c4495507c6 100644
--- a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/model/DsfMemoryBlockRetrieval.java
+++ b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/model/DsfMemoryBlockRetrieval.java
@@ -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);
}
diff --git a/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/breakpoints/PDABreakpointAdapter.java b/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/breakpoints/PDABreakpointAdapter.java
index 356cf1af22..7128938ca4 100644
--- a/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/breakpoints/PDABreakpointAdapter.java
+++ b/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/breakpoints/PDABreakpointAdapter.java
@@ -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
diff --git a/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/breakpoints/PDAEditorAdapterFactory.java b/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/breakpoints/PDAEditorAdapterFactory.java
index a274955cec..628e3083fd 100644
--- a/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/breakpoints/PDAEditorAdapterFactory.java
+++ b/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/breakpoints/PDAEditorAdapterFactory.java
@@ -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")) {
diff --git a/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/PDAExpressionVMProvider.java b/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/PDAExpressionVMProvider.java
index 91ea58f439..e8c9cc7bea 100644
--- a/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/PDAExpressionVMProvider.java
+++ b/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/viewmodel/PDAExpressionVMProvider.java
@@ -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);
diff --git a/dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TriggerCellModifier.java b/dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TriggerCellModifier.java
index 9370094d0f..623d9fca2b 100644
--- a/dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TriggerCellModifier.java
+++ b/dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TriggerCellModifier.java
@@ -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;
}
diff --git a/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/debug/vm/launch/VMTest1.java b/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/debug/vm/launch/VMTest1.java
index fb2aa034d4..ff4951a482 100644
--- a/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/debug/vm/launch/VMTest1.java
+++ b/dsf/org.eclipse.cdt.tests.dsf/src/org/eclipse/cdt/tests/dsf/debug/vm/launch/VMTest1.java
@@ -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.
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/refactoring/ResourceRenameParticipant.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/refactoring/ResourceRenameParticipant.java
index d1982039ac..ea17bf79a1 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/refactoring/ResourceRenameParticipant.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/refactoring/ResourceRenameParticipant.java
@@ -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;
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/lpgextensions/FixedBacktrackingParser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/lpgextensions/FixedBacktrackingParser.java
index e002668fdb..9c3f5e0cb9 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/lpgextensions/FixedBacktrackingParser.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/lpgextensions/FixedBacktrackingParser.java
@@ -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;
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99ExpressionParser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99ExpressionParser.java
index ff4a7f527b..025a4b6d93 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99ExpressionParser.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99ExpressionParser.java
@@ -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)
{
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99NoCastExpressionParser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99NoCastExpressionParser.java
index b6b22f2f66..c6faee7f42 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99NoCastExpressionParser.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99NoCastExpressionParser.java
@@ -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)
{
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99Parser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99Parser.java
index 731f2441e0..afc4412c3e 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99Parser.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99Parser.java
@@ -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)
{
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99SizeofExpressionParser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99SizeofExpressionParser.java
index 7b47fc6940..0a2607bb77 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99SizeofExpressionParser.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/c99/C99SizeofExpressionParser.java
@@ -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)
{
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPExpressionParser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPExpressionParser.java
index 1394071163..5eab88df45 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPExpressionParser.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPExpressionParser.java
@@ -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)
{
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPNoCastExpressionParser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPNoCastExpressionParser.java
index 063bcac846..b1b87d4c45 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPNoCastExpressionParser.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPNoCastExpressionParser.java
@@ -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)
{
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPNoFunctionDeclaratorParser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPNoFunctionDeclaratorParser.java
index d97915cca6..cac36b0887 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPNoFunctionDeclaratorParser.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPNoFunctionDeclaratorParser.java
@@ -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)
{
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPParser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPParser.java
index b9bad0037a..cb9db917e8 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPParser.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPParser.java
@@ -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)
{
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPSizeofExpressionParser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPSizeofExpressionParser.java
index 89a385389b..ff1b4090a3 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPSizeofExpressionParser.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPSizeofExpressionParser.java
@@ -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)
{
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPTemplateTypeParameterParser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPTemplateTypeParameterParser.java
index 4b1927ba06..9c70bef133 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPTemplateTypeParameterParser.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/cpp/CPPTemplateTypeParameterParser.java
@@ -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)
{
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/gcc/GCCParser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/gcc/GCCParser.java
index bec33272dc..72d18fbaa4 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/gcc/GCCParser.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/gcc/GCCParser.java
@@ -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)
{
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/gcc/GCCSizeofExpressionParser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/gcc/GCCSizeofExpressionParser.java
index c48b02c086..6c04c8edad 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/gcc/GCCSizeofExpressionParser.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/gcc/GCCSizeofExpressionParser.java
@@ -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)
{
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/gpp/GPPParser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/gpp/GPPParser.java
index 5060f8c770..eade3f1854 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/gpp/GPPParser.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/gpp/GPPParser.java
@@ -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)
{
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/gpp/GPPSizeofExpressionParser.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/gpp/GPPSizeofExpressionParser.java
index e0b123477d..1089558fb1 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/gpp/GPPSizeofExpressionParser.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/internal/core/dom/lrparser/gpp/GPPSizeofExpressionParser.java
@@ -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)
{
diff --git a/memory/org.eclipse.cdt.debug.ui.memory.floatingpoint/src/org/eclipse/cdt/debug/ui/memory/floatingpoint/FPRendering.java b/memory/org.eclipse.cdt.debug.ui.memory.floatingpoint/src/org/eclipse/cdt/debug/ui/memory/floatingpoint/FPRendering.java
index 8c67759db1..35e9115e12 100644
--- a/memory/org.eclipse.cdt.debug.ui.memory.floatingpoint/src/org/eclipse/cdt/debug/ui/memory/floatingpoint/FPRendering.java
+++ b/memory/org.eclipse.cdt.debug.ui.memory.floatingpoint/src/org/eclipse/cdt/debug/ui/memory/floatingpoint/FPRendering.java
@@ -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)
{
diff --git a/memory/org.eclipse.cdt.debug.ui.memory.floatingpoint/src/org/eclipse/cdt/debug/ui/memory/floatingpoint/Rendering.java b/memory/org.eclipse.cdt.debug.ui.memory.floatingpoint/src/org/eclipse/cdt/debug/ui/memory/floatingpoint/Rendering.java
index 625c6562c4..c12df97bf9 100644
--- a/memory/org.eclipse.cdt.debug.ui.memory.floatingpoint/src/org/eclipse/cdt/debug/ui/memory/floatingpoint/Rendering.java
+++ b/memory/org.eclipse.cdt.debug.ui.memory.floatingpoint/src/org/eclipse/cdt/debug/ui/memory/floatingpoint/Rendering.java
@@ -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;
}
diff --git a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java
index 5430277cfd..24af992b3a 100644
--- a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java
+++ b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java
@@ -837,7 +837,8 @@ public class MemoryBrowser extends ViewPart implements IDebugContextListener, IM
public IDebugTarget getDebugTarget() { return null; }
public ILaunch getLaunch() { return null; }
public String getModelIdentifier() { return null; }
- public <T> T getAdapter(Class<T> adapter) { return null; }
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ public Object getAdapter(Class adapter) { return null; }
});
}

Back to the top