use of org.talend.designer.runtime.visualization.internal.ui.properties.memory.GarbageCollectorAction in project tdi-studio-se by Talend.
the class TimelineSection method createSection.
/**
* Creates the section.
*
* @param parent The parent composite
* @param group The attribute group
*/
private void createSection(Composite parent, IMonitoredMXBeanGroup group) {
if (parent.isDisposed()) {
return;
}
ExpandableComposite section = getWidgetFactory().createSection(parent, ExpandableComposite.TITLE_BAR);
section.setText(group.getName());
section.setLayoutData(new GridData(GridData.FILL_BOTH));
Composite flatFormComposite = getWidgetFactory().createFlatFormComposite(section);
FormLayout formLayout = new FormLayout();
formLayout.marginHeight = 0;
formLayout.marginWidth = 0;
flatFormComposite.setLayout(formLayout);
TimelineChart chart = new TimelineChart(flatFormComposite, section, group, SWT.NONE, toString() + getJvm().getPid());
charts.add(chart);
FormData data;
data = new FormData();
data.left = new FormAttachment(0, 0);
data.right = new FormAttachment(100, 0);
data.top = new FormAttachment(0, 0);
data.bottom = new FormAttachment(100, 0);
chart.setLayoutData(data);
section.setClient(flatFormComposite);
List<Action> actions = new ArrayList<Action>();
for (IMonitoredMXBeanAttribute attribute : group.getAttributes()) {
if (attribute.getAttributeName().startsWith("HeapMemoryUsage")) {
//$NON-NLS-1$
actions.add(garbageCollectorAction);
break;
}
}
actions.add(new ConfigureChartAction(chart, this));
addSectionActions(section, actions);
}
Aggregations