protected override Action <ITextControl> ExecutePsiTransaction(ISolution solution, IProgressIndicator progress) { var arrayLiteral = ArrayLiteralNavigator.GetByArrayElement(myLiteral); arrayLiteral?.RemoveArrayElement(myLiteral); return(null); }
public static bool IsReferencesStringLiteralValue([CanBeNull] this ITreeNode node) { if (node is IJavaScriptLiteralExpression literal && literal.IsStringLiteral()) { var file = node.GetContainingFile(); var arrayLiteral = ArrayLiteralNavigator.GetByArrayElement(literal); var initializer = ObjectPropertyInitializerNavigator.GetByValue(arrayLiteral); var expectedFile = GetByRootObjectPropertyInitializer(initializer); if (expectedFile == file && initializer?.DeclaredName == "references") { return(true); } } return(false); }