Search in sources :

Example 26 with IActiveJvm

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());
    }
}
Also used : IActiveJvm(org.talend.designer.runtime.visualization.IActiveJvm) IMonitoredMXBeanGroup(org.talend.designer.runtime.visualization.MBean.IMonitoredMXBeanGroup) AxisUnit(org.talend.designer.runtime.visualization.MBean.IMonitoredMXBeanGroup.AxisUnit)

Example 27 with IActiveJvm

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);
}
Also used : IActiveJvm(org.talend.designer.runtime.visualization.IActiveJvm)

Example 28 with IActiveJvm

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;
}
Also used : IActiveJvm(org.talend.designer.runtime.visualization.IActiveJvm) RuntimeMXBean(java.lang.management.RuntimeMXBean) OperatingSystemMXBean(java.lang.management.OperatingSystemMXBean)

Example 29 with IActiveJvm

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);
}
Also used : IActiveJvm(org.talend.designer.runtime.visualization.IActiveJvm)

Example 30 with IActiveJvm

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);
    }
}
Also used : IActiveJvm(org.talend.designer.runtime.visualization.IActiveJvm)

Aggregations

IActiveJvm (org.talend.designer.runtime.visualization.IActiveJvm)54 JvmCoreException (org.talend.designer.runtime.visualization.JvmCoreException)14 IProgressMonitor (org.eclipse.core.runtime.IProgressMonitor)7 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)6 RefreshJob (org.talend.designer.runtime.visualization.internal.ui.RefreshJob)6 IMonitoredMXBeanGroup (org.talend.designer.runtime.visualization.MBean.IMonitoredMXBeanGroup)5 ArrayList (java.util.ArrayList)2 Date (java.util.Date)2 ObjectName (javax.management.ObjectName)2 Job (org.eclipse.core.runtime.jobs.Job)2 IDialogSettings (org.eclipse.jface.dialogs.IDialogSettings)2 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)2 Composite (org.eclipse.swt.widgets.Composite)2 ExpandableComposite (org.eclipse.ui.forms.widgets.ExpandableComposite)2 IHost (org.talend.designer.runtime.visualization.IHost)2 JvmModelEvent (org.talend.designer.runtime.visualization.JvmModelEvent)2 IMBeanServerChangeListener (org.talend.designer.runtime.visualization.MBean.IMBeanServerChangeListener)2 IMonitoredMXBeanAttribute (org.talend.designer.runtime.visualization.MBean.IMonitoredMXBeanAttribute)2 AxisUnit (org.talend.designer.runtime.visualization.MBean.IMonitoredMXBeanGroup.AxisUnit)2 MBeanServerEvent (org.talend.designer.runtime.visualization.MBean.MBeanServerEvent)2