/// <summary> /// Called when one or more items are dragged over the target hierarchy or hierarchy window. /// </summary> /// <param name="grfKeyState">Current state of the keyboard keys and the mouse modifier buttons. See <seealso cref="IVsHierarchyDropDataTarget"/></param> /// <param name="itemid">Item identifier of the drop data target over which the item is being dragged</param> /// <param name="pdwEffect"> On entry, reference to the value of the pdwEffect parameter of the IVsHierarchy object, identifying all effects that the hierarchy supports. /// On return, the pdwEffect parameter must contain one of the effect flags that indicate the result of the drop operation. For a list of pwdEffects values, see <seealso cref="DragEnter"/></param> /// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code.</returns> public override int DragOver(uint grfKeyState, uint itemid, ref uint pdwEffect) { pdwEffect = (uint)DropEffect.None; // Dragging items to a project that is being debugged is not supported // (see VSWhidbey 144785) DBGMODE dbgMode = VsShellUtilities.GetDebugMode(this.Site) & ~DBGMODE.DBGMODE_EncMask; if (dbgMode == DBGMODE.DBGMODE_Run || dbgMode == DBGMODE.DBGMODE_Break) { return(VSConstants.S_OK); } if (this.isClosed || this.site == null) { return(VSConstants.E_UNEXPECTED); } // We should also analyze if the node being dragged over can accept the drop. if (!this.CanTargetNodeAcceptDrop(itemid)) { return(VSConstants.E_NOTIMPL); } if (this.dropDataType != DropDataType.None) { pdwEffect = (uint)this.QueryDropEffect(this.dropDataType, grfKeyState); } return(VSConstants.S_OK); }
public static bool isExceptionThrown() { DebuggerService debuggerService = new DebuggerService(); DBGMODE dBGMODE = VsShellUtilities.GetDebugMode(debuggerService); if (DBGMODE.DBGMODE_Break == dBGMODE) { return(true); } return(false); }