protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, Tuple <ConnectionData, ConnectionData> connectionDataPair, OleMenuCommand menuCommand) { CommonHandlers.ActionBeforeQueryStatusActiveDocumentIsXmlWithRoot( applicationObject , menuCommand , out var doc , AbstractDynamicCommandXsdSchemas.SiteMapXmlRoot ); }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, OleMenuCommand menuCommand) { CommonHandlers.ActionBeforeQueryStatusActiveDocumentIsXmlWithRoot(applicationObject, menuCommand, out var doc, AbstractDynamicCommandXsdSchemas.RootSiteMap); if (doc != null) { string nameCommand = Properties.CommandNames.CodeXmlSiteMapUpdateCommand; var attribute = doc.Attribute(Intellisense.Model.IntellisenseContext.IntellisenseContextAttributeSiteMapNameUnique); if (attribute != null && !string.IsNullOrEmpty(attribute.Value)) { nameCommand = string.Format(Properties.CommandNames.CodeXmlSiteMapUpdateByNameCommandFormat1, attribute.Value); } CommonHandlers.CorrectCommandNameForConnectionName(applicationObject, menuCommand, nameCommand); } }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, ConnectionData connectionData, OleMenuCommand menuCommand) { CommonHandlers.ActionBeforeQueryStatusActiveDocumentIsXmlWithRoot(applicationObject, menuCommand, out var doc, AbstractDynamicCommandXsdSchemas.SiteMapXmlRoot); if (doc != null) { string siteMapUniqueName = "Default"; var attribute = doc.Attribute(Intellisense.Model.IntellisenseContext.IntellisenseContextAttributeSiteMapNameUnique); if (attribute != null && !string.IsNullOrEmpty(attribute.Value)) { siteMapUniqueName = attribute.Value; } menuCommand.Text = string.Format(Properties.CommandNames.CommandNameWithConnectionFormat2, siteMapUniqueName, connectionData.Name); } }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, ConnectionData connectionData, OleMenuCommand menuCommand) { CommonHandlers.ActionBeforeQueryStatusActiveDocumentIsXmlWithRoot( applicationObject , menuCommand , out var doc , AbstractDynamicCommandXsdSchemas.PluginTypeCustomWorkflowActivityInfoRoot ); if (doc != null && menuCommand.Enabled & menuCommand.Visible) { var pluginTypeName = doc.XPathSelectElements("./CustomActivityInfo/TypeName").Where(e => !string.IsNullOrEmpty(e.Value)).Select(e => e.Value).FirstOrDefault(); if (string.IsNullOrEmpty(pluginTypeName)) { menuCommand.Enabled = menuCommand.Visible = false; } } }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, ConnectionData connectionData, OleMenuCommand menuCommand) { CommonHandlers.ActionBeforeQueryStatusActiveDocumentIsXmlWithRoot(applicationObject, menuCommand, out _, AbstractDynamicCommandXsdSchemas.RootFetch); }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, OleMenuCommand menuCommand) { CommonHandlers.ActionBeforeQueryStatusActiveDocumentIsXmlWithRoot(applicationObject, menuCommand, out _, AbstractDynamicCommandXsdSchemas.RootRibbonDiffXml, AbstractDynamicCommandXsdSchemas.RootRibbonDefinitions); }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, OleMenuCommand menuCommand) { CommonHandlers.ActionBeforeQueryStatusActiveDocumentIsXmlWithRoot(applicationObject, menuCommand, out _, AbstractDynamicCommandXsdSchemas.FetchRoot); CommonHandlers.CorrectCommandNameForConnectionName(applicationObject, menuCommand, Properties.CommandNames.CodeXmlFetchXmlExecuteRequestCommand); }
protected override void CommandBeforeQueryStatus(EnvDTE80.DTE2 applicationObject, string selectedSiteMap, OleMenuCommand menuCommand) { CommonHandlers.ActionBeforeQueryStatusActiveDocumentIsXmlWithRoot(applicationObject, menuCommand, out _, AbstractDynamicCommandXsdSchemas.RootSiteMap); }