Exemplo n.º 1
0
        private void SetPluginVersion_CheckAvailability(CheckActionAvailabilityEventArgs ea)
        {
            // Project references DevExpress.CodeRush.PluginCore
            var References = (from AssemblyReference reference in CodeRush.Source.ActiveProject.AssemblyReferences
                              where reference.Name == "DevExpress.CodeRush.PluginCore.dll"
                              select (AssemblyReference)reference);
            if (!References.Any())
                return;

            // Project contains a class which inherits from StandardPlugin
            var PluginClasses = (from Class item in CodeRush.Source.ActiveProject.AllTypes.OfType<Class>()
                                 where item.PrimaryAncestorType.Name == "StandardPlugin"
                                 select item);
            if (!PluginClasses.Any())
                return;
        }
 private void acnCreateTestMethod_CheckAvailability(CheckActionAvailabilityEventArgs ea)
 {
     ea.Available = IsAvailable();
 }
Exemplo n.º 3
0
 private void RemoveQuotesFromString_CheckAvailability(CheckActionAvailabilityEventArgs ea)
 {
     ea.Available = CodeRush.Source.ActiveString != null;
 }
Exemplo n.º 4
0
 private void actInitials_CheckAvailability(CheckActionAvailabilityEventArgs ea)
 {
     ea.Available = true;
 }
 private void actInitials_CheckAvailability(CheckActionAvailabilityEventArgs ea)
 {
     ea.Available = true;
 }
 private void TemplateExpandWithCollapsedRegions_CheckAvailability(CheckActionAvailabilityEventArgs ea)
 {
     DevExpress.CodeRush.Core.Action Action = CodeRush.Actions.Get("TemplateExpand");
     ea.Available = Action == null ? false : Action.GetAvailability("");
 }
 private void RemoveQuotesFromString_CheckAvailability(CheckActionAvailabilityEventArgs ea)
 {
     ea.Available = CodeRush.Source.ActiveString != null;
 }