--- /dev/null
+package org.tizen.dynamicanalyzer.nl;
+
+import org.eclipse.osgi.util.NLS;
+
+public class ThreadPageLables extends NLS {
+ private static final String BUNDLE_NAME = "org.tizen.dynamicanalyzer.nl.ThreadPageLables"; //$NON-NLS-1$
+ public static String THREAD_CHART_THREAD;
+ public static String THREAD_CHART_TITLE;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, ThreadPageLables.class);
+ }
+
+ private ThreadPageLables() {
+ }
+}
--- /dev/null
+THREAD_CHART_THREAD=Thread
+THREAD_CHART_TITLE=Thread Chart
\ No newline at end of file
--- /dev/null
+package org.tizen.dynamicanalyzer.ui.views.ThreadPage;
+
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.tizen.dynamicanalyzer.ColorResources;
+import org.tizen.dynamicanalyzer.model.DAView;
+import org.tizen.dynamicanalyzer.model.LogPackage;
+import org.tizen.dynamicanalyzer.nl.ThreadPageLables;
+import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer;
+
+public class ThreadChartView extends DAView {
+ public static final String ID = ThreadChartView.class.getName();
+
+ public ThreadChartView(Composite parent, int style) {
+ super(parent, style);
+ // TODO Auto-generated constructor stub
+ ViewContainer viewContainer = new ViewContainer(this, false);
+ viewContainer.setTitleText(ThreadPageLables.THREAD_CHART_TITLE);
+
+ Composite contents = viewContainer.getContentArea();
+ contents.setBackground(ColorResources.WINDOW_BG_COLOR);
+ contents.setLayout(new FillLayout());
+ }
+
+ @Override
+ public void updateView() {
+ }
+
+ @Override
+ public void updateLog(LogPackage logPack) {
+ System.out.println("updateLog:"+ logPack);
+ }
+
+ @Override
+ public void clear() {
+
+ }
+
+ @Override
+ public Control getControl() {
+ return null;
+ }
+
+}
public ThreadPage(Composite parent, int style) {
super(parent, style);
this.setLayout(new FillLayout());
-/*
baseForm = new SashForm(this, SWT.HORIZONTAL);
baseForm.setLayout(new FillLayout());
leftForm = new SashForm(baseForm, SWT.VERTICAL);
// FILECHART_INDEX = 0;
- FileChartView fileChartView = new FileChartView(leftForm, SWT.NONE);
- addView(fileChartView);
+ ThreadChartView threadChartView = new ThreadChartView(leftForm, SWT.NONE);
+ addView(threadChartView);
+ /*
// FILE_API_LIST_INDEX = 1;
FileApiListView fileApiListView = new FileApiListView(leftForm,
--- /dev/null
+package org.tizen.dynamicanalyzer.ui.views.pageInfo;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.viewers.TableViewer;
+import org.tizen.dynamicanalyzer.model.FailedData;
+import org.tizen.dynamicanalyzer.model.FileChartItemData;
+import org.tizen.dynamicanalyzer.model.LogPackage;
+import org.tizen.dynamicanalyzer.model.WarningData;
+import org.tizen.dynamicanalyzer.ui.views.filePage.fileChart.FileChartManager;
+
+public abstract class PageDataManager<E> {
+ private List<E> row = null;
+ private List<String> column = null;
+// private List<WarningData> warning = null;
+ private List<FailedData> failed = null;
+
+ private void AddErrorData(FailedData data){
+ if(null == failed)
+ failed = new ArrayList<FailedData>();
+ failed.add(data);
+ }
+
+// private void AddWarningData(WarningData data){
+// if(null == warning)
+// warning = new ArrayList<WarningData>();
+// warning.add(data);
+// }
+
+ private void AddPageData(E data){
+ if(null == row)
+ row = new ArrayList<E>();
+ row.add((E)data);
+ }
+
+ public void SetColumn(List<String> column){
+ this.column = column;
+ }
+
+ public void ParsePageData(LogPackage logPack){
+ List<List<String>> inputs = GetLogsFromLogPackage(logPack);
+ int size;
+ if(null == inputs || 0 == (size = inputs.size())){
+ return;
+ }
+
+ for(int i = 0; i < size; i++){
+ List<String> input = inputs.get(i);
+
+ //error check
+ if(true == ErrorCheck(input)){
+ FailedData ffd = new FailedData(input);
+ AddErrorData(ffd);
+ continue;
+ }
+
+ //add page data
+ E data = GetPageData(input);
+ if(null != data)
+ AddPageData(data);
+ }
+ }
+
+ public abstract List<List<String>> GetLogsFromLogPackage(LogPackage logPack);
+ public abstract E GetPageData(List<String> input);
+ public abstract boolean ErrorCheck(List<String> input);
+// public abstract boolean WarningCheck(List<String> input);
+}