public PerformanceAnalysisDisableByCommentQuickFix(UnityPerformanceInvocationWarning performanceHighlighting) { var range = performanceHighlighting.CalculateRange(); var document = range.Document; var solution = document.TryGetSolution(); if (solution == null) { return; } var psiSourceFile = document.GetPsiSourceFile(solution); var file = psiSourceFile?.GetTheOnlyPsiFile(CSharpLanguage.Instance); if (file == null) { return; } var node = file.FindNodeAt(range); myMethodDeclaration = node?.GetContainingNode <IMethodDeclaration>(); if (myMethodDeclaration != null) { myBulbAction = new PerformanceAnalysisDisableByCommentBulbAction(myMethodDeclaration); } }
public MoveCostlyInvocationQuickFix(UnityPerformanceInvocationWarning warning) : base(warning.InvocationExpression?.GetContainingNode <IClassDeclaration>(), warning.InvocationExpression) { }
public AddPerformanceAnalysisDisableCommentQuickFix([NotNull] UnityPerformanceInvocationWarning performanceHighlighting) : base(performanceHighlighting.InvocationExpression) { }