use of org.talend.designer.runtime.visualization.IActiveJvm in project tdi-studio-se by Talend.
the class ConfigureChartAction method run.
/*
* @see Action#run()
*/
@Override
public void run() {
IActiveJvm jvm = section.getJvm();
if (jvm == null) {
return;
}
String title = chart.getSection().getText();
IMonitoredMXBeanGroup group = chart.getAttributeGroup();
AxisUnit unit = group.getAxisUnit();
List<MBeanAttribute> attributes = getAttributes();
ConfigureChartDialog dialog = new ConfigureChartDialog(chart.getShell(), title, unit, attributes, jvm, true);
if (dialog.open() == Window.OK) {
performConfiguration(dialog.getChartTitle(), dialog.getAxisUnit(), dialog.getAttributes(), dialog.getRemovedAttributes());
}
}
use of org.talend.designer.runtime.visualization.IActiveJvm in project tdi-studio-se by Talend.
the class SWTResourcesPage method refreshBackground.
/**
* Refreshes the background.
*/
void refreshBackground() {
IActiveJvm jvm = section.getJvm();
boolean isConnected = jvm != null && jvm.isConnected();
section.refreshBackground(getChildren(), isConnected);
}
use of org.talend.designer.runtime.visualization.IActiveJvm in project tdi-studio-se by Talend.
the class HeapHistogramPage method isSupported.
/**
* Gets the state indicating if heap histogram is supported.
* <p>
* WORKAROUND: Heap histogram is disabled on 64bit OS when monitoring eclipse itself, due to the issue that the
* method heapHisto() of the class HotSpotVirtualMachine causes continuously increasing the committed heap memory.
*
* @return <tt>true</tt> if heap histogram is supported
*/
boolean isSupported() {
IActiveJvm jvm = section.getJvm();
if (jvm == null) {
return false;
}
OperatingSystemMXBean osMBean = ManagementFactory.getOperatingSystemMXBean();
RuntimeMXBean runtimeMBean = ManagementFactory.getRuntimeMXBean();
if (osMBean.getArch().contains(ARCH_64BIT) && runtimeMBean.getName().contains(String.valueOf(jvm.getPid()))) {
return false;
}
return true;
}
use of org.talend.designer.runtime.visualization.IActiveJvm in project tdi-studio-se by Talend.
the class HeapHistogramPage method refreshBackground.
/**
* Refreshes the background.
*/
void refreshBackground() {
IActiveJvm jvm = section.getJvm();
boolean isConnected = jvm != null && jvm.isConnected();
boolean isRemote = jvm != null && jvm.isRemote();
section.refreshBackground(getChildren(), isConnected && !isRemote);
}
use of org.talend.designer.runtime.visualization.IActiveJvm in project tdi-studio-se by Talend.
the class MemorySection method updatePage.
/*
* @see AbstractJvmPropertySection#updatePage()
*/
@Override
protected void updatePage() {
super.updatePage();
IActiveJvm jvm = getJvm();
if (jvm != null && jvm.isConnected()) {
if (jvm.isRemote()) {
setMessageLabel(Messages.notSupportedOnRemoteHostMsg);
} else if (!heapHistogramPage.isSupported()) {
setMessageLabel(Messages.notSupportedForEclipseItselfOn64bitOS);
} else {
//$NON-NLS-1$
setMessageLabel("");
}
heapHistogramPageBook.showPage(heapHistogramMessageLabel.getText().isEmpty() ? heapHistogramPage : heapHistogramMessageLabel);
}
}
Aggregations