void AddCommandFilter(IVsTextView viewAdapter, EditorCommandFilter commandFilter)
		{
			//get the view adapter from the editor factory
			IOleCommandTarget next;
			int hr = viewAdapter.AddCommandFilter(commandFilter, out next);

			if (hr == VSConstants.S_OK)
			{
				if (next != null)
					commandFilter.SetNextTarget(next);
			}
		}
示例#2
0
        void AddCommandFilter(IVsTextView viewAdapter, EditorCommandFilter commandFilter)
        {
            //get the view adapter from the editor factory
            IOleCommandTarget next;
            int hr = viewAdapter.AddCommandFilter(commandFilter, out next);

            if (hr == VSConstants.S_OK)
            {
                if (next != null)
                {
                    commandFilter.SetNextTarget(next);
                }
            }
        }