예제 #1
0
        public ErrorStripeRequestWithDescription InitialErrorStripe(IPsiSourceFile sourceFile)
        {
            var properties = sourceFile.Properties;

            return(properties.ProvidesCodeModel
                                ? ErrorStripeRequestWithDescription.StripeAndErrors
                                : ErrorStripeRequestWithDescription.CreateNoneNoCodeModel(properties));
        }
예제 #2
0
        public ErrorStripeRequestWithDescription InitialErrorStripe(IPsiSourceFile sourceFile)
        {
            if (sourceFile.PrimaryPsiLanguage.Is <ShaderLabLanguage>())
            {
                var properties = sourceFile.Properties;
                if (!properties.ShouldBuildPsi)
                {
                    return(ErrorStripeRequestWithDescription.CreateNoneNoPsi(properties));
                }
                if (!properties.ProvidesCodeModel)
                {
                    return(ErrorStripeRequestWithDescription.CreateNoneNoCodeModel(properties));
                }
                return(ErrorStripeRequestWithDescription.StripeAndErrors);
            }

            return(ErrorStripeRequestWithDescription.None("File's primary language in not ShaderLab"));
        }