public int GetMarkerCommandInfo(IVsTextMarker pMarker, int iItem, string[] pbstrText, uint[] pcmdf) { //this is passed in as null first returning S_OK tells vs the marker supports this command if (pcmdf == null && pcmdf == null) { return(VSConstants.S_OK); } // ReSharper disable BitwiseOperatorOnEnumWihtoutFlags const uint menuItemFlags = (uint)( OLECMDF.OLECMDF_SUPPORTED | OLECMDF.OLECMDF_ENABLED); // ReSharper restore BitwiseOperatorOnEnumWihtoutFlags pcmdf[0] = menuItemFlags; switch (iItem) { case 0: pbstrText[0] = Resources.MarkerRun; break; case 1: pbstrText[0] = Resources.MarkerDebug; break; case (int)MarkerCommandValues2.mcvRightClickCommand: break; default: pcmdf[0] = 0; return(VSConstants.S_FALSE); } return(VSConstants.S_OK); }
public int ExecMarkerCommand(IVsTextMarker pMarker, int iItem) { switch (iItem) { case 0: launchBrowser(); return(VSConstants.S_OK); case (int)MarkerCommandValues.mcvBodyDoubleClickCommand: if (MarginMarker != null) { launchBrowser(); } return(VSConstants.S_OK); case (int)MarkerCommandValues.mcvGlyphSingleClickCommand: if (BackgroundMarker != null) { launchBrowser(); } return(VSConstants.S_FALSE); default: return(VSConstants.S_FALSE); } }
public int ExecMarkerCommand(IVsTextMarker pMarker, int iItem) { var tester = new GTestRunner(); TestList testList = TestPackage.GetTestList(); tester.OnTestsUpdated += testList.UpdateTestResult; switch (iItem) { case (int)MarkerCommandValues2.mcvRightClickCommand: IVsUIShell uiShell = (IVsUIShell)TestPackage.GetGlobalService(typeof(SVsUIShell)); Guid context = GuidList.GUIDTestMarkerCmdSet; POINTS[] menuPos = new POINTS[1]; menuPos[0].x = (short)Cursor.Position.X; menuPos[0].y = (short)Cursor.Position.Y; var hr = uiShell.ShowContextMenu(0, ref context, (int)PkgCmdIDList.ContextMenu, menuPos, this as IOleCommandTarget); if (hr != VSConstants.S_OK) { return(VSConstants.S_FALSE); } break; case (int)PkgCmdIDList.cmdRunTest: tester.RunTests(_projectMarkerBelongsTo, _testName, false); break; case (int)PkgCmdIDList.cmdDebugTest: tester.RunTests(_projectMarkerBelongsTo, _testName, true); break; default: return(VSConstants.S_FALSE); } return(VSConstants.S_OK); }
public virtual void GetTipText(IVsTextMarker marker, string[] tipText) { if (tipText != null) { tipText[0] = this.tipText; } }
public int GetMarkerCommandInfo(IVsTextMarker pMarker, int iItem, string[] pbstrText, uint[] pcmdf) { if (commands != null) { try { const OLECMDF OLECMDF_ENABLE = (OLECMDF.OLECMDF_SUPPORTED | OLECMDF.OLECMDF_ENABLED); if (iItem == (int)MarkerCommandValues.mcvBodyDoubleClickCommand && pcmdf != null) { pcmdf[0] = (uint)OLECMDF_ENABLE; } else if (iItem >= (int)MarkerCommandValues.mcvFirstContextMenuCommand && iItem <= (int)MarkerCommandValues.mcvLastContextMenuCommand && pbstrText != null && pcmdf != null) { int item = iItem - (int)MarkerCommandValues.mcvFirstContextMenuCommand; ITaskMenuItem[] menuItems = commands.GetMenuItems(null); if (menuItems != null && item < menuItems.Length) { ITaskMenuItem menuItem = menuItems[item]; if (menuItem != null && menuItem.Kind != TaskMenuKind.Submenu) { pbstrText[0] = menuItem.Caption; if (commands.IsEnabled(menuItems[item])) { pcmdf[0] = (uint)OLECMDF_ENABLE; if (menuItem.Kind == TaskMenuKind.Checkable) { if (commands.IsChecked(menuItems[item])) { pcmdf[0] |= (uint)(OLECMDF_ENABLE | OLECMDF.OLECMDF_LATCHED); } else { pcmdf[0] |= (uint)(OLECMDF_ENABLE | OLECMDF.OLECMDF_NINCHED); } } } else { pcmdf[0] = (uint)OLECMDF.OLECMDF_SUPPORTED; } } } } return(0); } catch { // communication to msbuild task may be broken, need to catch all errors return(VSConstants.E_NOTIMPL); } } else { return(VSConstants.E_NOTIMPL); } }
public int GetMarkerCommandInfo(IVsTextMarker pMarker, int iItem, string[] pbstrText, uint[] pcmdf) { // For each command we add we have to specify that we support it. // Furthermore it should always be enabled. const uint menuItemFlags = (uint)(OLECMDF.OLECMDF_SUPPORTED | OLECMDF.OLECMDF_ENABLED); if (pcmdf == null) { return(VSConstants.S_FALSE); } switch (iItem) { case 0: if (pbstrText != null) { pbstrText[0] = "Open Issue in the Browser"; pcmdf[0] = menuItemFlags; return(VSConstants.S_OK); } return(VSConstants.S_FALSE); case (int)MarkerCommandValues.mcvBodyDoubleClickCommand: pcmdf[0] = menuItemFlags; return((MarginMarker != null) ? VSConstants.S_OK : VSConstants.S_FALSE); case (int)MarkerCommandValues.mcvGlyphSingleClickCommand: pcmdf[0] = menuItemFlags; return((BackgroundMarker != null) ? VSConstants.S_OK : VSConstants.S_FALSE); default: return(VSConstants.S_FALSE); } }
public int GetMarkerCommandInfo(IVsTextMarker pMarker, int iItem, string[] pbstrText, uint[] pcmdf) { // For each command we add we have to specify that we support it. // Furthermore it should always be enabled. const uint menuItemFlags = (uint)( OLECMDF.OLECMDF_SUPPORTED | OLECMDF.OLECMDF_ENABLED); if (pbstrText == null || pcmdf == null) { return(VSConstants.S_OK); } switch (iItem) { case 0: pbstrText[0] = Res.CommandFindClones; pcmdf[0] = menuItemFlags; return(VSConstants.S_OK); case 1: pbstrText[0] = Res.CommandShowCloneIntersections; pcmdf[0] = menuItemFlags; return(VSConstants.S_OK); default: return(VSConstants.S_FALSE); } }
int IVsTextMarkerClient.GetTipText(IVsTextMarker pMarker, string[] tipText) { //if (Text != null && Text.Length > 0) tipText[0] = "test"; //Text; return(VSConstants.S_OK); }
public virtual int GetTipText(IVsTextMarker marker, string[] tipText) { if (tipText != null) { tipText[0] = this.tipText; } return(0); }
public int GetTipText(IVsTextMarker pMarker, string[] pbstrText) { if (pbstrText != null) { pbstrText[0] = ConvertToString(node); } return(0); }
public virtual void GetMarkerCommandInfo(IVsTextMarker marker, int item, string[] text, out uint commandFlags) { commandFlags = 0; if (text != null) { text[0] = this.tipText; } }
public virtual int GetTipText(IVsTextMarker marker, string[] tipText) { if (this.Text != null && this.Text.Length > 0) { tipText[0] = this.Text; } return(NativeMethods.S_OK); }
public int OnAfterMarkerChange(IVsTextMarker pMarker) { if (MarkerChanged != null) { this.span = this.CurrentSpan; MarkerChanged(this, new EventArgs()); } return(0); }
int IVsTextMarkerClient.GetTipText(IVsTextMarker pMarker, string[] tipText) { if (Text != null && Text.Length > 0) { tipText[0] = Text; } return(VSConstants.S_OK); }
public virtual int GetMarkerCommandInfo(IVsTextMarker marker, int item, string[] text, uint[] commandFlags) { if (text != null) { text[0] = this.tipText; commandFlags[0] = 0; } return(0); }
public int GetTipText(IVsTextMarker pMarker, string[] pbstrText) { if (pbstrText != null && pbstrText.Length > 0) { pbstrText[0] = tipText; } ExecOnHover(); return(0); }
public override int GetTipText(IVsTextMarker pMarker, string[] pbstrText) { if (issueKey != null) { pbstrText[0] = "Double click to try open " + issueKey + "\non the currently selected server,\nRight click for more options"; } return(VSConstants.S_OK); }
int IVsTextMarkerClient.GetTipText(IVsTextMarker pMarker, string[] pbstrText) { var tasks = this.Tasks; var known = tasks.Count(x => x.ErrorCategory == TaskErrorCategory.Message); var affecting = tasks.Count(x => x.ErrorCategory == TaskErrorCategory.Error); pbstrText[0] = string.Format(Resources.Culture, Resources.MarkerTipText_VulnarebilitiesFound, this.PackageReference, known, affecting); return(VSConstants.S_OK); }
int IVsTextMarkerClient.OnAfterMarkerChange(IVsTextMarker pMarker) { //var owner = Owner; //Owner = null; var span = Span; Line = span.iStartLine; Column = span.iStartIndex; //Owner = owner; return(VSConstants.S_OK); }
int IVsTextMarkerClient.GetMarkerCommandInfo(IVsTextMarker pMarker, int iItem, string[] text, uint[] commandFlags) { // You can use this code to implement menu for compiler message. //if (commandFlags != null && commandFlags.Length > 0) // commandFlags[0] = 0; //if (text != null && text.Length > 0) // pMarker.GetTipText(text); // //return VSConstants.S_OK; return(VSConstants.E_NOTIMPL); }
int IVsTextMarkerClient.GetMarkerCommandInfo(IVsTextMarker pMarker, int iItem, string[] text, uint[] commandFlags) { // Returning S_OK results in error message appearing in editor's // context menu when you right click over the error message. if (commandFlags != null && commandFlags.Length > 0) commandFlags[0] = 0; if (text != null && text.Length > 0) text[0] = "aaaaaaaaaa"; //return VSConstants.E_NOTIMPL; return VSConstants.S_OK; }
public int ExecMarkerCommand(IVsTextMarker pMarker, int iItem) { if (iItem == (int)MarkerCommandValues.mcvBodyDoubleClickCommand) { ExecOnDoubleClick(); } else if (iItem >= (int)MarkerCommandValues.mcvFirstContextMenuCommand && iItem <= (int)MarkerCommandValues.mcvLastContextMenuCommand) { ExecCommand(iItem - (int)MarkerCommandValues.mcvFirstContextMenuCommand); } return(0); }
public int GetTipText(IVsTextMarker pMarker, string[] pbstrText) { if (MarginMarker != null) { pbstrText[0] = "Double click to navigate to PL-1357,\nRight click for more options"; } else if (BackgroundMarker != null) { pbstrText[0] = "Double click to navigate to PL-1357"; } return(VSConstants.S_OK); }
public int OnAfterMarkerChange(IVsTextMarker pMarker) { if (marker != null) { TextSpan[] tspan = new TextSpan[1]; int hr = marker.GetCurrentSpan(tspan); if (tspan != null && hr == 0) { location.TextSpan = tspan[0]; //Refresh(); } } return(0); }
public virtual int GetMarkerCommandInfo(IVsTextMarker marker, int item, string[] text, uint[] commandFlags) { // Returning S_OK results in error message appearing in editor's // context menu when you right click over the error message. if (commandFlags != null && commandFlags.Length > 0) { commandFlags[0] = 0; } if (text != null && text.Length > 0) { text[0] = null; } return(NativeMethods.E_NOTIMPL); }
public int ExecMarkerCommand(IVsTextMarker pMarker, int iItem) { switch (iItem) { case 0: CloneDetectiveManager.FindClones(CloneDetectiveManager.GetCloneClass(_marker)); return(VSConstants.S_OK); case 1: CloneDetectiveManager.ShowCloneIntersections(); return(VSConstants.S_OK); default: return(VSConstants.S_FALSE); } }
public override int GetMarkerCommandInfo(IVsTextMarker pMarker, int iItem, string[] pbstrText, uint[] pcmdf) { const uint menuItemFlags = (uint)(OLECMDF.OLECMDF_SUPPORTED | OLECMDF.OLECMDF_ENABLED); if (pcmdf == null) { return(VSConstants.S_OK); } pcmdf[0] = menuItemFlags; if (iItem == (int)MarkerCommandValues2.mcvRightClickCommand) { return(VSConstants.S_OK); } return(VSConstants.S_FALSE); }
int IVsTextMarkerClient.GetMarkerCommandInfo(IVsTextMarker pMarker, int iItem, string[] text, uint[] commandFlags) { // Returning S_OK results in error message appearing in editor's // context menu when you right click over the error message. if (commandFlags != null && commandFlags.Length > 0) { commandFlags[0] = 0; } if (text != null && text.Length > 0) { text[0] = "aaaaaaaaaa"; } //return VSConstants.E_NOTIMPL; return(VSConstants.S_OK); }
public override int OnAfterMarkerChange(IVsTextMarker marker) { var val = base.OnAfterMarkerChange(marker); var textLineMarker = TextLineMarker; var span = Span; if (textLineMarker != null) { var spanArray = new TextSpan[1]; NativeMethods.ThrowOnFailure(textLineMarker.GetCurrentSpan(spanArray)); span = spanArray[0]; } Line = span.iStartLine; Column = span.iStartIndex; return val; }
public int OnAfterMarkerChange(IVsTextMarker pMarker) { if (marker != null) { // Common.Trace("Task: OnAfterMarkerChange: " + location); TextSpan[] tspan = new TextSpan[1]; int hr = marker.GetCurrentSpan(tspan); if (tspan != null && hr == 0) { location.TextSpan = tspan[0]; if (taskManager != null) { taskManager.RefreshDelayed(); } } } return(0); }
public override int OnAfterMarkerChange(IVsTextMarker marker) { var val = base.OnAfterMarkerChange(marker); var textLineMarker = TextLineMarker; var span = Span; if (textLineMarker != null) { var spanArray = new TextSpan[1]; NativeMethods.ThrowOnFailure(textLineMarker.GetCurrentSpan(spanArray)); span = spanArray[0]; } Line = span.iStartLine; Column = span.iStartIndex; return(val); }
public override int GetMarkerCommandInfo(IVsTextMarker pMarker, int iItem, string[] pbstrText, uint[] pcmdf) { // For each command we add we have to specify that we support it. // Furthermore it should always be enabled. // ReSharper disable BitwiseOperatorOnEnumWihtoutFlags const uint menuItemFlags = (uint)(OLECMDF.OLECMDF_SUPPORTED | OLECMDF.OLECMDF_ENABLED); // ReSharper restore BitwiseOperatorOnEnumWihtoutFlags if (pcmdf == null) { return(VSConstants.S_OK); } switch (iItem) { case 0: if (issueKey != null && pbstrText != null) { pbstrText[0] = "Open Issue " + issueKey + " in IDE"; pcmdf[0] = menuItemFlags; return(VSConstants.S_OK); } return(VSConstants.S_FALSE); case 1: if (issueKey != null && pbstrText != null) { pbstrText[0] = "View Issue " + issueKey + " in the Browser"; pcmdf[0] = menuItemFlags; return(VSConstants.S_OK); } return(VSConstants.S_FALSE); case (int)MarkerCommandValues.mcvBodyDoubleClickCommand: pcmdf[0] = menuItemFlags; return(VSConstants.S_OK); default: pcmdf[0] = 0; return(VSConstants.S_FALSE); } }
public int OnAfterMarkerChange(IVsTextMarker pMarker) { if (MarkerChanged != null) { this.span = this.CurrentSpan; MarkerChanged(this, new EventArgs()); } return 0; }
public int GetTipText(IVsTextMarker pMarker, string[] pbstrText) { if (pbstrText != null) { pbstrText[0] = ConvertToString(node); } return 0; }
public int GetMarkerCommandInfo(IVsTextMarker pMarker, int iItem, string[] pbstrText, uint[] pcmdf) { return 0; }
public int ExecMarkerCommand(IVsTextMarker pMarker, int iItem) { if (iItem == (int)MarkerCommandValues.mcvBodyDoubleClickCommand) { ExecOnDoubleClick(); } else if (iItem >= (int)MarkerCommandValues.mcvFirstContextMenuCommand && iItem <= (int)MarkerCommandValues.mcvLastContextMenuCommand) { ExecCommand(iItem - (int)MarkerCommandValues.mcvFirstContextMenuCommand); } return 0; }
// // Summary: // Returns the tip text for the text marker when the mouse hovers over the marker. // // Parameters: // pMarker: // [in] Pointer to the Microsoft.VisualStudio.TextManager.Interop.IVsTextMarker // interface for the marker. // // pbstrText: // [out] Tip text associated with the marker. // // Returns: // If the method succeeds, it returns Microsoft.VisualStudio.VSConstants.S_OK. // If it fails, it returns an error code. public int GetTipText(IVsTextMarker pMarker, string[] pbstrText) { // Not implemented return VSConstants.E_NOTIMPL; }
int IVsTextMarkerClient.GetTipText(IVsTextMarker pMarker, string[] tipText) { //if (Text != null && Text.Length > 0) tipText[0] = "test";//Text; return VSConstants.S_OK; }
int IVsTextMarkerClient.ExecMarkerCommand(IVsTextMarker pMarker, int iItem) { return VSConstants.S_OK; }
public virtual void OnAfterMarkerChange(IVsTextMarker marker) { //TRACE("OnAfterMarkerChange" ); return; }
public virtual int GetTipText(IVsTextMarker marker, string[] tipText){ if (tipText != null) tipText[0] = this.tipText; return 0; }
public int OnAfterMarkerChange(IVsTextMarker pMarker) { if (marker != null) { TextSpan[] tspan = new TextSpan[1]; int hr = marker.GetCurrentSpan(tspan); if (tspan != null && hr == 0) { location.TextSpan = tspan[0]; //Refresh(); } } return 0; }
int IVsTextMarkerClient.OnAfterMarkerChange(IVsTextMarker pMarker) { //var owner = Owner; //Owner = null; var span = Span; Line = span.iStartLine; Column = span.iStartIndex; //Owner = owner; return VSConstants.S_OK; }
int IVsTextMarkerClient.GetMarkerCommandInfo(IVsTextMarker pMarker, int iItem, string[] text, uint[] commandFlags) { // You can use this code to implement menu for compiler message. //if (commandFlags != null && commandFlags.Length > 0) // commandFlags[0] = 0; //if (text != null && text.Length > 0) // pMarker.GetTipText(text); // //return VSConstants.S_OK; return VSConstants.E_NOTIMPL; }
// // Summary: // Queries the marker for the command information. // // Parameters: // pMarker: // [in] Pointer to the Microsoft.VisualStudio.TextManager.Interop.IVsTextMarker // interface for the marker. // // iItem: // [in] ] Command selected by the user from the context menu. For a list of // iItem values, see Microsoft.VisualStudio.TextManager.Interop.MarkerCommandValues. // // pbstrText: // [out] Text of the marker command in the context menu. // // pcmdf: // [out] Pointer to command flags. // // Returns: // If the method succeeds, it returns Microsoft.VisualStudio.VSConstants.S_OK. // If it fails, it returns an error code. public int GetMarkerCommandInfo(IVsTextMarker pMarker, int iItem, string[] pbstrText, uint[] pcmdf) { // Not implemented return VSConstants.E_NOTIMPL; }
// // Summary: // Signals that the marker position has changed. // // Parameters: // pMarker: // [in] Pointer to the Microsoft.VisualStudio.TextManager.Interop.IVsTextMarker // interface for the marker that was changed. // // Returns: // If the method succeeds, it returns Microsoft.VisualStudio.VSConstants.S_OK. // If it fails, it returns an error code. public int OnAfterMarkerChange(IVsTextMarker pMarker) { // Not implemented return VSConstants.E_NOTIMPL; }
int IVsTextMarkerClient.OnAfterMarkerChange(IVsTextMarker pMarker) { return VSConstants.S_OK; }
public int GetTipText(IVsTextMarker pMarker, string[] pbstrText) { if (pbstrText != null && pbstrText.Length > 0) { pbstrText[0] = tipText; } ExecOnHover(); return 0; }
// Summary: // Executes a command on a specific marker within the text buffer. // // Parameters: // pMarker: // [in] Pointer to the Microsoft.VisualStudio.TextManager.Interop.IVsTextMarker // interface for the marker. // // iItem: // [in] Command selected by the user from the context menu. For a list of iItem // values, see Microsoft.VisualStudio.TextManager.Interop.MarkerCommandValues. // // Returns: // If the method succeeds, it returns Microsoft.VisualStudio.VSConstants.S_OK. // If it fails, it returns an error code. public int ExecMarkerCommand(IVsTextMarker pMarker, int iItem) { // Not implemented return VSConstants.E_NOTIMPL; }
public virtual int GetMarkerCommandInfo(IVsTextMarker marker, int item, string[] text, uint[] commandFlags){ if (text != null){ text[0] = this.tipText; commandFlags[0] = 0; } return 0; }
public virtual void GetTipText( IVsTextMarker marker, string[] tipText ) { if (tipText != null) tipText[0] = this.tipText; }
public int GetMarkerCommandInfo(IVsTextMarker pMarker, int iItem, string[] pbstrText, uint[] pcmdf) { if (commands != null) { const OLECMDF OLECMDF_ENABLE = (OLECMDF.OLECMDF_SUPPORTED | OLECMDF.OLECMDF_ENABLED); if (iItem == (int)MarkerCommandValues.mcvBodyDoubleClickCommand && pcmdf != null) { pcmdf[0] = (uint)OLECMDF_ENABLE; } else if (iItem >= (int)MarkerCommandValues.mcvFirstContextMenuCommand && iItem <= (int)MarkerCommandValues.mcvLastContextMenuCommand && pbstrText != null && pcmdf != null) { int item = iItem - (int)MarkerCommandValues.mcvFirstContextMenuCommand; ITaskMenuItem[] menuItems = commands.GetMenuItems(null); if (menuItems != null && item < menuItems.Length) { ITaskMenuItem menuItem = menuItems[item]; if (menuItem != null && menuItem.Kind != TaskMenuKind.Submenu) { pbstrText[0] = menuItem.Caption; if (commands.IsEnabled(menuItems[item])) { pcmdf[0] = (uint)OLECMDF_ENABLE; if (menuItem.Kind == TaskMenuKind.Checkable) { if (commands.IsChecked(menuItems[item])) pcmdf[0] |= (uint)(OLECMDF_ENABLE | OLECMDF.OLECMDF_LATCHED); else pcmdf[0] |= (uint)(OLECMDF_ENABLE | OLECMDF.OLECMDF_NINCHED); } } else { pcmdf[0] = (uint)OLECMDF.OLECMDF_SUPPORTED; } } } } return 0; } else { return VSConstants.E_NOTIMPL; } }
int IVsTextMarkerClient.ExecMarkerCommand(IVsTextMarker pMarker, int iItem) { return VSConstants.E_NOTIMPL; }
public virtual void GetMarkerCommandInfo(IVsTextMarker marker, int item, string[] text, out uint commandFlags ) { commandFlags = 0; if (text != null) text[0] = this.tipText; }
public virtual int ExecMarkerCommand(IVsTextMarker marker, int item){ return 0; }
public virtual void ExecMarkerCommand( IVsTextMarker marker, int item ) { Trace.WriteLine("ExecMarkerCommand: " + item ); }
int IVsTextMarkerClient.GetTipText(IVsTextMarker pMarker, string[] pbstrText) { var tasks = this.Tasks; var known = tasks.Count(x => x.ErrorCategory == TaskErrorCategory.Message); var affecting = tasks.Count(x => x.ErrorCategory == TaskErrorCategory.Error); pbstrText[0] = string.Format(Resources.Culture, Resources.MarkerTipText_VulnarebilitiesFound, this.PackageReference, known, affecting); return VSConstants.S_OK; }
public int ExecMarkerCommand(IVsTextMarker pMarker, int iItem) { return 0; }
int IVsTextMarkerClient.GetMarkerCommandInfo(IVsTextMarker pMarker, int iItem, string[] pbstrText, uint[] pcmdf) { return VSConstants.E_NOTIMPL; }
public virtual int OnAfterMarkerChange(IVsTextMarker marker){ //TRACE("OnAfterMarkerChange" ); return 0; }