section.setClient(container);
container.setLayout(new GridLayout(1, false));
ImageHyperlink lnkRebuildProject = toolkit.createImageHyperlink(container, SWT.NONE);
lnkRebuildProject.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
IResource resource = findEditorResource();
if (resource != null) {
RebuildJob job = new RebuildJob(resource.getProject(), IncrementalProjectBuilder.FULL_BUILD);
job.setUser(true);
job.schedule();
}
}
});
toolkit.paintBordersFor(lnkRebuildProject);
lnkRebuildProject.setText("Rebuild Project");
lnkRebuildProject.setImage(refreshImg);
ImageHyperlink lnkCleanProject = toolkit.createImageHyperlink(container, SWT.NONE);
toolkit.paintBordersFor(lnkCleanProject);
lnkCleanProject.setText("Clean Project");
lnkCleanProject.setImage(cleanImg);
lnkCleanProject.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
IResource resource = findEditorResource();
if (resource != null) {
RebuildJob job = new RebuildJob(resource.getProject(), IncrementalProjectBuilder.CLEAN_BUILD);