use of org.eclipse.ui.forms.events.HyperlinkAdapter in project tdi-studio-se by Talend.
the class RuntimeGraphcsComposite method createMessagePage.
private Composite createMessagePage(Composite parent) {
messagePage = new Composite(parent, SWT.NONE);
FormLayout messageLayout = new FormLayout();
messageLayout.marginHeight = 0;
messageLayout.marginWidth = 0;
messagePage.setLayout(messageLayout);
messagePage.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
FormToolkit toolkit = new FormToolkit(Display.getDefault());
Hyperlink hyperlink = toolkit.createHyperlink(messagePage, Messages.loadDefaultChartSetLabel, SWT.NONE);
hyperlink.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent event) {
try {
new LoadChartAction(RuntimeGraphcsComposite.this).loadDefaultChartSet();
} catch (JvmCoreException e) {
Activator.log(Messages.loadChartSetFailedMsg, e);
}
}
});
return messagePage;
}
use of org.eclipse.ui.forms.events.HyperlinkAdapter in project tdi-studio-se by Talend.
the class TimelineSection method createMessagePage.
/**
* Creates the message page.
*
* @return The message page
*/
private Composite createMessagePage() {
messagePage = new Composite(timelinePageBook, SWT.NONE);
messagePage.setLayout(new GridLayout(3, false));
messagePage.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
FormToolkit toolkit = new FormToolkit(Display.getDefault());
Hyperlink hyperlink = toolkit.createHyperlink(messagePage, Messages.loadDefaultChartSetLabel, SWT.NONE);
hyperlink.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent event) {
try {
new LoadChartSetAction(TimelineSection.this).loadDefaultChartSet();
} catch (JvmCoreException e) {
Activator.log(Messages.loadChartSetFailedMsg, e);
}
}
});
return messagePage;
}
use of org.eclipse.ui.forms.events.HyperlinkAdapter in project tdi-studio-se by Talend.
the class AbstractTabPage method createMessageLabel.
/**
* Creates the message label.
*/
private void createMessageLabel() {
messagePage = new Composite(this, SWT.NONE);
messagePage.setLayout(new GridLayout(3, false));
messagePage.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
FormToolkit toolkit = new FormToolkit(Display.getDefault());
toolkit.createLabel(messagePage, Messages.patckagesNotSpecifiedMsg);
Hyperlink hyperlink = toolkit.createHyperlink(messagePage, Messages.selectPackagesMsg, SWT.NONE);
hyperlink.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
new ConfigureCpuProfilerAction(cpuSection).run();
}
});
}
use of org.eclipse.ui.forms.events.HyperlinkAdapter in project tdi-studio-se by Talend.
the class AbstractJvmPropertySection method createMessagePage.
/**
* Creates the message page.
*
* @param parent The parent composite
* @return The message page
*/
private Composite createMessagePage(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
composite.setLayout(new GridLayout(1, false));
messageLabel = new Label(composite, SWT.NONE);
messageLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
FormToolkit toolkit = new FormToolkit(Display.getDefault());
toolkit.setBackground(composite.getBackground());
faqHyperlink = toolkit.createHyperlink(composite, Messages.seeFaqMsg, SWT.NONE);
faqHyperlink.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
PlatformUI.getWorkbench().getHelpSystem().displayHelpResource(FAQ_URL);
}
});
return composite;
}
use of org.eclipse.ui.forms.events.HyperlinkAdapter in project bndtools by bndtools.
the class BuildOperationsPart method createClient.
/**
* Fill the section.
*/
private void createClient(Section section, FormToolkit toolkit) {
section.setText("Build Operations");
Composite container = toolkit.createComposite(section);
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);
job.setUser(true);
job.schedule();
}
}
});
}
Aggregations