public override WpfHexView Create(HexBuffer buffer, VSTE.ITextViewRoleSet roles, VSTE.IEditorOptions parentOptions, HexViewCreatorOptions?options) { if (buffer is null) { throw new ArgumentNullException(nameof(buffer)); } if (roles is null) { throw new ArgumentNullException(nameof(roles)); } if (parentOptions is null) { throw new ArgumentNullException(nameof(parentOptions)); } var wpfHexView = new WpfHexViewImpl(buffer, roles, parentOptions, hexEditorOptionsFactoryService, commandService, formattedHexSourceFactoryService, hexViewClassifierAggregatorService, hexAndAdornmentSequencerFactoryService, hexBufferLineFormatterFactoryService, classificationFormatMapService, editorFormatMapService, adornmentLayerDefinitionService, lineTransformProviderService, spaceReservationStackProvider, wpfHexViewCreationListeners, hexViewCreationListeners, classificationTypeRegistryService, hexCursorProviderFactories); if (!(options?.MenuGuid is null)) { var guidObjectsProvider = new GuidObjectsProvider(wpfHexView, options.CreateGuidObjects); menuService.InitializeContextMenu(wpfHexView.VisualElement, options.MenuGuid.Value, guidObjectsProvider, new HexContextMenuInitializer(wpfHexView)); } HexViewCreated?.Invoke(this, new HexViewCreatedEventArgs(wpfHexView)); foreach (var lz in hexEditorFactoryServiceListeners) { lz.Value.HexViewCreated(wpfHexView); } return(wpfHexView); }
/// <summary> /// Creates a new <see cref="WpfHexView"/> /// </summary> /// <param name="buffer">Buffer</param> /// <param name="roles">Roles</param> /// <param name="parentOptions">Parent options</param> /// <returns></returns> public virtual WpfHexView Create(HexBuffer buffer, VSTE.ITextViewRoleSet roles, VSTE.IEditorOptions parentOptions) => Create(buffer, roles, parentOptions, (HexViewCreatorOptions?)null);
/// <summary> /// Creates a new <see cref="WpfHexView"/> /// </summary> /// <param name="buffer">Buffer</param> /// <param name="roles">Roles</param> /// <param name="parentOptions">Parent options</param> /// <param name="options">Options or null</param> /// <returns></returns> public abstract WpfHexView Create(HexBuffer buffer, VSTE.ITextViewRoleSet roles, VSTE.IEditorOptions parentOptions, HexViewCreatorOptions?options);
public override WpfHexView Create(HexBuffer buffer, VSTE.ITextViewRoleSet roles, HexViewCreatorOptions?options) => Create(buffer, roles, hexEditorOptionsFactoryService.GlobalOptions, options);
/// <summary> /// Creates a new <see cref="WpfHexView"/> /// </summary> /// <param name="buffer">Buffer</param> /// <param name="roles">Roles</param> /// <param name="options">Options or null</param> /// <returns></returns> public abstract WpfHexView Create(HexBuffer buffer, VSTE.ITextViewRoleSet roles, HexViewCreatorOptions options);