Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2019-10-10 16:41:56 -0400
committerAlexander Kurtakov2019-10-10 17:10:57 -0400
commit5224c92b6770a7ecf68ec7d92476bbc23a674f01 (patch)
tree0068917b49bf763a983c141170cb76746e2bcd73
parent46be0de323643a1ae45c6eb284127d025af4e242 (diff)
downloadorg.eclipse.cdt-5224c92b6770a7ecf68ec7d92476bbc23a674f01.tar.gz
org.eclipse.cdt-5224c92b6770a7ecf68ec7d92476bbc23a674f01.tar.xz
org.eclipse.cdt-5224c92b6770a7ecf68ec7d92476bbc23a674f01.zip
Generify Class.
Change-Id: I065b4f7c1559a141ebf2e0c82e896557a7cfc05f Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/ExclusionInclusionEntryDialog.java2
-rw-r--r--core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteTester.java2
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/PDAAdapterFactory.java12
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/breakpoints/PDAEditorAdapterFactory.java8
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDALaunch.java3
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDAServicesShutdownSequence.java3
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAVirtualMachineDMContext.java9
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileBrowserVMProvider.java5
-rw-r--r--dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersView.java5
-rw-r--r--lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/BaseExtensibleLanguage.java11
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.floatingpoint/src/org/eclipse/cdt/debug/ui/memory/floatingpoint/FPRendering.java6
-rw-r--r--upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/UPCLanguage.java5
-rw-r--r--xlc/org.eclipse.cdt.core.lrparser.xlc/META-INF/MANIFEST.MF2
-rw-r--r--xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/core/lrparser/xlc/XlcCLanguage.java5
-rw-r--r--xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/core/lrparser/xlc/XlcCPPLanguage.java5
15 files changed, 33 insertions, 50 deletions
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/ExclusionInclusionEntryDialog.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/ExclusionInclusionEntryDialog.java
index 1b0c8468ed..f9baab0588 100644
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/ExclusionInclusionEntryDialog.java
+++ b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/dialogs/ExclusionInclusionEntryDialog.java
@@ -217,7 +217,7 @@ public class ExclusionInclusionEntryDialog extends StatusDialog {
public static IPath[] chooseExclusionPattern(Shell shell, IContainer currentSourceFolder, String title,
String message, IPath initialPath, boolean multiSelection) {
- Class[] acceptedClasses = new Class[] { IFolder.class, IFile.class, IProject.class };
+ Class<?>[] acceptedClasses = new Class[] { IFolder.class, IFile.class, IProject.class };
ISelectionStatusValidator validator = new TypedElementSelectionValidator(acceptedClasses, multiSelection);
ViewerFilter filter = new TypedViewerFilter(acceptedClasses);
ILabelProvider lp = new WorkbenchLabelProvider();
diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteTester.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteTester.java
index 1d4bbdeaba..544f98fe68 100644
--- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteTester.java
+++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/rewrite/RewriteTester.java
@@ -120,7 +120,7 @@ public class RewriteTester extends TestSuite {
private static RewriteBaseTest createTestClass(String className, String testName, List<TestSourceFile> files)
throws Exception {
- try {
+ try {
Class<?> refClass = Class.forName(className);
Constructor<?> ct = refClass.getConstructor(new Class[] { String.class, List.class });
RewriteBaseTest test = (RewriteBaseTest) ct.newInstance(new Object[] { testName, files });
diff --git a/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/PDAAdapterFactory.java b/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/PDAAdapterFactory.java
index a5d0c705a9..849ee9ef14 100644
--- a/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/PDAAdapterFactory.java
+++ b/dsf/org.eclipse.cdt.examples.dsf.pda.ui/src/org/eclipse/cdt/examples/dsf/pda/ui/PDAAdapterFactory.java
@@ -37,8 +37,7 @@ import org.eclipse.debug.ui.contexts.ISuspendTrigger;
public class PDAAdapterFactory implements IAdapterFactory {
// This IAdapterFactory method returns adapters for the PDA launch object only.
@Override
- @SuppressWarnings("unchecked") // IAdapterFactory is Java 1.3
- public Object getAdapter(Object adaptableObject, Class adapterType) {
+ public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) {
if (!(adaptableObject instanceof PDALaunch))
return null;
@@ -58,18 +57,17 @@ public class PDAAdapterFactory implements IAdapterFactory {
// Returns the adapter type for the launch object.
if (adapterType.equals(IElementContentProvider.class))
- return adapterSet.fViewModelAdapter;
+ return adapterType.cast(adapterSet.fViewModelAdapter);
else if (adapterType.equals(IModelProxyFactory.class))
- return adapterSet.fViewModelAdapter;
+ return adapterType.cast(adapterSet.fViewModelAdapter);
else if (adapterType.equals(ISuspendTrigger.class))
- return adapterSet.fSuspendTrigger;
+ return adapterType.cast(adapterSet.fSuspendTrigger);
else
return null;
}
@Override
- @SuppressWarnings("unchecked") // IAdapterFactory is Java 1.3
- public Class[] getAdapterList() {
+ public Class<?>[] getAdapterList() {
return new Class[] { IElementContentProvider.class, IModelProxyFactory.class, ISuspendTrigger.class };
}
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 705b24a476..c5fcd8d5fe 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
@@ -31,8 +31,7 @@ import org.eclipse.ui.texteditor.ITextEditor;
public class PDAEditorAdapterFactory implements IAdapterFactory {
@Override
- @SuppressWarnings("unchecked") // IAdapterFactory is Java 1.3
- public Object getAdapter(Object adaptableObject, Class adapterType) {
+ public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) {
if (adaptableObject instanceof PDAEditor) {
ITextEditor editorPart = (ITextEditor) adaptableObject;
IResource resource = editorPart.getEditorInput().getAdapter(IResource.class);
@@ -40,7 +39,7 @@ public class PDAEditorAdapterFactory implements IAdapterFactory {
String extension = resource.getFileExtension();
if (extension != null && extension.equals("pda")) {
if (adapterType.equals(IToggleBreakpointsTarget.class)) {
- return new PDABreakpointAdapter();
+ return adapterType.cast(new PDABreakpointAdapter());
}
}
}
@@ -49,8 +48,7 @@ public class PDAEditorAdapterFactory implements IAdapterFactory {
}
@Override
- @SuppressWarnings("unchecked") // IAdapterFactory is Java 1.3
- public Class[] getAdapterList() {
+ public Class<?>[] getAdapterList() {
return new Class[] { IToggleBreakpointsTarget.class };
}
}
diff --git a/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDALaunch.java b/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDALaunch.java
index 83f0afc50c..14821f0317 100644
--- a/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDALaunch.java
+++ b/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDALaunch.java
@@ -252,9 +252,8 @@ public class PDALaunch extends DsfLaunch {
}));
}
- @SuppressWarnings("unchecked")
@Override
- public Object getAdapter(Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
// Force adapters to be loaded. Otherwise the adapter manager may not find
// the model proxy adapter for DSF-based debug elements.
Platform.getAdapterManager().loadAdapter(this, adapter.getName());
diff --git a/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDAServicesShutdownSequence.java b/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDAServicesShutdownSequence.java
index 310032bc39..5c7788e652 100644
--- a/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDAServicesShutdownSequence.java
+++ b/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/launch/PDAServicesShutdownSequence.java
@@ -114,8 +114,7 @@ public class PDAServicesShutdownSequence extends Sequence {
return fSteps;
}
- @SuppressWarnings("unchecked")
- private void shutdownService(Class clazz, final RequestMonitor requestMonitor) {
+ private void shutdownService(Class<?> clazz, final RequestMonitor requestMonitor) {
IDsfService service = (IDsfService) fTracker.getService(clazz);
if (service != null) {
service.shutdown(new RequestMonitor(getExecutor(), requestMonitor) {
diff --git a/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAVirtualMachineDMContext.java b/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAVirtualMachineDMContext.java
index 1871fbe394..af1aabd3ec 100644
--- a/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAVirtualMachineDMContext.java
+++ b/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDAVirtualMachineDMContext.java
@@ -13,7 +13,6 @@
*******************************************************************************/
package org.eclipse.cdt.examples.dsf.pda.service;
-import org.eclipse.cdt.dsf.datamodel.AbstractDMContext;
import org.eclipse.cdt.dsf.datamodel.IDMContext;
import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerDMContext;
@@ -77,12 +76,8 @@ public class PDAVirtualMachineDMContext extends PlatformObject
return getProgram();
}
- /**
- * @see AbstractDMContext#getAdapter(Class)
- */
@Override
- @SuppressWarnings("unchecked")
- public Object getAdapter(Class adapterType) {
+ public <T> T getAdapter(Class<T> adapterType) {
Object retVal = null;
DsfSession session = DsfSession.getSession(fSessionId);
if (session != null) {
@@ -91,7 +86,7 @@ public class PDAVirtualMachineDMContext extends PlatformObject
if (retVal == null) {
retVal = super.getAdapter(adapterType);
}
- return retVal;
+ return adapterType.cast(retVal);
}
}
diff --git a/dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileBrowserVMProvider.java b/dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileBrowserVMProvider.java
index e018d1a42e..1829024aac 100644
--- a/dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileBrowserVMProvider.java
+++ b/dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileBrowserVMProvider.java
@@ -37,10 +37,9 @@ public class FileBrowserVMProvider extends AbstractVMProvider {
* The input object provides the viewer access to the viewer model adapter.
*/
@Override
- @SuppressWarnings("unchecked")
- public Object getAdapter(Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
if (adapter.isInstance(getVMAdapter())) {
- return getVMAdapter();
+ return adapter.cast(getVMAdapter());
}
return null;
}
diff --git a/dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersView.java b/dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersView.java
index 8aab054e12..7872afc20f 100644
--- a/dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersView.java
+++ b/dsf/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/timers/TimersView.java
@@ -139,10 +139,9 @@ public class TimersView extends ViewPart {
* The input object provides the viewer access to the viewer model adapter.
*/
@Override
- @SuppressWarnings("unchecked")
- public Object getAdapter(Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
if (adapter.isInstance(fTimersVMAdapter)) {
- return fTimersVMAdapter;
+ return adapter.cast(fTimersVMAdapter);
}
return null;
}
diff --git a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/BaseExtensibleLanguage.java b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/BaseExtensibleLanguage.java
index 2455bd3eab..0d8f81a034 100644
--- a/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/BaseExtensibleLanguage.java
+++ b/lrparser/org.eclipse.cdt.core.lrparser/src/org/eclipse/cdt/core/dom/lrparser/BaseExtensibleLanguage.java
@@ -216,7 +216,7 @@ public abstract class BaseExtensibleLanguage extends AbstractLanguage {
if(e instanceof TemplateIDErrorException){
//IScanner completePreprocessor = new CPreprocessor(reader, scanInfo, pl, log, config, fileCreator);
//IParser<IASTTranslationUnit> completeParser = getCompleteParser(preprocessor, index, parserProperties);
-
+
ISecondaryParser<IASTTranslationUnit> completeParser = getCompleteParser((ITokenStream)parser, preprocessor, index, parserProperties);
//completeParser.setAction(parser.getAction());
//((ISecondaryParser)completeParser).setTokenMap((ITokenStream)parser);
@@ -461,15 +461,14 @@ public abstract class BaseExtensibleLanguage extends AbstractLanguage {
private ICLanguageKeywords cLanguageKeywords = new CLanguageKeywords(getParserLanguage(),
getScannerExtensionConfiguration());
- @SuppressWarnings("unchecked")
@Override
- public Object getAdapter(Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
if (ICLanguageKeywords.class.equals(adapter))
- return cLanguageKeywords;
+ return adapter.cast(cLanguageKeywords);
if (IPDOMLinkageFactory.class.equals(adapter)) {
if (getParserLanguage().isCPP())
- return new PDOMCPPLinkageFactory();
- return new PDOMCLinkageFactory();
+ return adapter.cast(new PDOMCPPLinkageFactory());
+ return adapter.cast(new PDOMCLinkageFactory());
}
return super.getAdapter(adapter);
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 dbb0c03dd7..176e0c31cf 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
@@ -1069,7 +1069,7 @@ public class FPRendering extends AbstractMemoryRendering implements IRepositiona
}
@Override
- public Object getAdapter(Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
if (adapter == IWorkbenchAdapter.class) {
if (this.fWorkbenchAdapter == null) {
this.fWorkbenchAdapter = new IWorkbenchAdapter() {
@@ -1094,7 +1094,7 @@ public class FPRendering extends AbstractMemoryRendering implements IRepositiona
}
};
}
- return this.fWorkbenchAdapter;
+ return adapter.cast(this.fWorkbenchAdapter);
}
if (adapter == IMemoryBlockConnection.class) {
@@ -1115,7 +1115,7 @@ public class FPRendering extends AbstractMemoryRendering implements IRepositiona
};
}
- return fConnection;
+ return adapter.cast(fConnection);
}
return super.getAdapter(adapter);
diff --git a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/UPCLanguage.java b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/UPCLanguage.java
index 0e9f383d50..ef608a6f63 100644
--- a/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/UPCLanguage.java
+++ b/upc/org.eclipse.cdt.core.parser.upc/src/org/eclipse/cdt/core/dom/upc/UPCLanguage.java
@@ -66,11 +66,10 @@ public class UPCLanguage extends BaseExtensibleLanguage {
private static final ICLanguageKeywords upcKeywords = new UPCLanguageKeywords(
ScannerExtensionConfiguration.createC());
- @SuppressWarnings("rawtypes")
@Override
- public Object getAdapter(Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
if (ICLanguageKeywords.class.equals(adapter))
- return upcKeywords;
+ return adapter.cast(upcKeywords);
return super.getAdapter(adapter);
}
diff --git a/xlc/org.eclipse.cdt.core.lrparser.xlc/META-INF/MANIFEST.MF b/xlc/org.eclipse.cdt.core.lrparser.xlc/META-INF/MANIFEST.MF
index b588c0972c..db79790d4e 100644
--- a/xlc/org.eclipse.cdt.core.lrparser.xlc/META-INF/MANIFEST.MF
+++ b/xlc/org.eclipse.cdt.core.lrparser.xlc/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.1
Bundle-SymbolicName: org.eclipse.cdt.core.lrparser.xlc;singleton:=true
-Bundle-Version: 5.1.1.qualifier
+Bundle-Version: 5.1.100.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Localization: plugin
Require-Bundle: org.eclipse.cdt.core;bundle-version="5.1.0",
diff --git a/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/core/lrparser/xlc/XlcCLanguage.java b/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/core/lrparser/xlc/XlcCLanguage.java
index f53098c777..43e10c2cde 100644
--- a/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/core/lrparser/xlc/XlcCLanguage.java
+++ b/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/core/lrparser/xlc/XlcCLanguage.java
@@ -63,11 +63,10 @@ public class XlcCLanguage extends GCCLanguage {
return XlcCScannerExtensionConfiguration.getInstance();
}
- @SuppressWarnings("rawtypes")
@Override
- public Object getAdapter(Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
if (ICLanguageKeywords.class.equals(adapter))
- return XlcKeywords.ALL_C_KEYWORDS;
+ return adapter.cast(XlcKeywords.ALL_C_KEYWORDS);
return super.getAdapter(adapter);
}
diff --git a/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/core/lrparser/xlc/XlcCPPLanguage.java b/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/core/lrparser/xlc/XlcCPPLanguage.java
index 7c19b023de..1c627f619c 100644
--- a/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/core/lrparser/xlc/XlcCPPLanguage.java
+++ b/xlc/org.eclipse.cdt.core.lrparser.xlc/parser/org/eclipse/cdt/core/lrparser/xlc/XlcCPPLanguage.java
@@ -87,11 +87,10 @@ public class XlcCPPLanguage extends GPPLanguage {
return XlcCPPScannerExtensionConfiguration.getInstance();
}
- @SuppressWarnings("rawtypes")
@Override
- public Object getAdapter(Class adapter) {
+ public <T> T getAdapter(Class<T> adapter) {
if (ICLanguageKeywords.class.equals(adapter))
- return XlcKeywords.ALL_CPP_KEYWORDS;
+ return adapter.cast(XlcKeywords.ALL_CPP_KEYWORDS);
return super.getAdapter(adapter);
}

Back to the top