mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Added Interface colorization type
This commit is contained in:
parent
9bbcb8eb5e
commit
7a65003679
5 changed files with 13 additions and 5 deletions
|
@ -280,6 +280,7 @@ namespace IDE
|
|||
public Color mMethod = 0XFFA6E22A;
|
||||
public Color mType = 0XFF66D9EF;
|
||||
public Color mRefType = 0XFF66D9EF;
|
||||
public Color mInterface = 0XFF66D9EF;
|
||||
public Color mNamespace = 0xFF7BEEB7;
|
||||
public Color mDisassemblyText = 0xFFB0B0B0;
|
||||
public Color mDisassemblyFileName = 0XFFFF0000;
|
||||
|
@ -316,8 +317,11 @@ namespace IDE
|
|||
GetColor("Type", ref mType);
|
||||
if (!sd.Contains("RefType"))
|
||||
mRefType = mType;
|
||||
if (!sd.Contains("Interface"))
|
||||
mInterface = mType;
|
||||
}
|
||||
GetColor("RefType", ref mRefType);
|
||||
GetColor("Interface", ref mInterface);
|
||||
GetColor("Namespace", ref mNamespace);
|
||||
GetColor("DisassemblyText", ref mDisassemblyText);
|
||||
GetColor("DisassemblyFileName", ref mDisassemblyFileName);
|
||||
|
@ -337,6 +341,7 @@ namespace IDE
|
|||
SourceEditWidgetContent.sTextColors[(.)SourceElementType.Method] = mMethod;
|
||||
SourceEditWidgetContent.sTextColors[(.)SourceElementType.Type] = mType;
|
||||
SourceEditWidgetContent.sTextColors[(.)SourceElementType.RefType] = mRefType;
|
||||
SourceEditWidgetContent.sTextColors[(.)SourceElementType.Interface] = mInterface;
|
||||
SourceEditWidgetContent.sTextColors[(.)SourceElementType.Namespace] = mNamespace;
|
||||
SourceEditWidgetContent.sTextColors[(.)SourceElementType.Disassembly_Text] = mDisassemblyText;
|
||||
SourceEditWidgetContent.sTextColors[(.)SourceElementType.Disassembly_FileName] = mDisassemblyFileName;
|
||||
|
|
|
@ -203,6 +203,7 @@ namespace IDE.ui
|
|||
0xFFA6E22A, // Method
|
||||
0xFF66D9EF, // Type
|
||||
0xFF66D9EF, // RefType
|
||||
0xFF66D9EF, // Interface
|
||||
0xFF7BEEB7, // Namespace
|
||||
|
||||
0xFFB0B0B0, // Disassembly_Text
|
||||
|
|
|
@ -31,6 +31,7 @@ namespace IDE.ui
|
|||
Method,
|
||||
Type,
|
||||
RefType,
|
||||
Interface,
|
||||
Namespace,
|
||||
|
||||
Disassembly_Text,
|
||||
|
|
|
@ -6712,8 +6712,8 @@ BfType* BfModule::ResolveTypeResult(BfTypeReference* typeRef, BfType* resolvedTy
|
|||
|
||||
while (auto qualifiedTypeRef = BfNodeDynCast<BfQualifiedTypeReference>(checkTypeRef))
|
||||
{
|
||||
if ((mCompiler->mResolvePassData->mSourceClassifier != NULL) && (resolvedTypeRef->IsObject()))
|
||||
mCompiler->mResolvePassData->mSourceClassifier->SetElementType(qualifiedTypeRef->mRight, BfSourceElementType_RefType);
|
||||
if ((mCompiler->mResolvePassData->mSourceClassifier != NULL) && (resolvedTypeRef->IsObjectOrInterface()))
|
||||
mCompiler->mResolvePassData->mSourceClassifier->SetElementType(qualifiedTypeRef->mRight, resolvedTypeRef->IsInterface() ? BfSourceElementType_Interface : BfSourceElementType_RefType);
|
||||
|
||||
StringView leftString = qualifiedTypeRef->mLeft->ToStringView();
|
||||
BfSizedAtomComposite leftComposite;
|
||||
|
@ -6745,16 +6745,16 @@ BfType* BfModule::ResolveTypeResult(BfTypeReference* typeRef, BfType* resolvedTy
|
|||
auto checkNameNode = namedTypeRef->mNameNode;
|
||||
bool setType = false;
|
||||
|
||||
if ((mCompiler->mResolvePassData->mSourceClassifier != NULL) && (resolvedTypeRef->IsObject()))
|
||||
if ((mCompiler->mResolvePassData->mSourceClassifier != NULL) && (resolvedTypeRef->IsObjectOrInterface()))
|
||||
{
|
||||
if (auto qualifiedNameNode = BfNodeDynCast<BfQualifiedNameNode>(checkNameNode))
|
||||
{
|
||||
mCompiler->mResolvePassData->mSourceClassifier->SetElementType(qualifiedNameNode->mRight, BfSourceElementType_RefType);
|
||||
mCompiler->mResolvePassData->mSourceClassifier->SetElementType(qualifiedNameNode->mRight, resolvedTypeRef->IsInterface() ? BfSourceElementType_Interface : BfSourceElementType_RefType);
|
||||
}
|
||||
else
|
||||
{
|
||||
setType = true;
|
||||
mCompiler->mResolvePassData->mSourceClassifier->SetElementType(checkNameNode, BfSourceElementType_RefType);
|
||||
mCompiler->mResolvePassData->mSourceClassifier->SetElementType(checkNameNode, resolvedTypeRef->IsInterface() ? BfSourceElementType_Interface : BfSourceElementType_RefType);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ enum BfSourceElementType
|
|||
BfSourceElementType_Method,
|
||||
BfSourceElementType_Type,
|
||||
BfSourceElementType_RefType,
|
||||
BfSourceElementType_Interface,
|
||||
BfSourceElementType_Namespace
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue