Source:
protected void createHeaderContents(IManagedForm headerForm) { RepositoryCommit commit = getCommit(); ScrolledForm form = headerForm.getForm(); form.setText(MessageFormat.format(UIText.CommitEditor_TitleHeader, commit.getRevCommit().name())); form.setToolTipText(commit.getRevCommit().name()); getToolkit().decorateFormHeading(form.getForm()); IToolBarManager toolbar = form.getToolBarManager(); ControlContribution repositoryLabelControl = new ControlContribution("Title") { @Override protected Control createControl(Composite parent) { FormToolkit toolkit = getHeaderForm().getToolkit(); Composite composite = toolkit.createComposite(parent); RowLayout layout = new RowLayout(); composite.setLayout(layout); composite.setBackground(null); String label = getCommit().getRepositoryName(); ImageHyperlink link = new ImageHyperlink(composite, SWT.NONE); link.setText(label); link.setFont(JFaceResources.getBannerFont()); link.setForeground(toolkit.getColors().getColor(IFormColors.TITLE)); link.setToolTipText(UIText.CommitEditor_showGitRepo); link.addHyperlinkListener(new HyperlinkAdapter() { @Override public void linkActivated(HyperlinkEvent event) { RepositoriesView view; try { view = (RepositoriesView) PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getActivePage().showView( RepositoriesView.VIEW_ID); view.showRepository(getCommit().getRepository()); } catch (PartInitException e) { Activator.handleError(UIText.CommitEditor_couldNotShowRepository, e, false); } } }); return composite; } }; toolbar.add(repositoryLabelControl); toolbar.add(createCommandContributionItem(CreateTagHandler.ID)); toolbar.add(createCommandContributionItem(CreateBranchHandler.ID)); toolbar.update(true); }

Target:
protected void createHeaderContents(IManagedForm headerForm) { RepositoryCommit commit = getCommit(); ScrolledForm form = headerForm.getForm(); form.setText(MessageFormat.format(UIText.CommitEditor_TitleHeader, commit.getRevCommit().name())); form.setToolTipText(commit.getRevCommit().name()); getToolkit().decorateFormHeading(form.getForm()); IToolBarManager toolbar = form.getToolBarManager(); ControlContribution repositoryLabelControl = new ControlContribution("repositoryLabel") { @Override protected Control createControl(Composite parent) { FormToolkit toolkit = getHeaderForm().getToolkit(); Composite composite = toolkit.createComposite(parent); RowLayout layout = new RowLayout(); composite.setLayout(layout); composite.setBackground(null); String label = getCommit().getRepositoryName(); ImageHyperlink link = new ImageHyperlink(composite, SWT.NONE); link.setText(label); link.setFont(JFaceResources.getBannerFont()); link.setForeground(toolkit.getColors().getColor(IFormColors.TITLE)); link.setToolTipText(UIText.CommitEditor_showGitRepo); link.addHyperlinkListener(new HyperlinkAdapter() { @Override public void linkActivated(HyperlinkEvent event) { RepositoriesView view; try { view = (RepositoriesView) PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getActivePage().showView( RepositoriesView.VIEW_ID); view.showRepository(getCommit().getRepository()); } catch (PartInitException e) { Activator.handleError(UIText.CommitEditor_couldNotShowRepository, e, false); } } }); return composite; } }; toolbar.add(repositoryLabelControl); toolbar.add(createCommandContributionItem(CreateTagHandler.ID)); toolbar.add(createCommandContributionItem(CreateBranchHandler.ID)); toolbar.update(true); }