diff options
author | Andrew Gvozdev | 2015-12-30 16:09:36 +0000 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2015-12-31 02:52:19 +0000 |
commit | 2a4cb495b5ce3c1ab4c0fc50f819fcc39c87986f (patch) | |
tree | 241256d1d4250c578263dc26ceb4016457ac3dcd /build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor | |
parent | 73805d2ea45b4da3c179c13373401a4fff28f240 (diff) | |
download | org.eclipse.cdt-2a4cb495b5ce3c1ab4c0fc50f819fcc39c87986f.tar.gz org.eclipse.cdt-2a4cb495b5ce3c1ab4c0fc50f819fcc39c87986f.tar.xz org.eclipse.cdt-2a4cb495b5ce3c1ab4c0fc50f819fcc39c87986f.zip |
Fixed some warnings
Change-Id: Icb6f7ba6151b55296c3f8137552a10fd7872b317
Signed-off-by: Andrew Gvozdev <angvoz.dev@gmail.com>
Diffstat (limited to 'build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor')
2 files changed, 6 insertions, 6 deletions
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileEditor.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileEditor.java index 670753a0fd9..11be9d797df 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileEditor.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileEditor.java @@ -186,18 +186,18 @@ public class MakefileEditor extends TextEditor implements ISelectionChangedListe return viewer; } - @SuppressWarnings("rawtypes") + @SuppressWarnings("unchecked") @Override - public Object getAdapter(Class key) { + public <T> T getAdapter(Class<T> key) { if (ProjectionAnnotationModel.class.equals(key)) { if (projectionSupport != null) { - Object result = projectionSupport.getAdapter(getSourceViewer(), key); + T result = projectionSupport.getAdapter(getSourceViewer(), key); if (result != null) { return result; } } } else if (key.equals(IContentOutlinePage.class)) { - return getOutlinePage(); + return (T) getOutlinePage(); } return super.getAdapter(key); } diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/ProjectionMakefileUpdater.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/ProjectionMakefileUpdater.java index e0cbf566bf5..ab6426db830 100644 --- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/ProjectionMakefileUpdater.java +++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/ProjectionMakefileUpdater.java @@ -145,7 +145,7 @@ public class ProjectionMakefileUpdater implements IProjectionListener { fInput= manager.getWorkingCopy(fEditor.getEditorInput()); if (fInput != null) { - ProjectionAnnotationModel model= (ProjectionAnnotationModel) fEditor.getAdapter(ProjectionAnnotationModel.class); + ProjectionAnnotationModel model= fEditor.getAdapter(ProjectionAnnotationModel.class); if (model != null) { Map<MakefileProjectionAnnotation, Position> additions= computeAdditions((IParent) fInput); model.removeAllAnnotations(); @@ -229,7 +229,7 @@ public class ProjectionMakefileUpdater implements IProjectionListener { return; } - ProjectionAnnotationModel model= (ProjectionAnnotationModel) fEditor.getAdapter(ProjectionAnnotationModel.class); + ProjectionAnnotationModel model= fEditor.getAdapter(ProjectionAnnotationModel.class); if (model == null) { return; } |