From 5b5f2c9142046a094af3b260603532ce30732380 Mon Sep 17 00:00:00 2001 From: TheShermanTanker Date: Wed, 21 Dec 2022 02:25:19 +0800 Subject: [PATCH] Interface Identification --- .../org/eclipse/cdt/core/dom/ast/c/CLanguage.java | 2 +- .../eclipse/cdt/core/dom/ast/c/IActualCLanguage.java | 11 +++++++++++ .../org/eclipse/cdt/core/dom/ast/cpp/CPPLanguage.java | 2 +- .../cdt/core/dom/ast/cpp/IActualCPPLanguage.java | 11 +++++++++++ 4 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/IActualCLanguage.java create mode 100644 core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/IActualCPPLanguage.java diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/CLanguage.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/CLanguage.java index 204b382fd92..4fcd971f2ef 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/CLanguage.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/CLanguage.java @@ -10,7 +10,7 @@ import org.eclipse.cdt.core.parser.ParserLanguage; import org.eclipse.cdt.core.parser.ParserMode; -public class CLanguage extends AbstractCLikeLanguage { +public class CLanguage extends AbstractCLikeLanguage implements IActualCLanguage { @Override public String getId() { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/IActualCLanguage.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/IActualCLanguage.java new file mode 100644 index 00000000000..236104e631d --- /dev/null +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/c/IActualCLanguage.java @@ -0,0 +1,11 @@ +package org.eclipse.cdt.core.dom.ast.c; + +/** + * This interface is used by Eclipse to mark the corresponding language implementation + * that comes as one of the built-in languages as the true C Language. + * + * This should not be implemented by any dialects! + */ +public interface IActualCLanguage { + +} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/CPPLanguage.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/CPPLanguage.java index 3735266e6d9..310dc10e38b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/CPPLanguage.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/CPPLanguage.java @@ -10,7 +10,7 @@ import org.eclipse.cdt.core.parser.ParserLanguage; import org.eclipse.cdt.core.parser.ParserMode; -public class CPPLanguage extends AbstractCLikeLanguage { +public class CPPLanguage extends AbstractCLikeLanguage implements IActualCPPLanguage { @Override public String getId() { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/IActualCPPLanguage.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/IActualCPPLanguage.java new file mode 100644 index 00000000000..c2a518ce634 --- /dev/null +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/IActualCPPLanguage.java @@ -0,0 +1,11 @@ +package org.eclipse.cdt.core.dom.ast.cpp; + +/** + * This interface is used by Eclipse to mark the corresponding language implementation + * that comes as one of the built-in languages as the true C++ Language. + * + * This should not be implemented by any dialects! + */ +public interface IActualCPPLanguage { + +}