public void Execute(IDataContext context, DelegateExecute nextExecute) { // Get solution from context in which action is executed ISolution solution = context.GetData(ProjectModel.DataContext.DataConstants.SOLUTION); if (solution == null) return; // Get PsiManager for solution, from which we will obtain code elements var services = solution.GetPsiServices(); if (!services.PsiManager.AllDocumentsAreCommited) return; using (CommitCookie caches = CommitCookie.Commit(solution).WaitForCaches(this)) { if (caches.Cancelled) return; bool instanceOnly; ITypeElement typeElement = TypeInterfaceUtil.GetTypeElement(context, out instanceOnly); if (typeElement == null) { MessageBox.ShowExclamation("Cannot get type from current location", "Explore Type Interface"); return; } // Create descriptor and ask TreeModelBrowser to show it in the HierarchyResults view. // Same view, where type hierarchy is shown var descriptor = new TypeInterfaceDescriptor(typeElement, instanceOnly); var windowRegistrar = solution.GetComponent<TypeInterfaceToolWindowRegistrar>(); windowRegistrar.Show(descriptor); } }
public void Execute(IDataContext context, DelegateExecute nextExecute) { IProjectFile projectFile = GetProjectFile(context); if (projectFile == null) { return; } IPsiSourceFile sourceFile = projectFile.ToSourceFile(); if (sourceFile == null) { return; } IFile file = sourceFile.GetTheOnlyPsiFile(CSharpLanguage.Instance); if (file == null) { return; } file.GetPsiServices().Transactions.Execute("Reflow & Retag XML Documentation Comments", () => { using (WriteLockCookie.Create()) { foreach (var docCommentBlockOwner in file.Descendants <IDocCommentBlockOwner>()) { CommentReflowAndRetagAction.ReflowAndRetagCommentBlockNode(docCommentBlockOwner.GetSolution(), null, docCommentBlockOwner.DocCommentBlock); } } }); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { IProjectFile projectFile = GetProjectFile(context); if (projectFile == null) { return; } IPsiSourceFile sourceFile = projectFile.ToSourceFile(); if (sourceFile == null) { return; } IFile file = sourceFile.GetTheOnlyPsiFile(CSharpLanguage.Instance); if (file == null) { return; } file.GetPsiServices().Transactions.Execute( "Reflow XML Documentation Comments", () => { using (WriteLockCookie.Create()) file.ProcessChildren <IDocCommentBlockOwnerNode>(x => CommentReflowAction.ReFlowCommentBlockNode(x.GetSolution(), null, x.GetDocCommentBlockNode()) ); } ); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { var solution = context.GetData(ProjectModel.DataContext.DataConstants.SOLUTION); var textControl = context.GetData(TextControl.DataContext.DataConstants.TEXT_CONTROL); if (textControl != null && solution != null && myLookupWindowManager.CurrentLookup == null) { const string commandName = "Expand postfix template"; var updateCookie = myChangeUnitFactory.CreateChangeUnit(textControl, commandName); try { using (myCommandProcessor.UsingCommand(commandName)) { var template = GetTemplateFromTextControl(textControl, solution); if (template != null) { var nameRange = new TextRange(textControl.Caret.PositionValue.ToDocOffset()); // looks wrong? // invoke item completion manually template.Accept(textControl, nameRange, LookupItemInsertType.Replace, Suffix.Empty, solution, false); return; } updateCookie.Dispose(); } } catch { updateCookie.Dispose(); throw; } } nextExecute(); }
void IActionHandler.Execute(IDataContext context, DelegateExecute nextExecute) { ITextControl textControl = context.GetData(TextControl.DataContext.DataConstants.TEXT_CONTROL); if (textControl == null) { MessageBox.ShowError("Text control unavailable."); // Note: shouldn't actually get here due to Update() handling return; } // Fetch caret line number ITextControlPos caretOffset = textControl.Caret.Position.Value; var nTextControlLine = (int)caretOffset.ToTextControlLineColumn().Line; var nDocLine = (int)caretOffset.ToDocLineColumn().Line; // Note that we increment line number by one because "line number" in our API starts from zero string message; if (nTextControlLine == nDocLine) { message = string.Format("Current line number is {0:N0}.", nTextControlLine + 1); } else { message = string.Format("Current text control line number is {0:N0}.\nCurrent document line number is {1:N0}.\n\nProbably, you have some hidden regions in the text " + "editor, or Word Wrapping turned on. Hence the difference in line numbers.", nTextControlLine, nDocLine); } MessageBox.ShowInfo(message, "AddMenuItem Sample Plugin"); }
protected override void RunAction(IDataContext context, DelegateExecute nextExecute) { var lifetime = context.GetComponent <Lifetime>(); var toolWindowManager = context.GetComponent <ToolWindowManager>(); var toolWindowDescriptor = context.GetComponent <SampleToolWindowDescriptor>(); var settingsStore = context.GetComponent <SettingsStore>(); var colorThemeManager = context.GetComponent <IColorThemeManager>(); ToolWindowInstance[] instances = null; foreach (var @class in toolWindowManager.Classes.Classes) { if (@class.Descriptor.Id.ProductNeutralId == "MyToolWindow") { instances = @class.Instances; } } if (instances == null) { return; } if (instances.Length == 0) { var toolWindow = new SampleToolWindow(lifetime, toolWindowManager, toolWindowDescriptor, settingsStore, colorThemeManager); toolWindow.Show(); } else { // we have always only one instance instances[0].Show(); } }
public void Execute(IDataContext context, DelegateExecute nextExecute) { // Get solution from context in which action is executed ISolution solution = context.GetData(ProjectModel.DataContext.DataConstants.SOLUTION); if (solution == null) return; var documentManager = solution.GetComponent<DocumentManager>(); var shellLocks = solution.GetComponent<IShellLocks>(); var settingStore = solution.GetComponent<ISettingsStore>(); var mainWindow = solution.GetComponent<IMainWindow>(); // Ask user about search string FindTextSearchRequest searchRequest; using (var dialog = new EnterSearchStringDialog(settingStore.BindToContextTransient(ContextRange.Smart((lt, contexts) => context)))) { if (dialog.ShowDialog(mainWindow) != DialogResult.OK) return; // Create request, descriptor, perform search and show results searchRequest = new FindTextSearchRequest(solution, dialog.SearchString, dialog.CaseSensitive, dialog.SearchFlags, documentManager); } using (shellLocks.UsingReadLock()) { var descriptor = new FindTextDescriptor(searchRequest); descriptor.Search(); FindResultsBrowser.ShowResults(descriptor); } }
public void Execute(IDataContext context, DelegateExecute nextExecute) { ISolution solution = context.GetData(ProjectModelDataConstants.SOLUTION); IShellLocks locks = context.GetComponent <IShellLocks>(); PopupWindowContextSource popupWindowContextSource = context.GetData(UIDataConstants.PopupWindowContextSource); Debug.Assert(popupWindowContextSource != null, "popupWindowContextSource != null"); Debug.Assert(solution != null, "solution != null"); void Atomic(LifetimeDefinition lifetimeDefinition, Lifetime lifetime) { var controller = new GotoGeneratorController( lifetime, solution, locks, context, Shell.Instance.GetComponent <IMainWindowPopupWindowContext>(), false /* enableMulticore */ ); GotoByNameMenu menu = new GotoByNameMenu( context.GetComponent <GotoByNameMenuComponent>(), lifetimeDefinition, controller.Model, context.GetComponent <UIApplication>().MainWindow.TryGetActiveWindow(), solution.GetComponent <GotoByNameModelManager>().GetSearchTextData(context, controller), popupWindowContextSource.Create(lifetime) ); MakeBusyIconVisibleOnEmptyFilter(menu, controller.Model, lifetime); } Lifetimes.Define(solution.GetLifetime(), null /* id */, Atomic); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { ISolution solution = context.GetData <ISolution>(JetBrains.ProjectModel.DataContext.DataConstants.SOLUTION); if (solution == null) { return; } string extensionFilters = "NuGet packages.config|packages.config|All files (*.*)|*.*"; OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.CheckFileExists = true; openFileDialog.AddExtension = false; openFileDialog.ValidateNames = true; openFileDialog.Multiselect = false; openFileDialog.Filter = extensionFilters; bool?openFileDialogResult = openFileDialog.ShowDialog(); if ((!openFileDialogResult.GetValueOrDefault() ? 1 : (!openFileDialogResult.HasValue ? 1 : 0)) != 0) { return; } foreach (var packagesConfigFile in openFileDialog.FileNames) { var packagesConfig = new PackageReferenceFile(packagesConfigFile); var packagesToOpen = GetPackagesToOpen(packagesConfig); OpenPackageFilesInCurrentSolution(context, packagesToOpen); } }
public void Execute(IDataContext context, DelegateExecute nextExecute) { // if current controller is GoToType (second press after GoToEverything, or GoToEverything disabled) var controller = context.GetData(GotoTypeAction.GotoController); if (controller is GotoDeclaredElementController) { #if RESHARPER8 || RESHARPER81 var gotoWordAction = myActionManager.TryGetAction(GotoWordIndexAction.Id) as IExecutableAction; if (gotoWordAction != null) { gotoWordAction.Execute(context); return; } #elif RESHARPER9 var gotoWordAction = myActionManager.Defs.TryGetActionDefById(GotoWordIndexAction.Id); if (gotoWordAction != null) { var evaluatedAction = myActionManager.Handlers.Evaluate(gotoWordAction, context); if (evaluatedAction.IsAvailable) { evaluatedAction.Execute(); } return; } #endif Logger.LogError("Action {0} is not found!", GotoWordIndexAction.Id); } nextExecute(); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { var actionGroup = GetMenuActionGroup(); if (actionGroup == null) { return; } var lifetimeDefinition = Lifetimes.Define(lifetime); var options = new List <BalloonOption>(); foreach (var action in GetAvailableActions(actionGroup, context, actionManager)) { var text = GetCaption(action, context, actionManager); options.Add(new BalloonOption(text, action)); } agent.ShowBalloon(lifetimeDefinition.Lifetime, "Inspect This", string.Empty, options, new [] { "Done" }, true, balloonLifetime => { agent.BalloonOptionClicked.Advise(balloonLifetime, o => { lifetimeDefinition.Terminate(); var action = o as IActionDefWithId; threading.ExecuteOrQueue("InspectThisItem", () => action.EvaluateAndExecute(actionManager)); }); agent.ButtonClicked.Advise(balloonLifetime, _ => lifetimeDefinition.Terminate()); }); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { var injector = PlatformObsoleteStatics.Instance.GetComponent<FileInjectedLayers>(); if (injector == null) { throw new ApplicationException("Could not get FileInjectedLayers instance!"); } var file = new FileSystemPath(SettingsFilePath); var settingsLayers = PlatformObsoleteStatics.Instance.GetComponent<UserInjectedSettingsLayers>(); if (settingsLayers == null) { throw new ApplicationException("Could not get UserInjectedSettingsLayers instance!"); } var layers = settingsLayers.GetUserInjectedLayersFromHost(_globalSettings.ProductGlobalLayerId); foreach (var layer in layers) { // TODO: find out if there's an easier way to check if this is layer we want, e.g. by id settingsLayers.TurnInjectedLayerOnOff(layer.Id, layer.Name == LayerName); } if (!injector.IsLayerInjected(_globalSettings.ProductGlobalLayerId, file)) { injector.InjectLayer(_globalSettings.ProductGlobalLayerId, file); } }
public void Execute(IDataContext context, DelegateExecute nextExecute) { var solution = context.GetData(ProjectModelDataConstants.SOLUTION); if (solution == null) { return; } var workflow = new ConvertWebFormsToRazorRefactoringWorkflow( solution, nameof(ConvertWebFormsToRazorAction), context.GetComponent <RazorConverterSettingsStore>(), Shell.Instance.GetComponent <IMainWindowPopupWindowContext>()); if (!workflow.IsAvailable(context) || !workflow.Initialize(context)) { return; } using (var pi = NullProgressIndicator.Create()) { workflow.PreExecute(pi); workflow.Execute(pi); workflow.PostExecute(pi); } }
public void Execute(IDataContext context, DelegateExecute nextExecute) { ISolution solution = context.GetData <ISolution>(JetBrains.ProjectModel.DataContext.DataConstants.SOLUTION); if (solution == null) { return; } var model = new PackageSelectorViewModel(); var window = new Window { Title = "Select Package", Content = new PackageSelector(model), Width = 520, Height = 520, WindowStartupLocation = WindowStartupLocation.CenterScreen, ResizeMode = ResizeMode.NoResize }; model.CancelCommand = new SimpleCommand(window.Close); model.OpenCommand = new SimpleCommand(() => { window.Close(); if (model.SelectedPackage != null) { var packagesToOpen = GetPackagesToOpen(PackageRepositoryFactory.Default.CreateRepository(model.PackageSource.ToString()), model.SelectedPackage.Id, model.SelectedPackage.Version, model.LoadDependencies); OpenPackageFilesInCurrentSolution(context, packagesToOpen); } }); window.ShowDialog(); }
public void Execute(IDataContext context,DelegateExecute nextExecute) { ISolution solution; IAssemblyFile existingAssemblyFile = TryGetExistingAssemblyFile(context, out solution); if (existingAssemblyFile == null) return; var deobfuscator = solution.TryGetComponent<IAssemblyDeobfuscatorManager>(); if (deobfuscator == null) return; string newFileName = AskUser(existingAssemblyFile); if (newFileName == null) return; FileSystemPath newAssembly = null; Shell.Instance.GetComponent<UITaskExecutor>().FreeThreaded.ExecuteTask("Deobfuscating...", TaskCancelable.Yes, progressIndicator => { using (ReadLockCookie.Create()) newAssembly = deobfuscator.Execute(existingAssemblyFile, newFileName, progressIndicator); }); if (newAssembly != null) { if (MessageBox.ShowYesNo("Deobfuscation complete!\nWould you like to open the deobfuscated assembly?")) { AddToAssemblyExplorer(newAssembly, solution); } } }
public void Execute(IDataContext context, DelegateExecute nextExecute) { var textControl = context.GetData(DataConstants.TEXT_CONTROL); GC.KeepAlive(textControl); DateTime lastInvocation, utcNow = DateTime.UtcNow; lock (syncLock) { lastInvocation = this.lastLocateInvocation; this.lastLocateInvocation = utcNow; } const int doubleKeyPressDelay = 500; if (utcNow.Subtract(lastInvocation).TotalMilliseconds < doubleKeyPressDelay) { var locateFileAction = actionManager.TryGetAction(LocateFileAction.Id) as IExecutableAction; if (locateFileAction != null) { locateFileAction.Execute(context); return; } } if (lastUnderlyingActionUpdate) { nextExecute(); } }
public void Execute(IDataContext context, DelegateExecute nextExecute) { //textControl = context.GetData(JetBrains.TextControl.DataContext.DataConstants.TEXT_CONTROL); //GoToCodeEventHandler.InvokeGetCodeEvent += GetSourceCode; //var descriptor = DataConstantsExtensions.GetComponent<GraphCodeToolWindow>(context); //var manager = DataConstantsExtensions.GetComponent<ToolWindowManager>(context); //var lifetime = DataConstantsExtensions.GetComponent<Lifetime>(context); //var uiApplication = DataConstantsExtensions.GetComponent<UIApplication>(context); ////var registrar = new GraphCodeWindowRegistrar(lifetime, manager, descriptor, uiApplication); ////registrar.Show(); //var graphs = (new GraphLoader()).Load(); //var tabControl = new TabControl(); //var zcontrols = new List<ZoomControl>(); //foreach (var graph in graphs) //{ // var gArea = InitializeGraphArea.Initialize(graph); // var zcontrol = new ZoomControl(); // zcontrol.Content = gArea; // zcontrols.Add(zcontrol); //} //tabControl.ItemsSource = zcontrols; //Window w = new Window(); //w.Content = tabControl; //w.Show(); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { var globalSettings = context.GetComponent <GlobalSettings>(); if (globalSettings.TutorialWindowManager != null && globalSettings.TutorialWindowManager.WindowsExist()) { globalSettings.TutorialWindowManager.ShowHomeWindow(); return; } var solutionStateTracker = context.GetComponent <SolutionStateTracker>(); var shellLocks = context.GetComponent <IShellLocks>(); var environment = context.GetComponent <IUIApplication>(); var actionManager = context.GetComponent <IActionManager>(); var toolWindowManager = context.GetComponent <ToolWindowManager>(); var toolWindowDescriptor = context.GetComponent <TutorialWindowDescriptor>(); var windowsHookManager = context.GetComponent <IWindowsHookManager>(); var colorThemeManager = context.GetComponent <IColorThemeManager>(); var threading = context.GetComponent <IThreading>(); globalSettings.TutorialWindowManager = new TutorialWindowManager(globalSettings.Lifetime, solutionStateTracker, globalSettings, shellLocks, toolWindowManager, toolWindowDescriptor, environment, actionManager, windowsHookManager, colorThemeManager, threading); globalSettings.TutorialWindowManager.ShowHomeWindow(); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { var outputFolder = GeneralHelpers.GetOutputFolder(context); if (outputFolder == null) return; var what = GenerateContent(context, outputFolder); GeneralHelpers.ShowSuccessMessage(what, outputFolder); }
public async void Execute(IDataContext context, DelegateExecute nextExecute) { var solution = context.GetData(JetBrains.ProjectModel.DataContext.ProjectModelDataConstants.SOLUTION); var solutionFileName = solution?.SolutionFilePath.FullPath; var notifications = context.GetComponent <UserNotifications>(); try{ Notify(notifications, nameof(XpandModelEditor.ExtractMEAsync)); await XpandModelEditor.ExtractMEAsync(); Notify(notifications, nameof(XpandModelEditor.StartMEAsync)); await XpandModelEditor.StartMEAsync(); } catch (Exception e) { Log.Root.Log(LoggingLevel.ERROR, e.ToString()); Notify(notifications, e.ToString()); throw; } if (!File.Exists(solutionFileName)) { MessageBox.ShowInfo($"Canot find solution file {solutionFileName}"); } Notify(notifications, nameof(XpandModelEditor.WriteSettings)); XpandModelEditor.WriteSettings(solutionFileName); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.Show( "Custom serialization generator\nIncoBoggart.\n\n", "Generates custom binary serialization methods.", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.Show( "ReSharperPlus\nSergey Rybalkin\n\nAdds comment reflowing and exception analysis functionality", "About ReSharperPlus", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.Show( "2\nAcme Corp.\n\n", "About 2", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.Show( "FastSettingsSwitch\nPeter Nelson (http://peterdn.com)\n\nSwitch between settings profiles with one click", "About FastSettingsSwitch", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.Show( "Simple.Testing\nSimple.Testing\n\nUnit test provider for the Simple.Testing Framework", "About Simple.Testing", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.Show( "PseudoCQRS Reshaper Helpers\nLiquidThinkin\n\nResharper shortcuts to find CommandHandlers, ViewModelProviders and other stuff", "About PseudoCQRS Reshaper Helpers", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.Show( "Mr. Eric\nAnton Sizikov\n\nCreate and initialize private auto-property action.", "About Mr. Eric", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.Show( "ReSharper.AbstractAnalysis\nJetBrains Lab\n\nAbstract analysis for string-embedded languages.", "About ReSharper.AbstractAnalysis", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.Show( "AgentRalphPlugin\nJosh Buedel\n\nA code clone tool", "About AgentRalphPlugin", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.Show( "Interop Assistance\nKevin Jones\n\nProvides assistance for Interop", "About Interop Assistance", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.Show( "Establishment Methods Must Be Sealed\nTesteroids\n\nProvides a quick fix to enforce sealing of context establishment methods", "About Establishment Methods Must Be Sealed", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.Show( "Unity.TypedFactories.ReSharperFindUsages\nTesteroids\n\nHelps navigating to the instantiation of classes created by Unity.TypedFactories", "About Unity.TypedFactories.ReSharperFindUsages", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public override void Execute(IDataContext context, DelegateExecute nextExecute) { var solution = context.GetData(JetBrains.ProjectModel.DataContext.ProjectModelDataConstants.SOLUTION); MessageBox.ShowInfo(solution?.SolutionFile != null ? $"{solution.SolutionFile?.Name} solution is opened" : "No solution is opened"); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.Show( "Repro Plugin\nN/A\n\nTest", "About Repro Plugin", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.Show( "MemberName\nAndreas Vilinski\n\nProvides an additional annotation attribute - [MemberName]", "About MemberName", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { using (ReadLockCookie.Create()) { PsiFiles.CommitAllDocuments(); ShowLocations(Tracker.EditLocations, Tracker.CurrentEdit, "Recent Edits", true); } }
public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.Show( "Generate Extension Method\nSam Holder\n\nAdds a quick fix which allows a new extension method to be generated", "About Generate Extension Method", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.Show( "Joar Øyen's extensions for ReSharper\nJoar Øyen\n\nContains Live Templates and macros for writing test methods", "About Joar Øyen's extensions for ReSharper", MessageBoxButtons.OK, MessageBoxIcon.Information); }
/// <summary> /// Executes action. Called after Update, that set ActionPresentation.Enabled to true. /// </summary> /// <param name="context">DataContext</param> /// <param name="nextExecute">delegate to call</param> public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.Show( "Sitecore Rocks Resharper\nSitecore A/S\n\nIntegrates Sitecore Rocks deep into the Visual Studio Text Editor.", "About Sitecore Rocks Resharper", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.Show( "The NTriples Language\nStephan Burguchev\n\nThe NTriples Language ReSharper support", "About The NTriples Language", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.Show( "MigrationNumberTracker.ResharperPlugin\nSPCPH\\ale\n\nMigrationNumberTracker.ResharperPlugin", "About MigrationNumberTracker.ResharperPlugin", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { // Just let the "real" handler do its stuff. We either won't be called // (because we returned false to Update) or there is more than one layer // being removed. Since we do nothing in response to a delete request, // it doesn't matter nextExecute(); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.Show( "Reactive Extensions Plugin for Resharper\nOllie Riches\n\nA Resharper plug-in to help use the Reactive Extension libraries", "About Reactive Extensions Plugin for Resharper", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.Show( "Private WatchDog\nTesteroids\n\nComplains whenever a private field or property is being accessed in a nested Context test class", "About Private WatchDog", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.Show( "resharper-knockoutjs\nNuno Costa\n\nresharper-knockoutjs", "About resharper-knockoutjs", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.Show( "SharpMocker\nTesteroids\n\nDeclares and instanciates mocks to pass to a constructor.", "About SharpMocker", MessageBoxButtons.OK, MessageBoxIcon.Information); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.ShowMessageBox( "Localization Helper\nYuval\n\nHelps Localize", "About Localization Helper", MbButton.MB_OK, MbIcon.MB_ICONASTERISK); }
void IExecutableAction.Execute(IDataContext context, DelegateExecute nextExecute) { var solution = context.GetData(ProjectModelDataConstants.SOLUTION); if (solution == null || !solution.GetPsiServices().Caches.WaitForCaches("CodeCleanupActionBase.Execute")) { return; } var collector = CodeCleanupFilesCollector.TryCreate(context).NotNull("collector != null"); context.GetComponent <IShellLocks>().ExecuteOrQueueReadLock( "CodeCleanupActionBase.Execute", () => { if (!solution.GetPsiServices().Caches.WaitForCaches("CodeCleanupActionBase.Execute")) { return; } var actionScope = collector.GetActionScope(); var profile = this.GetProfile(collector); if (profile == null) { return; } if (this.SaveProfileAsRecentlyUsed) { solution.GetComponent <CodeCleanupSettingsComponent>().SetRecentlyUsedProfileName( solution.GetComponent <ISettingsStore>().BindToContextTransient(ContextRange.Smart(collector.GetContext())), profile.Name); } switch (actionScope) { case ActionScope.MultipleFiles: case ActionScope.Solution: case ActionScope.Directory: var filteredProvider = this.TryGetFilteredProvider(collector); if (filteredProvider != null) { CodeCleanupRunner.CleanupFiles(filteredProvider, profile); } return; case ActionScope.None: case ActionScope.Selection: case ActionScope.File: return; default: return; } }); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { MessageBox.ShowMessageBox( "Localization Helper\nYuval\nHelps Localize by marking strings " + "that are not flagged with the comment // Not L10N or localized in a resx file.", "About Localization Helper", MbButton.MB_OK, MbIcon.MB_ICONASTERISK); }
/// <summary> /// Executes action. Called after Update, that set ActionPresentation.Enabled to true. /// </summary> /// <param name="context">DataContext</param> /// <param name="nextExecute">delegate to call</param> void IActionHandler.Execute(IDataContext context, DelegateExecute nextExecute) { ISolution solution = context.GetData(DataConstants.SOLUTION); if (solution == null) { return; } Execute(solution, context); }
public override void Execute(IDataContext context, DelegateExecute nextExecute) { var lifetime = context.GetComponent <Lifetime>(); var settingsStore = context.GetComponent <SettingsStore>(); LogManager.Self.Log("ActionPenWebAnalyze Execute"); CppParseManager.DoAnalytics(lifetime); }
public void Execute(IDataContext context, DelegateExecute nextExecute) { var solution = context.GetData(ProjectModel.DataContext.DataConstants.SOLUTION); if (solution == null) { return; } var textControl = context.GetData(TextControl.DataContext.DataConstants.TEXT_CONTROL); if (textControl == null) { return; } if (myLookupWindowManager.CurrentLookup != null) { return; } const string commandName = "Expanding postfix template with [Tab]"; var updateCookie = myChangeUnitFactory.CreateChangeUnit(textControl, commandName); try { using (myCommandProcessor.UsingCommand(commandName)) { var postfixItem = GetTemplateFromTextControl(solution, textControl); if (postfixItem != null) { TipsManager.Instance.FeatureIsUsed( "Plugin.ControlFlow.PostfixTemplates.<tab>", textControl.Document, solution); var nameLength = postfixItem.Identity.Length; var offset = textControl.Caret.Offset() - nameLength; postfixItem.Accept( textControl, TextRange.FromLength(offset, nameLength), LookupItemInsertType.Insert, Suffix.Empty, solution, keepCaretStill: false); return; } updateCookie.Dispose(); } } catch { updateCookie.Dispose(); throw; } nextExecute(); }
public void Execute(IDataContext context, [NotNull] DelegateExecute nextExecute) { _typesFromTextControlService = context.GetComponent <ITypesFromTextControlService>().NotNull(); _solution = context.GetData(ProjectModelDataConstants.SOLUTION).NotNull(); _textControl = context.GetData(TextControlDataConstants.TEXT_CONTROL).NotNull(); _linkedTypesService = _solution.GetComponent <LinkedTypesService>(); _popupWindowContextSource = context.GetData(UIDataConstants.PopupWindowContextSource); //_executionGroupingEvent.FireIncoming(); ExecuteProlonged(); }