示例#1
0
				public IEnumerable<GuidObject> GetGuidObjects(GuidObjectsProviderArgs args) {
					Debug.Assert(owner.ToolWindowGroupService != null);
					if (owner.ToolWindowGroupService != null) {
						var twg = owner.ToolWindowGroupService.GetToolWindowGroup(tabGroup);
						Debug.Assert(twg != null);
						if (twg != null)
							yield return new GuidObject(MenuConstants.GUIDOBJ_TOOLWINDOWGROUP_GUID, twg);
					}
				}
		public IEnumerable<GuidObject> GetGuidObjects(GuidObjectsProviderArgs args) {
			if (createGuidObjects != null) {
				foreach (var guidObject in createGuidObjects(args))
					yield return guidObject;
			}

			if (guidObjectsProvider != null) {
				foreach (var guidObject in guidObjectsProvider.GetGuidObjects(args))
					yield return guidObject;
			}
		}
示例#3
0
			public IEnumerable<GuidObject> GetGuidObjects(GuidObjectsProviderArgs args) {
				yield return new GuidObject(MenuConstants.GUIDOBJ_DOCUMENTVIEWER_GUID, documentViewer);

				var dvCtrl = documentViewer.documentViewerControl;
				var loc = dvCtrl.TextView.GetTextEditorPosition(args.OpenedFromKeyboard);
				if (loc != null) {
					yield return new GuidObject(MenuConstants.GUIDOBJ_TEXTEDITORPOSITION_GUID, loc);

					var @ref = dvCtrl.GetReferenceInfo(loc.Position);
					if (@ref != null)
						yield return new GuidObject(MenuConstants.GUIDOBJ_CODE_REFERENCE_GUID, @ref.Value.ToTextReference());
				}
			}
			public IEnumerable<GuidObject> GetGuidObjects(GuidObjectsProviderArgs args) {
				if (handlers == null)
					InitializeHandlers();

				var point = Mouse.PrimaryDevice.GetPosition(margin.VisualElement);

				yield return new GuidObject(MenuConstants.GUIDOBJ_WPF_TEXTVIEW_HOST_GUID, wpfTextViewHost);
				yield return new GuidObject(MenuConstants.GUIDOBJ_WPF_TEXTVIEW_GUID, wpfTextViewHost.TextView);
				yield return new GuidObject(MenuConstants.GUIDOBJ_WPF_TEXTVIEW_MARGIN_GUID, margin);
				yield return new GuidObject(MenuConstants.GUIDOBJ_MARGIN_POINT_GUID, point);

				foreach (var handler in handlers) {
					foreach (var o in handler.GetContextMenuObjects(point))
						yield return o;
				}
			}
			public IEnumerable<GuidObject> GetGuidObjects(GuidObjectsProviderArgs args) {
				yield return new GuidObject(MenuConstants.GUIDOBJ_WPF_HEXVIEW_GUID, wpfHexView);
				yield return new GuidObject(MenuConstants.GUIDOBJ_HEXEDITORPOSITION_GUID, wpfHexView.Caret.Position);

				if (createGuidObjects != null) {
					foreach (var guidObject in createGuidObjects(args))
						yield return guidObject;
				}
			}
示例#6
0
			public IEnumerable<GuidObject> GetGuidObjects(GuidObjectsProviderArgs args) {
				yield return new GuidObject(MenuConstants.GUIDOBJ_CODE_EDITOR_GUID, codeEditor);
			}
示例#7
0
			public IEnumerable<GuidObject> GetGuidObjects(GuidObjectsProviderArgs args) {
				yield return new GuidObject(MenuConstants.GUIDOBJ_TREEVIEW_NODES_ARRAY_GUID, treeView.TopLevelSelection);
			}
示例#8
0
			public IEnumerable<GuidObject> GetGuidObjects(GuidObjectsProviderArgs args) {
				yield return new GuidObject(MenuConstants.GUIDOBJ_REPL_EDITOR_GUID, replEditorUI);
			}
示例#9
0
		IEnumerable<GuidObject> CreateGuidObjects(GuidObjectsProviderArgs args) {
			yield return new GuidObject(MenuConstants.GUIDOBJ_OUTPUT_SERVICE_GUID, this);
			var vm = SelectedOutputBufferVM as IOutputTextPane;
			if (vm != null)
				yield return new GuidObject(MenuConstants.GUIDOBJ_ACTIVE_OUTPUT_TEXTPANE_GUID, vm);
		}
示例#10
0
			public IEnumerable<GuidObject> GetGuidObjects(GuidObjectsProviderArgs args) {
				yield return new GuidObject(MenuConstants.GUIDOBJ_TABGROUP_GUID, tabGroup);
			}
			public IEnumerable<GuidObject> GetGuidObjects(GuidObjectsProviderArgs args) {
				yield return new GuidObject(MenuConstants.GUIDOBJ_WPF_TEXTVIEW_GUID, wpfTextView);
				var loc = wpfTextView.GetTextEditorPosition(args.OpenedFromKeyboard);
				if (loc != null)
					yield return new GuidObject(MenuConstants.GUIDOBJ_TEXTEDITORPOSITION_GUID, loc);

				if (createGuidObjects != null) {
					foreach (var guidObject in createGuidObjects(args))
						yield return guidObject;
				}
			}
示例#12
0
			public IEnumerable<GuidObject> GetGuidObjects(GuidObjectsProviderArgs args) {
				var listBox = (ListBox)args.CreatorObject.Object;
				var searchResult = listBox.SelectedItem as ISearchResult;
				if (searchResult != null) {
					yield return new GuidObject(MenuConstants.GUIDOBJ_SEARCHRESULT_GUID, searchResult);
					var @ref = searchResult.Reference;
					if (@ref != null)
						yield return new GuidObject(MenuConstants.GUIDOBJ_CODE_REFERENCE_GUID, new TextReference(@ref));
				}
			}