1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Added type icon to code mouseovers

This commit is contained in:
Brian Fiete 2020-09-03 09:31:22 -07:00
parent 0347f997f2
commit 70c7067bb0
5 changed files with 57 additions and 16 deletions

View file

@ -2518,8 +2518,7 @@ void BfAutoComplete::CheckLocalRef(BfAstNode* identifierNode, BfLocalVariable* v
}
else
{
mResultString = ":";
mResultString += mModule->TypeToString(varDecl->mResolvedType);
SetResultStringType(varDecl->mResolvedType);
}
}
}
@ -3297,3 +3296,17 @@ void BfAutoComplete::FixitCheckNamespace(BfTypeDef* activeTypeDef, BfTypeReferen
FixitAddNamespace(typeRef, namespaceString);
}
}
void BfAutoComplete::SetResultStringType(BfType * type)
{
mResultString = ":";
mResultString += mModule->TypeToString(type);
if (type->IsObject())
mResultString += "\n:type\tclass";
else if (type->IsInterface())
mResultString += "\n:type\tinterface";
else if (type->IsPointer())
mResultString += "\n:type\tpointer";
else
mResultString += "\n:type\tvaluetype";
}

View file

@ -257,6 +257,8 @@ public:
void FixitAddMethod(BfTypeInstance* typeInst, const StringImpl& methodName, BfType* returnType, const BfTypeVector& paramTypes, bool wantStatic);
void FixitAddNamespace(BfAstNode* refNode, const StringImpl& namespacStr);
void FixitCheckNamespace(BfTypeDef* activeTypeDef, BfTypeReference* typeRef, BfTokenNode* nextDotToken);
void SetResultStringType(BfType* type);
};
NS_BF_END

View file

@ -6871,8 +6871,7 @@ BfType* BfModule::ResolveTypeResult(BfTypeReference* typeRef, BfType* resolvedTy
if ((autoComplete->mResolveType == BfResolveType_GetResultString) && (resolvedTypeRef != NULL))
{
autoComplete->mResultString = ":";
autoComplete->mResultString += TypeToString(resolvedTypeRef);
autoComplete->SetResultStringType(resolvedTypeRef);
}
}
}