private void addExportButton(Composite buttonComp) {
exportButton = new Button(buttonComp, SWT.NONE);
exportButton.setText(WidgetLabels.EXPORT_LOGS);
+ exportButton.setFont(FontResources.DIALOG_BUTTON_FONT);
FormData exportData = new FormData();
exportData.top = new FormAttachment(0, button_top);
exportData.left = new FormAttachment(0, 20);
- exportData.width = DesignConstants.DA_BUTTON_WIDTH;
+ exportData.width = DesignConstants.DA_BUTTON_WIDTH+30;
exportData.height = DesignConstants.DA_BUTTON_HEIGHT;
exportButton.setLayoutData(exportData);
}
this.tabBGColorStart = tabBGColorStart;
this.tabBGColorEnd = tabBGColorEnd;
}
-
+ public void updateTabButtonsWidth(int width) {
+ setTabWidth(width);
+ for(DATabButton button : buttons) {
+ FormData data = (FormData) button.getLayoutData();
+ data.width = width;
+ }
+ tabComposite.layout();
+ }
+
+ public List<DATabButton> getTabButtons() {
+ return buttons;
+ }
}
import org.tizen.dynamicanalyzer.nl.TimelineChartLabels;
import org.tizen.dynamicanalyzer.project.AppInfo;
import org.tizen.dynamicanalyzer.project.PackageInfo;
+import org.tizen.dynamicanalyzer.setting.FlatFeature;
import org.tizen.dynamicanalyzer.setting.FlatPreferences;
import org.tizen.dynamicanalyzer.setting.PrimitiveFeature;
import org.tizen.dynamicanalyzer.setting.SettingDataManager;
private static boolean selectFeatures(TracingArguments args) {
// drop previous settings
UILayoutDataManager.INSTANCE.setSelectedChartSet(new HashSet<String>());
+ TargetData target = SettingDataManager.INSTANCE.getTarget(null);
+ target.setSelectedFlatFeatures(new HashSet<FlatFeature>());
selectScreenshotFeature(args.getScreenshotPeriod(),
args.isScreenshotPeriodSpecified());
args.getFeatures().remove(PrimitiveFeature.SCREENSHOT);//This feature added to target by selectScreenshotFeature().
- TargetData target = SettingDataManager.INSTANCE.getTarget(null);
-
for (PrimitiveFeature feature : args.getFeatures()) {
target.addSelectedFlatFeature(feature.getName());
UILayoutDataManager.INSTANCE.addSelectedChart(feature.getChart());
FILE("F","file"),
GRAPHICS("G","graphics"),
NETWORK("N","network"),
- SYNC("Y", "synchronization"),
// Options for single features selection
+ THREAD("T", PrimitiveFeature.THREAD_ANALYSIS),
UIEVENT("U", PrimitiveFeature.UI_EVENT),
PERIPHERAL("P", PrimitiveFeature.PERIPHERAL_STATUS),
POWER("E", PrimitiveFeature.POWER_ESTIMATION);
NETWORK.addDefaultFeatureValue("io", PrimitiveFeature.NETWORK_IO);
NETWORK.addDefaultFeatureValue("analysis", PrimitiveFeature.NETWORK_ANALYSIS);
- SYNC.addDefaultFeatureValue("thread", PrimitiveFeature.THREAD_ANALYSIS);
- SYNC.addDefaultFeatureValue("sync", PrimitiveFeature.SYNC_ANALYSIS);
-
// Add description of default options
for (TracingFeatureArgument featureArg : values())
if (featureArg.getOption().hasArgs())
private long startTime;
/**
- * Stop time value in milliseconds. It's initialized at application stop
+ * Stop time value in microseconds. It's initialized at application stop
*/
private volatile long tracingTime;
// If CliInternals.startTracing returns Success the StartTraceManager thread still may fail
if (!DAState.isRunning() && result==ErrorCode.SUCCESS)
result = ErrorCode.ERR_EXCEPTION_OCCURRED;
- startTime = System.currentTimeMillis();
+ startTime = System.nanoTime() / 1000;
return result;
}
* This method should not block caller thread during performing tracing stop.
*/
public synchronized void stopTrace() {
- tracingTime = System.currentTimeMillis() - startTime;
+ tracingTime = System.nanoTime() / 1000 - startTime;
Global.getProject().setTotalStopTime(tracingTime);
socketConnection.sendMessage(MessageType.INFO_TRACING_TIME,
Long.toString(tracingTime));
private static final long serialVersionUID = 8522187457892222028L;
/**
- * Duration of this time period in milliseconds.
+ * Time period in milliseconds.
*/
- long duration_ms;
+ long time_ms;
/**
* Count of milliseconds in a second.
* @param finish time when period was ended
*/
public HumanReadableTimeFormat(Date start, Date finish) {
- duration_ms = Math.abs(finish.getTime() - start.getTime());
+ time_ms = Math.abs(finish.getTime() - start.getTime());
}
- public HumanReadableTimeFormat(long tracingTime) {
- duration_ms = tracingTime;
+ /**
+ * Public constructor. It gets time in microseconds.
+ *
+ * @param time_microsec time in microseconds.
+ */
+ public HumanReadableTimeFormat(long time_microsec) {
+ time_ms = time_microsec / 1000;
}
/**
*/
@Override
public String toString() {
- long diff_ms = this.duration_ms;
+ long diff_ms = this.time_ms;
long days = diff_ms / MS_IN_DAY;
diff_ms %= MS_IN_DAY;
gc.fillRectangle(pixelStartX, pixelStartY, barWidth, r.y + r.height
- pixelStartY);
gc.setBackground(series.getColor());
- gc.setAlpha(250);
}
if (currentX > plot.getVisibleEndX()) {
break;
* SERIES_AREA_END, SERIES_AREA_BAR.
*/
private void drawStateAreaSeries(GC gc, DAChartSeries series, int seriesIndex, int seriesSize) {
+ int oldAlpha = gc.getAlpha();
+ gc.setAlpha((int) (255 * 0.8));
+
List<DAChartSeriesItem> seriesItems = series.getSeriesItemList();
if (null == seriesItems) {
return;
int pixelStartX = plot.getXPixelFromX(barSeriesItem.getX(), r);
gc.fillRectangle(pixelStartX, pixelStartY, STATE_AREA_BAR_WIDTH, areaHeight);
}
+ gc.setAlpha(oldAlpha);
}
private void drawStepSeries(GC gc, DAChartSeries series, boolean bEndVal) {
gc.setBackground(color);
gc.setForeground(ColorResources.BLACK);
gc.setAntialias(SWT.ON);
+
+ int oldAlpha = gc.getAlpha();
+ gc.setAlpha((int) (255 * 0.8));
int index = series.getPrevIndexByXvalue(plot.getVisibleStartX());
if (index < 0) {
break;
}
}
+ gc.setAlpha(oldAlpha);
}
private void drawEventAreaSeries(GC gc, DAChartSeries series) {
Color foreColor;
gc.setBackground(color);
gc.setAntialias(SWT.ON);
+
+ int oldAlpha = gc.getAlpha();
+ gc.setAlpha((int) (255 * 0.8));
int index = series.getPrevIndexByXvalue(plot.getVisibleStartX());
if (index < 0) {
oldStateContinueRectangle.width = barWidth;
oldStateContinueRectangle.height = r.y + r.height - heightMargin * 2;
- if (null != foreColor) {
- gc.setForeground(foreColor);
- gc.fillGradientRectangle(pixelStartX, r.y + heightMargin, barWidth, r.y
- + r.height - heightMargin * 2, true);
- } else {
- gc.fillRectangle(oldStateContinueRectangle);
- }
+ gc.fillRectangle(oldStateContinueRectangle);
}
prevEndX = pixelStartX + barWidth;
break;
oldStateConnectionRectangle.width = barWidth;
oldStateConnectionRectangle.height = r.y + r.height - heightMargin * 2;
- if (null != foreColor) {
- gc.setForeground(foreColor);
- gc.fillGradientRectangle(pixelStartX, r.y + heightMargin, barWidth, r.y
- + r.height - heightMargin * 2, true);
- } else {
- gc.fillRectangle(oldStateConnectionRectangle);
- }
+ gc.fillRectangle(oldStateConnectionRectangle);
}
prevEndX = pixelStartX + barWidth;
break;
}
}
+ gc.setAlpha(oldAlpha);
}
private void drawDotSeries(GC gc, DAChartSeries series) {
nameCellCurrentBGColorEnd = nameCellNormalBGColorEnd;
}
redrawFoldBackground();
+ redrawExpandBackground();
nameCell.redraw();
+
chartCell.setSelectCell(selectCell);
}
+
+ private void redrawExpandBackground() {
+ expandButton.setBackground(nameCellCurrentBGColorStart);
+ expandButton.redraw();
+ }
private void redrawFoldBackground() {
if (null == childFoldButton) {
public static Color CHART_NAME_PARENT_SELECT_START = getColor(\r
"chart_name_parent_select_start", new RGB(156, 208, 228)); //$NON-NLS-1$\r
public static Color CHART_NAME_PARENT_SELECT_END = getColor(\r
- "chart_name_parent_select_end", new RGB(129, 170, 186)); //$NON-NLS-1$\r
+ "chart_name_parent_select_end", new RGB(156, 208, 228)); //$NON-NLS-1$\r
public static Color CHART_NAME_ADD_INFO_TEXT = getColor(\r
"chart_name_add_info_text", new RGB(94, 94, 94)); //$NON-NLS-1$\r
\r
version="0.0.0"/>
<plugin
- id="com.ibm.icu"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.jface.databinding"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.core.databinding"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.core.commands"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.app"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.util"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.ds"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.simpleconfigurator"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.launcher"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.core.expressions"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.rcp"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.jface"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.core.jobs"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.core.runtime.compatibility.registry"
- download-size="0"
- install-size="0"
- version="0.0.0"
- fragment="true"/>
-
- <plugin
- id="org.eclipse.core.contenttype"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.common"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="javax.servlet"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.osgi.services"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.swt"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.preferences"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.core.databinding.beans"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ui.workbench"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.update.configurator"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.osgi"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.core.databinding.property"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.core.databinding.observable"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.core.runtime"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.registry"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.help"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
id="org.tizen.dynamicanalyzer"
download-size="0"
install-size="0"
unpack="false"/>
<plugin
- id="org.eclipse.ui.ide"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ui.console"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.jface.text"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.core.resources"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.core.filesystem"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ant.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.compare.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.core.variables"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.engine"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.metadata"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.metadata.repository"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.repository"
+ id="org.tizen.dynamicanalyzer.appearance"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.equinox.security"
+ id="org.tizen.dynamicanalyzer.common"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
- <plugin
- id="org.eclipse.text"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ui.views"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ui.workbench.texteditor"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.junit"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.hamcrest.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.tizen.dynamicanalyzer.appearance"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.tizen.dynamicanalyzer.common"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.debug.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.tukaani.xz"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.e4.ui.model.workbench"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.emf.ecore"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.e4.ui.workbench"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ui.ide.application"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.e4.ui.workbench.addons.swt"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.e4.ui.workbench.renderers.swt"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.e4.ui.workbench.swt"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.e4.ui.workbench3"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.emf.ecore.change"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.emf.ecore.edit"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.emf.ecore.xmi"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="javax.annotation"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="javax.xml"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.apache.ant"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.apache.xml.resolver"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ant.launching"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.compare"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.core.filebuffers"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.core.net"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.core.runtime.compatibility"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.draw2d"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.identity"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.provider.filetransfer"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.provider.filetransfer.httpclient4"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.ecf.provider.filetransfer.ssl"
- download-size="0"
- install-size="0"
- version="0.0.0"
- fragment="true"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.emf.common"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.emf.common.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.emf.edit"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.emf.edit.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.bidi"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.console"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.event"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.frameworkadmin"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.frameworkadmin.equinox"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.http.jetty"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.http.registry"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.jsp.jasper"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.jsp.jasper.registry"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.artifact.repository"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.console"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.director"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.director.app"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.director.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.directorywatcher"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.extensionlocation"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.jarprocessor"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.operations"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.publisher"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.reconciler.dropins"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.touchpoint.natives"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.transport.ecf"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.ui.importexport"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.ui.sdk"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.ui.sdk.scheduler"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.p2.updatesite"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.equinox.simpleconfigurator.manipulator"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.help.source"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.jdt"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.jdt.annotation"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.jdt.annotation"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.jdt.apt.pluggable.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.jdt.apt.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.jdt.compiler.tool"
- download-size="0"
- install-size="0"
- version="0.0.0"
- fragment="true"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.jdt.debug"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.jdt.core"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.jdt.junit.runtime"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.jem.util"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.osgi.compatibility.state"
- download-size="0"
- install-size="0"
- version="0.0.0"
- fragment="true"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.osgi.util"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.pde"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-2016-05-04
- <plugin
- id="org.eclipse.platform"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.sdk"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
</feature>
-Version|0.2\r
-Log Level|4\r
-Debug Print|Y\r
-Available Target List|mobile|wearable\r
-Selected Target|mobile\r
-Default Feature List|2|3|103\r
-Total Overhead Range|1000000|3000000|7000000|15000000\r
-Options Selected Feature List|5002:0\r
-Selected Preferences|2001\r
-mobile|Protocol Version|4.0\r
-mobile|Available Template List|1|2|3|4|5|6|7|8|9|10|11\r
-mobile|Selected Template|1\r
-mobile|Available Feature List|1|1000|4|5|6|7|8|9|100|101|1001|301|200|201|202|203|204|206\r
-mobile|Available FlatFeature List|101|102|103|201|202|203|301|302|401|501|502|601|602|603|701|702|801|802\r
-mobile|Selected Feature List|1|5|1000:1000|100|101|1001:10\r
-mobile|Selected FlatFeature List|\r
-mobile|Available Chart List|CPU Usage|Core Usage|Core Frequency|System Memory|Process Memory|Heap Allocation|Screenshot|UI Event|Disk IO|Network IO|Peripheral Status|Power Estimation\r
-wearable|Protocol Version|3.0\r
-wearable|Available Template List|1|2|3|4|5|6|7|8|9|10|11\r
-wearable|Selected Template|1\r
-wearable|Available Feature List|1|1000|4|5|6|7|8|9|100|101|1001|301|200|201|202|203|204|206\r
-wearable|Available FlatFeature List|101|102|103|201|202|203|301|302|401|501|502|601|602|603|701|702|801|802\r
-wearable|Selected Feature List|1|5|1000:1000|100|101|1001:10\r
-wearable|Selected FlatFeature List|\r
-wearable|Available Chart List|CPU Usage|Core Usage|Core Frequency|System Memory|Process Memory|Heap Allocation|Screenshot|UI Event|Disk IO|Network IO|Peripheral Status|Power Estimation\r
-tv|Protocol Version|3.0\r
-tv|Available Template List|1|2|3|4|5|6|7|8|10\r
-tv|Selected Template|1\r
-tv|Available Feature List|1|1000|4|5|6|7|100|101|1001|102|200|201|202|203\r
-tv|Available FlatFeature List|101|102|103|201|202|203|301|302|401|501|502|601|602|603|701|702|801|802\r
-tv|Selected Feature List|1|5|1000:1000|100|101|1001:10\r
-tv|Available Chart List|CPU|CPU core|CPU frequency|Heap allocation|Process Size|Memory|Screenshot|Disk IO|Network IO\r
+Version|0.2
+Log Level|4
+Debug Print|Y
+Available Target List|mobile|wearable
+Selected Target|mobile
+Default Feature List|2|3|103
+Total Overhead Range|1000000|3000000|7000000|15000000
+Options Selected Feature List|5002:0
+Selected Preferences|2001
+mobile|Protocol Version|4.0
+mobile|Available Template List|1|2|3|4|5|6|7|8|9|10|11
+mobile|Selected Template|1
+mobile|Available Feature List|1|1000|4|5|6|7|8|9|100|101|1001|301|200|201|202|203|204|206
+mobile|Available FlatFeature List|101|102|103|201|202|203|301|302|401|501|502|601|602|603|701|801|802
+mobile|Selected Feature List|1|5|1000:1000|100|101|1001:10
+mobile|Selected FlatFeature List|
+mobile|Available Chart List|CPU Usage|Core Usage|Core Frequency|System Memory|Process Memory|Heap Allocation|Screenshot|UI Event|Disk IO|Network IO|Peripheral Status|Power Estimation
+wearable|Protocol Version|3.0
+wearable|Available Template List|1|2|3|4|5|6|7|8|9|10|11
+wearable|Selected Template|1
+wearable|Available Feature List|1|1000|4|5|6|7|8|9|100|101|1001|301|200|201|202|203|204|206
+wearable|Available FlatFeature List|101|102|103|201|202|203|301|302|401|501|502|601|602|603|701|801|802
+wearable|Selected Feature List|1|5|1000:1000|100|101|1001:10
+wearable|Selected FlatFeature List|
+wearable|Available Chart List|CPU Usage|Core Usage|Core Frequency|System Memory|Process Memory|Heap Allocation|Screenshot|UI Event|Disk IO|Network IO|Peripheral Status|Power Estimation
+tv|Protocol Version|3.0
+tv|Available Template List|1|2|3|4|5|6|7|8|10
+tv|Selected Template|1
+tv|Available Feature List|1|1000|4|5|6|7|100|101|1001|102|200|201|202|203
+tv|Available FlatFeature List|101|102|103|201|202|203|301|302|401|501|502|601|602|603|701|801|802
+tv|Selected Feature List|1|5|1000:1000|100|101|1001:10
+tv|Available Chart List|CPU|CPU core|CPU frequency|Heap allocation|Process Size|Memory|Screenshot|Disk IO|Network IO
lib/protobuf.jar,
lib/org.eclipse.cdt.debug.edc_1.0.0.201503041838.jar,
lib/org.eclipse.draw2d_3.7.2.v20111017-2020.jar
-Import-Package: junit.framework;version="4.8.2",
- org.junit,
- org.tizen.sdblib,
+Import-Package: org.tizen.sdblib,
org.tizen.sdblib.exception,
org.tizen.sdblib.receiver,
org.tizen.sdblib.service,
project.save();
DataManagerRegistry.saveData();
+ SqlConnectionManager.closeConnection();
+
File sourceFolder = new File(sourcePath);
if (!sourceFolder.isDirectory()) {
return false;
return false;
}
+ SqlConnectionManager.establishConnection(sourcePath);
+
return true;
}
public void setUIElementsBySetting() {
setPageBySetting();
setChartBySetting();
+
+ // SRADA-906: fix broken UI by forcible relayout whole window
+ Display.getDefault().syncExec(new Runnable() {
+ @Override
+ public void run() {
+ WorkbenchUtil.getWorkbenchWindow().getShell().layout(true, true);
+ }
+ });
}
@Override
FEATURE_NAME_PERIPHERAL_STATUS=Peripheral Status
FEATURE_NAME_POWER_ESTIMATION=Power Estimation
-FEATURE_DESCRIPTION_CPU_USAGE=Shows a total CPU usage made by running processes on a system and a CPU usage in percent.
-FEATURE_DESCRIPTION_CPU_USAGE_PER_CORE=Shows usage of each core on a device(or an emulator) in percent. The number of series on the chart is vary depends on the number of cores.
-FEATURE_DESCRIPTION_CPU_FREQ_PER_CORE=Shows frequency of each core on a device in MHz. This feature is only available on the device not for an emulator.
-FEATURE_DESCRIPTION_FLAT_SYSTEM_MEMORY=Monitors maximum, used memory of a system and an a process used in KB.
-FEATURE_DESCRIPTION_PROCESS_MEMORY=Monitors a partition of PSS, 3D, GEM memory of a process in KB.
-FEATURE_DESCRIPTION_MEMORY_ALLOC=Records all memory allocations and frees requested from a executable and shared libraries. This Features shows un-freed allocations (leak candidate).
-FEATURE_DESCRIPTION_DISK_IO=Shows system I/O Events such as occurance of Read/Write operation and its amounts of byte.
-FEATURE_DESCRIPTION_FILE=Analyzes file activies such as open, close and lock operation in a separated analysis view.
+FEATURE_DESCRIPTION_CPU_USAGE=Shows the total CPU usage made by running processes on a system, and a CPU usage in percentages.
+FEATURE_DESCRIPTION_CPU_USAGE_PER_CORE=Shows the use of each core on a device(or an emulator) in percentages. The number of series on the chart varies depending on the number of cores.
+FEATURE_DESCRIPTION_CPU_FREQ_PER_CORE=Shows the frequency of each core on a device in MHz. This feature is only available on the device, and not on an emulator.
+FEATURE_DESCRIPTION_FLAT_SYSTEM_MEMORY=Monitors the maximum and used memory of the system, and the memory used by a process used in KB.
+FEATURE_DESCRIPTION_PROCESS_MEMORY=Monitors a partition of the PSS, 3D, and GEM memory of a process in KB.
+FEATURE_DESCRIPTION_MEMORY_ALLOC=Records all memory allocations and frees the requested allocations from the executable and shared libraries. This Feature shows un-freed allocations (leak candidates).
+FEATURE_DESCRIPTION_DISK_IO=Shows the system I/O events, such as the occurrence of the read/write operation and the number of bytes in it.
+FEATURE_DESCRIPTION_FILE=Analyzes file activities, such as open, close, and lock operations in a separate analysis view.
FEATURE_DESCRIPTION_OPENGLES=Analyzes OpenGL(Open Graphics Library) 2.0 and EvasGL information used on a process. It shows detailed OpenGL API lists, Context, Program and Texture information at a particular point of time.
-FEATURE_DESCRIPTION_NETWORK_IO=Shows amount of bytes that a system sends and receives via the network.
-FEATURE_DESCRIPTION_NETWORK=Analyzes network activies such as recv, send, bind and accept operation in a separated analysis view.
-FEATURE_DESCRIPTION_UI_EVENT=Shows Touch(press, move, release), Geasture(distance, movement and angle) and Orientation change events.
-FEATURE_DESCRIPTION_SCREENSHOT=Shows a series of screenshot events taken by an user. It can be set to capture screenshot by a screen transition or by a specific time interval.
-FEATURE_DESCRIPTION_UI_HIERARCHY=Analyzes the hierarchy and details of a EFL based application used EFL UI objects (Evas, Elementry and Edje).
-FEATURE_DESCRIPTION_THREAD=Analyzes the internal threads of a process and its synchronization opration.
+FEATURE_DESCRIPTION_NETWORK_IO=Shows the number of bytes that the system sends and receives through the network.
+FEATURE_DESCRIPTION_NETWORK=Analyzes network activities, such as recv, send, bind, and accept operations, in a separate analysis view.
+FEATURE_DESCRIPTION_UI_EVENT=Shows the touch(press, move, release), Geasture(distance, movement, angle), and orientation change events.
+FEATURE_DESCRIPTION_SCREENSHOT=Shows a series of screenshot events taken by an user. It can be set to capture a screenshot during each screen transition or at specific time intervals.
+FEATURE_DESCRIPTION_UI_HIERARCHY=Analyzes the hierarchy and details of a EFL-based application using EFL UI objects (Evas, Elementary, and Edje).
+FEATURE_DESCRIPTION_THREAD=Analyzes the internal threads of a process and its synchronization opration which multiple threads race against.
FEATURE_DESCRIPTION_SYNC=Analyzes the syncronization objects which multiple threads race against to.
-FEATURE_DESCRIPTION_PERIPHERAL_STATUS=Shows peripheral's on/off state of WIFI, BT, GPS, Data Network and Camera.
-FEATURE_DESCRIPTION_POWER_ESTIMATION=Calculates the amount of power consumption that CPU, Flash, LCD, Wifi and BT consume with an accurate estimation model.
+FEATURE_DESCRIPTION_PERIPHERAL_STATUS=Shows the on/off state of the Wi-Fi, Bluetooth, GPS, Data network and camera peripherals.
+FEATURE_DESCRIPTION_POWER_ESTIMATION=Calculates the power consumption of the CPU, Flash, LCD, Wi-Fi, and Bluetooth with an accurate estimation model.
FEATURE_PAGE_CPU_USAGE=Timeline
FEATURE_PAGE_CPU_USAGE_PER_CORE=Timeline
THREAD_CHART_NAME_POSTFIX=)
THREAD_CHART_NAME_PID=PID :
THREAD_CHART_NAME_TID=TID :
-THREAD_CHART_NAME_COMMA=,\n
-THREAD_CHART_NAME_OBJ=object name :\n
+THREAD_CHART_NAME_COMMA=,
+THREAD_CHART_NAME_OBJ=object name :
THREAD_SYNC_CHART_SERIES_STATE=STATE
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import java.util.Set;
import org.tizen.dynamicanalyzer.constant.CommonConstants;
import org.tizen.dynamicanalyzer.protocol.Protocol;
dest.add(source.get(i));
}
}
+
+ public void setSelectedFlatFeatures(Set<FlatFeature> set) {
+ selectedFlatFeatureList.clear();
+ selectedFlatFeatureList.addAll(set);
+ }
}
public class ProcessProfileData {
private int pid; // protocol 3.0
- private float processLoad; // protocol 3.0
+ private float processLoad; // protocol 3.0, in range [0-100]%
private long virtualMemory; // protocol 3.0
private long residentMemory; // protocol 3.0
private long sharedMemory; // protocol 3.0
}
double[] cpuFrequency = null; // protocol 3.0
- double[] cpuLoad = null; // protocol 3.0
+ double[] cpuLoad = null; // protocol 3.0 , in range [0-100]%
long systemMemoryUsed = 0; // protocol 3.0
int targetProcessCount = 0; // protocol 3.0
ProcessProfileData[] processProfileDataList = null; // protocol 3.0
this.otherProcessLoad = otherProcessLoad;
}
+ /**
+ * Get total system CPU load value.
+ * @return percentage of CPU load, scaled by number of CPU cores to be in range [0-100]%
+ */
public double getTotalCPULoad() {
if (cpuLoad == null) {
return 0.0;
}
+
+ // Calculate CPU load based on each core load information
double totalCPULoad = 0.0;
for (int i = 0; i < cpuLoad.length; i++) {
totalCPULoad += cpuLoad[i];
}
+ // Each core CPU load is in range 0-100%, so the sum should be scaled by CPU number
+ totalCPULoad /= cpuLoad.length;
+
+ // Calculate CPU load based on each process load information
double processCPULoad = getProcessCPULoad();
+
+ /*
+ * Revise "total cpu load" to prevent "total load" from being shown less than
+ * "process load". This problem occurs because time gap of calculating "total load"
+ * and "process load".
+ */
if (totalCPULoad < processCPULoad) {
Logger.warning("totalCPULoad [" + totalCPULoad + "] is less than processCPULoad [ + "
+ processCPULoad + "].");
- /*
- * Revise "total cpu load" to prevent "total load" from being shown less than
- * "process load". This problem is occurs because time gap of calculating "total load"
- * and "process load".
- */
totalCPULoad = processCPULoad;
}
return totalCPULoad;
import java.util.HashMap;
import java.util.List;
+import org.eclipse.nebula.widgets.grid.Grid;
import org.eclipse.nebula.widgets.grid.GridColumn;
import org.eclipse.nebula.widgets.grid.GridItem;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Composite;
import org.tizen.dynamicanalyzer.ui.file.model.FileAccessor;
import org.tizen.dynamicanalyzer.ui.file.model.FileEvent;
import org.tizen.dynamicanalyzer.ui.file.model.FileSelectedData;
+import org.tizen.dynamicanalyzer.ui.memory.MemoryChartView;
+import org.tizen.dynamicanalyzer.ui.memory.MemoryPage;
+import org.tizen.dynamicanalyzer.ui.network.NetworkChartView;
+import org.tizen.dynamicanalyzer.ui.network.NetworkPage;
+import org.tizen.dynamicanalyzer.ui.opengl.GLPage;
+import org.tizen.dynamicanalyzer.ui.opengl.chart.GLChartView;
+import org.tizen.dynamicanalyzer.ui.page.BaseView;
+import org.tizen.dynamicanalyzer.ui.range.RangeDataManager;
+import org.tizen.dynamicanalyzer.ui.thread.ThreadPage;
+import org.tizen.dynamicanalyzer.ui.thread.chart.ThreadChartView;
+import org.tizen.dynamicanalyzer.ui.timeline.TimelinePage;
+import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineChartView;
import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants;
+import org.tizen.dynamicanalyzer.ui.toolbar.Toolbar;
import org.tizen.dynamicanalyzer.ui.widgets.table.DAApiListTableComposite;
import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
import org.tizen.dynamicanalyzer.util.Logger;
+import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
+import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
import org.tizen.dynamicanalyzer.utils.Formatter;
public class FileApiListTable extends DAApiListTableComposite {
public void widgetDefaultSelected(SelectionEvent e) {
}
});
+
+ table.addMouseListener(new MouseListener() {
+
+ @Override
+ public void mouseUp(MouseEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mouseDown(MouseEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mouseDoubleClick(MouseEvent e) {
+ GridItem[] ti = ((Grid) e.widget).getSelection();
+ if (null == ti || ti.length == 0) {
+ return;
+ }
+ List<Object> markerData = ((DATableDataFormat) ti[0].getData()).getData();
+ long markerTime = Long.parseLong((String)markerData.get(1));
+ addMarker(markerTime);
+ }
+ });
+ }
+
+ private void addMarker(long markerTime) {
+ double startMarkerTime = markerTime / (TimelineConstants.MEGA_DOUBLE);
+
+ TimelineChartView TLchartView = (TimelineChartView) AnalyzerUtil.getView(TimelinePage.pageID, TimelineChartView.class.getName());
+ NetworkChartView NETchartView = (NetworkChartView) AnalyzerUtil.getView(NetworkPage.pageID, NetworkChartView.class.getName());
+ ThreadChartView THRchartView = (ThreadChartView) AnalyzerUtil.getView(ThreadPage.pageID, ThreadChartView.class.getName());
+ FileChartView FLchartView = (FileChartView) AnalyzerUtil.getView(FilePage.pageID, FileChartView.class.getName());
+ GLChartView GLchartview = (GLChartView) AnalyzerUtil.getView(GLPage.pageID, GLChartView.class.getName());
+ MemoryChartView MMchartView = (MemoryChartView) AnalyzerUtil.getView(MemoryPage.pageID, MemoryChartView.class.getName());
+
+ //1. add marker to rangedatamanager
+ RangeDataManager.getInstance().addMarkerTime(markerTime);
+
+ //2. add marker to toolbar
+ Toolbar.INSTANCE.addMarkerTime(startMarkerTime);
+
+ if(TLchartView != null)
+ TLchartView.updateView();
+ if(NETchartView != null)
+ NETchartView.updateView();
+ if(THRchartView != null)
+ THRchartView.updateView();
+ if(FLchartView != null)
+ FLchartView.updateView();
+ if(GLchartview != null)
+ GLchartview.updateView();
+ if(MMchartView != null)
+ MMchartView.updateView();
+
+ AnalyzerUtil.getMainTab().getTopComposite().updateView();
+ /// draw marker clearly
+ BaseView baseView = (BaseView) WorkbenchUtil.getViewPart(BaseView.ID);
+ baseView.getTopComposite().updateView();
}
@Override
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Sash;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
+import org.tizen.dynamicanalyzer.setting.SettingDataManager;
import org.tizen.dynamicanalyzer.shortcut.ShortCutManager;
import org.tizen.dynamicanalyzer.swap.logparser.DataManagerRegistry;
import org.tizen.dynamicanalyzer.ui.file.manager.FileDataManager;
+import org.tizen.dynamicanalyzer.ui.page.BaseView;
+import org.tizen.dynamicanalyzer.ui.page.PageInfoRegistry;
import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineTableView;
import org.tizen.dynamicanalyzer.util.Logger;
+import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
import org.tizen.dynamicanalyzer.widgets.da.view.DABaseComposite;
import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
import org.tizen.dynamicanalyzer.widgets.da.view.DATabComposite;
private DATabComposite fileDetailTableView = null;
boolean isDetailMode = true;
+
+ int tableHeight = -1;
+ int tableWeight = 65;
+
+ boolean wasSashCreated = false;
public FilePage(Composite parent, int style) {
super(parent, style);
bottomLeftForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
bottomRightForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
- bottomForm.setWeights(new int[] { 65, 35 });
+ bottomForm.setWeights(new int[] { tableWeight, 100 - tableWeight });
+
+ addTableWeightListener();
+ }
+
+ private void addHeightWeightListener() {
+ if(baseForm.getChildren().length > 2) {
+ ((Sash)baseForm.getChildren()[2]).addListener(SWT.MouseUp, new Listener() {
+ @Override
+ public void handleEvent(Event event) {
+ tableHeight = (int)((double)baseForm.getWeights()[0] / baseForm.getWeights()[0] + baseForm.getWeights()[1]) * baseForm.getSize().y * 1/1000;
+ }
+ });
+
+ wasSashCreated = true;
+ }
+ }
+
+ private void addTableWeightListener() {
+ ((SashForm)bottomForm.getChildren()[0]).addListener(SWT.Resize, new Listener(){
+ @Override
+ public void handleEvent(Event event) {
+ resizeTableButton();
+ }
+ });
}
+
@Override
public Composite getTopTable() {
@Override
protected void onResized(int width, int height) {
+ if(!wasSashCreated) { // This variable needs to check whether a Sash was created to calculate height ratio between chart area and table area
+ addHeightWeightListener();
+ }
+
+ resizePageButton();
+ resizeTableButton();
+
if(!isDetailMode) {
baseForm.setWeights(new int[] { 100, 0 });
} else {
- int hrate = (int) (TimelineTableView.DEFAULT_TABLE_VIEW_HEIGHT * 100 / height);
+ int hrate = (tableHeight == -1) ? (int) (TimelineTableView.DEFAULT_TABLE_VIEW_HEIGHT * 100 / height) :
+ (int) (tableHeight * 100 / height);
if(hrate > 100) {
return;
}
}
+ private void resizePageButton() {
+ int width = WorkbenchUtil.getWorkbenchWindow().getShell().getBounds().width;
+ int pageCount = PageInfoRegistry.getPageNamesByTarget(SettingDataManager.INSTANCE.getConnectedTarget().getTargetName()).size();
+
+ int newWidth = (width/pageCount > DATabComposite.LONG_TAB_WIDTH) ? DATabComposite.LONG_TAB_WIDTH : width/pageCount;
+ ((BaseView)WorkbenchUtil.getViewPart(BaseView.ID)).getMainTab().updateTabButtonsWidth(newWidth);
+ }
+
+ private void resizeTableButton() {
+ double weight = (double) bottomForm.getWeights()[0] / 1000;
+ int width = (int) (WorkbenchUtil.getWorkbenchWindow().getShell().getBounds().width * weight);
+ int tabCount = fileAPITableView.getTabButtons().size();
+
+ int newWidth = (width/tabCount > DATabComposite.LONG_TAB_WIDTH) ? DATabComposite.LONG_TAB_WIDTH : width/tabCount;
+ fileAPITableView.updateTabButtonsWidth(newWidth);
+ }
+
@Override
public void clear() {
super.clear();
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Sash;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
+import org.tizen.dynamicanalyzer.setting.SettingDataManager;
import org.tizen.dynamicanalyzer.shortcut.ShortCutManager;
import org.tizen.dynamicanalyzer.swap.logparser.DataManagerRegistry;
import org.tizen.dynamicanalyzer.ui.memory.data.HeapDataManager;
import org.tizen.dynamicanalyzer.ui.memory.data.MemoryDataManager;
+import org.tizen.dynamicanalyzer.ui.page.BaseView;
+import org.tizen.dynamicanalyzer.ui.page.PageInfoRegistry;
import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineTableView;
import org.tizen.dynamicanalyzer.util.Logger;
+import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
import org.tizen.dynamicanalyzer.widgets.da.view.DABaseComposite;
import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
import org.tizen.dynamicanalyzer.widgets.da.view.DATabComposite;
MemoryCallStackView memoryCallStackView;
boolean isDetailMode = true;
+
+ int tableHeight = -1;
+ int tableWeight = 65;
+
+ boolean wasSashCreated = false;
public MemoryPage(Composite parent, int style) {
super(parent, style);
bottomLeftForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
bottomRightForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
- bottomForm.setWeights(new int[] { 65, 35 });
-
+ bottomForm.setWeights(new int[] { tableWeight, 100 - tableWeight });
+
+ addTableWeightListener();
+ }
+
+ private void addHeightWeightListener() {
+ if(baseForm.getChildren().length > 2) {
+ ((Sash)baseForm.getChildren()[2]).addListener(SWT.MouseUp, new Listener() {
+ @Override
+ public void handleEvent(Event event) {
+ tableHeight = (int)((double)baseForm.getWeights()[0] / baseForm.getWeights()[0] + baseForm.getWeights()[1]) * baseForm.getSize().y * 1/1000;
+ }
+ });
+
+ wasSashCreated = true;
+ }
+ }
+
+ private void addTableWeightListener() {
+ ((SashForm)bottomForm.getChildren()[0]).addListener(SWT.Resize, new Listener(){
+ @Override
+ public void handleEvent(Event event) {
+ resizeTableButton();
+ }
+ });
}
@Override
@Override
protected void onResized(int width, int height) {
+ if(!wasSashCreated) { // This variable needs to check whether a Sash was created to calculate height ratio between chart area and table area
+ addHeightWeightListener();
+ }
+
+ resizePageButton();
+ resizeTableButton();
+
if(!isDetailMode) {
baseForm.setWeights(new int[] { 100, 0 });
} else {
- int hrate = (int) (TimelineTableView.DEFAULT_TABLE_VIEW_HEIGHT * 100 / height);
+ int hrate = (tableHeight == -1) ? (int) (TimelineTableView.DEFAULT_TABLE_VIEW_HEIGHT * 100 / height) :
+ (int) (tableHeight * 100 / height);
if(hrate > 100) {
return;
}
}
+ private void resizePageButton() {
+ int width = WorkbenchUtil.getWorkbenchWindow().getShell().getBounds().width;
+ int pageCount = PageInfoRegistry.getPageNamesByTarget(SettingDataManager.INSTANCE.getConnectedTarget().getTargetName()).size();
+
+ int newWidth = (width/pageCount > DATabComposite.LONG_TAB_WIDTH) ? DATabComposite.LONG_TAB_WIDTH : width/pageCount;
+ ((BaseView)WorkbenchUtil.getViewPart(BaseView.ID)).getMainTab().updateTabButtonsWidth(newWidth);
+ }
+
+ private void resizeTableButton() {
+ double weight = (double) bottomForm.getWeights()[0] / 1000;
+ int width = (int) (WorkbenchUtil.getWorkbenchWindow().getShell().getBounds().width * weight);
+ int tabCount = memoryTabView.getTabButtons().size();
+
+ int newWidth = (width/tabCount > DATabComposite.LONG_TAB_WIDTH) ? DATabComposite.LONG_TAB_WIDTH : width/tabCount;
+ memoryTabView.updateTabButtonsWidth(newWidth);
+ }
+
@Override
public void clear() {
super.clear();
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Sash;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
+import org.tizen.dynamicanalyzer.setting.SettingDataManager;
import org.tizen.dynamicanalyzer.shortcut.ShortCutManager;
import org.tizen.dynamicanalyzer.swap.logparser.DataManagerRegistry;
import org.tizen.dynamicanalyzer.ui.network.data.NetworkDataManager;
+import org.tizen.dynamicanalyzer.ui.page.BaseView;
+import org.tizen.dynamicanalyzer.ui.page.PageInfoRegistry;
import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineTableView;
import org.tizen.dynamicanalyzer.util.Logger;
+import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
import org.tizen.dynamicanalyzer.widgets.da.view.DABaseComposite;
import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
import org.tizen.dynamicanalyzer.widgets.da.view.DATabComposite;
SashForm bottomForm;
boolean isDetailMode = true;
+
+ int tableHeight = -1;
+ int tableWeight = 65;
+
+ boolean wasSashCreated = false;
public NetworkPage(Composite parent, int style) {
super(parent, style);
bottomLeftForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
bottomRightForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
- bottomForm.setWeights(new int[] { 65, 35 });
+ bottomForm.setWeights(new int[] { tableWeight, 100 - tableWeight });
+
+ addTableWeightListener();
+ }
+
+ private void addHeightWeightListener() {
+ if(baseForm.getChildren().length > 2) {
+ ((Sash)baseForm.getChildren()[2]).addListener(SWT.MouseUp, new Listener() {
+ @Override
+ public void handleEvent(Event event) {
+ tableHeight = (int)((double)baseForm.getWeights()[0] / baseForm.getWeights()[0] + baseForm.getWeights()[1]) * baseForm.getSize().y * 1/1000;
+ }
+ });
+
+ wasSashCreated = true;
+ }
+ }
+
+ private void addTableWeightListener() {
+ ((SashForm)bottomForm.getChildren()[0]).addListener(SWT.Resize, new Listener(){
+ @Override
+ public void handleEvent(Event event) {
+ resizeTableButton();
+ }
+ });
}
@Override
@Override
protected void onResized(int width, int height) {
+ if(!wasSashCreated) { // This variable needs to check whether a Sash was created to calculate height ratio between chart area and table area
+ addHeightWeightListener();
+ }
+
+ resizePageButton();
+ resizeTableButton();
+
if(!isDetailMode) {
baseForm.setWeights(new int[] { 100, 0 });
} else {
- int hrate = (int) (TimelineTableView.DEFAULT_TABLE_VIEW_HEIGHT * 100 / height);
+ int hrate = (tableHeight == -1) ? (int) (TimelineTableView.DEFAULT_TABLE_VIEW_HEIGHT * 100 / height) :
+ (int) (tableHeight * 100 / height);
if(hrate > 100) {
return;
}
}
+ private void resizePageButton() {
+ int width = WorkbenchUtil.getWorkbenchWindow().getShell().getBounds().width;
+ int pageCount = PageInfoRegistry.getPageNamesByTarget(SettingDataManager.INSTANCE.getConnectedTarget().getTargetName()).size();
+
+ int newWidth = (width/pageCount > DATabComposite.LONG_TAB_WIDTH) ? DATabComposite.LONG_TAB_WIDTH : width/pageCount;
+ ((BaseView)WorkbenchUtil.getViewPart(BaseView.ID)).getMainTab().updateTabButtonsWidth(newWidth);
+ }
+
+ private void resizeTableButton() {
+ double weight = (double) bottomForm.getWeights()[0] / 1000;
+ int width = (int) (WorkbenchUtil.getWorkbenchWindow().getShell().getBounds().width * weight);
+ int tabCount = networkAPITableView.getTabButtons().size();
+
+ int newWidth = (width/tabCount > DATabComposite.LONG_TAB_WIDTH) ? DATabComposite.LONG_TAB_WIDTH : width/tabCount;
+ networkAPITableView.updateTabButtonsWidth(newWidth);
+ }
+
@Override
public void clear() {
super.clear();
import java.util.LinkedHashMap;
import java.util.List;
+import org.eclipse.nebula.widgets.grid.Grid;
import org.eclipse.nebula.widgets.grid.GridColumn;
import org.eclipse.nebula.widgets.grid.GridItem;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Composite;
import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
import org.tizen.dynamicanalyzer.model.FilterProperty;
import org.tizen.dynamicanalyzer.model.TableInput;
+import org.tizen.dynamicanalyzer.ui.file.FileChartView;
+import org.tizen.dynamicanalyzer.ui.file.FilePage;
+import org.tizen.dynamicanalyzer.ui.memory.MemoryChartView;
+import org.tizen.dynamicanalyzer.ui.memory.MemoryPage;
import org.tizen.dynamicanalyzer.ui.network.data.NetworkAPIDBManager;
import org.tizen.dynamicanalyzer.ui.network.data.NetworkDataManager;
import org.tizen.dynamicanalyzer.ui.network.data.type.NetworkAPIType;
import org.tizen.dynamicanalyzer.ui.network.data.type.NetworkSelectionType;
+import org.tizen.dynamicanalyzer.ui.opengl.GLPage;
+import org.tizen.dynamicanalyzer.ui.opengl.chart.GLChartView;
+import org.tizen.dynamicanalyzer.ui.page.BaseView;
+import org.tizen.dynamicanalyzer.ui.range.RangeDataManager;
+import org.tizen.dynamicanalyzer.ui.thread.ThreadPage;
+import org.tizen.dynamicanalyzer.ui.thread.chart.ThreadChartView;
+import org.tizen.dynamicanalyzer.ui.timeline.TimelinePage;
+import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineChartView;
+import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants;
import org.tizen.dynamicanalyzer.ui.toolbar.Toolbar;
import org.tizen.dynamicanalyzer.ui.widgets.table.DAApiListTableComposite;
import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
+import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
+import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
import org.tizen.dynamicanalyzer.utils.Formatter;
public class NetworkTable extends DAApiListTableComposite {
public void widgetDefaultSelected(SelectionEvent e) {
}
});
+
+ table.addMouseListener(new MouseListener() {
+
+ @Override
+ public void mouseUp(MouseEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mouseDown(MouseEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mouseDoubleClick(MouseEvent e) {
+ GridItem[] ti = ((Grid) e.widget).getSelection();
+ if (null == ti || ti.length == 0) {
+ return;
+ }
+ List<Object> markerData = ((DATableDataFormat) ti[0].getData()).getData();
+ long markerTime = Long.parseLong((String)markerData.get(1));
+ addMarker(markerTime);
+ }
+ });
+ }
+
+ private void addMarker(long markerTime) {
+ double startMarkerTime = markerTime / (TimelineConstants.MEGA_DOUBLE);
+
+ TimelineChartView TLchartView = (TimelineChartView) AnalyzerUtil.getView(TimelinePage.pageID, TimelineChartView.class.getName());
+ NetworkChartView NETchartView = (NetworkChartView) AnalyzerUtil.getView(NetworkPage.pageID, NetworkChartView.class.getName());
+ ThreadChartView THRchartView = (ThreadChartView) AnalyzerUtil.getView(ThreadPage.pageID, ThreadChartView.class.getName());
+ FileChartView FLchartView = (FileChartView) AnalyzerUtil.getView(FilePage.pageID, FileChartView.class.getName());
+ GLChartView GLchartview = (GLChartView) AnalyzerUtil.getView(GLPage.pageID, GLChartView.class.getName());
+ MemoryChartView MMchartView = (MemoryChartView) AnalyzerUtil.getView(MemoryPage.pageID, MemoryChartView.class.getName());
+
+ //1. add marker to rangedatamanager
+ RangeDataManager.getInstance().addMarkerTime(markerTime);
+
+ //2. add marker to toolbar
+ Toolbar.INSTANCE.addMarkerTime(startMarkerTime);
+
+ if(TLchartView != null)
+ TLchartView.updateView();
+ if(NETchartView != null)
+ NETchartView.updateView();
+ if(THRchartView != null)
+ THRchartView.updateView();
+ if(FLchartView != null)
+ FLchartView.updateView();
+ if(GLchartview != null)
+ GLchartview.updateView();
+ if(MMchartView != null)
+ MMchartView.updateView();
+
+ AnalyzerUtil.getMainTab().getTopComposite().updateView();
+ /// draw marker clearly
+ BaseView baseView = (BaseView) WorkbenchUtil.getViewPart(BaseView.ID);
+ baseView.getTopComposite().updateView();
}
@Override
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Sash;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.ui.opengl.table.state.GLRedundantTableView;
import org.tizen.dynamicanalyzer.ui.opengl.table.state.GLStatisticsTableView;
import org.tizen.dynamicanalyzer.ui.opengl.table.state.GLTextureTableView;
+import org.tizen.dynamicanalyzer.ui.page.BaseView;
+import org.tizen.dynamicanalyzer.ui.page.PageInfoRegistry;
import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineTableView;
import org.tizen.dynamicanalyzer.util.Logger;
+import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
import org.tizen.dynamicanalyzer.widgets.da.view.DABaseComposite;
import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
import org.tizen.dynamicanalyzer.widgets.da.view.DATabComposite;
import org.tizen.dynamicanalyzer.widgets.da.view.DAViewComposite;
import org.tizen.dynamicanalyzer.resources.ColorResources;
+import org.tizen.dynamicanalyzer.setting.SettingDataManager;
public class GLPage extends DAPageComposite {
public static final String pageID = GLPage.class.getName();
SashForm baseForm;
SashForm topForm;
SashForm bottomForm;
+ SashForm bottomLeftForm;
+ SashForm bottomRightForm;
GLChartView glChartView;
GLAPIListView glAPIListView;
boolean isDetailMode = true;
+ int tableHeight = -1;
+ int tableWeight = 50;
+
+ boolean wasSashCreated = false;
+
public GLPage(Composite parent, int style) {
super(parent, style);
setTitle(AnalyzerLabels.COOLBAR_AREA_OPENGLES);
addView(glChartView);
bottomForm = new SashForm(baseForm, SWT.HORIZONTAL);
- glLeftTableView = new DATabComposite(bottomForm, SWT.NONE, false, true);
+
+ bottomLeftForm = new SashForm(bottomForm, SWT.NONE);
+ bottomLeftForm.setForeground(ColorResources.TAB_SELECTED_COLOR_START);
+ bottomLeftForm.setLayout(new FillLayout());
+
+ bottomRightForm = new SashForm(bottomForm, SWT.NONE);
+ bottomRightForm.setForeground(ColorResources.TAB_SELECTED_COLOR_START);
+ bottomRightForm.setLayout(new FillLayout());
+
+ glLeftTableView = new DATabComposite(bottomLeftForm, SWT.NONE, false, true);
{
GLStatisticsTableView glStatisticsView = new GLStatisticsTableView(glLeftTableView.getContentComposite(), SWT.NONE);
glLeftTableView.addView(glStatisticsView);
}
addView(glLeftTableView);
- glRightTableView = new DATabComposite(bottomForm, SWT.NONE, false, true);
+ glRightTableView = new DATabComposite(bottomRightForm, SWT.NONE, false, true);
{
GLRedundantTableView glRedundantView = new GLRedundantTableView(glRightTableView.getContentComposite(), SWT.NONE);
glRightTableView.addView(glRedundantView);
topForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
bottomForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
+ bottomLeftForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
+ bottomRightForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
+
+ bottomForm.setWeights(new int[] { tableWeight, 100 - tableWeight });
+
+ addTableWeightListener();
+ }
+
+ private void addTableWeightListener() {
+ ((SashForm)bottomForm.getChildren()[0]).addListener(SWT.Resize, new Listener(){
+ @Override
+ public void handleEvent(Event event) {
+ resizeLeftTableButton();
+ resizeRightTableButton();
+ }
+ });
+ }
+
+ private void addHeightWeightListener() {
+ if(baseForm.getChildren().length > 2) {
+ ((Sash)baseForm.getChildren()[2]).addListener(SWT.MouseUp, new Listener() {
+ @Override
+ public void handleEvent(Event event) {
+ tableHeight = (int)((double)baseForm.getWeights()[0] / baseForm.getWeights()[0] + baseForm.getWeights()[1]) * baseForm.getSize().y * 1/1000;
+ }
+ });
+
+ wasSashCreated = true;
+ }
}
@Override
@Override
protected void onResized(int width, int height) {
+ if(!wasSashCreated) { // This variable needs to check whether a Sash was created to calculate height ratio between chart area and table area
+ addHeightWeightListener();
+ }
+
+ resizePageButton();
+ resizeLeftTableButton();
+ resizeRightTableButton();
+
if(!isDetailMode) {
baseForm.setWeights(new int[] { 100, 0 });
} else {
- int hrate = (int) (TimelineTableView.DEFAULT_TABLE_VIEW_HEIGHT * 100 / height);
+ int hrate = (tableHeight == -1) ? (int) (TimelineTableView.DEFAULT_TABLE_VIEW_HEIGHT * 100 / height) :
+ (int) (tableHeight * 100 / height);
if(hrate > 100) {
return;
baseForm.setWeights(new int[] { 100 - hrate, hrate });
}
}
+
+ private void resizePageButton() {
+ int width = WorkbenchUtil.getWorkbenchWindow().getShell().getBounds().width;
+ int pageCount = PageInfoRegistry.getPageNamesByTarget(SettingDataManager.INSTANCE.getConnectedTarget().getTargetName()).size();
+
+ int newWidth = (width/pageCount > DATabComposite.LONG_TAB_WIDTH) ? DATabComposite.LONG_TAB_WIDTH : width/pageCount;
+ ((BaseView)WorkbenchUtil.getViewPart(BaseView.ID)).getMainTab().updateTabButtonsWidth(newWidth);
+ }
+
+ private void resizeLeftTableButton() {
+ double weight = (double) bottomForm.getWeights()[0] / 1000;
+ int width = (int) (WorkbenchUtil.getWorkbenchWindow().getShell().getBounds().width * weight);
+ int tabCount = glLeftTableView.getTabButtons().size();
+
+ int newWidth = (width/tabCount > DATabComposite.LONG_TAB_WIDTH) ? DATabComposite.LONG_TAB_WIDTH : width/tabCount;
+ glLeftTableView.updateTabButtonsWidth(newWidth);
+ }
+
+ private void resizeRightTableButton() {
+ double weight = (double) bottomForm.getWeights()[1] / 1000;
+ int width = (int) (WorkbenchUtil.getWorkbenchWindow().getShell().getBounds().width * weight);
+ int tabCount = glRightTableView.getTabButtons().size();
+
+ int newWidth = (width/tabCount > DATabComposite.LONG_TAB_WIDTH) ? DATabComposite.LONG_TAB_WIDTH : width/tabCount;
+ glRightTableView.updateTabButtonsWidth(newWidth);
+ }
@Override
public void clear() {
public GLAPITable(Composite parent, int style, int tableStyle) {
super(parent, style, tableStyle);
- setContextMenu(AnalyzerConstants.CONTEXT_TABLE_RANGE);
table.addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent e) {
public GLContextTable(Composite parent, int style, int tableStyle) {
super(parent, style, tableStyle);
- setContextMenu(AnalyzerConstants.CONTEXT_TABLE_RANGE);
table.addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent e) {
public GLProgramTable(Composite parent, int style, int tableStyle) {
super(parent, style, tableStyle);
- setContextMenu(AnalyzerConstants.CONTEXT_TABLE_RANGE);
table.addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent e) {
public GLRedundantTable(Composite parent, int style, int tableStyle) {
super(parent, style, tableStyle);
- setContextMenu(AnalyzerConstants.CONTEXT_TABLE_RANGE);
table.addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent e) {
public class GLStatisticsTable extends DATableComposite {
public GLStatisticsTable(Composite parent, int style, int tableStyle) {
super(parent, style, tableStyle);
- setContextMenu(AnalyzerConstants.CONTEXT_TABLE_RANGE);
table.addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent e) {
public GLTextureTable(Composite parent, int style, int tableStyle) {
super(parent, style, tableStyle);
- setContextMenu(AnalyzerConstants.CONTEXT_TABLE_RANGE);
table.addSelectionListener(new SelectionListener() {
@Override
public void widgetSelected(SelectionEvent e) {
currentShell.close();
} else if(((e.stateMask & SWT.CTRL) == SWT.CTRL) && (e.keyCode == 'n')) {
if(MenuBar.getInstance().getFileNew().isEnabled()) {
- CommonAction.clear();
- Toolbar.INSTANCE.clearMarkerTimeList();
- RangeDataManager.getInstance().clearMarkerTime();
- RangeDataManager.getInstance().clearTimelineMarker();
-
- // change UI state
- Toolbar.INSTANCE.changeUIState(DAState.INIT);
- Toolbar.INSTANCE.setScaleSelection(DAScale.DEFAULT_SCALE_INDEX);
-
- FlatFeatureDialog featureDialog = new FlatFeatureDialog(currentShell);
- featureDialog.open();
-
- /// if Feature Select changed and OK, is NewSetting is true.
- if(SettingDataManager.INSTANCE.isNewSetting()){
- // reset checks on ReportMenu items
- MenuBar.getInstance().resetReportItemCheck();
- }
+ MenuBar.getInstance().getFileNew().notifyListeners(SWT.Selection, new Event());
}
} else if(((e.stateMask & SWT.CTRL) == SWT.CTRL) && (e.keyCode == 't')) {
TargetDialog targetDialog = new TargetDialog(currentShell);
MenuBar.getInstance().getViewDetail().setSelection(true);
}
MenuBar.getInstance().getViewDetail().notifyListeners(SWT.Selection, new Event());
- } else if(((e.stateMask & SWT.CTRL) == SWT.CTRL) && (e.keyCode == 'f')) {
- MenuBar.getInstance().getAnalyzeSearch().notifyListeners(SWT.Selection, new Event());
} else if(e.keyCode == SWT.F9) {
if(DAState.isRunning()) {
TargetData target = SettingDataManager.INSTANCE.getConnectedTarget();
tableView.removeView(WarningDataView.class.getName(), false);
}
}
+ ((TimelinePage)AnalyzerUtil.getTabPage(TimelinePage.pageID)).resizeTableButton();
}
};
import java.util.Comparator;
import java.util.List;
+import org.eclipse.nebula.widgets.grid.Grid;
import org.eclipse.nebula.widgets.grid.GridColumn;
import org.eclipse.nebula.widgets.grid.GridItem;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Composite;
import org.tizen.dynamicanalyzer.model.TableInput;
import org.tizen.dynamicanalyzer.swap.model.data.ProbeCommonData;
import org.tizen.dynamicanalyzer.swap.model.data.SyncData;
+import org.tizen.dynamicanalyzer.ui.file.FileChartView;
+import org.tizen.dynamicanalyzer.ui.file.FilePage;
+import org.tizen.dynamicanalyzer.ui.memory.MemoryChartView;
+import org.tizen.dynamicanalyzer.ui.memory.MemoryPage;
+import org.tizen.dynamicanalyzer.ui.network.NetworkChartView;
+import org.tizen.dynamicanalyzer.ui.network.NetworkPage;
+import org.tizen.dynamicanalyzer.ui.opengl.GLPage;
+import org.tizen.dynamicanalyzer.ui.opengl.chart.GLChartView;
+import org.tizen.dynamicanalyzer.ui.page.BaseView;
+import org.tizen.dynamicanalyzer.ui.range.RangeDataManager;
+import org.tizen.dynamicanalyzer.ui.thread.chart.ThreadChartView;
import org.tizen.dynamicanalyzer.ui.thread.data.ThreadDataManager;
import org.tizen.dynamicanalyzer.ui.thread.db.SyncAPIDBTable;
import org.tizen.dynamicanalyzer.ui.thread.db.ThreadAPIDBTable;
import org.tizen.dynamicanalyzer.ui.thread.type.ThreadPageSyncData;
import org.tizen.dynamicanalyzer.ui.thread.type.ThreadPageSyncDataEvent;
import org.tizen.dynamicanalyzer.ui.thread.type.ThreadPageThreadData;
+import org.tizen.dynamicanalyzer.ui.timeline.TimelinePage;
+import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineChartView;
+import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants;
+import org.tizen.dynamicanalyzer.ui.toolbar.Toolbar;
import org.tizen.dynamicanalyzer.ui.widgets.table.DAApiListTableComposite;
import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
import org.tizen.dynamicanalyzer.util.Logger;
+import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
+import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
import org.tizen.dynamicanalyzer.utils.Formatter;
public class ThreadAPIListTable extends DAApiListTableComposite {
// do nothing
}
});
+
+ table.addMouseListener(new MouseListener() {
+
+ @Override
+ public void mouseUp(MouseEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mouseDown(MouseEvent e) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void mouseDoubleClick(MouseEvent e) {
+ GridItem[] ti = ((Grid) e.widget).getSelection();
+ if (null == ti || ti.length == 0) {
+ return;
+ }
+ List<Object> markerData = ((DATableDataFormat) ti[0].getData()).getData();
+ long markerTime = Long.parseLong((String)markerData.get(1));
+ addMarker(markerTime);
+ }
+ });
+ }
+
+ private void addMarker(long markerTime) {
+ double startMarkerTime = markerTime / (TimelineConstants.MEGA_DOUBLE);
+
+ TimelineChartView TLchartView = (TimelineChartView) AnalyzerUtil.getView(TimelinePage.pageID, TimelineChartView.class.getName());
+ NetworkChartView NETchartView = (NetworkChartView) AnalyzerUtil.getView(NetworkPage.pageID, NetworkChartView.class.getName());
+ ThreadChartView THRchartView = (ThreadChartView) AnalyzerUtil.getView(ThreadPage.pageID, ThreadChartView.class.getName());
+ FileChartView FLchartView = (FileChartView) AnalyzerUtil.getView(FilePage.pageID, FileChartView.class.getName());
+ GLChartView GLchartview = (GLChartView) AnalyzerUtil.getView(GLPage.pageID, GLChartView.class.getName());
+ MemoryChartView MMchartView = (MemoryChartView) AnalyzerUtil.getView(MemoryPage.pageID, MemoryChartView.class.getName());
+
+ //1. add marker to rangedatamanager
+ RangeDataManager.getInstance().addMarkerTime(markerTime);
+
+ //2. add marker to toolbar
+ Toolbar.INSTANCE.addMarkerTime(startMarkerTime);
+
+ if(TLchartView != null)
+ TLchartView.updateView();
+ if(NETchartView != null)
+ NETchartView.updateView();
+ if(THRchartView != null)
+ THRchartView.updateView();
+ if(FLchartView != null)
+ FLchartView.updateView();
+ if(GLchartview != null)
+ GLchartview.updateView();
+ if(MMchartView != null)
+ MMchartView.updateView();
+
+ AnalyzerUtil.getMainTab().getTopComposite().updateView();
+ /// draw marker clearly
+ BaseView baseView = (BaseView) WorkbenchUtil.getViewPart(BaseView.ID);
+ baseView.getTopComposite().updateView();
}
@Override
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Sash;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
+import org.tizen.dynamicanalyzer.setting.SettingDataManager;
import org.tizen.dynamicanalyzer.shortcut.ShortCutManager;
import org.tizen.dynamicanalyzer.swap.logparser.DataManagerRegistry;
+import org.tizen.dynamicanalyzer.ui.page.BaseView;
+import org.tizen.dynamicanalyzer.ui.page.PageInfoRegistry;
import org.tizen.dynamicanalyzer.ui.thread.chart.ThreadChartView;
import org.tizen.dynamicanalyzer.ui.thread.data.ThreadDataManager;
import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineTableView;
import org.tizen.dynamicanalyzer.util.Logger;
+import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
import org.tizen.dynamicanalyzer.widgets.da.view.DABaseComposite;
import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
import org.tizen.dynamicanalyzer.widgets.da.view.DATabComposite;
SashForm bottomForm;
boolean isDetailMode = true;
+
+ int tableHeight = -1;
+ int tableWeight = 65;
+
+ boolean wasSashCreated = false;
public ThreadPage(Composite parent, int style) {
super(parent, style);
bottomLeftForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
bottomRightForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
- bottomForm.setWeights(new int[] { 65, 35 });
+ bottomForm.setWeights(new int[] { tableWeight, 100 - tableWeight });
+
+ addTableWeightListener();
+ }
+
+ private void addHeightWeightListener() {
+ if(baseForm.getChildren().length > 2) {
+ ((Sash)baseForm.getChildren()[2]).addListener(SWT.MouseUp, new Listener() {
+ @Override
+ public void handleEvent(Event event) {
+ tableHeight = (int)((double)baseForm.getWeights()[0] / baseForm.getWeights()[0] + baseForm.getWeights()[1]) * baseForm.getSize().y * 1/1000;
+ }
+ });
+
+ wasSashCreated = true;
+ }
+ }
+
+ private void addTableWeightListener() {
+ ((SashForm)bottomForm.getChildren()[0]).addListener(SWT.Resize, new Listener(){
+ @Override
+ public void handleEvent(Event event) {
+ resizeTableButton();
+ }
+ });
}
@Override
@Override
protected void onResized(int width, int height) {
+ if(!wasSashCreated) { // This variable needs to check whether a Sash was created to calculate height ratio between chart area and table area
+ addHeightWeightListener();
+ }
+
+ resizePageButton();
+ resizeTableButton();
+
if(!isDetailMode) {
baseForm.setWeights(new int[] { 100, 0 });
} else {
- int hrate = (int) (TimelineTableView.DEFAULT_TABLE_VIEW_HEIGHT * 100 / height);
+ int hrate = (tableHeight == -1) ? (int) (TimelineTableView.DEFAULT_TABLE_VIEW_HEIGHT * 100 / height) :
+ (int) (tableHeight * 100 / height);
if(hrate > 100) {
return;
}
}
+ private void resizePageButton() {
+ int width = WorkbenchUtil.getWorkbenchWindow().getShell().getBounds().width;
+ int pageCount = PageInfoRegistry.getPageNamesByTarget(SettingDataManager.INSTANCE.getConnectedTarget().getTargetName()).size();
+
+ int newWidth = (width/pageCount > DATabComposite.LONG_TAB_WIDTH) ? DATabComposite.LONG_TAB_WIDTH : width/pageCount;
+ ((BaseView)WorkbenchUtil.getViewPart(BaseView.ID)).getMainTab().updateTabButtonsWidth(newWidth);
+ }
+
+ private void resizeTableButton() {
+ double weight = (double) bottomForm.getWeights()[0] / 1000;
+ int width = (int) (WorkbenchUtil.getWorkbenchWindow().getShell().getBounds().width * weight);
+ int tabCount = threadApiTableView.getTabButtons().size();
+
+ int newWidth = (width/tabCount > DATabComposite.LONG_TAB_WIDTH) ? DATabComposite.LONG_TAB_WIDTH : width/tabCount;
+ threadApiTableView.updateTabButtonsWidth(newWidth);
+ }
+
@Override
public void clear() {
super.clear();
}
return returnList;
}
+
+ public List<SyncChart> getSyncChartList() {
+ return syncChartItemList;
+ }
}
private DAToolBarCustomCombo threadProcessCombo;
private DAToolBarCustomCombo syncProcessCombo;
-
- private DACustomButton threadDimensionSwitchButton;
- private DACustomButton syncDimensionSwitchButton;
public ThreadChartView(Composite parent, int style) {
super(parent, style, false);
FormData data = new FormData();
data.top = new FormAttachment(0, 0);
data.left = new FormAttachment(0, 0);
- data.width = 167;
+ data.width = 192;
data.height = 25;
threadProcessCombo.setLayoutData(data);
syncProcessCombo = makeDACustomCombo(syncChartBoard.getTitleComp());
syncProcessCombo.setLayoutData(data);
- threadDimensionSwitchButton = new DACustomButton(threadChartBoard.getTitleComp(),
- ImageResources.DIMENSION_IC_NOR,
- ImageResources.DIMENSION_IC_NOR,
- ImageResources.DIMENSION_IC_NOR,
- ImageResources.DIMENSION_IC_NOR
- );
-
- syncDimensionSwitchButton = new DACustomButton(syncChartBoard.getTitleComp(),
- ImageResources.DIMENSION_IC_SEL,
- ImageResources.DIMENSION_IC_SEL,
- ImageResources.DIMENSION_IC_SEL,
- ImageResources.DIMENSION_IC_SEL
- );
-
- threadDimensionSwitchButton.setForeground(ColorResources.GRAY_170);
- threadDimensionSwitchButton.setBackground(ColorResources.WHITE);
- syncDimensionSwitchButton.setForeground(ColorResources.GRAY_170);
- syncDimensionSwitchButton.setBackground(ColorResources.WHITE);
-
- threadDimensionSwitchButton.setRenderer(new DACustomButtonRenderer() {
- @Override
- public void draw(GC gc, Canvas canvas, int state,
- DACustomButtonAttribute attr) {
- Rectangle rect = canvas.getClientArea();
-
- if (attr.getDrawType() == DACustomButton.TYPE_IMAGE) {
- drawImageButton(gc, rect, state, attr);
- } else if (attr.getDrawType() == DACustomButton.TYPE_COLOR
- || attr.getDrawType() == DACustomButton.TYPE_GRADATION) {
- drawButton(gc, rect, state, attr);
- }
- drawButtonImage(gc, rect, attr, state);
- drawIcon(gc, rect, attr);
- gc.drawLine(0, 0, 25, 0);
- gc.drawLine(0, 24, 25, 24);
- gc.drawLine(24, 0, 24, 24);
- }
- });
-
- syncDimensionSwitchButton.setRenderer(new DACustomButtonRenderer() {
- @Override
- public void draw(GC gc, Canvas canvas, int state,
- DACustomButtonAttribute attr) {
- Rectangle rect = canvas.getClientArea();
-
- if (attr.getDrawType() == DACustomButton.TYPE_IMAGE) {
- drawImageButton(gc, rect, state, attr);
- } else if (attr.getDrawType() == DACustomButton.TYPE_COLOR
- || attr.getDrawType() == DACustomButton.TYPE_GRADATION) {
- drawButton(gc, rect, state, attr);
- }
- drawButtonImage(gc, rect, attr, state);
- drawIcon(gc, rect, attr);
- gc.drawLine(0, 0, 25, 0);
- gc.drawLine(0, 24, 25, 24);
- gc.drawLine(24, 0, 24, 24);
- }
- });
-
- threadDimensionSwitchButton.addClickListener(new DACustomButtonClickEventListener() {
- @Override
- public void handleEvent(Event event) {
- changeBoardThreadToSync();
- }
-
- @Override
- public void handleClickEvent(DACustomButton button) {
-
- }
- });
-
- syncDimensionSwitchButton.addClickListener(new DACustomButtonClickEventListener() {
- @Override
- public void handleEvent(Event event) {
- changeBoardSyncToThread();
- }
-
- @Override
- public void handleClickEvent(DACustomButton button) {
-
- }
- });
-
- data = new FormData();
- data.top = new FormAttachment(0, 0);
- data.left = new FormAttachment(threadProcessCombo, 0);
- data.width = 25;
- data.height = 25;
- threadDimensionSwitchButton.setLayoutData(data);
-
- data = new FormData();
- data.top = new FormAttachment(0, 0);
- data.left = new FormAttachment(syncProcessCombo, 0);
- data.width = 25;
- data.height = 25;
- syncDimensionSwitchButton.setLayoutData(data);
-
initProcessCombo(threadProcessCombo);
initProcessCombo(syncProcessCombo);
updateScale();
ImageResources.DROP_ARROW_DOWN_SEL,
ImageResources.DROP_ARROW_DOWN_HOVER,
ImageResources.DROP_ARROW_DOWN_DIM);
- returnCombo.setComboImagePoint(new Point(135, 9));
+ returnCombo.setComboImagePoint(new Point(160, 9));
returnCombo.setComboButtonColor(ColorResources.WHITE,
ColorResources.WHITE,
ColorResources.WHITE,
public void updateMarker() {
List<Double> markerTimeList = Toolbar.INSTANCE.getMarkerTimeList();
- List<ThreadChart> chartList = threadChartBoard.getThreadChartItemList();
- for(ThreadChart chart : chartList) {
- chart.getChart().getPlot().clearMarkerTime();
+
+ List<ThreadChart> threadChartList = threadChartBoard.getThreadChartItemList();
+ for(ThreadChart threadChart : threadChartList) {
+ threadChart.getChart().getPlot().clearMarkerTime();
}
for(double time : markerTimeList) {
- for(ThreadChart chart : chartList) {
- chart.getChart().getPlot().addMarkerTime(time);
+ for(ThreadChart threadChart : threadChartList) {
+ threadChart.getChart().getPlot().addMarkerTime(time);
}
threadChartBoard.getTimeline().addMarker(time);
}
+
+ List<SyncChart> syncChartList = threadChartBoard.getSyncChartList();
+ for(SyncChart syncChart : syncChartList) {
+ syncChart.getChart().getPlot().clearMarkerTime();
+ }
+ for(double time : markerTimeList) {
+ for(SyncChart syncChart : syncChartList) {
+ syncChart.getChart().getPlot().addMarkerTime(time);
+ }
+ }
}
@Override
import org.tizen.dynamicanalyzer.database.DBTable;
import org.tizen.dynamicanalyzer.util.Logger;
+/**
+ * DB table representing the system information summarized for all running
+ * processes.
+ */
public class SystemDataDBTable extends DBTable {
private static final String TABLENAME = "TIMELINE_SYSTEM_DATA";
public static enum COLUMN {
SAMPLING_TIME,
+ // CPU load in %, scaled by number of CPU cores to be in range [0-100]%
CPU_LOAD_TOTAL,
PROCESS_COUNT_OTHER,
PROCESS_COUNT_TARGET,
import org.tizen.dynamicanalyzer.database.DBTable;
import org.tizen.dynamicanalyzer.util.Logger;
+/**
+ * DB table representing system information for a process of traced application
+ * (aka "target process")
+ */
public class TargetProcessDBTable extends DBTable {
private static final String TABLENAME = "TIMELINE_TARGET_PROCESS";
public static enum COLUMN {
SAMPLING_TIME,
PID,
+ // CPU load in %, scaled by number of CPU cores to be in range [0-100]%
CPU_LOAD,
MEMORY_VIRTUAL,
MEMORY_RESIDENT,
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Sash;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
import org.tizen.dynamicanalyzer.common.Global;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
+import org.tizen.dynamicanalyzer.setting.SettingDataManager;
import org.tizen.dynamicanalyzer.shortcut.ShortCutManager;
-import org.tizen.dynamicanalyzer.swap.logparser.DataManagerRegistry;
import org.tizen.dynamicanalyzer.ui.info.callstack.CallstackView;
import org.tizen.dynamicanalyzer.ui.info.screenshot.ScreenshotDataManager;
import org.tizen.dynamicanalyzer.ui.interactive.data.InteractiveDataManager;
-import org.tizen.dynamicanalyzer.ui.memory.data.MemoryDataManager;
+import org.tizen.dynamicanalyzer.ui.page.BaseView;
+import org.tizen.dynamicanalyzer.ui.page.PageInfoRegistry;
import org.tizen.dynamicanalyzer.ui.summary.SummaryDataManager;
import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfiler;
import org.tizen.dynamicanalyzer.ui.timeline.calltrace.CallTraceDataManager;
import org.tizen.dynamicanalyzer.ui.timeline.calltrace.CallTraceView;
import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineChartManager;
-import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineDataManager;
import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineChartView;
+import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineDataManager;
import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineTableView;
-import org.tizen.dynamicanalyzer.ui.timeline.dlog.DLogDataManager;
import org.tizen.dynamicanalyzer.ui.toolbar.replay.data.ReplayDataManager;
+import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
import org.tizen.dynamicanalyzer.widgets.da.view.DABaseComposite;
import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
import org.tizen.dynamicanalyzer.widgets.da.view.DATabComposite;
TimelineTableView timelineTableView;
boolean isDetailMode = true;
+
+ int tableHeight = -1;
+ int tableWeight = 65;
+
+ boolean wasSashCreated = false;
public TimelinePage(Composite parent, int style) {
super(parent, style);
bottomLeftForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
bottomRightForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
- bottomForm.setWeights(new int[] { 65, 35 });
+ bottomForm.setWeights(new int[] { tableWeight, 100 - tableWeight });
+
+ addTableWeightListener();
+ }
+
+ private void addHeightWeightListener() {
+ if(baseForm.getChildren().length > 2) {
+ ((Sash)baseForm.getChildren()[2]).addListener(SWT.MouseUp, new Listener() {
+ @Override
+ public void handleEvent(Event event) {
+ tableHeight = baseForm.getWeights()[1] * baseForm.getSize().y / 1000;
+ }
+ });
+
+ wasSashCreated = true;
+ }
+ }
+
+ private void addTableWeightListener() {
+ ((SashForm)bottomForm.getChildren()[0]).addListener(SWT.Resize, new Listener(){
+ @Override
+ public void handleEvent(Event event) {
+ resizeTableButton();
+ }
+ });
}
@Override
@Override
protected void onResized(int width, int height) {
+ if(!wasSashCreated) { // This variable needs to check whether a Sash was created to calculate height ratio between chart area and table area
+ addHeightWeightListener();
+ }
+
+ resizePageButton();
+ resizeTableButton();
+
if(!isDetailMode) {
baseForm.setWeights(new int[] { 100, 0 });
} else {
- int hrate = (int) (TimelineTableView.DEFAULT_TABLE_VIEW_HEIGHT * 100 / height);
+ int hrate = (tableHeight == -1) ? (int) (TimelineTableView.DEFAULT_TABLE_VIEW_HEIGHT * 100 / height) :
+ (int) (tableHeight * 100 / height);
if(hrate > 100) {
return;
baseForm.setWeights(new int[] { 100 - hrate, hrate });
}
}
+
+ private void resizePageButton() {
+ int width = WorkbenchUtil.getWorkbenchWindow().getShell().getBounds().width;
+ int pageCount = PageInfoRegistry.getPageNamesByTarget(SettingDataManager.INSTANCE.getConnectedTarget().getTargetName()).size();
+
+ int newWidth = (width/pageCount > DATabComposite.LONG_TAB_WIDTH) ? DATabComposite.LONG_TAB_WIDTH : width/pageCount;
+ ((BaseView)WorkbenchUtil.getViewPart(BaseView.ID)).getMainTab().updateTabButtonsWidth(newWidth);
+ }
+
+ public void resizeTableButton() {
+ double weight = (double) bottomForm.getWeights()[0] / 1000;
+ int width = (int) (WorkbenchUtil.getWorkbenchWindow().getShell().getBounds().width * weight);
+ int tabCount = timelineTableView.getTabButtons().size();
+
+ int newWidth = (width/tabCount > DATabComposite.LONG_TAB_WIDTH) ? DATabComposite.LONG_TAB_WIDTH : width/tabCount;
+ timelineTableView.updateTabButtonsWidth(newWidth);
+ }
@Override
public void clear() {
parent.addControlListener(new WindowingTableColumnSizePackListener(this, columnSizes));
setDataType(FunctionEntryDBTable.COLUMN.START_TIME.index); // use new DB
- setContextMenu(AnalyzerConstants.CONTEXT_TABLE_SOURCE
- | AnalyzerConstants.CONTEXT_TABLE_RANGE);
+ setContextMenu(AnalyzerConstants.CONTEXT_TABLE_SOURCE);
table.addSelectionListener(new SelectionListener() {
import org.tizen.dynamicanalyzer.widgets.popupMenu.DAPopupMenu;
public class CPUChart extends TimelineChart {
+ /**
+ * For each time moment this series presents
+ * the summary CPU load(%) for all processes of traced application.
+ * The CPU load is scaled by number of CPU cores to be in range [0-100]%
+ */
private DAChartSeries appLoadSeries;
+ /**
+ * For each time moment this series presents
+ * the summary CPU load(%) for all processes in system.
+ * The CPU load is scaled by number of CPU cores to be in range [0-100]%
+ */
private DAChartSeries totalLoadSeries;
private DAChartBoard chartBoard = null;
/ TimelineConstants.MEGA_DOUBLE;
try {
+ // systemAvgLoad is already scaled by number of CPU cores to be in range [0-100]%
double systemAvgLoad = (Float) row.get(SystemDataDBTable.COLUMN.CPU_LOAD_TOTAL
.ordinal());
totalLoadSeries.addSeriesItem(new DAChartSeriesItem(time, systemAvgLoad, Formatter
for (int i = 0; i < data.size(); i++) {
List<Object> oneTime = data.get(i);
Long time = (Long) oneTime.get(TargetProcessDBTable.COLUMN.SAMPLING_TIME.ordinal());
+ // cpuLoad is already scaled by number of CPU cores to be in range [0-100]%
Float cpuLoad = (Float) oneTime.get(TargetProcessDBTable.COLUMN.CPU_LOAD.ordinal());
Float processLoadSum = processLoadSumMap.get(time);
if (processLoadSum == null) {
Iterator<Long> iterProcessLoadSum = timeSortedLoadList.iterator();
while (iterProcessLoadSum.hasNext()) {
Long time = iterProcessLoadSum.next();
+ // cpuLoadSum is already scaled by number of CPU cores to be in range [0-100]%
Float cpuLoadSum = processLoadSumMap.get(time);
- double cpuAvgLoad = cpuLoadSum / coreSize;
appLoadSeries.addSeriesItem(new DAChartSeriesItem(time / TimelineConstants.MEGA_DOUBLE,
- cpuAvgLoad, Formatter.toPercentageFormat(cpuAvgLoad)));
+ cpuLoadSum.doubleValue(), Formatter.toPercentageFormat(cpuLoadSum.doubleValue())));
}
if (prevChildSize != childSeriesMap.size()) {
/*
* Make SystemData Table data
*/
- double systemAvgCPULoad = log.getTotalCPULoad() / coreSize;
+ // systemAvgCPULoad is already scaled by number of CPU cores to be in range [0-100]%
+ double systemAvgCPULoad = log.getTotalCPULoad();
ArrayList<Object> dbSystemData = new ArrayList<Object>();
dbSystemData.add(new Long(log.getTime()));
dbSystemData.add(new Float(systemAvgCPULoad));
import org.eclipse.swt.graphics.Point;\r
import org.eclipse.swt.widgets.Composite;\r
import org.eclipse.swt.widgets.Display;\r
-import org.eclipse.swt.widgets.Menu;\r
-import org.eclipse.swt.widgets.MenuItem;\r
-import org.eclipse.swt.widgets.Shell;\r
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;\r
import org.tizen.dynamicanalyzer.common.AnalyzerManager;\r
import org.tizen.dynamicanalyzer.common.DASelectionData;\r
import org.tizen.dynamicanalyzer.common.Global;\r
import org.tizen.dynamicanalyzer.model.TableInput;\r
import org.tizen.dynamicanalyzer.resources.ColorResources;\r
+import org.tizen.dynamicanalyzer.resources.FontResources;\r
import org.tizen.dynamicanalyzer.ui.common.UICommonConstants;\r
import org.tizen.dynamicanalyzer.ui.file.FileChartView;\r
import org.tizen.dynamicanalyzer.ui.file.FilePage;\r
import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;\r
import org.tizen.dynamicanalyzer.utils.Formatter;\r
import org.tizen.dynamicanalyzer.widgets.chart.DAChartPlotIntervalMarker;\r
+import org.tizen.dynamicanalyzer.widgets.popupMenu.DAPopupMenu;\r
+import org.tizen.dynamicanalyzer.widgets.popupMenu.DAPopupMenuItem;\r
+import org.tizen.dynamicanalyzer.widgets.popupMenu.DAPopupMenuListener;\r
import org.tizen.sdblib.util.StringUtil;\r
\r
public class DlogTable extends DATableComposite {\r
\r
- private String[] columnNames = {"Time", "Level", "Pid", "Tid", "Tag", "Message" }; //6col\r
+ private String[] columnNames = {"Time", "Level", "PID", "TID", "Tag", "Message" }; //6col\r
private int[] columnSizes = { 70, 50, 60, 60, 80, 600};\r
private int[] columnAlignment = { SWT.CENTER, SWT.CENTER, SWT.CENTER, SWT.CENTER, SWT.LEFT, SWT.LEFT };\r
private boolean[] columnVisibility = { true, true, true, true, true, true };\r
private List<DADlogData> dlogClone = new ArrayList<DADlogData>();\r
private List<TableInput> filteredDlog = new ArrayList<TableInput>();\r
private static boolean isFilter = false;\r
+ \r
+ private static String POPUP_FILTER_BY_LEVEL = "Filter by selected Level";\r
+ private static String POPUP_FILTER_BY_PID = "Filter by selected PID";\r
+ private static String POPUP_FILTER_BY_TID = "Filter by selected TID";\r
+ private static String POPUP_FILTER_BY_TAG = "Filter by selected Tag";\r
+ private static String POPUP_SHOW_ALL_DLOGS = "Show all Dlogs";\r
+ \r
+ private static int TABLE_INDEX_LEVEL = 1;\r
+ private static int TABLE_INDEX_PID = 2;\r
+ private static int TABLE_INDEX_TID = 3;\r
+ private static int TABLE_INDEX_TAG = 4;\r
\r
public DlogTable(Composite parent, int compStyle, int tableStyle) {\r
super(parent, compStyle, tableStyle);\r
parent.addControlListener(new TableColumnSizePackListener(this, columnSizes));\r
\r
initDlogListeners(); \r
+ initPopupMenu();\r
+ }\r
+ \r
+ private void initPopupMenu() {\r
+ popupMenu = new DAPopupMenu(table);\r
+ popupMenu.setFont(FontResources.CONTEXT_MENU_ITEM_FONT);\r
+ \r
+ DAPopupMenuItem filterByLevelItem = new DAPopupMenuItem(popupMenu);\r
+ filterByLevelItem.setText(POPUP_FILTER_BY_LEVEL);\r
+ filterByLevelItem.addListener(new DAPopupMenuListener() {\r
+ @Override\r
+ public void widgetSelected(DAPopupMenuItem menuItem) {\r
+ GridItem item = table.getItem(new Point(mousePoint.x, mousePoint.y));\r
+ if (null == item) {\r
+ return;\r
+ }\r
+ \r
+ String startData = ((DATableDataFormat) item.getData()).getData().get(TABLE_INDEX_LEVEL).toString();\r
+ filterTable(startData, TABLE_INDEX_LEVEL);\r
+ }\r
+ });\r
+ \r
+ DAPopupMenuItem filterByLevelPID = new DAPopupMenuItem(popupMenu);\r
+ filterByLevelPID.setText(POPUP_FILTER_BY_PID);\r
+ filterByLevelPID.addListener(new DAPopupMenuListener() {\r
+ @Override\r
+ public void widgetSelected(DAPopupMenuItem menuItem) {\r
+ GridItem item = table.getItem(new Point(mousePoint.x, mousePoint.y));\r
+ if (null == item) {\r
+ return;\r
+ }\r
+ \r
+ String startData = ((DATableDataFormat) item.getData()).getData().get(TABLE_INDEX_PID).toString();\r
+ filterTable(startData, TABLE_INDEX_PID);\r
+ }\r
+ });\r
+ \r
+ DAPopupMenuItem filterByLevelTID = new DAPopupMenuItem(popupMenu);\r
+ filterByLevelTID.setText(POPUP_FILTER_BY_TID);\r
+ filterByLevelTID.addListener(new DAPopupMenuListener() {\r
+ @Override\r
+ public void widgetSelected(DAPopupMenuItem menuItem) {\r
+ GridItem item = table.getItem(new Point(mousePoint.x, mousePoint.y));\r
+ if (null == item) {\r
+ return;\r
+ }\r
+ \r
+ String startData = ((DATableDataFormat) item.getData()).getData().get(TABLE_INDEX_TID).toString();\r
+ filterTable(startData, TABLE_INDEX_TID);\r
+ }\r
+ });\r
+ \r
+ DAPopupMenuItem filterByTagItem = new DAPopupMenuItem(popupMenu);\r
+ filterByTagItem.setText(POPUP_FILTER_BY_TAG);\r
+ filterByTagItem.addListener(new DAPopupMenuListener() {\r
+ @Override\r
+ public void widgetSelected(DAPopupMenuItem menuItem) {\r
+ GridItem item = table.getItem(new Point(mousePoint.x, mousePoint.y));\r
+ if (null == item) {\r
+ return;\r
+ }\r
+ \r
+ String startData = ((DATableDataFormat) item.getData()).getData().get(TABLE_INDEX_TAG).toString();\r
+ filterTable(startData, TABLE_INDEX_TAG);\r
+ }\r
+ });\r
+ \r
+ \r
+ \r
+ DAPopupMenuItem allDlogShowItem = new DAPopupMenuItem(popupMenu);\r
+ allDlogShowItem.setText(POPUP_SHOW_ALL_DLOGS);\r
+ allDlogShowItem.addListener(new DAPopupMenuListener() {\r
+ @Override\r
+ public void widgetSelected(DAPopupMenuItem menuItem) {\r
+ isFilter = false;\r
+ table.update();\r
+ Display.getDefault().syncExec(new Runnable() {\r
+ @Override\r
+ public void run() {\r
+ BaseView baseView = (BaseView) WorkbenchUtil.getViewPart(BaseView.ID);\r
+ baseView.getTopComposite().updateView();\r
+ }\r
+ });\r
+ }\r
+ });\r
}\r
\r
public boolean initDlogListeners(){\r
@Override\r
public void mouseUp(final MouseEvent MouseEvent) {\r
// TODO Auto-generated method stub\r
- \r
- // START : Mouse Right Click on table cell \r
- if(MouseEvent.button == 3){\r
- \r
- Shell shell = table.getParent().getShell();\r
- Menu dropmenu = new Menu(shell, SWT.POP_UP);\r
- shell.setMenu(dropmenu);\r
- MenuItem item0 = new MenuItem(dropmenu, SWT.NONE);\r
- MenuItem item1 = new MenuItem(dropmenu, SWT.NONE);\r
- MenuItem item2 = new MenuItem(dropmenu, SWT.NONE);\r
- \r
- item0.setText("Filter by Selected Tag");\r
- item1.setText("Filter by Selected Level");\r
- item2.setText("All DLogs show");\r
- \r
- item0.addSelectionListener(new SelectionListener() {\r
- \r
- @Override\r
- public void widgetSelected(SelectionEvent e) {\r
- // TODO Auto-generated method stub\r
- \r
- GridItem[] ti = ((Grid) MouseEvent.widget).getSelection();\r
- if (null == ti || ti.length == 0) {\r
- return;\r
- }\r
- String startData = ((DATableDataFormat) ti[0].getData()).getData().get(4).toString();\r
- filteringDlog(startData);\r
- \r
- }\r
- \r
- @Override\r
- public void widgetDefaultSelected(SelectionEvent e) {\r
- // TODO Auto-generated method stub\r
- \r
- }\r
- });\r
- \r
- item1.addSelectionListener(new SelectionListener() {\r
- \r
- @Override\r
- public void widgetSelected(SelectionEvent e) {\r
- // TODO Auto-generated method stub\r
- \r
- GridItem[] ti = ((Grid) MouseEvent.widget).getSelection();\r
- if (null == ti || ti.length == 0) {\r
- return;\r
- }\r
- String startData = ((DATableDataFormat) ti[0].getData()).getData().get(1).toString();\r
- filteringDlog(startData);\r
- }\r
- \r
- @Override\r
- public void widgetDefaultSelected(SelectionEvent e) {\r
- // TODO Auto-generated method stub\r
- \r
- }\r
- });\r
- \r
- item2.addSelectionListener(new SelectionListener() {\r
- \r
- @Override\r
- public void widgetSelected(SelectionEvent e) {\r
- // TODO Auto-generated method stub\r
- isFilter = false;\r
- table.update();\r
- Display.getDefault().syncExec(new Runnable() {\r
- @Override\r
- public void run() {\r
- BaseView baseView = (BaseView) WorkbenchUtil.getViewPart(BaseView.ID); \r
- baseView.getTopComposite().updateView(); \r
- }\r
- });\r
- }\r
- \r
- @Override\r
- public void widgetDefaultSelected(SelectionEvent e) {\r
- // TODO Auto-generated method stub\r
- \r
- }\r
- });\r
- int X = MouseEvent.x;\r
- int Y = MouseEvent.y;\r
- Point gridPoint = ((Grid) MouseEvent.widget).toDisplay(X, Y);\r
- dropmenu.setLocation( gridPoint.x, gridPoint.y);\r
- dropmenu.setVisible(true); \r
- }\r
- // END : Mouse Right Click on table cell \r
}\r
\r
@Override\r
return output;\r
}\r
\r
- private void filteringDlog(String input){\r
+ private void filterTable(String input, int categoryIndex) {\r
\r
filteredDlog.clear();\r
\r
if(tableClone != null){\r
for(TableInput table : tableClone){\r
- if(table.getText().get(4).contains(input)){\r
+ if(table.getText().get(categoryIndex).equals(input)){\r
filteredDlog.add(table);\r
isFilter = true;\r
}\r
});\r
}\r
\r
- \r
private void DlogTimeMarker(long markerTime){\r
\r
double startMarkerTime = markerTime\r
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
- timerClock.setTime(time);
+ timerClock.setTime(time / 1000);
}
});
}
*
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
*
- * Contact:
+ * Contact:
* Heeyoung Hwang <heeyoung1008.hwang@samsung.com>
* Juyoung Kim <j0.kim@samsung.com>
*
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* Contributors:
* - S-Core Co., Ltd
- *
+ *
*/
package org.tizen.dynamicanalyzer.ui.toolbar.setting;
import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
import org.tizen.dynamicanalyzer.widgets.tooltip.DACustomTooltip;
-public class FlatFeatureDialogFeatureListPage extends DAPageComposite {
+public class FlatFeatureDialogFeatureListPage extends DAPageComposite {
// feature list widget
private FlatFeatureDialog featureDialog = null;
private DACustomTooltip tooltip = null;
private DACustomMultiToggleButtonGroup featuretoggleGroup = null;
private Cursor daCursor = null;
-
+
private int FEATURELIST_TITLE_FONT_SIZE = 0;
private int FEATURELIST_ICON_SIZE = 0;
private int FEATURELIST_TOOLTIP_SIZE = 0;
private int FEATURELIST_TOOLTIP_BOX_WIDTH = 0;
-
+
private int FEATURELIST_COMP_WIDTH = 0;
private int FEATURELIST_COMP_MARGIN = 0;
private int FEATURELIST_COMP_ITEM_LEFT_MARGIN = 0;
// Composite
featureListComp = parent;
featureDialog = parentObject;
-
+
// TODO: Add handling at MAC
FEATURELIST_TITLE_FONT_SIZE = 10 + 6;
FEATURELIST_ICON_SIZE = 70;
createFeatureListComposite();
}
-
+
private void initFeatureListWidget() {
if (null != featureListLabel) {
featureListLabel.dispose();
featureListDescLabel.dispose();
featureListDescLabel = null;
}
-
+
if (null != featureListPageLabel) {
featureListPageLabel.dispose();
featureListPageLabel = null;
featureListInputComp.dispose();
featureListInputComp = null;
}
-
+
if (null != itemComp) {
itemComp.dispose();
itemComp = null;
daCursor = null;
}
}
-
+
private DACustomFeatureToggleButton createToggleButton(Composite composit,
Image normalImage, Image hoverImage, Image pushImage, Image disableImage, Point imagePoint,
String title, Point fontPoint,
toggle.setLayoutData(data);
return toggle;
- }
-
+ }
+
public void featureToggleUnselect(String featurName) {
if(featuretoggleGroup != null) {
featuretoggleGroup.setSelection(featurName, false);
featuretoggleGroup.getButton(featurName).getTooltipButton().setBackground(ColorResources.FEATURE_FEATURELISTCOMP_NORMAL_BACKGROUND);
}
}
-
+
private Listener toggleDownListener = new Listener() {
@Override
public void handleEvent(Event event) {
public void createFeatureListComposite() {
initFeatureListWidget();
-
+
// label
featureListLabel = new Label(featureListComp, SWT.TRANSPARENT);
FormData data = new FormData();
- data.top = new FormAttachment(0, FEATURELIST_TITLE_MARGIN);
- data.left = new FormAttachment(0, FEATURELIST_COMP_ITEM_LEFT_MARGIN);
+ data.top = new FormAttachment(0, FEATURELIST_TITLE_MARGIN);
+ data.left = new FormAttachment(0, FEATURELIST_COMP_ITEM_LEFT_MARGIN);
data.width = FEATURELIST_COMP_WIDTH - FEATURELIST_COMP_ITEM_LEFT_MARGIN;
data.height = FEATURELIST_TITLE_HEIGHT - FEATURELIST_TITLE_MARGIN - FEATURELIST_TITLE_FONT_SIZE + 6;
featureListLabel.setLayoutData(data);
// Tooltip object is made once.
// Event(hover, exit) occured, It'll be visible, not visible.
// hover event transfer event coordinate to tooltip
- tooltip = new DACustomTooltip() {
- @Override
- public void setTooltipMessage() {
- // TODO Auto-generated method stub
- }
+ if (tooltip == null) {
+ tooltip = new DACustomTooltip() {
+ @Override
+ public void setTooltipMessage() {
+ // TODO Auto-generated method stub
+ }
- @Override
- public void setTooltipMessage(String name) {
- // TODO Auto-generated method stub
- tooltipMessage.clear();
- tooltipMessage.add(name);
- }
- };
- tooltip.open(featureListInputComp.getShell());
+ @Override
+ public void setTooltipMessage(String name) {
+ // TODO Auto-generated method stub
+ tooltipMessage.clear();
+ tooltipMessage.add(name);
+ }
+ };
+ }
// listing available feature list
TargetData target = SettingDataManager.INSTANCE.getTarget(null);
List<Feature> featurel = target.getAvailableFeatureList();
List<FlatFeature> featureList = target.getAvailableFlatFeatureList();
- Logger.debug("Available Feature list: " + featurel);
- Logger.debug("Available FlatFeature list: " + featureList);
target.getSelectedFlatFeatureList();
-
+
featuretoggleGroup = new DACustomMultiToggleButtonGroup();
Point imagePoint = new Point(22, 24);
DACustomButton tempButton = (DACustomButton)event.widget;
Point p = tempButton.toDisplay(tempButton.getLocation());
- tooltip.openAndMove(featureListInputComp.getShell());
+ tooltip.open(featureListInputComp.getShell());
tooltip.setTooltipMessage((String)tempButton.getData("tooltipmsg"));
// TODO: Need to adjust tooltip location as architecture
- tooltip.setTooltipLocation(p, -50, -685);
+ tooltip.setTooltipLocation(p, -50, -620);
}
});
infoButton.addListener(SWT.MouseExit, new Listener() {
}
}
}
-
-
*
* Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
*
- * Contact:
+ * Contact:
* Heeyoung Hwang <heeyoung1008.hwang@samsung.com>
* Juyoung Kim <j0.kim@samsung.com>
*
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* Contributors:
* - S-Core Co., Ltd
- *
+ *
*/
package org.tizen.dynamicanalyzer.ui.toolbar.setting;
import org.tizen.dynamicanalyzer.widgets.button.toggle.DACustomToggleButton;
import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
-public class FlatFeatureDialogSelectedFeaturePage extends DAPageComposite {
+public class FlatFeatureDialogSelectedFeaturePage extends DAPageComposite {
// selectedFeature widget
private FlatFeatureDialog featureDialog = null;
private Composite selectedComp = null;
private Label noItemLabel = null;
private DACustomToggleButton delToggle = null;
private Cursor daCursor = null;
-
+
private int TITLE_FONT_SIZE = 0;
private int ICON_SIZE = 0;
-
+
private int WIDTH = 0;
private int HEIGHT = 0;
private int LINE = 0;
// Composite
selectedComp = parent;
featureDialog = parentObject;
-
+
// TODO: Add handling at MAC
TITLE_FONT_SIZE = 10 + 6;
ICON_SIZE = 40;
CANCEL_RIGHT = -30;
NOITEM_UPPER_MARGIN = (BODY_HEIGHT-TITLE_FONT_SIZE)/2;
NOITEM_LEFT_MARGIN = 15; // TODO: Replace '15' with string length
-
+
createSelectedFeatureComposite();
}
return toggle;
}
-
+
public DACustomToggleButton getDelToggle() {
return delToggle;
}
-
+
private Listener cursorListener = new Listener() {
public void handleEvent(Event event) {
if (event.type == SWT.MouseEnter || event.type == SWT.MouseExit) {
// listing selected feature list
TargetData target = SettingDataManager.INSTANCE.getTarget(null);
List<FlatFeature> featureList = target.getSelectedFlatFeatureList();
- Logger.debug(featureList);
if (featureList.size() > 0)
featureDialog.getOKButton().setEnabled(true);
else {
featureDialog.getOKButton().setEnabled(false);
-
+
// label : No Item Selected
noItemLabel = new Label(selectedInputComp, SWT.TRANSPARENT);
data = new FormData();
data.height = ICON_SIZE;
selectedIcon.setLayoutData(data);
selectedIcon.setBackground(ColorResources.FEATURE_FEATURELISTCOMP_NORMAL_BACKGROUND);
-
+
// label : featureListName
selectedNameLabel = new Label(selectedInputComp, SWT.TRANSPARENT);
data = new FormData();
topPosition += (ICON_SIZE + ITEM_DIST);
}
-
+
selectedComp.layout(true);
selectedInputComp.layout();
selecetedScrolledComp.setMinSize(selectedInputComp.computeSize(SWT.DEFAULT, SWT.DEFAULT));
private DACustomToggleButton sourceviewtoggle = null;
- private DACustomToggleButton recordingtoggle = null;
- private DACustomToggleButton autostoptoggle = null;
-
private DACustomToggleButton periodicallytoggle = null;
private DACustomCombo systemRateCombo = null;
marginview_one.setLayout(new FillLayout());
int generalviewHeight = (LABLE_HEIGTH) * 3 + (LABLE_INTERVAL) * 2;
- int recordingviewHeight = (LABLE_HEIGTH) * 2 + (LABLE_INTERVAL);
int screenshotviewHeight = (LABLE_HEIGTH) + 9;
// add "General" button
functionRateCombo = makeDACustomCombo(generalvalues, "ms");
Composite marginview_two = new Composite(baseCom, SWT.NONE);
- marginview_two.setLayoutData(new RowData(SWT.DEFAULT, LABLE_INTERVAL));
+ marginview_two.setLayoutData(new RowData(SWT.DEFAULT, (int)(LABLE_INTERVAL*1.5)));
marginview_two.setLayout(new FillLayout());
- // add "Recording" button
- DACustomButton recordingExtend = createFoldingButton(baseCom, PreferencesDialogLabels.RECORDING);
-
- // "Recording" view
- final Composite recordinglview = new Composite(baseCom, SWT.NONE);
- final RowData recordingviewdata = new RowData(SWT.DEFAULT, recordingviewHeight);
- recordinglview.setLayoutData(recordingviewdata);
- recordinglview.setBackground(ColorResources.DIALOG_CONTENT_BACKGROUND);
- recordinglview.setLayout(new FormLayout());
-
- Composite recordinglabel = new Composite(recordinglview, SWT.NONE);
- form = new FormData();
- form.top = new FormAttachment(0, 0);
- form.left = new FormAttachment(0, LABLE_LEFT_MARGIN);
- form.bottom = new FormAttachment(100, 0);
- form.width = 180;
- recordinglabel.setLayoutData(form);
- recordinglabel.setLayout(layout);
- recordinglabel.setBackground(ColorResources.DIALOG_CONTENT_BACKGROUND);
-
- createLabel(recordinglabel, PreferencesDialogLabels.RECORDING);
- createLabel(recordinglabel, PreferencesDialogLabels.AUTOSTOP_WHILE_REPLAYING);
-
- Composite recordingvalues = new Composite(recordinglview, SWT.NONE);
- form = new FormData();
- form.top = new FormAttachment(0, 0);
- form.left = new FormAttachment(recordinglabel, 70);
- form.right = new FormAttachment(100, 0);
- form.bottom = new FormAttachment(100, 0);
- recordingvalues.setLayoutData(form);
- recordingvalues.setLayout(layout);
- recordingvalues.setBackground(ColorResources.DIALOG_CONTENT_BACKGROUND);
-
- recordingtoggle = createToggleButton(recordingvalues);
- recordingtoggle.addClickListener(new DACustomButtonClickEventListener() {
-
- @Override
- public void handleClickEvent(DACustomButton button) {
- autostoptoggle.setEnabled(recordingtoggle.isToggled());
- }
- });
-
- autostoptoggle = createToggleButton(recordingvalues);
-
- Composite marginview_three = new Composite(baseCom, SWT.NONE);
- marginview_three.setLayoutData(new RowData(SWT.DEFAULT, LABLE_INTERVAL));
- marginview_three.setLayout(new FillLayout());
-
// add "Screenshot" button
DACustomButton screenshotExtend = createFoldingButton(baseCom, PreferencesDialogLabels.SCREENSHOT);
}
});
- recordingExtend.addClickListener(new DACustomButtonClickEventListener() {
- @Override
- public void handleClickEvent(DACustomButton button) {
- recordingviewdata.exclude = !recordingviewdata.exclude;
- recordinglview.setVisible(!recordingviewdata.exclude);
-
- recordinglview.getParent().pack(true);
-
- scrolledComp.setContent(baseCom);
- scrolledComp.setMinSize(baseCom.computeSize(SWT.DEFAULT, SWT.DEFAULT));
- }
- });
-
screenshotExtend.addClickListener(new DACustomButtonClickEventListener() {
@Override
public void handleClickEvent(DACustomButton button) {
private void setSelectedOptions() {
int value = SettingDataManager.INSTANCE.getOptionsPreferencesValue(FlatPreferences.SOURCE_VIEW);
-
if (value == 1) {
sourceviewtoggle.setToggled(true);
MenuBar.getInstance().setSourceView(true);
value = SettingDataManager.INSTANCE.getOptionsPreferencesValue(FlatPreferences.FUNCTION_SAMPLING_RATE);
functionRateCombo.setText(String.valueOf(value));
- value = SettingDataManager.INSTANCE.getOptionsPreferencesValue(FlatPreferences.RECORDING);
-
- if (value == 1) {
- recordingtoggle.setToggled(true);
- } else {
- recordingtoggle.setToggled(false);
- }
-
- value = SettingDataManager.INSTANCE.getOptionsPreferencesValue(FlatPreferences.AUTO_STOP);
-
- if (value == 1) {
- autostoptoggle.setToggled(true);
- } else {
- autostoptoggle.setToggled(false);
- }
-
value = SettingDataManager.INSTANCE.getOptionsPreferencesValue(FlatPreferences.SCREENSHOT_PERIODICALLY);
-
if (value != 0) {
periodicallytoggle.setToggled(true);
screenshotRateCombo.setEnabled(true);
private void setToDefault() {
int value = FlatPreferences.SOURCE_VIEW.getDefaultValue();
-
if (value == 1) {
sourceviewtoggle.setToggled(true);
} else {
}
value = FlatPreferences.SYSTEM_SAMPLING_RATE.getDefaultValue();
-
systemRateCombo.setText(String.valueOf(value));
-
+
value = FlatPreferences.FUNCTION_SAMPLING_RATE.getDefaultValue();
-
functionRateCombo.setText(String.valueOf(value));
- value = FlatPreferences.RECORDING.getDefaultValue();
-
- if (value == 1) {
- recordingtoggle.setToggled(true);
-
- value = FlatPreferences.AUTO_STOP.getDefaultValue();
-
- if (value == 1) {
- autostoptoggle.setToggled(true);
- } else {
- autostoptoggle.setToggled(false);
- }
-
- autostoptoggle.setEnabled(true);
- } else {
- recordingtoggle.setToggled(false);
- autostoptoggle.setToggled(false);
- autostoptoggle.setEnabled(false);
- }
-
value = FlatPreferences.SCREENSHOT_PERIODICALLY.getDefaultValue();
-
if (value != 0) {
periodicallytoggle.setToggled(true);
screenshotRateCombo.setEnabled(true);
return;
}
- if (recordingtoggle.isToggled()) {
- SettingDataManager.INSTANCE.addOptionsSelectedPreference(FlatPreferences.RECORDING, 1);
- } else {
- SettingDataManager.INSTANCE.addOptionsSelectedPreference(FlatPreferences.RECORDING, 0);
- }
-
- if (autostoptoggle.isToggled()) {
- SettingDataManager.INSTANCE.addOptionsSelectedPreference(FlatPreferences.AUTO_STOP, 1);
- } else {
- SettingDataManager.INSTANCE.addOptionsSelectedPreference(FlatPreferences.AUTO_STOP, 0);
- }
if (periodicallytoggle.isToggled()) {
int rate = 1;
public DAApiListTableComposite(Composite parent, int compStyle,
int tableStyle) {
super(parent, compStyle, tableStyle);
- setContextMenu(AnalyzerConstants.CONTEXT_TABLE_RANGE);
setComparator(new DefaultTableComparator());
comparator.setType(AnalyzerConstants.SORT_TYPE_NUM);
case ${platform} in
ubuntu-32)
ide_package_name="eclipse-pde_3.0.8_ubuntu-32"
- ce_package_name="common-eplugin-rcp_2.3.100_ubuntu-32"
;;
windows-32)
ide_package_name="eclipse-pde_3.0.8_windows-32"
- ce_package_name="common-eplugin-rcp_2.3.100_windows-32"
;;
ubuntu-64)
ide_package_name="eclipse-pde_3.0.2_ubuntu-64"
- ce_package_name="common-eplugin-rcp_2.3.100_ubuntu-64"
;;
windows-64)
ide_package_name="eclipse-pde_3.0.8_windows-64"
- ce_package_name="common-eplugin-rcp_2.3.100_windows-64"
;;
macos-64)
ide_package_name="eclipse-pde_3.0.8_macos-64"
- ce_package_name="common-eplugin-rcp_2.3.100_macos-64"
;;
*)
echo "${platform} is not support yet."
unzip -o "${ide_package_name}.zip" -d "${ROOTDIR}/${ide_package_name}" > /dev/null
fi
- # Download and Unzip common-eplugin-rcp package
- if [ ! -d ${ROOTDIR}/${ce_package_name} ]; then
- echo "Download common-eplugin-rcp"
-
- wget -nc -q "$repo_url/${ce_package_name}.zip"
- unzip -o "${ce_package_name}.zip" -d "${ROOTDIR}/${ce_package_name}" > /dev/null
- fi
-
# Change direcotry to source
cd ${SRCDIR}
reference_ide_path=${ROOTDIR}/${ide_package_name}/data/eclipse-pde/eclipse
- reference_ce_path=${ROOTDIR}/${ce_package_name}/data/ide
if [ "${platform}" = "macos-64" ]; then
reference_ide_path=${ROOTDIR}/${ide_package_name}/data/eclipse-pde/Eclipse.app/Contents/Eclipse
- reference_ce_path=${ROOTDIR}/${ce_package_name}/data/IDE.app/Contents/Eclipse
fi
}
__compose_da_dependencies() {
echo "Compose dependencies repository..."
- /bin/bash -x "${SRCDIR}/prepare_dependencies.sh" "${reference_ide_path}" "${reference_ce_path}"
+ /bin/bash -x "${SRCDIR}/prepare_dependencies.sh" "${reference_ide_path}" "${ROOTDIR}/ide"
}
__execute_pde_build()
Label:Dynamic Analyzer
OS:ubuntu-32
Build-host-os:ubuntu-32
+Build-dependency: common-eplugin-rcp [ubuntu-32]
Description:The host of the Dynamic Analyzer
C-Prerequisites:rpm2cpio,cpio
Label:Dynamic Analyzer
OS:windows-32
Build-host-os:ubuntu-32
+Build-dependency: common-eplugin-rcp [windows-32]
Description:The host of the Dynamic Analyzer
Package:dynamic-analyzer-product
Label:Dynamic Analyzer
OS:ubuntu-64
Build-host-os:ubuntu-64
+Build-dependency: common-eplugin-rcp [ubuntu-64]
Description:The host of the Dynamic Analyzer
C-Prerequisites:rpm2cpio,cpio
Label:Dynamic Analyzer
OS:windows-64
Build-host-os:ubuntu-64
+Build-dependency: common-eplugin-rcp [windows-64]
Description:The host of the Dynamic Analyzer
Package:dynamic-analyzer-product
Label:Dynamic Analyzer
OS:macos-64
Build-host-os:ubuntu-64
+Build-dependency: common-eplugin-rcp [macos-64]
Description:The host of the Dynamic Analyzer