public Composite createEditorPart(Composite parent, int style)
    {
        if (hexEditControl != null) throw new IllegalStateException("Editor part exists already");
        if (parent == null) throw new NullPointerException("Null parent");

        textsParent = parent;
        hexEditControl = new HexEditControl(textsParent, style);
        hexEditControl.addDisposeListener(new DisposeListener() {
            @Override
            public void widgetDisposed(DisposeEvent e)
            {
                if (fontText != null && !fontText.isDisposed())
                    fontText.dispose();
            }
        });
        if (fontData != null) {
            fontText = new Font(Display.getCurrent(), fontData);
            hexEditControl.setFont(fontText);
        }
		if (defWidth != null) {
			hexEditControl.setDefWidth(Integer.valueOf(defWidth));
		}

        //hexEditControl.addLongSelectionListener(new ControlSelectionAdapter(ControlSelectionAdapter.UPDATE_POSITION_TEXT));
        hexEditControl.addListener(SWT.Modify, new Listener() {
            @Override
            public void handleEvent(Event event)
            {
                if (statusLine != null)
                    statusLine.updateInsertModeText(hexEditControl == null || !hexEditControl.isOverwriteMode());
            }
        });

        if (listOfStatusChangedListeners != null) {
            for (Listener listOfStatusChangedListener : listOfStatusChangedListeners) {
                hexEditControl.addListener(SWT.Modify, listOfStatusChangedListener);
            }
            listOfStatusChangedListeners = null;
        }

        if (listOfLongListeners != null) {
            for (SelectionListener listOfLongListener : listOfLongListeners) {
                hexEditControl.addLongSelectionListener(listOfLongListener);
            }
            listOfLongListeners = null;
        }

        {
            // Context menu
            MenuManager menuManager = new MenuManager();
            menuManager.setRemoveAllWhenShown(true);
            menuManager.addMenuListener(new IMenuListener() {
                @Override
                public void menuAboutToShow(IMenuManager manager)
                {
                    if (menuListener != null) {
                        menuListener.menuAboutToShow(manager);
                    }
                }
            });
            Menu contextMenu = menuManager.createContextMenu(hexEditControl.getHexText());
            hexEditControl.getHexText().setMenu(contextMenu);
            contextMenu = menuManager.createContextMenu(hexEditControl.getPreviewText());
            hexEditControl.getPreviewText().setMenu(contextMenu);
            //getSite().registerContextMenu(menuManager, this);
        }

        return hexEditControl;
    }
Creates editor part of parent application. Can only be called once per Manager object.

@param parent composite where the part will be drawn.
@throws IllegalStateException when editor part exists already (method called twice or more)
@throws NullPointerException  if textsParent is null
plugins/org.jkiss.dbeaver.ui.editors.hex/src/org/jkiss/dbeaver/ui/editors/binary/HexManager.java