From: Lee Date: Fri, 15 Mar 2013 01:23:50 +0000 (+0900) Subject: [Title] clear rep X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6b63891706244ea1804ce144589c66ffb1b16e1d;p=sdk%2Ftools%2Fdynamic-analyzer.git [Title] clear rep [Desc.] - [Issue] - --- diff --git a/org.tizen.dynamicanalyzer.splash/.project b/org.tizen.dynamicanalyzer.splash/.project deleted file mode 100644 index 95e47ee..0000000 --- a/org.tizen.dynamicanalyzer.splash/.project +++ /dev/null @@ -1,22 +0,0 @@ - - - org.tizen.dynamicanalyzer.splash - - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - - diff --git a/org.tizen.dynamicanalyzer.splash/META-INF/MANIFEST.MF b/org.tizen.dynamicanalyzer.splash/META-INF/MANIFEST.MF deleted file mode 100644 index 50d78c5..0000000 --- a/org.tizen.dynamicanalyzer.splash/META-INF/MANIFEST.MF +++ /dev/null @@ -1,7 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Localization: plugin -Bundle-Name: %pluginName -Bundle-SymbolicName: org.tizen.dynamicanalyzer.splash -Bundle-Version: 1.0.0.qualifier -Bundle-Vendor: %providerName diff --git a/org.tizen.dynamicanalyzer.splash/build.properties b/org.tizen.dynamicanalyzer.splash/build.properties deleted file mode 100644 index aa8cb5b..0000000 --- a/org.tizen.dynamicanalyzer.splash/build.properties +++ /dev/null @@ -1,4 +0,0 @@ -bin.includes = META-INF/,\ - splash.bmp,\ - plugin.properties - diff --git a/org.tizen.dynamicanalyzer.splash/plugin.properties b/org.tizen.dynamicanalyzer.splash/plugin.properties deleted file mode 100644 index b295a76..0000000 --- a/org.tizen.dynamicanalyzer.splash/plugin.properties +++ /dev/null @@ -1,4 +0,0 @@ -#Plugin name -pluginName=bada Application Performance Analyzer Workbench Splash -#Provider name -providerName=Samsung Electronics diff --git a/org.tizen.dynamicanalyzer.splash/splash.bmp b/org.tizen.dynamicanalyzer.splash/splash.bmp deleted file mode 100644 index ec2dc08..0000000 Binary files a/org.tizen.dynamicanalyzer.splash/splash.bmp and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/.classpath b/org.tizen.dynamicanalyzer.widgets/.classpath deleted file mode 100644 index 81390c4..0000000 --- a/org.tizen.dynamicanalyzer.widgets/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.tizen.dynamicanalyzer.widgets/.project b/org.tizen.dynamicanalyzer.widgets/.project deleted file mode 100644 index 07c232f..0000000 --- a/org.tizen.dynamicanalyzer.widgets/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.tizen.dynamicanalyzer.widgets - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.tizen.dynamicanalyzer.widgets/.settings/org.eclipse.jdt.core.prefs b/org.tizen.dynamicanalyzer.widgets/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index cf90579..0000000 --- a/org.tizen.dynamicanalyzer.widgets/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Thu Jul 05 13:02:20 KST 2012 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/org.tizen.dynamicanalyzer.widgets/Images/dialog_button_push.png b/org.tizen.dynamicanalyzer.widgets/Images/dialog_button_push.png deleted file mode 100644 index 7fadf9b..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/dialog_button_push.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/dropdown_down.png b/org.tizen.dynamicanalyzer.widgets/Images/dropdown_down.png deleted file mode 100644 index 6da26c6..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/dropdown_down.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/dropdown_up.png b/org.tizen.dynamicanalyzer.widgets/Images/dropdown_up.png deleted file mode 100644 index ce162c3..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/dropdown_up.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/event_callee_arw.png b/org.tizen.dynamicanalyzer.widgets/Images/event_callee_arw.png deleted file mode 100644 index f122b32..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/event_callee_arw.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/noImage.png b/org.tizen.dynamicanalyzer.widgets/Images/noImage.png deleted file mode 100644 index 5ad8021..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/noImage.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/scale_control_minus.png b/org.tizen.dynamicanalyzer.widgets/Images/scale_control_minus.png deleted file mode 100644 index 2502e59..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/scale_control_minus.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/scale_control_plus.png b/org.tizen.dynamicanalyzer.widgets/Images/scale_control_plus.png deleted file mode 100644 index c0b859c..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/scale_control_plus.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/scale_control_thumb.png b/org.tizen.dynamicanalyzer.widgets/Images/scale_control_thumb.png deleted file mode 100644 index a411402..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/scale_control_thumb.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/snapshot_arrow_left_disable.png b/org.tizen.dynamicanalyzer.widgets/Images/snapshot_arrow_left_disable.png deleted file mode 100644 index 34bcf9f..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/snapshot_arrow_left_disable.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/snapshot_arrow_left_hover.png b/org.tizen.dynamicanalyzer.widgets/Images/snapshot_arrow_left_hover.png deleted file mode 100644 index 8244065..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/snapshot_arrow_left_hover.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/snapshot_arrow_left_nor.png b/org.tizen.dynamicanalyzer.widgets/Images/snapshot_arrow_left_nor.png deleted file mode 100644 index 5169198..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/snapshot_arrow_left_nor.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/snapshot_arrow_left_push.png b/org.tizen.dynamicanalyzer.widgets/Images/snapshot_arrow_left_push.png deleted file mode 100644 index 44eb66b..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/snapshot_arrow_left_push.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/snapshot_arrow_right_disable.png b/org.tizen.dynamicanalyzer.widgets/Images/snapshot_arrow_right_disable.png deleted file mode 100644 index d829f12..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/snapshot_arrow_right_disable.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/snapshot_arrow_right_hover.png b/org.tizen.dynamicanalyzer.widgets/Images/snapshot_arrow_right_hover.png deleted file mode 100644 index 3b272e7..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/snapshot_arrow_right_hover.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/snapshot_arrow_right_nor.png b/org.tizen.dynamicanalyzer.widgets/Images/snapshot_arrow_right_nor.png deleted file mode 100644 index 8bf4605..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/snapshot_arrow_right_nor.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/snapshot_arrow_right_push.png b/org.tizen.dynamicanalyzer.widgets/Images/snapshot_arrow_right_push.png deleted file mode 100644 index e46f5a1..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/snapshot_arrow_right_push.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/timeline_left_bg_normal.png b/org.tizen.dynamicanalyzer.widgets/Images/timeline_left_bg_normal.png deleted file mode 100644 index 76b6ccb..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/timeline_left_bg_normal.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/timeline_left_bg_selected.png b/org.tizen.dynamicanalyzer.widgets/Images/timeline_left_bg_selected.png deleted file mode 100644 index cdc03fe..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/timeline_left_bg_selected.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/timeline_left_child_bg_normal.png b/org.tizen.dynamicanalyzer.widgets/Images/timeline_left_child_bg_normal.png deleted file mode 100644 index cd6d12a..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/timeline_left_child_bg_normal.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/timeline_left_child_bg_selected.png b/org.tizen.dynamicanalyzer.widgets/Images/timeline_left_child_bg_selected.png deleted file mode 100644 index 4ccd59d..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/timeline_left_child_bg_selected.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/timeline_right_bg_selected.png b/org.tizen.dynamicanalyzer.widgets/Images/timeline_right_bg_selected.png deleted file mode 100644 index 01ea3cf..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/timeline_right_bg_selected.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/timeline_right_child_bg_normal.png b/org.tizen.dynamicanalyzer.widgets/Images/timeline_right_child_bg_normal.png deleted file mode 100644 index b16ca51..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/timeline_right_child_bg_normal.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/toolbar_about_disable.png b/org.tizen.dynamicanalyzer.widgets/Images/toolbar_about_disable.png deleted file mode 100644 index b2c815f..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/toolbar_about_disable.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/toolbar_about_hover.png b/org.tizen.dynamicanalyzer.widgets/Images/toolbar_about_hover.png deleted file mode 100644 index 126d1ea..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/toolbar_about_hover.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/toolbar_about_nor.png b/org.tizen.dynamicanalyzer.widgets/Images/toolbar_about_nor.png deleted file mode 100644 index c8d1381..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/toolbar_about_nor.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/toolbar_about_push.png b/org.tizen.dynamicanalyzer.widgets/Images/toolbar_about_push.png deleted file mode 100644 index da8a1c3..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/toolbar_about_push.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/toolbar_source_view_disable.png b/org.tizen.dynamicanalyzer.widgets/Images/toolbar_source_view_disable.png deleted file mode 100644 index 66f6d64..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/toolbar_source_view_disable.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/toolbar_source_view_hover.png b/org.tizen.dynamicanalyzer.widgets/Images/toolbar_source_view_hover.png deleted file mode 100644 index 8fb4581..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/toolbar_source_view_hover.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/toolbar_source_view_nor.png b/org.tizen.dynamicanalyzer.widgets/Images/toolbar_source_view_nor.png deleted file mode 100644 index d927eeb..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/toolbar_source_view_nor.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/toolbar_source_view_push.png b/org.tizen.dynamicanalyzer.widgets/Images/toolbar_source_view_push.png deleted file mode 100644 index 170c25e..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/toolbar_source_view_push.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/toolbar_source_view_tog.png b/org.tizen.dynamicanalyzer.widgets/Images/toolbar_source_view_tog.png deleted file mode 100644 index bc8e895..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/toolbar_source_view_tog.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/toolbar_time_bg.png b/org.tizen.dynamicanalyzer.widgets/Images/toolbar_time_bg.png deleted file mode 100644 index 1fa6e8e..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/toolbar_time_bg.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/tree_fold.png b/org.tizen.dynamicanalyzer.widgets/Images/tree_fold.png deleted file mode 100644 index 49123ed..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/tree_fold.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/Images/tree_open.png b/org.tizen.dynamicanalyzer.widgets/Images/tree_open.png deleted file mode 100644 index 1a78c23..0000000 Binary files a/org.tizen.dynamicanalyzer.widgets/Images/tree_open.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.widgets/META-INF/MANIFEST.MF b/org.tizen.dynamicanalyzer.widgets/META-INF/MANIFEST.MF deleted file mode 100644 index f8d3158..0000000 --- a/org.tizen.dynamicanalyzer.widgets/META-INF/MANIFEST.MF +++ /dev/null @@ -1,22 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Widgets -Bundle-SymbolicName: org.tizen.dynamicanalyzer.widgets;singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-Activator: org.tizen.dynamicanalyzer.widgets.Activator -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Export-Package: org.tizen.dynamicanalyzer.widgets, - org.tizen.dynamicanalyzer.widgets.button, - org.tizen.dynamicanalyzer.widgets.button.toggle, - org.tizen.dynamicanalyzer.widgets.chart, - org.tizen.dynamicanalyzer.widgets.chartBoard, - org.tizen.dynamicanalyzer.widgets.combo, - org.tizen.dynamicanalyzer.widgets.graph.bar, - org.tizen.dynamicanalyzer.widgets.graph.circular, - org.tizen.dynamicanalyzer.widgets.helper, - org.tizen.dynamicanalyzer.widgets.scale, - org.tizen.dynamicanalyzer.widgets.timer -Import-Package: org.tizen.dynamicanalyzer.widgets.scale diff --git a/org.tizen.dynamicanalyzer.widgets/build.properties b/org.tizen.dynamicanalyzer.widgets/build.properties deleted file mode 100644 index 8c0cda4..0000000 --- a/org.tizen.dynamicanalyzer.widgets/build.properties +++ /dev/null @@ -1,10 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = .,\ - bin/,\ - Images/,\ - META-INF/,\ - .project,\ - .classpath,\ - .settings/,\ - build.properties diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/Activator.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/Activator.java deleted file mode 100644 index ab13834..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/Activator.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets; - -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "org.tizen.dynamicanalyzer.widgets"; //$NON-NLS-1$ - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/DAWidgetConstants.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/DAWidgetConstants.java deleted file mode 100644 index daaab9b..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/DAWidgetConstants.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets; - -public class DAWidgetConstants { - public static final String EMPTY_STRING = ""; -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/DACustomButton.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/DACustomButton.java deleted file mode 100755 index ba84073..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/DACustomButton.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.button; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.Font; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Canvas; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; -import org.tizen.dynamicanalyzer.widgets.helper.ColorResources; - - -public class DACustomButton extends Canvas { - - public static final int MAX_SIZE = 100; - - public static final int STATE_NORMAL = 0; - public static final int STATE_PUSH = 1; - public static final int STATE_HOVER = 2; - public static final int STATE_DISABLE = 3; - - public static final int TYPE_IMAGE = 0; - public static final int TYPE_COLOR = 1; - public static final int TYPE_GRADATION = 2; - - Composite parent; - protected boolean enabled = true; - - protected int state = STATE_NORMAL; - protected DACustomButtonAttribute attr; - protected DACustomButtonDefaultRenderer buttonRenderer = null; - - public void addListeners() { - this.addListener(SWT.MouseEnter, buttonMouseListener); - this.addListener(SWT.MouseExit, buttonMouseListener); - this.addListener(SWT.MouseDown, buttonMouseListener); - this.addListener(SWT.MouseUp, buttonMouseListener); - } - - public DACustomButton(Composite parent, int style) { - super(parent, style); - - this.parent = parent; - FillLayout layout = new FillLayout(SWT.HORIZONTAL); - this.setLayout(layout); - - this.setForeground(ColorResources.WHITE); - this.addPaintListener(buttonPaintListener); - addListeners(); - buttonRenderer = new DACustomButtonRenderer(); - attr = new DACustomButtonAttribute(); - setDefaultColors(); - } - - public DACustomButton(Composite parent, int style, String titleText) { - this(parent, style); - attr.setText(titleText); - } - - public DACustomButton(Composite parent, Image normal, Image mouseDown, Image hover, - Image disable) { - this(parent, SWT.TRANSPARENT); - setImages(normal, mouseDown, hover, disable); - attr.setDrawType(TYPE_IMAGE); - } - - public DACustomButton(Composite parent, Color normalStart, Color normalEnd, Color pushStart, - Color pushEnd, Color hoverStart, Color hoverEnd, Color disableStart, Color disableEnd) { - this(parent, SWT.NONE); - attr.setColor(0, normalStart); - attr.setColor(1, normalEnd); - attr.setColor(2, pushStart); - attr.setColor(3, pushEnd); - attr.setColor(4, hoverStart); - attr.setColor(5, hoverEnd); - attr.setColor(6, disableStart); - attr.setColor(7, disableEnd); - attr.setDrawType(TYPE_GRADATION); - } - - protected void changeButtonState(int s) { - state = s; - this.redraw(); - } - - protected Listener buttonMouseListener = new Listener() { - - @Override - public void handleEvent(Event event) { - if (state == STATE_DISABLE) { - return; - } - - if (event.type == SWT.MouseEnter) { - changeButtonState(STATE_HOVER); - } - - if (event.type == SWT.MouseExit) { - changeButtonState(STATE_NORMAL); - } - - if (event.type == SWT.MouseDown) { - changeButtonState(STATE_PUSH); - } - - if (event.type == SWT.MouseUp) { // FIXME - changeButtonState(STATE_HOVER); - } - } - }; - - private void setDefaultColors() { - attr.setColor(STATE_DISABLE, new Color(Display.getCurrent(), 48, 48, 48)); - attr.setColor(STATE_PUSH, new Color(Display.getCurrent(), 29, 109, 140)); - attr.setColor(STATE_HOVER, new Color(Display.getCurrent(), 0, 134, 185)); - attr.setColor(STATE_NORMAL, new Color(Display.getCurrent(), 67, 67, 67)); - } - - private PaintListener buttonPaintListener = new PaintListener() { - - @Override - public void paintControl(PaintEvent e) { - buttonRenderer.draw(e.gc, (Canvas) e.widget, state, attr); - } - }; - - public void setTitle(String newTitle) { - attr.setText(newTitle); - } - - public void setText(String newTitle) { - attr.setText(newTitle); - } - - public void setButtonImage(Image img) { - attr.setButtonImage(img); - } - - public void setRenderer(DACustomButtonDefaultRenderer newRenderer) { - buttonRenderer = newRenderer; - } - - public void setEnabled(boolean enabled) { - this.enabled = enabled; - if (enabled) { - changeButtonState(STATE_NORMAL); - } else { - changeButtonState(STATE_DISABLE); - } - } - - public boolean getEnabled() { - return this.enabled; - } - - public void setImage(int state, Image image) { - attr.setImage(state, image); - } - - public Image getImage(int state) { - return attr.getImage(state); - } - - public void setColor(int state, Color color) { - attr.setColor(state, color); - } - - public void setVisible(boolean visible) { - setVisible(visible); - } - - public void setFont(Font font) { - attr.setFont(font); - } - - public void setFontPoint(Point p) { - attr.setFontPoint(p); - } - - public void setColors(Color normal, Color push, Color hover, Color disable) { - attr.setColor(STATE_NORMAL, normal); - attr.setColor(STATE_PUSH, push); - attr.setColor(STATE_HOVER, hover); - attr.setColor(STATE_DISABLE, disable); - attr.setDrawType(TYPE_COLOR); - } - - public void setImages(Image normal, Image push, Image hover, Image disable) { - attr.setImage(STATE_NORMAL, normal); - attr.setImage(STATE_PUSH, push); - attr.setImage(STATE_HOVER, hover); - attr.setImage(STATE_DISABLE, disable); - attr.setDrawType(TYPE_IMAGE); - } - - public void setOutlineColors(Color normal, Color push, Color hover, Color disable) { - attr.setOutlineColor(STATE_NORMAL, normal); - attr.setOutlineColor(STATE_PUSH, push); - attr.setOutlineColor(STATE_HOVER, hover); - attr.setOutlineColor(STATE_DISABLE, disable); - } - - public void setOutlineInColors(Color normal, Color push, Color hover, Color disable) { - attr.setOutlineInColor(STATE_NORMAL, normal); - attr.setOutlineInColor(STATE_PUSH, push); - attr.setOutlineInColor(STATE_HOVER, hover); - attr.setOutlineInColor(STATE_DISABLE, disable); - } - - public void addClickListener(DACustomButtonClickEventListener listener) { - addListener(SWT.MouseUp, listener); - } - - public int getState() { - return state; - } - - public void setGradation(Color normalStart, Color normalEnd, Color pushStart, Color pushEnd, - Color hoverStart, Color hoverEnd, Color disableStart, Color disableEnd) { - attr.setColor(0, normalStart); - attr.setColor(1, normalEnd); - attr.setColor(2, pushStart); - attr.setColor(3, pushEnd); - attr.setColor(4, hoverStart); - attr.setColor(5, hoverEnd); - attr.setColor(6, disableStart); - attr.setColor(7, disableEnd); - attr.setDrawType(TYPE_GRADATION); - } - - public void setGradationColor(int state, Color start, Color end) { - attr.setColor(state * 2, start); - attr.setColor(state * 2 + 1, end); - } - - public void setFontColors(Color normal, Color push, Color hover, Color disable) { - attr.setFontColor(STATE_NORMAL, normal); - attr.setFontColor(STATE_PUSH, push); - attr.setFontColor(STATE_HOVER, hover); - attr.setFontColor(STATE_DISABLE, disable); - } - - - public void setFontColor(int state, Color color) { - attr.setFontColor(state, color); - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/DACustomButtonAttribute.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/DACustomButtonAttribute.java deleted file mode 100644 index f654d0a..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/DACustomButtonAttribute.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.button; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.Font; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Point; - -public class DACustomButtonAttribute { - private final int MAX_SIZE = 12; - private String text; - private Image buttonImage = null; - private Font font; - private Point fontPoint; - private int drawType = DACustomButton.TYPE_COLOR; - - private List images = new ArrayList(); - private List colors = new ArrayList(); - private List fontColors = new ArrayList(); - private List outlineColors = new ArrayList(); - private List outlineInColors = new ArrayList(); - private boolean enabled; - - public DACustomButtonAttribute() { - enabled = true; - - // init array list - for (int i = 0; i < MAX_SIZE; i++) { - images.add(null); - colors.add(null); - fontColors.add(null); - outlineColors.add(null); - outlineInColors.add(null); - } - } - - public String getText() { - return text; - } - - public void setText(String text) { - this.text = text; - } - - public Image getButtonImage() { - return buttonImage; - } - - public void setButtonImage(Image img) { - buttonImage = img; - } - - public Font getFont() { - return font; - } - - public void setFont(Font font) { - this.font = font; - } - - public Point getFontPoint() { - return fontPoint; - } - - public void setFontPoint(Point fontPoint) { - this.fontPoint = fontPoint; - } - - public int getDrawType() { - return drawType; - } - - public void setDrawType(int type) { - drawType = type; - } - - public boolean isEnabled() { - return enabled; - } - - public void setEnabled(boolean enabled) { - this.enabled = enabled; - } - - public Image getImage(int state) { - if (!images.isEmpty()) { - return images.get(state); - } - return null; - } - - public void setImage(int state, Image img) { - images.set(state, img); - } - - public Color getColor(int state) { - if (!colors.isEmpty()) { - return colors.get(state); - } - return null; - } - - public void setColor(int state, Color color) { - colors.set(state, color); - } - - public void setFontColor(int state, Color color) { - fontColors.set(state, color); - } - - public Color getFontColor(int state) { - return fontColors.get(state); - } - - public void setOutlineColor(int state, Color color) { - outlineColors.set(state, color); - } - - public Color getOutlineColor(int state) { - return outlineColors.get(state); - } - - public void setOutlineInColor(int state, Color color) { - outlineInColors.set(state, color); - } - - public Color getOutlineInColor(int state) { - return outlineInColors.get(state); - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/DACustomButtonClickEventListener.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/DACustomButtonClickEventListener.java deleted file mode 100644 index c714b12..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/DACustomButtonClickEventListener.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.button; - -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; - -public abstract class DACustomButtonClickEventListener implements Listener { - - @Override - public void handleEvent(Event event) { - DACustomButton button = (DACustomButton) event.widget; - if (null != button && button.getState() != DACustomButton.STATE_DISABLE) { - Rectangle rectangle = button.getBounds(); - int x = event.x; - int y = event.y; - - if (x < 0 || x > rectangle.width || y < 0 || y > rectangle.height) { - return; - } - } else { - return; - } - - handleClickEvent(button); - } - - public abstract void handleClickEvent(DACustomButton button); -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/DACustomButtonDefaultRenderer.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/DACustomButtonDefaultRenderer.java deleted file mode 100644 index 0ffe4cb..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/DACustomButtonDefaultRenderer.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.button; - -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.widgets.Canvas; - -public abstract class DACustomButtonDefaultRenderer { - public abstract void draw(GC gc, Canvas canvas, int state, - DACustomButtonAttribute attr); - -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/DACustomButtonRenderer.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/DACustomButtonRenderer.java deleted file mode 100644 index a75406c..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/DACustomButtonRenderer.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.button; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.Font; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.widgets.Canvas; -import org.eclipse.swt.widgets.Display; -import org.tizen.dynamicanalyzer.widgets.helper.ColorResources; - -public class DACustomButtonRenderer extends DACustomButtonDefaultRenderer { - - @Override - public void draw(GC gc, Canvas canvas, int state, - DACustomButtonAttribute attr) { - Rectangle rect = canvas.getClientArea(); - - if (attr.getDrawType() == DACustomButton.TYPE_IMAGE) { - Image image = attr.getImage(state); - if (null == image) { - return; - } - - gc.drawImage(image, rect.x, rect.y); - drawButtonText(gc, rect, attr, state); - } else if (attr.getDrawType() == DACustomButton.TYPE_COLOR - || attr.getDrawType() == DACustomButton.TYPE_GRADATION) { - drawButton(gc, rect, state, attr); - } - drawButtonImage(gc, rect, attr); - } - - public int computeFontSize(Rectangle rect) { - if (rect.height > 20) - return 10; - else - return 8; - } - - public void drawButton(GC gc, Rectangle rect, int state, - DACustomButtonAttribute attr) { - if (attr.getDrawType() == DACustomButton.TYPE_COLOR) { - gc.setBackground(attr.getColor(state)); - gc.fillRectangle(rect); - } else { - int index = state * 2; - gc.setForeground(attr.getColor(index)); - gc.setBackground(attr.getColor(index + 1)); - gc.fillGradientRectangle(rect.x, rect.y, rect.width, rect.height, - true); - } - - Rectangle r = new Rectangle(0, 0, rect.width - 1, rect.height - 1); - if (attr.getButtonImage() == null) { - drawButtonText(gc, r, attr, state); - } - Color c = gc.getForeground(); - if (null != attr.getOutlineColor(state)) { - gc.setForeground(attr.getOutlineColor(state)); - } else { - gc.setForeground(ColorResources.BLACK); - } - gc.drawRectangle(r); - gc.setForeground(c); - } - - protected void drawButtonImage(GC gc, Rectangle rect, - DACustomButtonAttribute attr) { - if (attr != null && attr.getButtonImage() != null) { - Image img = attr.getButtonImage(); - Rectangle imgRect = img.getBounds(); - int width = rect.width - imgRect.width; - int height = rect.height - imgRect.height; - int x = 0, y = 0; - if (width > 0) { - x = width / 2; - } - - if (height > 0) { - y = height / 2; - } - gc.drawImage(img, x, y); - } - } - - protected void drawButtonText(GC gc, Rectangle rect, - DACustomButtonAttribute attr, int state) { - String s = null; - Font f = null; - Point p = null; - if (null != (s = attr.getText())) { - if (null == (f = attr.getFont())) { - f = new Font(Display.getCurrent(), "Arial", - computeFontSize(rect), SWT.BOLD); - attr.setFont(f); - } - gc.setFont(f); - - int x = 0, y = 0; - int offset = 0; - if (null == (p = attr.getFontPoint())) { - p = gc.textExtent(s, SWT.DRAW_MNEMONIC); - x = (rect.width - p.x) / 2; - y = (rect.height - p.y) / 2; - x = (x < 0) ? 0 : x; - // rect size < text length -> insert offset - offset = ((x - rect.x) < 4) ? 4 : 0; - } else { - x = p.x; - y = p.y; - } - - if (null != attr.getFontColor(state)) { - gc.setForeground(attr.getFontColor(state)); - } else { - gc.setForeground(ColorResources.BLACK); - } - gc.drawString(s, x + offset, y, true); - } - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/toggle/DACustomToggleButton.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/toggle/DACustomToggleButton.java deleted file mode 100644 index f5ca2db..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/toggle/DACustomToggleButton.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.button.toggle; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; -import org.tizen.dynamicanalyzer.widgets.button.DACustomButton; -import org.tizen.dynamicanalyzer.widgets.helper.ColorResources; - -public class DACustomToggleButton extends DACustomButton { - - public static final int STATE_TOGGLE = 4; - public static final int STATE_TOGGLE_HOVER = 5; - private boolean toggle = false; - private boolean toggleByButton = false; - - public DACustomToggleButton(Composite parent, Image normal, - Image mouseDown, Image hover, Image disable, Image toggle, - Image toggleHover) { - super(parent, normal, mouseDown, hover, disable); - buttonRenderer = new DACustomToggleButtonRenderer(); - - attr.setImage(STATE_TOGGLE, toggle); - attr.setImage(STATE_TOGGLE_HOVER, toggleHover); - addListeners(); - } - - public DACustomToggleButton(Composite parent, int style) { - super(parent, style); - buttonRenderer = new DACustomToggleButtonRenderer(); - attr.setColor(STATE_TOGGLE, ColorResources.BLUE); - attr.setColor(STATE_TOGGLE_HOVER, ColorResources.WHITE); - addListeners(); - } - - public DACustomToggleButton(Composite parent, Color normalStart, - Color normalEnd, Color pushStart, Color pushEnd, Color hoverStart, - Color hoverEnd, Color disableStart, Color disableEnd, - Color toggleStart, Color toggleEnd, Color toggleHoverStart, - Color toggleHoverEnd) { - this(parent, SWT.NONE); - attr.setColor(0, normalStart); - attr.setColor(1, normalEnd); - attr.setColor(2, pushStart); - attr.setColor(3, pushEnd); - attr.setColor(4, hoverStart); - attr.setColor(5, hoverEnd); - attr.setColor(6, disableStart); - attr.setColor(7, disableEnd); - attr.setColor(8, toggleStart); - attr.setColor(9, toggleEnd); - attr.setColor(10, toggleHoverStart); - attr.setColor(11, toggleHoverEnd); - attr.setDrawType(TYPE_GRADATION); - } - - public void setToggled(boolean toggled) { - if (!toggleByButton) { - toggle = toggled; - if (toggled) { - changeButtonState(STATE_TOGGLE); - } else { - changeButtonState(STATE_NORMAL); - } - } - } - - public boolean isToggled() { - return toggle; - } - - @Override - public void addListeners() { - if (null != toggleButtonMouseListener) { - this.addListener(SWT.MouseEnter, toggleButtonMouseListener); - this.addListener(SWT.MouseExit, toggleButtonMouseListener); - this.addListener(SWT.MouseDown, toggleButtonMouseListener); - this.addListener(SWT.MouseUp, toggleButtonMouseListener); - } - } - - private Listener toggleButtonMouseListener = new Listener() { - - @Override - public void handleEvent(Event event) { - if (state == STATE_DISABLE) { - return; - } - - if (event.type == SWT.MouseEnter) { - if (toggle) { - changeButtonState(STATE_TOGGLE_HOVER); - } else { - changeButtonState(STATE_HOVER); - } - } - - if (event.type == SWT.MouseExit) { - if (toggle) { - changeButtonState(STATE_TOGGLE); - } else { - changeButtonState(STATE_NORMAL); - } - } - - if (event.type == SWT.MouseDown) { - changeButtonState(STATE_PUSH); - } - - if (event.type == SWT.MouseUp) { // FIXME - toggle = !toggle; - toggleByButton = !toggleByButton; - if (toggle) { - changeButtonState(STATE_TOGGLE_HOVER); - } else { - changeButtonState(STATE_HOVER); - } - } - } - }; -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/toggle/DACustomToggleButtonRenderer.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/toggle/DACustomToggleButtonRenderer.java deleted file mode 100644 index a9e0074..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/toggle/DACustomToggleButtonRenderer.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.button.toggle; - -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.widgets.Canvas; -import org.tizen.dynamicanalyzer.widgets.button.DACustomButton; -import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonRenderer; -import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonAttribute; - -public class DACustomToggleButtonRenderer extends DACustomButtonRenderer { - - @Override - public void draw(GC gc, Canvas canvas, int state, - DACustomButtonAttribute attr) { - Rectangle rect = canvas.getClientArea(); - if (attr.getDrawType() == DACustomButton.TYPE_IMAGE) { - Image image = attr.getImage(state); - if (null == image) { - return; - } - - gc.drawImage(image, rect.x, rect.y); - drawButtonText(gc, rect, attr, state); - } else if (attr.getDrawType() == DACustomButton.TYPE_COLOR - || attr.getDrawType() == DACustomButton.TYPE_GRADATION) { - drawButton(gc, rect, state, attr); - } - } - -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomChart.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomChart.java deleted file mode 100644 index c66a966..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomChart.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.chart; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; -import org.eclipse.swt.widgets.Canvas; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Shell; - -public class DACustomChart extends Canvas { - private String name; - Composite parent = null; - private List seriesList = new ArrayList(); - private DACustomChartPlot plot = null; - private DACustomChartRenderer chartRenderer = new DACustomChartRenderer(); - private boolean bTooltip = false; - - public DACustomChart(Composite parent, String name) { - super(parent, SWT.TRANSPARENT|SWT.DOUBLE_BUFFERED); - this.parent = parent; - this.name = name; - plot = new DACustomChartPlot(this); - addListeners(); - // TODO Auto-generated constructor stub - } - - public DACustomChart(Composite parent, String name, - DACustomChartSeries series) { - this(parent, name); - seriesList.add(series); - - // TODO Auto-generated constructor stub - } - - private void addListeners() { - this.addPaintListener(chartPaintListener); - // showTooltip(true); //FIXME : delete - } - - public String getChartName() { - return name; - } - - public void replacePlot(DACustomChartPlot plot) { - this.plot = plot; - this.plot.setChart(this); - } - - public DACustomChartPlot getPlot() { - return plot; - } - - public List getSeriesList() { - return seriesList; - } - - public DACustomChartSeries getSeries(int index) { - if (null == seriesList) { - return null; - } - if (seriesList.size() < index) { - return null; - } else { - return seriesList.get(index); - } - } - - public DACustomChartSeries getSeries(String name) { - if (null == seriesList) { - return null; - } - for (int i = 0; i < seriesList.size(); i++) { - DACustomChartSeries series = seriesList.get(i); - if (series.getName().compareTo(name) == 0) { - return series; - } - } - return null; - } - - public void addSeries(DACustomChartSeries series) { - seriesList.add(series); - } - - public void clear() { - seriesList.clear(); - plot.clear(); - } - - private PaintListener chartPaintListener = new PaintListener() { - - @Override - public void paintControl(PaintEvent e) { - // TODO Auto-generated method stub - chartRenderer.draw(e.gc, (DACustomChart) e.widget); - } - }; - - public void showTooltip(boolean show) { - if (bTooltip == show) { - return; - } - if (true == show) { - this.addListener(SWT.MouseMove, chartTooltipListener); - this.addListener(SWT.MouseEnter, chartTooltipListener); - this.addListener(SWT.MouseExit, chartTooltipListener); - } else { - this.removeListener(SWT.MouseMove, chartTooltipListener); - this.removeListener(SWT.MouseEnter, chartTooltipListener); - this.removeListener(SWT.MouseExit, chartTooltipListener); - } - } - - private Listener chartTooltipListener = new Listener() { - - @Override - public void handleEvent(Event event) { - - switch (event.type) { - case SWT.MouseMove: - if (null != plot) { - DACustomChartTooltip.getInstance().move(); - } - break; - case SWT.MouseEnter: - System.out.println("MouseEnter"); - if (null != plot) { - Shell shell = parent.getShell(); - DACustomChartTooltip.getInstance().open(shell, plot); - } - break; - case SWT.MouseExit: - System.out.println("MouseExit"); - - DACustomChartTooltip.getInstance().close(); - - break; - default: - break; - } - } - }; -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomChartPlot.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomChartPlot.java deleted file mode 100644 index b320186..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomChartPlot.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.chart; - -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Rectangle; - -public class DACustomChartPlot { - private double visibleStartX = 0; - private double visibleEndX = 0; - private double visibleStartY = 0; - private double visibleEndY = 0; - private double validEndX = 0; - private double validEndY = 0; - private boolean bAutoHeightRange = false; - private boolean bSeriesHeightRange = false; - private Image backgroundImage = null; - private DACustomChart chart; - private DACustomChartPlotIntervalMarker marker = null; - private DACustomChartPlotTooltip tooltip = null; - - public DACustomChartPlot(DACustomChart chart) { - this.chart = chart; - } - - public void setChart(DACustomChart chart) { - this.chart = chart; - } - - public DACustomChart getChart() { - return chart; - } - - public void clear() { - visibleStartX = 0; - visibleEndX = 0; - visibleStartY = 0; - visibleEndY = 0; - validEndX = 0; - validEndY = 0; - removeIntervalMarker(); - removeTooltip(); - } - - public void setIntervalMarker(DACustomChartPlotIntervalMarker marker) { - this.marker = marker; - this.marker.registerChart(chart); - } - - public void removeIntervalMarker() { - if (null != marker) { - this.marker.unRegisterChart(chart); - this.marker = null; - } - } - - public DACustomChartPlotIntervalMarker getIntervalMarker() { - return marker; - } - - public void setTooltip(DACustomChartPlotTooltip tooltip) { - this.tooltip = tooltip; - this.tooltip.registerChart(chart); - } - - public void removeTooltip() { - if (null != tooltip) { - this.tooltip.unRegisterChart(chart); - this.tooltip = null; - } - } - - public DACustomChartPlotTooltip getTooltip() { - return tooltip; - } - - public void setAxisRangeX(double startX, double endX) { - this.visibleStartX = startX; - this.visibleEndX = endX; - } - - public void setAxisRangeY(double startY, double endY) { - this.visibleStartY = startY; - this.visibleEndY = endY; - } - - public void setAxisStartX(double startX) { - this.visibleStartX = startX; - } - - public void setAxisEndX(double endX) { - this.visibleEndX = endX; - } - - public void setAxisStartY(double startY) { - this.visibleStartY = startY; - } - - public void setAxisEndY(double endY) { - this.visibleEndY = endY; - } - - public boolean isAutoHeightRange() { - return bAutoHeightRange; - } - - public void setAutoHeightRange(boolean auto) { - bAutoHeightRange = auto; - } - - public boolean isSeriesHeightRange() { - return bSeriesHeightRange; - } - - public void setSeriesHeightRange(boolean bSeriesHeightRange) { - this.bSeriesHeightRange = bSeriesHeightRange; - } - - public double getVisibleStartX() { - return visibleStartX; - } - - public double getVisibleEndX() { - return visibleEndX; - } - - public double getVisibleStartY() { - return visibleStartY; - } - - public double getVisibleEndY() { - return visibleEndY; - } - - public void setBackgroundImage(Image image) { - this.backgroundImage = image; - } - - public Image getBackgroundImage() { - return backgroundImage; - } - - public int getXPixcelFromX(double x, Rectangle r) { - return (int) (((double) r.width) * (x - visibleStartX) / (visibleEndX - visibleStartX)); - } - - public int getXPixcelFromX(double x) { - Rectangle r = chart.getBounds(); - return getXPixcelFromX(x, r); - } - - public int getYPixcelFromY(DACustomChartSeries series, double y, Rectangle r) { - double endY = 0; - if (true == bSeriesHeightRange) { - if (true == bAutoHeightRange) { - endY = series.getMaxY() * 1.1; - } else { - endY = series.getEndY() * 1.1; - } - } else { - endY = this.visibleEndY; - } - - double pixcelY; - if (visibleStartY == endY) { - pixcelY = 0; - } else { - pixcelY = ((double) r.height) * (y - visibleStartY) - / (endY - visibleStartY); - } - return (int) (r.height - pixcelY - 1); - } - - public int getYPixcelFromY(DACustomChartSeries series, double y) { - Rectangle r = chart.getBounds(); - return getYPixcelFromY(series, y, r); - } - - public double getXFromXPixcel(int xPixcel, Rectangle r) { - return (((visibleEndX - visibleStartX) * (double) xPixcel) / (double) r.width) - + visibleStartX; - } - - public double getXFromXPixcel(int xPixcel) { - Rectangle r = chart.getBounds(); - return getXFromXPixcel(xPixcel, r); - } - - public double getYFromYPixcel(int yPixcel, Rectangle r) { - int y = yPixcel + r.height + 1; - return (((visibleEndY - visibleStartY) * (double) y) / (double) r.height) - + visibleStartY; - } - - public double getYFromYPixcel(int yPixcel) { - Rectangle r = chart.getBounds(); - return getYFromYPixcel(yPixcel, r); - } - - public double getValidEndX() { - return validEndX; - } - - public void setValidEndX(double validEndX) { - this.validEndX = validEndX; - } - - public double getValidEndY() { - return validEndY; - } - - public void setValidEndY(double validEndY) { - this.validEndY = validEndY; - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomChartPlotIntervalMarker.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomChartPlotIntervalMarker.java deleted file mode 100644 index 598d660..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomChartPlotIntervalMarker.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.chart; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.widgets.Display; - -public class DACustomChartPlotIntervalMarker { - private double startVal; - private double endVal; - private int alpha = (int) (255*0.25); //default - private Color backgroundColor; - private Color foregroundColor; - private List charts = new ArrayList(); - - public DACustomChartPlotIntervalMarker(double start, double end){ - startVal = start; - endVal = end; - } - - public List getRegisteChartList(){ - return charts; - } - - public void registerChart(DACustomChart chart){ - charts.add(chart); - } - - public void unRegisterChart(DACustomChart chart){ - for(int i=0; i=0; i--){ - if(charts.get(i).isDisposed()){ - charts.remove(i); - } - else{ - charts.get(i).redraw(); - } - } - } - - public void setInterval(double start, double end){ - startVal = start; - endVal = end; - redrawRegisteredChart(); - } - - public double getStartVal() { - return startVal; - } - - public void setStartVal(double startVal) { - this.startVal = startVal; - redrawRegisteredChart(); - } - - public double getEndVal() { - return endVal; - } - - public void setEndVal(double endVal) { - this.endVal = endVal; - redrawRegisteredChart(); - } - - public int getAlpha() { - return alpha; - } - - public void setAlpha(int alpha) { - this.alpha = alpha; - redrawRegisteredChart(); - } - - public Color getBackgroundColor() { - if (null == backgroundColor) { - backgroundColor = new Color(Display.getCurrent(), 23, 98, 132); - } - return backgroundColor; - } - - public void setBackgroundColor(Color backgroundColor) { - this.backgroundColor = backgroundColor; - redrawRegisteredChart(); - } - - public Color getForegroundColor() { - return foregroundColor; - } - - public void setForegroundColor(Color foregroundColor) { - this.foregroundColor = foregroundColor; - redrawRegisteredChart(); - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomChartPlotTooltip.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomChartPlotTooltip.java deleted file mode 100644 index c5dda00..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomChartPlotTooltip.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.chart; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.Font; -import org.eclipse.swt.widgets.Display; -import org.tizen.dynamicanalyzer.widgets.helper.FontResources; - -public class DACustomChartPlotTooltip { - public static final int TOOLTIP_MARGIN = 4; - public static final int TOOLTIP_HEIGHT = 18; - public static final int TOOLTIP_SERIES_RECT_LENGTH = 10; - public static final int TOOLTIP_SHOW_MIN = 50; - private boolean bTooltip = false; - private double startVal; - private double yPosRatio; - private Color backgroundColor; - private Color lineColor; - private Color textColor; - private Font font; - private List charts = new ArrayList(); - - public DACustomChartPlotTooltip(double start){ - setStartVal(start); - } - - public List getRegisteChartList(){ - return charts; - } - - public void registerChart(DACustomChart chart){ - charts.add(chart); - } - - public void unRegisterChart(DACustomChart chart){ - for(int i=0; i - * Sanghyun Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.chart; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.Font; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.tizen.dynamicanalyzer.widgets.helper.ColorResources; -import org.tizen.dynamicanalyzer.widgets.helper.FontResources; -import org.tizen.dynamicanalyzer.widgets.helper.ImageResources; - -public class DACustomChartRenderer { - private final int MARGIN = 3; - private final int ARROW_MARGIN = 2; - private final int EVENT_WIDTH = 2; - private final double EVENT_HEIGHT_MARGIN_RATIO = 0.20; - private final double LOAD_HEIGHT_MARGIN_RATIO = 0.20; - private boolean bInitialized = false; - private List seriesList = null; - private DACustomChartPlot plot = null; - private Rectangle r = null; - -// private final int SCREENSHOT_HORIZONTAL_TOP_MARGIN = 13; - private final int SCREENSHOT_SELECTED_Y_POSITION = 4; -// private final int SCREENSHOT_HORIZONTAL_SELECTED_MOVE_SIZE = 19; - private final int SCREENSHOT_SELECTED_LINE_WIDTH = 2; - private final int SCREENSHOT_BORDER_LINE_WIDTH = 1; - - private final int MULTY_CHECK_BAR_WIDTH = 2; - - public void draw(GC gc, DACustomChart chart) { - if (false == bInitialized) { - initialize(gc, chart); - } - r = chart.getClientArea(); - - // draw background Image - Image backImage = plot.getBackgroundImage(); - if (null != backImage) { - Rectangle rect = backImage.getBounds(); - gc.drawImage(backImage, rect.x, rect.y, rect.width, rect.height, - r.x, r.y, r.width, r.height); - } - - if (null != seriesList) { - int seriesSize = seriesList.size(); - DACustomChartSeries series; - - if (true == plot.isAutoHeightRange()) { - double maxY = 0; - for (int i = 0; i < seriesSize; i++) { - double tempY = seriesList.get(i).getMaxY(); - if (maxY < tempY) { - maxY = tempY; - } - } - if (maxY * 1.1 > plot.getVisibleEndY() * 1.1) { - plot.setAxisEndY(maxY * 1.1); - } - } - - for (int i = 0; i < seriesSize; i++) { - series = seriesList.get(i); - switch (series.getStyle()) { - case DACustomChartSeries.SERIES_STYLE_EVENT: // FIXME - drawEventSeries(gc, series); - break; - case DACustomChartSeries.SERIES_STYLE_BAR: - drawBarSeries(gc, series); - break; - case DACustomChartSeries.SERIES_STYLE_NONE: - case DACustomChartSeries.SERIES_STYLE_LINE: - drawLineSeries(gc, series); - break; - case DACustomChartSeries.SERIES_STYLE_AREA: - drawAreaSeries(gc, series); - break; - case DACustomChartSeries.SERIES_STYLE_MULTY_CHECK_BAR: - drawMultyCheckBarSeries(gc, series, seriesSize, i); - break; - case DACustomChartSeries.SERIES_STYLE_STEP: - drawStepSeries(gc, series); - break; - case DACustomChartSeries.SERIES_STYLE_IMAGE: - drawImageSeries(gc, series); - break; - case DACustomChartSeries.SERIES_STYLE_LOAD: - drawLoadSeries(gc, series); - break; - case DACustomChartSeries.SERIES_STYLE_ARROW: - drawArrowSeries(gc, series); - break; - case DACustomChartSeries.SERIES_STYLE_STATE: - drawStateSeries(gc, series); - break; - default: - System.out.println("Undefined series style"); - break; - } - } - } - if (r.height > DACustomChartPlotTooltip.TOOLTIP_SHOW_MIN) { - drawTooltip(gc); - } - drawRange(gc); - } - - private void initialize(GC gc, DACustomChart chart) { - this.seriesList = chart.getSeriesList(); - this.plot = chart.getPlot(); - bInitialized = true; - } - - public void drawRange(GC gc) { - DACustomChartPlotIntervalMarker marker = plot.getIntervalMarker(); - if (null == marker) { - return; - } - int pixcelStartX = plot.getXPixcelFromX(marker.getStartVal()); - int pixcelEndX = plot.getXPixcelFromX(marker.getEndVal()); - - Color color = marker.getBackgroundColor(); - int alpha = gc.getAlpha(); - gc.setAlpha(marker.getAlpha()); - if (pixcelStartX == pixcelEndX) { - gc.setForeground(color); - gc.setLineWidth(2); - gc.drawLine(pixcelStartX, r.y, pixcelStartX, r.height); - } else { - gc.setBackground(color); - gc.fillRectangle(pixcelStartX, 0, pixcelEndX - pixcelStartX, - r.height); - } - gc.setAlpha(alpha); - } - - private int getTooltipStartX(double startVal, int width, int margin) { - int ret = plot.getXPixcelFromX(startVal); - if (ret + width > r.x + r.width) { - ret = ret - width - margin; - } else if (ret < r.x) { - ret = r.x + margin; - } else { - ret += margin; - } - - return ret; - } - - public void drawTooltip(GC gc) { - if (plot instanceof DACustomScreenshotChartPlot) { - return; - } - - DACustomChartPlotTooltip tooltip = plot.getTooltip(); - if (null == tooltip || false == tooltip.isTooltip() - || -1 == tooltip.getStartVal()) { - return; - } - - gc.setBackground(tooltip.getBackgroundColor()); - - List tooltipTexts = new ArrayList(); - - // make text & draw line - int textWidthMax = 0; - int textHeightMax = 0; - double realXVal = tooltip.getStartVal(); - for (int i = 0; i < seriesList.size(); i++) { - if (plot instanceof DACustomUIEventChartPlot) { - i = (int) (seriesList.size() * tooltip.getYPosRatio()); - } - DACustomChartSeries series = seriesList.get(i); - int index = series.getPrevIndexByXvalue(realXVal); - String text = ""; - if (index >= 0) { - double yVal = series.getSeriesItemList().get(index).getY(); - double xVal = series.getSeriesItemList().get(index).getX(); - - if (!(plot instanceof DACustomUIEventChartPlot)) { - text += series.getName() + " : "; - } - text += series.getSeriesItemList().get(index).getTooltipText(); - - gc.setForeground(tooltip.getLineColor()); - gc.setLineStyle(SWT.LINE_DOT); - gc.setLineWidth(1); - - if (!(plot instanceof DACustomUIEventChartPlot)) { - gc.drawLine(0, plot.getYPixcelFromY(series, yVal, r), - r.width, plot.getYPixcelFromY(series, yVal, r)); - } - - gc.drawLine(plot.getXPixcelFromX(xVal), 0, - plot.getXPixcelFromX(xVal), r.height); - gc.setLineStyle(SWT.LINE_CUSTOM); - } else { - text = series.getName(); - } - - tooltipTexts.add(text); - - int textWidth = gc.textExtent(text).x; - int textHeight = gc.textExtent(text).y; - if (textWidthMax < textWidth) { - textWidthMax = textWidth; - } - if (textHeightMax < textHeight) { - textHeightMax = textHeight; - } - - if (plot instanceof DACustomUIEventChartPlot) { - break; - } - } - int preTextWidthMargin = DACustomChartPlotTooltip.TOOLTIP_MARGIN - + DACustomChartPlotTooltip.TOOLTIP_SERIES_RECT_LENGTH - + DACustomChartPlotTooltip.TOOLTIP_MARGIN; - int startX = getTooltipStartX(realXVal, textWidthMax - + preTextWidthMargin, DACustomChartPlotTooltip.TOOLTIP_MARGIN); - - int totalHeight; - if (plot instanceof DACustomUIEventChartPlot) { - totalHeight = textHeightMax - + DACustomChartPlotTooltip.TOOLTIP_MARGIN - + DACustomChartPlotTooltip.TOOLTIP_MARGIN; - } else { - totalHeight = seriesList.size() * textHeightMax - + DACustomChartPlotTooltip.TOOLTIP_MARGIN - + DACustomChartPlotTooltip.TOOLTIP_MARGIN; - } - - gc.setBackground(tooltip.getBackgroundColor()); - gc.setForeground(tooltip.getTextColor()); - - int startY; - if (plot instanceof DACustomUIEventChartPlot) { - startY = (int) (r.height - * (int) (tooltip.getYPosRatio() * seriesList.size()) / seriesList - .size()); - if (r.height - startY - totalHeight < 0) { - startY = r.height - totalHeight - 1; - if (startY < 0) { - startY = 0; - } - } - - } else { - startY = (r.y + r.height / 2) - (totalHeight / 2); - } - - gc.fillRectangle(startX, startY, preTextWidthMargin + textWidthMax - + DACustomChartPlotTooltip.TOOLTIP_MARGIN, totalHeight); - gc.drawRectangle(startX, startY, preTextWidthMargin + textWidthMax - + DACustomChartPlotTooltip.TOOLTIP_MARGIN, totalHeight); - gc.setFont(tooltip.getFont()); - for (int i = 0; i < seriesList.size(); i++) { - int y = startY + (textHeightMax * i) - + DACustomChartPlotTooltip.TOOLTIP_MARGIN; - DACustomChartSeries series; - if (plot instanceof DACustomUIEventChartPlot) { - series = seriesList.get((int) (seriesList.size() * tooltip - .getYPosRatio())); - } else { - series = seriesList.get(i); - } - gc.setBackground(series.getColor()); - - gc.fillRectangle( - startX + DACustomChartPlotTooltip.TOOLTIP_MARGIN, - y - + textHeightMax - / 2 - - DACustomChartPlotTooltip.TOOLTIP_SERIES_RECT_LENGTH - / 2, - DACustomChartPlotTooltip.TOOLTIP_SERIES_RECT_LENGTH, - DACustomChartPlotTooltip.TOOLTIP_SERIES_RECT_LENGTH); - gc.setBackground(tooltip.getBackgroundColor()); - gc.drawText(tooltipTexts.get(i), startX - + DACustomChartPlotTooltip.TOOLTIP_MARGIN - + DACustomChartPlotTooltip.TOOLTIP_SERIES_RECT_LENGTH - + DACustomChartPlotTooltip.TOOLTIP_MARGIN, y, - SWT.DRAW_DELIMITER); - if (plot instanceof DACustomUIEventChartPlot) { - break; - } - } - } - - private void drawBarSeries(GC gc, DACustomChartSeries series) { - List seriesItems = series.getSeriesItemList(); - if (null == seriesItems) { - return; - } - - int seriesItemSize = seriesItems.size(); - - if (seriesItemSize < 1) { - return; - } - - DACustomChartSeriesItem seriesItem; - Color color = series.getColor(); - gc.setBackground(color); - gc.setAlpha((int) (255 * 0.8)); - gc.setAntialias(SWT.ON); - - int index = series.getPrevIndexByXvalue(plot.getVisibleStartX()); - if (index < 0) { - index = 0; - } - for (int i = index; i < seriesItemSize; i++) { - seriesItem = seriesItems.get(i); - - double barWidthTime = 0; - if (seriesItem.getBarWidth() == -1) { - barWidthTime = series.getBarWidth(); - } else { - barWidthTime = seriesItem.getBarWidth(); - } - - double currentX = seriesItem.getX(); - - int pixcelStartX = plot.getXPixcelFromX(seriesItem.getX(), r); - int pixcelStartY = plot.getYPixcelFromY(series, seriesItem.getY(), - r); - - int barWidth = plot.getXPixcelFromX(currentX + barWidthTime, r) - - pixcelStartX; - - if (barWidth < 1) { - barWidth = 1; - } - - color = seriesItem.getEventColor(); - if (null != color) { - gc.setBackground(color); - gc.fillRectangle(pixcelStartX, pixcelStartY, barWidth, r.y - + r.height - pixcelStartY); - gc.setBackground(series.getColor()); - } else { - gc.fillRectangle(pixcelStartX, pixcelStartY, barWidth, r.y - + r.height - pixcelStartY); - } - if (currentX > plot.getVisibleEndX()) { - break; - } - } - gc.setAlpha(255); - } - - private void drawMultyCheckBarSeries(GC gc, DACustomChartSeries series, - int seriesSize, int seriesIndex) { - List seriesItems = series.getSeriesItemList(); - if (null == seriesItems) { - return; - } - - int seriesItemSize = seriesItems.size(); - Rectangle rect = new Rectangle(r.x, r.y - + (r.height / seriesSize * seriesIndex), r.width, r.height - / seriesSize); - gc.setForeground(ColorResources.UI_EVENT_CHART_TEXT); - Font tempFont = gc.getFont(); - gc.setFont(FontResources.TIMELINE_TICK_FONT); - gc.drawText(series.getName(), rect.x + 3, rect.y + 3, true); - gc.setFont(tempFont); - if (seriesIndex != 0) { - gc.setForeground(ColorResources.UI_EVENT_CHART_SEPERATE_LINE); - gc.drawLine(rect.x, rect.y, rect.width, rect.y); - } - - if (seriesItemSize < 1) { - return; - } - DACustomChartSeriesItem seriesItem; - Color color = series.getColor(); - gc.setBackground(color); - - int index = series.getPrevIndexByXvalue(plot.getVisibleStartX()); - if (index < 0) { - index = 0; - } - - for (int i = index; i < seriesItemSize; i++) { - seriesItem = seriesItems.get(i); - - double currentX = seriesItem.getX(); - int pixcelStartX = plot.getXPixcelFromX(currentX, rect); - - // FIXME - color = seriesItem.getEventColor(); - if (null != color) { - gc.setBackground(color); - gc.fillRectangle(pixcelStartX, rect.y + MARGIN, - MULTY_CHECK_BAR_WIDTH, rect.height - MARGIN); - gc.setBackground(series.getColor()); - } else { - gc.fillRectangle(pixcelStartX, rect.y + MARGIN, - MULTY_CHECK_BAR_WIDTH, rect.height - MARGIN); - } - if (currentX > plot.getVisibleEndX()) { - break; - } - } - } - - private void drawLineSeries(GC gc, DACustomChartSeries series) { - List seriesItems = series.getSeriesItemList(); - if (null == seriesItems) { - return; - } - int seriesItemSize = seriesItems.size(); - if (seriesItemSize < 1) { - return; - } - - DACustomChartSeriesItem seriesItem = seriesItems.get(0); - int oldPixcelX = plot.getXPixcelFromX(seriesItem.getX(), r); - int oldPixcelY = plot.getYPixcelFromY(series, seriesItem.getY(), r); - - if (seriesItemSize == 1) { - if (oldPixcelX < r.x) { - return; - } - Color color = seriesItem.getEventColor(); - if (null == color) { - color = series.getColor(); - } - gc.setForeground(color); - gc.drawPoint(oldPixcelX, oldPixcelY); - return; - } - - Color color = series.getColor(); - gc.setForeground(color); - gc.setLineStyle(SWT.LINE_SOLID); - gc.setAntialias(SWT.ON); - - int index = series.getPrevIndexByXvalue(plot.getVisibleStartX()); - if (index < 0) { - index = 0; - } - - seriesItem = seriesItems.get(index); - double currentX = seriesItem.getX(); - - int newPixcelX = plot.getXPixcelFromX(currentX, r); - - int newPixcelY = plot.getYPixcelFromY(series, seriesItem.getY(), r); - - for (int i = index; i < seriesItemSize; i++) { - seriesItem = seriesItems.get(i); - currentX = seriesItem.getX(); - - oldPixcelX = newPixcelX; - oldPixcelY = newPixcelY; - - newPixcelX = plot.getXPixcelFromX(currentX, r); - newPixcelY = plot.getYPixcelFromY(series, seriesItem.getY(), r); - - gc.drawLine(oldPixcelX, oldPixcelY, newPixcelX, newPixcelY); - if (currentX > plot.getVisibleEndX()) { - return; - } - } - // draw endVal - int endX = plot.getXPixcelFromX(plot.getValidEndX(), r); - if (endX > newPixcelX) { - gc.setLineStyle(SWT.LINE_DOT); - gc.drawLine(newPixcelX, newPixcelY, endX, newPixcelY); - gc.setLineStyle(SWT.LINE_CUSTOM); - } - } - - private void drawAreaSeries(GC gc, DACustomChartSeries series) { - List seriesItems = series.getSeriesItemList(); - if (null == seriesItems) { - return; - } - - int seriesItemSize = seriesItems.size(); - if (seriesItemSize < 1) { - return; - } - - DACustomChartSeriesItem seriesItem = seriesItems.get(0); - int oldPixcelX = plot.getXPixcelFromX(seriesItem.getX(), r); - int oldPixcelY = plot.getYPixcelFromY(series, seriesItem.getY(), r); - int baseY = r.y + r.height; - - if (seriesItemSize == 1) { - if (oldPixcelX < r.x) { - return; - } - Color color = seriesItem.getEventColor(); - if (null == color) { - color = series.getColor(); - } - gc.setForeground(color); - gc.drawLine(oldPixcelX, baseY, oldPixcelX, oldPixcelY); - return; - } - - Color color = series.getColor(); - gc.setAntialias(SWT.ON); - gc.setAlpha((int) (255 * 0.8)); - gc.setForeground(color); - gc.setBackground(color); - int index = series.getPrevIndexByXvalue(plot.getVisibleStartX()); - if (index < 0) { - index = 0; - } - - seriesItem = seriesItems.get(index); - double currentX = seriesItem.getX(); - - int newPixcelX = plot.getXPixcelFromX(currentX, r); - int newPixcelY = plot.getYPixcelFromY(series, seriesItem.getY(), r); - - for (int i = index; i < seriesItemSize; i++) { - seriesItem = seriesItems.get(i); - currentX = seriesItem.getX(); - - oldPixcelX = newPixcelX; - oldPixcelY = newPixcelY; - - newPixcelX = plot.getXPixcelFromX(currentX, r); - newPixcelY = plot.getYPixcelFromY(series, seriesItem.getY(), r); - int[] polygon = { oldPixcelX, baseY, oldPixcelX, oldPixcelY, - newPixcelX, newPixcelY, newPixcelX, baseY }; - gc.setAlpha((int) (255 * 0.8)); - gc.fillPolygon(polygon); - gc.setAlpha((int) (255 * 0.2)); - gc.drawPolygon(polygon); - if (currentX > plot.getVisibleEndX()) { - gc.setAlpha(255); - return; - } - } - // draw endVal - int endX = plot.getXPixcelFromX(plot.getValidEndX(), r); - if (endX > newPixcelX) { - gc.setAlpha((int) (255 * 0.4)); - int[] polygon = { newPixcelX, baseY, newPixcelX, newPixcelY, endX, - newPixcelY, endX, baseY }; - gc.fillPolygon(polygon); - } - gc.setAlpha(255); - } - - private void drawStepSeries(GC gc, DACustomChartSeries series) { - List seriesItems = series.getSeriesItemList(); - if (null == seriesItems) { - return; - } - int seriesItemSize = seriesItems.size(); - if (seriesItemSize < 1) { - return; - } - - DACustomChartSeriesItem seriesItem = seriesItems.get(0); - int oldPixcelX = plot.getXPixcelFromX(seriesItem.getX(), r); - int oldPixcelY = plot.getYPixcelFromY(series, seriesItem.getY(), r); - - if (seriesItemSize == 1) { - if (oldPixcelX < r.x) { - return; - } - Color color = seriesItem.getEventColor(); - if (null == color) { - color = series.getColor(); - } - gc.setForeground(color); - gc.drawPoint(oldPixcelX, oldPixcelY); - return; - } - - Color color = series.getColor(); - gc.setForeground(color); - gc.setLineStyle(SWT.LINE_SOLID); - - int index = series.getPrevIndexByXvalue(plot.getVisibleStartX()); - if (index < 0) { - index = 0; - } - - seriesItem = seriesItems.get(index); - double currentX = seriesItem.getX(); - - int newPixcelX = plot.getXPixcelFromX(currentX, r); - int newPixcelY = plot.getYPixcelFromY(series, seriesItem.getY(), r); - - for (int i = index; i < seriesItemSize; i++) { - seriesItem = seriesItems.get(i); - currentX = seriesItem.getX(); - - oldPixcelX = newPixcelX; - oldPixcelY = newPixcelY; - - newPixcelX = plot.getXPixcelFromX(currentX, r); - newPixcelY = plot.getYPixcelFromY(series, seriesItem.getY(), r); - - gc.drawLine(oldPixcelX, oldPixcelY, newPixcelX, oldPixcelY); - gc.drawLine(newPixcelX, oldPixcelY, newPixcelX, newPixcelY); - if (currentX > plot.getVisibleEndX()) { - return; - } - } - // draw endVal - int endX = plot.getXPixcelFromX(plot.getValidEndX(), r); - if (endX > newPixcelX) { - gc.setLineStyle(SWT.LINE_DOT); - gc.drawLine(newPixcelX, newPixcelY, endX, newPixcelY); - gc.setLineStyle(SWT.LINE_CUSTOM); - } - } - - private void drawImageSeries(GC gc, DACustomChartSeries series) { - List seriesItems = series.getSeriesItemList(); - if (null == seriesItems) { - return; - } - - int seriesItemSize = seriesItems.size(); - - if (seriesItemSize < 1) { - return; - } - - - int index = series.getPrevIndexByXvalue(plot.getVisibleStartX()); - if (index < 0) { - index = 0; - } - int highlightedImageIndex = ((DACustomScreenshotChartPlot) plot) - .getHighlightedImageIndex(); - int selectedImageIndex = ((DACustomScreenshotChartPlot) plot) - .getSelectedImageIndex(); - for (int i = index; i < seriesItemSize; i++) { - DACustomChartSeriesItem seriesItem = seriesItems.get(i); - double currentX = seriesItem.getX(); - int pixcelStartX = plot.getXPixcelFromX(currentX, r); - int yPostion = (int)seriesItem.getY(); - Image image = seriesItem.getImage(); - int screenshotWidth = image.getBounds().width; - int screenshotHeight = image.getBounds().height; - - if (i != highlightedImageIndex && i != selectedImageIndex) { - gc.drawImage(image, pixcelStartX, yPostion); - gc.setLineWidth(SCREENSHOT_BORDER_LINE_WIDTH); - gc.setForeground(ColorResources.SCREENSHOT_CHART_BORDER_LINE); - gc.drawRectangle(pixcelStartX, yPostion, screenshotWidth, screenshotHeight); - } - - if (currentX > plot.getVisibleEndX()) { - break; - } - } - - if (selectedImageIndex >= 0) { - gc.setForeground(ColorResources.SCREENSHOT_CHART_SELECTED_LINE); - gc.setLineWidth(SCREENSHOT_SELECTED_LINE_WIDTH); - - DACustomChartSeriesItem seriesItem = seriesItems.get(selectedImageIndex); - Image selectedImage = seriesItem.getImage(); - double currentX = seriesItem.getX(); - int pixcelStartX = plot.getXPixcelFromX(currentX, r); - int yPosition = (int)seriesItem.getY(); - int screenshotWidth = selectedImage.getBounds().width; - int screenshotHeight = selectedImage.getBounds().height; - - if (selectedImageIndex == highlightedImageIndex) { - gc.drawRectangle(pixcelStartX, SCREENSHOT_SELECTED_Y_POSITION, - screenshotWidth + 1, screenshotHeight + 1); - } else { - gc.drawRectangle(pixcelStartX - 1, r.y + yPosition - - 1, screenshotWidth + 1, screenshotHeight + 1); - gc.drawImage(selectedImage, pixcelStartX, yPosition); - } - } - - if (highlightedImageIndex >= 0) { - DACustomChartSeriesItem seriesItem = seriesItems.get(highlightedImageIndex); - Image highlightedImage = seriesItem.getImage(); - double currentX = seriesItems.get(highlightedImageIndex).getX(); - int pixcelStartX = plot.getXPixcelFromX(currentX, r); - int screenshotWidth = highlightedImage.getBounds().width; - int screenshotHeight = highlightedImage.getBounds().height; - - gc.drawImage(highlightedImage, pixcelStartX, SCREENSHOT_SELECTED_Y_POSITION); - gc.setLineWidth(SCREENSHOT_BORDER_LINE_WIDTH); - gc.setForeground(ColorResources.SCREENSHOT_CHART_BORDER_LINE); - gc.drawRectangle(pixcelStartX, SCREENSHOT_SELECTED_Y_POSITION, screenshotWidth, - screenshotHeight); - } - } - - private void drawEventSeries(GC gc, DACustomChartSeries series) { - List seriesItems = series.getSeriesItemList(); - if (null == seriesItems) { - return; - } - - int seriesItemSize = seriesItems.size(); - - if (seriesItemSize < 1) { - return; - } - - DACustomChartSeriesItem seriesItem; - Color color = series.getColor(); - gc.setBackground(color); - gc.setForeground(ColorResources.BLACK); - gc.setAntialias(SWT.ON); - - int index = series.getPrevIndexByXvalue(plot.getVisibleStartX()); - if (index < 0) { - index = 0; - } - for (int i = index; i < seriesItemSize; i++) { - seriesItem = seriesItems.get(i); - - double currentX = seriesItem.getX(); - - int pixcelStartX = plot.getXPixcelFromX(seriesItem.getX(), r); - - Color itemColor = seriesItem.getEventColor(); - int barHeight = (int) ((r.y + r.height) * EVENT_HEIGHT_MARGIN_RATIO); - - if (null != itemColor) { - gc.setBackground(itemColor); - gc.fillRectangle(pixcelStartX, r.y + barHeight, EVENT_WIDTH, - barHeight); - gc.setBackground(color); - } else { - gc.fillRectangle(pixcelStartX, r.y + barHeight, EVENT_WIDTH, - barHeight); - } - if (currentX > plot.getVisibleEndX()) { - break; - } - } - } - - private void drawLoadSeries(GC gc, DACustomChartSeries series) { - List seriesItems = series.getSeriesItemList(); - if (null == seriesItems) { - return; - } - - int seriesItemSize = seriesItems.size(); - - if (seriesItemSize < 1) { - return; - } - - DACustomChartSeriesItem seriesItem; - Color color = series.getColor(); - gc.setBackground(ColorResources.WHITE); - gc.setAntialias(SWT.ON); - - int index = series.getPrevIndexByXvalue(plot.getVisibleStartX()); - if (index < 0) { - index = 0; - } - - int lastIndex = index; - for (int i = index; i < seriesItemSize; i++) { - seriesItem = seriesItems.get(i); - double currentX = seriesItem.getX(); - if (currentX > plot.getVisibleEndX()) { - lastIndex = i; - break; - } - lastIndex = i; - } - int heightMargin = (int) ((r.y + r.height) * LOAD_HEIGHT_MARGIN_RATIO); - int backStartX = plot.getXPixcelFromX(seriesItems.get(index).getX(), r); - int backWidth = plot.getXPixcelFromX(seriesItems.get(lastIndex).getX(), - r) - backStartX; - gc.fillRectangle(backStartX, r.y + heightMargin, backWidth, r.y - + r.height - heightMargin * 2); - gc.setBackground(color); - - for (int i = index; i < seriesItemSize; i++) { - seriesItem = seriesItems.get(i); - - double barWidthTime = seriesItem.getBarWidth(); - if (barWidthTime == -1) { - barWidthTime = series.getBarWidth(); - } - - double currentX = seriesItem.getX(); - - int pixcelStartX = plot.getXPixcelFromX(seriesItem.getX(), r); - - int barWidth = plot.getXPixcelFromX(currentX + barWidthTime, r) - - pixcelStartX; - - if (barWidth < 1) { - barWidth = EVENT_WIDTH; - } - - color = seriesItem.getEventColor(); - double load = seriesItem.getY(); - gc.setAlpha((int) load); - - if (null != color) { - gc.setBackground(color); - gc.fillRectangle(pixcelStartX, r.y + heightMargin, barWidth, - r.y + r.height - heightMargin * 2); - gc.setBackground(series.getColor()); - } else { - gc.fillRectangle(pixcelStartX, r.y + heightMargin, barWidth, - r.y + r.height - heightMargin * 2); - } - if (currentX > plot.getVisibleEndX()) { - break; - } - } - gc.setAlpha(255); - } - - private void drawArrowSeries(GC gc, DACustomChartSeries series) { - List seriesItems = series.getSeriesItemList(); - if (null == seriesItems) { - return; - } - - int seriesItemSize = seriesItems.size(); - - if (seriesItemSize < 1) { - return; - } - - DACustomChartSeriesItem seriesItem; - Color color = series.getColor(); - gc.setBackground(color); - gc.setForeground(ColorResources.WHITE); - gc.setAntialias(SWT.ON); - gc.setFont(FontResources.CHART_ARROW_TID_FONT); - - int index = series.getPrevIndexByXvalue(plot.getVisibleStartX()); - if (index < 0) { - index = 0; - } - Image arw = ImageResources.CHART_EVENT_CALLEE_ARW; - Rectangle imageRect = arw.getBounds(); - - for (int i = index; i < seriesItemSize; i++) { - seriesItem = seriesItems.get(i); - - double currentX = seriesItem.getX(); - double arrowPosition = seriesItem.getY(); - - int pixcelStartX = plot.getXPixcelFromX(seriesItem.getX(), r); - - int barHeight = (int) ((r.y + r.height) * EVENT_HEIGHT_MARGIN_RATIO); - int barPosY = r.y + r.height - barHeight*2; - - gc.fillRectangle(pixcelStartX, barPosY, EVENT_WIDTH, - barHeight); - - if (DACustomChartSeriesItem.SERIES_ARROW_NONE != arrowPosition) { - String number = String - .valueOf((int) (seriesItem.getBarWidth())); - Rectangle arrowRect = imageRect; - // arrowRect.y = (r.y + r.height) / 2 - imageRect.height / 2; - arrowRect.y = barPosY + barHeight/2 - - imageRect.height / 2; - if (DACustomChartSeriesItem.SERIES_ARROW_RIGHT == arrowPosition) { - arrowRect.x = pixcelStartX + EVENT_WIDTH; - } else { - arrowRect.x = pixcelStartX - imageRect.width; - } - gc.drawImage(arw, arrowRect.x, arrowRect.y); - Point p = gc.textExtent(number, SWT.DRAW_MNEMONIC); - gc.drawText(number, (arrowRect.x + arrowRect.width / 2) - p.x - / 2 - ARROW_MARGIN, - (arrowRect.y + arrowRect.height / 2) - p.y / 2, true); - } - - if (currentX > plot.getVisibleEndX()) { - break; - } - } - } - - private void drawStateSeries(GC gc, DACustomChartSeries series) { - List seriesItems = series.getSeriesItemList(); - if (null == seriesItems) { - return; - } - - int seriesItemSize = seriesItems.size(); - - if (seriesItemSize < 1) { - return; - } - - DACustomChartSeriesItem seriesItem; - Color color = series.getColor(); - gc.setBackground(color); - gc.setAntialias(SWT.ON); - - int index = series.getPrevIndexByXvalue(plot.getVisibleStartX()); - if (index < 0) { - index = 0; - } - int heightMargin = (int) ((r.y + r.height) * LOAD_HEIGHT_MARGIN_RATIO); - - for (int i = index; i < seriesItemSize; i++) { - seriesItem = seriesItems.get(i); - double currentX = seriesItem.getX(); - int pixcelStartX = plot.getXPixcelFromX(seriesItem.getX(), r); - color = seriesItem.getEventColor(); - int state = (int) seriesItem.getY(); - - if (null != color) { - gc.setBackground(color); - } - int barWidth = EVENT_WIDTH; - switch (state) { - case DACustomChartSeriesItem.SERIES_STATE_BAR: - gc.fillRectangle(pixcelStartX, r.y + heightMargin, barWidth, - r.y + r.height - heightMargin * 2); - break; - case DACustomChartSeriesItem.SERIES_STATE_CONTINUE: - if (i+1 == seriesItemSize) { - barWidth = plot.getXPixcelFromX(plot.getValidEndX(), r) - - pixcelStartX; - } else { - barWidth = plot.getXPixcelFromX(seriesItems.get(i+1).getX(), r) - - pixcelStartX; - if(barWidth < EVENT_WIDTH){ - barWidth = EVENT_WIDTH; - } - } - gc.fillRectangle(pixcelStartX, r.y + heightMargin, barWidth, - r.y + r.height - heightMargin * 2); - break; - case DACustomChartSeriesItem.SERIES_STATE_CONNECTION: - if(i > 0){ - int prevXPixcel = plot.getXPixcelFromX(seriesItems.get(i-1).getX()); - if(pixcelStartX - prevXPixcel < barWidth){ - pixcelStartX = prevXPixcel + EVENT_WIDTH; - } - } - if (i+1 < seriesItemSize) { - barWidth = plot.getXPixcelFromX(seriesItems.get(i+1).getX(), r) - - pixcelStartX; - } - gc.fillRectangle(pixcelStartX, r.y + heightMargin, barWidth, - r.y + r.height - heightMargin * 2); - break; - default: - break; - } - - if (null != color) { - gc.setBackground(series.getColor()); - } - if (currentX > plot.getVisibleEndX()) { - break; - } - } - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomChartSeries.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomChartSeries.java deleted file mode 100644 index 38203ba..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomChartSeries.java +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.chart; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.graphics.Color; - -public class DACustomChartSeries { - public static final int SERIES_STYLE_NONE = 0; - public static final int SERIES_STYLE_LINE = 1; - public static final int SERIES_STYLE_BAR = 2; - public static final int SERIES_STYLE_AREA = 3; - public static final int SERIES_STYLE_STACK_BAR = 4; - public static final int SERIES_STYLE_AREA_STACK = 5; - public static final int SERIES_STYLE_STEP = 6; - public static final int SERIES_STYLE_IMAGE = 7; - public static final int SERIES_STYLE_EVENT = 8; - public static final int SERIES_STYLE_MULTY_CHECK_BAR = 9; - public static final int SERIES_STYLE_LOAD = 10; - public static final int SERIES_STYLE_ARROW = 11; - public static final int SERIES_STYLE_STATE = 12; - - public static final double SERIES_DEFAULT_BAR_WIDTH = 0.5; - - private String name; - private int style = SERIES_STYLE_NONE; - private List seriesItems = new ArrayList(); - private Color seriesColor; - private double barWidth = SERIES_DEFAULT_BAR_WIDTH; - private double maxX = 0; - private double maxY = 0; - private double endX = 0; - private double endY = 0; - - public DACustomChartSeries(String name, int chartStyle) { - this.name = name; - this.style = chartStyle; - } - - public DACustomChartSeries(String name, int chartStyle, Color seriesColor) { - this(name, chartStyle); - this.seriesColor = seriesColor; - } - - public String getName() { - return name; - } - - public int getStyle() { - return style; - } - - public Color getColor() { - return seriesColor; - } - - public void setColor(Color Color) { - this.seriesColor = Color; - } - - public double getBarWidth() { - return barWidth; - } - - public void setBarWidth(long barWidth) { - this.barWidth = barWidth; - } - - public List getSeriesItemList() { - return seriesItems; - } - - public void addSeriesItem(DACustomChartSeriesItem item) { - int insert = 0; - for (int i = seriesItems.size(); i > 0; i--) { - if (seriesItems.get(i - 1).getX() <= item.getX()) { - insert = i; - break; - } - } - if (maxX < item.getX()) { - maxX = item.getX(); - } - if (maxY < item.getY()) { - maxY = item.getY(); - } - seriesItems.add(insert, item); - } - - public double getMaxX() { - return maxX; - } - - public double getMaxY() { - return maxY; - } - - public int getPrevIndexByXvalue(double x) { - int current; - int seriesItemSize = seriesItems.size(); - - if (0 >= seriesItemSize) { - return -1; - } else if (seriesItemSize <= (int) x) { - current = seriesItemSize - 1; - } else if ((int) x < 0) { - current = 0; - } else { - current = (int) x; - } - int i; - if (seriesItems.get(current).getX() == x) { - return current; - } else if (seriesItems.get(current).getX() < x) { - for (i = current; i < seriesItemSize; i++) { - if (seriesItems.get(i).getX() > x) { - break; - } - } - - return i - 1; - } else { - for (i = current; i >= 0; i--) { - if (seriesItems.get(i).getX() <= x) { - break; - } - } - return i; - } - } - - public int getNextIndexByXvalue(double x) { - int current; - int seriesItemSize = seriesItems.size(); - - if (0 >= seriesItemSize) { - return -1; - } else if (seriesItemSize <= (int) x) { - current = seriesItemSize - 1; - } else if ((int) x < 0) { - current = 0; - } else { - current = (int) x; - } - int i; - if (seriesItems.get(current).getX() == x) { - return current; - } else if (seriesItems.get(current).getX() < x) { - for (i = current; i < seriesItemSize; i++) { - if (seriesItems.get(i).getX() >= x) { - return i; - } - } - return -1; - } else { - for (i = current; i >= 0; i--) { - if (seriesItems.get(i).getX() < x) { - break; - } - } - return i + 1; - } - } - - public void clear() { - seriesItems.clear(); - maxX = 0; - maxY = 0; - } - - public double getEndX() { - return endX; - } - - public void setEndX(double endX) { - this.endX = endX; - } - - // need DACustomChartPlot's setSeriesHeightRange(true) and - // setAutoHeightRange(false) - public double getEndY() { - return endY; - } - - public void setEndY(double endY) { - this.endY = endY; - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomChartSeriesItem.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomChartSeriesItem.java deleted file mode 100644 index 3009697..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomChartSeriesItem.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.chart; - -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.Image; - -public class DACustomChartSeriesItem { - public static final int SERIES_STATE_BAR = 0; - public static final int SERIES_STATE_CONTINUE = 1; - public static final int SERIES_STATE_CONNECTION = 2; - public static final int SERIES_ARROW_NONE = 0; - public static final int SERIES_ARROW_LEFT = -1; - public static final int SERIES_ARROW_RIGHT = 1; - private double x = 0; - private double y = 0; - private double barWidth = -1; - private Color eventColor = null; - private Image image = null; - private String tooltipText; - - public DACustomChartSeriesItem(double x, double y) { - this.x = x; - this.y = y; - } - - public DACustomChartSeriesItem(double x, double y, Color eventColor) { - this.x = x; - this.y = y; - this.eventColor = eventColor; - } - - public DACustomChartSeriesItem(double x, double y, String tooltipText) { - this.x = x; - this.y = y; - this.tooltipText = tooltipText; - } - - public DACustomChartSeriesItem(double x, double y, Color eventColor, String tooltipText) { - this.x = x; - this.y = y; - this.eventColor = eventColor; - this.tooltipText = tooltipText; - } - - public DACustomChartSeriesItem(double x, Image image) { - this.x = x; - this.setImage(image); - } - - public DACustomChartSeriesItem(double x, double y, Image image) { - this.x = x; - this.y = y; - this.setImage(image); - } - - public DACustomChartSeriesItem(double x, Image image, String tooltipText) { - this.x = x; - this.setImage(image); - this.tooltipText = tooltipText; - } - - public double getX() { - return x; - } - - public void setX(double x) { - this.x = x; - } - - public double getY() { - return y; - } - - public void setY(double y) { - this.y = y; - } - - public double getBarWidth() { - return barWidth; - } - - public void setBarWidth(double barWidth) { - this.barWidth = barWidth; - } - - public Color getEventColor() { - return eventColor; - } - - public void setEventColor(Color eventColor) { - this.eventColor = eventColor; - } - - public String getTooltipText() { - return tooltipText; - } - - public void setTooltipText(String tooltipText) { - this.tooltipText = tooltipText; - } - - public Image getImage() { - return image; - } - - public void setImage(Image image) { - this.image = image; - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomChartTooltip.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomChartTooltip.java deleted file mode 100644 index c77d91e..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomChartTooltip.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Sanghyun Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.chart; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Canvas; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; - -public class DACustomChartTooltip { - private static DACustomChartTooltip instance = null; - private Shell shell = null; - Canvas contents = null; - private static final int MAX_WIDTH = 100; - private static final int MAX_HEIGHT = 100; - private DACustomChartTooltipInfo tooltipInfo = null; - - private class DACustomChartTooltipInfo { - public int height = 0; - public int width = 0; - public List tooltipTexts; - public double xVal = 0; - public DACustomChart chart; - - public DACustomChartTooltipInfo() { - tooltipTexts = new ArrayList(); - } - - public void clear() { - if (null != tooltipTexts) { - tooltipTexts.clear(); - } - - height = 0; - width = 0; - xVal = 0; - } - } - - private DACustomChartTooltip() { - } - - public static DACustomChartTooltip getInstance() { - if (null == instance) { - instance = new DACustomChartTooltip(); - } - return instance; - } - - private void init(Shell parent) { - if (null == shell) { - shell = new Shell(parent, SWT.TOOL | SWT.NO_FOCUS); - - shell.setSize(100, 10); - shell.setLayout(new FillLayout()); - - contents = new Canvas(shell, SWT.NONE); - contents.setBackground(new Color(Display.getCurrent(), 193, 193, - 193)); - - contents.addPaintListener(new PaintListener() { - - @Override - public void paintControl(PaintEvent e) { - drawTooltip(e.gc); - } - }); - } - } - - public void open(Shell parent, DACustomChartPlot plot) { - boolean bInfo = makeTooltipInfo(plot.getChart()); - if (false == bInfo) { - return; - } - - init(parent); - - Point pt = Display.getCurrent().getCursorLocation(); - - shell.setBounds(pt.x + 10, pt.y - tooltipInfo.height - 10, - tooltipInfo.width, tooltipInfo.height); - shell.open(); - } - - public void move() { - if (null == shell || null == tooltipInfo) { - return; - } - DACustomChartPlotTooltip tooltip = tooltipInfo.chart.getPlot() - .getTooltip(); - - if (tooltipInfo.xVal != tooltip.getStartVal()) { - makeTooltipInfo(tooltipInfo.chart); - } - - Point pt = Display.getCurrent().getCursorLocation(); - shell.setBounds(pt.x + 10, pt.y - tooltipInfo.height - 10, - tooltipInfo.width, tooltipInfo.height); - } - - private boolean makeTooltipInfo(DACustomChart chart) { - if (null == tooltipInfo) { - tooltipInfo = new DACustomChartTooltipInfo(); - } else { - tooltipInfo.clear(); - } - tooltipInfo.chart = chart; - - DACustomChartPlotTooltip tooltip = chart.getPlot().getTooltip(); - List seriesList = chart.getSeriesList(); - - if (null == tooltip || -1 == tooltip.getStartVal()) { - return false; - } - - tooltipInfo.height = seriesList.size() - * DACustomChartPlotTooltip.TOOLTIP_HEIGHT - + (DACustomChartPlotTooltip.TOOLTIP_MARGIN * 2); - tooltipInfo.xVal = tooltip.getStartVal(); - - GC tempGC = new GC(new Image(Display.getCurrent(), MAX_WIDTH, - MAX_HEIGHT)); - tempGC.setFont(tooltip.getFont()); - - for (int i = 0; i < seriesList.size(); i++) { - DACustomChartSeries series = seriesList.get(i); - int index = series.getPrevIndexByXvalue(tooltipInfo.xVal); - String text; - if (index >= 0) { - text = series.getName() - + " : " - + series.getSeriesItemList().get(index) - .getTooltipText(); - } else { - text = series.getName(); - } - - tooltipInfo.tooltipTexts.add(text); - - int textWidth = tempGC.textExtent(text).x; - if (tooltipInfo.width < textWidth) { - tooltipInfo.width = textWidth; - } - } - tooltipInfo.width += DACustomChartPlotTooltip.TOOLTIP_SERIES_RECT_LENGTH - + (DACustomChartPlotTooltip.TOOLTIP_MARGIN * 3); - return true; - } - - private void drawTooltip(GC gc) { - - DACustomChartPlotTooltip tooltip = tooltipInfo.chart.getPlot() - .getTooltip(); - List seriesList = tooltipInfo.chart - .getSeriesList(); - - if (null == tooltip || false == tooltip.isTooltip() - || -1 == tooltip.getStartVal()) { - return; - } - - gc.setFont(tooltip.getFont()); - for (int i = 0; i < seriesList.size(); i++) { - DACustomChartSeries series = seriesList.get(i); - int y = DACustomChartPlotTooltip.TOOLTIP_HEIGHT * i - + DACustomChartPlotTooltip.TOOLTIP_MARGIN; - gc.setBackground(series.getColor()); - gc.fillRectangle( - DACustomChartPlotTooltip.TOOLTIP_MARGIN, - y - + (DACustomChartPlotTooltip.TOOLTIP_HEIGHT / 2 - DACustomChartPlotTooltip.TOOLTIP_SERIES_RECT_LENGTH / 2), - DACustomChartPlotTooltip.TOOLTIP_SERIES_RECT_LENGTH, - DACustomChartPlotTooltip.TOOLTIP_SERIES_RECT_LENGTH); - - gc.setBackground(tooltip.getBackgroundColor()); - gc.drawText( - tooltipInfo.tooltipTexts.get(i), - DACustomChartPlotTooltip.TOOLTIP_MARGIN - + DACustomChartPlotTooltip.TOOLTIP_SERIES_RECT_LENGTH - + DACustomChartPlotTooltip.TOOLTIP_MARGIN, y - + DACustomChartPlotTooltip.TOOLTIP_MARGIN); - } - - } - - public void close() { - if (null != tooltipInfo) { - tooltipInfo.clear(); - } - if (null != shell) { - shell.dispose(); - shell = null; - } - - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomScreenshotChartPlot.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomScreenshotChartPlot.java deleted file mode 100644 index 81a9c51..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomScreenshotChartPlot.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Sanghyun Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.chart; - -public class DACustomScreenshotChartPlot extends DACustomChartPlot { - private int selectedImageIndex = -1; - private int highlightedImageIndex = -1; - - public DACustomScreenshotChartPlot(DACustomChart chart) { - super(chart); - } - - public int getSelectedImageIndex() { - return selectedImageIndex; - } - - public void setSelectedImageIndex(int index) { - selectedImageIndex = index; - } - - public int getHighlightedImageIndex() { - return highlightedImageIndex; - } - - public void setHighlightedImageIndex(int index) { - highlightedImageIndex = index; - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomUIEventChartPlot.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomUIEventChartPlot.java deleted file mode 100644 index add6ee1..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chart/DACustomUIEventChartPlot.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Sanghyun Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.chart; - -public class DACustomUIEventChartPlot extends DACustomChartPlot { - - public DACustomUIEventChartPlot(DACustomChart chart) { - super(chart); - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DAChartBoardScaleRenderer.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DAChartBoardScaleRenderer.java deleted file mode 100644 index 81d6005..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DAChartBoardScaleRenderer.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.chartBoard; - -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.widgets.Canvas; - -import org.tizen.dynamicanalyzer.widgets.helper.ColorResources; -import org.tizen.dynamicanalyzer.widgets.scale.DAScaleAttribute; -import org.tizen.dynamicanalyzer.widgets.scale.DAScaleDefaultRenderer; - -public class DAChartBoardScaleRenderer extends DAScaleDefaultRenderer { - - @Override - public void draw(GC gc, Canvas canvas, DAScaleAttribute attr) { - Rectangle rect = canvas.getClientArea(); - gc.setForeground(ColorResources.SCALE_BG_COLOR_START); - gc.setBackground(ColorResources.SCALE_BG_COLOR_END); - gc.fillGradientRectangle(rect.x, rect.y, rect.width, rect.height, true); - gc.setForeground(ColorResources.SCALE_OUTLINE_COLOR); - gc.drawRectangle(rect.x, rect.y, rect.width - 1, rect.height - 1); - - if (null != attr.getLeftImage() && null != attr.getRightImage()) { - gc.drawImage(attr.getLeftImage(), attr.getLeftRect().x, - attr.getLeftRect().y); - gc.drawImage(attr.getRightImage(), attr.getRightRect().x, - attr.getRightRect().y); - } - - gc.setBackground(ColorResources.SCALE_AREA_COLOR); - gc.fillRectangle(attr.getAreaRect()); - gc.setForeground(ColorResources.SCALE_AREA_OUTLINE_COLOR); - gc.drawRectangle(attr.getAreaRect()); - - if (null != attr.getThumbImage()) { - gc.drawImage(attr.getThumbImage(), attr.getThumbRect().x, - attr.getThumbRect().y); - } else { - gc.setBackground(ColorResources.RED); - gc.fillOval(attr.getThumbRect().x, attr.getThumbRect().y, - attr.getThumbRect().width, attr.getThumbRect().height); - } - } - -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DACustomChartBoard.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DACustomChartBoard.java deleted file mode 100644 index 5e189d7..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DACustomChartBoard.java +++ /dev/null @@ -1,487 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.chartBoard; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.ScrolledComposite; -import org.eclipse.swt.events.ControlEvent; -import org.eclipse.swt.events.ControlListener; -import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.layout.FormAttachment; -import org.eclipse.swt.layout.FormData; -import org.eclipse.swt.layout.FormLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.ScrollBar; -import org.tizen.dynamicanalyzer.widgets.button.DACustomButton; -import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener; -import org.tizen.dynamicanalyzer.widgets.button.toggle.DACustomToggleButton; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChart; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartPlot; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartPlotIntervalMarker; -import org.tizen.dynamicanalyzer.widgets.helper.ColorResources; -import org.tizen.dynamicanalyzer.widgets.helper.ImageResources; -import org.tizen.dynamicanalyzer.widgets.scale.DAScale; -import org.tizen.dynamicanalyzer.widgets.scale.DAScaleSelectionListener; -import org.tizen.dynamicanalyzer.widgets.timeline.DACustomTimeline; - -public class DACustomChartBoard extends Composite { - - // private DACustomButton titleButton; - private Composite titleComp; - private DACustomToggleButton chartZoomButton; - private DACustomTimeline timeline; // FIXME - private ScrolledComposite chartTreeScrollComp; - private Composite chartTreeComp; - private DAScale scale; - private Composite scrollComp; - private ScrollBar hScroll; - private DACustomChartBoardManager boardManager = null; - private List items = new ArrayList(); - private DACustomChartBoardItem selectItem; - private Image oldImage; - private List selectionListenrers; - private DACustomChartPlotIntervalMarker intervalMarker; - private boolean bSelection = true; - - // private final static int DEFAULT_CHART_ZOOMOUT_HEIGHT = 50; - private final static int DEFAULT_CHART_ZOOMIN_HEIGHT = 80; - private final static int DEFAULT_CHARTBOARD_HEADER_HEIGHT = 20; - private final static int DEFAULT_CHARTBOARD_TITLE_BUTTON_WIDTH = 78; - private final static int DEFAULT_CHARTBOARD_ZOOM_BUTTON_WIDTH = 21; - private final static int DEFAULT_CHARTBOARD_FOOTER_HEIGHT = 20; - private final static int DEFAULT_CHARTBOARD_SCALE_WIDTH = 99; - // private final static int DEFAULT_CHART_CELL_HEIGHT = 200; - - private int chartHeight = DEFAULT_CHART_ZOOMIN_HEIGHT; - - public DACustomChartBoard(Composite parent, String title) { - super(parent, SWT.NONE); - this.setLayout(new FormLayout()); - this.setBackground(ColorResources.WHITE); - - titleComp = new Composite(this, SWT.NONE); - titleComp.setLayout(new FillLayout()); - - chartZoomButton = new DACustomToggleButton(this, SWT.NONE); - chartZoomButton - .addClickListener(new DACustomButtonClickEventListener() { // FIXME - // test - // code - - @Override - public void handleClickEvent(DACustomButton button) { - if (items.size() > 0) { - new DACustomChartBoardItem(items.get(0), null); - } - } - }); - - timeline = new DACustomTimeline(this); - - scale = new DAScale(this, SWT.NONE); - scale.addSelectionListener(scaleSelectionListener); - scale.setMinimum(0); - scale.setMaximum(2); - scale.setLeftImage(ImageResources.SCALE_CONTROL_MINUS); - scale.setRightImage(ImageResources.SCALE_CONTROL_PLUS); - scale.setThumbImage(ImageResources.SCALE_CONTROL_THUMB); - scale.setRenderer(new DAChartBoardScaleRenderer()); - - scrollComp = new Composite(this, SWT.H_SCROLL); - scrollComp.setLayout(new FillLayout()); - hScroll = scrollComp.getHorizontalBar(); - hScroll.setMinimum(0); - hScroll.setMaximum(0); - hScroll.setSelection(0); - hScroll.setVisible(true); - hScroll.addSelectionListener(scrollbarSelectionListener); - scrollComp.addControlListener(new ControlListener() { - - @Override - public void controlResized(ControlEvent e) { - if (null != boardManager) { - boardManager.timelineWidthChanged(((Composite) (e.widget)) - .getClientArea().width); - } - } - - @Override - public void controlMoved(ControlEvent e) { - } - }); - - chartTreeScrollComp = new ScrolledComposite(this, SWT.V_SCROLL); - chartTreeScrollComp.setBackground(ColorResources.CHART_BOARD_BACK); - chartTreeScrollComp.addControlListener(new ControlListener() { - - @Override - public void controlResized(ControlEvent e) { - int clientWidth = chartTreeScrollComp.getClientArea().width; - Rectangle rtScroll = chartTreeScrollComp.getBounds(); - - if (null != chartTreeComp) { - chartTreeComp.setSize(rtScroll.width, - chartTreeComp.getBounds().height); - int itemSize = items.size(); - - for (int i = 0; i < itemSize; i++) { - DACustomChartBoardItem item = items.get(i); - int height = item.getSize().y; - items.get(i).setSize(clientWidth, height); - } - } - if (null != timeline) { - timeline.setSize(clientWidth - - DEFAULT_CHARTBOARD_SCALE_WIDTH, - timeline.getBounds().height); - } - if (null != scrollComp) { - scrollComp.setSize(clientWidth - - DEFAULT_CHARTBOARD_SCALE_WIDTH, - scrollComp.getBounds().height); - } - setChartAxis(); - } - - @Override - public void controlMoved(ControlEvent e) { - } - }); - chartTreeScrollComp.addPaintListener(new PaintListener() { - - @Override - public void paintControl(PaintEvent e) { - // TODO Auto-generated method stub - Rectangle rt = getClientArea(); - - e.gc.setBackground(ColorResources.WHITE); - e.gc.setForeground(ColorResources.CHART_BOARD_ITEM_LINE); - e.gc.fillRectangle(rt); - - int nItemSize = rt.height / chartHeight + 1; - for (int i = 0; i < nItemSize; i++) { - e.gc.drawRectangle(rt.x, i * chartHeight, - DACustomChartBoardItem.DEFAULT_NAME_CELL_WIDTH, - chartHeight); - e.gc.drawRectangle( - DACustomChartBoardItem.DEFAULT_NAME_CELL_WIDTH, - i * chartHeight, - rt.width - - DACustomChartBoardItem.DEFAULT_NAME_CELL_WIDTH, - chartHeight); - } - } - }); - - chartTreeComp = new Composite(chartTreeScrollComp, SWT.NONE); - chartTreeScrollComp.setContent(chartTreeComp); - chartTreeComp.setBackground(ColorResources.WHITE); - - // layout - FormData data = new FormData(); - data.left = new FormAttachment(0, 0); - data.top = new FormAttachment(0, 0); - data.width = DEFAULT_CHARTBOARD_TITLE_BUTTON_WIDTH - + DEFAULT_CHARTBOARD_ZOOM_BUTTON_WIDTH; - data.height = DEFAULT_CHARTBOARD_HEADER_HEIGHT; - titleComp.setLayoutData(data); - // titleButton.setLayoutData(data); - - data = new FormData(); - data.left = new FormAttachment(titleComp, 0); - data.top = new FormAttachment(0, 0); - data.width = 0; - data.height = DEFAULT_CHARTBOARD_HEADER_HEIGHT; - chartZoomButton.setLayoutData(data); - - data = new FormData(); - data.left = new FormAttachment(chartZoomButton, 0); - data.top = new FormAttachment(0, 0); - // data.right = new FormAttachment(100, 0); - data.height = DEFAULT_CHARTBOARD_HEADER_HEIGHT; - timeline.setLayoutData(data); - - data = new FormData(); - data.left = new FormAttachment(0, 0); - data.top = new FormAttachment(titleComp, 0); - data.bottom = new FormAttachment(100, -20); - data.right = new FormAttachment(100, 0); - chartTreeScrollComp.setLayoutData(data); - - data = new FormData(); - data.left = new FormAttachment(0, 0); - data.top = new FormAttachment(chartTreeScrollComp, 0); - data.bottom = new FormAttachment(100, 0); - data.width = DEFAULT_CHARTBOARD_SCALE_WIDTH; - data.height = DEFAULT_CHARTBOARD_FOOTER_HEIGHT; - scale.setLayoutData(data); - - data = new FormData(); - data.left = new FormAttachment(scale, 0); - // data.right = new FormAttachment(100, 0); - data.top = new FormAttachment(chartTreeScrollComp, 0); - data.bottom = new FormAttachment(100, 0); - data.height = DEFAULT_CHARTBOARD_FOOTER_HEIGHT; - scrollComp.setLayoutData(data); - - boardManager = new DACustomChartBoardManager(this); - // boardManager.setTotalEndTime(200); - // hScroll.setMaximum(200000); - } - - private DAScaleSelectionListener scaleSelectionListener = new DAScaleSelectionListener() { - - @Override - public void widgetSelected() { - // updateTree(); - int sel = scale.getSelection(); - - if (sel == 0 - && boardManager.getScaleVal() != DACustomChartBoardManager.SCALE_100) { - boardManager.scaleChanged(DACustomChartBoardManager.SCALE_100); - } else if (sel == 1 - && boardManager.getScaleVal() != DACustomChartBoardManager.SCALE_400) { - boardManager.scaleChanged(DACustomChartBoardManager.SCALE_400); - } else if (sel == 2 - && boardManager.getScaleVal() != DACustomChartBoardManager.SCALE_800) { - boardManager.scaleChanged(DACustomChartBoardManager.SCALE_800); - } else { - return; - } - } - }; - - private SelectionListener scrollbarSelectionListener = new SelectionListener() { - - @Override - public void widgetSelected(SelectionEvent e) { - int sel = hScroll.getSelection(); - boardManager.scrollbarSelectionChanged(sel); - } - - @Override - public void widgetDefaultSelected(SelectionEvent e) { - } - }; - - private void setChartAxis() { - int itemSize = items.size(); - for (int i = 0; i < itemSize; i++) { - items.get(i).setChartAxis(getVisibleStartTime(), - getVisibleEndTime()); - } - } - - protected void notifyScaleChanged(int scaleVal, double thumb, - double visibleStartTime) { - timeline.setScale(scaleVal); - timeline.setStartTime(visibleStartTime); - timeline.redraw(); - hScroll.setThumb((int) (thumb * 1000)); - hScroll.setSelection((int) (visibleStartTime * 1000)); - setChartAxis(); - } - - protected void notifyScrollChanged(double visibleStratTime) { - timeline.setStartTime(visibleStratTime); - timeline.redraw(); - setChartAxis(); - } - - public int getChartWidth() { - Rectangle rt; - if (null == (rt = scrollComp.getClientArea())) { - return 0; - } else { - return rt.width; - } - } - - protected void setScrollThumb(int thumb) { - hScroll.setThumb(thumb); - } - - protected void setScrollMaximum(int maximum) { - hScroll.setMaximum(maximum); - } - - protected void setScrollSelection(int selection) { - hScroll.setSelection(selection); - } - - protected void registeItem(DACustomChartBoardItem item) { - items.add(item); - Rectangle rt = chartTreeComp.getClientArea(); - chartTreeComp.setSize(rt.width, rt.height + chartHeight); - int width = chartTreeScrollComp.getClientArea().width; - item.setBounds(rt.x, rt.height, width, chartHeight); - } - - private int findItemIndex(DACustomChartBoardItem item) { - for (int i = 0; i < items.size(); i++) { - if (item.equals(items.get(i))) { - return i; - } - } - return -1; - } - - protected Composite getChartComposite() { - return chartTreeComp; - } - - protected void notifyResizeChild(DACustomChartBoardItem item) { - if (null == items) { - return; - } - DACustomChartBoardItem child; - Point p; - Rectangle rect = item.getBounds(); - for (int i = findItemIndex(item) + 1; i < items.size(); i++) { - child = items.get(i); - p = child.getSize(); - child.setBounds(rect.x, rect.y + rect.height, rect.width, p.y); - rect.height += p.y; - } - Rectangle treeRect = chartTreeComp.getBounds(); - chartTreeComp.setBounds(treeRect.x, treeRect.y, treeRect.width, rect.y - + rect.height); - } - - public void setTotalEndTime(long time) { - double endTime = (double) time / 1000000; - - boardManager.totalEndTimeChanged(endTime); - } - - public void clear() { - for (int i = 0; i < items.size(); i++) { - items.get(i).dispose(); - } - items.clear(); - Rectangle rt = chartTreeComp.getBounds(); - chartTreeComp.setBounds(rt.x, rt.y, rt.width, 0); - setTotalEndTime(0); - timeline.setStartTime(0); - if (null != oldImage) { - oldImage = null; - } - if (null != selectItem) { - selectItem = null; - } - intervalMarker = null; - } - - public double getVisibleStartTime() { - return boardManager.getVisibleStartTime(); - } - - public double getVisibleEndTime() { - return boardManager.getVisibleEndTime(); - } - - private void setChartBackgroundImage(DACustomChart chart, Image image) { - if (null == chart) { - return; - } - - DACustomChartPlot plot = chart.getPlot(); - if (null == plot) { - return; - } - plot.setBackgroundImage(image); - chart.redraw(); - } - - protected void NotifyCallbackSelection(DACustomChartBoardItem item) { - if (false == isSelection()) { - return; - } - if (selectItem == item) { - return; - } else { - if (null != oldImage && null != selectItem) { - setChartBackgroundImage(selectItem.getChart(), oldImage); - selectItem.selectItem(false); - } - - selectItem = item; - oldImage = selectItem.getChart().getPlot().getBackgroundImage(); - setChartBackgroundImage(selectItem.getChart(), - ImageResources.CHART_BG_SELECT); - selectItem.selectItem(true); - - if (null != selectionListenrers) { - for (int i = 0; i < selectionListenrers.size(); i++) { - selectionListenrers.get(i).handleSelectionEvent(selectItem); - } - } - } - } - - public void addSelectionListener( - DACustomChartBoardSelectionListener listener) { - if (null == selectionListenrers) { - selectionListenrers = new ArrayList(); - } - selectionListenrers.add(listener); - } - - public Composite getTitleComp() { - return titleComp; - } - - private void initIntervalMarker() { - intervalMarker = new DACustomChartPlotIntervalMarker(-1, -1); - intervalMarker.setBackgroundColor(ColorResources.CHART_SELECTION_RANGE); - intervalMarker.setAlpha((int) (255 * 0.25)); - } - - public DACustomChartPlotIntervalMarker getIntervalMarker() { - if (null == intervalMarker) { - initIntervalMarker(); - } - return intervalMarker; - } - - public boolean isSelection() { - return bSelection; - } - - public void setSelection(boolean bSelection) { - this.bSelection = bSelection; - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DACustomChartBoardItem.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DACustomChartBoardItem.java deleted file mode 100644 index 924ca40..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DACustomChartBoardItem.java +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.chartBoard; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ControlEvent; -import org.eclipse.swt.events.ControlListener; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChart; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartPlot; - -public class DACustomChartBoardItem extends Composite { - private DACustomChartBoard parentBoard = null; - private DACustomChartBoardItem parentItem = null; - private List children = null; - private DACustomChartBoardItemCell itemCell; - private Composite childComposite; - private String itemName; - - private boolean isFold = true; - // private boolean isExpand = false; - public final static int DEFAULT_ITEM_HEIGHT = 80; // FIXME get from - public final static int DEFAULT_NAME_CELL_WIDTH = 99; - private int depth = 0; - - private void initWidget() { - itemCell = new DACustomChartBoardItemCell(this); - Rectangle rt = this.getClientArea(); - itemCell.setBounds(rt); - this.addControlListener(new ControlListener() { - - @Override - public void controlResized(ControlEvent e) { - int width = ((DACustomChartBoardItem) (e.widget)).getSize().x; - itemCell.setSize(width, itemCell.getSize().y); - } - - @Override - public void controlMoved(ControlEvent e) { - // TODO Auto-generated method stub - - } - }); - } - - public DACustomChartBoardItem(DACustomChartBoard parent, String itemName) { - super(parent.getChartComposite(), SWT.NONE); - parentBoard = parent; - setItemName(itemName); - parentBoard.registeItem(this); - initWidget(); - } - - public DACustomChartBoardItem(DACustomChartBoardItem parent, String itemName) { - super(parent.getChildChartComposite(), SWT.NONE); - parentItem = parent; - setItemName(itemName); - depth = parent.getDepth() + 1; - parentItem.registeItem(this); - initWidget(); - } - - private int findItemIndex(DACustomChartBoardItem item) { - for (int i = 0; i < children.size(); i++) { - if (item.equals(children.get(i))) { - return i; - } - } - return -1; - } - - protected int getDepth() { - return depth; - } - - private void callNotifyResizeChild() { - if (null != parentBoard) { - parentBoard.notifyResizeChild(this); - } else if (null != parentItem) { - parentItem.notifyResizeChild(this); - } else { - return; - } - } - - private void reArrangeChildByItem(DACustomChartBoardItem item) { - if (null == children) { - return; - } - - DACustomChartBoardItem child; - Point p; - Rectangle rect = item.getBounds(); - for (int i = findItemIndex(item) + 1; i < children.size(); i++) { - child = children.get(i); - p = child.getSize(); - child.setBounds(rect.x, rect.y + rect.height, rect.width, p.y); - rect.height += p.y; - } - if (null == childComposite) { - return; - } - Rectangle childRect = childComposite.getBounds(); - childComposite.setBounds(childRect.x, childRect.y, childRect.width, - rect.y + rect.height); - } - - private void notifyResizeChild(DACustomChartBoardItem item) { - reArrangeChildByItem(item); - - if (false == isFold) { - reArrangeItemSize(); - callNotifyResizeChild(); - } - } - - private void reArrangeItemSize() { - Rectangle itemRect = getBounds(); - Rectangle itemCellRect = itemCell.getBounds(); - Rectangle childCompositeRect; - if (false == isFold) { - childCompositeRect = childComposite.getBounds(); - itemRect.height = itemCellRect.height + childCompositeRect.height; - } else { - itemRect.height = itemCellRect.height; - } - setBounds(itemRect); - } - - protected void registeItem(DACustomChartBoardItem child) { - if (null == children) { - children = new ArrayList(); - itemCell.addExpandToggleButton(); - Rectangle r = getClientArea(); - childComposite.setBounds(r.x, r.height, r.width, 0); - } - children.add(child); - if (null == childComposite) { - return; - } - - Rectangle rt = childComposite.getBounds(); - childComposite.setBounds(rt.x, rt.y, rt.width, rt.height - + DEFAULT_ITEM_HEIGHT); - child.setBounds(rt.x, rt.height, rt.width, DEFAULT_ITEM_HEIGHT); - - if (false == isFold) { - reArrangeItemSize(); - callNotifyResizeChild(); - } - } - - protected void callbackFold() { - isFold = true; - reArrangeItemSize(); - callNotifyResizeChild(); - } - - protected void callbackUnFold() { - isFold = false; - reArrangeItemSize(); - callNotifyResizeChild(); - } - - protected void NotifyCallbackSelection(DACustomChartBoardItem item) { - if (null != parentBoard) { - parentBoard.NotifyCallbackSelection(item); - } else if (null != parentItem) { - parentItem.NotifyCallbackSelection(item); - } else { - return; - } - } - - protected void callbackSelect() { - NotifyCallbackSelection(this); - } - - protected Composite getChildChartComposite() { - if (null == childComposite) { - childComposite = new Composite(this, SWT.NONE); - } - return childComposite; - } - - public Composite getChartComposite() { - if (null == itemCell) { - return null; - } else { - return itemCell.getChartCell(); - } - } - - public String getItemName() { - return itemName; - } - - public void setItemName(String itemName) { - this.itemName = itemName; - } - - public DACustomChart getChart() { - if (null == itemCell) { - return null; - } - return itemCell.getChartCell(); - } - - protected void setChartAxis(double startX, double endX) { - DACustomChart chart = getChart(); - if (null == chart) { - return; - } - - DACustomChartPlot plot = chart.getPlot(); - - if (null == plot) { - return; - } - plot.setAxisRangeX(startX, endX); - chart.redraw(); - if (null == children) { - return; - } - int childrenSize = children.size(); - for (int i = 0; i < childrenSize; i++) { - children.get(i).setChartAxis(startX, endX); - } - } - - protected void selectItem(boolean select) { - itemCell.setSelectCell(select); - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DACustomChartBoardItemCell.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DACustomChartBoardItemCell.java deleted file mode 100644 index 6e01498..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DACustomChartBoardItemCell.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.chartBoard; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ControlEvent; -import org.eclipse.swt.events.ControlListener; -import org.eclipse.swt.events.MouseEvent; -import org.eclipse.swt.events.MouseListener; -import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.widgets.Canvas; -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.widgets.button.DACustomButton; -import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener; -import org.tizen.dynamicanalyzer.widgets.button.toggle.DACustomToggleButton; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChart; -import org.tizen.dynamicanalyzer.widgets.helper.ColorResources; -import org.tizen.dynamicanalyzer.widgets.helper.FontResources; -import org.tizen.dynamicanalyzer.widgets.helper.ImageResources; - -class DACustomChartBoardItemCell extends Composite { - private DACustomChartBoardItem parent; - private Canvas nameCell; - private DACustomChart chartCell; - private DACustomToggleButton childExpandButton; - private final static int DEFAULT_TOGGLE_BUTTON_SIZE = 10; - private final static int DEFAULT_TOGGLE_BUTTON_MARGIN = 5; - private int nameCellWidth = DACustomChartBoardItem.DEFAULT_NAME_CELL_WIDTH; - private boolean selectCell = false; - - public DACustomChartBoardItemCell(final DACustomChartBoardItem parent) { - super(parent, SWT.NONE); - this.parent = parent; - this.setBackground(ColorResources.CHART_BOARD_ITEM_LINE); - this.addControlListener(new ControlListener() { - - @Override - public void controlResized(ControlEvent e) { - Rectangle rt = getBounds(); - - if (null != nameCell) { - nameCell.setBounds(rt.x, rt.y + 1, nameCellWidth, - rt.height - 1); - } - if (null != chartCell) { - chartCell.setBounds(rt.x + nameCellWidth, rt.y + 1, - rt.width - nameCellWidth, rt.height - 1); - } - } - - @Override - public void controlMoved(ControlEvent e) { - } - }); - - nameCell = new Canvas(this, SWT.NONE); - if (parent.getDepth() == 0) { - nameCell.setBackgroundImage(ImageResources.CHART_NAME_BG_NORMAL); - } else { - nameCell.setBackgroundImage(ImageResources.CHART_NAME_CHILD_BG_NORMAL); - } - - nameCell.addPaintListener(new PaintListener() { - - @Override - public void paintControl(PaintEvent e) { - Rectangle rect = ((Canvas) (e.widget)).getClientArea(); - - e.gc.setForeground(ColorResources.BLACK); - e.gc.setFont(FontResources.CHART_ITEM_NAME_FONT); - drawNameString(e.gc, parent.getItemName(), rect.width / 2, - rect.height / 2); - } - }); - nameCell.addMouseListener(new MouseListener() { - - @Override - public void mouseUp(MouseEvent e) { - // TODO Auto-generated method stub - - } - - @Override - public void mouseDown(MouseEvent e) { - parent.callbackSelect(); - } - - @Override - public void mouseDoubleClick(MouseEvent e) { - if (null == childExpandButton) { - return; - } - boolean isToggle = childExpandButton.isToggled(); - childExpandButton.setToggled(!isToggle); - if (true == isToggle) { - parent.callbackFold(); - } else { - parent.callbackUnFold(); - } - } - }); - - chartCell = new DACustomChart(this, parent.getItemName()); - chartCell.addMouseListener(new MouseListener() { - - @Override - public void mouseUp(MouseEvent e) { - } - - @Override - public void mouseDown(MouseEvent e) { - parent.callbackSelect(); - } - - @Override - public void mouseDoubleClick(MouseEvent e) { - } - }); - } - - public void addExpandToggleButton() { - if (null != childExpandButton) { - return; - } - childExpandButton = new DACustomToggleButton(nameCell, - ImageResources.TREE_FOLD, ImageResources.TREE_FOLD, - ImageResources.TREE_FOLD, null, ImageResources.TREE_OPEN, - ImageResources.TREE_OPEN); - Rectangle rt = nameCell.getClientArea(); - childExpandButton.setBounds(rt.x + DEFAULT_TOGGLE_BUTTON_SIZE - - DEFAULT_TOGGLE_BUTTON_MARGIN, rt.height / 2 - - DEFAULT_TOGGLE_BUTTON_SIZE / 2, DEFAULT_TOGGLE_BUTTON_SIZE, - DEFAULT_TOGGLE_BUTTON_SIZE); - childExpandButton - .addClickListener(new DACustomButtonClickEventListener() { - - @Override - public void handleClickEvent(DACustomButton button) { - if (true == childExpandButton.isToggled()) { - parent.callbackSelect(); - parent.callbackUnFold(); - nameCell.redraw(); - } else { - parent.callbackSelect(); - parent.callbackFold(); - nameCell.redraw(); - } - } - }); - } - - public DACustomChart getChartCell() { - return chartCell; - } - - private void drawNameString(GC gc, String name, int pixcelX, int pixcelY) { - if (null == name) { - return; - } - Point allp = gc.textExtent(name, SWT.DRAW_DELIMITER); - - String[] temp = name.split("\n"); - int lineLength = temp.length; - Point[] p = new Point[lineLength]; - - int startY = pixcelY - allp.y / 2; - - for (int i = 0; i < lineLength; i++) { - p[i] = gc.textExtent(temp[i]); - gc.drawText(temp[i], pixcelX - p[i].x / 2, startY, true); - startY += p[i].y; - } - } - - public boolean isSelectCell() { - return selectCell; - } - - public void setSelectCell(boolean selectCell) { - this.selectCell = selectCell; - if (true == selectCell) { - if (parent.getDepth() == 0) { - nameCell.setBackgroundImage(ImageResources.CHART_NAME_BG_SELECT); - } else { - nameCell.setBackgroundImage(ImageResources.CHART_NAME_CHILD_BG_SELECT); - } - } else { - if (parent.getDepth() == 0) { - nameCell.setBackgroundImage(ImageResources.CHART_NAME_BG_NORMAL); - } else { - nameCell.setBackgroundImage(ImageResources.CHART_NAME_CHILD_BG_NORMAL); - } - } - nameCell.redraw(); - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DACustomChartBoardManager.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DACustomChartBoardManager.java deleted file mode 100644 index 7208130..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DACustomChartBoardManager.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.chartBoard; - -import org.tizen.dynamicanalyzer.widgets.timeline.DACustomTimelineRenderer; - -class DACustomChartBoardManager { - public final static int SCALE_100 = 1; - public final static int SCALE_400 = 4; - public final static int SCALE_800 = 8; - - private int chartWidth = 0; - private double totalStartTime = 0; - private double totalEndTime = 0; - private double visibleStartTime = 0; - private int scaleVal = SCALE_100; - private double thumb = 1; - - private DACustomChartBoard board = null; - - public DACustomChartBoardManager(DACustomChartBoard board) { - this.board = board; - } - - public double getTotalStartTime() { - return totalStartTime; - } - - public void setTotalStartTime(double totalStartTime) { - this.totalStartTime = totalStartTime; - } - - public double getTotalEndTime() { - return totalEndTime; - } - - public void setTotalEndTime(double totalEndTime) { - this.totalEndTime = totalEndTime; - } - - public double getVisibleStartTime() { - return visibleStartTime; - } - - public void setVisibleStartTime(double visibleStartTime) { - this.visibleStartTime = visibleStartTime; - } - - public double getVisibleEndTime() { - return visibleStartTime + thumb; - } - - public int getScaleVal() { - return scaleVal; - } - - public void scaleChanged(int scaleVal) { - this.scaleVal = scaleVal; - - double newThumb = computeThumb(chartWidth, scaleVal); - - visibleStartTime = computeVisibleStartTime(thumb, newThumb, - totalEndTime); - thumb = newThumb; - - board.notifyScaleChanged(scaleVal, thumb, visibleStartTime); - } - - public void scrollbarSelectionChanged(int sel) { - visibleStartTime = (double) sel / 1000.0; - board.notifyScrollChanged(visibleStartTime); - } - - public void totalEndTimeChanged(double totalEndTime) { - - board.setScrollMaximum((int) (totalEndTime * 1000)); - board.setScrollThumb((int) (thumb * 1000)); - - if ((int) (visibleStartTime * 1000) + (int) (thumb * 1000) == (int) (this.totalEndTime * 1000)) { - visibleStartTime = totalEndTime - thumb; - board.setScrollSelection((int) (visibleStartTime * 1000)); - board.notifyScrollChanged(visibleStartTime); - } - this.totalEndTime = totalEndTime; - } - - private double computeThumb(int width, int scale) { - if (width == 0) { - return 0; - } - double ret = (double) chartWidth - / (double) ((DACustomTimelineRenderer.DEFAULT_INTERVAL * scale)); - - return ret; - } - - private double computeVisibleStartTime(double oldThumb, double newThumb, - double totalEndTime) { - double ret = 0; - - if (0 == visibleStartTime) { - return ret; - } else if (visibleStartTime + oldThumb == totalEndTime) { - ret = totalEndTime - newThumb; - } else { - ret = (visibleStartTime + (oldThumb / 2)) - (newThumb / 2); - if (ret + newThumb > totalEndTime) { - ret = totalEndTime - newThumb; - } - } - if (ret < 0) { - ret = 0; - } - return ret; - } - - public void timelineWidthChanged(int width) { - chartWidth = width; - thumb = computeThumb(chartWidth, scaleVal); - board.setScrollThumb((int) (thumb * 1000)); - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DACustomChartBoardSelectionListener.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DACustomChartBoardSelectionListener.java deleted file mode 100644 index ca9e8e1..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/chartBoard/DACustomChartBoardSelectionListener.java +++ /dev/null @@ -1,6 +0,0 @@ -package org.tizen.dynamicanalyzer.widgets.chartBoard; - - -public abstract class DACustomChartBoardSelectionListener{ - public abstract void handleSelectionEvent(DACustomChartBoardItem item); -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/combo/DACustomCombo.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/combo/DACustomCombo.java deleted file mode 100644 index 3bcf004..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/combo/DACustomCombo.java +++ /dev/null @@ -1,759 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.combo; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.MouseEvent; -import org.eclipse.swt.events.MouseListener; -import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FormAttachment; -import org.eclipse.swt.layout.FormData; -import org.eclipse.swt.layout.FormLayout; -import org.eclipse.swt.widgets.Canvas; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Shell; -import org.tizen.dynamicanalyzer.widgets.DAWidgetConstants; -import org.tizen.dynamicanalyzer.widgets.button.DACustomButton; -import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonDefaultRenderer; -import org.tizen.dynamicanalyzer.widgets.helper.ColorResources; - -public class DACustomCombo extends Canvas { - public static final int MAX_SIZE = 10; - public static final int STATE_NORMAL = 0; - public static final int STATE_HOVER = 1; - public static final int STATE_PUSH = 2; - public static final int STATE_DISABLE = 3; - - private static final int pageSize = 5; - - Composite parent; - private Canvas combo = null; - private Canvas popup = null; - private int itemHeight = 0; - private DACustomButton upArrowButton = null; - private DACustomButton downArrowButton = null; - private int itemIndex = 0; - private boolean dirty = false; - - private List items; - private List rects = null; - - private List images = null; - private Image buttonUp = null; - private Image buttonDown = null; - private boolean enabled = true; - private Shell childShell = null; - private int selection = 0; - private String text = ""; //$NON-NLS-1$ - private boolean imgCombo = false; - private int state = STATE_NORMAL; // 0 normal 1 hover 2 push 3 disable - private DACustomComboRenderer comboRenderer = new DACustomComboDefaultRenderer();; - private DACustomComboPopupRenderer popupRenderer = new DACustomComboPopupDefaultRenderer(); - private DACustomButtonDefaultRenderer buttonRenderer = null; - - private List arrowColors = null; - private List arrowImages = null; - - public DACustomCombo(Composite parent, int style) { - super(parent, style); - combo = this; - - this.parent = parent; - addPaintListener(comboPaintListener); - setForeground(ColorResources.WHITE); - addListeners(); - initCombo(); - } - - public void addListeners() { - addListener(SWT.MouseEnter, comboMouseListener); - addListener(SWT.MouseHover, comboMouseListener); - addListener(SWT.MouseExit, comboMouseListener); - addListener(SWT.MouseDown, comboMouseListener); - addListener(SWT.MouseMove, comboMouseListener); - addListener(SWT.MouseUp, comboMouseListener); - } - - public String getText() { - if (getItems().size() > 0) { - return getItems().get(itemIndex + selection); - } - return null; - } - - public List getItems() { - if (null == items) { - items = new ArrayList(); - } - return items; - } - - private List getRects() { - if (null == rects) { - rects = new ArrayList(); - } - return rects; - } - - private void changeComboState(int s) { - state = s; - redraw(); - } - - private Listener popupSelectionListener = new DACustomComboSelectionListener() { - - @Override - public void selectionEvent(DACustomCombo combo) { - System.out.println("default selection" + combo.getText()); - } - }; - - public void addSelectionListener(DACustomComboSelectionListener listener) { - popupSelectionListener = listener; - } - - private Listener comboMouseListener = new Listener() { - @Override - public void handleEvent(Event event) { - if (enabled) { - if (event.type == SWT.MouseEnter) { - changeComboState(STATE_HOVER); - } - - if (event.type == SWT.MouseHover) { - if (!isOutOfBounds(event.x, event.y)) { - if (0 != (event.stateMask & SWT.BUTTON1)) { - changeComboState(STATE_PUSH); - } else if (0 == (event.stateMask & SWT.BUTTON1)) { - changeComboState(STATE_HOVER); - } - } - } - - if (event.type == SWT.MouseDown) { - changeComboState(STATE_PUSH); - } - - if (event.type == SWT.MouseUp) { - changeComboState(STATE_HOVER); - if (childShell == null || childShell.isDisposed()) { - openChildShell(); - } else { - childShell.close(); - childShell = null; - } - } - - if (event.type == SWT.MouseMove) { - if (isOutOfBounds(event.x, event.y)) { - changeComboState(STATE_NORMAL); - } else if (isOutOfBounds(event.x, event.y)) { - if (0 != (event.stateMask & SWT.BUTTON1)) { - changeComboState(STATE_PUSH); - } else if (0 == (event.stateMask & SWT.BUTTON1)) { - changeComboState(STATE_HOVER); - } - } - } - - if (event.type == SWT.MouseExit) { - changeComboState(STATE_NORMAL); - } - } - } - }; - - protected boolean isOutOfBounds(int x, int y) { - Rectangle rectangle = combo.getBounds(); - - if (x < 0 || x > rectangle.width || y < 0 || y > rectangle.height) { - return true; - } - - return false; - } - - private int getShellWidth() { - if (getItems().isEmpty()) { - return 0; - } - int max = 0; - int size = items.size(); - GC gc = new GC(parent.getDisplay(), SWT.NONE); - for (int i = 0; i < size; i++) { - try { - Point p = gc.textExtent(items.get(i), SWT.DRAW_MNEMONIC); - if (p.x > max) { - max = p.x; - } - } catch (Exception e) { - System.out.println(); - } - - } - max += 10; - gc.dispose(); - return max; - } - - public int getItemHeight() { - return itemHeight; - } - - public void setItemHeight(int height) { - itemHeight = height; - } - - private void openChildShell() { - childShell = new Shell(parent.getShell(), SWT.ON_TOP); - childShell.setLayout(new FormLayout()); - - Point p = combo.toDisplay(0, 0); - Rectangle rect = combo.getBounds(); - int size = getItems().size(); - - int boundSize = (size > MAX_SIZE) ? MAX_SIZE : (size > 0) ? size : 1; - - int textSize = getShellWidth() + 4; - int shellWidth = (textSize > rect.width) ? textSize : rect.width; - int height = 0; - - if (getItemHeight() == 0) { - height = rect.height; - } else { - height = getItemHeight(); - } - int shellHeight = height * boundSize + 5; - - childShell.setSize(shellWidth, shellHeight); - childShell.setLocation(p.x, p.y + rect.height); - // childShell.setBackground(ColorResources.BLUE); - setSelect(text); - - popup = new Canvas(childShell, SWT.DOUBLE_BUFFERED); - popup.setData(this); - popup.setBackground(ColorResources.WHITE); - popup.addPaintListener(popupPaintListener); - popup.addListener(SWT.MouseUp, popupMouseEventListener); - popup.addListener(SWT.MouseMove, popupMouseEventListener); - popup.addListener(SWT.FocusOut, popupMouseEventListener); - popup.addListener(SWT.MouseUp, popupSelectionListener); - popup.addListener(SWT.MouseWheel, popupMouseEventListener); - - if (size > MAX_SIZE) { - upArrowButton = makeButton(); - if (buttonUp == null) { - upArrowButton.setText("UP"); - } else { - upArrowButton.setButtonImage(buttonUp); - } - FormData data = new FormData(); - data.top = new FormAttachment(0, 0); - data.left = new FormAttachment(0, 0); - data.right = new FormAttachment(100, 0); - data.height = height; - upArrowButton.setLayoutData(data); - upArrowButton.addMouseListener(upArrowListener); - upArrowButton.addListener(SWT.MouseExit, upButtonMouseExitListener); - shellHeight += height; - if (itemIndex > 0) { - upArrowButton.setEnabled(true); - } else { - upArrowButton.setEnabled(false); - } - - data = new FormData(); - data.top = new FormAttachment(upArrowButton, 0); - data.left = new FormAttachment(0, 0); - data.right = new FormAttachment(100, 0); - data.height = height * boundSize + 5 - 2; - popup.setLayoutData(data); - - // downArrowButton = new DACustomButton(childShell, SWT.NONE); - downArrowButton = makeButton(); - // downArrowButton.setText("down"); //$NON-NLS-1$ - if (null == buttonDown) { - downArrowButton.setText("DOWN"); - } else { - downArrowButton.setButtonImage(buttonDown); - } - data = new FormData(); - data.top = new FormAttachment(popup, 0); - data.left = new FormAttachment(0, 0); - data.right = new FormAttachment(100, 0); - data.height = height; - downArrowButton.setLayoutData(data); - downArrowButton.addMouseListener(downArrowListener); - downArrowButton.addListener(SWT.MouseExit, - downButtonMouseExitListener); - shellHeight += height; - if (itemIndex + MAX_SIZE < size - 1) { - downArrowButton.setEnabled(true); - } else { - downArrowButton.setEnabled(false); - } - - childShell.setSize(shellWidth, shellHeight); - } else { - FormData data = new FormData(); - data.top = new FormAttachment(0, 0); - data.left = new FormAttachment(0, 0); - data.right = new FormAttachment(100, 0); - data.height = shellHeight - 2; - popup.setLayoutData(data); - } - - size = (size > MAX_SIZE) ? MAX_SIZE : size; - getRects().clear(); - for (int i = 0; i < size; i++) { - Rectangle r = new Rectangle(2, 2 + i * height, shellWidth - 2, - height); - getRects().add(r); - } - childShell.open(); - } - - private MouseListener upArrowListener = new MouseListener() { - - @Override - public void mouseUp(MouseEvent event) { - if (!upArrowButton.isEnabled()) { - return; - } - - if (null != upArrowButton) { - Rectangle rectangle = upArrowButton.getBounds(); - int x = event.x; - int y = event.y; - - if (x < 0 || x > rectangle.width || y < 0 - || y > rectangle.height) { - return; - } - } - - int size = getItems().size(); - if (itemIndex - pageSize < 0) { - itemIndex = 0; - upArrowButton.setEnabled(false); - } else { - itemIndex -= pageSize; - } - - if (itemIndex + pageSize < size - 1) { - downArrowButton.setEnabled(true); - } - popup.redraw(); - } - - @Override - public void mouseDown(MouseEvent arg0) { - // TODO Auto-generated method stub - - } - - @Override - public void mouseDoubleClick(MouseEvent arg0) { - // TODO Auto-generated method stub - - } - }; - - private MouseListener downArrowListener = new MouseListener() { - - @Override - public void mouseUp(MouseEvent event) { - - if (!downArrowButton.isEnabled()) { - return; - } - - if (null != downArrowButton) { - Rectangle rectangle = downArrowButton.getBounds(); - int x = event.x; - int y = event.y; - - if (x < 0 || x > rectangle.width || y < 0 - || y > rectangle.height) { - return; - } - } - - int size = getItems().size(); - if (itemIndex + pageSize + MAX_SIZE >= size - 1) { - itemIndex = size - MAX_SIZE; - downArrowButton.setEnabled(false); - } else { - itemIndex += pageSize; - } - - // if (itemIndex - pageSize > 0) { - if (itemIndex > 0) { - upArrowButton.setEnabled(true); - } - popup.redraw(); - } - - @Override - public void mouseDown(MouseEvent arg0) { - // TODO Auto-generated method stub - - } - - @Override - public void mouseDoubleClick(MouseEvent arg0) { - // TODO Auto-generated method stub - } - }; - - private PaintListener popupPaintListener = new PaintListener() { - - @Override - public void paintControl(PaintEvent e) { - List items = getItems(); - List input = new ArrayList(); - int size = (items.size() > MAX_SIZE) ? MAX_SIZE : items.size(); - for (int i = 0; i < size; i++) { - input.add(items.get(itemIndex + i)); - } - popupRenderer - .draw(e.gc, popup, state, getRects(), selection, input); - } - }; - - public void setText(String text) { - if (!setSelect(text)) { - this.text = text; - redraw(); - } - } - - private boolean setSelect(String text) { - if (getItems().isEmpty()) { - return false; - } - - int index = items.indexOf(text); - if (index < 0) { - return false; - } - int size = items.size(); - if (size < MAX_SIZE) { - selection = index; - select(selection); - } else if (index + MAX_SIZE >= size) { - int lower = size - index; - selection = MAX_SIZE - lower; - itemIndex = size - MAX_SIZE; - select(selection); - } else { - selection = index - itemIndex; - select(selection); - } - return true; - } - - public void upEvent() { - if (getItems().size() > 0) { - setText(getItems().get(itemIndex + selection)); - } else { - setText(""); //$NON-NLS-1$ - } - childShell.close(); - childShell = null; - } - - private Listener popupMouseEventListener = new Listener() { - - @Override - public void handleEvent(Event event) { - if (event.type == SWT.MouseMove) { - List rs = getRects(); - int size = rs.size(); - for (int i = 0; i < size; i++) { - if (rs.get(i).contains(event.x, event.y)) { - selection = i; - popup.redraw(); - break; - } - } - } - - if (event.type == SWT.FocusOut) { - childShell.close(); - childShell = null; - } - - if (event.type == SWT.MouseWheel) { - int size = getItems().size(); - if (null != downArrowButton && null != upArrowButton) { - if (event.count < 0) { - if (itemIndex - event.count + MAX_SIZE >= size - 1) { - itemIndex = size - MAX_SIZE; - downArrowButton.setEnabled(false); - } else { - itemIndex -= event.count; - } - - // if (itemIndex - pageSize > 0) { - if (itemIndex > 0) { - upArrowButton.setEnabled(true); - } - } else { - - if (itemIndex - event.count < 0) { - itemIndex = 0; - upArrowButton.setEnabled(false); - } else { - itemIndex -= event.count; - } - - if (itemIndex + event.count < size - 1) { - downArrowButton.setEnabled(true); - } - } - popup.redraw(); - } - } - } - }; - - public void setEnabled(boolean enabled) { - this.enabled = enabled; - if (enabled) { - changeComboState(STATE_NORMAL); - if (isImageCombo()) { - setBackgroundImage(images.get(STATE_NORMAL)); - } - } else { - changeComboState(STATE_DISABLE); - if (isImageCombo()) { - setBackgroundImage(images.get(STATE_DISABLE)); - } - } - } - - private PaintListener comboPaintListener = new PaintListener() { - - @Override - public void paintControl(PaintEvent e) { - if (!isImageCombo()) { - comboRenderer.draw(e.gc, combo, text, state); - } else { - comboRenderer.drawImage(e.gc, combo, images.get(state), text, - state); - } - } - }; - - public void setComboRender(DACustomComboRenderer newRenderer) { - comboRenderer = newRenderer; - } - - public void setComboPopupRender(DACustomComboPopupRenderer newRenderer) { - popupRenderer = newRenderer; - } - - // public void removeAll() { - // getItems().clear(); - // } - - public void add(String item) { - if (dirty) { - getItems().add(item); - } else { - getItems().set(0, item); - dirty = true; - } - } - - public void select(int index) { - selection = index; - this.text = items.get(itemIndex + selection); - redraw(); - } - - public String getItem(int index) { - if (getItems().size() > 0) { - return getItems().get(index); - } - return ""; //$NON-NLS-1$ - } - - public void setImages(Image normal, Image hover, Image push, Image disable) { - if (null == normal || null == hover || null == push || null == disable) { - return; - } - List imgs = getImages(); - - imgs.add(normal); - imgs.add(hover); - imgs.add(push); - imgs.add(disable); - setImageCombo(true); - } - - private List getImages() { - if (null == images) { - images = new ArrayList(); - } - return images; - } - - private void setImageCombo(boolean b) { - this.imgCombo = b; - } - - public boolean isImageCombo() { - return imgCombo; - } - - private Listener upButtonMouseExitListener = new Listener() { - - @Override - public void handleEvent(Event event) { - } - }; - - private Listener downButtonMouseExitListener = new Listener() { - - @Override - public void handleEvent(Event event) { - - } - }; - - public boolean isDirty() { - return dirty; - } - - public void initCombo() { - getItems().clear(); - itemIndex = 0; - selection = 0; - items.add(DAWidgetConstants.EMPTY_STRING); - dirty = false; - } - - public void setComboButtonColor(Color normal, Color push, Color hover, - Color disable) { - arrowColors = new ArrayList(); - arrowColors.add(normal); - arrowColors.add(push); - arrowColors.add(hover); - arrowColors.add(disable); - } - - public void setComboButtonImage(Image normal, Image push, Image hover, - Image disable) { - arrowImages = new ArrayList(); - arrowImages.add(normal); - arrowImages.add(push); - arrowImages.add(hover); - arrowImages.add(disable); - } - - public void setComboButtonGradation(Color normalStart, Color normalEnd, - Color pushStart, Color pushEnd, Color hoverStart, Color hoverEnd, - Color disableStart, Color disableEnd) { - arrowColors = new ArrayList(); - arrowColors.add(normalStart); - arrowColors.add(normalEnd); - arrowColors.add(pushStart); - arrowColors.add(pushEnd); - arrowColors.add(hoverStart); - arrowColors.add(hoverEnd); - arrowColors.add(disableStart); - arrowColors.add(disableEnd); - } - - private DACustomButton makeButton() { - DACustomButton button = null; - if (arrowImages != null) { - button = new DACustomButton(childShell, - arrowImages.get(STATE_NORMAL), arrowImages.get(STATE_PUSH), - arrowImages.get(STATE_HOVER), - arrowImages.get(STATE_DISABLE)); - } else if (arrowColors != null) { - if (arrowColors.size() > 4) { - // gradation - button = new DACustomButton(childShell, - arrowColors.get(STATE_NORMAL), - arrowColors.get(STATE_NORMAL + 1), - arrowColors.get(STATE_PUSH * 2), - arrowColors.get(STATE_PUSH * 2 + 1), - arrowColors.get(STATE_HOVER * 2), - arrowColors.get(STATE_HOVER * 2 + 1), - arrowColors.get(STATE_DISABLE * 2), - arrowColors.get(STATE_DISABLE * 2 + 1)); - } else { - button = new DACustomButton(childShell, SWT.NONE); - button.setColors(arrowColors.get(STATE_NORMAL), - arrowColors.get(STATE_PUSH), - arrowColors.get(STATE_HOVER), - arrowColors.get(STATE_DISABLE)); - } - } else { - button = new DACustomButton(childShell, SWT.NONE); - } - if (null != buttonRenderer) { - button.setRenderer(buttonRenderer); - } - return button; - } - - public void setButtonRenderer(DACustomButtonDefaultRenderer renderer) { - buttonRenderer = renderer; - } - - public void setButtonImages(Image up, Image down) { - buttonUp = up; - buttonDown = down; - } - - public int getItemIndex(String text) { - return getItems().indexOf(text); - } - - public boolean isChildShellOpened() { - if (childShell == null || childShell.isDisposed()) { - return false; - } - return true; - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/combo/DACustomComboDefaultRenderer.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/combo/DACustomComboDefaultRenderer.java deleted file mode 100644 index 46e7efa..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/combo/DACustomComboDefaultRenderer.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.combo; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.widgets.Canvas; -import org.tizen.dynamicanalyzer.widgets.helper.ColorResources; - - -public class DACustomComboDefaultRenderer extends DACustomComboRenderer { - - @Override - public void draw(GC gc, Canvas canvas, String text, int state) { - Rectangle rect = canvas.getClientArea(); - if (state == DACustomCombo.STATE_NORMAL) { - gc.setBackground(ColorResources.WINDOW_BG_COLOR); - } else if (state == DACustomCombo.STATE_HOVER) { - gc.setBackground(ColorResources.ITEM_BLUE_DARK); - } else if (state == DACustomCombo.STATE_PUSH) { - gc.setBackground(ColorResources.BLUE); - } else if (state == DACustomCombo.STATE_DISABLE) { - gc.setBackground(ColorResources.BAR_GRAY1); - } - gc.fillRectangle(rect); - gc.drawRectangle(rect.x, rect.y, rect.width - 20, rect.height - 1); - - if (null == text) { - text = ""; //$NON-NLS-1$ - } - Point p = gc.textExtent(text, SWT.DRAW_MNEMONIC); - gc.drawString(text, 5, (rect.height - p.y)/2, true); - gc.fillRectangle(rect.x + rect.width - 20, rect.y, 19, rect.height - 1); - gc.drawRectangle(rect.x + rect.width - 20, rect.y, 19, rect.height - 1); - } - - @Override - public void drawPattern(GC gc, Canvas canvas, Image patternImage, - String text, int state) { - - } - - @Override - public void drawImage(GC gc, Canvas canvas, Image image, String text, - int state) { - - } - -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/combo/DACustomComboPopupDefaultRenderer.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/combo/DACustomComboPopupDefaultRenderer.java deleted file mode 100644 index 1bb42a2..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/combo/DACustomComboPopupDefaultRenderer.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.combo; - -import java.util.List; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.widgets.Canvas; -import org.tizen.dynamicanalyzer.widgets.helper.ColorResources; - - -public class DACustomComboPopupDefaultRenderer extends DACustomComboPopupRenderer { - - @Override - public void draw(GC gc, Canvas canvas, int state, List rects, - int selection, List items) { - int size = rects.size(); - for (int i = 0; i < size; i++) { - Rectangle r = rects.get(i); - gc.setBackground(ColorResources.WINDOW_BG_COLOR); - if (selection == i) { - gc.setBackground(ColorResources.RED); - gc.fillRectangle(r); - gc.setBackground(ColorResources.WINDOW_BG_COLOR); - } - gc.setForeground(ColorResources.WHITE); - gc.drawRectangle(r.x, r.y, r.width - 1, r.height - 1); - Point p = gc.textExtent(items.get(i), SWT.DRAW_MNEMONIC); - gc.drawString(items.get(i), 5, (r.height - p.y) / 2 + i * r.height, - true); - } - } - - @Override - public void drawPattern(GC gc, Canvas canvas, Image patternImage, - int state, List rects, int selection, List items) { - // TODO Auto-generated method stub - - } - - @Override - public void drawImage(GC gc, Canvas canvas, Image image, int state, - List rects, int selection, List items) { - // TODO Auto-generated method stub - - } - -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/combo/DACustomComboPopupRenderer.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/combo/DACustomComboPopupRenderer.java deleted file mode 100644 index a3b278b..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/combo/DACustomComboPopupRenderer.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.combo; - -import java.util.List; - -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.widgets.Canvas; - -public abstract class DACustomComboPopupRenderer { - public abstract void draw(GC gc, Canvas canvas, int state, - List rects, int selection, List items); - - public abstract void drawPattern(GC gc, Canvas canvas, Image patternImage, - int state, List rects, int selection, List items); - - public abstract void drawImage(GC gc, Canvas canvas, Image image, - int state, List rects, int selection, List items); -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/combo/DACustomComboRenderer.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/combo/DACustomComboRenderer.java deleted file mode 100644 index 8a01fa5..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/combo/DACustomComboRenderer.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.combo; - -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Canvas; - -public abstract class DACustomComboRenderer { - public abstract void draw(GC gc, Canvas canvas, String text, int state); - public abstract void drawPattern(GC gc, Canvas canvas, Image patternImage, String text, int state); - public abstract void drawImage(GC gc, Canvas canvas, Image image, String text, int state); -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/combo/DACustomComboSelectionListener.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/combo/DACustomComboSelectionListener.java deleted file mode 100644 index 755092c..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/combo/DACustomComboSelectionListener.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.combo; - -import org.eclipse.swt.widgets.Canvas; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; - -public abstract class DACustomComboSelectionListener implements Listener { - - @Override - public void handleEvent(Event event) { - Canvas popup = (Canvas) event.widget; - DACustomCombo combo = (DACustomCombo) popup.getData(); - if (null != combo) { - selectionEvent(combo); - combo.upEvent(); - } - } - - public abstract void selectionEvent(DACustomCombo combo); -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/graph/bar/FourBarGraph.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/graph/bar/FourBarGraph.java deleted file mode 100644 index ad4618e..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/graph/bar/FourBarGraph.java +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.graph.bar; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ControlEvent; -import org.eclipse.swt.events.ControlListener; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.Font; -import org.eclipse.swt.graphics.FontData; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FormAttachment; -import org.eclipse.swt.layout.FormData; -import org.eclipse.swt.layout.FormLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Label; -import org.tizen.dynamicanalyzer.widgets.helper.ColorResources; -import org.tizen.dynamicanalyzer.widgets.helper.Formatter; - -public class FourBarGraph extends Composite { - public static int TYPE_BYTE = 1; - public static int TYPE_PERCENT = 0; - - private String measure = Formatter.toByteFormatMeasure(0); - private String labelText = ""; - - private final int INNER_MARGIN = 3; - private final int LABEL_MARGIN = 15; - private int graphCount = 4; - private int graphType = TYPE_PERCENT; - private List graphs; - private Label label; - private Font labelFont; - private Color fontColor = ColorResources.WHITE; - private FourBarGraph me; - private Color bgColor = ColorResources.BLACK; - - public FourBarGraph(Composite parent, int style, int type) { - super(parent, style); - graphType = type; - me = this; - graphs = new ArrayList(); - labelFont = new Font(getDisplay(), new FontData[] { new FontData( - "Arial", 8, SWT.NORMAL) }); - this.setLayout(new FormLayout()); - this.setBackground(bgColor); - this.addControlListener(controlListener); - - for (int i = 0; i < graphCount; i++) { - SingleBar bar = new SingleBar(me, SWT.NONE, graphType); - FormData data = new FormData(); - data.top = new FormAttachment(0, 0); - if (i == 0) { - data.left = new FormAttachment(0, INNER_MARGIN); - } else { - data.left = new FormAttachment(graphs.get(i - 1), INNER_MARGIN); - } - data.bottom = new FormAttachment(100, -LABEL_MARGIN); - bar.setLayoutData(data); - graphs.add(bar); - } - - label = new Label(me, SWT.TRANSPARENT); - FormData data = new FormData(); - data.top = new FormAttachment(graphs.get(0), 0); - data.height = 15; - data.left = new FormAttachment(0, 0); - data.right = new FormAttachment(100, 0); - label.setLayoutData(data); - label.setFont(labelFont); - label.setAlignment(SWT.CENTER); - label.setForeground(fontColor); - label.setBackground(bgColor); - } - - public void setGraphColor(Color graph, Color gray, Color font) { - for (int i = 0; i < graphs.size(); i++) { - graphs.get(i).setColors(graph, bgColor, gray, font); - } - } - - public void setGraphBgColor(Color bg) { - for (int i = 0; i < graphs.size(); i++) { - graphs.get(i).setBgColor(bg); - } - } - - public void setMaxSize(long max) { - for (int i = 0; i < graphs.size(); i++) { - graphs.get(i).setMaxSize(max); - } - } - - public void setMaxSize(List maxSizes) { - for (int i = 0; i < maxSizes.size() && i < graphCount; i++) { - graphs.get(i).setMaxSize(maxSizes.get(i)); - } - } - - public void setCurrentValue(List currentValues) { - for (int i = 0; i < currentValues.size() && i < graphCount; i++) { - if (graphType == TYPE_BYTE) { - long value = currentValues.get(i); - measure = Formatter.toByteFormatMeasure(value); - setText(labelText); - } - graphs.get(i).setCurrentSize(currentValues.get(i)); - graphs.get(i).redraw(); - } - } - - public void setText(String text) { - labelText = text; - label.setForeground(fontColor); - if (graphType == TYPE_BYTE) { - text += " (" + measure + ")"; - } else { - text += " (%)"; - } - - label.setText(text); - } - - public void setTextColor(Color color) { - label.setForeground(color); - fontColor = color; - } - - public void setTextBgColor(Color color) { - label.setBackground(color); - } - - public void setBgColor(Color color) { - bgColor = color; - this.setBackground(bgColor); - setGraphBgColor(bgColor); - } - - ControlListener controlListener = new ControlListener() { - - @Override - public void controlResized(ControlEvent e) { - // TODO Auto-generated method stub - Rectangle r = me.getClientArea(); - int width = (r.width - (graphCount + 1) * INNER_MARGIN) - / graphCount; - - for (int i = 0; i < graphCount; i++) { - SingleBar bar = graphs.get(i); - FormData data = new FormData(); - data.top = new FormAttachment(0, 0); - if (i == 0) { - data.left = new FormAttachment(0, INNER_MARGIN); - } else { - data.left = new FormAttachment(graphs.get(i - 1), - INNER_MARGIN); - } - data.width = width; - data.bottom = new FormAttachment(100, -LABEL_MARGIN); - bar.setLayoutData(data); - graphs.add(bar); - } - - FormData data = new FormData(); - data.top = new FormAttachment(graphs.get(0), 0); - data.height = 15; - data.left = new FormAttachment(0, 0); - data.right = new FormAttachment(100, 0); - label.setLayoutData(data); - } - - @Override - public void controlMoved(ControlEvent e) { - // TODO Auto-generated method stub - - } - }; - - public void clear() { - for (int i = 0; i < graphs.size(); i++) { - graphs.get(i).setCurrentSize(0); - graphs.get(i).redraw(); - } - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/graph/bar/SingleBar.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/graph/bar/SingleBar.java deleted file mode 100644 index 7f30e3a..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/graph/bar/SingleBar.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.graph.bar; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.Font; -import org.eclipse.swt.graphics.FontData; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.widgets.Canvas; -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.widgets.helper.ColorResources; -import org.tizen.dynamicanalyzer.widgets.helper.Formatter; - -public class SingleBar extends Canvas { - - public static int TYPE_PERCENT = 0; - public static int TYPE_BYTE = 1; - - private final int TOP_MARGIN = 5; - private final int BOTTOM_MARGIN = 4; - private final int BOTTOM_FULL_MARGIN = 15; - - private int graphType = TYPE_PERCENT; - - private long maxSize; - private long currentSize; - private Color graphColor; - private Color fontColor; - private Color bgColor; - private Color grayColor; - private Font font; - - public SingleBar(Composite parent, int style) { - super(parent, style); - maxSize = currentSize = 0; - this.addPaintListener(barPaintListener); - - graphColor = ColorResources.BLUE; - fontColor = ColorResources.RED; - bgColor = ColorResources.BLACK; - grayColor = ColorResources.BAR_GRAY1; - font = new Font(getDisplay(), new FontData[] { new FontData("Arial", 6, - SWT.NORMAL) }); - } - - public SingleBar(Composite parent, int style, int type) { - this(parent, style); - graphType = type; - } - - private PaintListener barPaintListener = new PaintListener() { - - @Override - public void paintControl(PaintEvent e) { - Canvas canvas = (Canvas) e.widget; - canvas.setBackground(bgColor); - Rectangle rect = canvas.getClientArea(); - int graphHeight = rect.height - TOP_MARGIN - BOTTOM_FULL_MARGIN; - - int maxDrawCount = graphHeight / 2; - maxDrawCount = (graphHeight % 2 > 0) ? maxDrawCount + 1 - : maxDrawCount; - - int drawCount = 0; - if (maxSize > 0) { - drawCount = (int) ((maxDrawCount * currentSize) / maxSize); - } - - int startY = rect.y + TOP_MARGIN; - int endY = startY + graphHeight; - - int y = endY; - for (int i = 0; i <= maxDrawCount; i++) { - - if (i > drawCount || (i == 0 && currentSize == 0)) { - e.gc.setForeground(grayColor); - } else { - e.gc.setForeground(graphColor); - } - e.gc.drawLine(rect.x, y, rect.x + rect.width, y); - e.gc.setForeground(bgColor); - y -= 1; - e.gc.drawLine(rect.x, y, rect.x + rect.width, y); - y -= 1; - } - - int textY = endY + BOTTOM_MARGIN; - e.gc.setForeground(fontColor); - e.gc.setFont(font); - String value = null; - if (graphType == TYPE_BYTE) { - value = Formatter.toByteFormatValue(currentSize); - } else { - value = Long.toString(currentSize); - } - e.gc.drawText(value, rect.x + 1, textY); - } - }; - - public void setMaxSize(long max) { - maxSize = max; - } - - public void setCurrentSize(long current) { - currentSize = current; - } - - public void setColors(Color graph, Color bg, Color gray, Color font) { - graphColor = graph; - bgColor = bg; - grayColor = gray; - fontColor = font; - } - - public void setBgColor(Color bg) { - bgColor = bg; - } - -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/graph/circular/CircularGraph.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/graph/circular/CircularGraph.java deleted file mode 100644 index 7b6cc65..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/graph/circular/CircularGraph.java +++ /dev/null @@ -1,232 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.graph.circular; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.Font; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FormAttachment; -import org.eclipse.swt.layout.FormData; -import org.eclipse.swt.layout.FormLayout; -import org.eclipse.swt.widgets.Canvas; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Label; -import org.tizen.dynamicanalyzer.widgets.helper.ColorResources; -import org.tizen.dynamicanalyzer.widgets.helper.Formatter; - -public class CircularGraph extends Composite { - - private final int DEFAULT_ANGLE = 90; - public static final int TYPE_PERCENT = 0; - public static final int TYPE_CUSTOM = 1; - - private Canvas canvas; - private Label label; - private Font font; - private long max = 100; - private long value = 0; - private Color graphColor = ColorResources.ITEM_BLUE_BRIGHT; - private Color bgColor = ColorResources.TITLEBAR_BG_COLOR; - private Color centerColor = ColorResources.BLACK; - private String measure; - private int type = TYPE_PERCENT; - private Color textColor = ColorResources.ITEM_BLUE_BRIGHT; - - private final int DEFAULT_WIDTH = 74; - private final int DEFAULT_HEIGHT = 74; - - public CircularGraph(Composite parent, int style, int type) { - super(parent, style); - this.setLayout(new FormLayout()); - this.type = type; - - if (type == TYPE_PERCENT) { - measure = "%"; //$NON-NLS-1$ - } else { - measure = ""; //$NON-NLS-1$ - } - - canvas = new Canvas(this, SWT.DOUBLE_BUFFERED); - canvas.addPaintListener(paintListener); - FormData data = new FormData(); - data.top = new FormAttachment(0, 0); - data.left = new FormAttachment(0, 0); - data.right = new FormAttachment(100, 0); -// data.bottom = new FormAttachment(100, -25); - // data.width = 74; - data.height = 74; - canvas.setLayoutData(data); - - label = new Label(this, SWT.TRANSPARENT); - label.setForeground(textColor); - font = getShell().getDisplay().getSystemFont(); - label.setFont(font); - label.setAlignment(SWT.CENTER); - data = new FormData(); - data.top = new FormAttachment(canvas, 1); - data.left = new FormAttachment(0, 0); - data.height = 25; - data.right = new FormAttachment(100, 0); - label.setLayoutData(data); - } - - private PaintListener paintListener = new PaintListener() { - - @Override - public void paintControl(PaintEvent e) { - Rectangle rect = canvas.getBounds(); - int x = rect.x; - int y = rect.y; - int width = rect.width; - int height = rect.height; - - x = (width > DEFAULT_WIDTH) ? x + (width - DEFAULT_WIDTH) / 2 : x; - y = (height > DEFAULT_HEIGHT) ? y + (height - DEFAULT_HEIGHT) / 2 - : y; - - // if (width > height) { - // x += (rect.width - rect.height) / 2; - // width = height; - // } else if (width < height) { - // y += (rect.height - rect.width) / 2; - // height = width; - // } - - width = height = 74; - e.gc.setAntialias(SWT.ON); - e.gc.setBackground(bgColor); - e.gc.fillOval(x, y, width, height); - e.gc.setBackground(graphColor); - e.gc.fillArc(x, y, width, height, DEFAULT_ANGLE, calculateAngle()); - // e.gc.setBackground(ColorResources.BLACK); - e.gc.setBackground(centerColor); - e.gc.fillOval(x + 9, y + 9, 56, 56); - - // Draws text. - String centerText = getCenterText(); - - e.gc.setFont(font); - e.gc.setForeground(graphColor); - Point textSize = e.gc.textExtent(centerText, SWT.DRAW_MNEMONIC); - e.gc.drawText(centerText, (rect.width - textSize.x) / 2, 28 - 6, - true); - // (rect.height - textSize.y) / 2 - 5, true); - - e.gc.setFont(font); - e.gc.setForeground(graphColor); - Point measureSize = e.gc.textExtent(measure, SWT.DRAW_MNEMONIC); - e.gc.drawText(measure, (rect.width - measureSize.x) / 2, 46 - 4, - true); - // (rect.height - measureSize.y) / 2 - 5 + textSize.y, true); - } - }; - - public void setMax(long max) { - this.max = max; - canvas.redraw(); - } - - public void update(long max, long value) { - this.max = max; - this.value = value; - canvas.redraw(); - } - - public void update(long value) { - this.value = value; - canvas.redraw(); - } - - private int calculateAngle() { - int angle = (int) (360 * ((float) value / max)) * (-1); - return angle; - } - - public void setText(String text) { - label.setForeground(textColor); - label.setText(text); - } - - public void setFont(Font font) { - label.setFont(font); - this.font = font; - } - - public void setLabelBg(Color color) { - label.setBackground(color); - } - - public void setTextColor(Color color) { - textColor = color; - } - - private String getCenterText() { - String str = null; - if (type == TYPE_PERCENT) { - int percent = (int) (((float) value / max) * 100); - str = Integer.toString(percent); - } else { - // type : memory size - if (value >= 1024) { - double dValue = (value) / 1024.; - if (dValue >= 1024. * 1024) { - dValue = (dValue) / 1024. * 1024; - setMeasure("GB"); //$NON-NLS-1$ - } else if (dValue >= 1024.) { - dValue = (dValue) / 1024.0; - setMeasure("MB"); //$NON-NLS-1$ - } else { - setMeasure("KB"); //$NON-NLS-1$ - } - str = Formatter.toDoubleFormat1(Double.toString(dValue)); - } else { - str = Long.toString(value); - } - } - return str; - } - - public void setMeasure(String m) { - measure = m; - } - - public void setGraphColor(Color color) { - graphColor = color; - } - - public void setGraphBgColor(Color color) { - bgColor = color; - } - - public void setCenterColor(Color color) { - centerColor = color; - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/helper/ColorResources.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/helper/ColorResources.java deleted file mode 100644 index e608bb0..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/helper/ColorResources.java +++ /dev/null @@ -1,371 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.helper; - -import org.eclipse.jface.resource.ColorRegistry; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.RGB; - -public class ColorResources { - - private static ColorRegistry colorRegistry = new ColorRegistry(); - - public static final Color WHITE = getColor("white", new RGB(255, 255, 255)); //$NON-NLS-1$ - public static final Color BLACK = getColor("black", new RGB(0, 0, 0)); //$NON-NLS-1$ - public static final Color BLUE = getColor("blue", new RGB(0, 0, 255)); //$NON-NLS-1$ - public static final Color RED = getColor("red", new RGB(255, 0, 0)); //$NON-NLS-1$ - public static final Color PURPLE = getColor("PUPLE", new RGB(226, 101, 225)); //$NON-NLS-1$ - - // scale widget - public static Color SCALE_OUTLINE_COLOR = getColor( - "scale_outline_color", new RGB(150, 150, 150)); //$NON-NLS-1$ - public static Color SCALE_BG_COLOR_START = getColor( - "scale_bg_color_start", new RGB(253, 253, 253)); //$NON-NLS-1$ - public static Color SCALE_BG_COLOR_END = getColor( - "scale_bg_color_end", new RGB(186, 186, 186)); //$NON-NLS-1$ - public static Color SCALE_AREA_COLOR = getColor( - "scale_area_color", new RGB(103, 103, 103)); //$NON-NLS-1$ - public static Color SCALE_AREA_OUTLINE_COLOR = getColor( - "scale_area_outline_color", new RGB(250, 250, 250)); //$NON-NLS-1$ - - // timeline - public static Color TIMELINE_NUMBER_COLOR = getColor( - "timeline_number", new RGB(0, 45, 96)); //$NON-NLS-1$ - public static Color TIMELINE_TICK_COLOR = getColor( - "timeline_tick", new RGB(159, 159, 159)); //$NON-NLS-1$ - public static Color TIMELINE_BG_COLOR = getColor( - "timeline_bg", new RGB(247, 247, 247)); //$NON-NLS-1$ - - // chart - public static Color CHART_NAME_BACK_START = getColor( - "chart_name_back_start", new RGB(215, 215, 215)); //$NON-NLS-1$ - public static Color CHART_NAME_BACK_END = getColor( - "chart_name_back_end", new RGB(157, 166, 168)); //$NON-NLS-1$ - public static Color CHART_NAME_SELECT_BACK_START = getColor( - "chart_name_back_select_start", new RGB(180, 242, 254)); //$NON-NLS-1$ - public static Color CHART_NAME_SELECT_BACK_END = getColor( - "chart_name_back_select_end", new RGB(56, 178, 208)); //$NON-NLS-1$ - - public static Color UI_EVENT_CHART_SEPERATE_LINE = getColor( - "UI_event_chart_seperate_line", new RGB(189, 207, 213)); //$NON-NLS-1$ - public static Color UI_EVENT_CHART_TEXT = getColor( - "UI_event _chat_text", new RGB(83, 83, 83)); //$NON-NLS-1$ - - public static Color SCREENSHOT_CHART_SELECTED_LINE = getColor( - "screenshot_chart_selected_line", new RGB(59, 188, 232)); //$NON-NLS-1$ - public static Color SCREENSHOT_CHART_BORDER_LINE = getColor( - "screenshot_chart_border_line", new RGB(117, 117, 117)); //$NON-NLS-1$ - - public static Color CHART_BOARD_BACK = getColor( - "chart_board_back", new RGB(230, 230, 230)); //$NON-NLS-1$ - public static Color CHART_BOARD_ITEM_LINE = getColor( - "chart_board_item_line", new RGB(171, 171, 171)); //$NON-NLS-1$ - - public static Color CHART_BOARD_ITEM_NAME_FOLD_BG = getColor( - "chart_fold_bg", new RGB(186, 190, 191)); //$NON-NLS-1$ - - public static Color CHART_SELECTION_RANGE = getColor( - "chart_selection_range", new RGB(23, 98, 132)); //$NON-NLS-1$ - - // shell window background color - public static final Color WINDOW_BG_COLOR = getColor( - "window_bg_color", new RGB(51, 52, 53)); //$NON-NLS-1$ - // - // /** title bar colors **/ - // public static final Color TITLEBAR_TEXT_COLOR = getColor( - // "titlebar_text_color", new RGB(64, 208, 255)); //$NON-NLS-1$ - // - public static final Color TITLEBAR_BG_COLOR = getColor( - "titlebar_bg", new RGB(78, 79, 81)); //$NON-NLS-1$ - // - // /** device and application combo specific colors start **/ - // public static final Color DEVICE_APPLICATION_ENABLE = WHITE; - // - // public static final Color DEVICE_APPLICATION_DISABLE = getColor( - // "device_application_disable", new RGB(128, 128, 128)); //$NON-NLS-1$ - // - // public static final Color DEVICE_APPLICATION_POPUP_OUTER_1 = getColor( - // "device_application_popup_outer_1", new RGB(31, 31, 31)); //$NON-NLS-1$ - // - // public static final Color DEVICE_APPLICATION_POPUP_OUTER_2 = getColor( - // "device_application_popup_outer_2", new RGB(31, 137, 163)); //$NON-NLS-1$ - // - // public static final Color DEVICE_APPLICATION_DROPDOWN_TEXT = WHITE; - // - // public static final Color DEVICE_APPLICATION_ITEM_NORMAL_TOP = getColor( - // "device_application_item_normal_top", new RGB(76, 76, 77)); //$NON-NLS-1$ - // - // public static final Color DEVICE_APPLICATION_ITEM_NORMAL_INNER = - // getColor( - // "device_application_item_normal_inner", new RGB(66, 66, 67)); //$NON-NLS-1$ - // - // public static final Color DEVICE_APPLICATION_ITEM_NORMAL_BOTTOM = - // getColor( - // "device_application_item_normal_bottom", new RGB(56, 56, 60)); //$NON-NLS-1$ - // - // public static final Color DEVICE_APPLICATION_ITEM_SELECT_TOP = getColor( - // "device_application_item_select_top", new RGB(76, 76, 77)); //$NON-NLS-1$ - // - // public static final Color DEVICE_APPLICATION_ITEM_SELECT_INNER = - // getColor( - // "device_application_item_select_inner", new RGB(0, 151, 201)); //$NON-NLS-1$ - // - // public static final Color DEVICE_APPLICATION_ITEM_SELECT_BOTTOM = - // getColor( - // "device_application_item_select_bottom", new RGB(56, 56, 60)); //$NON-NLS-1$ - // - // /** device and application combo specific colors end **/ - // - // /** normal view layout colors start **/ - // - // public static final Color NORMAL_VIEW_LAYOUT_OUTER = getColor( - // "normal_view_layout_outer", new RGB(160, 160, 160)); //$NON-NLS-1$ - // - // public static final Color NORMAL_VIEW_LAYOUT_MIDDLE = getColor( - // "normal_view_layout_middle", new RGB(74, 74, 74)); //$NON-NLS-1$ - // - // public static final Color NORMAL_VIEW_LAYOUT_INNER = getColor( - // "normal_view_layout_inner", new RGB(66, 66, 68)); //$NON-NLS-1$ - // - // /** normal view layout colors end **/ - // - // /** current view colors start **/ - // public static final Color CURRENT_VIEW_OUTLINE = getColor( - // "current_view_outline", new RGB(160, 160, 160)); //$NON-NLS-1$ - // public static final Color CURRENT_VIEW_TITLE_TEXT = WHITE; - // public static final Color CURRENT_VIEW_MIDDLE = - // NORMAL_VIEW_LAYOUT_MIDDLE; - // public static final Color CURRENT_VIEW_INNER = NORMAL_VIEW_LAYOUT_INNER; - // - // public static final Color CURRENT_VIEW_TABLE_TITLE_BG = getColor( - // "current_view_table_title_bg", new RGB(59, 59, 60)); //$NON-NLS-1$ - // public static final Color CURRENT_VIEW_TABLE_TITLE_TEXT = getColor( - // "current_view_table_title_text", new RGB(151, 230, 255)); //$NON-NLS-1$ - // public static final Color CURRENT_VIEW_TABLE_CONTENTS_BG = getColor( - // "current_view_table_contents_bg", new RGB(84, 85, 86)); //$NON-NLS-1$ - // public static final Color CURRENT_VIEW_TABLE_CONTENTS_TEXT = getColor( - // "current_view_table_contents_text", new RGB(216, 216, 216)); //$NON-NLS-1$ - // public static final Color CURRENT_VIEW_TABLE_LINE = getColor( - // "current_view_table_line", new RGB(136, 137, 138)); //$NON-NLS-1$ - // - // public static final Color CURRENT_VIEW_CPU_TEXT = getColor( - // "current_view_cpu_text", new RGB(2, 171, 208)); //$NON-NLS-1$ - // public static final Color CURRENT_VIEW_PROCESS_TEXT = getColor( - // "current_view_process_text", new RGB(114, 203, 8)); //$NON-NLS-1$ - // public static final Color CURRENT_VIEW_GRAPH_BG = getColor( - // "current_view_graph_bg", new RGB(79, 79, 81)); //$NON-NLS-1$ - // public static final Color CURRENT_VIEW_CPU_GRAPH = CURRENT_VIEW_CPU_TEXT; - // public static final Color CURRENT_VIEW_PROCESS_GRAPH = - // CURRENT_VIEW_PROCESS_TEXT; - // public static final Color CURRENT_VIEW_GRAPH_OUTLINE = getColor( - // "current_view_graph_outline", new RGB(43, 44, 45)); //$NON-NLS-1$ - // - // public static final Color CURRENT_VIEW_SNAPSHOT_OUTLINE = getColor( - // "current_view_snapshot_outline", new RGB(49, 104, 127)); //$NON-NLS-1$ - // /** current view colors end **/ - // - // /** common table colors start **/ - // public static final Color TABLE_HEADER_BG = getColor( - // "table_header_bg", new RGB(59, 59, 60)); //$NON-NLS-1$ - // public static final Color TABLE_LINE = getColor( - // "table_line", new RGB(136, 137, 138)); //$NON-NLS-1$ - // public static final Color TABLE_CONTENTS_NORMAL = getColor( - // "table_contents_normal", new RGB(84, 85, 86)); //$NON-NLS-1$ - // public static final Color TABLE_CONTENTS_HOVER = getColor( - // "table_contents_hover", new RGB(72, 98, 108)); //$NON-NLS-1$ - // public static final Color TABLE_CONTENTS_SELECTED_START = getColor( - // "table_contents_selected_start", new RGB(0, 146, 193)); //$NON-NLS-1$ - // public static final Color TABLE_CONTENTS_SELECTED_END = getColor( - // "table_contents_selected_end", new RGB(0, 60, 79)); //$NON-NLS-1$ - // public static final Color TABLE_HEADER_FONT_COLOR = getColor( - // "table_title_font_color", new RGB(151, 230, 255)); //$NON-NLS-1$ - // public static final Color TABLE_CONTENTS_FONT_COLOR = getColor( - // "table_contents_font_color", new RGB(216, 216, 216)); //$NON-NLS-1$ - // /** common table colors end **/ - // - // /** open trace popup colors **/ - // public static final Color OPEN_TRACE_POPUP_CONTENTS_BG_COLOR = getColor( - // "open_trace_popup_contents_bg_color", new RGB(51, 52, 53)); //$NON-NLS-1$ - // public static final Color OPEN_TRACE_POPUP_BOTTOM_BG_COLOR = getColor( - // "open_trace_popup_bottom_bg_color", new RGB(39, 39, 40)); //$NON-NLS-1$ - // public static final Color OPEN_TRACE_TITLE_TEXT_COLOR = - // TITLEBAR_TEXT_COLOR; - // public static final Color OPEN_TRACE_INNERTITLE_TEXT_COLOR = WHITE; - // public static final Color OPEN_TRACE_BUTTON_TEXT_COLOR = WHITE; - // public static final Color OPEN_TRACE_TABLE_OUTLINE_COLOR = - // CURRENT_VIEW_TABLE_LINE; - // public static final Color OPEN_TRACE_TABLE_LINE1_NORMAL = getColor( - // "open_trace_table_line1_normal", new RGB(78, 78, 79)); //$NON-NLS-1$ - // public static final Color OPEN_TRACE_TABLE_LINE1_HOVER = getColor( - // "open_trace_table_line1_hover", new RGB(72, 98, 108)); //$NON-NLS-1$ - // public static final Color OPEN_TRACE_TABLE_LINE_SELECTED_START = - // getColor( - // "open_trace_table_line_selected_start", new RGB(0, 146, 193)); //$NON-NLS-1$ - // public static final Color OPEN_TRACE_TABLE_LINE_SELECTED_END = getColor( - // "open_trace_table_line_selected_end", new RGB(0, 60, 79)); //$NON-NLS-1$ - // - // public static final Color OPEN_TRACE_TABLE_LINE2_NORMAL = getColor( - // "open_trace_table_line2_normal", new RGB(84, 85, 86)); //$NON-NLS-1$ - // public static final Color OPEN_TRACE_TABLE_LINE2_HOVER = getColor( - // "open_trace_table_line2_hover", new RGB(72, 98, 108)); //$NON-NLS-1$ - // - // public static final Color OPEN_TRACE_TABLE2_FONT_COLOR = getColor( - // "open_trace_table2_font_color", new RGB(255, 85, 57)); //$NON-NLS-1$ - // - // /** snapshot viewer colors **/ - // public static final Color SNAPSHOT_VIEWER_BORDER = getColor( - // "snapshot_viewer_border", new RGB(49, 104, 127)); //$NON-NLS-1$ - // - // /** File chart colors **/ - // public static final Color FILE_CLOSED_START = getColor( - // "file_closed_start", new RGB(168, 198, 71)); //$NON-NLS-1$ - // public static final Color FILE_CLOSED_END = getColor( - // "file_closed_end", new RGB(130, 152, 54)); //$NON-NLS-1$ - // public static final Color FILE_USED_START = getColor( - // "file_used_start", new RGB(58, 138, 203)); //$NON-NLS-1$ - // public static final Color FILE_USED_END = getColor( - // "file_used_end", new RGB(44, 104, 153)); //$NON-NLS-1$ - // public static final Color FILE_OPEN_START = getColor( - // "file_open_start", new RGB(255, 135, 82)); //$NON-NLS-1$ - // public static final Color FILE_OPEN_END = getColor( - // "file_open_end", new RGB(232, 73, 73)); //$NON-NLS-1$ - // public static final Color FILE_FAILED_START = getColor( - // "file_failed_start", new RGB(226, 58, 242)); //$NON-NLS-1$ - // public static final Color FILE_FAILED_END = getColor( - // "file_failed_end", new RGB(164, 40, 176)); //$NON-NLS-1$ - // public static final Color FILE_CHART_SELECTION_BG = getColor( - // "file_chart_selection_bg", new RGB(0, 151, 201)); //$NON-NLS-1$ - // public static final Color FILE_CHART_PARENT_BG = getColor( - // "file_chart_parent_bg", new RGB(84, 85, 86)); //$NON-NLS-1$ - // public static final Color FILE_CHART_CHILD_BG = getColor( - // "file_chart_child_bg", new RGB(59, 59, 60)); //$NON-NLS-1$ - // - // - // - // public static final Color VIEW_BORDER = getColor( - // "view_border", new RGB(74, 74, 74)); //$NON-NLS-1$ - // public static final Color VIEW_BG_COLOR = getColor( - // "view_bg_color", new RGB(66, 66, 68)); //$NON-NLS-1$ - // - // public static final Color TAB_BG_COLOR = VIEW_BG_COLOR; //$NON-NLS-1$ - // public static final Color TABLE_BG_COLOR = getColor( - // "table_bg_color", new RGB(84, 85, 87)); //$NON-NLS-1$ - // public static final Color TABLE_HEADER_COLOR = getColor( - // "table_header_color", new RGB(59, 59, 61)); //$NON-NLS-1$ - // // public static final Color TABLE_HEADER_FONT_COLOR = getColor( - // // "table_header_font_color", new RGB(75, 229, 253)); //$NON-NLS-1$ - // public static final Color TABLE_LINE_COLOR = getColor( - // "table_line_color", new RGB(96, 97, 99)); //$NON-NLS-1$ - // - // public static final Color UNSELECTED_TAB_FIRST = getColor( - // "unselected_tab_first", new RGB(51, 51, 51)); //$NON-NLS-1$ - // public static final Color UNSELECTED_TAB_SECOND = getColor( - // "unselected_tab_second", new RGB(42, 42, 42)); //$NON-NLS-1$ - // public static final Color SELECTED_TAB_FIRST = getColor( - // "selected_tab_first", new RGB(74, 74, 74)); //$NON-NLS-1$ - // public static final Color SELECTED_TAB_SECOND = getColor( - // "selected_tab_second", new RGB(128, 129, 130)); //$NON-NLS-1$ - // - // public static final Color TOOLTIP = getColor( - // "tooltip", new RGB(255, 255, 225)); //$NON-NLS-1$ - // - public static final Color BAR_GRAY1 = getColor( - "barGRAY1", new RGB(177, 177, 177)); //$NON-NLS-1$ - // public static final Color BAR_GRAY2 = getColor( - // "barGRAY2", new RGB(153, 153, 153)); //$NON-NLS-1$ - // public static final Color BAR_GRAY3 = getColor( - // "barGRAY3", new RGB(216, 216, 216)); //$NON-NLS-1$ - // - // /* Timeline */ - public static final Color ITEM_BLUE_BRIGHT = getColor("item blue right", - new RGB(131, 196, 218));//$NON-NLS-1$ - public static final Color ITEM_BLUE_DARK = getColor("item blue dark", - new RGB(38, 104, 138));//$NON-NLS-1$ - - // public static final Color ITEM_BG = getColor("item background", new - // RGB(50, - // 50, 50));//$NON-NLS-1$ - // public static final java.awt.Color ITEM_BG_AWT = new java.awt.Color(50, - // 50, - // 50);//$NON-NLS-1$ - // public static final java.awt.Color ITEM_BLUE_AWT = new java.awt.Color(38, - // 104, 138);//$NON-NLS-1$ - // public static final Color TIMELINE_BG = getColor( - // "timeline_bg", new RGB(50, 50, 50)); //$NON-NLS-1$ - // public static final Color TRANS = getColor( - // "timeline_bg", new RGB(50, 50, 50)); //$NON-NLS-1$ - // public static final Color SNAPSHOT_CHART_FOREGROUND = BAR_GRAY1; - // public static final Color SNAPSHOT_CHART_BACKGROUND = getColor( - // "snapshot_chart_bg", new RGB(50, 50, 50)); //$NON-NLS-1$ - // - // public static final Color GRAY_80 = getColor("GRAY_80", new RGB(80, 80, 80)); //$NON-NLS-1$ - // public static final Color GRAY_110 = getColor( - // "GRAY_110", new RGB(110, 110, 110)); //$NON-NLS-1$ - // public static final Color GRAY_130 = getColor( - // "GRAY_130", new RGB(130, 130, 130)); //$NON-NLS-1$ - // public static final Color GRAY_170 = getColor( - // "GRAY_170", new RGB(170, 170, 170)); //$NON-NLS-1$ - // public static final Color GRAY_210 = getColor( - // "GRAY_210", new RGB(210, 210, 210)); //$NON-NLS-1$ - // - // public static final java.awt.Color DEFAULT_CHART_FOREGROUND = - // java.awt.Color.LIGHT_GRAY; - // public static final java.awt.Color DEFAULt_CHART_BACKGROUND = new - // java.awt.Color( - // 66, 66, 68); - // public static final Color DEFAULT_FOREGROUND = getColor( - // "defaultForeground", new RGB(0, 0, 0)); //$NON-NLS-1$ - // public static final Color DEFAULT_BACKGROUND = getColor( - // "defaultBackground", new RGB(255, 255, 255)); //$NON-NLS-1$ - // public static final Color DEFAULT_RED = getColor( - // "defaultRed", new RGB(173, 13, 1)); //$NON-NLS-1$ - // - // // circular graph - // public static final Color CPU_CIRCULAR_GRAPH_COLOR = getColor( - // "cpu_circular_graph_color", new RGB(2, 171, 208)); //$NON-NLS-1$ - // public static final Color PROCESS_CIRCULAR_GRAPH_COLOR = getColor( - // "process_circular_graph_color", new RGB(114, 203, 8)); //$NON-NLS-1$ - // - // public static final Color PROFILING_GRAPH_COLOR_START = getColor( - // "profiling_graph_color_start", new RGB(145, 190, 3)); //$NON-NLS-1$ - // public static final Color PROFILING_GRAPH_COLOR_END = getColor( - // "profiling_graph_color_end", new RGB(114, 149, 1)); //$NON-NLS-1$ - // - // public static final Color PROFILING_GRAPH_SELECTION_COLOR_START = - // getColor( - // "profiling_graph_selection_color_start", new RGB(255, 135, 82)); //$NON-NLS-1$ - // public static final Color PROFILING_GRAPH_SELECTION_COLOR_END = getColor( - // "profiling_graph_selection_color_end", new RGB(232, 73, 73)); //$NON-NLS-1$ - - private static Color getColor(String colorName, RGB rgb) { - if (!colorRegistry.hasValueFor(colorName)) { - colorRegistry.put(colorName, rgb); - } - - return colorRegistry.get(colorName); - } - -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/helper/FontResources.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/helper/FontResources.java deleted file mode 100644 index 1acea02..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/helper/FontResources.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.helper; - -import org.eclipse.jface.resource.FontRegistry; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Font; -import org.eclipse.swt.graphics.FontData; -import org.eclipse.ui.PlatformUI; - -public class FontResources { - - private static FontRegistry fontRegistry = new FontRegistry(); - - public static final String ARIAL = "Arial"; //$NON-NLS-1$ - private static final Font systemFont = PlatformUI.getWorkbench() - .getDisplay().getSystemFont(); - - public static final Font EX_FONT = getFont("ex_font", //$NON-NLS-1$ - new FontData[] { new FontData(ARIAL, 28, SWT.NORMAL) }); - public static final Font TITLEBAR = getFont("titlebar", resizeSystemFont(10));//$NON-NLS-1$ - - /** device and application combo specific fonts **/ - public static final Font COMBO = getFont("combo", resizeSystemFont(10));//$NON-NLS-1$ - - public static final Font DROPDOWN = getFont("dropdown", resizeSystemFont(10));//$NON-NLS-1$ - - /** table specific fonts **/ - public static final Font TABLE_HEADER = getFont( - "table_header", setSystemFont(SWT.NONE, 8));//$NON-NLS-1$ - public static final Font TABLE_CONTENTS = getFont( - "table_contents", resizeSystemFont(8));//$NON-NLS-1$ - - /** open trace window specific fonts **/ - public static final Font OPEN_TRACE_TITLE = getFont( - "open_trace_title", resizeSystemFont(9));//$NON-NLS-1$ - public static final Font OPEN_TRACE_INNER_TITLE = getFont( - "open_trace_inner_title", resizeSystemFont(8));//$NON-NLS-1$ - public static final Font OPEN_TRACE_BUTTON = getFont("open_trace_button", //$NON-NLS-1$ - resizeSystemFont(9));//$NON-NLS-1$ - public static final Font OPEN_TRACE_TEXT = getFont( - "open_trace_text", resizeSystemFont(8));//$NON-NLS-1$ - - /** about window specific fonts **/ - public static final Font ABOUT_TITLE = getFont( - "about_title", resizeSystemFont(12));//$NON-NLS-1$ - public static final Font ABOUT_TEXT = getFont( - "about_text", resizeSystemFont(9));//$NON-NLS-1$ - - - public static final Font TEST_TEXT = getFont( - "about_text", resizeSystemFont(28));//$NON-NLS-1$ - - /** detail info font **/ - public static final Font DETAIL_INFO_FONT = getFont( - "detail_info_font", resizeSystemFont(9));//$NON-NLS-1$ - - - - public static final Font CATEGORY = getFont("category", resizeSystemFont(8));//$NON-NLS-1$ - - public static final Font TIMER = getFont("timer", resizeSystemFont(12));//$NON-NLS-1$ - - public static final Font TIMER_MSEC = getFont( - "timer_msec", resizeSystemFont(10));//$NON-NLS-1$ - - public static final Font VIEW_TITLE = getFont( - "view_title", resizeSystemFont(10));//$NON-NLS-1$ - - public static final Font TOOLTIP = getFont("tooltip", resizeSystemFont(9));//$NON-NLS-1$ - - public static final Font TABLE_HEADER_FONT = getFont( - "table_header_font", resizeSystemFont(8));//$NON-NLS-1$ - public static final Font TABLE_CELL_FONT = getFont( - "table_cell_font", resizeSystemFont(8));//$NON-NLS-1$ - - public static final Font TIMELINE_FONT = getFont( - "table_font", resizeSystemFont(8));//$NON-NLS-1$ - public static final Font TIMELINE_TICK_FONT = getFont( - "time_tick", resizeSystemFont(7));//$NON-NLS-1$ - - public static final Font CIRCULAR_GRAPH_FONT = getFont( - "circular_graph_font", resizeSystemFont(13));//$NON-NLS-1$ - public static final Font CIRCULAR_GRAPH_MEASURE_FONT = getFont( - "circular_graph_measure_font", resizeSystemFont(9));//$NON-NLS-1$ - public static final Font CIRCULAR_LABEL_FONT = getFont( - "circular_label_font", resizeSystemFont(9));//$NON-NLS-1$ - - public static final Font ADDITEM_BUTTON_FONT = getFont( - "additem_button_font", resizeSystemFont(8));//$NON-NLS-1$ - public static final Font TAB_BUTTON_FONT = getFont( - "tab_button_font", resizeSystemFont(10));//$NON-NLS-1$ - - public static final Font CURRENT_TABLE_HEADER_FONT = getFont( - "current_table_header_font", resizeSystemFont(8));//$NON-NLS-1$ - public static final Font CURRENT_TABLE_CELL_FONT = getFont( - "current_table_cell_font", resizeSystemFont(8));//$NON-NLS-1$ - - public static final Font DIALOG_BUTTON_FONT = getFont( - "dialog_button_font", resizeSystemFont(10));//$NON-NLS-1$ - - public static final Font SCORE_TITLE_FONT = getFont( - "score_title_font", setSystemFont(SWT.BOLD,12));//$NON-NLS-1$ - - public static final Font CHART_ITEM_NAME_FONT = getFont( - "chart_time_name_font", resizeSystemFont(8));//$NON-NLS-1$ - - public static final Font CHART_ARROW_TID_FONT = getFont( - "chart_arrow_tid_font", setSystemFont(SWT.BOLD,7));//$NON-NLS-1$ - - public static Font getFont(String fontName, FontData[] fontData) { - if (!fontRegistry.hasValueFor(fontName)) { - fontRegistry.put(fontName, fontData); - } - - return fontRegistry.get(fontName); - } - - public static FontData[] resizeSystemFont(int size) { - FontData[] fontData = systemFont.getFontData(); - for (int i = 0; i < fontData.length; i++) { - fontData[i].setHeight(size); - } - return fontData; - } - - public static FontData[] setStyleSystemFont(int style) { - FontData[] fontData = systemFont.getFontData(); - for (int i = 0; i < fontData.length; i++) { - fontData[i].setStyle(style); - } - return fontData; - } - - public static FontData[] setSystemFont(int style, int size) { - FontData[] fontData = systemFont.getFontData(); - for (int i = 0; i < fontData.length; i++) { - fontData[i].setStyle(style); - fontData[i].setHeight(size); - } - return fontData; - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/helper/Formatter.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/helper/Formatter.java deleted file mode 100644 index 0218e86..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/helper/Formatter.java +++ /dev/null @@ -1,344 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.helper; - -import java.text.DecimalFormat; - -public class Formatter { - - public static String toHexString(String decimal) { - if (null == decimal || decimal.isEmpty()) { - return null; - } - - try { - if (decimal.isEmpty()) { - return null; - } else { - long data = 0; - data = Long.parseLong(decimal); - return String.format("0x%08X", data); //$NON-NLS-1$ - } - } catch (NumberFormatException e) { - e.printStackTrace(); - return decimal; - } - } - - public static String toDoubleFormat1(String value) { - if (null == value || value.isEmpty()) { - return null; - } - - try { - double data = Double.parseDouble(value); - return String.format("%.1f", data); //$NON-NLS-1$ - } catch (NumberFormatException e) { - e.printStackTrace(); - return value; - } - } - - public static String toByteNumberFormat(String value) { - if (null == value || value.isEmpty()) { - return null; - } - - try { - long num = Long.parseLong(value); - String str = ""; //$NON-NLS-1$ - while (num > 0) { - long n = num % 1000; - if (str.isEmpty()) { - str += Long.toString(n); - } else { - String zero = ""; //$NON-NLS-1$ - if (str.length() == 1) { - zero += "00"; //$NON-NLS-1$ - } else if (str.length() == 2) { - zero += "0"; //$NON-NLS-1$ - } - str = zero + Long.toString(n) + "," + str; //$NON-NLS-1$ - } - num /= 1000; - } - if (str.isEmpty()) { - str += "0"; //$NON-NLS-1$ - } - return str; - } catch (Exception e) { - e.printStackTrace(); - return "0"; //$NON-NLS-1$ - } - } - - public static String toByteToMbNumberFormat2(String value) { - if (null == value || value.isEmpty()) { - return null; - } - try { - long num = Long.parseLong(value); - num /= 1024; // KB - double kb = num / 1024.; - - String str = Formatter.toDoubleFormat2(Double.toString(kb)); - return str; - } catch (Exception e) { - e.printStackTrace(); - return "0"; //$NON-NLS-1$ - } - } - - public static String toDoubleFormat2(String value) { - if (null == value || value.isEmpty()) { - return null; - } - - try { - double data = Double.parseDouble(value); - return String.format("%.2f", data); //$NON-NLS-1$ - } catch (NumberFormatException e) { - e.printStackTrace(); - return value; - } - } - - public static String toTimeFormat(String time) { - long longTime = Long.parseLong(time); - longTime /= 1000; - long ms = longTime % 1000; - longTime /= 1000; - long second = longTime % 60; - longTime /= 60; - long minute = longTime % 60; - String strMinute = Long.toString(minute); - if (strMinute.length() < 2) { - strMinute = "0" + strMinute; //$NON-NLS-1$ - } - - String strSecond = Long.toString(second); - if (strSecond.length() < 2) { - strSecond = "0" + strSecond; //$NON-NLS-1$ - } - - String strMs = Long.toString(ms); - if (strMs.length() == 2) { - strMs = "0" + strMs; //$NON-NLS-1$ - } else if (strMs.length() == 1) { - strMs = "00" + strMs; //$NON-NLS-1$ - } - - String output = strMinute + ":" + strSecond + ":" + strMs; //$NON-NLS-1$ //$NON-NLS-2$ - return output; - } - - public static String toTimeFormat2(String msTime) { - long longTime = Long.parseLong(msTime); - long ms = longTime % 1000; - longTime /= 1000; - long second = longTime % 60; - - String strSecond = Long.toString(second); - if (strSecond.length() < 2) { - strSecond = "0" + strSecond; //$NON-NLS-1$ - } - - String strMs = Long.toString(ms); - if (strMs.length() == 2) { - strMs = "0" + strMs; //$NON-NLS-1$ - } else if (strMs.length() == 1) { - strMs = "00" + strMs; //$NON-NLS-1$ - } - - String output = strSecond + ":" + strMs; //$NON-NLS-1$ - return output; - } - - public static String toTimelineFormat(int totalSecond){ - String output; - - int second = totalSecond % 60; - int minute = totalSecond / 60; - - if(minute > 60){ - int hours = minute/60; - output = String.format("%d:%02d:%02d", hours, minute%60, second); - } - else{ - output = String.format("%02d:%02d", minute,second); - } - return output; - } - - public static String toPercentageFormat(Double input) { - String ret = String.format("%.2f", input); //$NON-NLS-1$ - ret += " %"; //$NON-NLS-1$ - return ret; - } - - public static String toNumberFormat(long input) { - int reminder = 0; - long quotient = input; - String output = ""; //$NON-NLS-1$ - - while (true) { - reminder = (int) (quotient % 1000); - quotient = quotient / 1000; - String value = Integer.toString(reminder); - if (quotient > 0) { - if (value.length() < 2) { - value = "00" + value; //$NON-NLS-1$ - } else if (value.length() < 3) { - value = "0" + value; //$NON-NLS-1$ - } - output = value + output; - output = "," + output; //$NON-NLS-1$ - } else { - output = value + output; - break; - } - } - return output; - } - - public static String toNumberFormat(double input) { - return toNumberFormat((long) input); - } - - public static String toByteFormat(long input) { - int reminder = 0; - long quotient = input; - int count = 0; - String value = ""; //$NON-NLS-1$ - - while (true) { - if (quotient >= 1024) { - reminder = (int) (quotient % 1024); - quotient = quotient / 1024; - count++; - continue; - } else { - value = Long.toString(quotient); - String remStr = Integer.toString(reminder); - if (count > 0) { - if (remStr.length() < 3) { - value += ".0"; //$NON-NLS-1$ - } else { - value += "." + remStr.substring(0, 1); //$NON-NLS-1$ - } - } - value += " " + getMeasure(count); //$NON-NLS-1$ - break; - } - } - return value; - } - - public static String toByteFormat(double input) { - return toByteFormat((long) input); - } - - public static String toBpsFormat(long nByte, long startTime, long endTime) { - String value = ""; //$NON-NLS-1$ - DecimalFormat df1 = new DecimalFormat("#,##0.00"); //$NON-NLS-1$ - double Bps = nByte; - - if (endTime - startTime >= 1000000) { - Bps = ((double) nByte * ((double) 1000000 / (double) (endTime - startTime))); - } - - value += df1.format(Bps) + " Bps"; //$NON-NLS-1$ - return value; - } - - public static String toBpsFormat(double nByte, long startTime, long endTime) { - return toBpsFormat((long) nByte, startTime, endTime); - } - - private static String getMeasure(int count) { - if (count == 4) { - return "TB"; //$NON-NLS-1$ - } else if (count == 3) { - return "GB"; //$NON-NLS-1$ - } else if (count == 2) { - return "MB"; //$NON-NLS-1$ - } else if (count == 1) { - return "KB"; //$NON-NLS-1$ - } else { - return "Byte"; //$NON-NLS-1$ - } - } - - // only return value - public static String toByteFormatValue(long input) { - int reminder = 0; - long quotient = input; - int count = 0; - String value = ""; //$NON-NLS-1$ - - while (true) { - if (quotient >= 1024) { - reminder = (int) (quotient % 1024); - quotient = quotient / 1024; - count++; - continue; - } else { - value = Long.toString(quotient); - String remStr = Integer.toString(reminder); - if (count > 0) { - if (remStr.length() < 3) { - value += ".0"; //$NON-NLS-1$ - } else { - value += "." + remStr.substring(0, 1); //$NON-NLS-1$ - } - } - // value += " " + getMeasure(count); //$NON-NLS-1$ - break; - } - } - return value; - } - - // only return measure - public static String toByteFormatMeasure(long input) { - long quotient = input; - int count = 0; - String value = null; - - while (true) { - if (quotient >= 1024) { - quotient = quotient / 1024; - count++; - continue; - } else { - value = getMeasure(count); //$NON-NLS-1$ - break; - } - } - return value; - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/helper/ImageResources.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/helper/ImageResources.java deleted file mode 100644 index ffa3ef1..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/helper/ImageResources.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.helper; - -import java.io.File; -import java.io.InputStream; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.jface.resource.ImageRegistry; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.ImageData; - -public class ImageResources { - private static ImageRegistry imageRegistry = new ImageRegistry(); - - // Dialog button - public static final Image DIALOG_PUSH = getPngImage("dialog_button_push"); //$NON-NLS-1$ - - public static final Image ABOUT = getPngImage("toolbar_about_nor"); //$NON-NLS-1$ - public static final Image ABOUT_PUSH = getPngImage("toolbar_about_push"); //$NON-NLS-1$ - public static final Image ABOUT_HOVER = getPngImage("toolbar_about_hover"); //$NON-NLS-1$ - public static final Image ABOUT_DISABLE = getPngImage("toolbar_about_disable"); //$NON-NLS-1$ - - public static final Image VIEW_SOURCE = getPngImage("toolbar_source_view_nor"); //$NON-NLS-1$ - public static final Image VIEW_SOURCE_PUSH = getPngImage("toolbar_source_view_push"); //$NON-NLS-1$ - public static final Image VIEW_SOURCE_HOVER = getPngImage("toolbar_source_view_hover"); //$NON-NLS-1$ - public static final Image VIEW_SOURCE_TOGGLE = getPngImage("toolbar_source_view_tog"); //$NON-NLS-1$ - public static final Image VIEW_SOURCE_DISABLE = getPngImage("toolbar_source_view_disable"); //$NON-NLS-1$ - - /* combo */ - public static final Image COMBO_DROPDOWN_UP = getPngImage("dropdown_up"); //$NON-NLS-1$ - public static final Image COMBO_DROPDOWN_DOWN = getPngImage("dropdown_down"); //$NON-NLS-1$ - /* snapshot */ - public static final Image SNAPSHOT_LEFT_NORMAL = getPngImage("snapshot_arrow_left_nor"); //$NON-NLS-1$ - public static final Image SNAPSHOT_LEFT_PUSH = getPngImage("snapshot_arrow_left_push"); //$NON-NLS-1$ - public static final Image SNAPSHOT_LEFT_HOVER = getPngImage("snapshot_arrow_left_hover"); //$NON-NLS-1$ - public static final Image SNAPSHOT_LEFT_DISABLE = getPngImage("snapshot_arrow_left_disable"); //$NON-NLS-1$ - public static final Image SNAPSHOT_RIGHT_NORMAL = getPngImage("snapshot_arrow_right_nor"); //$NON-NLS-1$ - public static final Image SNAPSHOT_RIGHT_PUSH = getPngImage("snapshot_arrow_right_push"); //$NON-NLS-1$ - public static final Image SNAPSHOT_RIGHT_HOVER = getPngImage("snapshot_arrow_right_hover"); //$NON-NLS-1$ - public static final Image SNAPSHOT_RIGHT_DISABLE = getPngImage("snapshot_arrow_right_disable"); //$NON-NLS-1$ - - public static final Image TIMER = getPngImage("toolbar_time_bg"); //$NON-NLS-1$ - - public static final Image NO_IMAGE = getPngImage("noImage"); //$NON-NLS-1$ - - /* chart */ - public static final Image CHART_EVENT_CALLEE_ARW = getPngImage("event_callee_arw"); //$NON-NLS-1$ - public static final Image CHART_BG_SELECT = getPngImage("timeline_right_bg_selected"); //$NON-NLS-1$ - public static final Image CHART_NAME_BG_NORMAL = getPngImage("timeline_left_bg_normal"); //$NON-NLS-1$ - public static final Image CHART_NAME_BG_SELECT = getPngImage("timeline_left_bg_selected"); //$NON-NLS-1$ - public static final Image CHART_NAME_CHILD_BG_NORMAL = getPngImage("timeline_left_child_bg_normal"); //$NON-NLS-1$ - public static final Image CHART_NAME_CHILD_BG_SELECT = getPngImage("timeline_left_child_bg_selected"); //$NON-NLS-1$ - - /*** scale ***/ - public static final Image SCALE_CONTROL_MINUS = getPngImage("scale_control_minus"); //$NON-NLS-1$ - public static final Image SCALE_CONTROL_PLUS = getPngImage("scale_control_plus"); //$NON-NLS-1$ - public static final Image SCALE_CONTROL_THUMB = getPngImage("scale_control_thumb"); //$NON-NLS-1$ - - /*** tree fold***/ - public static final Image TREE_FOLD = getPngImage("tree_fold"); //$NON-NLS-1$ - public static final Image TREE_OPEN = getPngImage("tree_open"); //$NON-NLS-1$ - - private static Image getImage(String folderName, String imageName, - String extension) { -// if (null == imageRegistry.get(imageName) -// || imageRegistry.get(imageName).isDisposed()) { -// -// // next 3line using in plugin -//// ImageDescriptor desc = -//// AbstractUIPlugin.imageDescriptorFromPlugin( -//// Activator.PLUGIN_ID, folderName + imageName + extension); -// -// /*** enable when test execution! **/ -// String strUrl = "file:" + folderName + imageName + extension; -// URL url = null; -// try { -// url = new URL(strUrl); -// } catch (MalformedURLException e) { -// // TODO Auto-generated catch block -// e.printStackTrace(); -// } -// ImageDescriptor desc = ImageDescriptor.createFromURL(url); -// imageRegistry.put(imageName, desc); -// } -// -// return imageRegistry.get(imageName); - if (null == imageRegistry.get(imageName) - || imageRegistry.get(imageName).isDisposed()) { - - String path = "/Images/" + imageName + ".png"; - InputStream stream = ImageResources.class.getResourceAsStream(path); - ImageData imageData = new ImageData(stream); - ImageDescriptor desc = ImageDescriptor.createFromImageData(imageData); - imageRegistry.put(imageName, desc); - } - return imageRegistry.get(imageName); - } - - private static Image getImage(String imageName, String extension) { - return getImage("Images" + File.separator, imageName, extension); - } - - private static Image getPngImage(String imageName) { - return getImage(imageName, ".png"); - } - - @SuppressWarnings("unused") - private static Image getWidgetImage(String imageName){ - if (null == imageRegistry.get(imageName) - || imageRegistry.get(imageName).isDisposed()) { - - String path = "/Images/" + imageName + ".png"; - InputStream stream = ImageResources.class.getResourceAsStream(path); - ImageData imageData = new ImageData(stream); - ImageDescriptor desc = ImageDescriptor.createFromImageData(imageData); - imageRegistry.put(imageName, desc); - } - return imageRegistry.get(imageName); - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/scale/DACustomScaleRenderer.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/scale/DACustomScaleRenderer.java deleted file mode 100644 index 9eb4495..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/scale/DACustomScaleRenderer.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.scale; - -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.widgets.Canvas; -import org.tizen.dynamicanalyzer.widgets.helper.ColorResources; - -public class DACustomScaleRenderer extends DAScaleDefaultRenderer { - - @Override - public void draw(GC gc, Canvas canvas, DAScaleAttribute attr) { - Rectangle rect = canvas.getClientArea(); - gc.setBackground(ColorResources.PURPLE); - gc.fillRectangle(rect); - - if (null != attr.getLeftImage() && null != attr.getRightImage()) { - gc.drawImage(attr.getLeftImage(), attr.getLeftRect().x, - attr.getLeftRect().y); - gc.drawImage(attr.getRightImage(), attr.getRightRect().x, - attr.getRightRect().y); - } else { - gc.setBackground(ColorResources.BLUE); - gc.fillRectangle(attr.getLeftRect()); - gc.fillRectangle(attr.getRightRect()); - } - - gc.setBackground(ColorResources.BLACK); - gc.fillRectangle(attr.getAreaRect()); - - if (null != attr.getThumbImage()) { - gc.drawImage(attr.getThumbImage(), attr.getThumbRect().x, - attr.getThumbRect().y); - } else { - gc.setBackground(ColorResources.RED); - gc.fillOval(attr.getThumbRect().x, attr.getThumbRect().y, - attr.getThumbRect().width, attr.getThumbRect().height); - } - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/scale/DAScale.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/scale/DAScale.java deleted file mode 100644 index ee8e3d5..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/scale/DAScale.java +++ /dev/null @@ -1,402 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.scale; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ControlEvent; -import org.eclipse.swt.events.ControlListener; -import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.widgets.Canvas; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; - -public class DAScale extends Canvas { - - private static final int LEFT_AREA_WIDTH = 20; - private static final int RIGHT_AREA_WIDTH = 20; - private static final int LEFT_MARGIN = 3; - private static final int RIGHT_MARGIN = 3; - // private static final int TOP_MARGIN = 10; - // private static final int BOTTOM_MARGIN = 10; - private static final int DEFAULT_AREA_HEIGHT = 6; - private static final int THUMB_AREA_START = LEFT_AREA_WIDTH + LEFT_MARGIN; - - private static final int THUMB_HEIGHT = 14; - private static final int THUMB_WIDTH = 14; - - private DAScaleAttribute attr; - private DAScaleDefaultRenderer renderer; - private DAScaleSelectionListener selectionListener = null; - - private List selectPositions = null; - private int selection = 0; - - private int increment; - private int pageIncrement; - private int maxValue; - private int minValue; - - private int areaWidth = 0; - private int areaHeight = 0; - - private boolean mouseDown = false; - - private Rectangle thumbRect = null; - private Rectangle areaRect= null; - private Rectangle leftRect= null; - private Rectangle rightRect= null; - - public DAScale(Composite parent, int style) { - super(parent, style); - increment = 1; - pageIncrement = 1; - maxValue = 2; - minValue = 0; - attr = new DAScaleAttribute(); - renderer = new DACustomScaleRenderer(); - selectPositions = new ArrayList(); - - addListener(SWT.MouseDown, mouseListener); - addListener(SWT.MouseUp, mouseListener); - addListener(SWT.MouseMove, mouseListener); - - addPaintListener(paintListener); - addControlListener(controlListener); - } - - public void setIncrement(int increment) { - this.increment = increment; - } - - public int getIncrement() { - return increment; - } - - public void setPageIncrement(int increment) { - this.pageIncrement = increment; - } - - public int getPageIncrement() { - return pageIncrement; - } - - public void setMaximum(int max) { - maxValue = max; - } - - public int getMaximum() { - return maxValue; - } - - public void setMinimum(int min) { - minValue = min; - } - - public int getMinimum() { - return minValue; - } - - public int getSelection() { - int tick = getTickTize(); - - int thumbX = thumbRect.x + THUMB_WIDTH / 2; - int width = thumbX - areaRect.x; - - if (width == 0) { - return minValue; - } else if (areaRect.width == width) { - return maxValue; - } - - else { - int quotient = width / tick; - int reminder = width % tick; - int result = 0; - - if (reminder == 0) { - result = quotient + minValue; - } else { - result = quotient + minValue + 1; - } - return result; - } - } - - public void setLeftImage(Image left) { - attr.setLeftImage(left); - } - - public void setRightImage(Image right) { - attr.setRightImage(right); - } - - public void setThumbImage(Image thumb) { - attr.setThumbImage(thumb); - } - - public void setSelection(int selection) { - if (selection > maxValue) { - selection = maxValue; - } else if (selection < minValue) { - selection = minValue; - } - this.selection = selection - minValue; - int thumbPos = selectPositions.get(this.selection); - thumbRect = getThumbRect(thumbPos); - redraw(); - } - - public void addSelectionListener(DAScaleSelectionListener listener) { - if (null == listener) { - return; - } - selectionListener = listener; - } - - public void setRenderer(DAScaleDefaultRenderer renderer) { - this.renderer = renderer; - } - - private boolean pointInRect(Rectangle rect, Point p) { - if ((p.x > rect.x) && (p.x > rect.y) && (p.x < rect.x + rect.width) - && (p.y < rect.y + rect.height)) { - return true; - } - return false; - } - - private Rectangle getThumbRect(int pointX) { - - int thumbHeight = THUMB_HEIGHT; - int thumbWidth = THUMB_WIDTH; - - if (null != attr.getThumbImage()) { - Rectangle thumbImageRect = attr.getThumbImage().getBounds(); - thumbHeight = thumbImageRect.height; - thumbWidth = thumbImageRect.width; - } - - if (pointX < areaRect.x) { - pointX = areaRect.x; - } else if (pointX > areaRect.x + areaRect.width) { - pointX = areaRect.x + areaRect.width; - } - int y = areaRect.y - (thumbHeight - areaRect.height) / 2; - int x = pointX - thumbWidth / 2; - return new Rectangle(x, y, thumbWidth, thumbHeight); - } - - private void setSelectionInternal(int pointX) { - if (pointX <= areaRect.x) { - selection = 0; - } else if (pointX >= areaRect.x + areaRect.width) { - selection = maxValue - minValue; - } else { - int tick = getTickTize(); - - int width = pointX - areaRect.x; - - int quotient = width / tick; - int reminder = width % tick; - - if (reminder == 0) { - selection = quotient; - } else { - selection = quotient + 1; - } - } - } - - private int getScaleSize() { - return maxValue - minValue - 1; - } - - private int getTickTize() { - return areaRect.width / getScaleSize(); - } - - private void increaseSelection() { - if (selection < maxValue - minValue) { - selection += 1; - } - } - - private void decreaseSelection() { - if (selection > 0) { - selection -= 1; - } - } - - /*** listeners ***/ - private Listener mouseListener = new Listener() { - - @Override - public void handleEvent(Event event) { - if (event.type == SWT.MouseDown) { - if (pointInRect(thumbRect, new Point(event.x, event.y))) { - mouseDown = true; - } else if ((event.x >= areaRect.x) - && (event.x <= areaRect.x + areaRect.width)) { - int thumbX = thumbRect.x + THUMB_WIDTH / 2; - if (event.x < thumbX) { - decreaseSelection(); - } else { - increaseSelection(); - } - int delta = selectPositions.get(selection); - thumbRect = getThumbRect(delta); - redraw(); - } - } - - if (event.type == SWT.MouseUp) { - mouseDown = false; - - if (pointInRect(leftRect, new Point(event.x, event.y))) { - decreaseSelection(); - int delta = selectPositions.get(selection); - thumbRect = getThumbRect(delta); - redraw(); - } - - if (pointInRect(rightRect, new Point(event.x, event.y))) { - increaseSelection(); - int delta = selectPositions.get(selection); - thumbRect = getThumbRect(delta); - redraw(); - } - } - - if (event.type == SWT.MouseMove) { - if (mouseDown) { - setSelectionInternal(event.x); - thumbRect = getThumbRect(event.x); -// mouseX = event.x; - redraw(); - } - } - if (null != selectionListener) { - selectionListener.widgetSelected(); - } - } - }; - - private PaintListener paintListener = new PaintListener() { - - @Override - public void paintControl(PaintEvent e) { - attr.setAreaRect(areaRect); - attr.setLeftRect(leftRect); - attr.setRightRect(rightRect); - attr.setThumbRect(thumbRect); - renderer.draw(e.gc, (Canvas) e.widget, attr); - } - }; - - private ControlListener controlListener = new ControlListener() { - - @Override - public void controlResized(ControlEvent e) { - Canvas canvas = (Canvas) e.widget; - Rectangle rect = canvas.getClientArea(); - - if ((null != attr.getLeftImage()) - && ((null != attr.getRightImage()))) { - leftRect = attr.getLeftImage().getBounds(); - if (leftRect.height < rect.height) { - leftRect.y += (rect.height - leftRect.height) / 2; - } - - if (leftRect.width < LEFT_AREA_WIDTH) { - leftRect.x += (LEFT_AREA_WIDTH - leftRect.width) / 2; - } - rightRect = attr.getRightImage().getBounds(); - - if (rightRect.height < rect.height) { - rightRect.y += (rect.height - rightRect.height) / 2; - } - - if (rightRect.width < RIGHT_AREA_WIDTH) { - rightRect.x += (RIGHT_AREA_WIDTH - rightRect.width) / 2; - } - - rightRect = new Rectangle( - rect.x + rect.width - rightRect.width, rightRect.y, - rightRect.width, rightRect.height); - } else { - leftRect = new Rectangle(rect.x, rect.y, LEFT_AREA_WIDTH, - rect.height); - rightRect = new Rectangle(rect.x + rect.width - - RIGHT_AREA_WIDTH, rect.y, RIGHT_AREA_WIDTH, - rect.height); - } - areaWidth = rect.width - - (leftRect.width + LEFT_MARGIN + rightRect.width + RIGHT_MARGIN); - areaHeight = DEFAULT_AREA_HEIGHT; - int areaY = rect.y + (rect.height - areaHeight) / 2; - areaRect = new Rectangle(rect.x + THUMB_AREA_START, areaY, - areaWidth, areaHeight); - - if (thumbRect == null) { - thumbRect = getThumbRect(areaRect.x); - } - - initSelectPosition(); - } - - @Override - public void controlMoved(ControlEvent e) { - // TODO Auto-generated method stub - - } - }; - - private void initSelectPosition() { - selectPositions.clear(); - int size = maxValue - minValue + 1; - int tickSize = getTickTize(); - - for (int i = 0; i < size; i++) { - if (i == 0) { - selectPositions.add(areaRect.x); - } else if (i == (size - 1)) { - selectPositions.add(areaRect.x + areaRect.width); - } else { - int pos = tickSize * (i - 1) + tickSize / 2 + areaRect.x; - selectPositions.add(pos); - } - } - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/scale/DAScaleAttribute.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/scale/DAScaleAttribute.java deleted file mode 100644 index f21d018..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/scale/DAScaleAttribute.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.scale; - -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Rectangle; - -public class DAScaleAttribute { - private Image leftImage = null; - private Image rightImage = null; - private Image thumbImage = null; - - private Rectangle thumbRect = null; - private Rectangle areaRect = null; - private Rectangle leftRect = null; - private Rectangle rightRect = null; - - public Rectangle getThumbRect() { - return thumbRect; - } - - public void setThumbRect(Rectangle thumbRect) { - this.thumbRect = thumbRect; - } - - public Rectangle getAreaRect() { - return areaRect; - } - - public void setAreaRect(Rectangle areaRect) { - this.areaRect = areaRect; - } - - public Rectangle getLeftRect() { - return leftRect; - } - - public void setLeftRect(Rectangle leftRect) { - this.leftRect = leftRect; - } - - public Rectangle getRightRect() { - return rightRect; - } - - public void setRightRect(Rectangle rightRect) { - this.rightRect = rightRect; - } - - public Image getLeftImage() { - return leftImage; - } - - public void setLeftImage(Image leftImage) { - this.leftImage = leftImage; - } - - public Image getRightImage() { - return rightImage; - } - - public void setRightImage(Image rightImage) { - this.rightImage = rightImage; - } - - public Image getThumbImage() { - return thumbImage; - } - - public void setThumbImage(Image thumbImage) { - this.thumbImage = thumbImage; - } - -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/scale/DAScaleDefaultRenderer.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/scale/DAScaleDefaultRenderer.java deleted file mode 100644 index 9d80aeb..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/scale/DAScaleDefaultRenderer.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.scale; - -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.widgets.Canvas; - -public abstract class DAScaleDefaultRenderer { - public abstract void draw(GC gc, Canvas canvas, DAScaleAttribute attr); -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/scale/DAScaleSelectionListener.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/scale/DAScaleSelectionListener.java deleted file mode 100644 index 2650238..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/scale/DAScaleSelectionListener.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.scale; - -public abstract class DAScaleSelectionListener { - public abstract void widgetSelected(); -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/test/TestClass.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/test/TestClass.java deleted file mode 100644 index 21005fd..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/test/TestClass.java +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.test; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.layout.FormAttachment; -import org.eclipse.swt.layout.FormData; -import org.eclipse.swt.layout.FormLayout; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; -import org.tizen.dynamicanalyzer.widgets.button.DACustomButton; -import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener; -import org.tizen.dynamicanalyzer.widgets.button.toggle.DACustomToggleButton; -import org.tizen.dynamicanalyzer.widgets.combo.DACustomCombo; -import org.tizen.dynamicanalyzer.widgets.combo.DACustomComboSelectionListener; -import org.tizen.dynamicanalyzer.widgets.graph.bar.FourBarGraph; -import org.tizen.dynamicanalyzer.widgets.graph.bar.SingleBar; -import org.tizen.dynamicanalyzer.widgets.graph.circular.CircularGraph; -import org.tizen.dynamicanalyzer.widgets.helper.ColorResources; -import org.tizen.dynamicanalyzer.widgets.helper.ImageResources; -import org.tizen.dynamicanalyzer.widgets.scale.DAScale; -import org.tizen.dynamicanalyzer.widgets.scale.DAScaleSelectionListener; -import org.tizen.dynamicanalyzer.widgets.timer.TimerClock; - -public class TestClass { - public static void main(String[] args) { - Display display = new Display(); - Shell shell = new Shell(display); - - shell.setSize(new Point(1000, 1000)); - - shell.setLayout(new FormLayout()); - shell.open(); - DACustomButton button = new DACustomButton(shell, SWT.NONE); - button.setText("test"); - FormData data = new FormData(); - data.top = new FormAttachment(5, 0); - data.left = new FormAttachment(10, 0); - data.width = 200; - data.height = 50; - button.setLayoutData(data); - - button.addClickListener(new DACustomButtonClickEventListener() { - - @Override - public void handleClickEvent(DACustomButton button) { - System.out.println("button test"); - } - }); - - DACustomButton imgButton = new DACustomButton(shell, - ImageResources.ABOUT, ImageResources.ABOUT_PUSH, - ImageResources.ABOUT_HOVER, ImageResources.ABOUT_DISABLE); - imgButton.setText("test2"); - data = new FormData(); - data.top = new FormAttachment(button, 10); - data.left = new FormAttachment(10, 0); - data.width = 200; - data.height = 50; - imgButton.setLayoutData(data); - - DACustomToggleButton toggle = new DACustomToggleButton(shell, SWT.NONE); - toggle.setText("toggle"); - data = new FormData(); - data.top = new FormAttachment(imgButton, 10); - data.left = new FormAttachment(10, 0); - data.width = 200; - data.height = 50; - toggle.setLayoutData(data); - - DACustomToggleButton imgToggle = new DACustomToggleButton(shell, - ImageResources.VIEW_SOURCE, ImageResources.VIEW_SOURCE_PUSH, - ImageResources.VIEW_SOURCE_HOVER, - ImageResources.VIEW_SOURCE_DISABLE, - ImageResources.VIEW_SOURCE_TOGGLE, - ImageResources.VIEW_SOURCE_HOVER); - imgToggle.setText("toggle"); - data = new FormData(); - data.top = new FormAttachment(toggle, 10); - data.left = new FormAttachment(10, 0); - data.width = 200; - data.height = 50; - imgToggle.setLayoutData(data); - - DACustomCombo combo = new DACustomCombo(shell, SWT.NONE); - for (int i = 0; i < 29; i++) { - combo.add("test " + i); - } - data = new FormData(); - data.top = new FormAttachment(imgToggle, 10); - data.left = new FormAttachment(10, 0); - data.width = 200; - data.height = 50; - combo.setLayoutData(data); - - CircularGraph circle = new CircularGraph(shell, SWT.NONE, - CircularGraph.TYPE_PERCENT); - data = new FormData(); - data.top = new FormAttachment(combo, 10); - data.left = new FormAttachment(10, 0); - data.width = 200; - data.height = 100; - circle.setLayoutData(data); - circle.setMax(100); - circle.update(50); - circle.setTextColor(ColorResources.BLACK); - circle.setText("circlular graph test"); - - SingleBar bar = new SingleBar(shell, SWT.NONE); - data = new FormData(); - data.top = new FormAttachment(circle, 10); - data.left = new FormAttachment(10, 0); - data.width = 20; - data.height = 80; - bar.setLayoutData(data); - - bar.setMaxSize(100); - bar.setCurrentSize(45); - - FourBarGraph fbar = new FourBarGraph(shell, SWT.NONE, - FourBarGraph.TYPE_PERCENT); - data = new FormData(); - data.top = new FormAttachment(bar, 10); - data.left = new FormAttachment(10, 0); - data.width = 100; - data.height = 100; - fbar.setLayoutData(data); - - fbar.setMaxSize(100); - fbar.setText("CALL"); - List testdata = new ArrayList(); - testdata.add((long) 55); - testdata.add((long) 72); - testdata.add((long) 41); - testdata.add((long) 87); - fbar.setCurrentValue(testdata); - fbar.setTextColor(ColorResources.RED); - fbar.setBgColor(ColorResources.WHITE); - - TimerClock clock = new TimerClock(shell, SWT.NONE); - data = new FormData(); - data.top = new FormAttachment(fbar, 10); - data.left = new FormAttachment(10, 0); - data.width = 140; - data.height = 25; - clock.setLayoutData(data); - - clock.start(); - - DAScale scale = new DAScale(shell, SWT.NONE); - data = new FormData(); - data.top = new FormAttachment(clock, 10); - data.left = new FormAttachment(10, 0); - data.width = 140; - data.height = 20; - scale.setLayoutData(data); - scale.setMaximum(10); - scale.setMinimum(5); - scale.addSelectionListener(new DAScaleSelectionListener() { - - @Override - public void widgetSelected() { - System.out.println("test selection listener"); - - } - }); - - - DACustomComboSelectionListener comboSelectionListener = new DACustomComboSelectionListener() { - @Override - public void selectionEvent(DACustomCombo combo) { - System.out.println("combo selected :" + combo.getText()); - } - }; - - combo.addSelectionListener(comboSelectionListener); - - while (!shell.isDisposed()) { - if (!display.readAndDispatch()) - display.sleep(); - } - clock.stop(); - display.dispose(); - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/timeline/DACustomTimeline.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/timeline/DACustomTimeline.java deleted file mode 100644 index e33270c..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/timeline/DACustomTimeline.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.timeline; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; -import org.eclipse.swt.widgets.Canvas; -import org.eclipse.swt.widgets.Composite; - -public class DACustomTimeline extends Canvas { - public final static int SCALE_100 = 1; - public final static int SCALE_400 = 4; - public final static int SCALE_800 = 8; - private double startTime = 0; - private int scale = SCALE_100; - private DACustomTimelineRenderer timelineRenderer = new DACustomTimelineRenderer(); - - public DACustomTimeline(Composite parent) { - super(parent, SWT.NONE); - this.addPaintListener(chartPaintListener); - } - - public double getStartTime() { - return startTime; - } - - public void setStartTime(double startTime) { - this.startTime = startTime; - } - - public int getScale() { - return scale; - } - - public void setScale(int scale) { - this.scale = scale; - } - - private PaintListener chartPaintListener = new PaintListener() { - - @Override - public void paintControl(PaintEvent e) { - timelineRenderer.draw(e.gc, (DACustomTimeline) e.widget); - } - }; -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/timeline/DACustomTimelineRenderer.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/timeline/DACustomTimelineRenderer.java deleted file mode 100644 index 0a21cd6..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/timeline/DACustomTimelineRenderer.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.timeline; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Font; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.widgets.Display; -import org.tizen.dynamicanalyzer.widgets.helper.ColorResources; -import org.tizen.dynamicanalyzer.widgets.helper.Formatter; - -public class DACustomTimelineRenderer { - public static final int DEFAULT_FONT_SIZE = 6; - public static final int DEFAULT_INTERVAL = 5; - private int startTime; - int scale; - Font font = new Font(Display.getCurrent(), "Verdana", // FIXME - DEFAULT_FONT_SIZE, SWT.NORMAL); - - private void drawTimeString(GC gc, int totalSecond, int pixcelX, int pixcelY) { - Point p; - String timeString = Formatter.toTimelineFormat(totalSecond); - - p = gc.textExtent(timeString, SWT.DRAW_MNEMONIC); - gc.setForeground(ColorResources.TIMELINE_NUMBER_COLOR); - gc.drawText(timeString, pixcelX - p.x / 2, pixcelY, true); - gc.setForeground(ColorResources.TIMELINE_TICK_COLOR); - } - - public void draw(GC gc, DACustomTimeline timeline) { - Rectangle rt = timeline.getClientArea(); - gc.setFont(font); - gc.setBackground(ColorResources.TIMELINE_BG_COLOR); - gc.fillRectangle(rt); - - // draw underLine - gc.drawLine(0, rt.height - 1, rt.width, rt.height - 1); - - // draw time - int pixcelX = 0; - scale = timeline.getScale(); - int secondInterval = scale * DEFAULT_INTERVAL; - startTime = (int) timeline.getStartTime(); - pixcelX -= (timeline.getStartTime() - (double) startTime) - * ((double) secondInterval); - - for (; pixcelX < rt.width; startTime++, pixcelX += secondInterval) { - if (startTime % 10 == 0) { - drawTimeString(gc, startTime, pixcelX, 1); - gc.drawLine(pixcelX, rt.height - 7, pixcelX, rt.height - 1); - } else if (startTime % 5 == 0) { - if (scale >= DACustomTimeline.SCALE_400) { - drawTimeString(gc, startTime, pixcelX, 1); - } - gc.drawLine(pixcelX, rt.height - 5, pixcelX, rt.height - 1); - } else { - if (scale >= DACustomTimeline.SCALE_800) { - drawTimeString(gc, startTime, pixcelX, 1); - } - gc.drawLine(pixcelX, rt.height - 3, pixcelX, rt.height - 1); - } - - } - } -} diff --git a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/timer/TimerClock.java b/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/timer/TimerClock.java deleted file mode 100755 index 259b337..0000000 --- a/org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/timer/TimerClock.java +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.widgets.timer; - -import java.util.Date; -import java.util.Timer; -import java.util.TimerTask; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.Font; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.widgets.Canvas; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Display; -import org.tizen.dynamicanalyzer.widgets.helper.ColorResources; - -public class TimerClock extends Canvas { - - private class TimeString { - public String hour; - public String hour2; - public String min; - public String min2; - public String sec; - public String sec2; - } - - private static final int HOUR_TIME_X = 29; - private static final int COLON_X = 52; - private static final int MIN_TIME_X = 59; - private static final int COLON_X2 = 82; - private static final int SEC_TIME_X = 89; - private static final int TIME_WIDTH = 11; - private static final int HOUR = 3600000; - private static final int MIN = 60000; - private static final int SEC = 1000; - private static final int TWO_DIGIT = 10; - private static final int TIMER_PERIOD = 1000; - private static final String ZERO = "0"; - - private Timer timer; - private long startTime; - private long time; - - private Image bgImage = null; - private Font clockFont = null; - private Color fontColor = null; - - private Canvas me = null; - - public TimerClock(Composite parent, int style) { - super(parent, style); - me = this; - addPaintListener(paintListener); - setBackground(ColorResources.RED); - } - - private PaintListener paintListener = new PaintListener() { - - @Override - public void paintControl(PaintEvent e) { - GC gc = e.gc; - Rectangle myRect = me.getClientArea(); - - if (bgImage != null) { - myRect = me.getClientArea(); - gc.drawImage(bgImage, myRect.x, myRect.y); - } else { - gc.setBackground(ColorResources.BLUE); - gc.fillRectangle(myRect); - } - - TimeString timeString = getTimeString(time); - if (null != clockFont) { - gc.setFont(clockFont); - } - if (null != fontColor) { - gc.setForeground(fontColor); - } else { - gc.setForeground(ColorResources.WHITE); - } - Point p = gc.textExtent(timeString.hour, SWT.DRAW_MNEMONIC); - - int y = (myRect.height - p.y) / 2; - // Draws hour text. - gc.drawText(timeString.hour, HOUR_TIME_X, y, true); - gc.drawText(timeString.hour2, HOUR_TIME_X + TIME_WIDTH, y, true); - - gc.drawText(":", COLON_X, y, true); - - // Draws minute text. - gc.drawText(timeString.min, MIN_TIME_X, y, true); - gc.drawText(timeString.min2, MIN_TIME_X + TIME_WIDTH, y, true); - - gc.drawText(":", COLON_X2, y, true); - - // Draws second text. - gc.drawText(timeString.sec, SEC_TIME_X, y, true); - gc.drawText(timeString.sec2, SEC_TIME_X + TIME_WIDTH, y, true); - } - }; - - private TimeString getTimeString(long time) { - long hour = time / HOUR; - long min = (time - (hour * HOUR)) / MIN; - long sec = (time - (hour * HOUR) - (min * MIN)) / SEC; - - // Gets hour string. - String hourStr = ""; - String hourStr2 = ""; - if (TWO_DIGIT > hour) { - hourStr = ZERO; - hourStr2 = Long.toString(hour); - } else { - hourStr = Long.toString(hour / TWO_DIGIT); - hourStr2 = Long.toString(hour % TWO_DIGIT); - } - - // Gets minute string. - String minStr = ""; - String minStr2 = ""; - if (TWO_DIGIT > min) { - minStr = ZERO; - minStr2 = Long.toString(min); - } else { - minStr = Long.toString(min / TWO_DIGIT); - minStr2 = Long.toString(min % TWO_DIGIT); - } - - // Gets second string. - String secStr = ""; - String secStr2 = ""; - if (TWO_DIGIT > sec) { - secStr = ZERO; - secStr2 = Long.toString(sec); - } else { - secStr = Long.toString(sec / TWO_DIGIT); - secStr2 = Long.toString(sec % TWO_DIGIT); - } - - // Gets millisecond string. - TimeString timeString = new TimeString(); - timeString.hour = hourStr.toString(); - timeString.hour2 = hourStr2.toString(); - timeString.min = minStr.toString(); - timeString.min2 = minStr2.toString(); - timeString.sec = secStr.toString(); - timeString.sec2 = secStr2.toString(); - - return timeString; - } - - public void start() { - if (null != timer) { - stop(); - } - startTime = System.currentTimeMillis(); - timer = new Timer(); - timer.schedule(new TimerTask() { - @Override - public void run() { - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - time = System.currentTimeMillis() - startTime; - if (null != timer) { - redraw(); - } - } - }); - } - }, new Date(), TIMER_PERIOD); - } - - public void stop() { - if (null != timer) { - timer.cancel(); - timer = null; - System.out.println("timer canceled!! "); - } - } - - public void setTime(long micTime) { - time = micTime / SEC; - redraw(); - } - - public long getTimeInMicroseconds() { - // Returns time in microseconds - return time * SEC; - } - - public void setBgImage(Image bg) { - this.bgImage = bg; - } - - public void setFont(Font font) { - this.clockFont = font; - } - - public void setFontColor(Color color) { - fontColor = color; - } - - public Point getTimerSize() { - Rectangle r = me.getClientArea(); - return new Point(r.width, r.height); - } - - public void clear() { - setTime(0); - } -} diff --git a/org.tizen.dynamicanalyzer.workbench.feature/.project b/org.tizen.dynamicanalyzer.workbench.feature/.project deleted file mode 100644 index 5d2d384..0000000 --- a/org.tizen.dynamicanalyzer.workbench.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - org.tizen.dynamicanalyzer.workbench.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/org.tizen.dynamicanalyzer.workbench.feature/build.properties b/org.tizen.dynamicanalyzer.workbench.feature/build.properties deleted file mode 100644 index 7b7773a..0000000 --- a/org.tizen.dynamicanalyzer.workbench.feature/build.properties +++ /dev/null @@ -1,5 +0,0 @@ -bin.includes = feature.xml,\ - feature.properties,\ - license.html,\ - build.properties -root = rootfiles diff --git a/org.tizen.dynamicanalyzer.workbench.feature/feature.properties b/org.tizen.dynamicanalyzer.workbench.feature/feature.properties deleted file mode 100644 index 533294b..0000000 --- a/org.tizen.dynamicanalyzer.workbench.feature/feature.properties +++ /dev/null @@ -1,33 +0,0 @@ -############################################################################### -# Copyright (c) 2005, 2007 IBM Corporation and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v10.html -# -# Contributors: -# IBM Corporation - initial API and implementation -############################################################################### -# features.properties -# contains externalized strings for feature.xml -# "%foo" in feature.xml corresponds to the key "foo" in this file -# java.io.Properties file (ISO 8859-1 with "\" escapes) -# This file should be translated. - -#Plugin name -featureName=Tizen Dynamic Analyzer - -#Provider name -providerName=Samsung Electronics - -# copyright -copyright=\ -Copyright (c) 2000 - 2011 Samsung Electronics, Co., Ltd.\n\ -All rights reserved.\n\ -http://www.tizen.org - -# "licenseURL" property - URL of the "Feature License" -# do not translate value - just change to point to a locale-specific HTML page -licenseURL=http://www.apache.org/licenses/LICENSE-2.0 - -########### end of license property ########################################## diff --git a/org.tizen.dynamicanalyzer.workbench.feature/feature.xml b/org.tizen.dynamicanalyzer.workbench.feature/feature.xml deleted file mode 100644 index a8e1344..0000000 --- a/org.tizen.dynamicanalyzer.workbench.feature/feature.xml +++ /dev/null @@ -1,279 +0,0 @@ - - - - - [Enter Feature Description here.] - - - - [Enter Copyright Description here.] - - - - [Enter License Description here.] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.tizen.dynamicanalyzer.workbench.feature/rootfiles/resources/icons/tizen-sdk-dynamicanalyzer.ico b/org.tizen.dynamicanalyzer.workbench.feature/rootfiles/resources/icons/tizen-sdk-dynamicanalyzer.ico deleted file mode 100644 index bc7d90f..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench.feature/rootfiles/resources/icons/tizen-sdk-dynamicanalyzer.ico and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/.classpath b/org.tizen.dynamicanalyzer.workbench/.classpath deleted file mode 100644 index 8a8f166..0000000 --- a/org.tizen.dynamicanalyzer.workbench/.classpath +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/org.tizen.dynamicanalyzer.workbench/.project b/org.tizen.dynamicanalyzer.workbench/.project deleted file mode 100644 index e86ae5d..0000000 --- a/org.tizen.dynamicanalyzer.workbench/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.tizen.dynamicanalyzer.workbench - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.tizen.dynamicanalyzer.workbench/.settings/org.eclipse.jdt.core.prefs b/org.tizen.dynamicanalyzer.workbench/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 7ee71a7..0000000 --- a/org.tizen.dynamicanalyzer.workbench/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Sat Jan 29 17:22:41 KST 2011 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/org.tizen.dynamicanalyzer.workbench/META-INF/MANIFEST.MF b/org.tizen.dynamicanalyzer.workbench/META-INF/MANIFEST.MF deleted file mode 100644 index 72c7dc2..0000000 --- a/org.tizen.dynamicanalyzer.workbench/META-INF/MANIFEST.MF +++ /dev/null @@ -1,18 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Localization: plugin -Bundle-Name: %pluginName -Bundle-SymbolicName: org.tizen.dynamicanalyzer.workbench;singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-Vendor: %providerName -Require-Bundle: org.eclipse.core.runtime, - org.eclipse.ui, - org.tizen.dynamicanalyzer;bundle-version="1.0.0" -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Export-Package: org.tizen.dynamicanalyzer.workbench; - uses:="org.eclipse.jface.action, - org.eclipse.ui.application, - org.eclipse.ui, - org.eclipse.equinox.app, - org.eclipse.swt.widgets", - org.tizen.dynamicanalyzer.workbench.perspective;uses:="org.eclipse.ui" diff --git a/org.tizen.dynamicanalyzer.workbench/about.ini b/org.tizen.dynamicanalyzer.workbench/about.ini deleted file mode 100644 index 3e069f6..0000000 --- a/org.tizen.dynamicanalyzer.workbench/about.ini +++ /dev/null @@ -1,6 +0,0 @@ -# Property "aboutText" contains blurb for feature details in the "About" -# dialog (translated). Maximum 15 lines and 75 characters per line. -aboutText=%blurb - -# Property "featureImage" contains path to feature image (32x32) -featureImage=icons/alt_window_32.gif diff --git a/org.tizen.dynamicanalyzer.workbench/about.mappings b/org.tizen.dynamicanalyzer.workbench/about.mappings deleted file mode 100644 index 4cd8b45..0000000 --- a/org.tizen.dynamicanalyzer.workbench/about.mappings +++ /dev/null @@ -1 +0,0 @@ -0=1.0.0 \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer.workbench/about.properties b/org.tizen.dynamicanalyzer.workbench/about.properties deleted file mode 100644 index 3753920..0000000 --- a/org.tizen.dynamicanalyzer.workbench/about.properties +++ /dev/null @@ -1,7 +0,0 @@ -blurb=DynamicAnalyzer Product\n\ -\n\ -Version: {featureVersion}\n\ -Build id: {0}\n\ -\n\ -(c) Copyright Samsung Electorics. All rights reserved.\n\ - diff --git a/org.tizen.dynamicanalyzer.workbench/build.properties b/org.tizen.dynamicanalyzer.workbench/build.properties deleted file mode 100644 index 0c042f1..0000000 --- a/org.tizen.dynamicanalyzer.workbench/build.properties +++ /dev/null @@ -1,11 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = plugin.xml,\ - META-INF/,\ - .,\ - about.ini,\ - about.mappings,\ - about.properties,\ - plugin.properties,\ - plugin_customization.ini,\ - icons/ diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/config/config b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/config/config deleted file mode 100644 index 052a56e..0000000 --- a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/config/config +++ /dev/null @@ -1,7 +0,0 @@ -Internal call=off -Version=0.3.21 -Ragne auto select=on -Build time=09/05/2012 10:30 AM (GMT) -Snapshot=off -Selected chart list=CPU,CPU core,CPU frequency,Heap allocation,Process Size,Memory,File,Screenshot,UI Event -Available chart list=CPU,CPU core,CPU frequency,Heap allocation,Process Size,Memory,File,Screenshot,UI Event \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/config/license b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/config/license deleted file mode 100644 index 785fc82..0000000 --- a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/config/license +++ /dev/null @@ -1,9 +0,0 @@ -Tizen SDK contains software portions licensed under various open source licenses as well as proprietary components. All open source software portions ("Open Source Software") are licensed under the open source licenses that accompany such Open Source Software. - -The licenses governing the Open Source Software are available at: http://developer.tizen.org/download/tizen_sdk_opensource_license.html - -Except for the Open Source Software contained in Tizen SDK, all other software portions contained in Tizen SDK are governed by the terms and conditions of the Tizen Software Development Kit License Agreement, available at: http://developer.tizen.org/download/samsung_sdk_license.html - -You may access and download Tizen SDK Open Source Software at: http://developer.tizen.org/download/tizenopensdk.tar.gz - -BY CLICKING THE "I AGREE" BUTTON OR BY USING ANY PART OF TIZEN SDK, YOU AGREE (ON BEHALF OF YOURSELF AND/OR YOUR COMPANY) TO THE OPEN SOURCE SOFTWARE LICENSE TERMS AND THE TIZEN SOFTWARE DEVELOPMENT KIT LICENSE AGREEMENT. IF YOU DO NOT AGREE WITH THE OPEN SOURCE SOFTWARE LICENSE TERMS OR THE TIZEN SOFTWARE DEVELOPMENT KIT LICENSE AGREEMENT, YOU MAY NOT DOWNLOAD OR USE TIZEN SDK. diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/config/system_panel_battery_table_U1 b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/config/system_panel_battery_table_U1 deleted file mode 100644 index 52889ad..0000000 --- a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/config/system_panel_battery_table_U1 +++ /dev/null @@ -1,11 +0,0 @@ -0 30 30 0 0 0 0 0 0 0 -1 1 1 1 1 1 1 0 0 0 -54 63 68 73 78 82 88 93 98 104 -0 30 0 0 0 0 0 0 0 0 -0 183 191 210 230 0 0 0 0 0 -0 12 17 78 0 0 0 0 0 0 -0 50 54 78 0 0 0 0 0 0 -0 0 0 226 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -0 194 194 194 194 194 194 194 194 194 -0 43 2 124 3 191 5 299 8 462 diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/config/system_panel_battery_table_default b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/config/system_panel_battery_table_default deleted file mode 100644 index bacf54b..0000000 --- a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/config/system_panel_battery_table_default +++ /dev/null @@ -1,11 +0,0 @@ -0 30 30 0 0 0 0 0 0 0 -1 1 1 1 1 1 1 0 0 0 -56 69 75 90 111 134 154 178 203 226 -0 30 0 0 0 0 0 0 0 0 -0 185 185 210 230 0 0 0 0 0 -0 76 76 111 0 0 0 0 0 0 -0 28 28 32 0 0 0 0 0 0 -0 0 0 230 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 -0 260 260 260 260 260 260 260 260 260 -40 50 60 75 60 100 63 166 66 210 diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/config/user_interface_api_list b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/config/user_interface_api_list deleted file mode 100644 index dbc3104..0000000 --- a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/config/user_interface_api_list +++ /dev/null @@ -1,2 +0,0 @@ -file :: + Ui`, -Web ; -api :: +(`, +)`, +virtual`,-*`,-/`, -:`, -{`, -->`, -new`, -if`, -switch`, -!`, -.`, -operator`, -,; \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/arm/da_event b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/arm/da_event deleted file mode 100755 index ec8055c..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/arm/da_event and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/arm/da_manager b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/arm/da_manager deleted file mode 100644 index cb7c8ea..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/arm/da_manager and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/arm/da_probe_osp.so b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/arm/da_probe_osp.so deleted file mode 100644 index 6103f10..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/arm/da_probe_osp.so and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/arm/da_probe_tizen.so b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/arm/da_probe_tizen.so deleted file mode 100644 index 4c3d3cc..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/arm/da_probe_tizen.so and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/arm/readelf b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/arm/readelf deleted file mode 100644 index 8776f20..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/arm/readelf and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/x86/da_event b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/x86/da_event deleted file mode 100644 index b288309..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/x86/da_event and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/x86/da_manager b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/x86/da_manager deleted file mode 100644 index 5b8d977..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/x86/da_manager and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/x86/da_probe_osp.so b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/x86/da_probe_osp.so deleted file mode 100644 index d09494e..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/x86/da_probe_osp.so and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/x86/da_probe_tizen.so b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/x86/da_probe_tizen.so deleted file mode 100644 index f1383ca..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/x86/da_probe_tizen.so and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/x86/readelf b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/x86/readelf deleted file mode 100644 index 3107996..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/target/x86/readelf and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/tool/WindowActivator b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/tool/WindowActivator deleted file mode 100755 index 8fe0876..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/tool/WindowActivator and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/tool/WindowActivator.exe b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/tool/WindowActivator.exe deleted file mode 100755 index dcff1da..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/tool/WindowActivator.exe and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/tool/windowactivator.bat b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/tool/windowactivator.bat deleted file mode 100755 index 0655f2e..0000000 --- a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/tool/windowactivator.bat +++ /dev/null @@ -1,10 +0,0 @@ -rem # find & move absolute path -set ABS_PATH=%~dp0 -cd %ABS_PATH% - -set PWD=%CD% -set ACTIVATOR_PATH=%PWD% -set ACTIVATOR_BIN=WindowActivator.exe -set PATH=%ACTIVATOR_PATH%;%PATH% - -%ACTIVATOR_PATH%\%ACTIVATOR_BIN% %* diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/tool/windowactivator.sh b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/tool/windowactivator.sh deleted file mode 100755 index 2adf516..0000000 --- a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/tool/windowactivator.sh +++ /dev/null @@ -1,15 +0,0 @@ -#! /bin/bash - -abspath="$(cd "${0%/*}" 2>/dev/null; echo $PWD/${0##*/})" -absdir=`dirname "$abspath"` - -PWD=`pwd` - -ACTIVATOR=WindowActivator -ACTIVATOR_PATH=${absdir} - -# for coredump file -ulimit -c unlimited - -${ACTIVATOR_PATH}/${ACTIVATOR} "$@" - diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/tool/windowactivator.vbs b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/tool/windowactivator.vbs deleted file mode 100755 index 388a3b8..0000000 --- a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/tool/windowactivator.vbs +++ /dev/null @@ -1,11 +0,0 @@ -Set fso = CreateObject("Scripting.FileSystemObject") -activatorPath = fso.GetParentFolderName(Wscript.scriptFullName) -activatorScript=activatorPath & "\dynamicanalyzer.bat" - -For i = 0 To WScript.Arguments.Count - 1 - args = args & Chr(34) & WScript.Arguments(i) & Chr(34) & " " -Next - -set WshShell=WScript.CreateObject("WScript.Shell") -WshShell.run activatorScript & " " & args,0,False -Set WshShell=Nothing diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/version b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/version deleted file mode 100644 index 38ba203..0000000 --- a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/version +++ /dev/null @@ -1 +0,0 @@ -0.5.3.2 diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/CheckList.leak b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/CheckList.leak deleted file mode 100644 index 3cc88a4..0000000 --- a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/CheckList.leak +++ /dev/null @@ -1,117 +0,0 @@ - - - - - malloc - 0 - 1 - 14 - true - - - - calloc - 0 - 1 - 14 - true - - - - app_get_name - 0 - 1 - 14 - false - - - - app_get_data_directory - 0 - 1 - 14 - false - - - - app_get_package - 0 - 1 - 14 - false - - - - app_get_version - 0 - 1 - 14 - false - - - - realloc - 2 - 1 - 14 - 8 - true - - - - free - 1 - 1 - 14 - true - - - - open - 0 - 5 - 13 - true - - - - File::Construct - 0 - 5 - 13 - false - - - - - File::~File - 1 - 5 - 13 - false - - - - close - 1 - 5 - 13 - true - - - - fopen - 0 - 5 - 13 - true - - - - fclose - 1 - 5 - 13 - true - - \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/custom_chart.logc b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/custom_chart.logc deleted file mode 100644 index 563adf1..0000000 --- a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/custom_chart.logc +++ /dev/null @@ -1,132 +0,0 @@ - - - 13 - custom_chart - 19 - false - - Rid - ID - SeqNumber - APIName - Time - - Pid - Tid - InputParam - Return - PCAddr - - Error - InternalCall - CallerPCAddr - Handle - Type - - Name - Color - Value - Reserved - - INTEGER - INTEGER - INTEGER PRIMARY KEY NOT NULL - TEXT - INTEGER - - INTEGER - INTEGER - TEXT - TEXT - TEXT - - INTEGER - INTEGER - INTEGER - INTEGER - INTEGER - - TEXT - INTEGER - TEXT - TEXT - - 100 - 0 - 0 - 0 - 0 - - - 0 - 1 - 2 - 4 - 3 - - 13 - 14 - 12 - 11 - 9 - - 7 - 8 - 10 - 5 - 6 - - 15 - 16 - 17 - 18 - 19 - - - false - false - true - true - true - - true - true - true - true - false - - true - true - true - false - false - - false - false - false - false - - - Row Id - ID - # - API name - Time - - Process id - Thread id - Input parm - Return - PC Addr - - Errno - Internal Call - Caller PC Address - Handle - Type - - Name - Color - Value - Reserved - \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/lifecycle.logc b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/lifecycle.logc deleted file mode 100644 index c65ebd2..0000000 --- a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/lifecycle.logc +++ /dev/null @@ -1,100 +0,0 @@ - - - 6 - lifecycle - 14 - false - - Rid - ID - SeqNumber - APIName - Time - - Pid - Tid - InputParam - Return - PCAddr - - Error - InternalCall - CallerPCAddr - Reserved - - INTEGER - INTEGER - INTEGER PRIMARY KEY NOT NULL - TEXT - INTEGER - - INTEGER - TEXT - TEXT - TEXT - TEXT - - INTEGER - INTEGER - INTEGER - TEXT - - 100 - 0 - 80 - 0 - - - 2 - 4 - 3 - 8 - 0 - - 1 - 5 - 6 - 7 - 9 - - 10 - 11 - 12 - 13 - - - true - true - true - true - true - - true - true - true - true - true - - true - true - true - true - - Row Id - ID - # - API name - Time - - Process id - Thread id - Input parm - Return - PC Addr - - Errno - Internal Call - CallerPCAddr - Reserved - - \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/memory.logc b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/memory.logc deleted file mode 100644 index 6a7b53a..0000000 --- a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/memory.logc +++ /dev/null @@ -1,120 +0,0 @@ - - - 1 - memory - 17 - false - - Rid - ID - SeqNumber - APIName - Time - - Pid - Tid - InputParam - Return - PCAddr - - Error - InternalCall - CallerPCAddr - Size - MemoryAPIType - - Addr - Reserved - - INTEGER - INTEGER - INTEGER PRIMARY KEY NOT NULL - TEXT - INTEGER - - INTEGER - TEXT - TEXT - TEXT - TEXT - - INTEGER - INTEGER - INTEGER - INTEGER - INTEGER - - INTEGER - TEXT - - - 100 - 0 - 80 - 0 - - - 0 - 1 - 2 - 3 - 4 - - 5 - 6 - 7 - 8 - 9 - - 10 - 11 - 12 - 13 - 14 - - 15 - 16 - - false - false - true - true - true - - true - true - true - true - false - - true - true - false - true - false - - false - false - - Row Id - ID - # - API name - Time - - Process id - Thread id - Input parm - Return - PC Addr - - Errno - Internal Call - Caller PC Address - Size - Mem api type - - Address - Realloc Size - - \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/resource.logc b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/resource.logc deleted file mode 100644 index 7a8c975..0000000 --- a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/resource.logc +++ /dev/null @@ -1,136 +0,0 @@ - - - 5 - resource - 20 - false - - Rid - ID - SeqNumber - APIName - Time - - Pid - Tid - InputParam - Return - PCAddr - - Error - InternalCall - CallerPCAddr - Size - FDValue - - FDType - FDAPIType - FileSize - FilePath - Reserved - - INTEGER - INTEGER - INTEGER PRIMARY KEY NOT NULL - TEXT - INTEGER - - INTEGER - INTEGER - TEXT - TEXT - TEXT - - INTEGER - INTEGER - INTEGER - INTEGER - INTEGER - - INTEGER - INTEGER - INTEGER - TEXT - TEXT - - 100 - 0 - 0 - 0 - 0 - - - 0 - 1 - 2 - 4 - 3 - - 13 - 14 - 12 - 11 - 9 - - 7 - 8 - 10 - 5 - 6 - - 15 - 16 - 17 - 18 - 19 - - - false - false - true - true - true - - true - true - true - true - false - - true - true - true - false - false - - false - false - false - false - false - - - Row Id - ID - # - API name - Time - - Process id - Thread id - Input parm - Return - PC Addr - - Errno - Internal Call - Caller PC Address - Size - FD value - - FD type - FD API Type - File Size - FD api type - File Path - \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/scene.logc b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/scene.logc deleted file mode 100644 index 83c8504..0000000 --- a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/scene.logc +++ /dev/null @@ -1,145 +0,0 @@ - - - 8 - scene - 21 - false - - Rid - ID - SeqNumber - APIName - Time - - Pid - Tid - InputParam - Return - PCAddr - - Error - InternalCall - CallerPCAddr - SceneName - FormName - - FormClassName - PanelName - PanelClassName - Reserved - - Null1 - Null2 - - INTEGER - INTEGER - INTEGER PRIMARY KEY NOT NULL - TEXT - INTEGER - - INTEGER - TEXT - TEXT - TEXT - TEXT - - INTEGER - INTEGER - INTEGER - TEXT - TEXT - - TEXT - TEXT - TEXT - TEXT - - TEXT - TEXT - - 100 - 0 - 80 - 0 - - - 0 - 1 - 2 - 3 - 4 - - 5 - 6 - 7 - 8 - 9 - - 10 - 11 - 12 - 13 - 14 - - 15 - 16 - 17 - 18 - 19 - 20 - - - - true - true - true - true - true - - true - true - true - true - true - - true - true - true - true - true - - true - true - true - true - true - true - - - - Row Id - ID - # - API name - Time - - Process id - Thread id - Input parm - Return - PC Addr - - Errno - Internal call - Caller PCaddr - Scene name - Form name - - Form Class Name - Panel name - Panel Class Name - Reserved - Null 1 - Null 2 - - \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/screenshot.logc b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/screenshot.logc deleted file mode 100644 index 15fb639..0000000 --- a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/screenshot.logc +++ /dev/null @@ -1,115 +0,0 @@ - - - 7 - screenshot - 15 - false - - Rid - ID - SeqNumber - APIName - Time - - Pid - Tid - InputParam - Return - PCAddr - - Error - InternalCall - CallerPCAddr - ImageFilePath - Orientation - - Reserved - - INTEGER - INTEGER - INTEGER PRIMARY KEY NOT NULL - TEXT - INTEGER - - INTEGER - TEXT - TEXT - TEXT - TEXT - - INTEGER - INTEGER - INTEGER - TEXT - INTEGER - - TEXT - - - 100 - 0 - 80 - 0 - - - 0 - 1 - 2 - 3 - 4 - - 5 - 6 - 7 - 8 - 9 - - 10 - 11 - 12 - 13 - 14 - - 15 - - - true - true - true - true - true - - true - true - true - true - true - - true - true - true - true - true - - true - - Row Id - ID - # - API name - Time - - Process id - Thread id - Input parm - Return - PC Addr - - Errno - Internal Call - CallerPCAddr - ImageFilePath - Orientation - Reserved - - \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/synchronization.logc b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/synchronization.logc deleted file mode 100644 index 3f4e7fd..0000000 --- a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/synchronization.logc +++ /dev/null @@ -1,120 +0,0 @@ - - - 14 - synchronization - 17 - false - - Rid - ID - SeqNumber - APIName - Time - - Pid - Tid - InputParam - Return - PCAddr - - Error - InternalCall - CallerPCAddr - SyncVal - SyncType - - ApiType - Reserved - - INTEGER - INTEGER - INTEGER PRIMARY KEY NOT NULL - TEXT - INTEGER - - INTEGER - INTEGER - TEXT - TEXT - TEXT - - INTEGER - INTEGER - INTEGER - INTEGER - INTEGER - - INTEGER - TEXT - - 100 - 0 - 0 - 0 - 0 - - - 0 - 1 - 2 - 4 - 3 - - 13 - 14 - 12 - 11 - 9 - - 7 - 8 - 10 - 5 - 6 - - 15 - 16 - - - false - false - true - true - true - - true - true - true - true - false - - true - true - true - false - false - - false - false - - Row Id - ID - # - API name - Time - - Process id - Thread id - Input parm - Return - PC Addr - - Errno - Internal Call - Caller PC Address - Sync val - Sync type - - Api type - Reserved - \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/system.logc b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/system.logc deleted file mode 100644 index 76f3fd9..0000000 --- a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/system.logc +++ /dev/null @@ -1,258 +0,0 @@ - - - 9 - system - 34 - true - - Rid - ID - SeqNumber - Energy - Time - - WIFI - Bluetooth - GPS - Brightness - Camera - - - Sound - Audio - Vibration - Voltage - Rssi - - Video - Call - Dnet - callAlpha - rssiAlpha - - CpuFrequency - AppCpuUsage - SystemCpuUsage - VirtualMemory - ResidentMemory - - SharedMemory - PSSMemory - AllocationSize - SystemTotalMemory - SystemUsedMemory - - SystemUsedStorage - NumOfThread - LoadOfThread - Reserved - - - INTEGER - INTEGER - INTEGER PRIMARY KEY NOT NULL - LONG - INTEGER - - INTEGER - INTEGER - INTEGER - INTEGER - INTEGER - - INTEGER - INTEGER - INTEGER - INTEGER - INTEGER - - INTEGER - INTEGER - INTEGER - INTEGER - INTEGER - - TEXT - FLOAT - TEXT - INTEGER - INTEGER - - INTEGER - INTEGER - INTEGER - INTEGER - INTEGER - - INTEGER - INTEGER - TEXT - TEXT - - - 0 - 0 - 0 - 0 - 0 - - 0 - 0 - 0 - 0 - 0 - - 0 - 0 - 0 - 0 - 0 - - 0 - 0 - 0 - 0 - 0 - - 0 - 0 - 0 - 0 - 0 - - 0 - 0 - 0 - 0 - 0 - - 0 - 0 - 0 - 0 - - - 0 - 1 - 2 - 4 - 3 - - 14 - 15 - 16 - 17 - 18 - - 10 - 11 - 12 - 13 - 5 - - 6 - 7 - 8 - 9 - 19 - - 20 - 21 - 22 - 23 - 24 - - 25 - 26 - 27 - 28 - 29 - - 30 - 31 - 32 - 33 - - false - false - true - true - true - - true - true - true - true - true - - true - true - true - true - true - - true - true - true - true - true - - false - false - false - false - false - - false - false - false - false - false - - false - false - false - false - - - Row Id - ID - # - Energy - Time - - WIFI - Bluetooth - GPS - Brightness - Camera - - Sound - Audio - Vibration - Voltage - Rssi - - Video - Call - Dnet - Call Alpha - Rssi Alpha - - CPU Frequency - App CPU Usage - System CPU Usage - Virtual Memory - Resident Memory - - Shared Memory - PSS Memory - Allocation Size - System Total Memory - System Used Memory - - System Used Storage - Thread Count - Thread Load - Reserved - \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/thread.logc b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/thread.logc deleted file mode 100644 index 460037b..0000000 --- a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/thread.logc +++ /dev/null @@ -1,125 +0,0 @@ - - - 12 - thread - 18 - false - - Rid - ID - SeqNumber - APIName - Time - - Pid - Tid - InputParam - Return - PCAddr - - Error - InternalCall - CallerPCAddr - PthreadID - OSPThreadID - - ThreadType - ApiType - Reserved - - INTEGER - INTEGER - INTEGER PRIMARY KEY NOT NULL - TEXT - INTEGER - - INTEGER - INTEGER - TEXT - TEXT - TEXT - - INTEGER - INTEGER - INTEGER - INTEGER - INTEGER - - INTEGER - INTEGER - TEXT - - 100 - 0 - 0 - 0 - 0 - - - 0 - 1 - 2 - 4 - 3 - - 13 - 14 - 12 - 11 - 9 - - 7 - 8 - 10 - 5 - 6 - - 15 - 16 - 17 - - - false - false - true - true - true - - true - true - true - true - false - - true - true - true - false - false - - false - false - false - - Row Id - ID - # - API name - Time - - Process id - Thread id - Input parm - Return - PC Addr - - Errno - Internal Call - Caller PC Address - PThread id - OspThread id - - Thread type - Api type - Reserved - \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/ui_control.logc b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/ui_control.logc deleted file mode 100644 index e4fcd1e..0000000 --- a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/ui_control.logc +++ /dev/null @@ -1,138 +0,0 @@ - - - 2 - ui_control - 20 - false - - Rid - ID - SeqNumber - APIName - Time - - Pid - Tid - InputParam - Return - PCAddr - - Error - InternalCall - CallerPCAddr - - ParentName - ParentClassName - - ParentPointer - ChildName - ChildClassName - ChildPointer - Reserved - - INTEGER - INTEGER - INTEGER PRIMARY KEY NOT NULL - TEXT - INTEGER - - INTEGER - INTEGER - TEXT - TEXT - TEXT - - INTEGER - INTEGER - INTEGER - - TEXT - TEXT - - INTEGER - TEXT - TEXT - INTEGER - TEXT - - 0 - 0 - 0 - 0 - 0 - - - 0 - 1 - 2 - 3 - 4 - - 5 - 6 - 7 - 8 - 9 - - 10 - 11 - 12 - 13 - 14 - - 15 - 16 - 17 - 18 - 19 - - - false - false - true - true - true - - true - true - true - true - false - - true - true - true - true - true - - true - true - true - true - false - - - Row Id - ID - # - API name - Time - - Process id - Thread id - Input parm - Return - PC Addr - - Errno - Internal Call - Call PC Address - Parent name - Parent Class name - - Parent pointer - Child name - Child Class name - Child pointer - Reserved - \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/ui_event.logc b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/ui_event.logc deleted file mode 100644 index 4fff5da..0000000 --- a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/ui_event.logc +++ /dev/null @@ -1,136 +0,0 @@ - - - 3 - ui_event - 20 - false - - Rid - ID - SeqNumber - APIName - Time - - Pid - Tid - InputParam - Return - PCAddr - - Error - InternalCall - CallerPCAddr - EventType - DetailType - - x - y - info1 - info2 - Reserved - - INTEGER - INTEGER - INTEGER PRIMARY KEY NOT NULL - TEXT - INTEGER - - INTEGER - INTEGER - TEXT - TEXT - TEXT - - INTEGER - INTEGER - INTEGER - INTEGER - INTEGER - - INTEGER - INTEGER - INTEGER - INTEGER - TEXT - - 0 - 0 - 0 - 0 - 0 - - - 0 - 1 - 2 - 3 - 4 - - 5 - 6 - 7 - 8 - 9 - - 10 - 11 - 12 - 13 - 14 - - 15 - 16 - 17 - 18 - 19 - - - false - false - true - true - true - - true - true - true - true - false - - true - true - true - false - false - - true - true - true - false - false - - - Row Id - ID - # - API name - Time - - Process id - Thread id - Input parm - Return - PC Addr - - Errno - Internal Call - Call PC Address - Event type - Detail type - - X - Y - Info1 - Info2 - Reserved - \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/user_function.logc b/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/user_function.logc deleted file mode 100644 index 8917f0a..0000000 --- a/org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/xml/user_function.logc +++ /dev/null @@ -1,125 +0,0 @@ - - - 4 - user_function - 18 - false - - Rid - ID - SeqNumber - APIName - Time - - Pid - Tid - InputParam - Return - PCAddr - - Error - InternalCall - CallerPCAddr - BinaryRangeStart - BinaryRangeEnd - - Type - ElapsedTime - Reserved - - INTEGER - INTEGER - INTEGER PRIMARY KEY NOT NULL - TEXT - INTEGER - - INTEGER - TEXT - TEXT - TEXT - TEXT - - INTEGER - INTEGER - INTEGER - INTEGER - INTEGER - - TEXT - INTEGER - TEXT - - 100 - 0 - 80 - 0 - - - 2 - 4 - 3 - 8 - 0 - - 1 - 5 - 6 - 7 - 9 - - 10 - 11 - 12 - 13 - 14 - - 13 - 14 - 15 - - - true - true - true - true - true - - true - true - true - true - true - - true - true - true - true - true - - true - true - true - - Row Id - ID - # - API name - Time - - Process id - Thread id - Input parm - Return - PC Addr - - Errno - Internal Call - CallerPCAddr - Binary Range Start - Binary Range End - - Type - ElapsedTime - Reserved - - \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer.workbench/dynamicanalyzer.product b/org.tizen.dynamicanalyzer.workbench/dynamicanalyzer.product deleted file mode 100755 index 184dba2..0000000 --- a/org.tizen.dynamicanalyzer.workbench/dynamicanalyzer.product +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts - -XX:MaxHeapFreeRatio=70 --XX:MinHeapFreeRatio=40 --Xms16m --Xmx512m - - - - - - - - - - - - - - - - org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6 - - - - - - - - - - - - - - - - - diff --git a/org.tizen.dynamicanalyzer.workbench/icons/128_DA_icon.png b/org.tizen.dynamicanalyzer.workbench/icons/128_DA_icon.png deleted file mode 100644 index 5fb0a5d..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/icons/128_DA_icon.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/icons/16_DA_icon.png b/org.tizen.dynamicanalyzer.workbench/icons/16_DA_icon.png deleted file mode 100644 index 52cb42a..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/icons/16_DA_icon.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/icons/20_DA_icon.png b/org.tizen.dynamicanalyzer.workbench/icons/20_DA_icon.png deleted file mode 100644 index 519dbd0..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/icons/20_DA_icon.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/icons/22_DA_icon.png b/org.tizen.dynamicanalyzer.workbench/icons/22_DA_icon.png deleted file mode 100644 index 8546053..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/icons/22_DA_icon.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/icons/24_DA_icon.png b/org.tizen.dynamicanalyzer.workbench/icons/24_DA_icon.png deleted file mode 100644 index efe6f11..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/icons/24_DA_icon.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/icons/256_DA_icon.png b/org.tizen.dynamicanalyzer.workbench/icons/256_DA_icon.png deleted file mode 100644 index c718264..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/icons/256_DA_icon.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/icons/32_DA_icon.png b/org.tizen.dynamicanalyzer.workbench/icons/32_DA_icon.png deleted file mode 100644 index b5d8d49..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/icons/32_DA_icon.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/icons/48_DA_icon.png b/org.tizen.dynamicanalyzer.workbench/icons/48_DA_icon.png deleted file mode 100644 index 3b279a3..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/icons/48_DA_icon.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/icons/64_DA_icon.png b/org.tizen.dynamicanalyzer.workbench/icons/64_DA_icon.png deleted file mode 100644 index bc5de13..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/icons/64_DA_icon.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/icons/96_DA_icon.png b/org.tizen.dynamicanalyzer.workbench/icons/96_DA_icon.png deleted file mode 100644 index dbd8b08..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/icons/96_DA_icon.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/icons/DA_icon.icns b/org.tizen.dynamicanalyzer.workbench/icons/DA_icon.icns deleted file mode 100644 index c187f04..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/icons/DA_icon.icns and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/icons/DA_icon.ico b/org.tizen.dynamicanalyzer.workbench/icons/DA_icon.ico deleted file mode 100644 index bc7d90f..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/icons/DA_icon.ico and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/icons/alt_window_128.png b/org.tizen.dynamicanalyzer.workbench/icons/alt_window_128.png deleted file mode 100644 index f6d2cbd..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/icons/alt_window_128.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/icons/alt_window_16.png b/org.tizen.dynamicanalyzer.workbench/icons/alt_window_16.png deleted file mode 100644 index 99ce735..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/icons/alt_window_16.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/icons/alt_window_32.png b/org.tizen.dynamicanalyzer.workbench/icons/alt_window_32.png deleted file mode 100644 index 26d5070..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/icons/alt_window_32.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/icons/alt_window_48.png b/org.tizen.dynamicanalyzer.workbench/icons/alt_window_48.png deleted file mode 100644 index 7b7af95..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/icons/alt_window_48.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/icons/alt_window_64.png b/org.tizen.dynamicanalyzer.workbench/icons/alt_window_64.png deleted file mode 100644 index 076349d..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/icons/alt_window_64.png and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/icons/linux_icon.xpm b/org.tizen.dynamicanalyzer.workbench/icons/linux_icon.xpm deleted file mode 100644 index 308d998..0000000 --- a/org.tizen.dynamicanalyzer.workbench/icons/linux_icon.xpm +++ /dev/null @@ -1,500 +0,0 @@ -/* XPM */ -static char *splash[] = { -/* columns rows colors chars-per-pixel */ -"480 480 14 1", -" c #05060C", -". c #0F233A", -"X c #2F4050", -"o c #104064", -"O c #0F537E", -"+ c #35546B", -"@ c #106695", -"# c #31698F", -"$ c #2379A7", -"% c #496B83", -"& c #4E7D9E", -"* c #5090B9", -"= c #6F93AB", -"- c #6CA6CB", -/* pixels */ -" ", -" . . . . . . . . . . ", -" . . . . . . . . . . . . ", -" . . . . . . . . ", -" . . . . . . . . ", -" . . . . . . . . . . . . . ", -" . . . . . . . ", -" . . . . . . . . . . . ", -" . . . . . ", -" . . . . . . . . . . . . ", -" . . . . . . . . ", -" . . . . . . . . . ", -" . . . . . ", -" . . . . . . . . . . . . ", -" . . . . . . . . . ", -" . . . . . . . ", -" . . . . . . ", -" . . . . . . ", -" . . . . . . . . ", -" . . . ", -" . . . . . . . . ", -" . . ", -" . . . . . . ", -" . . . ", -" . . . . . . ", -" . . ", -" . . . . . ", -" . ", -" . . . . . ", -" . . ", -" ", -" . . . . ", -" ", -" . . . ", -" . . . . . . ", -" ", -" . . . . . . ", -" . . . . . ", -" ", -" . . . . . . . ", -" . . . . . ", -" . . . . ", -" . . . . ", -" . . . . . . . ", -" . . ", -" . . . . . . . . ", -" . . . . . . ", -" . . . . . ", -" . . . . . ", -" . . . . . . . . ", -" . . . . . ", -" . . . . . ", -" . . . . . . ", -" . . . . ", -" . . ", -" . . . ", -" . . . ", -" . . . . . ", -" . . ", -" . . . . . . ", -" . . . . . ", -" . . . . . . . . . . ", -" . . . . . . . . . ", -" . . . . . . . ", -" . . . . . . . . . . ", -" . . . . . . . . ", -" . . . . . . . . . . ", -" . . . . . . . ", -" . . . . . . . . . . ", -" . . . . . . . . . . . . . . ", -" . . . . . . . . . . . ", -" . . . . . . . . . . ", -" . . . . . . . . . . . . . . . . . . . ", -" . . . . . . . . . . . . . ", -" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", -" . . . . . . . . . . . . . . . . . . . . .. . . . . . . . .. ... . . . .. . . . . . . . . . ", -" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... ... . . . . . . . . . . . . ", -" . . . . . . . . . . . . . . . . . . . . .. .. ............... . .. .. .. .. . . . . . . . . . . . . ", -" . . . . . . . . . . . . . . . . . . .. ... .. ....... .. ... ................... ... . . . . . . . ", -" . . . . . . . . . . . . . . . . . . . .. ... ........ .......................... ..... . .. . . . . . ", -" . . . . . . . . . . . . . . . . . . .. .................................................. . . . . . . . ", -" . . . . . . . . . . . . . . . . . . . . .....................X..X.X.X.X.X.X.X.................... . . . . . . ", -" . . . . . . . . . . . . . . . . . . .............X..X.X.X.X.X.X.X.X.X.X.X.X.XXX.X.X.X....... ..... . . . ", -" . . . . . . . . . . . . . . . . . . .... .........X..XX.XX.XX.XX.XX.XX.XX.XX.XX.X.XX.X.X.X........ ... .. . . . . ", -" . . . . . . . . . . . . . . . . . ........X.X.X.X.X.XX.XXXXXXXXXXXXXXXXXXXXXXXXXXX.X.X.X.......... . . . ", -" . . . . . . . . . . . . . . . . .........X..X.XX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.XX.XX.X..X.X..... ... . . . ", -" . . . . . . . . . . . . . . . . . . .. .....X..XX.XX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.X......... . . . . ", -" . . . . . . . . . . . . . ..........XX.XXXXXXXXXXXXXXXXXXX+XX+XX+X+XXXXXXXXXXXXXXXX.XX.X.X..... .. . . ", -" . . . . . . . . . . . . . . . . . .......X.X.X.XXXXXXXXXXXXX+X++++++++++++++++++++++++XXXXXXX.XX.X......... . . . . ", -" . . . . . . . . . . . . . .......X.XXXXXXXXXXX+X+++++++++++++++++++++++++++++++XXXXXXXXX.X.X..... . . . ", -" . . . . . . . . . . . . . . .......X.X.XXXXXXXX++++++++++++%++%+%+%+%+%+%+%++++++X+++XXXXXXX.X......... .. . ", -" . . . . . . . . . . . . . . . . ........XX.XXXXXXXX+++++++++%+%+%+%+%+%%%%%+%+%+%+%%+%+%+++X+XXXXXXX.X.X... . . . . ", -" . . . . . . . . . . . . ....X..XXXXXXXX+X+++++%+%+%+%%%%%%%%%%%%%%%%%%%%%%+%+%++++X+XXXXXX.X....... .. ", -" . . . . . . . . . . . . . ........XXX.XXXX++++++%+%+%%+%%%%%%%%%%%%%%%%%%%%%%%%%%%+%+%+++XXXXXX.X.X.... .. . . . ", -" . . . . . . . . . . . . . . . . . .....X.X.XXXXXX++++++%+%%+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%+%++++++XXXXXX.X..... . . . ", -" . . . . . . . . . . . . . .....X.XXXXXXX+++++%+%+%%+%%%%%%%%%%%%%%&%%&%%%%%%%%%%%%%%+%%++++XXXXX.X.X..... . . . ", -" . . . . . . . . . . . . . . . . . . .........X.XXXX++X++%++%%+%%%%%%%%%%%=%=&=%=&&&&=%=%&%%%%%%%%%+%++++XXXXXXX....... . . ", -" . . . . . . . . . . .. . .....XXX.XXXX+X+++++%%%%%%%%%%&%=&=%&&%=%=%=%=%=%=%=%=%%%%%%%%++++++XXXX.X.X.... . . . ", -" . . . . . . . . . . . . . . .........XXXXX+++++%%+%%%%%%%%=%=%=%=&==&=&=%=&=&=%=%=%=%=%%%%%%%%+++XXXXX.X......... . ", -" . . . . . . . . . . . . . . .... ...XXXXXXXX+X+++%+%%%%%%%&&&%=%=%=&=%==========&=&=%=%&%&%%%%%+++++X+XXXX.X..... . . . . ", -" . . . . . . . . . . . . . . . . . . . . . ....X...XXXXX++++%+%%%%%%%&%=%=%=&=&====&===&==&====&=%=%=%=%%%%%%++++XXXXXX.X...... . . ", -" . . . . . . . . . . . . . ....X.XXXXXXX++++%+%%%%%%=%=%&=%=&===&================&=&=%=%&%%%%%+%+++XXXX.X...... . . . . ", -" . . . . . . . . . . . . . . .........X.XXX+X+++%+%%%%%&%&%=&&=&==&=================&===&=%=%=%%%%%+++++XXXXX.X...... . . ", -" . . . . . . . . . . . . . . . . . . . .....X.X.XXXX++++%+%%%%%=%=%=&==&========================&==&&&%&%%%+%+++X+XXX.X...... . . . . . ", -" . . . . . . . . . . . . . . . ........X.XXXXXXX++++%%%%%%%%=%=&=&=&=========================&=%=&&%%%%%%+++XXXXX.XX....... . . . . ", -" . . . . . . . . . . . . . . . . . . . ....X.X.XXXX++++%%+%%%&&=%=&&=&=============================&=%&%&%%%+%++++XXXXX...X...... . . . ", -" . . . . . . . . . . . . . . . ......X...XXXX+X++++%+%%%%&%%&&&=&============================&===&=&&%%%%%+++++XX.XXX...... .. . .. . . ", -" . . . . . . . . . . . . . . . . . .. ......XX.XXXX++++%+%%%%%&&=&=&=&===============-==============&=%=%&%%%%%++++X+XXoX.X......... . . . . ", -" . . . . . . . . . . . . . . . . .. . ........X.X.XXXX++++++%%%%&%&&%&&=&==&=========-=-=-=--=-===========&=&&&%%%%%%++++XoXXX..X...... . .. . . .", -" . . . . . . . . . . . . . . . . . ... ......X..XXXXXX+++%+%%%%%%&&=&=&============-=-=-=-=-=-=-=========&=%=%&&%%%+++++X+XXo.XX.......... .. . .. ", -" . . . . . . . . . . . . .. . .........X.oXoX+X+++%+%%%%%&&%&&=&=&=======-=-==-=-=-=-=-==-========&=&&&%%%%%+%+++XXoXX.X.X..... ... .. .. .", -" . . . . . . . . .. .. . . . .........XX.XXXXXX+++++%%%%%%=%=&==&============-=-=---=--=-=-=-======&=&=%=%%%%%%++++X+XXoX.o..X........... .. ", -" . . . . . . . . . . .. ... .....X..X.XoX+X+++++%+%%%%%&&&&&=&========-=-=-=-=-=--=--=-=-=========%=%&%%%%+%+++X+XXXoX.Xo................", -" . . . . . . . . . . . . . . .. ..........X.oXoXoXXo++++%%%%%%%&&&&=&=&==&=========--=-=-=-=-=-=-==-=====&&=&&%&%%%%%+++++X+oXXXoX.X.X.............", -" . . . . . . . . . . . . .. ..........X..X.X.XXX+X+++++%+%%%&%&%=%=&=&========-=-==-=--=--=-=-==-========&=&&&&%%%%%%+++++XXXoX.X.o.X.o..........", -" . . . . . . . . . . . .. .. ..........o.XoXoXoX+++++%+%%%%%%&&&&=&=&===========-=-=-=--=--=-=-=-======&=&&&&%%%%%+%++%+X+XoXXoXoXX.o.X.o........", -" . . . . . . . . . . . . .. . .........o.X.oX.XXoXX+X++++%+%%%%&%&&=%=&===========-==--=-=-=-=-=-=-=-========&=&&&&%%%%+%+++++XoXXXX.oXX.o.X.o.o..o.", -" . . . . . . . . . .. . .............X.Xo.XoXX++++++%+%%%%%&&&&&&=&=&========-==-=-=-=-=-=-=-=========&=&&=%&&%%%%%%%+++++X+XXoXoXXoXoX.oX.Xo.o.o", -" . . . . . . . . . . . . ..... ........Xo.XoXXoXXo+X+++++%+%%%%%&%&&&&=&==&=======-=-=-==-=--=-=-=-=-=-=======&=&&&&%%%+%+%++++++X+XXoXoX.XoX.oo.X.X.", -" . . . . . . . . . . .. ... .........oX.o.Xo.XoX+o+X++++%%+%%%%%&&&&=&=&=&============-=-=-===-=-=-========&=&&=%&&&%&%%%%%+%++++o+XoXXoXoXoXoXo.Xoooo", -" . . . . . . .. ..........X..X.XoXXoXoX+++++++++%%%%%%&%&&&&&=&==&======-=-=-==-==--=-=-===-=-====&==&=&&&&%%%%+%#+++++++X++XoXXXoXoXoXoXoXo", -" . . . . . . . . . . . ..... ....o..oXoXoXoXXX++o++++%+%%+%%%&%&&&&=&=&=&===&=========-==-===-===-=-====*===&=&&&&%&%&%%%%+%+#+++O+o+X+oXoXoXoXoXoXoX", -" . . . . . . . . . . . . .... ......o..X.o.X.oXoXo+o++++++++%+%%%%%&&&&&&&=&=&=&=========-==-==-=-==-======*==*=&=&=&&&&&%%%%%#%+#+++++++++o++o+XoXoXoXoXo", -" . . . . ... . .........X.XoXoXoXoXX+o+++o++#+%%%%%%%&%&&&&&=&&==&==*==*==============-========*==&==&&&=%&%&%%%%%+%%+#+++++o++OX+o+XOX+oXoXo", -" . . . . . . . . . .........o..o..X.XoXXo+o+X+++#++#%+%%%%&%&&&&&&&=&=&=&==*=======-==-==-========*=*==*=&=&=&&&&&%&%%#%#%#+%+#++++O+++O++o++o+XO++", -" . . . . . . . . .. .. .....o.X.X.XXoXoXoX+X++O+++++%+%%%%%%%&%&&&&=&=&=&==&==*=*=================*=*=*=&=&=&=&&&&&&%&%%%%%%+%+%+++++++O++o++OXO+++o+", -" . . . . . . . . ..........X..oXo.oXoX+o++o++++#+#+%#%#%%%&%&&&&&&&&=&==&==&========*=*=*=*===*=*==*==*==&=&=&&&&%&%&%%%#%#%#%+%#+#++++++O++++++O++", -" . . . . . . . . . .. .......o..oX.oXXXoX+o++O++++#+%+%#%%%%%&%&&&&&=&=&=&&=&=&=*=****=*==*==*==*=*==*=&=&=&*&=&&&&&&&&%&%&%%%#%+##+#+++#++O+++O+O+O+++", -" . . . . . . .. .......o.XoXooXo+o++X+++#+++#%+#%#%%%&%&%&&&&&&=&&=&==&==&======*==*==*=*=*=*=*=*=&==&=&&=&&&%&&%&#%#%#%#%#%+###++#+#++#+++++++", -" . . . . . . . . . .. ........oo.Xo.XoXoXXOX+O+++++#+#%#%%#%%%&%&&&&&&&&&&=&=&=&=&==&=&=*=*=*=*==*=*=*=&=&=&=&&=&&&&&&&&&%&%&%#%%#%#+##+#+#+#++#++#+#+#+O", -" . . . . . . . . . . . .. .........o.XooXo+o++X+O++#+#+#%+#%%%%%%&%&%&&&&&=&&=&=&==&=&=&=&=*=*==*=*=*=&=&=*=&=*&=&&=&&&&&%&&%&#&%%#%#%#%#%#%+#+%#++#+#+#++#", -" . . . . . . . . . . . . . . ........o.XX.XoXXoXX+o+++++++#+%#%#%%#%&%&%&&&&&&&&&&=&&=&&=&=&=*=&=&=&=&=&=&=&=*=&=&=&&=&&=&&&&&&&&%&&%#&#%%#%#%+#%+%#%+##%+%+#+##+", -" . . . . . . . . . . . . . . . . . .. ......X.o.oXoXoXOXO++O++++#+#+#%%#%%%%&%&%&&&&&&&=&&=&&*=&=&=&=&=*=&=*=*=&=*=&=&&=&*&=&*&&&&&&&&&&&&#&&%%&#%%#%#%##%+##+%+##%+#%+#", -" . . . . . . . . . . . . . . . . . . . . . . . . .. ........oX.XoXoXX++X+++++##+%#%%#%%%$%&%&%&&&&&&&&&&=&&=&=&*=&=&=&=&=&*&=&**&*=&*=&*=&&*&=&&=&&&&&%&%&%&#&#%#%#%#%#%#%%%##%#+%#%+#%", -" . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . ..........X.ooXoXoXOXO+O+++++#+%##%%#%&%%&%&&&%&&&&&=&&&&=&=&=&*&=*&=&*=&=&=&==&&=&&=&&=&=&&&&&&&&&&&&&&#&%&#&%&#%%#%#%%#%+%#%#%#%#%#", -" . . . . . . . . . . . .. .. ... . . .. . . . . . . . . . . . . . . . . . . ... .......o.oXo.XXo+X++++++#+##%#%#%#%%&%%&%&&%&&&&&&&&&=&&&&&&=&=&&=&&=&*=&*&=&&*&&*&&&*&&&&&=&&&&&%&%&%&&%&#&#%#&#%&#%#%#%#%#%#%#%#%#", -" . . . . . . . .. . .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . ........o.o.XXooXo+o+O+++++%+#+%#%%#%#%$%&%&&&&&&&&=&&&&=&=&=&&&=&&=*&=&&&=*&*&=&=&*&=&&=&&&&&&&&&&&&%&&#&#&%&#&%#&#%%%#%#%%#%#%#%#%#", -" . . . . . . . . . . . . .. .. ... ................. .. .. . . . . .. . .. . . . . . . . . . . . . . . . . . . ... .......X.XooXXo+o+++++##+##%##%#%&#&%&%&%&%&&&&&&&&&&&&&&&&*=&&*&&&&*&*&&&&&&&&&&&&&&&&&&&&&&&&&%&&$&%&&%&#&%#&#%#&##&#%#%#%#%#%#%#", -" . . . . . . . . . . .. ..... ....... ....... . ..... .... .... . . . . . . . . . . . . . . . . . . . . . .. ......o.o.o.oXooX+o+O+O+++#+%+%#%#%#%%&%%&&%&&&%&&&&&&=&*&&=&&&&&&=&=&&&&&*&&=*&*&&&*&&&&&&&&&&&&&&&%&#&&#&&#&#&#&#&#&%#&#&#&#%#%#%#%", -" . . . . . . . . . . ..... .......... .......................... .... .. . . . . . . . . . . . . . . . . . . . .........Xo.XXoXXOX+++++#+#+##%#%#%%#&#%$&%&&%&&&&&&&&&&&&&&&&&&=&&&&&&*=&&&&*&&&&&&&&&&&&&&&&&&&%&&#&&&%$&#&&#&%&#&#%&#&#%#%#&#&#&#&#", -" . . . . . . . .. . ... .......................................... ... ....... . .. . . . . . . . . . . . . . . ... .....o.o.XooXoXo+o+O+++#+%#%#%#%%$%&%&%%&%&%&&%&&%&&&&&&&&&&&&&&&&&&&&&&*&&&&&&&&&&&&&&&&&&&&%&&#&&&&#&%&&#&%&#&%&#&#&#%&#&%#&#%#&#%", -" . . . . . . . . . . .. .......................X..X...X.X.X.X.X..X......X....... . . .. . . . . . . . . . . . . . . . . . . . . . .. .........o.X.oXoX+o+++++#+#+#%+#%#%#%%#&%&%$%&&%&&&%&&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&#&%&&&%&&#&#&#&#&#&%&&#&#&#&%&&#&&", -" . . . . . . . . . .. .... ........X..X..X.X.X..X..X..X.X.X..X.X.X.X.X..X........... .. . . . . . . . . . . . . . . .. ........o.ooXoXOX+o+O++#+#+#%#%#%&#&%&#&%&&%&&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%&&#&#&$%&&#&#&#&#&&#&&#&%&#&##&#&#&#&##&%#", -" . . . . . . . . . . .. .... ......X..X..X.X.X.X.XXX.XXXXX.XX.XXX.XXX.X.X.XX.X.X.X........ . . . . . . . . . . . . . . . . . . . . . . .........o.oXoXoXoXo+o+++#++##%#%#%#%#&%$%&#&%&%&%&&%&%&%&&%&&&&&&&&&&&&&&&&&&&&&%&&%&&%&#&#&$&#&&&%&%&#&&#&&&#&&%&#&&#&&&&&&#&&#&&#&&#&&", -" . . . . . . .. .............X..X..X.X.X.XXX.X.XX.X.XXXXXXXXXXXXXXXXXX.X.X.X..X......... . . . . . . . . . . . . . . .. .. . .......o..o.oXoXOX+O++++#+#+%#%#%#%%%&%$%&#&$&#&%&&%&&%&&&&%&&%&&%&&&%&&%&%&%&&%&&$%&$&&%&%&&#&#&#&#&&#&&#%&#&#&&%&&#&##&#&&#&&#&%$&#&", -" . . . . . . . . . . . .. .........X.X.X.X.X.X.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.X.X..X......... . . . . . . . . . . . . . . . . . . . . . . ........o..oo.XooXo+X+++O#+#%#%###%%%$&#&%&%$&%&&%&$&%&#&&&%&%&&%&%&&%%&&#&&#&#&#&#&#&%&%%#$&#%$%&$&%$&%#&&#&&#&&#&#&#&&&&&#&$&#&#&$&&#&$", -" . . . . . . . .. .........X....X.X.X.XXX.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.X.X.... ... . . . . . . . . . . . . . . . . . . . . . . . ... .......o.XooXoXoXo+O++#++#+#+%#%#%%%&#&#&%#&%&$%&#&#&%&#&#&%&$&#&#&#&$%&#&%&#&#&#&%&#&#&%%#&%$%%#&&%$&#&#&#&&#&#&$&&&#&#&&&#&&&&&#&&%&", -" . . . . . . . .. ............X.X.X.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.X.X....... .. . . . . . . . . . . . . . . . . . ... . ......o..o.o.oXo+++o++++#+#%#%#%#%#&#%%$%&#&#&#&%&%&#&#&&#&#&#&%&#&%&#%&#&#&#&#%&#%#$%%$&#&#&#&%$%##&%&#&#&&#&&#&%&#&#&&$&#&&#&#&#&&#&&", -" . . . . . . .. .. .... .....X.X.X.XX.XXXXXXXXXXXXXXXXXXX+X+++++++++++++++X+X+XXXXXXXXXXX.X.X....... .. . . . . . . . . . . . . . . . . . . . . . . . . . ...........o.oooXoXoXO+++++#+#+%#%#%&#%#&#&%#&%&#&#&#&#&#&#%#&%&#&%#&#&#&#&%$%%$%#&#%$%%&$%#%#&#%##%#&#&##&%$%#&#&&#&&#&&&#&&&#&&$&&&$&&#&", -" . . . . . . . . . . . . . . .. ..........X..X.XXXXXXXXXXXXXXXXX+X+++++++++++++++++++++++++++++X+XXXXXXXXXX.X....... . . . . . . . . . . . . . . . . . . . . .. . ......o.o.ooXooXo+O++O+#++####%#%##&#%$%%$&##%&#%#&#&#%#&#&##&#%$%#%#%#%#%%#&#%#%#&#%##%#&####&#&####&#&##&#&#&#&&#&&#&#&&#&&$&&#&&&&$&&", -" . . . . . ... .. ......X...X.X.X.XXXXXXXXXXX++X++X+X+++++++++++++++++++++++++++X+XXXXXXXXX.X.X...... . . . . . . . . . . . . . . . . . . . . . . . . .. ............o.o.oXoXo+XO++#+#++%#%#%#%%#&%$%&#%&$%#&#&#%#&#&#&#&#&##&#&##&#&$###%$%###%##%###########%#&###&##&#&#&#&#&%$&&$&&$&&#&&&$&#&&&", -" . . . . .. .. ............X.X.XXXXXXXXXXXXX+++X++++++%+++%+%+%+%%+%%%%+%+%+%++++%++++XXXXXXXX.X..... .. . . . . . . . . . . . . . . . . . . . . . . . ... .......o.o.ooXooXOXO+++++#+###+%#%#&#%#%%&#&#%#&#&#%#&##&####%###%###%###%#%&###%##########%#####&#$%##&##&#&#$&#&$&$&&#&&#&&&$&&$&&&&$&$", -" . . . . . . . . .. .. .......X.X.X.XXXXXXXXXXXXX+X++++++++%++%++%+%+%%+%+%+%+%%+%+%+%++++++++XXXXXX.X.X....... . . . . . . . . . . . . . . . . . . . . . . . . .. . ..........o.o.o.oXo+o++O+O#++#+#%##%##%#&##&#&#&#&#%#&##&%##%#%#%#%##%##%#%#####%#####%########&####%###&###&##&%#&#&#&#&&$&&$&#&$&&&&$&&&&", -" . . . . . . . ... .........X..X.XXX.XXXXXXXX++++++++++%+%%+%%+%%%%%%%%%%%%%%%%%%%%%%%%%+%++++XXXXXXXX.X..... .. . . . . . . . . . . . . . . . . . . . . . .. .. ......o..o.ooXooXo+o+++++##+%##%#%#&#&#%#&##&###&#$##&##############################################&###&##&#$#&#&#&&&#&&#&&&&&&&$&&&&$&&", -" . . . . . .... ....X..X.X.X.XXXXXXXXX+X+X+++++%+%+%+%%+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%+++++XXXXXXXX.X..... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ..........o.o.oooXo+o+O+O#+#+###%##&###%##&#&##&#&##%%######&###################+#+#+#+#+#+##################$%#&#&$&#&#&&$&&$&$&$&&&&$&&&&", -" . . . . . . . . ... ..........X.X.XXXXXXXXXX++X++++++%+%+%+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%+%+%++++XXXXX..X..... .. . . . . . . . . . . . . . . . . . . . . . .. .. ..........o.o.ooXoooo+o++O++#+##+%#%##%#&#&##&##&####&##&##%###############+##+#+######+###+##+##+########&##&##&#&#&#&$&$&&#&$&#&&&$&$&&&$&$", -" . . . . . . . . ..........X.X.XX.XXXXXXX+X++++++%+%+%+%%%%%%%%%%%%%%%%%%%&%&%&%&%%%%%%%%%%%++++X+XXXXXX.X...... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .............o.o.o.oXXo+o+O++++#+###%##%#%###&##&####&#####################+##+######+#O+@+@+@+#@+@################&#$#&#&&#&$&&&&&&$&&&&&$&&&&", -" . . . . . . .. ... .....X.X.X.X.XXXXXXXX+X+++++%+%+%+%%%%%%%%%%%%%=%=%=%=%=%=%=%=%=%&%%%%%%%%+%+++XXXXXX.X....... . . . . . . . . . . . . . . . . . . . . . . . . . . .. ... ..........o.o.oooooo+o+O++O#+#+#%##%#%#&#&##%##&#&####%###%######+##+#+######+@+#O+@+##+#+##O###+#O#+##########&##&#&$&#&&&#&$&$&$&&$&&$&&$&&", -" . . . . . . . .. ..........X.XXXXXXXXXXX++++++%+%+%%%%%%%%%%%%%&%=%%%=%=%=%=%=%=%=%&&%=%%%%%%%+%++++XXXXXX.X..... .. . . . . . . . . . . . . . . . . . . . . . . . . .. .. ...........o..o.ooXoXoo+o+O+++#+#+##%##&###%#&$#&######&#########+###+####+#+@+@+#O#+#O#O#O#O#+#O#O##+#@+#############&#&$&#$&&&$&&&&&&$&&&&*$&", -" . . .. ... .......X.XX.X.XXXXXXXX++++++++%++%+%%%%%%%%%=%=%=%&==%=%=%=&==%=%=%=%=%%=%%%%%%%++++X+XXXX.X..... . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . .. .. ... ..........o.o.ooooXOXO+++O+#+###%##%##%#&#&#%&##&#%#####%####+###+##+O#O#O+#+@+@+@+O#+O#+O+O#O+O#+O#O##O#######$#&$&#&#&#&&&$&&$&$&$&*&$*&&&&", -" . . . . . . . ...........X.XX.XXXXX+X+X+++++%+%+%%%%%%%%%=%%%%&%=%=%=======%========%==%%=%%%%%%%++++XXXXXX...... .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... ...........o.o.ooooXooo+OO++O+#+#+##%#%##&#%$%##&####&#%########+##+#O##+#O+#O#O#+#+O#+O#+O#O#O#+#O##O#+##+######%####&#&#&$&#&$&&$&&&&$&&&$*$&", -" . . . . .... .....X.X.X.XXXXXXXXX+X+++++%+%%%%%%%%%%%%%=&==%=%====%=%========%=%==%=%=%=%%%%%+%++X+XXXX.X...... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ... ............o..o.oo.oooo+OX++O+##+##%#%##%#%$#%#&####&##########+###+@#+#+O#+#O+O+#OOO#O+@+O#O+#O+OO+#O+#O#O#########&#&#$#&$&#&&&&$&&$&$*&&$*&&*&", -" . . . . ..........X.XX.XXXXXX+X++++%++%%+%%%%%%%%=%=%=%=%==%=%====================%=%%%%%%+%++++XXXXXX.X...... . . . . . . . . . . . . . . . . . . . . . . . . .... ... ............o.o.ooooXo+o+O++O++##+###%##&#%#&##&#&%##%##%######+#O#++@+@+#O+O#+#O+#+O#O+@+O#O+O#+#O+O#O#+#O#+####&####&#&#&#&$&$&&$&&&&&$&&$&&$&", -" . . . . . . . . . ..........X.X.X.X.XXXXXXX+X++++++%%+%%%%%%%%=%%=%=%=%==%=====================%==%=%&%%%%+%++X+XXX.X...... .. .. . . . . . . . . . . . . . . . . . . . . . . . . . .. . . .............o.o.o.oooooXoOo+O+O+#+##+#%#%#%##&#&#$%#############+#+##+#@#O+#+O#O#OO+O#O#+O+OO+O+O#O+OO#O#+O#O#+#@#######$#&$#&#&&&$&&$&&$&$&*&&&*$*&", -" . . . . ..........X.XXXXXXXXXX++++%+%++%%%%%%%=%%%&%=%=%==%=======================%=%=%=%%%%%+++++XXXXXX.X..... . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ..................o.ooo.oooo+o+O++#+#+#####%#&#&#&#&%#&#&#&#%#%###+####O#O+O#+O#O+O+++O#O+OO#O+#OO#O+OOO+O+O#O+#+@#+#+######&##&#$&$#&&$&&&$&&&&$*$&&&&", -" . . . . .. ........X.X.X.X.XX.XXX++X++++++%+%%%%%%%%%%=%=%=%==%============================%=%%%%%%%++++XXXX.X........ . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. ............o.o.o.o.oooXo+o+o+O+#O+##%#%#%##&##&##$%##############O#+#+##+O#O+O#+@O#O+O+O+OOOO+OO+O+#OO#O+O#OO#O##@######$##&#&#&&&$&&$&$&&$&$&&&&$*&", -" . . . . . . ... ........X.X.XXXXXXXXX+X++++%+%+%%%%%%%%=%=%=%==%===========================%=%=%=&%%%%+%++++XXXXXX.... ... . . . . . . . . . . . . . . . . . . . . . . . . . . .. ... ................o.o.oooooo+oo+O++O#+#+#####&#&##&#&#&#&#&##&######+##O#O#O#O#+O#O+O+O+O#OO#O+O+O+O+OOOO+O+O#O+O#+#O+#O######%$#&$&#$&#&$&&&&$&&&&&$*&&&", -" . . . . . . .....X.X..XX.X.XXXX++++++++%+%+%%%%%%&&%%=%=%==%===============================%=%%%%%%++++XXXX.X..X..... .. . . . . . . . . . . . . . . . . . . . . . . . . .. . . ..............o.o.o.oooooooXoO+O+O++#+###%#%##%##&#&#&$%$#&#&#########+##+#O+#O#O+#O#O+O+O+OOOO+OOO+OO+OOO+OOO+@+O#O########$##&#$#&#&$&&&$&$&&*$&$*&&$*$", -" . . . . ...........X.X.XXXXXXXXX+X+++++%+%%%%%%%%%=&%=%=%================================%=&%=%%%%%%++++XXXXX.X...... .... . . . . . . . . . . . . . . . . . . . . . . . ...............o....o.o.o.oooXOoOXO++O#+##+####&#&#&#&$#&#&#&#$############O#O##O#O+#OO+OO+OOO+O+OOO+OOO+OO+OO#O+O#OO#O#O@+@######$##&#$&&#$&$&&$&$&&&&$&&&&", -" . . . . . . .......X.X.X.X.XXXXX+X++++++%+%+%%%%%%&%%%=%=%==%===============================%=%%%%%%+++++X+XXX.X.X....... . . .. . . . . . . . . . . . . . . . . . . . . . .. . . ............o.o.o.oooooooo++O++O+#+#O###%#%#%#&#&#&&$&#$%&#&#&#####O#O##+#O+#O#O+O#O+#OO+O#OO+@+OO#OOO+OO+OOO#O+#O+############&#$&#&$&&#&&$&&&&$*&&&$*&", -" . . . .............X.XXXXXXXX+X+X+++++%+%%%%%%%%=%=%=%=%==%============================%==%=&&%%%%+%++++XXXXXX..X........... . . . . . . . . . . . . . . . . . . . . .. .................o.o.oo.oooooXoOXO+O+#+@+##%####&#&#&$&#&#&#&$#&############O#O##O+O+@+O+OOO+OOO+OOOO+OOO+OO+OOO+O+OO#O#O#O#O#@##&#$##&#$&#&$&&$&&&$&&$&$*&&&", -" . . . . . . ......X.X.X.X.XXXXXX+X++++%+%+%%%%%%%%&%%=%=%==%================================%=%&%%%%%%+++X+XXXX.X.X....... . . .. . . . . . . . . . . . . . . . . . . . . . . . .........o.o..o.oo.ooooXoo+O+O++O+#+##+##%%#&#&$&#&$&$&#&#&$#&#######+#O#+#O+#O#O#O#OO+OO#OOOO+OOOO+OOOOOO+OOOO#O+@+#O#######@#&#$&#&$&$&$&&$&$*&&&&&$&$*", -" . . . . ............X.XXXXXXXX+X+X+++++%+%+%%%%%&%%=%%=%=%==%=============-=-=-==============%=&&%%%%%+++++XXXXX.X.X............ .. . . . . . . . . . . . . . . . . . . .. ................oo.o.oooooooo+o+O+O#+#+####%###&#&#&#&&#&&#&$&#&##$#########O#O#O#O#+O+OO#O+OO+O+OOO+OOOO+OO+OOO#O+OO#OO#O#O##@###$#&#$#$&$&$&&$&&&&&$*$&&*&&", -" . . .. . .....X.X.X.X.X.XXXXX++++++++%+%%%%%%%%&%&&=%=%==%====================-==========%=%&%%%%%%+++++X+XXXX.X..X........ ... .. . . . . . . . . . . . . . . . . . . .. .. .......o.oo.ooooo.oooXOXOo++O+O+##+####%&#&#&&&$&#&$&$&#&$#&##&####O#O##O#O#O+O@O#O+OOOO+OOOO+OOO+OOOOOOO+OO+@O+O#O#O##O#######$#&$&#&&$&$&&$&$&&&&&$&&$", -" . . . . . .........X.X.XXXXXXXX+XX+X++++%+%+%%%%%%%=%&%=%=%==================-=-==============&=%=%%%%%+%++++XXXXX.XX........... ... .. . . . . . . . . . . . . . . . ... .. ........o..o..o.o.oooooXoo+O+O+++#@+###%#####&$&#&#&&$&&#&#&#$&##########O#+#O#O#O+O+OO+O+OOO+OOOOOOOOO+O+OO+OOOO#O+O#+#O##@#$#$##$#&#$&$&#&&$&&&&$&$*&&*&", -" . . . . ... .....X.X.X.X.XXXXXXX+++++++++%+%%%%%%&%%&%=%=&=&=%=============================&=%=%&%%%%%%%++++X+XoXXXo.XX.X......... ... .. . . . . . . . . . . . . . . . . ..............o.ooooooooXoOo+O+O++O#+#######&#&&&#&&$&&&$&#&$&$#&##$##$####O##O#O#+O#OO#OO#OOOO+OOO+O+OO+OOOOOOOOO+O+OO#O#O##########$&#$&#&$&$&$&&$&$*&&$&$&&", -" . .. .. ..........X.XXX.XXXXX+X+X++++%+%%+%%%%%%&%=%=%=%=%================-==-=============&=&&&&%%%+%+%++++XXXXoXX..o.o.......... ... .. . . . . . . . . . . .. ........o.o.o.o.o.ooooooXO+o+O+O+#+#+###%##&#&$&&#&&$&&&&&&#&&$#&#&#######O##O#O#OO#+O@+O+O+OO+O+OOO+Oo+O+O+O+O#OOO#OO#O#O#O@#@######$%$&$&$&&&$&$*&&&$&&*$&", -" . . . . . .......X.X.X.X.XXXXXX+X+X++++++%+%%%%%%%%%&%%&&&=%==%=============================&=&&&&%%&%%%%++++++X+oXXXoXo.X.o........... .. .. . . . . . . . . . . . . . . ... ...........o.o.oooooooXo+OoO+O++#+####%#%#&##&&#&&&&&&&$&$&#&$#&$###$#######O##+@+@+O@+OOO@+OO+OOOOXOoOOOOOOOOOOO+O#OO#O#O####@###$#&$&#&#&$&$#&&$&&$&$*&$&*&", -" . . . . . ...........X.X.XXXoXXXX+X++++%+++%++%%%%%%&%%=%=%=%=&=&=&===========================&==&&&&%%%%%%+%+++++XXoXX.XXX.X.o.......... .. . . . . . . . . . . .........o.o.o.oo.ooooXOoOXO+O++O+O#+#######&#&$&&$&$&$&&&&&&$&&&#&#&######O###O#O#OO#O+O#O+OOOOO+O+OOO+O+o+O+O+OOOOOO+O#O#O#O@#####$####$&$%$&&$&&$&&$&&$&&$&", -" . . . . . .. . .....X.X.X.X.XXXXXXXX+X++++++%+%%%%%%%%&%=%%&%=%=%==============================&=&&&&%&%%%%%+%+++++X+XXXoXo.oo.o..o.......... . . . . . . . . . . . . . . . .. ........o.o.oo.oooXooo+OO+O+O+######%#%&#&&&&#&&&&&&&&$&&$&#&$#&$#$########O#O#O+@+OO#O+OOO+O+OOOoO+oOoOOOOOOOO+@+@O#O#O##@###@#####&$&#$&#&$&$&$&&$&&$*&$*&", -" . . . .. ..........X.XX.XoXoXXX+X++X++++++%++%%%%%%%%%%&&&%=%=&%=%=&=========================&=&=&&&&%%%%%+%%+++++X+XXoXXXX.X.X........ ..... . . . . . . . . . . ........o..o.oooooXooXO+oO+O+O+#++#+######&#&#&&&$&&&$&&&&&&&&&&$&#&#&####@##O#O#O#OO#+OOOO+OOOOOOO+OOOOO+OO+O+OOOOOOO#OO#O@+#O####$##$#$&#&$&#&$&&$&&$&&$&&$&", -" . . . .........X.X..X.XX.XXXXXX+X++++++%+%+%%%%%%%&&%=%&%=%=%==&============================&=%&&&%&%%%%%%+%++++++o+XXoX.XoX.o.X........ . .. . . . . . . . . ... ........o.oo.oooooooOo+O+O+#+#O####%#%#&#&#&$&&&&&&&&&$&&$&$&$&#&$#&$#####O##O#O#O+#OO#+O#OO+O+O+oOOoOOoOOXOOOO+O#O+OO#O#O##@#######&####&$&$&$&$&&$&&$&&&$&&", -" . . . . . . . . . . . . .........X.X.XXXXXoXX+X+X++++++%+%+%%%%%%&%%%&&%=%=%=&=%=&======================&==&==&&&&%&%%%%%+%+++++++OXXXoX.XoX.o.o......... . . . . . . . . . . . ......o..o.o.ooooXoo+o+o+O+O+O#+#+#%###&##&$&&&&$&&$*&&&&&&&&$&&$&$&###$####O##+#O#OO#OOOOO+OOOOOOOO+OXOO+OOOOOOOOOOO#O#O#O#@+#@###$#$#$&#$&#&#&$&&$&&$&&$&*$&", -" . . . . ... .......X.X.X.X.XoXoXXX++X+++++++++%+%%+%%%%%%&%=%&%&&&&=%=&==&=&====================&=&&&&&%&%%&%%%%%+%++++X+X+oXXXoXo.X.X..o........ . . . . . . . . ..........o.o.oo.XooXOXO+O+O+#O#+#####%#&#&&&&&$&&&*&&&&*&&&$&&&&$&#&#$&########O#O#O#O+O#O+OOO+O+OO+OOOOO+OO+O+OO+OO#OOO#O##O#@##@######&#$&#$&$&#&$&$&&$&&$&&&", -". . . . . . . . . . . . . . . .. .........X.XoXoXXoXXX+X+X+++++%++%+%%%%%%%%%%%&%&&%=%=%=&=%==&=&================&==&=&&=%=%&&%%%%%+%++++++++X++oXXoXXoX.o......... .. . . . . . . . ........o.ooXooXoOXO+O+O+O+#+##+#%###&#&#&$&&&&&&&&*&&*&*&&&$&&#&$&########O#@##+O#O#O#OOO#OOOO+OOoOO+OOOOOOOOOO#OO+O#O#OO#O#+@######$#&##$&#&$&$&$&&$&&$&&$&", -" . . . . . . . ... ......X.X..X.X.XXoXXoX+X++X+++++%+%%+%%%%%%%&%&%&&&&&&&&&=&=&&==&=============&=&==&=%=&&&%&%%&%%%%%%+%#+++O++o+XoXXo.X.o.X......... . . . . . . . . . ........o.o.o.ooooo+o+O+O++#O########%#&#&$&&&&$*&$*&&&&*&&&&$&&&$&$%#&$####@###O#O#O+@O+O+O#OO+OOOO+OOOOO+oO+OO+OOOOO#OOO+##O###@#####$##$#&#&$#&$&&&$&&$&&$&&$", -" . . . . . . . . . . . . . . . .. ............X.X.XXoXXX+XX+X++++++++%++%%+%%%%%%&%&%&%=%&&&&&%=&=&&=&=&==&===========&=&=&=&%=%&&%%%%%+%%+%+#++++++X+oXXXoX.X.o...... .. . . . . . . .. .......o.o.oXoXoXoOXO+O+O#+#O#+#####&#&&#&&$&&&&*&&*&*&&*&&&&&$&&#&$#&########+#O#O#O#OOOOO+OOOO+OOOOo+OOOOOOOOOOO+OOO#+@O#O#@O#######%$#&#$#&$&$&#$&$&$&$&&$&", -" . . . . . . . . . ... .....X.X.X.XoXoXoXoXXo++X++++++%++%%+%%%%%%%&%%&%&%&&&&&&=&&=&=&=&===&==&=&=&=&&=&=&&&&&&&%&%&%&%%%%%#%+#+++O++X+XXXoXXoX.X.o....... . . . . . . .. . ........o.oooXoooXO+o+O++#O+#######%#&#&$&&&$&&*&&&&*&&&&*&$*&&$&&$&#&#$#$###@O#@+#O#O+O#+#O+OO+OOOOOOOOOOO+OO+OO+OOOO+OOOO#O#O###O###$#$##$#&$#&##&$&&$&&$&$&&$", -" . . . . . . . . . . . . . . . . . ... ..........X.X.X.XoXXXX+X+X++X+++++++%+%%%+%%%%%%&%&%&&%&%=%&&&&&&=&&&=&===========&=&=&=%=&&&&&%&&%%%%%%+%%+#+++++++o+XXoXoXo.X.......... . . . . . . .. ....o..o.X.oXoXoo+O++O#O+##+###%##&#&#&&$&&&*$&*&*&&*&*&&&&&&&&$&&$#&########O##O#O#O#OOOOO+OOOO+OOo+OOOOOOOOOOOOO+O#OO#O#O#+#O###@####&##&##&#$&$&#$&&$&$&&$&", -" . . . . . . . . . . . . . . .........X..X.Xo.XXoXoXoXX+X+X++++++%+%+%+%%%%%%%%%&%&%&&=%&&&&=%=&&=&=&=&&=%=%=%=%&=&=%&&&&&&&%&&%&%&%%%%#%+%+#+++O+X+oXoXX.X.X..o.... . . . . . . . .........o.ooooXoXO+O+O+++##O######%#&#&&#&&&$&&*&&&*&*&*&*&*&$&&$&$#&#$#########O#O#O+O+O#O+OOO+OOOOOOOOO+oOOOO+OO+OOOO+@O+O@+@@#@######$#$#$&$#&$%$&$&$#&&$&$&&", -" . . . . . . . . . . . . . . . . . . . .... ........X.o.X.XXoXXXX+X+X+X++++++++%+%+%%+%%%%%%&%%&&%&%%=%&&%=%=&&&&=&=&==&====&=&=&&=&=&&&&&&%&%&%%%%%%%#%+#+++++++++XoXoX.oX....... .. . . . . . . . . ......o..o.oXoXo+o+O+O+@+######%##%$&&$&&$&&*&&*&*&*&*&&*&&&*&&&#&&$&#&$###@##O##+#O#O#O+OO@+OOOOOO+OOoOOOOO+OOOOO+OO#O+O@+@+@+#O#@##$####&##$&#$&%$&#&$&$&&$&$", -" . . . . . . . . . . . . . . .. . . .........X...X.XoXo.XoXoXXoX++++X+++%+++%+%%+%%%%%%%%%&%%&&%=%&&&=%&&&&=&&=%=&&=%&&&=&&&=&&&&&&&&%&&%&%&%%%%#%+%#+%+++++o+XXXXXoX.o.X....... . . . . . . . . . . . .. ......o.oXoXoXoXO+O+++#+#+#######&#&#&&&&$&&&$&*&$*&&*&*$&*$&&$&$&&$#&$#######@#O@O@+O#OO@O+OOOO+OOOOOOOOOOOOOOOOOOOOOOO#OO@+@#O#####@###$#$#&#$#&$$&#&$&$#$&$&$", -" . . . . . . . . . . . . . . . . . . . .. . .......X.X.o.X.XXXoXXX+X+X+X+++++++%+%+%+%%%%%%%%&%%%&%&%&%&&%&%=&&&&&&&=&=&=&=&=&&=&&&=&=&&&&&&&%&&%&%%%%%%%%+#+#+++++o+XoX.XX.X....... ... . . . . ..........X.oXoXo+o+O+O+O##+##%#%##&#&$&$&&&&&*&&*&*&*$&&*&&*$&&&&$&#&$###$##@#+#O##O#OO#O+OOOOOOOOOOOOOOOO+OOOOOOOOOO@+OO#O#O#O#@#@@###$####$#$#&$#&#$$&#$&&$&$&", -" . . . . . . . . . . . . . . . . . .. .........X..X.X.XoXooXXoXXXOX+++++++++%++%+%%+%+%%%%%%%&%&%&%&&&&&=%&&&&&=&&&&&&&=%=%=&&&=%&&&&&&%&%&&%%&%%%%%#+%+%+%+++++X+oXXoXo.X.X........ . . . . . . . . . . . . .. ....o.oo.oXoXo+O+O+O+##+#######&#&#&&#&&$&&&&&*&*&*&**&$*&&*&$&$&$&$#&$######@#@+O#O#OOO@O#OO+OOOO+OOOOOOOOOOO+OOO+OOOOOO+@O#O#O##@####$##$##&$##&$#&$#&$#$#&$#", -" . . . . . . . . . . . . . . . . . . . . . .. .............X..oX.XoXXoXXoX+X+X+X+++++++++%+%+%%%%%%%%%%%%%%&%&%&%&%&&&&&&&%=&&&=&&&&&&%=&&&=&&&&&&&&&%&&%&%%%%%%#%+%#+#+++O+++oXXXX.X..o....... . . . . . . . . . .........o.XoXoXoX+o+O+#+#+######&##&#&$&&&&&&$&*&$*&&$*&&*&&*&$&&$&&$&#########@+@+@#O#OO#O+OOOOOOOOOOOOOOOOOOOOOOOOOOOO@+O#O#O#O###O###@##$###$#$&$#$&$&#$&$&&#$&", -" . . . . . . . . . . . . . . . . . . . . .. ........X.X.oX.XoXoXXXoX+OX++++++++++%+%+%+%%+%+%%%%%%&%&%&%&%&%&&&&%&%&&&&&&&&&&&=&=&&&&&&%&&&&&&&%&&%%&%%%%%%%%#%+#+#+++++XX+XoXoX.o....... .. . . . . . . . . . . . .. .....o.o.oXooXo+O+++O+#O##+##%##&#&#&#&$&&&*&&&*&&*&*&*$*&$&&*&$&&$&#$&#$###@#@#O#O#OO#OOO#OO+OOOOOOOOOoOOOOOOOOOOOOO+OOOOOOO#O#O@O##@######$####$#&$#$#&$##$$&$#", -" . . . . . . . . . . . . . . . . . . . . . ............X..o.X.oXoXoXXoXXOXX++X++++++%+++%+%+%+%%%%%%%%%%%%%%%%&%&%&%&&&&&%&&%&&&&&&%&&%=&%=%=%=%=%&&&&%&&%&%&%%%#%%#%+%+#+++++OXoXoXoX.X.o......... . . . . . . . . . . . .....o..o.o.oXoXo+o+O#+#+########&#&#&$&&&&&$&&*&&&*$&*$&*&&&*$&$&&$&#$%$######O#+@#O#O#OO#OOOOOOOOOOOOOOOOOOOoOOoOOOOOOOOO#O#O#O#O#@#@##@#@####$#$%$#$#&#$#$&#&#$&", -" . . . . . . . . . . . . . . . ... . ...........X.Xo.X.XoXXoXXXX++o++++++++++%++%+%+%%+%%%%%%%%%%&%&%&%&%&&&%&&&&&&&&&&&&&&&&&&&&%=%&&&%&&&&&%&%&%%%&#%%%#+%##+#+++O+X+oXoXo.X.o....... . . . . . . . . . . .. .........o.XoXoXo+X+O+O+#O#+###%#%#&#&$&&&$&$&&&$&&$*&*&&*&&$*&$&&&$&$&$%$##$#####@+@O#O#OOOOO+OOOOOOOOOOOOOoOOOOOOOOOOOOO+OOOOO+@O##O#O#@#####$#####$##&$#$&#&$$#&$#", -". . . . . . . . . . . . . . . . . . . . . . ...........o.o..o.XoXoXXoXX+o+oX++X++++++++%+%+%+%+%%+%%%%%%%%%%&%%&%&%&%&&&%&%&&&&&&&&&&&&&&&&&%&&&&&&&%&&&%&%&%&%%%%%%%#%+%+#++++o+XXXoXX.X.o....... .. . .. . . . . . . . . . ......o.o.o.ooXoXOo++O#++###%####&#&#&#&$&&&&&&&&&&&&&*$&*&*$&&&&$&&##&#&#####@#O#@+#O#OO#O#O@OO+OOOOOOOOoOOOOOOOOOOOOOOOOOO+O#O#O#O#O#O#@#@#@###$#$#&$#$&##$##&$#$&", -" . . . . . . . . . . . . . . .. ............o..X.XX.XoXXoXoXXo+X++++X++++++%+++%+%+%%+%%%%%%%%%%%%%%%&%%&%&%&%&&%&&%&%&&&&&&&&&&&&&&&&%&&&&&&%&&%&%&%%&%#%%#%%##+#++++++o+oXooo.o......... .. . . . . . . . . .. ..........o.oXoXoo+o++O++#O######%#&#&$&#&&&&$&&$&&$*&$*&&&&$&&&&$&$&&$&$#$##$######O#O#OO#OOOOOO+OOOOOOOOoOOOOoOoOOoOOoOOOOO#OOOOOO#O#O##@#O#####$####$#####$#&$#$##&#", -". . . . . . . . . . . . . . . . .. .... ........X.X.X.oXX.XoXXXoX+XOX+o+++++++++%+%++%+%+%%+%+%%%%%%%%%%%%%&%%&%&%&%&%&%&&&&%&%&&%&%&%&&&&&&%&%&%&&%&&%%&%%&%#%%#%+##+#O++o+XoXoX.oX.X.o....... .. .. . . .. . . . . .. .........o.o.o.XoXoXOXO++O#+#+###&###&#&#&$&$&&&&&&&&&&&&$*$&&*$&$&&&#$&#&#%$#####@#@#O#OO#OO+OO+OOOOOOOOOOOOOoOOOOOOOOOOOOOOOOOO#O#O#OO#O@+@#@#@#@##$###$#$#$#$#&##&$#$", -" . . . . . . . . . . . . . . . ... ... ........o.o..o.XoX.XXXXoX+X+o+++++++++++++++%+%+%+%%+%%%%%%%%%%%%%%%%%%%&%&%&%&&%&&%&%&&&&&&&&&&&%&%&%&&&&&&%&&%&%&%%#%%%%#%%#+%++++++O+XoXoXo.o.o......... .. . . . .. . . . . . ............o.oooooo+o+O++#+#########&#&$&#&&#&&$&$&&$&&$*&&&&&$&&&&$&$&&#$#$######@#+@+@+@OO#OO#OOOOOOOOOOoOOOOOOoOOoOOOOOOOOO+OOOOOOOO#O#O#@+#@########$####&##$#$#$##$#", -" . . . . . . . . . . .. .. ............X.X.XoX.XoXoXoXX+o+++X+++++++++%+%+%++%+%+%%+%+%+%%%%%%%%%&%%&%%%%%&%%&%&%&%&%&%&%&%&%&%&&&&&&%&%&%&&%&%&%&%&%&%#%%#%####+#O+X+oXXoXoX.o.o.......... . .. . . .. . . . .... ........o.o.X.oXoXo+O++O#O##+##%#&#&#&#&&$&&&&&&&$&&&&&$&&$&$&&$&$&&&$#&$&%$#######@#O#O#O#OOOOOOOOOOOOOOOOOoOoOOoOOOoOOoOOOOOOOO+O#O#O#O@+@#O#@#@#@#$####$##$####$##$##", -" . . . . . . . . . . . . .. . ............X.X.o.Xo.XoXXXXXo+XOX+X++++++++++%++%+%+%+%+%+%+%%%%%%%%%%%%%%%%%%%%&%%%&%%&%&%&%&%&&%&&%&%&%%%&%&&%&%&%&%&%%&#&#%#%%##%+#+#+#+++O++oXoXooo.o..o........... .. . . .. ... .. ..........o.o.oooXoo+OXO+O+#+#########&$#&$&&#&$&&&&&&$&&&&&$&&&$&&$&$#&#&###$###@#@+@+@+OOO+OO#OOOOOOOOOOOOOoOOOOOOOOoOOOOOOOOOOO+OOOOOOO#O#O@+@#O##@##@##$###$##$####$###", -". . . . . . . . . . . . .. .... ........X..o.X.X.XX.XoXoXoXX+X+++o+++++++#+++%++%+%%+%%%%%%+%%+%%+%%%%%%%%%%%%%%%&%%&%%%&%&%&%&%&%&%&%&&%&%&%&%&&%&%%&%&%%%&%%#%%##%###++O+++o+XooX.X.o.o.......... ... ..... .. . ............o..o.ooXoooXo+O+++#+######&#&&#&$&&#&$&&&&$&$&&&$&$&&$&$&&$&#&$&#$#$#######@##O#O#O#O#OOOOOOOOOOOOOoOOOoOoOoOoOOOOoOoOOOOOOOOOO#O#OOO#O@#+@#@#@###@#########$#####$", -" . . . . . . . . .. .............oX.o.XoXoXXXXoX+X++o+++++++++++++%+%+%+%+%+%%+%+%+%%+%%%%%%%%%%%%%%%%%%%%%&%%&%%%&%%%&%%&%%&%%&%&%&%&%&%&%&&%#&%&#%#&%#%#%#+#+#+++O+o+oXoXooo.o............. .. . .....................o.oo.oooXo+O++O+O#+##+####&##&$&&$&&&#&$&&&&&$&&&&$&&$&$&#&$&##&#&#####@#@+#O#OOO+OOOOOO+OOOOOOOoOOOOOOOOoOOOOoOOOOOOOOOOOO+OOO+O#O#O#O@@#O#@##@##@#@#@######$####", -" . . . . . . . . .. .........X.X.X.XoXoXoXoXoX+X+o++X++++++++#+%++%+%+%+%%%+%%+%%%%%%%+%%+%#%%%%%%%%%%%%%%%%%%%%&%%%&%%&%%&%%&%&%%&%&%&%%&%%&%&#%%&%%#%#%#%#+#+#O++O+XOXoXo.X.o.o.o.................. .. ..............o.o.oXooXOXo+O++#+#######&#&$&#&#&&$&$&&&$&$&&&&#$&&$&#&$&$&#&$##$##$####@#O##O#O@O#O+OOOOOOOOoOOOOOoOoOoOOoOoOOOoOOoOOOOOOOOOO#OOOO#O#+#O#@#+@#@##@###@#$#@####$#", -" . . . . . . .............X.o.Xo.Xo.XoXoXXo+Xo+++X+++++++++++%+%+%+%%+%++%%+%%+%+%+%%%+%%%+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%%%&%%&%%&%&#%&#%%&%#%#%%#%#+##%+#+++O++o+ooXoXoo.o.o.................................o.oo.o.ooooXoXO++O+++##+##&#&##&#&&&&$&&&&$&&&&$&$#&&&$#&$&##&##$########@#@+@#O@O#O+OOOOOOOOOOOOOOOoOoOOoOOOoOOoOOoOOOOOOOOOOOOO#OOO#O#O#O@O#O#O##O##@#@#@##@##@#@#@#", -" . . . . . .........o.X.X.XoXoXXoXXoXXo+++o++++++++#+#+%+#+%+%++%+%%+#%+%%+%%+%+%%+%#%%%#%#%%%%%%%&%%%%%%%%%&%%%%%%&%%%%%%%&%%%&#%%%&#%&%#&#&%%#%%%#%##+#+#+++O+o+ooXo.oo.o..o.............................o..o.o.oooooXo+o+O+++O#+########&$&#$&$&&#$&&$&$&&#&$&$$&$&#$&#$#$%$##$#####@#@#O#+#OOO#OOOOOOOOOoOoOoOOOoOOoOoOOoOOoOOoOoOOoOOOOOOOOOOO#O@OO#+@#O#O@@#@@##@##@#@##@#@##", -" . . . . . ..........X.X.o.XooXoXoXoXXo+++X+X++++++++#++%+%+%+%+%%%%%%%+%%+%%%%+%%%%+%%%+%#+%%%%#%%%%%%%%%%%%%%%%%%%%%%%%%%&%&%%#&%%&%&#%&#%&%%#%#&#%#%#+#+#+#+O+O++OXoXoXoX.o.o..o..........................o..o..o.oXooXoXOXO++O+#+####%#%&#&#&#&&&&$&&&$&#&&$&$&#&#&##&$##&###$######@##O#O#O#OO#OOOO+OOOOOOOOOOOOoOoOOoOOOoOoOoOOoOOOOoOOOOOOOO+@OOO+O#O@O#O#@#+#O##O#@#@##@#@##@#@", -" . . . . .. .....o..o.X.o.XX.XoXXXXoX+o+O++++++++#++%+%+%+%+%#%+%+%+%%+%%%%+%%+%+%#%+#%+%%%+%%+#%#%%#%#%#%#%#%%%%%%%%%#%#%#%#%%#%%#%%&#%&##&%#&%#%#%#%#%###+#+O+OXO+oooXooooo.oo...o......................o..o.o.ooo.oXooXo+O+O+#++#+###%##&#%$&&&#$&&$&&$&&$&#&#&$&$&$##&$#$&######@##@##O#O#O#OO@+OOOOOOOOoOoOoOoOOOoOOoOoOOoOOOoOOOoOOOOOOOOOOOO+O@O#OO#O@+@+O@@#+@@#@@#@#@#@#@#@#", -" . . . . . ............X.X.XXoXoXXXoXo+X+X++++++++++++%++%+#%+%%+%+%%%#%%%%%+%+#%+%#%+%%%%%%%+%#%+%%+%%+%%#%%#%%#%#%#%##%#%#%%%#%%#%%&%%#%%#%%%#%%#%%#%#%#+##+#++#+O+O+o+oXoX.o.oo..o.o..o............o.o.o.o.o.o.o.oo.XooooXO+o++O++##+###%##&#&&#&$&&&$&&$&&$#&$&$&$%####&#############@#O@+@O#OOOO+OOOOOOOOOOOOOOOoOOoOOoOOoOoOOoOoOOoOOOoOOoOOOOOOOOO+OOO#OO#O@O#+@O#@+@+#O#@#@#@#@#@", -" . . . . . . . ........X.X.oo.XoXXoXoXXOXO+X++++++++#+%+%+%+%#%+#%%%%#%%%%%+%%%%%%%%%+%%+%+%+%#%+%%+%%+%%#+%+%+#%+#%+%#%%#%#%##%#%#%%#%#%&#&#&#&#&%#&#%#%#%#%#+#+#O+++O+OoXoooXooo.oo.o.o..o.o.o.o.o.o..o...o.o.oo.ooooooXooXOXO+O++#O#+##%###&%$&#&$&&$&#&$&&#&$&&#&#&#&$&#$#$##$#####@#@#O##O@+OO#O#OOOOOOOOOoOoOoOoOOoOoOoOoOOoOoOoOoOoOoOOoOOOOOOOOOOOOO#OOO#O+O#O@O#@O#O@@#O@O#O@O#O#", -" . . .. . .........X.X.oXoXXXoXXoXX+++++++++++++#+%+%+%+%#%+%%%%%#%%%%+%%%%#%+%%+#%%%+%%+#%%+%+#+#%+#%+#%#%#+%%+%%+#%+#+%#%#%#%#%#%#%#%#%%#%#%#%##%#%#%###%###+#+#+O+OXO+oXoooo.oo.o.o..o.o.o....o..o.o.oo.o.oo.oo.o.oXooXoOXO+XO+O+#+#####%#&$&#&&#&$&&&$&&$&&$&$&$#&$###########@#@##O#O#O#O+@OOOOOOOOOOOOOOOOOoOoOoOoOoOOoOoOOoOoOOOoOOOOoOOoOOOOOOOOO#OOO#OOO#OO#O#O+@#O#O#@#O#O##O@@", -" . . . . . . .. . .......o.X.X.XoXXoX+XOXo+X++++++#+%+%+%+#%%+%%%#%%%%%+%%%%%%%%%%%#%%%+%%#+%%#+%#+%%+#+%+%+%+#+%#+##+#%#+%%#%+#%#%#%#%#%#%#%#%%&%%&#&%#&#%#%##%+##+#+O++O+OXOoXoXoooooo.o.o.o..o.o.o..o.o.o..o.o.oo.oooooooXOo+o++O++#+#+##%##&#&#&#&$&&&$&$&&$&#$&##&#&#####$##########@#O##O#O#OO#O+OOOOOOOOOOoOoOOoOOoOoOoOoOOoOoOoOoOoOOoOoOOOOOOOOOOOOOOOOOOO#O@O#O+@+@@O#O#O@O#O#@O@#O", -" . . . . . .. . .......X.X.XoXoXoXXoX+XO+X++++O++#++#+%+%#%%+%%%%%%%%#%%%%%%#%%#%+%#%%+%+%#+%%+#+%#+%+#%+#+#+#+%+##+%+%#+%+#+#+###+##%###%#%#%#%#####%#%#%#%#%#%+##+#+#+#+O+O+OXOoooooo.ooo.oo.oo.o.oo.oo.o.o.ooooooo.oooooXoXoXO+O+O+O#+#######%#&#&&&$&&$&&&$&$&&&&$&#&$#&$#&###$#@#@#@O#O#O#O#OOOO+OOOOOOOOOOoOoOOoOoOoOoOoOoOoOoOoOoOoOoOoOOoOOoOoOoOOOOOOOOOOOOOOO+OO@OO@+O#O@O#O#O#O#O#O#", -" . . . . . . .. ........X.X.oXoXoX+oX+X++++++++++%+%+%+%+%%%%%#%#%%%%%%%%%%%%%%#%%%#%%#%%%+#+%%#+%#+#+%+%#+%+#%+%+##+%+#+#%+#+#+%#+#+%%#%#%#%#%%#%%#%#%#%#%#%##%##+#+#O++O+XOXOXooXoooo.ooo.o.o.oo.o.o.o.ooo.o.o.ooooooooooOo+OXO+O++#+@+######&#&&#$&&$&&$&#&&&#$&%$&$%$###########@#O##O#O#OO#O#O@OOOOOOOOOOOOOOOoOOoOoOoOoOoOoOoOoOoOOoOOoOOoOoOOOOoOoOOOOOOO#O+OOO#O+O#OO@O@O#O#O#O@O@O#O", -" . . . . . . . . . .. . ......X.X.o.XXXXoXXX+++++++++#+#+#+%#%#%%%#%#%%%%%%%%%%%%#%%%%%%%%+%%%+%+#%%%+#+%+#%+%+#+#+%+#+#+#+#+#+#+%+#+#%+##%####+####%####%##&##&##%##%###+##+#+#O++OO+oOXOooooooooooooo.oo.ooooooo.ooooooooooooooXOXOXOXO+O+#O#+#####%#&#&$#&&&$&&$&&$&$&&$#&#&##&#$##$##@#@+@+#O#O#OO#OO#OO+OOOOOOOoOoOooOoOoOoOoOOoOoOoOoOoOoOoOoOoOoOOOOoOoOOOOOOOOOOOOOOO#OOO@OO+@O+@O@O@O@O#O#O@O", -" . . . . . . . . . . . .......X..X.oXXoXooX+o++o+++++#+++%+%%+%+%+#%%+%%%%%%%%%%%%%%%%%#%%#%%#%+%#%%++#+%#+%#++#+#+%+#+#+#+#+%+#+#+#+#+#+##+#+%+###%#%##%#%#%###%##%##%##%###+##O#+#O+O+o+OoXoooooooooo.oo.ooo.o.o.ooo.ooooooooooooooOXOO+O++O+#O#####%###&#&&&$&&$&&&$&&&#$&&&#$&#$#########O#@#O#@+O#+O#OOOOOOOOOOoOOOOoOOoOoOoOoOooOoOoOoOoOoOoOoOoOOoOoOoOOOOoOoOOOOOOOOOOOOOOOOO@O+O@OO#OO#O#O#O#O@", -" . . . . . . . . . . . . .. .......X.X.XoXXXXXX+X+++++++++#%+%+%%%%%%%%%%%%#%%%#%%%#&%%%%%%%%%%%+%#%+%+%#%+#+#++##+%+#+#++#++#+++#++#++#++#+#+#+#+#+#+#+##%####%#%#%#%#%##%##%+##+#++O++O+O+Oo+Ooooooooooooooooooooooooooooooooooooo+o+OXO+O+O+#O#+##+####&#&$&$&$&&$&&$&&$&$&&$#$&#########@#@##O#O#O+@OOO#OO+OOOOOOOOOOoOoOOoOOoOoOoOoOoOoOoOoOoOoOoOoOoOOoOoOoOoOOOOOoOOOOOOOOOOOO+OO+OO@OOOO#OOOOOO@OOO", -" . . . . . . . . . . . . . . . .. .......X.o.XoXoXoXo+o+++++++#+#+%+#%#%#%%%%%%%%%%%%%&%&%&%%%$%%%#%#%#%#%%%##%+#+%+#+%#++#+#++#++#++#+#++#++#++#++#+#+#+##+###%##%#%###%##%###%##%####+#+##+#O+O+OO+oOo+oooooooooooooooooooooooooooooooOoOoOoOO+O+O++O#+########&#&#&#&&$&&$&&$&$&&$&#&%$&#$&#######+@+@+O#O@+O#OOOOOOOOOOoOOoOoOoOoOooOoOoOoOoOoOoOoOoOoOoOoOoOoOoOOoOOoOoOoOOOOOOOOOOOOOOOOOOOOOOO#OOO#O#O#OO#O", -" . . . . . . . . . . . . . . . . . . . . . .........XXXoX.XX++X++++++++++%+%+%%%%%%%%%%%%%%&%%&%%%&%%&%&%%&%%%#%%+%+#+%+#%+%+#+#++#+#++#++#+++#+O++#+O#++#+O#++@+#+#+#+#+#+#####%###%#&#%##%##%###+##+O+++O+O+oO+ooOoooooooooooooooooooooooooooooOXOXO+O+o+O+O#O#+##+###&#&$#&$&&$&&&$&&$*&&$&&$&$##$#######@@#O#O#O#O+OOOOO+OOOOOOOOOOoOOoOoOoOoOoOooOooOooOooOooOooOoOoOoOoOoOOoOOoOOOOoOOoOOOOOOOOOOOOOOOOO#OO#OOOOOOO#OO", -" . . . . . . . . . . . . . . . . . . . . . ... .....X.X.o.oXXo+Xo+X++++++#+%#+%#%#%#%%%%%%%%&%%&%%&%&%%&%%%&%%%#%%#%#%#%#%+%#+#+#+#+#+#++#++#++#+O++#+O+++O+O+++#+#+@+#+##+###+#%###%#%#####%##%##+#+##+#+##O+O+O+Oo+Oo+oOoooooooooooooooooooooooOo+OoO+oOo+O+O+O+#+#O######&##&#&$&&&$&&$*&$&$&&#&$&#&#%$###@##+@#O#O#O#O#O#+OOOOOOOOOoOoOOoOoOoOoOoOooOoOoOoOooOooOoOoOoOoOoOoOoOoOoOOoOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@O@OOOO", -" . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . ........X.X.XXoXXX++++++++#+#+#+%#%%#%%%#%%%&%&%%&%&%&%&%&%&&%%%%%%%#%%#%+%%+#+#%+#+#+++++#+++#++O++#+O++#+O#+#+#+O+O++#++#++#+#%##+######%#%#%##%##%####+#O#+O+#O+OO+OoOoOooOooooooooooooooooooOoOoOoOo+OO+O+O+O+O#O#O#########&$&$&#&$&&&&&&$&&&$&$&##&$#$######@#@+#O#OOOOOOOOOOOOOOoOOOoOoOoOOoOoOooOoOooOooOoOoOoOoooOooOoOoOoOoOoOOoOOoOOoOOOoOOOOOOOOOOOOO#OOOOOO@OOOOOO#OO", -" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .......X..o.XXoXX+o+XO+++#++%+%%%+%#%%#%%%%#&%%%%&%&%&%&%&%&%%&%&#&%%%#%%#%#+%#%++#+#++#+#+++#++O++#O+++#+++++++++++#+#++@+#+#+#+#+#####%#%#%#%##%######+#####+#+O++O+o+O+Oo+OooOooOoooooooooOoOoOoOoOoOOO+oOO+OO+O#O#+#+#####&#&#&#&$&&&$&$&$&&&$&&$&#$&$#######@##+@#O#OO#O#O+OOOOOOOOOOOoOOOoOooOoOoOooOooOooOooOooOooOoOoOoOoOoOoOoOOoOoOOoOOOoOOOOOOOOOOOOOOOOOOO#OOOO#OO#OOOO", -".. . . . .. .. . .. . . . .. . . . . .. . . .. . . .. . . . . . . . . . . . ... ......X.XoXoXXoX+X+++++++#+#+#%%%%#%%%%%&%%&%&%&%&%&%&%&%&&%%%%%%#%%%#%+%##%+#+#++#+#+++#+O++#+++++O#O+O+@+O+O#O#O+O+#+#+O#+##+##+#%+##%###%#&##%#%#####+#+#O#O+#O+OOOoOoOoOXOoOooOoOOoOOoOoOoOoO+O+O+oOO+O+O+O+O+#+#########&#&$&#&$&$&&&&&$&&&$&&$&##&#&#$####@@#@+@O#OO+OO@OOOOOOOoOoOOooOoOOoOooOoOooOooOooOooOooOoOooOoOoOoOOoOoOoOOOoOOOoOOOOoOOOOOOOOOOOOOO#OOOOOOOOOOO@OO", -". . ... .. . .. .. .... ... . ... .... ... .. . ... . . .. . . . . . . . . . . . . . ......X..o.X.XXoX+X+O+++++#+%+%%+#%#%%%%#&%%&%&%&%&%&%&%&%&%&%&&#&%%%%#%#%#+%+#+#+#+#+++#O+++#++++@+O+++++++O+++O++++#+O+O#+#+#+#+##+###%##%#%##%#%###%+###+##+#+#+O+O++O+O+OoOoOoOOoOoOoOoOOoOoO+oOoOoO+O+O+O+O#O##O#O#@####&##$&#&$&&&&&$&$&*$&$&&$&$&#$#$####@#+#O#O#O#O#O@+OOOOOOOOOOOOoOOOoOoOoOoOoooOooOooOooOooOoooOoOooOoOoOoOoOoOoOOoOoOOOoOOOOoOOOOOOOOOOOOOOOOOOOOOOOOOO", -"................ ... .... ..... ... .... ... ... . . . . . . . . . . . . . .. ..........o.X.XoXoXXo+++++++#+%+%#%%%#%%#%%&%&%&%&%&%&%&&%&&%&%&%%%%%#%#%%#%%#%#+#%+#+++#+O+++O++O+O++O++OO+O+O++O++O+O+O+#+++#+#+#+######%##%###%##%##%########+#O#O+#O+OO+OOo+O+OXOoOoOoOoOoOo+OOOOO+O+O+OO+OO+O#+#O###########&#&#&&&$&$&&&&*$&&&&$&$%$#&########@#@#O#O#OOOOOOOOOOOOOoOoOoOooOoOoOooOoOoOooOooOooOooOooOooooOooOoOoOoOoOoOoOOOOoOoOOoOOOOOOOOOOOOOOOOO#OO#OO#OOO#O", -"..................................... .... ... .. ... . ... . . . . . . . . . . . . . . . . . . .....X..XoXoXXXX+X+++++#+%#%#%%#%%%%%%&%%&%&%&%&&%&&%&%&%&&%&%&%%&%%#%#%#+#+%#+#++#O+#++O#++O+O++O++O+++O+O+O+O++O+O++O+@+O+O+#+#+#+#+##%##%#%#%##%#%#%###+###+#+#O+O#+O+O+O+OoO+O+O+OO+OO+OO+o+O+OOO+OO+O+#O#+@+#O#O######&##&$&$&$&$&&$&$&&&$&$&&$&&#$&#$#$####O#O#O#OOO#O+OOOOOOoOOOOOOoOOoOoOooOoooOooooOoooOooooOoooOoOoOoOooOoOoOOoOoOoOoOOOOOOOoOOOOOOOOOOOOOOOOOOOOOOOOOOO", -"................................................... .... . . . . . . . . . . . . . . .........o.oX.X.XoXOX++++++#+%+%+%#%%%#%%&#%&&%&%&&%&%&&%&&%&&%%&%&#%#%#%%#%#%#%+#+#+#+++++O++O+++++O+O+O+OO+O++O+O+O++O+@++@++#+##O#+#+#######%##%##%###########+##O#+#O#O+O+OOOO+OOoOOoOO+OO+OOOO+OO+O+O+O+#O+O#O#+@+#########$#&$%&#&&&&$&&&&$&&&&&$#&$#&$#$%###@#@#+#@O#O#OOOOOOOOOOOOoOoOoOoOoOoOoOoOoOooOoooOooooOoooOoooooOooOoOooOoOoOoOoOoOOoOoOOOOOoOOOOOOOOOOOOOOOOOOOOO#OOO", -"X..X.X..X..X..X.X..X............................ ...... .... . .. . . . . . . . . . . . . . .. . ......o..ooXoXXX+o+O+#++#+%#%#%%#%%&#%&%&%&%&%&%&&%&%&%&&%&&%&%%&%&#%#%#+%#+##+#++#+#O++O+++O+O+O++O+O++O+O+O+O+O+O++O+O+@+O#O++#+###+#%#%###&##%##&#%#%##+###+##+@+#+O#O+O+O+OO+O+O+O+OOOO+O+OO+OOOO+O#OO+O#+#O#+#########&###&$&$&$&$&&&$&*&$&$&&$&$&####$####@##O#O#OOO+OO+OOOOoOOOOOOoOOoOoOoOooOoooOoooOoooOoOooOooOoOoOooOooOoOoOoOoOoOOOoOoOOOoOoOOOOOOOOOOO#OOOOOOOOOOOOOOO", -".XX.X.X.XX.X.X.X.X.X.XX.X.X.X.X..o.o.o............... ... . .. . . . . . . . . . . . . . . ........o.X.XoXoXoXOX++++++#+%+%%#%#%%#%&%&#&%&&&&%&&%&&&%&%&%&%&#&#%#%%#%#%###+#+#+#+O+++O++O+O+O+O+O+O+O+O+O+O+O+O+O+OO+O++O+++#+@+#+####+###%##%##&#############O###O#O#+O#O+OO+OOO+OOOO+O+OOO+O+O+O+#O#O+##@+@+##@#O######$#&#&#&&&$&#&&$&&$&&&$&&$&#&$#&$#######O#@O#O#O#OOOOOOOOOOoOoOoOoOoOoOooOooOoooOoOooOooOooOooooooOooOoOooOoOoOoOoOoOoOOOoOOOOOOOOOOOOOOOOOOOOOOOO#OOOOOOO", -"XX.XX.XX.XX.XXX.XX.X.X.X.X.X.X.oX..X..X.o.o................. .. . . . . . . . . . . . . . . .. .......o.oo.XoXo+X++++++%+%+%#%#%%%%%%&#%&%&#&%&&%&&%&%&&&%&%&%&%%&%&#%#%##%+##+#+O#+#+O#+O+O++O+O++O+O+O+O+O+o+O++O+O++O+O++@+O#+#+###+####%##%##&#%##%##%########+##+#O#O+O#O+O+O+OO+O+OOO+O+O+@O#O#OO#O#OO#O##O#O########&##$&$&#$&&&$&&$&*$&$&&$&&#$&#$%$#####O##O#O#OOOOO#OOOOOOOOOOOOOoOoOoOoOoOoOoOooooOooOooOooooOoOoooOooOoOoOooOoOoOOoOoOoOOOoOOOOOoOOOOOOOOOOOOOOOOOOOO#OO", -"XXXXXXXXXXXXXX.XXXXXXXXXXoXXoX.X.XX.Xo.X..o.o.o............... .. . . . . . . . . . . . . . . . .........o.o.XoXoXXo+o+O++#++#%+%#%%#%#&#&%&%&%&&%&&&%&&&&%&%&&#&#&%$%#%#%#%##+##+#+#++O+O+O+++OO+O++oO+o+O+o+O+O+O+OO+O+OO+O#O+O#+@+##+#+#########%###&###############O##O#+#O#O+#O#O+O#O+@+O#O#O@+O#O+#O#+#O###+#@#########$##$&##&$&&$&$&&$&&&&&&$&&$#&$########@##@+#O#OO#O+OOOOOOOOoOoOoOoOoOoOoOoOoooOooOoooOooOoooOoOoooOoOooOoOooOoOoOoOoOOOOoOOoOOOoOOOOOOOOOOOOOOO#OOOOO#OOOOO", -"XXXXXXXXXXXXXXXXXoXXXoXoXXXX.XXXX.XoX.X.oX.X.o..o.o............ .. . . . . . . . . . . . . . .. .....o..o.XooXoXo+o++++#++#+%#%%#%%#%%%&%&#&&%&&%&%&&%&%&%&&%&%&%&%%%%%#%##%##+#+#+O+#O++O+OO++O+o+O+O+OXO+O+o+oO+o+O+O++O+O+O++O+#+@+######%##%###&##&##&#%#%#####+##+###O#+#+@+O#O+@+O#O+@+O+@+@+#O#O#O#O##O#@##+##########&%$&#&$&#&$&&$&&$&$&$&&#&$&#&$&#$#$####+@#O#O#OO@OOOO+OOOOOOOOoOoOoOoOoOooOooOoooOooOooooOooooOoooooOoOooOoOoOoOoOooOoOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", -"+X+X+X+X+XX+X+X+XXXoXXXXXXXXXXoXXoXoXXoXX.X.X.X.o..o............. ... . . . . . . . . .. . . . . .. .........o.o.oXoXo+X++O+++#+%#%#%#%%#&%$&#&%&%&%&%&&&%&&%&&&#&%&#&#%#&###%##%+#+#+#+O#+++O++O+O+OXO+Oo+o+OO+oOoO+O+oO+Oo+OO+O+O#O#+@+#+##+######%##&##%##&###&###########O###O#O#O#O+#O#O#O#O#O#O#O#O#+@#+####O##+##@#####$#$&$#$#&$&#&$&&$&&&$&&&&&$&$&#&$###$%###@#@@+@+@O+O+OO+OOOOOOoOoOoOOOoOoOooOoOoOooOoOooooOoOoooOoooOoOoOoooOoOooOoOoOOOoOOoOOOoOOoOOoOOOOOOOOOOOOOOOO#OOOOOOO", -"+++++++++++X++X++X+++X+XXX+oXXXXXXXXXoXXoXoXoXo.X.o.o.o........ .... .. . . . . . . . . . . . . .. .........o.o.XooXoXo+O++++#++#%+%%%#%%%%&%%&#&&#&&&&%&&%&&%&%&%&%&%&%&#%%%#%##+##+#+#++O+O+O+O+OXO+Oo++oOo+oO+o+Oo+oO+O+O+O+O+O+O++O+@+#O###+##########&#&##&##&##%#########O##O#O#+#@+@+#O#O#O#O##O##O@#O#@#O###########$##$##&#&$&#$&$&&#&$&$&&$&$&&$&&#$&#&$#######+@#O#O#O@O#OOOOOOOOOOOOOOoOoOoOoOoOoOooOoooooOoooooOoooOooooooOoOoOoOoOoOoOooOOoOOoOOoOOOOOOOOOOOOOOOOOOOOOOOOOOO@O", -"+++++++++++++++++++X++++++++++X+oXXXXXoXXXoX.X.Xo.X.o..o........... .. . . . . . . . . . . . . .. ..........o..oXo.XoX++o++O+#+%#%+%#%%%#&#&%&%&%&%&&%&%&%&&%&&&%&$%&#%#&#%#%####+#+#+O#+O+#O++O+O+O+oOXOoO+o+oOXOOXO+OO+oOXO+O+O+O+O#O#+O##+######%##%&##&###$#&#$##&############O###O##O#O#O#+@+#O#+@#+@##+##O######@########$%$#$#&$#&$&$&$&&&$&&$&&$&$&&$&#$####$##@#@#+#@O#OO+OOOO+OOOOoOOoOoOoOoOoOoOooooOoooOoOoooOooooOoOooOoOoOooOooOoOoOoOoOOoOOoOOOOOOOOOOOoOOOOOOOOOOOOOOOOO#OOOO", -"%+%+%+%+%+%+%+%++++++++++++X++X++++XoXXXoXXXoXoXoXoX.X.o.o............ .. . . . . . . . . . . . . .. . ....o..o.o.oXoo+oo++++++#++#%#%#%#%%&#&%$%&#&&%&%&&&&%&&$%&&%&&%&&#%&#%#%+%###+#++#+O++O+O+O+o+OXO++OXOoO+Oo+oOoOXOo+O+OOO+O+@+O+O+#+#O##+####%######&#&#&###%$##&#######O####O###O#####@##@##@##@####@################$&##&#&$#&&$&#&$&&$&&$&&&$&&&&$&#&$&#$#######O@#O#O#O@O#OOOOOOOOOoOOOoOOoOoOoOoOoOoOoOooooOooooOoooooOoooooOoOoOoOooOoOoOoOoOOoOoOOoOOoOOOOOOOOOO#OOO#OOOOOOOOOO", -"%%%%%%%%%+%%+%+%%%%%+%+++++++++++X++++o+XXoXXoXoX.oXo.o.X..o...... .. .. . . . . . . . . . . . ... .. .........o.ooXooXoXO++O++#+#+#%#%#%%#&#&%&%&&%&&%&&&%&%&$%&%&#&%$%$%%#%#%#####+#+#O#O+O+O+O+O+oO+OXO+oo+oO+oOo+Oo+o+oO+OoO+o+OO+O+O#O#O+@+#+########&#&##&##&#&$%#&################O###O##O#+##+@#+##O#########@####$##$###$#$#$#&$#$&$&$&$&$&$&&$&&$&$#&$#&#$##&##@##@##O#O#O+OOOO#OOOOOOOOOoOOoOoOoOooOoOooooooOooooOooooOooooOoOoooooOoooOoOoOoOoOOoOOOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", -"%%%%%%%%%%%%%%%%%%%+%%+%%%%+%+++++++++++o+XOXXXXoXX.oX.Xo.o................ . . . . . . . . . .. ............o.o.ooo+oXOX+O++#+##+%#%%$%%&%%$%&%&%&&%&%&&&%&&%&&&#&%&%&%$%###%###+#+#+#+#+O+O+O+O+O+o+Oo+OoOXOo+oOo+OOo+Oo+OXOOOO+O+O+O++@+#+#@######&#####&##&#$##&##$##&#######################@###@#########@####$####$#&#$#&#&$&#&$&#&$&#&$&&&$&$&$&$&$&$&$#&#$#$#####O##O#O#O#O#OOO+OOOOoOoOOoOoOoOoOooOoooOoOooooOooooOooooOooooOoOoOoOoOoOoOoOoOOoOoOoOOOoOOoOOoOOOOOOOOOOOOOOOOOOOOOO", -"%%%%%%%%%%%%%%%%%%%%%%%%+%+%+%%+#++++++++++X+OXoXoXXoXo.Xo.o......... . . .. . .. .. . . . . . .. .... ......o.o.oooXoXoX+O++++#+#+%##%#%%&#%&&%&&#&&$&&&&#&%&&%$&#&%$%&##&%#%#%#####+@+O+O+O+O+O+o+o+oOOXOoO+oO+OoOXOoo+OoO+oO+O+O+OO+@+O#O+#O#+#+#######%&###&#$%&#&#&##&###&#####################################$###$#$##$#$%$#&$#&$#&$#&#&&$&&$&&$&&$&#&##&$#&$#####@#@#@#O#O#OOOOOO+OOOOoOOOOoOOoOoOoOoOooOoOooooOooooOoooooOoooOoooooOoooOooOoOoOoOoOOOoOOoOOOOOOOOOOOOOOOOOOOOOOO#OO#OOO", -"&&&&%&%&%%&%%%%%%%%%%%%%%%%%%%+%+%+#+++++++++X++X+oXoXoX.X.X.o.......... .. .. . . . . . . . .. ..............o.o.o.oooXOo+O+O#+#+##%#%#&#%#&#&#&%&&%&%&#&&&&$%&&%&#&%&#%&##%######+#+#+##+#+O+O+O+OOo+OXOOXOo+oooo+Oo+OoOXOo+OoOo+OO+O+O+O#+@+##O##+###%###&#&#&%$##&#$#&##&##$#$#$#########@###@##############$##$#####&#&#&#&#&#$#&#&$&$&&$&$&&$&$&&$&#&$&$&#&#$#$#$####@##O#O#O#O#O#OOOOOOOOOoOOOoOOoOoOooOooOoooOooooOooooOoooooOooOoOooOoOoOoOooOoOOoOoOOoOOOOoOOoOOOOOOOOOOOOOOOOOOOOOOOO", -"&&&&&&&&&&&&&&&&&%&%%%%%%%%%%%%%%#%+%++++O++O+o+o+XoXoXoooo.o.o........... .. .. . .. .. .... .... .........o.o.o.oXoXo+o++++++#+####%#%#&#&%&%&&#&&&&&&&%&%&%&%&$&%&#&#&#%##%#%#+##+@+O+O+O+O+OOXO+oOOXOo+oOoOo+OoOoOoOXOOXOo+O+OO+O+OO+O+O#+#O##+######&#####&##&#&#&#&#$%$#&#%#&##$#####################$#$####$#&$$&$#$$&$#$#&$&#&$#&#&$&$&$&$&#&$&&$&$&#&$$#&#####$###@+#@#O#O#OOOOO#OOOOOOOOOoOOoOoOooOooOooOooooOooooOooooOooOooOoooOooOoooOoOoOoOoOOoOOOoOoOOOOOOOoOOOOOO+OOO+OO#OOOO+OO", -"&=&=&=&=&=&&=&&&&&&&&&&&&&%%%%%%%%%%+##+#+++++++++o+XoXoXX.Xo..o............ ... ... .. .. . .. .............o.o.ooooooo+o+O+O#+##+%#%#%#%&#&#&#&&%&#&%&%&$&%&&#&%&#&%$%##&#%#####+#+#+#O+#O+O+O+O+oO+oOXOoOXOXoOo+oXOXOo+oO+OoOoOXOOO+O+O#O+@+#+######%###&#&##&#&#&#$#&#&#&##&#$##$##$#$##$##$###$###$#$######&$%$#&##&#&##&$&&$%$&$&&$&$&$&$&#&$&$&$&$&$&#$#&$#$#$####@###O#O#O#OO#O#OOOOOOOOoOoOOoOoOoOoOoOoOooOoOooooOooooOoooooooooOooOooOoOoooOoOoOoOOoOoOOOOOOoOOOOOOOOOOOOOOOOOOOO#OO#O", -"=&===&=&=&=&=&==&=&&&&&&%&&&%%%%%%%#%%+%+#+++O++O+XOXoXoooX.oX.o.o............ ... ... .. .... ............o.o.oooooXo+o+O++O++##+###%#&#&#%&&%&#&$&%&$&&%&%$&%&#&#&#&%&#%#########+@+@+#O+O+O+oOoO+oOo+oOooOoOooOoOOooOoOoOoOXO+OO+O+O+@+O+#O#+@#+######&###&#&$#&$#&#&#&$#&#&#$%$%&#&####$####&###$###&#&$&&$&#$#&#$&$#$&$&$&#$&#&$&$&#&#&#&#&$&#&&$&#&#&$&#&##&#&##$###@@#@#O#O#O#OOO+OO+OOoOOOOoOOoOoOoOooOoooOooooOooooOoooooOoOoOooooOooOooOoOoOoOoOoOoOOOOoOoOOOOOOOOOOOO+@O#OOO#OOOOOOOO", -"==============&=&=&=&=&=&&&&&&%&%%%%%%%%#%#+#+O+++++X+oXXXoX.oo.o................ ... ...... ............o..o.o.o.Xooo+o+o+O#+#+####%#&#%#&%$%$&&%&%&&&%&$&&&#&#&&&#&%$#&#&#%#%#+#+#+#+O++O+O+OO+O+oOXOoOo+o+ooo+oOoooOoOo+Oo+OOo+oOO+OO+O+#O#+##O#########&##&##&#&%$%$&#&#&#$#&#&#$#$&#$&#%$%$#$&#&#&$#&##&##$&#&$#&$#&$&#&#$&%$&$&#&$&$&$&$&&$&&$#&$&$&$#&#$&$#$#$###@###O#O#O#O#O+O#OOOOOOOOOoOOOoOoOoOoOooOoOoooOooooOooooOoooooooOoOoooOooOooOoOoOoOOoOOoOoOOOOoOOOoOOOOOOOOOOOOOOO+OO#OOO", -"===========&=====&=&=&&&=&&&&&&&&&%&%#%#%+%#+#+++O+O+OXOoXooXo.o.o.o........... ... ... .. ...............o.o.ooooooXoo+O+O++O#+###%##%#&#%&%&%&#&&$&%&$%&%&%&&$%#&#&#%%############O+#+O+O+OOXOo+oOXOoOoooOooOoOooOo+oOXOooOoOXOOO+OO+OO#O+@+@+########%###&#$&#&#$#&&#&#&#&$&#&$#&$%$#&##$&#&#&#$&#&#&$#&$&$&#&$&$&$&&$&$&$&&$&$&#&$&&$&&&$&$&&$&$&$%$%$%$#$###$####@###@###O#O#OO@OOOO+OOOOOOOOOoOOoOoOoOoOooOooOoooOooooOooooOooOoooooOoOoOooOooOoOoOoOOoOOoOOoOOOOoOOOOOOOOOOOO+OOOO@OOOO#O", -"=====================&=&=&=&&&&&&&&%&%%%#%#%#+#+#+++o++XXoXooXo.o.o.................. ..................o..o.oo.oooooOXOO++O++##+###%#%#&#&#&#&#&&%&#&%&&%&$&#&%&%$%%$%$%#%#%##+#+#+#O+@+O+O+o+O+oOoOoOoXOoooo+oooOoOoOoOoOOo+OOOoOOO+OO+O+@+O##O#+#######&##&#&#$&#&#&#$&#$&#&%$&&$%$&#&$&%$&$&$#&#&$&#&$&#&#&&$&$&#&$&$&#&$&#$&$&&$&&$&$&$&&$&#$&#&#&#&$%$&#%$&###$###@##O#O##O@+@+O#O#OO+OOOOoOoOOoOoOOoOoOoOooOoOoOoooOooooOooOoooOooOoooOooOoOoOoOoOoOoOOoOOOOOoOOOOOOOOOOOOO#OOOOOO+OO+OOO", -"=-==============*==&====&=&=&=&&&&&&%&&%%#%#+%#+#+O++O+oOXooXooo.o.o.o................................o.o.o.o.oooooXo+O+O+O#+@+###%##%$%#&#&#&&#&$&&&&$&%&%&%&#&#&#&#%#&########+#@+#+O+O+OOOOoOoOXOXOoOooOoOooOoOooOooOoOXOOoOXO+O+OO+O#O#O##O############$##&#&##&$&#&&#&&#&$&#&$%&$%$&#$&#$%$&#&$#&$&$&#&$&$&$&&$&$&#&$&$&&$&&&$&&$&&$&$&$&#&$&$&$#$&$#&#$#$##$#$######@#@#O#O#O#OOOOOOOOOOOOOOOoOOoOoOoOooOooOoooooOooooOoooooooOoooOooOooOooOoOoOoOoOoOoOOoOoOOOOOOOOOOOOOO+OOOOO#OOO#OOOOO", -"-=---------=-=========&====&=&&=&&&&&&#&%%#%%####+#+++O+O+oXooXoooo.o.................................o..o.o.oooooooOoOXO++O#+#####%#%%#&%#&#&#&%&%&#%&%&$&#&#&#&#&#%$&##%####+###+@+O#O+OO+o+Oo+oOoOoXoOooooOooooOooOoOXOoOoO+OOOoOO+OO+O+O+O#+#O#O#####&#%#&$#%$&#&#&#$&#&$&%$&#&$&$&#&$&&$&&&$&#&$&$&#&&$&&$&&&$&$&&&$&&&$&&$&$&$&$&$&#&&#&$&&$&#&&##&#$#&##&#####@##@@#+#O##O#OO#O#O+OOOOOOOOoOOOoOOOoOoOOooOooOoOoooOoOooOoOoOoooOoooOooOoOoOooOoOoOoOOOoOOOOoOoOOoOOoOOOOOOOOOOOOOOOOOOOOO", -"----=-=-=-=--=--=-=====*=*==&=&=&&&&&&&%#&%##%#+#+#O++O+XOXooXo.o.o.o.o.o..........................o.o.oo.oooo.oooo+o+O+O+O#+@+#+###%$%$%$%&#&&#&$%&&$%&#&%&#&#&#$%$%##%$######+@+#+O+O+O+OOOo+oOoOooOoOooOooooOoOoOoOoOoOo+OoOo+oOO+OO+O@+@#+@+@#########$####&$%#&#&$&&#&$%&$&#&$&#&$&$&#&$&$#&&$&&&&&$&$&&$&&$&&&&$&$&&$&&$&&&&&&$&&&$&$&$&&$#&$#$#&$#&##$#$#$######@##O#@#OO#O#OOOOO@O+OOOOOOOOoOOooOOoOooOoOoOoooOooooooOoooooOoooOoOoOooOoOoOoOoOoOOoOoOOoOOOOOOOOOOOOOOOOOOOOOOOO+OOO#OOO", -"-----------=--=-=-=--*====**=&=*&=&&&&&&&#&%%#%##+#+@+++Oo+OXooooooo.o....o.......................o.o.o..o.o.oooooooOo+O+O#+#+####%#%#&%%&#&#&#&&%&$%&$%&#&#&#&#&%%#&#%##%####O#+#OO#O+OOO+OXOOoOo+oOooooooOooOoooOooOooOoOoOoOOoO+OOOOO+OO+O@+@+#+########&#&#&#&#$&#&#&&$&&&#&&$&$&&$&&&&$&&&&$&&$&$&$&&&&&&&&&&$*$&&*$&*$&*$&$&$&&$&$&&&$&&$&$&#&&#$&$#$&#######$#@###@#O#O#O#OO#O#O+OOOOOOOOoOoOOoOOOoOoOoOooOooOooOoOoOooOoOoOooOooOooooOoOooOoOoOoOoOoOOoOOoOoOOoOOOOOOOOOOOOOOOOOOOOOOOOO", -"-------------------==-=*=*==*=*&=&&&&&&&&&#&#%##%#+#+#O+++oo+oXoX.o.o.oo.o.....................o.o..o.ooooo.oooooo+o+oO+O+O#O########&##$%&#&#&#&$%&%&%&$%$%$%$%$#$%########+##+@+#+O+O+O+OO+oOoOooOoOoOoooooOooOoooOoOoOoOoO+oOOoOoO+OOO#O#O+@#O#@#O###$###$#$#&#&#&#&$&#&&#&$&#&&&$&&$&$&&$&$&&&$&&&&&&$&$&$*$&$*&&*$&*&$*&&&*&&&$&&$&&$&&$#&$&$&$#&###&##$&#$#######@+##@O#O#O#OOOOOOOOOOOOOOOOOoOoOooOoOoOooOooOooooOooOoooOoooOooOooOoOOoOoOoOoOoOOoOOoOoOOoOOOOOOOoOOOOOOOOOOOOOOOOOOOOOOO", -"-----------------=---=---==*=*==&**&*&&&#&%&#%#%###+#++O+O+o+ooooooooo.o...o.o...............o..o..o.o..o.ooooooooOoOO+O+O+#+#+#####&##&%$#&#&$&#&&#&$&$%&%&%&#&%%#%$%$%######O##+@+#O+OOO+OoOo+oOoOoooooOoOoooOoooOoooOooOoOoOOoOOOOO+O+O+O+@+O##+############&#$&#$&$#&&$&$&&$&$&$&&$&&&$&&&&&&$&&&&$&$*&&*&&*&*$*&$*&&$&&*$&$*$&*$&&$&$&$&&$&#&#$&#$&#$#$######$##@##@#O#O#O#O#O#+O#OO+OOOOOoOOoOOOoOOoOoOooOooOooOoOooOooOooOoOooOooOoOooOoOoOoOoOoOoOoOOOOoOOOoOoOOOOOOOOOOOOOOOOOOOOO#OOOO", -"-------------------=--=-=*-=*=**=*=&*&&&&&&#&#&#####+#++O+O+o+oXoooo.oo.oo..o..o...o..o.o.o.o..o.oo.oooooo.ooooooOXO+O+O+@+@######%##&#&#&&#&&%&$&#&$%&%$&$%$%$%$%$%#######+#+##O#O+OO+O+OoO+OoOoOoooOooOoooOoooOoOooOooOoOXOoOXOOXO+OOOO+@+@+##O#@########&#&##&##&&#&&$&#&&$&&$&$&$&&$&&&$*$&$*&&$*$*&*&$*&$*&&*&&*&*$**&$*&*&&$*&&$&&&$&$&$&$&$&#$&#$##&##$###$##@#@+@#O##OO#OOOO@OOOOOOOOOoOOoOOoOOoOoOoOoOoOooOooOooOooOooOoooOooOooOoOoOoOoOoOoOoOOoOoOoOOOoOOOOOoOOOOOOOOOOOOOOOOOOOOOOOO", -"---------------------=-*=-*=*=*=**&*&&&&&&$&#&#%%##+#+#++O+Oo+oooXoooo.oo.oo.o..o.o..o.....o..o.o.oo.o.o.oooooooOoOoOOO+O+@+#+##%####%$%$&#&$%$&%&$&&&&$%&%$&#&#%$%##########O#+O+#O+#O+OO+OOoOoOooOooOoooOoooOooooOooOoOoOoOoOOXOOoOO+O#OO+O#O#O#+#+#########%$#&$#$$&$#&$&$&$&$&&&&$&&&$*&&&*&*$&*&*&*$&*$*&*$*&*$*$*&*$&*&&$*$*&$&*$&$&&&$&#&$&#$&#$#&$#$###$###@##@##O#O#O#OOO#O+OO+OOOOOOOOOOOoOOoOoOoOoOoOoOoOoOooOooOooOooOooOoOoOoOoOoOoOoOoOoOoOoOOoOOoOOOOOoOOOOOoOOOOOOOOOOOOOOOOOOOO", -"-------------------------=-=*=*=&=*&**&&&&&&#&####%##+O#++O++oOXooXooooo.o.o.o.o.o.o.o.ooo.ooo.oo.ooooooooooooOoo+O+O+O+@+#+@#####&#&$%&#&#&#&&#&$%&##&#&$%&#%$%####%#####+###+@#+O#OO+O+Oo+oO+oooOoooooOoooOooOoOoooOooOooOoOoOOOXO+OO+O+O#O+#+#O##########&#$%$#&$&#&$&$&$&&$&&$&$&&*$*&$&*$*$&*&$*&&*&*&*&*&*&**&**&*&**$**&&*&$*&&*&$&$&&$&$&$&$#&#$#####$###@##O#+@+#O#O+O#O#OOOOOOOOOOoOoOoOOOoOOoOoOoOooOooOooOoOooOooOooOoOoOoOoOooOoOoOOoOOoOOoOOoOOoOOOoOoOOOOoOOOOoOOOOOOOOOOOOOOOOOO", -"---------------------=-=-=-*-=*=*&*=&&*&&$&#&%$%%###+#+#+O++O+o+oXoooo.oooooo.oo.o.o.o.o.o.o.oo.oooo.oooooooOoooOOoO+O+O+#O########%$%#%$%$%$&#&$%&#&$%$%%$#%$#%$#%########+@+@++@+O++OOo+OOOoOoOoooOoOoooOooOooooooOooOoOoOoOOXOoOOO+OO+OO+@+@O#+#O#O##########&$#&#&$&&$&&$&&$&&$&*$&&$*&*$*&&*$**&**$*&*&*&***$&**&**&*&*&*$*$*&&*$&$*&$&$&$&$&#&#$&##$#$######O##@+@#O#O#O@+OOOOOO+OOOOOOOOOOOoOoOoOOoOoOoOooOooOoOooOoOoOoOooOooOoOoOOoOoOOoOOoOOoOOoOoOOoOoOOOOOoOOOoOOOOoOOOOOOOOOOOOOOOO", -"-----------------------=-*-=*=*=*=*&*&&&&&&&#&#&#%####+#O++O+o+o+ooXooooo.o.oo.o.o.oo.oo.ooo.oooo.oooooooooooO+O+O+O+O#+@+#+####%$%$%$&#&&#&&#&$%&$&#&%$&#&#$%%$%#$######+@###O#O+OOOO+OOOo+oOoOoOoOoooOoooooooOoOoOooOooOoOoOoOOOOoOOO+OO+OO#O#O#O##########&####$#$&#$&#&$&$&&$&*&$*&*&&*$*&*&*&*&*&**&***&**&****&**&***&***&*&$*$*&&&$&&$&#&#$#$#$#$#####$#@###@+#@+O@+OO+OOO#O+OOOOOOoOoOoOoOOoOOoOoOoOoOoOoOoOoOoOoOooOoOoOoOoOoOoOoOOoOoOOoOOoOOoOOOOoOOOOOoOoOOOoOOOoOOOOOoOOoOOOoOOOOOO", -"---------------------=--=-*-*-=*****&*&*&&&$&&$%#%##+##+#+O++O+oOo+ooooooooo.oo.ooo.oo.ooo.ooo.ooooooooooOooOooOo+OO+O+O#+#######%$%#%$&##&$#&$%&$%$%$&#%$%$%##########+###@+O+@+@+#O+OO+oOOoOoOoooooOooooOoOoOooooooOooOoOoOXOOoOXOO+OO+OO+@+O+#O#+#O#########$&#&&#$&$&$&$&&&$*&$&&*$&*$*&*&*&**&***&***&**************&***&**&***&&*$&*$&&$&$&#&$&##&##$######+@#O#O#O#O#O#O#OOOOOOOOOOOOOOOOoOoOOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOOOOoOOoOOoOOoOoOOOoOoOOOoOoOOOOOoOOoOOOOOOoOOOOoOoO", -"--------------------=--=-*-=***=*=&**&&&&&&&#&#&#&####+##+#O+O+OXOXOXoooooooooooo.oooooo.oooooooooooooooooOO+O+OOO+O#+@##O##########&#&#$&#&#&#&#&%$%&#$%#%#$%$%#######@#+#+#@+@+OOO+OO+OOoOoOooOoOooooOooooooooOoOoOoOoOoOoOOoOOoOO+OOOO+@O+@#O#O#@###O####$####$#$&#&#&$&&$&$&&&*$*&*&**&*&*$**&**&***********************&***&$*&$*&*$&&$&$&$&$#&$#$######@#@@#@+#O#O#OOOOOOOO+OOOOOOoOoOoooOOoOoOoOoOoOoOooOoOoOooOoOoOoOoOoOoOOoOOOoOOOoOoOOOoOOoOOoOOOoOOOOoOoOOOOoOoOOOoOOOoOOOOOOoOOOOoO", -"----------------------=-*-=*=*=***=*&*&*&&$&&#&#&##%####+#++++O+O+oOo+oXooooooooooooo.ooooooooooooooooooOOoOo+OO+O+O+O#++##+###%#%$%$%$%&#&#&#&$%$&%$##&#&$%#%#######+##+@#@+@+#O+O+O+OOoO+OXOoOoooOoOoooOoOooOooOooooOooOoOoOoOo+OOoOO+OO+OO+O+#O#+#O#########&#$#&#$&$&$&$&$*&*$&&*$&*$*&*&**&********&*********************&***&***&$*&*$&&$&#$&$###$#$##@###@#+#@@+@+O#O#+O+OOOOOOoOOOOOOOoOoOOOoOoOOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOOoOoOOOOoOOOOOoOOoOOOoOoOOOOoOoOOOoOoOOoOOoOoOoOOoOoOOO", -"--------------------=---=-*-*=**=**&*&&&&&&&$&#$%$%####+#O#O#O++O+O+oOoOoXoooooooooooooooooooooooOoOoOOOo+O+OO+O+O+@#+@#@#######$%$%$&$&$&$&$&$%$%$&#&$##$##$#######@#@+@#+@+@+OO#OOOOOoOoOoOoOoOoOooooOooooooooooOoOooOoOoOoOOOOoOO+OOOO+O#O#O@+@+@####@#####$###&$#&#$&#&&$&&$&*&$***&**&******&*********************************&$*&*&$&&$&&$&$##&$#####$##@+#O#O+@O+O#OOOOOOOO+OOOOOoOooOoOoOooOoOoOoOoOoOoOoOoOoOoOoOoOOoOOoOoOOOoOOoOOOOoOoOOoOOOOOoOOoOOOOoOoOOoOOoOOoOOoOOoOOoOOoOOoOoOo", -"------------------=---*-*-*-=**=****&*&*&*$&&$&&#&#%######+#+++O+O+O++o+oO+OooooooooooooooooOoOoOoOoOOo+OOOO+OO+OO#O+@#+#######&##&#&#&#&%$%$%$%&$%$%$#%$#%##########+###+@+@+O#OO+O+oO+OOoOoOoOoooooOooooooOoOoOooOooOoOoOoOoOXOOOoOOO+OOOOOO+O#O@+@+@+#########$##$#$#&$&$&&$&*$&*&&&&*&***&**********************************&*&**&*$&*$&&$&$&#&$###$####@#@#@#O#@+O#OOO+OOOOOOOOOOoOoOoOoOoOoOOoOoOoOoOoOoOoOoOoOoOOoOOoOOoOOoOOoOOoOOOOOoOOOOOOOoOoOOoOOOOoOOOOOoOOoOOoOoOoOoOOoOOoOOoOOOoO", -"-------------------=-*-=-*=**=***=&**&&&$&&&&%$%$%$######+#O#O+O+O+OoOXOo+oOXOoOooOoOoOoOOoOoOoOOOOO+OOO+O+O+O+O+#O#+#+@########$%$#$%$&$%&#&#&#$%$%$%#$%#$######@#O#@#O#O#O+@+O+OOOOOOoOoOOoOoOoOoOoooOoOooooooooOooOooOoOOoOOoOO+OO+OO+OO#+@O#+@+@#@#@#O######$##&#&$&$&$&$&&$&*&$****&**&*****************-**-*******************&*$*&*&$*$&$#&$#$####$##@+#O#O#O+@OOO+OOOOOO+oOoOoOOoOoOoOooOoOoOoOoOoOoOOoOoOoOoOoOOoOOoOOOoOOoOOoOOoOoOOOoOOOOOOOOOOOOoOoOOoOoOoOoOoOOoOoOoOoOoOoOooOooOoO", -"-----------------=--*-=**-*-=**=***&*&*&*&&$&$&&#&#%########+#+#++O+O+OO+OOXOO+o+OXOXOXOOoOOOOOOo+OXOO+O+O+O+O#+@+@+#@#########&##&#&#&#&#$&$%$&#&#&#%$%##############+@+@+@+O#OOO+O+O+OoOOoOoOooooooooooooOoOooOooOoOoOoOooOOoOOoOoOOOOOO+OOO+O@+@+#O+#+#@#@######$#$##&#&$&&$&*$&**$*&*****************-*-**-*-*-*-*-*-**********&****$&$&&$&&#$&##$#####@##@#O#@+@O+O#OOO+OOOOOOOOOoOoOoOoOoOoOoOoOoOoOoOoOoOOoOoOOOoOOoOOOoOOOoOOOOOOOOOOOOOOOOoOOOOOOoOOOOOOoOOoOOoOOoOoOOoOoOoOoOoOoOoOoOo", -"--------------=-=-*-=-*-*=******&**&*&&&&&&&&$&#$&$#######O#O#O#O#+O+O+O+O+OOXOOo+OOOoO+o+OXO+O+OO+O+O+OO+O#O#+@+##@#########$%$%$#$&$%$&$%$&#$%$#$%$##$######@#@#O#O#O#O#O+@OO+OOOOOOoOOoOoOooOoOoOoOooOoooooOooOooOoOoOoOOoOOOOOOO+OO+OOOO#O#OO#O@+@#O@#####@###$##&#$&$&$&$*&&*&*&****&***********-*-**-*-*-**-*-*****-***********&*&**&$&&$$&#$####$#@#@#O#O#O+@O+OOOOOOOOoOoOoooOoOoOooooOooOoOoOoOoOoOoOoOoOOOoOoOOoOOoOOOoOOOoOOOOOOOOOOOOOOOOOoOOOOOoOoOoOOoOoOOoOoOoOoOoOooOooOoooooOoo", -"------------=--*--*-**-=**=*******&*&*&*$*&$&&$&&#&%$########+#+#+O#O+O+O+OO+O+O+Oo++O+OOOOOOO+OO+O#O+O#+@+@+#O##@#+########&#%$%$&%$%$&$#&%$#&$%$%$%$#%#$#######+##@+@+O#O@+O#OOO+OoOOOOoOoOoOoOoooooooooOoOoooOoOooOooOOoOOoOo+OoOOOOOOOOOOOO#OO+O#O#O##O#O###$##&#$#&$#&$&&&$&$*$*&*&**********=*-**-*-*-*-*--**-*--*-**-*-********&*$*$&&$&&#$#&#$######O##O#O@+OOOOOO+OOOOOOoOOOooOooOoOooOoOooOoOooOoOoOoOOoOoOOOoOOOOOOOOOOOOOOOOOOOOOOOOoOOOOOOOOOoOOOOOOOoOOoOoOoOoOoOoooOooOoooOoOooOo", -"---------=-*-*--*-*-**=**-**=***&**&*&$*&$&&$&%$#$#$%#########O#O##+#O#O+O++OO+O+O+OO+O++O++O+O+O#O+@+@+@+#+@###O###@####$##$#$%$%$&#&$%&$&$&#&#&#####$#####@#@#O#@+#O#@+O+OO+OO+OOOOOoOoOooOoooooOooOooOoooooOooooOooOoOoOOoOOOOOOOOO+OO+OO+OO+O#O@+@+@+@#@##@#####$#&$&#&$&$&*&*&***********-*-*-**-*-*-*-*-*-*--*-**-*-*****-*****&**&&*$&$&$#&$####@#@#O#O#O+@+OO+OO+OOOoOoOoOoooOooOooooOoooOoOooOoOoOoOOoOoOOOOoOOOoOOoOOOOOoOOOOOOOOOOOOOOOOOOOOOOOOOoOoOoOOoOOoOoOoOoooOoooooooOoooooooo", -"--*-*-=*-*--*-**-*=*-**-**********&*&*&&&&&$&&$&&&#&#&#######+##+#O+#O+#+O#O+O+O+O+O+O+OO#O+O#O@+@+@+##@+#@###############%$#&#&#&$%$&#&$%$%$%$#$%$&$#%#######+###O#@+@+O#O#OO+OOO+Oo+oOoOoOooOoOooOooooooOooOooOoOoOoOoOoOoOoOoOoOO+OOOOOOOO#O@OO@+O@O#O#O#O###@####$###&$&$&&&$*$*&&******-***-**-*-*-*-*--*--*-*-*---*-*-*-*********&*$&&$&$&#$#$#$###@#@#@#O#OO#OOOOOOOOOoOoOoOoOoOooOoOoooOooOooOooOoOoOoOoOOOoOOOOOOOOOOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOoOoOoOooOoOooOoOoOoooooooooo", -"*=-*=*-*-*-*-*-***-***=********&*&*&$&&*$&&&$&$%$#&#$###############O#O#O#O#O#O#O#O##O#+#O#@+#+#@+#@#O#+@#+@#+@#######$#$%$%$%$#$%$&#$%$%$&#$%$%$######$##@#@#@#O#+@+@+O@O+OOOOOOOOoOOOoOoOoOooooooooOoOooooOooooooooOoOoOoOoOOOOOOoOOOO+OO+OOO+O+OO#+@+@#+##O#####$##&$#$&&&$&$*&&***********-**-*-*--*--*-*--*---*-*-*-*-*-**-*****&*$**&$&&$&$&#######@+#O+O#OO+OOO+OOOoOoOoOoooooooooooooooooooOooOoOoOoOOoOOoOOOoOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOoOoOOoOooOoOoooooOooooooooooOoooo", -"-*-*-*-**-***=**-************&**&*&*&*$&&$&$&$&#&$%$#%$%#######O#@+##+#O#+@+#O#+@+@+@+@+@+@+#@#O##@+##@#############$###%#$%$%$&#&$%$%$&#&$#&#&##%$##########+#O#O#O#OO#O+@O+O+O+oOOOOoOOoOooOoOoOoOooooooooooooOoOoOoOooOoOOoOoOo+OOOOOO+OOO+OO#OO#OOO+@+@O##@+@#######&#&#$&&*&&*$&*********-*-*-*-*-*-*---*---*----*--*-*-*-**********$&*$&$&##$#$##@#@#@#O#OO#OO+OOOoOOoOoOooOoOooOoooooooooOoooOoOoOoOoOoOOoOOoOOOOOOOOoOOOOOOOOOOO+OO+OO+OO+OO+OOOOOOoOOOOOOoOoOoOoOooOoOoooooooooOooooooo", -"********-***-*************&*&*&*&*$*&$&&$&&&$&$&#&#&#$%$###########@+@##+@##O##@+##O###@####O####@##@####@######@##$##$&$#&$%$&#$%$%$&$#$%#$#$#$#$####@#@#@#@@#+@+@O+@+OOOO+OOOOOOOoOoOoOoOoOooooooooOooOoOoOoOooooOooOoOOoOoOOOOOOoOOoOOOOOOOOOOO#OO#O#O#O#O#####@###$#$#&$&$&$*$*********-*-**-*-*--*---*---*-----*---*--*-**-******&*&*$&&$&$$&######@+@+@O#OOOOOOOOOOoOoOooooooooooooooooOoooooooOooOoOOoOoOOOoOOOOOOOoOOOOOOOOOO+OOOOOOOOOO+OOOOO+OOOOOOoOoOOOoOoOoooOooooooOoooooooooooooo", -"******=******************&**&*&*&&*$&&*$&&$&$&#&$%$%$%##&#############+#@#+###+##@##+@#+##O#################$#$#$#$%$&##$#$#&$%$&$%$&##&$&$&#%$############@+#O#O#O#OO@+O#OOOOOOOoOOoOoOoOoOooOoOooOooooooooooooOoOooOoOoOOoOOO+oOOOOOOOOO+OO+O+O+OO#OOO#O#O#O#O@#######&#$&&$&&&*&&*&*********-*-*-*--*-*--*------------*-*-*-**-******$&*&$&$#%$#$##@#@##O#OOO#+O+OOOoOOoOoOoOoOoooooooooooooooooOooOooOoOoOOOoOOOOOOOOOOOOOOOOO+OOOO+O@+O#OO#O@O+OOOOOOOOOOOOOoOoOooOoOoooOoooooooooooooooooo", -"***=*****************&*&*&*&*&$*$*&&$*$&$&$&$&$&$%$&#$&##$%$########@##@##@##@###+#@##########@#####$#$#$#$##$#&#$%$##$&#&$&$%$&#$&#$%$%$###$##&#$##$@#@#O#+@@+@O#OO+OOOOOOOOOOoOOoOOoOoOoooOooooOoooOoOooOoOoOooOoOOoOoOoOOoOoOOOoOOO+OOOOOOOOOOOO+OO#OO#O#O#@#+@###$#$#&$#&&$&$*$********-*-*-*-*--*---------*------------*-*-******&**$&$&$&&$#######O#O#O#OOOOOOOOOOoOoOoooooooooooooooooooooOoooOoOooOoOoOoOOoOOoOOOOOOOOOOOOOO#O#OOOOOOOOOO+O@O+OOOOOOOOoOOoOOoOooOooOoooooooooooooooooooo", -"******************&*&*&*&*&*$&*&&$&$&&$&&$&$&#&$#&$%$%$%$##%$###################@#######@#########$##$##$%$#$&#$#&$#&$%$&$&#$&$%$%$#&$&$%$%$%#$#########O##@#O#O#OO#OO#OO+OO+OOOOoOOoOoOoOoOoooOoooooooooOoooooOooOooOoOoOOoOOOOOOOOOOOOOOOOO+OOO#OOO+OO#OOO#O#O@#@######$#&$&$&*&**&*****-***-*-*-*---*---*----------*--*-*--*-*-*****&*&*&&$&$##$##@#@#@#O#O+@+OOOOoOoOoOoooooooooooooooooooooooooOooooOoOoOOOOOOOOOOOOOOOOOOO+O#OOOOOO#O#O#O#O@O+OOOO+OOOoOOOOOoOoOoOoooooooooooooooooooooooo", -"************&*&*&**&*$*$*$*&*$&$*&&$&$&$&$&#&$&#&$%$&#$%$%$###$#$#########################$#$##$#$#$%$%$&$%$%$&$&$&$&$&$#&$%$&$&$&$%$##$&#$#$##$##$@#@###@O#O#O#O+@OO+OOOOOOOoOoOOoOoOoOoOoOoOooOoOoOooOooOoOOoOoOoOOoOOOoOOOoOOoOOOOOOOOO+OOOOOOOO#O@O+O#O#O#O##O######&#&$&$&&$*&********-*-*-*---*-----------------------*-*-********$*$&$&$#&$#####@+@+@OO#OOOOOOOoOoOooOoooooooooooooooooooooooooOoOoOoOOoOoOOoOOOOOOOO+OOO#OOO#O#O#OOOOOOO+O#O#O+OOOOOOOOoOoOoOooooOoooooooooooooooooooooo", -"*&*&*&*&*&*&*&*&*&*$*&*&&*$&$&*&$&$*&$&&$&$&$$&$$&#&$#&$%$#%$%$%####$##$###$##$####$#$#$%$%#%$#&#&$&$&$%$%$&$&$#&$%$%$%$&#$&$%$%$##$&$&$#$%$##$#######@#@+##O#O#O@O+@OOO+OOOOOOOOoOOoOoOoOoOoooOoooooOooOooOooOoOoOooOoOoOOoOOOOOOOOoOOOOOOOOOOO+OOOO+OO@O+O@+@+@##@#$#$#$&#$&$*&*$*&****-**-*-*--*----*------------*---*-*--*-*-*****&**&*$&&$&######@##O#O#OOOOOOOOoOOooOoooooooooooooooooooooooooOooOooOoOoOOOOOOOOOOOOOOO@+OOO#OOOOOOO#O#O#O#OOOOO#OOOOOOOOOOOoOoOoOoooooooooooooooooooooooo", -"&*$*$*$*&$*&$*$*$&&&$*$&$&&$&$&$&$&$&$&$%$%$&##&##$%#&##$%$$%$%$#$&##$%#$&##$%#$&$%$&#&$%$&$&#&$$&#$&$&$&$&$&$&&$&$&$&$&$&$&$&$&$&$%$%##&#$%$###$#@#@##O#O@O#OOO+OOOOOOOOOOOoOoOoOooOoOoooooOoOooOooooooooOooOooOoOoOOoOOoOOOoOO+oOOOOOOOOOOOOOOOO+OO@O+OO#OO#O#O#@######$#&&$&&$*&**********-*-*--*-*---*-----------------*-*-**-*****$*&$&$&$$#$##@#@+@#O#OO+OOOOoOOooOoooooooooooooooooooooooooooooOooOoOOOoOOoOOOOOO+OO+OOO#OOOO#O#O#OO#OO#OO#O#OOOO+OOOOoOOoOOooOoooOooooooooooooooo.o.o.oo", -"*&*&*&*$*&*&*&*&&*$*&&&*&$&&$&&$&&$&#&$&$&$&$&$$&$%$$#$&$#&%$#$#&$#$#&$&##$&#&$%$%$#%$#&$%$%$&$&$&$&#&$&$&$&$&$&$#&$&$&$&$&$%$&$%$&#$&$$#$#$##$######O#O#@+#O@+@O#OO+OOOOOOoOOOoOoOoOoOoOOoOooooooooOoOoOoooOooOooOoOoOoOOoOOOoOOOOOOOOO+OOOOO+OOOOOOOO#OOO#OO#O##O#@##$#&#$$&&$&&*$&*******-*-*--*----------------------*---*-*-******&*$*&&$&#&#$####@#O#OO#O+OOOOoOoOoOoOoooooooooooooooooooooooOooooOoOooOOoOOOOOOOOOOO@OOOOOOO#OOO#OO#OO#OO#OOOO#O#OO+OOOOoOOoOOooOooooOooooooooooooooooooo", -"$&$&$*&&$&$$&$&$*$&$&$$&$&$*$&$&$&$&$$&#$&#$%$%$#$&#&$%$%$$#&##$#&#&$##$$&$#$&$&$&$&$&$$&$&$&$&$&&$&$&$&&$&&$&$&$&$&$&#&$&#&$&$%$&$$##$%$&###$##@#@#@#@#O#O@+O@OOOOOOOOOOoOOOoOOoOoOoOoOooOooOoOoOoooooooOoOooOoOoOoOoOOOoOOOOOOOOoOOOOOOOOOOOOOOOO#OOOOOOOO#O#O#O######$#$&#$&*$*&*******-**-**-*--*-*----*---------------*--*-*******$*&&$&$#$#$###@#O+@O#OOOOOOOoOOoOoooooooooooooooooooooooooooooOoooOoOOoOOOOOOOOOOO+OO+@O+@+@O+@OO#OO#OO#OO#O#OOOOOOOOOOOOoOoOooOooOoooooooooooo.oooooo.oo", -"&$*$&$&$*$&&*$&$&$&*$&$&$&$&$&$&$&$&$&#$&#$&$&$&$%$#$%$#&$%$#$#&$#$$%$&#&#&$&$%$&$%$&$&&&$&$&$&&$&$&&$&&$&$&$&&$&&$&$&$&$&$$&$&$&$#&$&#$##$#$##$####O##O#O#OO#O#OO+OOOOoOOOoOoOoOoOoOoOooOooOoooooOoOoOoOooooOoOoOoOoOOoOOOOoOOoOOOOOOOOOOOOOOOOOOOOO#OOOO#OOOOO@O#@#@#$##$&$&$&&$*$&******-**-*-*-*---*-----------------*---*-*-*****&*&*$&$&$&$######@#O#O+OOOOoOOOoOoooOooooooooooo.oo.ooooooooooooOoOoOoOOoOOoOOOOOOOOO@O+OO@O+OO#O#OO#O#O#O#O+O@+O#O+OOOOoOOOOoOooOoooooooooooooooo.oo.oooo", -"&&$&&$&$&$&$$&&$&&$&$&&$&$&$&$&$&$#$&$$&$$#$##$#&#$&$#$&$#$&#&$&#&#&$#$$&#$%$&$&#$&$&#$$&&$&&$&$&&$*$&$&$&&$&&$&$&&$&$&$&$&$%$&$#&$#$#$&$#######@#@##O@#O@O#OOOOOOOOOOOOOoOOOOoOOOoOoOoOooOooOoOoooooooooOoOooOoOoOoOoOOoOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOO#OOO#O#O##O#@####$#$#&$&$*&**&*******-*-*-*-*----------------*--*--*-*-*******$*$&&$&$#####@#@O#O#O#OOOOOOOoOooOoooooooooooooooooooooooooooooooooOoOoOOOOOOOOOO+OO#OO@O#OO#O#OO#O#OOO#OOO#OO+O@OOOOOOOOOoOoOoOoooOooooooooooooooooooo.oo", -"$&$&$&$&$&$&&$&$&$&$&$&$&$&$&$&#$#&$#&#$%$&%$&#$#&$#&#&#$#&#$&$#$&$#$&#&#$&$&#$&$&&$&$&&&$&&$&&*$&*$&&*$&*$&*$*&*$&$&&$&$&$&$&$&$#$#&#$###$$#$#@###@#@#O#O#OO#OO+OOOOOOoOOOoOoOOooOoOoOooOoOooooOoOoOoOoOooOoOooOoOoOOoOOOOOoOOoOOOOoOOOOOOOOOOOOOOOOOOOOOOOO#OOO#O@#@#@###&$&$&&$&&$***********-*-*--*-*-*-*--*---------*--*-*-********&*$&&$&#$######O#O#OOO+OOOOOoOOooOoooooooooo.ooo.oo.oooooooooOoOooOoOoOoOoOOOOOO#OOOO+OO+O@OO#O#OO#O#OO#OO#O#OO+OOOOOOoOOoOoOooOoooooooooooooo.ooooooooo", -"&$&$&$&$&$&$$&$&$&$&$&$&$&$#$#$&$&$#$#$#&$#$#$#&$##$#$#$%$$&$#&$&$&$&$&$&$&$&$&$&$&&$&$&$&$&&$&$*&$*&$*&*$*&$&&$&*$*$&&$&$&$&$&$&$&#$#&$#$######@#@#O#O#OOOOOOOO@OOOOOOOoOOOoOooOOoOooOoOoooOooooooOoooOoOoOoOoOoOoOOoOOoOoOOOOOOOoOOOOOOOOOOOO+OOOOOOOOOOO#OO#O#O#O####$#$#$#&$*&&**&******-*-*-*-*-*--------*---*-*--*--*-*********&$&$&&$$&#$##$#@@+@OOOO#OOOOoOoOooOoooooooooooooo.oooooooooooooooooOoOoOOOOOOOOOOOOOO+@O#O#O#OO#OO#O#OO#O#O#OOOO#O@O+OOOOOOoOOooOoooOoooooooooooooo.oo.oo.o", -"&$&$&$&$&$&$&$&$&$&$&$$&#$&$&&$#&#$#&#&$#$&#$&#$#$&#&$&#$&%$#&#$&#$&#&$&$&$&&$&&&$&$&&&$&&&*$*&*&&*$*&*$&*$&*$*&*$&&&$&$&&$&$&$&#$#$&#$####$##@##@+@#@#O#O#O#O@+OOOOOOoOOoOoOoOOooOooOoooOoOooOoOoOooOooOoooOoOoOoOoOOoOOOOOOOOoOOOOOOOOOOOOOOOOO+OOOOOOOOOOOOOOO@O#@#@##$##$&$&$*$&$************-*-*-*-*-*-*--------*---*-*-*-*-***&****&$&&#$####@#@#O#O#OOOOOOOoOOoOooOoooooooooooooooo.oooooooooOooOooOoOoOoOOOOOOOOO@O+OOOOOOO#O#O#OOO#OOO#OO#O#OO+OOOOOOoOOOoOOooOoooOoooooooo.ooooooooooo", -"$&$&$&$&$&$&$&$$$&$#$#&$$#$#$#$&$$#&$$#$##$#$#$#$&#$#$#$&#$&$$&$&$&$&$&$&$&$&$&$&&$*$*$**$*$*&*$**$*&*$*&$*&$*$*$*$*$*$&$&$&#$&$$&#$#$#$#$##@$#@##@#O+@O@OOOOOOOOOOOOoOOOOoOoOoOoOoOoOoOooOoOooOooOoOoOooOoOoOoOoOOoOoOOoOoOoOOOOOOOOOoOOoOOOOOOOOOOOOOOOOO#OO#O#O#O#O#@###$#$#&$&$*&*$*******-*-*-*-*-*-*---*-*-*-*--*-*-*-*-*******$&$&$&$$#&#$###+#O#O#OO+OOOOoOoOooOooooooooooo.oo.oooooooooooooooooOoOoOOOOOoOOOOOO+OOO@OO#O#OOOOOO#O#OO#OO#OOOOO#OOOOOOOOOoOoOooOooOoooooooooooooo.oo.oo.o", -"$&$$$&$#$$#$#$#&#$#$&$$&#$&#$&#$##$$#$#$&$#$&#$&$#$$&$&$#$$$#&$&$$&$&$&$&$&$&$&$*$*$&&*$*$*&*$*&*$*$*&*$**$*&*&*$&*&$&*$&$&$&$#&#$$#$#$##$#$##@##@#O#O@+O#O#O+OOOOOOOOOOoOoOOoOoOoOoOooOoOoOooOooOooooooOooOooOoOoOoOOOoOOOOOOOoOOOoOOOOOOOOOOOOOOOOOOOO#OOOOOOOOO#O@#@##$##%$&$&$&$*$*&***********-**-*-*-**-*-*--*-*-*-*-*********&**&*&$&&$$###@#@#O#OOO#OOOOOOOoOoOooooooooooooooooo.oooooooooooooOoooOoOoOoOOOOOOOOOOOOO#OOOOOO#O#O#OOO#OO#OO#O#OO@O+OOOOOOoOOoOooOoooooooooooooooooooooooo", -"#$#&$#$&$%$&$&$$&$#&#$#$#$#$#$#$&$##$#&##$#$#$#$#$##$#$&$#&$&$#$&#$&$&$&$&&$*&$*$&*&*$*&&*$*$*$*$**&*$**&$*$*$*$*$&$*$&$*$&$&$&$$%$&$##$###@#@#@#O#@O#O@+OOOOOOOOOOoOOoOOoOoOoOoOoOooOooOoooOoOoOooOoOoOooOoOooOoOoOoOoOOoOOoOOOOOOOOoOOOOOoOOoOOOOOOOOOOOOO#O#O#OO#+@#O###$#$#&$&$*&&*$*$***********-**-**-*-*-*-*-**-*****-******$*$&$&$&$####$##@#O#O#O#OOOOOoOoOoOooOoooooooooooooooooooooooooooooooOooOoOOOOOoOOOOOOO+OOOO#O#OOOOOOO#O#OO#OO#OOOO+OOOOOOoOOOoOoOoOooOooooooooooooooo.oooooo", -"&$#$#$#$#$&$#$#$#$#$$#$#$&#$&$#$#$#$#$#$$#$##$#$##$&$&#$#$&$#$&$&$&$&$&$&$*$&$&&$*&$*$*$*$*&**&***$*$**$*&**&*$&*&*$&*$&$&$&$&$#$&$##$##$#$#####@#O#O#OO@OO#OOOOOoOOOOOoOoOOoOoOoOoOoOoOooOoOooOooOoOoOooOooOoOoOoOoOoOoOOoOOOOoOOoOOOOOOOOOOOOOOoOOoOOoOOOOOOOOOO#O@+@##@####$#$&$&$*$&******************-**-**-***-***-*-*********&*$&&$&$&#$###@#+@#O#OOOOOOOOOOOoOoOoooooooooooooo.oooooooooooooooooOoOoOOoOoOOOOOOOOOOOOOOOOO+O#O#O#OOO#OOO#OOO#O#OOOOOOOOoOOoOoOoOooOoOooooooooooooooooooo", -"#$#$#&$#$##$#$#&#$###$#&##$###$####$##$###$#$##$&#$##$#$&#$#&$&$$&$&$&$*$&$&*$*$*$*$*&&*$*&*$*$*$****&$**$*$*$*&$*$&$&$*$&$&$#$&#$#$#$##@#@#@@#@+@#O#OO#OOOOOO+OOOOoOoOOoOoOoOoOoOoOooOoOooOooOoOoOooOoOoOoOoOoOoOOoOOOoOoOOoOOOOOOOOOOoOOOOOOOOOOOOOOOOOOOOOOO+@OO#O#O#@####$##&$&$&$*$*$*$************-*****-***-***-**********$*&$*&$&$&$#$###@##@OO#OO#OOOOOoOoOooOooOoooooooooooooooooooooooooooOoooOoOoOOOOOOOOOOOOOOO#OOOO#OOOOOOOO#OOO#OOO#OOOOOO#OOOOOOoOOoOoooOooooooooooooooooooooooo", -"$#&#$##$##$#$###$#$#$#$#$##$#$##$#$##$#####$##$##$##$#$#$#$&$#$&$&$&$&$&&$*&$*&&$*&&*$*&*$**&***&*&*$***$**&*&*&*$*$*&&$&$&$&$&$$##$###$##@##@#O@#O#OOOOO#OOOOOOOOOOOoOoOoOoOoOoOoOoOooOooOooOoooOoOoOooOoOoOoOoOOoOoOoOOOoOOOOoOOoOOoOOOoOoOoOOoOOOOoOOOOOOOOOOO+OO#O#O#@#@##&#$$$&$&&$*&**********************-*****************$&*&$&$&##$#####@#O##O#OOO+OOOOoOOoOooOoooooooooooooooooooooooooooooOoOooOOoOoOoOoOOOOO#OOOOO+OOOO#O#O#OOO#OOO#OO#OOO#OOOOOOoOOOoOoOoOooOoOoOooooooooooooooooo", -"#$##$#$##$###$$###$##$##@$#####$######@$#@$##$##$#$$#$#&$&$#$&$&$&$&$&*$*$&$*$*$*$*$*&*$**$**$*$**$***$**&*$*$*$*&$&$*$&$&$$&$#$#$##$#@#@##@#@#@OO#O@O#OOOOOOOOOoOoOoOoOoOoOoOooOoOoOoOooOoOooOoOoOoOoOoOoOoOoOoOoOOOoOOoOOOoOOOOOOOOOOOOOOOOOOOOOoOOOOoOOOOOOOOO@O#O@#@#O###$#$##&$&$*$&$*$*$********************************$*&*&*$&$&$&$###$#@#@+@OO#OOOOOOOOOOoOoOoOooOoooooooooooooooooooooooooooooOoOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOO+@OOO#OOOOOO#OOOOOOOOOOoOOoOoOoOoOooooooooooooooooooooo", -"##@$####$#$#$##$#$##$##$###$@$@##@#$@$##$###$##$#$##$#$#$#$$&$$&$$&$&$$&$*$*$*$*&*&*$*$**&**$***$***$***$*$**$**$*&*$&$*$&$&$$$&#$#$#$#$#@#@#@+@##O#OOOOOOOOOOOOOOOOoOOoOoOoOoOoOoOooOooOoOooOoOoOoOoOoOoOoOoOOoOOoOoOOOOOoOOOOoOOOOOOOOoOOOOOOoOOOOOOOOOOOOOOOOOOOOO#OO@#@#@#$#$&$$$&$&*$&$**$*$**************************$*&*&*$*$&$&&#$&#$#######O##OO#O#OOOOoOOoOoOooOooooooooooooooooooooooooooooOooOoOoOoOoOoOOOOOOOOOOOO#OO#O#O#O#OOO#OOOO#O#OOOOO+OOOOoOOOoOOoOoOooOoOoOoooooooooooooooo", -"#$##@$#@##@##@#@#@#$#@#@#@#@###$@$#@##@#@#@$#@$##$#$#$#$#$&$#$&$$&$$&*$&$*$&&$*$*$*****$*$****$***$***$****$**$*$*$*$*$&$$&$&#$$$#$#$#@#@#@#@@@#OO@OO#OO#OOOOOOoOoOoOoOoOoOooOoooOoOooOooooOoOoOooOoOoOoOoOOoOoOOoOOOOoOoOOOOOOOOOoOOOOOOOoOOoOOOOoOOoOOOOOOOOOOOOO#O@O##O#@######$&$&$&$&*$&$***$*$********************$***&*$*$&&&$&$$&$#$##@#@@O#@OOOOOOOOOOOOOOOoOoOooOooooooooooooooooooooooooOoooOoOoOoOOOOOOOoOOOOOOOOOOOOOOOOOOOOO#OOO#OOOOOO+OOOOOOOOOOoOOoOoOoOoOoooooOooooooooooooooo", -"@#@#$@#$@$#$#$#$#$@#@#$#$#$@#$@##@##@#$@#$##@##@$##$#$#$&$#$&$$&$&$*$$$*&$*$*$*$*$*$$*$*****$*******$*****$***$*&*$*$&$&$&$$$$#&#$#$#@##@#@#O#O@O#O#OOOOOOOOOOOOOOOOoOOoOoOoOooOOooooOooOOoOoOoOoOoOoOoOoOOoOOOOoOOoOoOOOOOOOoOOOOOOOOoOOOOOOOOOOOOOOOOOOoOOOOOOO#OOOO#O@#@#@#@$#$###$$$&$&$&*$&$*$*$*$*$**$*****$**$*$&**&$*$*&&&$&$&$&#$######@##O#O#O#O+OOOOOOoOoOOooOoooOoooooooooooooooooooooooooOooOoOoOoOoOoOOoOOOOOOOOOOOOOOOOOO+OOO+OO#OO+OOOO@+OOOOOOOOOoOoOoOoOoOoOoOoooOoooooooooooo", -"#@$#@##@##@#@#@#@##$#@#@@#@#@#@#@#@$#@##@#@$#@$##@$#$#$#$#$#$&$$$&$$&*$$&$*$*$*&$*$**$**$*$*****$*******$***$**$*$*$&*$$&$&$&$$$$#$##$#@#@#@@#@+@O@OO#OOOOOOOOoOoOoOOooOooOoOoOooOoOoOoOooOoOoOoOoOoOoOoOoOOoOoOOoOOOOOoOOoOOOOOOOOOOOOOoOOOoOOoOOoOOoOOOOOOOOOOOOO#O#O@O#@#@###@##$#&#$&$&$&$&$&&&$*$*$*$*$*$$*$*&$*&*$*$&*$&$&$$&$&$##$##$##@#O#O#OOOOOO@OOOOOOOOOoOoOoOoOoooooooooooooooooooooOoOoOooOoOoOOoOOOOOOOOoOOOOOOOOOOOOO+OO@OOO@OOOOO#OOOOOOOOOOOOOoOOOoOoOooOoOoOooOoooOoooooooooo", -"@##@#@$#@#@#@#@#@#@#@#@##@##@#@#@#@#@#@#@#@#@##@#$@####$#$&$#$$#&$$&$$&*$&$*$&*$*$**$**$******$***$***$***$**$**$*$*&$$&$$&$$####$#$#@#@#@#@#@O@O@O#OOO@OOOOOOOOOoOOoOoOoOoOooOoOoOoOoOooOoOoOoOoOoOoOoOOOOoOOOoOOOoOoOOOOOOOOOOOOOOoOOOOOoOOOOOOOOOOOOoOOOOOOOOOOOO@OOO@#O@#@#@##$##$#$#$$&$&$&$$*$&&$&*$&*$**$&*&*$*$&&&$&$&&$&$&#$#$##$####@#@#@#O##+@+OOOOOOOOoOOOoOoOooooOooooooooooooooooooooooooOoOoOoOOoOoOoOoOOOOOOOOOOOOOOOOOOOO+OOOOOOOOOOOOOOOOOOOOOOoOoOOoOoOoOoOooOoOoOoooOoOoOoOo", -"#@@#@#@#@#@#@$@#@#@@#@$@@#@@#@#@#@#@@#@@#@#@#$@#@##$$@$#$#$$&$&$$&$&$&$$*$*$*$*$*&*$*****$*$********$***$***$**$*$*$$*$&$&$$#$$$$##$@#@#@@@@O@+@O#OOO@OOOOOOOoOoOOoOoOoOoOooOoOooOoOooOoOoOoOoOoOoOOOoOOoOoOOoOOOoOOOOOOoOOOOOOOoOOOOOOOOOOOOOoOOoOOoOOOOOOOOOOOO@OOO#O#OO#O#@@#@##@$##$#&#$$&$&$&$&$&$&$&$&&$&&$&$&&$&$&$&&$&$&$&$&##&#$###@#@+@+O#OOOOOOO+OOOOoOOOoOoOoOoOoOooooooooooooooooooOoOoOoOooOoOoOoOOOoOOOOoOOOOOOOOOOOOOOOOOOOO+OO+@OOOOOOOOOOOOOOOOOOoOoOoOoOoOoOoOooOoOoOoooOoooO", -"@@#@#@#@@#@@#@#@#@#@#@#@#@@#@@#@@#@@#@@#@#@#@@#@#$@#@##$#$#$#$$&$$&$$$*$*$&$*$*$*$**$*$*$*****$*$*$*******$***$**&*$*&$&$$$$&$#$##$@#@#@@##@+@@O@OO@OOOOOOOOOOOOoOOoOoOoOooOoOoOoOoOoOoOoOoOoOoOoOOoOOOoOOOoOOOOOOOOOoOOOOOOoOOOOOOOOOOOOOOOOOOOOOoOOOOOOoOOOOOOOOOOOOOOO@O#@O#@#@###$##$#$#$#$$&$&$&$&$&$&$$&$&$&$&$&$&$&$&$&#$&#$#$#$#######@#+@#OO#O#O#OOOOOOOOoOOOOoOoOoOoooOoOoooooooooooOooOoooOoOoOoOoOOOOoOOOoOOOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOoOOOoOoOOoOoOoOoOOoOoOoOoOoOoOo", -"#@@#@@@#@@#@@#@@@@#@@#@#@#@@#@@#@@#@@#@@#@@#@#@#@#@$#$@#$$#$$#$$$&$$*$&$&$*$*$*&*$*$***$**$*$********$*****$*$**$*$&$$*$$&$#$$#$#$@#@#@#@@O@@O@OO#OOOOOOOOOOoOoOOoOOoOoOoOoOooOoOoOoOoOoOoOoOoOoOOoOOoOOOoOOOoOOoOoOOOOOoOOOOOOOOOOOOOOOoOOOoOOOoOOOoOoOOOOOOOOOOOOO@OO@#O@O@#O#@#@#@###$####$##$#$#$&$$&$$&$&$$&$&$#&$#&$$#$$#&#$#######@#@#O#O@O#O#OOOOOOOOOOOOOOOoOoOoOoOooOoooooOoooooooOoooOooOooOoOoOoOOoOoOOoOOoOoOOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOoOOoOoOoOoOoOoOoOooOoOoOoOoO", -"@#@@#@#@@#@@#@@#@#@@#@@@@@@#@@#@@#@@#@@#@@#@#@#@#@#@#@$#$#$#$$#$&$$&$&$*$*$*$*$*$*$**$**$***************$*$****$*$*$*$$&$$&$$#$#$@#$@#@@#@#@+@O#OO@OO@OOOOOOOOOOoOoOoOoOooOooOooOoOoOoOoOoOoOoOOoOOoOOOoOOoOOOOOOOOOOOOOOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOOOOOOOOOOOO#O@O@O#O#@#@#@##$#$##$#$#$#$#$#$&#$#$&$#$&$#$&$#$&###$##$##$#@####@#@#O#O#OOO#OOO+OOOOOOOOOOOoOOoOoOooOoOoooooooOoooOoooOoOoOoOoOoOoOOOOoOoOOOOOoOOOOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOoOOOOoOoOOOoOOoOoOoOoOOoOoOoOoOo", -"@@#@@#O#@@#@O#@#@@#O@#O#O#O@+@@+@@+@O#@O#@@@@#@@#@#$@#$@#$#$#&$$$$&$$&$$&$&$*$*$**$*$**$**$***$***$***$*****$*$*$*$*$&$$&$$#$#$#@##@#@#@O@O@O@O@OOOOOOOOOOoOoOoOoOoOooOoOoOoOoOoOooOoOoOoOoOOOoOOOOOOOOOOOOOoOOoOOOOoOOOOOOOOOoOOOoOOoOOOOoOOOoOOOoOOOOoOOOOOOOOOOOOOO@OOOOO#O#@@@O#@#@#@#@#######$###$#$#$#$#$#$#$#$#$#$##$$#$##$##$##@#@@#O#O#O#OO@OOOOOOOOOOOOoOoOoOOoOoOoOoOoOoOoOoOoOooOooOoOooOooOoOoOoOoOoOOOOoOoOoOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOOOOOoOoOOOOoOoOOoOOOoOOoOoOoOoOoOoO", -"@+@@+@@@@#O#@#O@@+@@#@@#@@#@@#@@#@@@#@@#@@#@#@#@$@#@#@#$#$#$$$#$&$$&$$&$*$*$*$*$*$***$******$*******$******$*$*$*$*$&$*$$&$#$$##$@#@#@@@#@#O@O@OOO@OOOOOoOOOOoOoOOOoOoOoOoOoOoOoOoOoOoOoOoOOoOOOoOoOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@OO@O#OO#O#O@@#@#@#@#@$##$#$#####$#$#$#$#$#$#$##$##$##$###@#@#@##@#O@#O@O#OO#OO#OOOOOOOOOOOOoOOoOOoOoOoOooOooOooOooOooOooOooOooOoOoOOOoOoOoOOOOOoOOOoOoOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOOOOoOOoOOoOOoOOoOoOOoOOoOOoOO", -"@@#@@#O#@O@@@@#@#@@#O@#O@#O@O@O#O@+@O@+@@#O@@@#@#@#@$#@#$@#$#$$&$$&$&$*$&$*$&*$*$*$*$**$*$*************$**$***$*$*$*$$&$$$$&##$@##@#@#@#OO@O#O@O@OOOOOOOOOoOoOOoOooOoOoOoOoOoOoOoOoOoOOoOOoOOoOOOOOOOOOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOOOOOOOOOoOOoOOoOOOOOOOO#OOO#OOO#@O#@##O#@#@#@#@#@#@##@#$######################@#@#@#@#@#@O#O#O#O#O@OOOOOOOOOOOOOOOOoOOoOOoOoOoOoOoOoOooOooOooOooOooOooOoOoOOooOOoOoOOoOoOOOoOOOOOOOOOOOOOOOOOOOOOOOOOoOOoOOoOOOOoOoOOOOoOOoOOoOOoOOOOoOOoOOoOOo", -"#@O#O@@O@#@#O#O@O@O@#O@#@O@#@#@@@@@@#@@@O@@#O#@@#@@#@$#@#$#$#$#$$&$$$$$$*$&$*$*$*$*$**$*****$**$*$**$***$***$*$*&*$&$&$$&$#$$@$#$@#@#@@O@@O@O@OOOOOOOOOOoOOOOoOoOoOoOoOooOooOooOoOoOOoOOoOOoOOOOoOOOoOOOOOOOOoOOOOoOOOOoOOoOOoOOOOOOOOOOOOOoOOOOoOOoOOoOOOOOOOOOOoOOOOOOOOOOOOO@OOO@OOO@#O#O@#@#@#@#@#@#@#@#@$#@#$#@#$#@#$@#@@#@##@#@#O#O##O@#O@O#OOO#OO#O#OOOOOOOoOOOoOOoOOoOOoOoOooOoOoOoOoOoOoOoOoOoOoOoOoOOoOoOOoOoOOoOoOOoOoOoOOoOOOOOOOOOOOOOOoOOOOOOOOOOoOOOOOOoOOOOOOOOOOOOOoOOOOOOOOoOO", -"@O@@@#O#@O@O@@@#@#@O@@O@O@O@OO@+@O@O@O#O#@O@@@O@@#@#@#@#@$#$#$$#$$$&$&$&$*$*$&$**$**$**$**$***************$*$**$$*$*$$&$$$$#$##@#@$@@#O#@O#O@OO@O@OOOOOOOOoOoOoOoOoOoooOoOoOoOoOoOoOoOoOOOOOoOoOOOOOOOOOOOOOOOOOOOOOOoOOOOOOOOOOoOOoOOoOOOOOOoOOOOOOOOOOOOOOOoOOOOOOOOOOOOOOOO#OO#OO#@O#O@#O#O@O@O#@#@#@#@#@##@#@#@#@#@#@##@##@#@#@#O#@#O@O#O@OOOO#OOOOOOOOOOOOOOOOOOoOOoOOoOOoOoOoOoOoOooOoOooOooOoOoOoOoOoOoOoOOoOOOOoOOoOOoOOOOOOoOOOOOOOOOOOoOOOOOOoOOoOOoOOOOOoOOOOOoOoOoOoOOoOOOoOOoOOOOOO", -"@@O#OO@@O@@O#O@OO@O@O#@O#@O#O@@O@O@+@O@O@O@#O#@#O@#@@@#@$#@#$#$$#$&$$$&$$*$$*$*$*$*$*$**$*****$*******$*$*****$**$*$$&$$&#$$#$@$@#@#@@@@O@O@OO@OOOOOOOoOoOoOOoOoOoOooOoOooOoOoOoOoOOoOOOoOoOOOOOOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOOOOoOOoOOoOOoOoOOOOOOOOOOOOOOOOOOOOOO#OOO#OO#O@O#O#O#O#O@O#O#@#@@#@#@#@#@#@#@#@#@@#@#O@#O#O#O#O#O#O#OOO#O#O#OOOOOOOOOOoOOOOOoOOOoOOoOOoOoOoOoOoOoOoOoOoOooOoOoOoOoOoOoOoOoOOoOoOOOOoOoOOOOOoOOOOOoOOOOoOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOO", -"O@O@@@O@O#O@@O@O@O#@O@O@O@O@@O@O@+@O@O@O@O@O@@O@@#O@#@#@#@$#$#$#$$$$&$$$*$&*$*$*$*$*$*$**$*$****$**$******$*$$*$$*$&$$$&$$#$#$#@#@@#@+@O@O@O@OOO@OOOOOOOOOOoOoOooOoOoOooOooOooOoOoOoOOoOOOOOoOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOOoOOOOOoOOOOOoOoOOOOOOOOOOOOOOOOOOO@OOO@OO#O@O@O#O@O#O@@OO#O#O@O#O@O#O#O@#O@O#O#O#O#O@@O@O@OOO#OO@OOOOOOO#OOOOOOOOOOOoOOOOoOOOoOOoOOoOoOOoOoOoOoOoOoOOoOoOoOOOoOoOoOoOoOoOOoOoOOoOOoOoOOOoOOOOOoOOOOOOoOOOoOOoOOOOOOoOOOOOOOOOOOoOOOOOOOOOOOOOO", -"#O@O#O@#O@@O#O@@+@@O@O@@O@O@O@+@O@O@O@O@#O@#O@O#O@#@@#@#@#@$#$#$$&#$$$&$*$$$$$*$*$**$**$****$*$*******$*$**$**$**$$*$&$$$$#$@$#@#@#@@@@@#O@OOO@OOOOOOOOoOOoOOoOoOoOoooOooOoOoOoOoOoOOoOOoOoOOOOOOOOOOOOOOOOOOOOOOOOoOOOOOOOOOOoOOOOOOOOOOOOOOOOOoOOOOOoOOOOOoOOOOoOOoOOOOOOOOOOOOOOOOOOOO@OO@OO#OO#OOO#O#O#O@O#O#O#O#O@O#@O#O#OO@O#O@O#OO#OO#O#OOOOOOOOOOOOOOOOOOOOOOOOoOOOOOoOOoOOoOOoOoOoOoOOoOoOoOooOoOoOoOoOoOoOoOOOoOOoOOOOoOOoOOOOoOOOoOoOOOoOOoOOOoOOOOOOOOoOOOOOOOoOOOoOOOOOoOOoOOOOOOOO", -"@O@@O@O@O@O@O@O@O@O@O@OO@O@O@O@O@O@O@O@O@O@O@@@O@@O@@@@@$@#@$#$#$$$$&$$$$&*$*$$*$*$$*$**$*$****$*$*$*$***$*$*$*$$*$$$$$&$#$$#@@$@@@@+@O@O@O@OOOOOOOOOOoOOoOoOoOoOooOOoOoOoOoOoOoOOoOoOOoOOOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOOOOoOoOOOoOOoOOOOOOOOOOOOOOOOOOOOO@OOOO@OOOOOOOOOOOOO@OOOOOOOOOO@OO@OO@OOOO#O@O#O#OO@OOO#OOOOOOO@O#OO#O@O#OOOOOOOOOOOOOOOOoOOOOOOOOoOOoOOOoOOOoOoOOoOoOOoOoOoOoOOoOOoOoOoOoOoOooOOoOOoOoOOOoOOOOOOoOOOOOOOOOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", -"@O@O@@O@O@@O@@@O@O@O@O@O#@O@O@O@O@O@O@O@OO@O@O@@O@@@#@#@#@$#$@$$#$#$$$$*$$$$*$*$*$*$**$*$**$*$********$*$**$*$*$*$*&$&$$$$$#@$#@#@#@@@@O@O@OO@O@OOOOOOOOOoOOoOoOoOOooOoOoOoOoOoOOoOOOOOOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOOOoOOOOOOOOoOOoOOOoOOOOOOOOOOOOO@OOOOO@O@O@O@O@OOOOOO@O@O#OOO#OO#OO#O@OOO@OOO#OO#O#OOO#O#O#OOOOOOOOOOO#OOOOOOOOOOOOOOOOOoOoOoOOOoOOoOOoOoOOoOoOoOOoOOoOOoOoOoOoOoOoOoOoOoOoOoOOoOoOOoOOOOOOoOOOOoOOoOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO+O", -"@O@O@O@O@O@O@O@@O@O@@O@@O@O@O@O@O@O@O@O@O@O@O@+@@#O@@@@@#@#@#$#$$$$$&$&$$*$&$$$$*$*$*$*$*$****$*$**$****$*$*$*$$*$$$$$$#$#$@$#@@@@@@O@O@O@O@OOOOOOOOOOoOoOOoOoOoOooOOoOooOooOoOoOOOoOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOOoOoOOoOOOOOOoOOOOOOOOOOOOOOOOOO@OOOOOOOOOOOOOOOOOOOOOOO@OOOOOO#OOO#OOOO@OOO#OOOO#OOOOOOO#OO#OO#OOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOoOOoOOOoOOoOOoOoOoOoOoOOoOOoOoOOoOOoOOoOOoOoOOOOoOOOoOoOOOOoOOOOOOOoOOOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO", -"O@O@O@O@O@O@O@OO@O@O@O@O@O@O@O@OOO@OOO@OO@O@O@@O@O@#O@#@@#@@$@$@#$#$$$$$&$$$$*$*$*$*$*$*$**$*$****$**$*$*$*$*$$*$$*$$&$$$$#$#@#@#@#O#@@@O@O@O@OOOOOOOOOOOOoOoOoOoOoOooOoOoOoOoOOoOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@OOOOOOOOOOOOO#OOOO#OOOO@OO#OOOOOOOOOOOOOOOOOOOOOOOoOOOoOOoOOoOOOoOOoOOOoOOoOOOoOOoOOoOOOoOOoOoOOoOoOoOOoOoOoOOOoOoOoOoOOOoOOoOOoOoOoOOOOOOOOOoOOOOOOOOOOOOOOOOOOOOOOO#OOO@OO", -"@O@O@O@O@O@O@O@@O@O@O@O@O@O@OOO@O@OO@OO@OO@O@O@O@@@O@@@@#@$#@#$$#$$$#$$$$$*$*$$$*$$*$*$**$*$**$*$***$***$*$*$*$$$*$$$$$#$#@$@@@@@@@@OO@O@OOOOOOOOOOOOoOOoOOOoOoOoOoOoOoOoOOoOOoOOOOoOoOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOoOOoOOOOOOoOoOOOOOoOOOOOOOOOOOOOOOOOOOO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO#OOOOOOOOOOOOOOOOOOOOO#OOOO#OO#OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOoOOoOOoOOoOOoOOoOoOoOOoOoOoOOoOoOoOoOOOOOOoOOOOOoOOOOOOOoOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@", -"O@O@O@O@O@O@O@OO@OO@OO@OO@OOO@OO@OO@OO@OO@OOO@O@O@O@@@#@@@@@$@#$@$#$$$$&$&$$$$*$$*$$*$*$$*$*$*$**$*$*$*$*$*$*$$*$$$&$$#$$@$@$#@#@#O@@@O@OO@O@OOOOOOOOOoOOoOoOOoOoOoOoOoOoOoOOoOoOoOOOOOOOOOOOOOOOO@OO@O@O@O@O@O@O@OO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOoOOOOOOOoOOOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO#OOO#OOOOOOOOOOO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOoOOoOOOOOOOoOOOOOoOOoOOoOOoOoOOoOoOoOoOOoOOoOooOoOOOoOoOOoOoOoOOOOOOOOOOOOOOOOOOOOOOOOOO#OO#OO#OO@+@+O", -"@O@O@O@O@O@O@O@@OO@O@O@O@OO@OO@OOO@OO@OO@OO@O@O@O@@@O@@@#@#@#$@$#$#$#$$$$$$&$$$*$$*$$*$**$*$*$*$**$**$*$*$*$$*$$&$$$$$$##$#@#@@@@@@O@O@OO@OOOOOOOOOOOOOOoOOOoOoOoOoOoOoOOoOoOOOOOOoOOoOOOOOOOOOOOOO@OOOOOOOOOOOOOOO@OO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOoOOOOOOOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@OOO#OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOoOOOOoOoOOOOOOoOoOOoOoOoOOoOoOoOOoOOoOOoOOoOOOOoOOOOOOOoOOoOOOOOOOOOOOOOOOOO#OOOOOOOOOOO#OOOO@", -"O@O@O@O@O@O@O@OO@O@O@OO@OO@O@OOO@OOOOO@OOOO@OO@O@O@O@#O@@@@@$@#@$@#$$$&$$&$$*$&$$*$$*$*$$*$*$*$**$*$*$*$*$*$*$$*$$&$$$#$@$@$@@@#@O@@O@OO@OOOOOOOOOOOOoOoOOOoOOoOOoOoOoOoOoOOoOoOoOOoOOOOOOOOOOOOO@OOO@O@O@O@OO@OO@OOOOOOOOOOOOOOOOOOOOOOOOOOoOOOOOoOOOOoOOoOOOOOOOOOOOOOOOOOoOOoOOOOOOOOOOOOOOOOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO#OOOOO#OOOOOOOOOOO@OOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOOOoOoOOOOoOoOoOOoOoOoOoOoOoOOoOOoOOoOOoOOoOOoOoOOoOoOoOOOOOOOoOOOOOOOOO#OO#OOOO#OO@O#O@OOOO@OO", -"OOOO@OOO@OO@OO@O@O@OO@OO@O@OO@O@OO@OOOOO@O@OO@OO@OO@O@@@#@@#@@$@$#$$#$$$$$$$$$$$$$*$$*$*$*$*$*$*$*$*$*$*$*$$*$$$$$$$#$$$#$@#@#@@@@O@O@O@OO@OOOOOOOoOoOOOOoOoOoOoOoOOoOoOoOoOoOOoOOOOOoOOOOOOOOOOOO@OOOOOOOOOOOOOOOOO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOOOOOOOOoOOOOOOOOoOOOoOOOOoOoOoOOoOOoOoOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO#OOOO@OOOOOOOOOOOOOOOOOOOOOOOOOOoOOOOoOOoOOOOoOOOOOoOOoOOOOOOOOOoOOoOoOOoOOoOOOoOOoOOOoOOoOOOOoOOOOOOOOOOOOOOOOOOOOOO@OO#OOOOO@O@OOO@", -"@O@OO@O@OO@OO@O@OO@O@OO@O@OO@OOO@OOOO@OOOOOO@OO@O@O@@O@O@@@@@#@#@@$@$@#$$$$$$$$$*$$$*$$$$$*$*$*$*$*$*$*$*$$*$$*$&$$$$$@$@#@$@@@@O@@O@O@OOOOOOOOOOOOOOOOoOoOOoOoOoOooOoOoOoOoOOoOOoOoOOOOOOOOOOOOO@OOO@O@O@O@O@OO@O@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOoOoOoOoOOOoOOOOoOOOOOOOOoOOOOOOOOOoOoOoOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOoOoOOoOOoOoOoOoOoOOoOOOOoOoOoOoOOoOOOoOOoOOOOoOOOOOOOOOOOOOOOOOOOOOO#OOOOOOOO@OO+OO#OO", -"O@O@OO@O@O@O@OO@O@O@O@OO@O@OO@OOOO@OOOOO@OO@OO@OO@O@O@@@#@@#@@@@$#@$$$$@$$$$$&$$$$$$$$*$*$$$$$$$*$$$$*$$$*$$$$$$$$$$$$#$@$@@@@@@#@O@OOO@OO@OOOOOOOOoOoOOOoOoOoOoOoOOoOoOoOOoOoOoOOOOOOOOOOOOOOOO@OO@OOOOOOOOOOOOOOOOOO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOOOOOoOOOOOoOOOoOoOOoOoOoOOOOoOoOoOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO#OOOOOO@OOOO@OO@OOOO@OOOOOOOOOOOOOOOOOOoOOOoOOOOOoOOOOOOOoOOOoOOoOOOoOOoOoOOoOOOoOOoOOoOOoOOOoOOOOOoOOOOOOOOOOOOOOOOOOOOO#O@O@+@O+@O@OOO@", -"O@O@O@OO@O@O@O@O@O@OO@O@OOO@OO@O@OOO@OOOO@OOOOO@OO@O@O@O@O@@@#@#@$@$@@#$#$$#$$$$$&$$*$$$$$*$*$*$$*$*$$$*$$*$$&$&$$$$#$@$@$@#@#@@O@O@O@OOOOOOOOOOOoOOOOoOoOOoOOoOoOooOoOoOOoOoOOOoOOoOOOOOOOOOOOOOO@OO@O@O@O@O@O@O@OO@OOOO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOoOOOoOoOOOOoOOOoOoOOoOOoOoOOOoOOOOOoOoOoOoOOoOOoOOOOOOOOOOO@OOOOOOOOOOO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOoOOoOoOOOoOOOOoOoOOoOOoOoOoOoOOoOOoOOoOOoOOoOOoOOOOOOoOOOOOOOOOOOOO@OOOOOOOOOO@OOOO@OO", -"@O@O@O@O@O@O@O@O@O@O@OO@O@OO@OOOOO@OOOOOOOOO@OOOO@OO@@O@@@@@@@@@@@#@$$$@$#$$$$$$$$$$$$*$$$$$$$$*$$$*$*$$*$$$$$$$$$$$#$@$@#@@@@@@@O@O@OO@OOOOOOOOOOOOoOOOOoOOoOOoOOOOoOoOoOOOOOoOOOOOOOOOOOOOO@O@O@OO@O@O@OOOOOOOOOO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOOoOoOOoOoOOOoOOoOOOOoOOOoOoOoOOOOOOOOoOOOOOOOOOOOOOOOOOOOOOO#OOOOOOOOOO@OO@OOOO@OOO@OO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOOoOOOoOOOOOoOOoOOoOOOoOoOOOoOOoOOoOOOOOoOOOOoOOOOOOOOOOOOOO#OOOO@O#O@OO@OO@+@O+@", -"O@O@O@O@O@O@O@O@O@O@O@O@OO@OOO@O@OOOOO@OOOOOOOO@OOO@OO@O@O@O@@#@#@$@@#@$@$@$#$#$$$$$$$$$$$*$$*$$$*$$$$*$$$$$&$$$$$#$@$@#@@@@@@O@O@O@OOOOO@OOOOOOOOOOOOOoOOoOOoOoOoOoOoOOOoOoOoOOOOOOOOOOOOOOOOOOOO@O@OO@OO@@O@O@O@OOOOO@OO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOoOoOOOoOoOOoOoOOoOoOoOoOoOoOoOoOoOOoOOoOooOoOOOoOOoOOoOOOOOOOOOOOOOOOOOOOOOO#OOO@OOOO@OOO@OOOOOOOOOOOOOOOOOOOOOOOOOoOOOOOOOOOOoOOOoOOOoOoOOoOOOoOoOoOOOoOoOOoOOoOOoOoOOOOOOOOOOOOOOOOO#OOOOOOO+OOOOO#OOO#O@OO@O", -"@O@O@O@O@O@O@O@O@O@OOO@OO@OO@OOOOOOOOOOOOO@OOOOOO@OO@O@O@@O#@@@@@@@#$@$#$@$#$$$$$$$$$$$$*$$$$$$$$$$$$$$$$$&$$$$#$#$@$#@$@#@@@@@O@O@OO@OOOOOOOOOOOoOoOoOOOoOOoOoOOoOOOOoOoOOOOOOoOOOOOOOOOO@O@O@O@O@O@O@O@OOO@OO@OOO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOoOOoOoOOoOoOoOoOoOOoOoOOoOoOoOoOoOoOOoOoOOOoOOOOOOOOOOOOOOOOOOOOO@OO@OOOOOOOO@OOOO@OOO@O@OO@OO@OOOOOOOOOOOOOOOOOOOoOOoOOOOOoOOOoOOOoOoOOoOOOOoOoOoOOOOoOOoOOoOOOOoOOoOOOOOOOOOOOOOOOOOOO@O@O@OOOO@OOOO#OO@", -"O@O@O@O@O@O@OO@OO@O@O@O@OO@OOOO@OOO@OOOOOOOOOOO@OOOO@O@O@O@O@O@@@#@@@@@@#$@$@$@$#$#$$$$$$$$$$$$*$$$$*$$$$$$$$$$$$$#$@$@#@@@@@@O@O@O@OOOOOOOOOOOOOOOOOOOOoOOoOoOOoOoOoOoOOoOoOoOOOOOOOOOO@OOOO@OO@O@OO@O@O@O@OO@OO@OOOO@OO@OO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOoOoOOOOoOOoOOoOOoOoOoOoOoOOoOoOoOOoOOoOoOOoOOOoOoOOoOoOoOOOOOOOOOOOOO@OOOOOOOO@OO@OOOO@OOO@OOOOOOO@OOO@O@OOOOOOOOOOOOOOOOOOOOoOoOOOoOOOOoOOOOOoOoOoOoOOOoOoOOoOOOoOOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOO+OO@O+O@+@OO@O", -"@O@O@O@O@O@O@@O@O@O@OOO@OOO@O@OOOOOOOOOOOOOOOOOOOO@OOOOO@@O@@@@O@@@@#@$@@@$@$#$@$$$$#$$$$$$$$$$$$$$$$$$&$$$$$#@$@@$@#@@$@@#@@@@@OOOOO@OOOOOOOOOOOOOoOoOOOOoOOOOoOOOOOOOOOOOOOOOOOOOOOOOOO@O@OO@O@O@O@O@O@O@O@OO@OO@O@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOoOOoOOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOOOOOoOOOOOOOOOOOOOOOO@OOOO@OO@OOOO@OO@O@OO@OOO@O@O@OOO@OOOOO@OOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOoOoOOOOOOOOoOoOOOoOOoOOOOoOOOoOOOOoOOOOOOOOOOOOO#OO#OO#O@O@OO@OO@OO#OO", -"O@O@O@@O@O@O@O@O@O@O@O@O@O@OOOOOO@OOOOOOOOOOOOOOOOOOOO@O@O@O@O@@#@@@@@@#@$#@#@@$#@$@$$$$$$$$$$$$$$$$$$$$$$$#$$$#$$@$@$@@@@@@O@O@O@O@OOOOOOOOOOOOOoOOOOoOoOOOOoOOOoOOoOoOOoOOOOOOOOOOOOOO@OOO@O@O@O@O@O@O@O@O@O@O@O@OO@O@O@OO@OOOOOOOOOOOOOOOOOOOOOOOO@OO@OO@OO@OOOOOOOOOOOOOOOOOoOOoOOOOoOOOoOOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOOoOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@OOOOOOO@OOO@OOOOOOO@OOO@O@OOO@O@OOOOOOOOOOOOOOOOOOOOOOOOOoOOOOOoOoOoOoOOOOoOOoOOoOoOOOoOOOOoOOOOOoOOOOOOOOOOOOOOOOOOOO+OO@OO@OO@O", -"@@O@@O@O@@O@O@O@O@OO@OOOO@OO@OO@OOOOOOOOOOOOOOOOOOO@OOOOO@O@O#O@@@@#@@@@@@@$@$#@$@$$#$@$#$$$$$$$$$$$$$$$$$$$@$#@$@#@@#@#@@@@@@O@O@OOOOOOOOOOOOOOOOOoOOOOOoOoOOoOOOOoOOOOOOOOOOOOOOOOO@O@OO@O@OO@O@@O@@O@O@O@O@OO@OO@OOOOOOOOOO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@OOOOOOOOOOOOOOOOOOOOoOoOOoOOoOOoOOoOOoOoOoOoOOoOoOoOOoOOoOOoOoOOoOoOoOOoOOOOOOOOOOOO@OO@OO@O@OO@O@O@OO@OOO@O@O@OOO+@OOOO@OOOOOO@OOOOOOOOOOOOoOOoOOoOOOOOOoOOOOOOoOOOoOoOOoOOOoOOOOoOOOoOOOOOOOOOOOOOOOOOOO#OO#O@O@O@O@O+@O+O@O+", -"@O@@O@O@@O@@O@@O@O@O@O@@OO@OO@OOOOOOOOOOOOOOOOOOOOOOOO@O@O@O@O@@O@@@@@#@@#@#@@@$@$@$@$$@$@$@#$@$$#$#$#$#$#$#$@$$@#@$@@@@@@@O@O@O@OO@O@OOOOOOOOOOoOOOOoOoOOOOOOOOOoOOOOOOOOOOOOOOOOOOOOOO@O@O@O@O@@O@@O@@O@O@O@O@OO@OO@O@O@O@OOOOOOOOOOOOOOOOOOO@OOO@OO@O@O@O@O@OOOO@OOOOOOOOOOOOOOOoOOOOoOOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOOoOOOOOoOOOOOOOOOOOOOOOOOOOOOOO@OOOOOO@OO@O@OOOOOO#O@OO#O@+O@OO@OOOO@OOOOOOOOOOOOOOOOOOOoOOOOoOOoOOOOoOOOoOOOoOOOOoOOOOOOOoOOOOOOOOOOOOOO#OOOOOOOOOO+OOO@OOO@OO@O", -"@O@O@@@O@O@O@O@@O@O@OOOO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@O@O@@O@@@@@@@@@@$@#@@@#@$@$@$@$$@$$#$$$$$$@$@$@$@$@@#@$@@#@@@@@@O@O@OOOOOOOOOOOOOoOOOOOoOOOOOoOOoOoOOOOOOOoOOOOOOOOOOOO@O@O@O@O@O@O@O@@O@@O@@O@O@O@O@O@O@OOOOOOOOOOOOOOOOOOOOOOO@OOOOOOOOOOOOOOOOOOO@OOOOOOOOOOOOOOOOoOOOoOOOoOOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOoOOoOoOOoOOOOOoOOOOOOOOO@OO@O@OO@OO@OO@OO@OOO@OOO@O@O@OOOOO@OOO@OO#OOO@OOOO@OOOOOOOOOOOOOOOoOOOOOOOOOOOoOoOOoOOOoOOoOoOOOoOoOOOOOoOOOOOOOOOOOOOOOO@OO#O@O@O@OOO#OO@+O@", -"O@@@@O@@O@O@@O@O@O@OO@@OO@O@O@O@OOOOOOOOOOOOOOOOOOOOO@OO@O@OOO@OO@O@O@@@@@@@@@@@@$@$@@$@$@$@$@$@$@$@#@$$@$@$@@#@$@@@@@@@O@O@O@O@OO@OOOOOOOOOOOOOoOOOOoOoOOOOOOOOoOOoOOOOOOOOOOOOO@OOOO@OO@O@O@@O@@O@@O@@O@@O@O@O@O@OO@O@O@OO@OOO@OO@OOOOOOOOOOO@OO@OO@O@O@OO@O@OOOO@OO@OOOOOOOOOOOOOOOOoOOoOOoOOoOoOoOoOoOoOooOoOoOOoOoOoOoOoOoOOoOOoOoOOOOoOOOOOOOOOOOOOOO@OO@OOOOOOO@OO#O@OO#O@O#O@+O@+O@OOO@OOOO@OOOOOOOOOOOOOOOOOOOOOOoOOOOoOOOOOOOOoOOOOOOOOOOOOOOOoOOOOOOOOOOOOOOOOOOOO#OOOOOOOOO#OO@OO@OO", -"@@O@O@@O@@O@O@@O@O@O@OO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@O@O@O@O@@@O@@@@#@@@#@@@@@$@@$@@$@$@$@$@$$@$#$@#@#@@$@@#@@@@@@@O@O@OOO@OOOOOOOOOOoOOOOOOoOOOOOoOOOOOOOOOOOOOOOOOOOOOOOOO@O@O@O@O@O@O@@O@@O@@O@O@@O@O@O@O@OO@OOOOOOOOOOOOOOO@OO@O@OO@OOOOO@OOOOO@OOOO@O@OOOOOO@OOOOOOOOOoOOoOOOoOOoOoOoOoOoOoOooOoOooOoOoOoOoOoOoOoOOoOOoOOOOoOOOOOOOOOOO@OO@O@OOOO@OO@O@O#OOO@OOO#OOO@OO@O@OO@O+O@OO+@OOOOOOOOOOOOOOOOOOOOOOOoOOOOOOOOoOOoOOOOOoOoOOoOoOOoOoOOOOOOoOOOOOOOOOOOO#OOOO@+@O#OOOOO@+O@OO@", -"O@@@@@@@O@@O@@O@O@O@O@OO@O@O@O@OOOOOOOOOOOOOOOOOOOOOOOOO@O@OO@OO@O@O@O@@@@@@@@@@@@@@@@$@@@$@@$@@$@#@@$@@@$@$@$@@@@@@@@@@O@O@O@O@OOOOOOOOOOOOOOoOOoOOOOOoOOOOoOoOOOoOOOOOOOOOOOO@O@OO@OO@O@O@@O@@O@@O@@O@@O@O@@O@O@O@O@OO@OO@OO@OOOOOOOOOOOOOO@OOOO@OOOOO@OOOO@OOOO@OO@OOOOOOOOOOOOOOOOOOoOOoOOoOOoOOoOOoOOoOoOOoOoOoOoOoOoOoOoOoOoOoOoOOOOoOoOOOOOOOOOOOOOO@OO@OOOOOO@O#O@O@OO@OO#O@+OO#O@O@OOO@OO@O@O@O@OOOOOOOOOOOOOOOOOOOoOOoOOOOOOoOoOOOOOOOOOOOOOOOOOoOOOOOOOOOOOOOOOOOOOOOOOOOO@+@OO@OO@+O", -"@@O@O@O@@@O@@O@@O@O@O@O@OO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@OO@O@O@O@O@O@O@@@@@@@@@@@@@@@@@@@@$@@$@#@@$@@@@@@@#@@@@@O@O@O@O@OOOO@OOOOOOOOOOOOOOOOOoOoOOOoOOOOOOoOOOOoOOOOOOOOOOOOO@OO@O@O@O@@O@@@O@@O@@O@@O@O@O@O@O@OO@OO@OOOOO@OO@OOO@OOOOOOO@O@OO@O@O@O@O@O@O@OO@OOO@O@OOOOOOOOOOOOoOOOOOoOOoOOoOOoOoOoOoOooOoOOoOOoOOoOOoOOOoOOOOOOoOOOOOOOOOOOO@OOO@OOOO@OO@O@OOO@OO@O@O@O@OOOO@O@OO+@O+@OOO#OOOOOOOOOOOOOOOOOOoOOOOOOOOOOOOOOOOOOOOOOoOOoOOoOOoOOOOOOOOOOOOOOOOOO#OOOO#OO@O@O@OOOO@OOOOOO@", -"@O@@@@@@@O@@O@@O@@O@O@O@O@OOO@OOO@OOOOOOOOoOOOoOOOOOOOOOOO@OOO@O@O@O@O@O@@@@O@@@@@@@@@@@$@@$@$@@#@@$@@$@#@$@@$@@@@@@@@@@O@O@OOO@OOOOOOOOOOOoOOoOOoOOOOOoOOOOoOOOOOOOOOOOOOOOOOO@O@OO@O@O@O@O@O@@O@@O@@@O@@O@O@O@O@O@OO@OOOOO@OOOOOOOO@OOOO@O@O@OOOO@OO@O@OO@O@OOO@OO@O@OOOO@OOOOOOOOOOOOOOoOOOoOOoOOoOoOoOoOoOOoOOoOoOoOoOoOOoOoOOOoOoOOOOOOOOOOOOOOOO@OOOO@OOO@OOOO@OO@O#OO@O@O+@O#OO+OO@OO@O+@OOO+O@OOOOOOOOOOOOOOOOOoOOOOOOOOOOOOoOOOOOOOOOOOOOoOOOOoOOOOOOOOOOOOOOOOOOOOOOOO+OO+OO@OO+O@+@OO", -"@@@O@O@O@@@O@@O@@O@O@O@O@OO@OOO@OOOOOOOOOOOOoOOOOOOOOOOOOOOO@OOO@O@O@@O@O@O@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@O@O@O@O@OOO@OOOOOOOOOOOOOOOOOOOOOOOoOOOOOOOOOOOOOOOOOO@O@OOO@OO@O@O@@@O@@O@@O@@O@@O@@O@@O@O@OO@OO@O@OOOO@OOO@OOOOOO@OOOOO@O@OO@OOOO@OOOO@O@O@OOOOO@OOOOOOOOOOOOOOoOOOOoOOOoOOoOOOoOoOOoOoOoOoOOoOOoOoOoOOOoOoOOOOoOOOOOOOOOOOOOOOO@OOO@O@OO@O@O@OO@O@OO#O@OOOO@O@O#OO#OO@OO@O@OOO@OO@OOOOOOOOOOOOOOOOOOOOOOoOOOOOoOoOOOoOOoOOOoOOOOOOOOOOOOOOOOOOOO@OOO@O@O@O@O@OO@O@OOO@O", -"O@O@@@@@O@O@@O@@@O@@O@O@O@OO@OOOOOOOOOOOoOoOOOOOOoOOOOOOOOOOOOO@OOO@O@O@@O@O@@O@O@@@@@@@@@@@@@$@@$@@$@@@$@@@#@@@@@@@@O@O@O@OOOOOOOOOOOOOOOOOOoOOOoOOoOoOOOOOOOOOOOOOOOOOOOOOOOO@O@OO@O@O@@O@@O@@@O@@@@O@@O@@O@O@@O@O@O@OOOO@OOOO@OOOOOO@OOOO@O@OOOO@OO@@O@O@@O@O@OO@O@O@OO@OO@OOOOOOOOOOOOoOOOoOOoOOoOoOOOoOOoOOOoOoOoOoOOoOOOoOOoOOOoOOOOOOOOOOOOOOO@OOOO@OOOOO@OO@OO@O@OO@@OO@O#O#OO@OO@OO@OOO#OOOO#OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOoOOOOOOOOOOOOOOOOO#OOOOOOOOOOO#OOOO@OOO", -"@@@@O@O@@@@O@@O@O@O@O@O@OO@OOO@OOOOOOOOOOOOOoOoOOOOOOOOOOOO@O@OOO@OO@O@O@O@O@O@@@O@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@O@@O@O@O@OOO@OOOOOOOOOOOOOOoOOOOOOOOOoOOoOOOOOOOOOOOOO@O@O@OO@O@O@@O@O@O@@@O@@@O@@@@O@@O@@O@O@O@O@OO@OOOO@OOOOO@OOOOO@OOOOO@O@OO@O@O@O@OO@O@O@OO@OO@O@OOOOOOOOOOOOOOOOOOoOOOOOOoOOoOoOOoOOoOoOOoOOoOoOOoOoOOoOOoOOOoOOoOOOOOOOOOOOOO@OOO@O@OO@OO#OO@+@O#O@O@OO@OO#OO#O#OO#OOO@O#OOO#OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOOOOoOOOOOOOOOOOOOOOOOOO#OOOOOO#OO#O@+@OOOO@+OOO#O", -"@O@O@@@@@O@@O@@@O@@@O@O@O@OO@OOOO@OOOOOOOOoOOOOOoOoOOOOOOOOOOOO@OOO@OOO@O@O@O@@OO@@O@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@O@OOOOOOOOOOOOOOOOOOOOOOOOoOOOoOOOOOOOOOOOOOOOOO@OOOO@OO@O@O@O@@O@@@@O@@@O@@@@O@@@O@@O@@O@O@OO@OO@O@OOOOOOOOOOO@OOO@O@OO@OO@O@O@OO@O@O@OO@O@OO@OOOO@OO@OOOOOOOOoOOoOOOOoOoOOOoOOOoOOoOoOOoOoOoOoOoOoOOoOOoOOOoOOOOOOOOOOOOOOO@OOOO@OO@OO@OO@OO@O@O@OO@O#O@O#O@O#O@O#O@O@#OOOOOOOO@OO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO#O@OOOO@OOO", -"@@@@O@O@O@@O@@O@@OO@O@O@OO@OOOO@OOOOOOOOoOOOoOoOOOOOOOOOOOOOOOOOO@OO@O@OO@O@O@O@@O@O@O@@O@@@@@@@@@@@@@@@@@@@@O@O@@O@OO@OOO@O@OOOOOOOOOOOOOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@O@O@O@O@O@@O@@O@O@@@O@@@O@@@@O@@@O@O@O@O@O@OO@OOOO@OO@OO@OOOOO@OO@O@OO@O@OO@O@O@O@O@O@O@O@O@O@O@OOOOOOOOOOOOOOOOOOoOOOOoOOOoOoOOoOOOoOoOOoOOoOOoOOoOOoOOoOOOOOOOOOOOOOOO@OOOO@OOO@OO@O@O@O@O@O@O@#O@O@OO@O#O@O@O@OO#OO@O#O@O@OOO@OOO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOOOOOOOOOOOOOOOOOOOOO@OOO@O#O@O@OOOOO#O@OO@O@", -"O@O@@@@@@@O@@O@@O@@@O@O@O@OOO@OOOOOOOOOOOOOoOOOOoOOoOOOOOOOOOOOOOOOOO@OO@O@O@O@OO@O@@O@O@@O@O@@O@@@@O@@@O@@@O@@@@@O@O@O@O@OOOOOOO@OOOOOOOOOOOOoOoOOOOOOOOOOOOOOOOOOOOO@O@OO@O@O@O@O@@O@@O@@@@O@@@O@@@@O@@@O@@O@@@O@O@OO@OOO@OOOOOOOOOOO@OOO@OOOO@O@OO@O@O@O@O@O@O@O@OO@OO@OOO@OO@OOOOOOOOOOOOOOoOOOoOoOOOoOOoOoOOOoOoOoOOoOoOOoOOOoOOOoOoOOOOOOOOOOOOOOOOOOOO@OO@OOO@O@+@O#O@O@O#O#OO@O@O#O#O@O@OO@OO@OOO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOoOOOOOOOOOOOOOOOOOOOOOOO+OOO@OOOOO@O+OO", -"@@@@O@O@O@@@O@@O@@OO@O@O@O@O@OOOO@OOOOOoOoOOOoOoOOOOOOOOOOOOOO@OOO@OOOO@OOO@OO@O@O@OO@@O@@@@@@O@@O@@@@O@@@O@@O@O@O@O@OO@OO@OOOOOOOOOOOOOOoOOOOOOOOOOoOOOOOOOOOOOOOO@OOOOO@OOO@O@O@O@O@@O@@O@@@@@@@@O@@@@O@@@O@O@O@O@O@OOO@OOOO@OO@OO@OOOO@OO@O@OO@O@O@O@O@O@O@O@O@O@O@O@O@O@OOO@OOOOOOOOOoOOoOOOOOOOOOoOOOoOOOOoOoOOOoOoOoOOoOOoOOOOoOOOOOOOOOOOOOOOO@O@O@O@OO@OO#O@+@O@O@O@O@+@O@O@#O@O#O@O@O#O@#O@O@O#OO@O@O@O@O@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO#OOOO#OOOOO@O@OO+@OO@+O@O@O", -"@@O@@@@@@@@@@@O@@O@@O@O@O@O@OOO@OOOOOOOOOOOOoOOOOOoOoOOOOOOOOOOO@OOOO@OOOO@OO@O@O@O@O@O@O@O@O@@@@@@O@@@@O@@O@@@O@@O@@O@OO@OOO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@O@OO@O@O@O@O@O@@O@@@@@@@@@@@@@@O@@@@@O@@@O@O@O@O@O@OOO@OOOOOOOOOO@OO@OO@O@OO@OO@O@O@@O@O@@O@O@O@OO@OO@O@OOOOOOOOOOOOOOOOoOOoOOoOOOoOOoOoOOoOoOoOOOoOOoOoOOoOoOOOOOOOOOOOOOOOO@OOOOOOOOO@OO@O@O@O@O@O@O@O@O@@O@O#O@O@O@O@O@OO@O#O@O@O@OO@OOOOOO@OOOOOOOOOOOOOOOOOOOOoOOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@OOOOO@OO@OO", -"@@@@O@@O@O@O@@@O@@O@@O@O@OOO@OOOOOOOOOOOOoOOOoOoOoOOOOOOOOOOOOOOOOOO@OO@O@OO@OO@O@O@@O@O@@O@@O@O@O@@O@O@@@@@O@O@@O@OO@O@OOO@OOOOOOOOOOOOOOOoOOOOoOOOOOOOOOOOOOOO@O@OOO@OO@O@O@O@O@O@@O@@@O@@@@@@O@@@@@@@O@@@O@O@@O@O@OO@OO@OOO@OO@OOO@OOOOOO@OO@O@O@O@O@O@O@@O@O@O@O@O@O@O@OOO@OO@OOOOOOOOOOOOOOOOOOOOoOOOoOOOoOOOOoOOoOOoOOOOOOOOOOoOOOOOOOOOOOO@OOO@OO@O@O@OO@O@O@O@+@O#O@+@O@O#O@O@O#O@O#O#O@@O@OO@OOO@OO@OO@O@OOOO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO#OOOO@OOO@OOOO@O#OOO#OO#", -"@@O@@O@@@@@@O@O@@O@@O@O@O@O@OOO@OOOOOOOOOOOoOOOOOOOOOOOOOOOOOOOOOO@OOOOOOO@OO@OO@O@O@O@O@O@@O@@@@@O@@O@@@O@O@@@@O@O@O@OO@O@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@OO@OO@OO@O@O@@O@@@O@@@@@O@@@@@O@@O@@@@O@@O@O@O@O@OO@OOO@OO@OOO@OOOO@O@OO@OO@OOO@O@O@@O@O@O@O@@O@O@O@O@O@OO@OOOOOOOOOOOOOOOOOOOoOOOOoOOOoOOOOoOOoOOoOOoOoOoOOoOOOOOOOOOOOOOOOOOOOOO@OOOOOO@O@OO@O@O@OO@O@O@#O@O#O@O@O#O@@O@O#O#O@O@O#OO@O@OO@OOO@OOOO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO+OO#OOOOO@OOOOO", -"@@@@@@@O@@@@@@@O@@O@O@O@O@OO@OOOO@OOOOOOoOOOOoOoOoOOoOOOOOOOOOOOOOOOO@OO@OOO@OO@O@OO@O@O@@O@@O@O@O@@O@@O@@@@O@O@O@O@O@O@OOOO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@O@O@O@O@OO@O@O@O@@O@@O@@@@@O@@@@@@@@@@@@@O@O@@O@@O@O@O@O@OO@OOOOOOOOOO@OOOOO@OO@OO@O@OO@O@O@@O@@O@O@O@O@O@OO@OOOOO@OOOOOOOOOOOoOOOOOOOOOOOOOOOOoOOOOOOOoOOoOOOOOOOOOOOOOOOOOOOOOO@OO@O@OOO@O@O@OO#O@+@O@O@O@O@O@O@@@O@#O@@O@@O@@O@O@O@O@O@O@OO@O@OO@OO@O@OO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@OO@OOOOOOO@OOOOO@OOO@O@OOOOOO@O+@OO@O", -"O@O@@O@@@O@O@O@@O@@O@O@O@O@OO@O@OOOOOOOOOOOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@OO@OOO@O@O@O@O@O@O@@O@@O@@O@@O@O@@O@O@O@O@OO@O@OOOO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@OOO@OO@O@O@O@@O@O@@@O@@@@@@@@@@@O@@O@@@@@@O@@O@@O@O@OO@OO@O@O@O@O@OOOO@O@OO@OO@O@O@O@O@O@O@@O@@@O@O@O@O@O@O@O@OO@O@OOOOOOOOOOOOOOOOOoOOOOoOOOOoOoOoOOOOOOOOoOOoOOOOOOOOOOOOOOOO@OOOOOO@OOO@OO@OOO@O#O@+@O#O@+@O#O@@O@@O@@O#@O#@O@@O@O@O@O@O@OO@O@O@OOO@OOOO@OOOOOOOOOOOOOOOOOOOOOOOOOO@OOOOOOOOOOOOOOOOOOOOOOOOOO@OOO#OOOOOOOO", -"@@@@O@@@@@@@@O@@@O@@O@@O@OO@OOOOO@OOOOOOOOOOOoOoOoOOoOOOOOOOOOOOOOO@OO@OO@OOO@OO@O@O@O@O@O@O@O@O@O@O@O@O@@O@O@@O@O@O@OO@OOOO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@OO@OO@O@O@O@O@O@@O@@@@O@@@@@O@@@@@@O@@@@@@@O@@O@@O@O@O@O@O@OO@OOOOOOOOO@O@OOOO@OO@OO@OO@O@O@O@O@O@O@O@@O@O@O@O@OO@O@OOOOOOOOOOOOOOOOOOOOOOOOoOOOOOOOOOOOOoOoOoOOOOOOOOOOOOOOOOOOO@OOOO@O@O@OO@OO@OO@@OO@O@O@O@O@O@@O@O#O@O#O@+@O@@O@O#O@O@O@O@OOO@O@OO@OO@OO@O@OOO@OOOOOOOOOOOOOOOOOOOOOOOOOOO@OO@OOOOOOOO#OOOOOOOO#OOOO@OOOO@OO#OO", -"@@O@@@@@O@O@O@@O@@O@O@O@O@@OO@O@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@OO@OO@O@OO@O@O@O@O@@O@O@O@O@O@@O@@O@O@O@O@OO@O@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@OO@O@O@O@O@O@@O@O@@O@@@@@@@@@@@@@@@@@O@@@@@O@O@O@O@O@OOO@OOO@O@O@O@OOOOO@OO@O@O@OO@O@O@O@@@O@O@O@@O@O@O@O@OO@OOO@O@O@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOoOOOOOOOOOOOOOOOOOOOO@OOOOOO@OOO@OO@O@O@O@O@O@O@O@O#O@@O@@O@@O@@O@O@@O@O@O#OO@+@@O@OOO@OO@OO@OOOO@OOOOOOOOOOOOOOOOOOOOOO@OO@OOOOOOOOOOOOOOOOOO#OO#OOOOO@+OOO@OOOOOOO", -"@@@@O@@O@@@@@@O@@O@@@O@O@OO@OOOOO@OOOOOOOOOOOOOOoOOOOOOOOOOOOOOO@OOOO@O@OOOOOOOO@OOO@O@OO@O@O@O@@O@@@O@@O@O@O@O@O@OOOO@OOOO@OO@OOOOOOOOOOOOOOOOOOOOOOOO@OO@O@O@OO@OO@O@O@O@O@O@@O@@@@@O@@@@@O@@@@@@@@@@@O@O@@@@@O@O@OO@O@O@O@OOOOOOO@O@O@OO@OO@O@O@O@O@O@O@O@@@@@O@@@@O@@O@@@O@O@OO@OO@OOOOOOOOOOOOOOOOOOOOOOOOOOoOOOOOOOOOOOOOOOOOOOOOOOOOO@OOO@OO@O@O@O@O@O@O@OO@O@O#O@@+@@@O@@O@@O#O@O@@O@#O@O@O@O@O@O@O@O@O@O@OO@O@OO@O@OO@OO@OO@OOOOOOOOOOOO@OOOOOOO@OOOOOOO@OO@OOO@OOOOOO@OOOOO@OOOO@O@O@O", -"@@O@@@@@@@@@O@@@O@@@O@O@O@O@O@O@OOO@OOOOOOOOOoOOOOOOoOOoOOOOOOOOOOO@OOOOO@OO@O@O@O@O@O@O@O@O@@O@O@@O@@O@O@@@O@O@O@O@O@OOO@OOOOOOO@OOOOOOOOOOOOOOOOOOO@OOOOOOOOOOO@O@OO@O@O@@O@@O@@O@O@@O@@O@@@@@@@@@@@@@@@@@O@O@O@@O@O@O@OO@OOO@O@O@OOOOOO@OO@OO@O@O@O@@O@O@@O@O@O@O@O@@O@OO@O@O@O@OO@OO@OO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@OOO@OO@O@OO@O@OO@O@O@O@O@@O@O#O@O@O@O@O@@@O@O@O@@O@O@O@O@O@O@OO@O@OO@O@OO@OOO@OO@OO@OO@O@O@OO@O@OOOOOOOOOOOOOOO@OOOOOOOOOOOO@O@OOO@O@OOO@O@OOOOOO", -"@@@@O@O@@O@@@@@@@O@O@@O@OO@OO@OOO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@OOOOO@OOOOO@O@O@O@O@O@O@@O@O@O@O@@@O@O@O@O@O@O@OO@OO@O@OOOOOOOOOOOOOOOOOOOOOOOOOO@O@O@O@O@O@O@O@O@O@O@@O@@O@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@O@O@O@OOO@OO@O@OOOOOO@O@O@OO@O@O@O@O@@O@@O@O@@O@@@O@O@@O@@@O@O@O@O@O@O@OO@OOO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@OOOO@OOO@OOOO@O@OO@O@O@O@@O@O@@@O@@@O#@O@@@O@O#@O@@O@O@O@O@O@O@OO@O@OO@OOOO@OO@O@OO@OOOOOOOOOOOO@OOOOOOOOOOOOOOO@OOOOOOOOOOOO@OOOOOOOOOOOO@OOOOO@O@OO", -"@@O@@@@O@@@O@O@O@@O@@O@@O@O@O@O@OOOOO@OOOOOOOOOOOOOOOOOOOOOOOOOO@OO@OOO@O@OOOO@O@O@O@O@O@O@O@O@@O@@@O@@O@O@@O@O@OO@OOO@OO@OOOO@O@OOO@OOOOOOOOOOOOOOOO@OOOOOOOOOO@O@O@O@O@@O@O@O@@@O@O@O@@O@@@@@@O@@@@O@@@@@O@O@O@O@O@O@O@OO@OOOOO@O@OO@OOOO@OO@O@O@O@O@O@O@@O@@O@O@O@@O@O@O@@O@O@O@O@OO@OO@O@OO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@OOOO@OO@O@OO@@O@O@O@O@O@O@O@O@@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@OO@OO@O@O@O@O@O@OOOO@O@OOOO@OOO@OOOOOO@OO@OO@OOOO@O@O@O@O@OOOOO#OOOOOO", -"@@@@O@@@@O@@@@@@@O@@O@O@O@O@OO@O@O@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@OOOOO@O@OO@OO@O@O@@O@@O@O@@O@O@@O@@O@O@O@O@O@O@OO@OO@O@OOOOO@OOOOOOOOOOOOOO@O@OOO@O@O@O@@OO@O@O@O@O@@O@@@O@@@@@@@@@@@O@@@@@@@@@@@@O@@@@O@@O@O@OO@OO@OO@O@O@OOO@OOO@O@O@O@OO@O@O@O@O@O@@O@@O@@@O@@O@@O@O@O@O@O@O@O@O@OO@O@O@O@OO@OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO@OOO@O@OO@OOO@O@OO@OO@O@OO@O@O@O@O@O@O@@O@O@@O#O@@O@@O@@O#O@O@O@O@O@O@O@O@O@O@O@OO@OO@OO@OO@OO@OO@OOO@O@OOOOO@OOOO@OOO@O@OOOOOOO@OO@OOOOOOOOOOO@O@OOOO@O@O@", -"O@O@@@O@@@@@@O@@O@@O@@O@O@O@O@O@OOOO@OO@OOOOOOOOOOOOOOOOOOOOOOO@O@O@OOOO@O@OOO@OO@O@O@O@O@O@O@@O@@O@@O@@O@@O@@O@O@O@OO@OO@OOOOO@OOOO@OO@OOOOOOOOOOOOO@OO@OOO@OO@O@O@O@O@O@O@@O@@O@@O@@@@O@@@@@@@@@@O@@O@@@@O@@O@@@O@O@O@O@O@OOOOOO@OOO@OO@OOO@O@O@O@O@O@@O@@O@@O@@O@O@O@@O@@O@@O@@O@O@O@O@O@O@O@OOO@OO@O@OO@OOO@OOOOOOOOOOOOOOOOOOO@OO@O@OO@O@O@O@OOO@O@O@OO@O@OO@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@@O@O@O@O@O@O@O@O@OO@O@O@O@O@O@O@O@OO@OO@O@OOOO@O@OOO@OOOO@OOOOO@O@O@OOOOOO@O@O@O@O@OOOOO@O@OOOOO", -"@@@@@@@@O@@O@@@@@O@@O@@O@O@O@OO@O@O@OO@OO@OOOOOOOOOOOOOOOOOOO@OOOOOO@O@OOOO@OOO@O@O@O@O@O@O@@O@@O@@O@O@O@@O@O@O@O@OO@OO@O@O@O@OO@OOOOO@OO@O@O@O@O@O@OO@OO@@O@O@O@O@O@O@@@O@@O@@@@@O@@@@@@@@@@@@@O@@@@@@@O@@@@O@@O@O@O@OOO@OO@O@O@OOO@OOO@OO@OO@O@O@O@@O@O@O@@O@@O@@O@@O@O@O@@O@O@O@@O@O@O@O@O@O@O@OO@OO@OO@OO@OO@O@O@O@O@O@O@O@O@OOO@OOO@O@OO@O@O@O@O@O@O@O@O@O@O@O@O@@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@OO@OO@O@OOO@OO@OOOO@O@OOOOOOOOO@OOOO@O@OOOOOO@O@O@OOOOOOOOOO@O@OOOOOO@O@O", -"@O@@O@O@@O@@@@O@O@@O@O@O@O@O@O@OO@OO@OOOOOOO@OOOOOOOOOOOOOO@OOOOOO@OOOO@O@OO@O@OO@OO@O@O@O@O@O@O@@O@O@@@O@O@@O@O@O@O@O@O@OO@OO@OOO@O@OO@OOOOOOOOOOOOO@OO@OO@O@O@O@O@O@O@O@@O@@O@O@@@@O@@@O@@O@@@@@O@@O@@@@@O@@@O@O@O@O@O@OO@OOOOOOO@OOO@OOO@O@OO@O@O@O@O@@O@O@@O@@O@@O@@@@@@O@O@O@@O@@O@O@O@O@O@O@O@OO@OO@OO@OO@OOO@OOO@OOO@OOO@OO@OO@O@OOO@O@O@OOO@O@O@OO@OO@OO@O@O@O#O@@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@OO@O@O@O@OO@O@OO@O@O@OO@OO@O@O@O@OOO@O@OOOO@O@O@OOOOOO@O@O@O@O@OOOO@O@O@OOOO", -"@@@@@@@@@@@O@@@@@O@@@O@@O@O@O@O@OO@OO@O@O@OOOO@OOO@OO@OO@OOOO@O@O@OO@OOOO@O@OO@O@O@O@O@O@O@O@O@O@O@@@O@O@@O@O@O@O@O@O@OO@O@O@O@O@OOOO@OO@O@O@O@O@O@O@O@O@O@O@O@@O@O@@O@O@O@@O@@@@@@@@@@@@@@@@@O@@@@@@@@O@O@@O@O@@O@O@OO@O@OO@O@O@OOOO@OO@O@OO@O@O@O@O@@O@O@@O@@@O@@O@@O@O@O@@@@@@O@O@O@@O@O@O@O@OO@O@@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@OO@O@@O@O@O@O@@O@O@O@O@O@O@O@O@O@O@O@O@O@@O@O@O@O@O@O@O@O@O@@O@O@O@O@O@OO@O@OO@O@OO@OO@OO@O@O@O@OO@O@O@OO@OOOOO@OO@OOOO@O@OOOOOOO@O@OOOOOOOOOOO@O@OOOO@OO@O@", -"@@O@O@@O@O@@@O@O@@O@O@O@O@O@O@O@O@O@OO@OOOOO@OOO@OOOOO@OOO@O@OOOOOOOOO@O@OOOO@OO@O@O@O@O@O@O@O@O@@O@O@O@@O@O@O@@O@O@O@O@OO@OO@O@OO@O@OO@OOO@OO@OO@OO@OO@O@O@O@O@O@O@O@@@@@O@@@O@O@O@O@@@O@@O@@@@@@@@@O@@@@@@@@@O@O@O@O@O@OO@OOOOO@O@OO@OOOOO@O@O@O@O@O@O@@O@@O@O@@O@@O@@O@@O@O@O@O@@O@@O@O@O@O@O@@O@OO@O@O@O@O@O@O@O@O@O@O@O@O@O@OO@O@O@OO@O@O@O@OO@OO@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@@O@O@O@O@O@O@O@O@O@O@O@OO@O@OO@O@O@OO@OO@O@O@OOO@O@O@O@OO@OO@O@OOOOOO@O@O@OOOO@O@O@O@O@OOOOO@O@OOO@OO", -"@@@@@@@@@@O@@@@@O@@O@@O@O@O@O@OO@O@O@OO@O@O@OO@OOO@O@OOO@OOOO@O@O@O@O@OO@O@O@O@O@O@O@O@O@O@@O@O@O@@O@@O@O@@O@@O@O@O@O@O@O@O@OO@O@O@OO@OO@O@O@OO@OO@O@O@O@O@O@@O@O@@O@O@O@O@@O@@@@@@@@@@@@@@@@O@@O@@O@@@O@@O@O@@@O@O@OO@OO@OO@O@OOOOO@OOO@O@OO@OO@O@O@O@@O@O@O@@@O@@O@@O@@O@@O@@@O@@O@@O@@@O@@O@@OO@O@@O@O@O@O@O@O@@O@@O@O@@O@O@O@O@O@O@O@@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@@O@@O@@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@OO@O@O@O@O@OO@O@O@OOO@O@OO@OO@OOO@O@O@OOOOOO@O@OOOOOO@OOO@O@OOO@OO@OO@O", -"@O@@O@O@O@@@O@O@@O@@O@O@@O@O@O@O@O@O@O@O@OOO@OO@O@OOOO@O@O@O@O@OO@O@OO@OO@O@O@OO@O@O@O@O@O@O@@O@@O@@O@O@@O@@O@O@@O@O@O@O@O@O@O@O@O@O@O@@O@O@O@O@O@O@O@O@O@O@@O@@O@O@@O@@O@@O@@@O@@O@@@@@@@O@@@@@@@@@@@@@O@@@@@O@O@O@O@OO@O@O@OO@O@O@OO@O@OO@O@O@O@O@O@@O@O@O@@O@@O@@O@@O@@O@@@O@@O@@@@@O@O@@O@@O@@@O@O@O@O@@O@@O@@O@O@O@@@O@O@@@O@@O@@O@O@@O@@O@@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@OO@OO@OO@O@O@O@O@O@OO@O@O@OO@O@O@O@O@O@O@O@O@O@O@O@O@O@O@OO@O@O@OO@OO@OO@O@OOOOOO@O@O@OOOOO@O@OOOO@OOOO@OO@OO@OOO", -"@@@@@@@@@O@@@@@O@@@O@@O@O@@O@O@O@O@O@O@OO@O@OO@OOO@O@OOOO@O@OOO@OO@OO@O@OO@OO@O@O@O@O@O@@O@O@O@O@@O@@O@@O@O@@O@@O@@O@O@OO@O@O@O@O@O@O@OO@O@O@O@O@O@O@O@O@O@O@@O@@O@O@@O@@@O@@O@@@@@@O@@O@@@@@O@@@@@@O@@@@@O@O@@@O@O@O@O@O@OOO@OO@OOO@OOOO@OO@OO@O@O@O@O@O@@@O@@O@@@O@@O@@@@@O@@@@@@O@O@@@@O@@@O@@O@@@@O@@@O@@O@@@O@@@@@O@@@@@@O@@O@@O@@@O@O@@O@@O@O@O@O@O@O@O@O@O@OO@O@O@O@O@O@O@O@@O@@O@O@O@O@O@O@O@O@O@O@O@OO@O@O@OO@O@O@O@O@O@O@O@O@O@O@O@OO@O@O@O@OO@O@O@@O@OO@OO@O@O@OO@O@O@OO@O@OOOO@OO@O@", -"@@O@O@@O@@@O@O@@@O@@O@O@@O@O@O@O@@O@O@O@O@O@O@O@O@O@OO@O@O@OO@O@O@O@O@OO@O@O@O@O@O@O@@O@O@@@@O@@@O@@O@@O@@@@O@@@O@O@O@O@@O@O@O@O@O@O@O@@O@O@O@O@O@O@O@O@O@@O@O@O@O@@@O@@@O@@@@@@O@O@@@@@@@O@@@@@@O@@@O@@O@@@@@O@@O@O@O@O@O@O@O@OO@O@OO@O@OO@OO@OO@O@O@O@@O@O@@O@@O@@O@@O@@O@@@@O@O@@@@@@O@@@O@@@@@O@O@@@O@@O@@@O@@@@@O@@@@O@O@@@@@O@@@O@@@@O@@O@O@O@@O@@O@@O@@O@O@O@O@O@O@O@O@O@O@OO@OO@O@O@O@O@O@O@O@OO@O@O@O@O@O@O@@O@O@O@O@O@O@O@O@O@O@O@O@@O@O@O@O@O@OO@OO@O@O@O@O@O@OO@OOO@OOO@OO@O@OO@OOOO", -"@@@@@@O@@O@@@@O@O@@O@@O@O@@O@O@O@O@O@O@O@O@O@O@O@O@O@@O@O@O@@O@O@O@O@O@O@O@O@O@O@@O@O@@O@O@O@@O@O@O@O@O@O@O@@O@O@@O@@O@O@O@O@@O@O@@O@@O@@O@@O@@O@O@@O@@@@O@@@@@@@O@O@@@O@@@O@@@@@@@@@@@@@@@@O@@O@@@@@@@@@@O@O@@O@O@O@OO@O@O@OO@O@OO@O@O@OO@O@O@O@O@O@O@O@O@@O@@O@@O@@@O@@@@@O@@@@@@O@@@@@@@@@@O@O@@@@@O@@@@@@O@@@@O@@@@O@@@@@@O@@@@@O@@@O@@@@O@@@O@O@@O@O@O@O@@O@O@O@O@O@O@O@O@O@O@O@O@O@O@OOO@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@OO@O@O@O@O@O@O@O@O@OO@OO@O@OOO@OO@OOO@O@OO@OOOO@OO@O@", -"@O@@O@@@@@@O@O@@@@O@@O@O@@O@@@O@O@@O@@O@O@O@O@O@O@O@OO@O@O@O@O@O@O@O@O@O@O@O@O@O@O@@O@O@O@@O@O@O@@O@@O@@@O@@O@@@@O@@O@@O@@O@@O@O@@O@O@O@O@@O@O@@O@@O@@O@O@O@O@O@O@@@O@O@@O@@@O@@O@@O@@O@@O@@@@@@@@@O@@O@O@@@@@O@@O@O@O@O@OO@O@OOO@O@OO@OO@OOO@O@O@O@O@O@@O@O@@O@@O@@O@@O@@O@@@@O@@@@@O@@O@@O@@@@@@@@O@@@O@@O@@@@@@@@O@@@@O@@@@@@O@O@@@O@@O@O@@@@O@@O@O@O@O@@O@O@O@O@OO@OOO@OO@O@O@O@O@O@OO@O@O@OO@O@O@O@O@OO@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@OO@OO@O@OO@OO@O@O@OO@O@OO@OO@O@OOO@OOO@O@OOOOOO", -"@@@O@@@O@@@@@@@O@@@@O@@@O@@O@O@@@O@@O@@O@@O@@O@O@O@O@@O@O@O@O@O@O@O@O@@O@@O@@O@@O@@O@@@@@O@@@@@@@O@@@@O@@@@O@@O@@@O@@O@@O@O@O@O@O@O@@O@O@O@@O@O@@O@O@O@O@@@O@@@@@O@@@@@@O@@O@@@O@@@@@@@@@@@O@@@@@@@@@@@@@@O@O@@O@@O@O@O@O@O@O@O@O@OO@OO@O@O@@OO@O@O@@@O@O@@@O@@@O@@O@@@@@O@@@O@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@@O@@@@@@@@@@@@@@@@O@O@@O@@O@@@@O@@O@O@O@O@@O@@O@O@OO@OO@OOOOO@OO@O@O@OO@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@OO@O@O@O@OOO@OO@OO@OO@O@OOO@OOO@OOOO@OOO@OOOOO@O@O@", -"@O@@@O@@@@O@@O@@@@O@@@@@@@O@@@O@O@@O@@O@@O@O@O@@O@O@O@O@O@O@O@O@@O@@@O@@O@@O@@O@@O@@O@O@O@@O@O@O@@@@O@@O@O@@O@@@O@@O@@O@O@@O@O@@O@O@O@O@@O@O@@O@O@O@O@@O@@O@@O@O@@O@O@O@@O@@@O@@@@O@@O@@O@@@@@@O@O@@O@O@O@@O@@O@O@O@@O@O@O@O@O@O@O@O@O@O@O@OO@O@O@O@OO@@@O@O@@@O@@O@@O@O@@@@@@@@@@@O@@@@@@@@@@@@@@@@#@@#@@#@@#@@@@@@@@@@@@@@@@@@@@@O@O@O@@@O@@@@O@@O@O@O@O@@O@@O@@@@O@O@O@O@O@OO@OO@O@O@O@O@OO@OO@O@OOOO@O@O@O@O@O@O@O@O@O@O@OO@O@O@O@O@O@O@O@O@OO@O@O@O@O@O@O@OO@OOOOO@OO@OOO@O@OOO@OOO@O@OOOOO", -"@@@@@@@O@@@@O@@@O@@@O@O@O@@O@@@@O@O@O@@O@O@@O@O@@O@O@O@@O@@O@@O@O@@O@@O@@@O@@O@@O@@O@@@O@@O@@O@@O@O@@@@@@@@@@@O@@O@@O@@@@O@@O@@O@O@O@O@O@@O@O@@O@@@O@@O@@O@@O@@@O@@@@@@@@@@O@@@O@@@@@@@@@@O@@O@@@@@O@@@@@@O@@O@@O@@O@O@O@O@O@O@OO@O@O@O@O@O@@O@O@O@O@@O@O@@O@O@@O@@O@@@@@O@@O@@@O@@@@@O@@@@@@@@@#@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@O@@@O@@@@O@@@O@O@@O@O@@O@O@O@O@O@@O@O@O@O@O@O@OO@OO@O@O@OOO@O@OO@O@OO@OO@O@OO@OO@OO@O@O@O@O@O@O@O@O@O@O@OO@OO@OO@OOO@O@OO@O@O@OOOO@OOOOOO@OOO@OOOOO@O@O", -"@@@O@O@@@@O@@@O@@@O@@@@@@O@@@O@O@@@@@O@@O@@O@O@@O@@@O@@O@O@@O@O@@@O@O@@O@O@@@@O@@@@@@O@@@@@O@@O@@@@@O@O@@O@O@O@@@@O@@@O@O@@O@@O@@@O@@@O@@O@@@@O@@O@@O@@O@@O@@@O@@@@O@O@O@O@@@O@@@@@O@@@O@@@@@@@@@O@@@@@@O@@@O@@O@@O@O@O@O@O@O@O@O@OO@O@O@O@OO@O@O@O@O@@O@@O@@@@O@@O@@O@O@@@@@@@@@@@@@@@@@@@#@@#@@@@#@@@@#@@@#@@@@@@#@@#@@#@@@@@@@O@@@@O@@@@@@@@@O@@@O@O@@@O@@O@O@O@O@O@O@O@O@O@O@OO@OO@O@O@O@O@OO@@O@O@O@O@OO@O@O@O@O@O@O@O@O@O@O@O@O@@O@O@O@O@@O@@O@@O@O@O@@OO@O@O@O@OO@O@OO@O@O@OOO@OOO@O@OOOO", -"@O@@@@@O@@@@@@@@@@@@O@@@@@@O@@@@O@O@O@@O@@O@@@O@O@O@@O@@@O@O@@@O@O@@@O@@@@@O@@@@O@O@@@O@O@@@@@@O@@@@@@@@O@@@@@@O@@@@O@@@@O@@@O@@O@@O@O@@O@@O@O@@O@@O@@O@@@@@O@@@O@@@@@@@@@@O@@@O@@@@@@@@@O@@@@@O@@@O@O@@@O@@@O@@O@@O@@O@O@O@O@O@O@O@O@O@O@O@@O@O@O@@O@O@@O@@O@@@O@O@O@@@O@O@@@@@@O@@@@@#@@@@@@@@@@@@@#@@@@@@@@#@@@@@@@@@@@@#@@#@@@@@@@@@@@@O@@O@@O@@@@@O@O@@O@O@@@@O@@O@O@O@O@O@O@O@O@O@OO@OO@O@OOO@O@O@O@O@@OO@O@O@O@O@@O@@O@O@O@@O@O@O@O@@O@O@O@O@O@O@O@OOO@O@O@OO@OO@OO@O@OO@OO@O@OO@OOOO@O@O", -"@@@@@O@@@O@O@O@@O@O@@@@O@O@@@@O@@@@@@O@@@O@@O@@O@@@O@@O@O@@@O@O@@@@@O@@@O@O@@@O@@@@@O@@@@@@O@O@@@@O@@O@@@@@@@@@@@@O@@@@O@@@O@@O@@O@O@@@O@@O@@@@@@O@@O@@@O@O@@@O@@@@@O@@@O@@@@@@@@@@O@@O@@@@@@O@@@@@@@@@O@@O@O@O@O@O@@O@O@O@O@@O@@O@O@O@O@O@@O@O@@O@O@@@O@O@O@@O@@O@@@@O@@@@@@@@@@@@@O@@@@#@@#@@@@#@#@@@@@@#@#@@@@@#@#@@#@@@@@@@@@@@@@@@O@@@@@@@@@@@O@O@O@@@O@O@@O@O@O@O@@O@@O@O@O@OO@O@OO@O@O@OO@O@OOO@OO@O@OO@O@O@O@@O@O@O@O@O@O@O@@O@O@@O@O@@O@O@O@O@O@O@@O@O@O@O@O@O@O@OO@O@OO@OOO@O@O@O@OO@O", -"@O@O@@@O@@@@@@@O@@@@O@@@@@@O@@@@O@O@@@@O@@O@@O@@@O@@@O@@@@O@@@@O@O@O@@O@@@@@O@@@O@@@@@O@O@@@@@@O@@@@@@@@@O@@O@@O@@@@O@@@@O@@@@@@O@@@@O@@@@@@O@O@@@@@@@O@@@@@O@@@O@@@@@O@@@@@O@@@O@@@@@@@O@@O@@@@O@O@@@@@@@@@@O@@@O@O@O@O@@O@O@O@O@O@O@O@O@O@O@@O@O@O@O@@O@@@O@@O@@O@O@@@O@@O@@@O@@@#@@@@@@@@@@#@@@@@@#@#@@@@@@#@#@@@@@#@@#@@#@@#@@@@@@@@@@@@O@@O@@O@@@@@O@O@@@O@O@@O@O@O@@O@O@O@OO@OO@O@O@OO@O@OO@O@O@OO@O@O@O@O@O@O@O@O@O@O@O@O@O#O@O#O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@OO@O@OO@O@OOO@O@O@OO@", -"@@@@@@@@@@O@@O@@@@@@@@@O@O@@@O@O@@@O@O@@O@@O@@O@O@@O@@@O@O@@@O@@@@@@@@@O@@O@@@O@@@O@O@@@@@O@@O@@@@@@O@@O@@@@@@@@@@O@@@@O@@@@O@O@@@@@O@@O@@O@@@@@@O@@O@@@@@O@@@@@@@@O@@@@@@O@@@O@@@@@@O@@@@@@@@@@@@@@@O@O@O@O@@O@O@@@O@O@O@O@@O@@O@O@O@O@O@@O@@O@O@O@@O@O@@O@@O@@O@O@@@O@@O@@@@@@@@@@@#@@#@@@@@@@#@@#@@@@$@#@@$@@@$@@$@@@@@@@@@@@@#@@#@@@@@@@@@@@O@@@@O@O@@@O@O@O@@O@@O@O@O@O@O@O@O@O@O@OO@O@OO@O@OO@OO@O@O@OO@O@O@O@O@O@O@O@O@@O@@O@O@@O#O@@O#O@@O@O@O@O@O@O@O@O@O@O@OO@OO@O@OO@O@O@OO@O@OO@OO@O", -"@O@@O@O@@@@@@@@O@O@O@O@@@@@O@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@O@@@O@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@O@@@@O@@O@O@O@@O@@@O@@@@O@@@@@@O@O@@@@@@O@@O@@O@@@@@@@@@@@@@@O@@@@@@@@@@@@@@@@@@O@@@@@O@@O@@O@O@O@O@@@@@@@@O@@@O@O@@@@O@@O@O@O@O@@O@@O@@O@O@O@O@O@O@O@@O@@O@@@O@@@O@@@@@@@@O@@#@@@@@@@@@@#@#@@@@$@@$@@@@@$@@@@$@@#@@@$@#@@#@@#@@@@@@@@@@@@@@@@@@@@O@@@@O@@@O@O@O@O@O@O@O@O@O@O@O@O@OO@O@O@O@OO@O@O@O@O@O@O@@O@O@@@O@@O@@O@@O@O@@O@@O@O@@O@O@@O@O@@O@@O@O@O@O@O@O@O@O@O@O@O@O@O@OO@O@O@OO@OO@OO@", -"@@O@@@@@O@@O@O@@@@@@@@@@@O@@@@@O@@@@@O@O@O@O@O@O@@O@O@O@@O@@@O@@@@@@@O@@O@@@O@@@O@@O@@@O@O@@O@@@@@@@O@@@@@@@@@@@@@O@@@@O@@@O@@@@@@@@@O@O@@@@@@@@@@@@@@@@O@@@@@@@@O@@@O@@O@@@@@@@@@@@O@@@@@@O@@@@@@@@@O@O@O@O@@O@@@O@O@O@@O@@O@@O@O@O@O@@O@O@O@@O@@O@@O@O@@O@@O@@@O@@@O@O@O@@@@@O@@@@@@#@@@@@@@@#@@@@@#@$@#@@@#@@#@@@@#@@@@@@@@@@@@#@@@@@@#@@@@O@@@@@@O@O@@O@O@@O@@O@@O@@O@O@O@O@OO@OO@O@O@OO@O@O@O@O@O@O@O@O@O@O@O@O@O@@O#O@@O@#O@O@@O@@O@@@@O@@O@O@@O@@O@@O@@O@O@O@O@O@O@OO@OO@O@OO@O@O@OO@OO@O", -"@@@@O@@O@@@@@@@O@@O@@O@O@@@O@O@@@O@@O@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@O@@@O@@@@@@O@@@@@@@@O@@O@@@@O@@O@@O@O@@@@@O@@@@@@@@O@@@O@@@@@@@@O@@O@@@@O@@O@@@@@O@@@@@@@@@@@@@@@O@@@O@@@@@@O@@O@@@O@@O@O@@@@@@@@@@O@@O@@O@O@O@O@O@O@@O@@O@O@O@@O@@O@O@O@O@@O@O@@O@@O@O@@O@@@@@@O@@@@@@#@@@@@@#@@@#@@$@#@$@@@@@@@$@@@@@$@#@@@$@#@@#@@#@@@@#@@@@@@@@@@@@@O@@@@@O@@@O@O@O@O@O@O@O@O@O@O@O@O@O@OO@O@OO@OO@O@O@O@O@O@O@O@O@@O@@O@O@@@O@@O@@@@O@@O@@O@O@@O@@O@O@O@O@O@O@O@@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@", -"@@O@@O@@@O@O@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@@@O@@@@@O@@@@@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@O@@@@O@O@O@O@O@@@O@@O@@@@@@O@@O@@O@@O@@@O@O@@O@O@@O@@@O@O@@@O@@O@@@O@@@O@@O@@@O@@@@O@@#@@@@@@@@@@@@@@@@@#@#@@#@@$#@@@@$@#@@@@@@@@@@@@@@@@#O@@@O@@@@@@@O@O@@O@O@@@O@@@O@@@O@@O@@O@@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@@O@O@@O@@@@O@@O@@O@O@@O@@@O@@@O@@@O@@@@@@@@@O@@@@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O", -"@O@@O@@O@@@@@@@O@O@O@@O@@O@@@@O@@@O@@@O@@@@O@@@O@@O@@@O@@O@@O@@@@@@@@@@@@@@@@@@@@O@@@@@@O@@O@@@@O@@@@@O@@O@@@@@O@@@@O@@@@@O@@@@O@@@@@@O@@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@O@@@@O@@@O@@@@O@O@O@@@@@O@@@@@@@@@@@O@@@O@@O@O@O@@O@@O@O@O@O@O@@O@O@@@O@@O@O@@@O@O@@O@@O@@O@@@@@@@@@@@@@@@@@@@@@@@#@@#@@#@@#@$@@@$@@@@@@@#@@@@@@@#@$@@#@@#@@@@@@@@@@@@O@@O@@@@@@O@@@O@O@@O@@O@O@O@@O@O@O@O@O@O@O@O@O@O@O@O@O@O@@@O@@@O@@O@@O@@O@O@@O@@O@@@@O@@O@@@O@@@O@@O@O@O@O@O@@O@O@@O@@O@@O@O@O@O@O@O@@O@O@O@O@O@O@", -"@@O@@@O@@@O@O@O@@@@@O@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@O@@O@O@O@O@O@O@@O@@@O@@@@@O@@O@@O@@@@@@@@O@@@O@O@@O@@@O@O@@@O@@O@@O@@@O@O@O@O@@@#O@@@O@@@#@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@#@@@@@@@#@@@@@@@@O@O@@@O@@@@@O@O@@O@@@@O@O@@O@O@O@O@O@O@O@O@O@@O@@@@O@@O@O@@O@@@@@O@@@O@@@O@@@O@@@@@@O@@@O@@@@@O@@@O@@@@O@@@O@@O@@O@O@@O@@O@@O@@O@O@O@O@O@O@O", -"@@@O@O@@O@@@@@@@O@@@@O@O@@@@@@@@O@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@O@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@O@@O@@@@O@@@@@@@@@@@@@@@@@@@@O@@O@@@O@O@@@O@@O@@O@O@O@O@@O@@@@O@@O@O@@@O@@@O@@@O@@O@@@@@@@@@O@@@@@@@@@@@@@@@#@@$@@#@@@#@@#@@#@@@@@#@#@#@@@@#@@@@@@@@@@#O@@@O@@O@@@@@@@@@O@@@O@O@@@@O@@O@O@@O@@O@O@O@O@O@O@O@O@O@O@@O@O@O@@@O@@O@@O@O@@@O@@O@@@O@O@@O@@O@@@@@@@O@O@@@O@@@O@@@@O@@O@@O@@O@O@@O@@O@O@O@O@O@O@O@O@O@", -"O@O@@@O@@@@O@@O@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@@@O@@O@@@@@O@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@O@O@@O@O@O@O@O@O@O@@O@@@@O@@@@O@@O@@O@@O@@O@@@O@@O@O@@O@@@@O@@O@O@@@O@@O@@@O@@O@@@@@@@@@O@#@@@@#@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@#@@@@@#@@#@@@@@@#@@@@@@@@O@@O@O@@@@O@@@O@O@@O@@@O@O@@O@O@@O@O@O@O@O@O@O@@O@O@O@@O@O@@O@@O@@@@O@@@O@O@O@@@@@@O@@@@@O#O@@@@@O@@@O@@O@O@@@@@@O@@O@@@O@O@O@O@O@O@O@O@O@O@O@O", -"@@O@O@@@O@@@O@@O@O@@@O@@O@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@O@@O@@@O@@@O@@O@@@@@O@@@O@@@@O@@O@O@@@@@@O@O@@@@O@@@@O@@O@@@O@@@@@O@@@@@@@@@#@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@O@@@@O@@O@O@@O@O@@@O@@O@@@O@@@O@@O@O@@@O@O@@O@O@@O@@@O@O@O@O@@@O@O@O@O#@@O@O@@O@@O#O@@O@O@@@@@@O@OO@O@O@O@O@O@@O@@O@@O@@@@@O@@O@@O@", -"@O@@@O@O@@O@@O@@@@@O@@@@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@O@O@O@O@O@O@O@O@@@O@@@O@@@O@@@@@@O@O@@@O@@@@O@@@O@@@@@O@O@@@@@@O@@O@O@@@@@O@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@$@@@$@@@@@@@@@@@@@@@@@@@@@@O#@@@O@@@O@@@@O@@@@@O@@O@@@@@O@@@O@O@@O@O@O@O@O@@O@@@O@O@@@@O@@@@O@O@O@O@@@@@O@O@@@O@@@O@O#O@@O@@@O@@@O@@@@@OO@O@@@@O@@@O@@@O@O@O@O@O@@O@O@O@@O@O@O@", -"@@O@@@@@@O@@@@@O@O@@@@O@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@O@@@O@O@@@@@@@@@@@@@@@@@@@O@@@O@@O@@@O@O@@O@@@O@@@@O@O@@O@@@O@O@@@@O@O@O@@@@@@@O@@@@@@O@@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@O@@@O@@@O@O@@O@O@@@O@@O@@O@@O@O@@O@O@O@O@O@O@OO@@O@@O@@O@O@O@@O@O@@O@@@@@@@O@@O@O@@O@@O@O@O@@O@O@O@@@O@@@O@@@@@@@@@@O@@O@O@O@@O@@@O", -"O@@O@O@O@@@@O@O@@@@@O@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@O@O@O@O@O@O@O@@@@@@O@@@O@@@@@@@@O@@@@O@@@@@@@@O@@@@@O@O@@@@@@O@O@O@@O@O@O@@O@@O@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@O@@@@@@O@@@@@O@@O@@@@@O@@@@O@@@@O@@@@O@O@O@@O@O@@O@@O@O@@@O@@O@@O@@O@@O@@O@O@O@@O@O@@O@@O@O@O@O@@O@@@O@@O@@O@@@O@@@@@@@O@@O@O@@O@O@O@O@O@@O@@@@@@O@@@O@", -"@@O@@O@@O@O@@@@O@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@$@@$@@$@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@O@O@@@@@@@@O@@@@@@@O@O@O@@@@@@@O@O@O@@@@O@@@@O@@O@@@@@O@@@@@@@O@O@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@O@@@@@O@@@@@@@O@@@@@O@@@@O@O@@O@O@@@O@@O@@@O@@O@@O@O@O@@O@O@@O@@O@@O@@@@O@O@@@@O@O@O@@O@@O@@O@@O@@@O@@O@@O@@O@O@O@O@@O@@@O@@O@@O@@O@@O@@O@O@O@@O@@O", -"@O@@O@@O@@@@@O@@@@@O@@O@@@@@@@@@@@@@@@@@@@@@@$@@@$@@$@@$@@$@@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@$@$@$@$@$@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@O@@@@O@O@O@O@@@O@O@O@@@@@@@@@O@O@@@@@@@@@@@@@O@@@@@@@O@@@@O@@O@O@@@@O@O@O@O@O@O@O@O@O@O@O@O@@@@@O@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@O@@@O@@O@@@O@@@@@@@@@@@@O@@@@@@O@@@@O@@@@@@@@@@O@@O@@O@O@@O@@O@@@@@@O@@@O@@O@@O@O@O@O@O@@O@O@O@@@O@@O@@O@@@O@@O@@O@@O@@O@@@@O@@@O@@@O@@O@@O@@@@@O@@@O@@O@@@O@@@@", -"@@O@@O@@@O@O@@O@O@@@@@@@@@@@@@@@@@@@@@@@@$@@@@@@@@@@@@@@@@@@$@$@@$@$@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@$@@$@@@@@@@@@@@@@@@@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@O@@@@@O@@@@@O@@@@@@@@@@@O@@O@@@@@O@@@O@@@@@@@@@@@@O@O@@@@@@@@@@@@@@@@@@@@@@@@@O@O@@@@@@O@O@O@O@O@O@O@O@@O@@O@@O@O@@@@O@@@@@@@@@@O@@@@O@O@O@@O@@@@@O@@@@@O@@@@O@O@O@O@@@@O@@O@@@O@@@O@@O@O@@@O@@@@O@@O@@@@O@@@@O@@O@@@O@@@@O@@@@O@@@@O@@@@@O@@@@@O@@@@O@@@@@@@@@@@@@O@@@@@@@@@@@@@@@@O@@", -"O@@O@@O@O@@@O@@@@@O@O@@O@@@@@@@@@@@@@@@@@@@$@$@$@$@$@$@$@$@$@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@$@@$@@$@@$@@@@@$@@$@@$@@$@@@@@@@@@@@@@@@@@@@@@@@O@O@O@O@O@@@@@O@O@@@@@O@@@@@@@@@O@O@@@@@@@O@@@@O@@@@@@O@@@O@O@@@@@O@O@O@O@O@O@O@O@O@O@O@O@@@@@O@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@O@@@O@@@@@@@@@@@@@@@@@O@@@@@O@@@@@O@@@@@@@@@O@O@@@@@O@@@O@@@O@@@@O@@@O@O@@@@@O@O@@O@O@@O@@O@@O@O@@@@O@@O@O@@@O@O@@@O@O@@@@O@@@@O@O@O@@O@@@@@@@O@@O@@@O@@O@@@@@", -"@@O@@O@@O@O@@@O@O@@@@@@@@O@@@@@@@@@@@@@$@@@@@@$@@@$@@@@@$@@@$@$@@$@$@$@$@@$@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@$@$@$@$@$@$@$@@$@@$@@$@@$@@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@O@@O@@@@@@@@@@@@@O@O@@@@@@O@O@@@@O@@O@@@@@@@@@@@@@@@@@@@@@@O@@@@O@@@@@O@@O@@@@@@@@@@@@@@@@@@@@@@@@O@O@@O@O@O@O@O@O@O@O@O@O@@O@@O@@O@@O@@@O@@@@@O@@@O@@O@O@O@@O@@O@@@@@O@@@@O@@O@@O@O@O@@O@@@@O@@@@@O@@@O@@@O@@@O@@@@@@O@O@@@@@O@@@@O@@O@@O@@@O@O@@@@@@@@O@@@@O@@@@@O@O@@@O@@@@@@@@@@@@O@@@@@@@@@@@@@@@@@@@@", -"@O@@O@@O@@@O@O@@@@O@@@@@@@@@@@@@@@@@@@@@@$@$@$@@$@@$@$@$@@$@$@@$@@@@@@@@@@@@@@@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@$@@@@@@$@@@@@@@@@$@@$@@$@@@@@@@@@@@@@$@@@$@@@@@@@@@@@@@@@@@@@@@@@@@O@@O@O@O@O@@@O@O@O@@@@@@O@@@@@@O@@@@@@@@@@@@@O@@@@@@@@@O@@@O@O@@@@@@O@O@O@O@O@O@O@O@O@O@O@O@@@O@O@@O@@@@@O@@@@@O@@@@O@O@@O@O@@@@O@@@O@O@@@@@@O@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@@@@@@@@O@@@O@O@@@O@@@@@@@O@@O@@O@O@@@@@O@O@@@O@@O@@O@@@O@@@@@O@O@@O@@@@O@@@O@O@@@@@O@@@@@@@@@@O@@@@@@O@@@@@@O@@@O@@O@O@", -"@@O@O@O@O@O@@@@O@@@@O@@@O@@@@@@@@@@@@$@@@@$@@$@$@$@@@$@@$@@$@@$@@$@$@$@$@@$@@$@@@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@$@@@@$@$@$@$@@$@@$@@@$@$@$@$@$@$@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@O@@@@@@@@O@O@@@@O@@@@@@@@@@O@@@@@@@@@@O@@@@@@@O@@@@@O@O@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@O@@O@O@O@@O@O@@O@O@@@O@O@@@O@O@@O@O@@@@O@O@@@@O@O@@O@@@O@@O@O@@@@@@O@O@O@@O@@O@O@@@@@@@@@@@@@@@@O@@O@@@@@@@@@@@O@O@@@@@O@@@O@@O@@O@@@O@O@@@@@@@@@O@@@O@@@@@@@@@@@@O@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", -"@O@O@@@O@@@O@O@@@O@@@@@@@@@@@@@@@@@@@@@$@$@@$@@$@@$@$@@$@$@$@$@@$@@@@@@@@@@$@@@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@$@$@@$@@$@$@@@$@@@$@@$@@$@$@@@$@@@$@@@@@@@@@@$@@$@@@@@@@@@@@@@@O@@O@@O@@@@O@O@O@@O@@O@@O@@@@@@@@@@@@@@@O@@@@@@@@@@@@@@@@@@@O@@@@@@O@@@@@@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@@O@@O@@O@O@@O@@O@O@O@@@O@O@@@@O@@@@@O@@@@O@O@@@@@@@@O@@@@@@@@@O@@@@@@@@@@@@@@@@@O@@@O@@@@@@O@@@@@@@@@@@@@@@O@@@@@@@O@@@@O@@@@@@@@@O@@@@@@@O@@O@@@@@@@@@@@O@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", -"@@O@O@O@@O@@@@O@@@@O@@O@@@@@@@@@@@$@@$@@@@$@@$@@$@$@$@$@@$@@$@$@@$@$@$@$@$@@@$@@@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@@@$@@$@@@$@$@@$@@$@@$@@@@$@$@@$@@$@$@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@O@@@O@@@O@@@@@O@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@O@@O@@O@@O@@@@@@@@@O@@O@O@@O@@O@O@@O@O@@O@@O@@O@@@O@O@@O@@O@@O@O@@O@O@O@@O@O@@O@O@@@@@O@O@O@@@@@O@@@@@@@@@@@@@@O@@O@@@@@@@@@@@@@O@@@@@@O@@@@@O@@O@@@@@O@@O@@@@O@@@@O@O@O@O@@@@O@@O@@@@@@@O@@@O@@O@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", -"@O@@@O@@O@O@O@@@@O@@@@@@@@@@@@@@@@@@@@@$@$@@$@$@$@$@$@$@$@$@$@$@$@$@@$@@$@@@$@@$@$@@@$@@$@@$@@$@@@@@@@@@@@@@@@@@@$@@$@@@$@$@@$@@$@@$@@$@$@$@$@$$@$@$@@$@$@@$@@@@@@@$@@$@@@@@@@@@@@@@@@@@@@@O@@@@O@@@O@@@O@@@O@@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@O@O@O@@O@O@@O@@O@@@O@O@@O@O@O@O@O@O@O@@O@O@O@@O@O@O@O@@O@@O@O@@O@@@@O@O@@@@@@@@@@@@@O@@@@@@@@@O@@@@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", -"@O@O@@O@@O@@O@O@@@@@O@@@@@@@@@@@$@@$@$@@$@$@$@$@$@$@$@$@$@$@$@$@@$@@$@$@@$@$@@$@@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@$@@@@$@@$@$@@@$@@$@$@$@@$@@$@@$@@@$@@@$@$@$@$@@@@@$@@@@@@@@@@@@O@@@@@@@O@@@O@@@O@@@@O@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@O@@O@@O@@O@@@@@@@@O@@@@O@O@O@O@O@@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@O@@O@O@@O@@O@O@@@@@O@@O@@O@@O@@@@@@@@@O@@@@@@@@@@O@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@O@@@@@@@O@@O@@@@@@O@O@@@@@O@@@O@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@#@@@", -"O@@O@O@@O@@O@@@@O@O@@@@@@@@@@@@@@@@@@@@$@@@$@$@$@$@$@$@$@$@$@$@$@@$@$@@@$@@@$@@@$@$@@@$@@$@@$@@$@@@@@@@@@@@@@@@@$@@@@@@@$@$@@$@$@@$@$@$@@@$@@$@$@@$@@$@$@$@$@@@@@@@@@$@@@@@@@@@@@@@@@@@@@O@@@@@O@@@O@@O@O@@@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@O@O@O@@O@O@O@@O@@O@@O@@O@O@@O@@O@O@O@O@O@O@O@O@O@O@O@@O@O@O@@O@O@@O@@O@O@@O@@@@@@@@@@@@@O@@@@@@@@@@@O@@@@@@@@@@@@@@@@@@O@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@#@@@#@@@@@@@@@@@", -"@@O@O@O@@O@@O@O@@@@@@@O@@@@@@@@@$@$@$@$@$@$@@$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@@$@@$@@$@@@$@@@@@@@@@@@@@@@@@@@@@@@@@$@$@$@@@@$@$@@$$@$@@$@$$@$$@$@$@$@$@$@@$@@$@$@$@$@@@@$@@@@@@@@@@@@@@@@@@@O@@@@@O@@@@@@@@O@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@O@@@@@@O@@@O@O@O@O@O@O@O@O@O@O@O@O@O@@O@O@O@@O@O@O@O@O@O@@O@O@@O@@@@@@@@O@@O@@@@@@@@@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@O@@O@@@O@@@@O@@@@@@@@@O@@O@@@@@O@O@@O@@@@@@@@@@O@@@O@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@", -"@O@O@@@@O@O@@@@O@@@O@@@@@@@@@@@@@@@@@$@@$@$@$@$@$@$@$@$@$@$@@$@$@$@$@@$@@$@@$@@$@@$@@@$@@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@$@$@$@@$@$@$@$$@$@@$@@$@@$@$@$@@@$@@$@@@@@@@$@$@@@@$@@@@@@@@@@@@O@@@@@@@O@@@@@O@@O@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@O@@@@O@O@@O@O@@@@@O@@O@@O@@O@@O@@@O@@@O@O@@O@O@O@O@O@@O@@O@O@@@O@@@O@O@O@@@O@@@@@O@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@O@@O@@O@O@O@@@@@O@@O@@@@@@@@@O@@O@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@@#@", -"@O@@O@O@@@@O@O@@@O@@@@@@@@@@@@@@@$@$@@$@@$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@@$@@$@@$@@$@@@@$@@@@@@@@@@@@@@@@@@@@@@@$@$@$@$@@@$@$@$@$@$@$@$@$$@$@$@$@$@$@$$@@$@$@$@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@O@O@@@@@@@@@@@@@@@@@@@@@@@@@$@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@O@@@@O@@@@@O@@@@@O@O@O@O@O@O@O@O@@OO@@OO@@O@O@O@O@O@O@@O@O@O@O@O@O@@O@@@@@@@O@@@O@O@@@@@@O@@O@@@@O@@O@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@O@@@@@@@@@@@@@O@@@@@O@@@@@O@@@@@@@@@@@@@@O@@@@@O@@@O@@@@#@@@#@@@#@@@@@@@@@$@@", -"O@@O@@O@O@O@@@@@@@@@@O@@@@@@@@@$@@@@@$@$@$@$@$@$$@$$@$$@$@$@$@$@$@$@$@@$@$@$@@$@@$@@$@$@@@$@$@@@@@@@@@@@$@@$@@$@@@@@@@@@$@@$@@$@$@$@$@$@$@$@$$@$$@$@$@$@$@$@@$@@$@@@$@$@$@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@O@@O@@@@@@@@@@@@@@@@@@@@@@@$@@$@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@O@O@@@O@@@O@@@O@@O@O@@@O@@O@O@@O@O@O@O@O@O@@O@O@@O@@O@@@O@O@O@@@O@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@O@@@O@@@@@@@@@@@@@@#@@#@@#@@@@@@@@@@@@@#@@@$@@@@@", -"@@O@@O@@@O@@O@O@@@@@@@@@@@@@@@@@@$@$@$@$@$@$@$$@$@$@$@$$@$@$@$@$@$@$@$@@$@$@@$@@$@@$@@@@$@@@@@@@@@@@@@@@@@@@@@@@$@$@$@$@$@$@$@$@$@$$@$$@$@$$@$@$@$@$@$@$@$@$@$@$@@$@@@@@@@$@@@@@@@@@@@@@@O@@@@@@@O@@@O@@@@@@@@@@@@@@@@@@@@$@@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@O@@@@O@O@@@O@O@O@O@O@O@@O@O@O@O@O@O@@O@@O@O@O@O@O@O@@O@O@@O@@O@O@@@@@@@@@O@@O@@@@@@@@@@@@@@@@@@@@@#@@#@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@O@@O@@O@@O@@@@@@@@@@O@@@@@@@@@@@O@@@@@@@@@@@@@@@@@@@@@#@@@#@@@@@@@@#@@@@@@", -"O@@O@@@O@@O@@@@@@O@@@@@@@@@@@$@@$@@@$@$@$@$@$$@$@$$$@$$@$@$$@$$@$@$@$@$$@$@@$@@$@@$@@@$@@@$@@@@@@@$@@$@@$@$@$@$@@$@@@$@$@@$@@$@$@$$@$$@$@$$@$@$$$@$$@$@$@$@$@@$@@$@@$@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@@@@@$@@@@@$@$@$@$@$@$@@@$@@@@@@@@@@@@O@@@@@@@@@@@@@O@@@@@O@@@@@@@@@@@@@@O@@O@O@O@@O@O@O@O@O@@O@O@@O@O@O@O@O@O@@@@O@O@O@O@@O@@@@O@@@O@@@@@@@@@#@@#@@@@@@@@@@@@#@#@#@#@#@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@O@@@@@@@@@@@@@@@@@@@@#@@@#@@@@@@@@@#@@@@@@@#@@#@@@@@@#@$@", -"@@@@@O@@@@@@O@@@@@@@@@@@@@@@@@@$@@$@$@$@$@$$@$@$$@$@$@$$@$@$@$@$$@$@$@@$@@$@@$@@$@@$@@@@$@@@$@@@$@@@@@@@@@@@@@@@$@@$@@$@$@$@$@$@$@$@$@$$$@$$@$@$@$@$@$@$@$@$@$@$@$@$@@@$@@@$@@@@@@@@@@@@@@@@@O@@@@@@@@@O@@O@@@@@@@@@@@@$@$@@@@$@$@@@@@@@@@@@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@O@O@O@O@O@O@O@O@@O@O@O@@O@O@O@O@O@O@O@O@O@@O@@O@@O@O@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@#@@@@@$@@$@$@$@@@@", -"O@O@O@@@O@O@@@@O@@@@@@@@@@@@@@@@@$@@$@$@$@$@$@$$@$@$$$@$@$$@$$@$@$@$@$@$@$@$@@$@@$@@$@$@@@$@@@@@@@@@@$@@$@$@$@$@@$@@$@$@@$@$@$@$@$$$@$$@$@$@$$$@$$$@$@$@$@$@$@@$@$@@$@$@@$@@@@@@@@@@@@@@@@@@@@@@@O@@O@@@@@@@@@@@@@@@@@@@@@@@$@$@@@$@$@$@$@$@$@@@@$@$@@@@@@@@@@@@@@@@@@@O@@O@@@@O@O@@O@@@O@@@O@@@@O@O@O@@O@O@@O@@O@@O@O@O@O@@O@O@O@@O@@@@@O@O@O@@O@O@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@@@@#@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@$@@@@@@@@@@@@@$@", -"@@@@@@O@@@@@O@@@@@O@@@@@@@@@@$@$@@@$@@$@$$@$$$@$$$@$@$$@$@$$@$@$@$@$@$@@$@$@$@@$@@$@@@@@$@@@@@@@$@@$@@@@@@@@@@@@$@@$@@$@$@$@$@$$@$@$$@$$$$@$$@$$@$@$$@$@$@$@$@$@@$@$@@@$@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@$@$@@@@$@$@@@$@@@@@@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@O@@@O@O@@@@@O@@O@O@@O@@O@@O@@@O@@O@@@O@@O@@O@O@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@$@$@@$@$@$@$@@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@$@@@@@@@@@$@@@@$@@@", -"@O@O@O@@O@O@@@@O@@@@@@@@@@@@@@@@@@$@@$@$@$@$@$$@$@$$@$@$$$@$@$@$@$@$@$@$@$@$@@$@@$@@$@$@@@@@$@@@@@@@@@@$@@@@@@$@@@$@@$@@$@$@$@$@$$@$@$$@$@$$@$$@$$@$@$$@$@$@$@$@$@$@@$@@@$@@@$@@@@@@@@@@@@@@@@@O@@@@@@O@@@@@@@@@@@@@@@$@@@@$@$@$@@$@$@$@$@$@$@@@$@$@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@O@@O@@@O@@@O@@@@O@O@O@@O@@@@O@@O@@O@O@O@@O@O@O@@O@@O@O@@O@O@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@$@@@@@@@@@@@@@@@$@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@@@@@@@@@@@@$@@@@$@@@@@@", -"@@@@@@@O@@@@O@@@@@@@@@@@@@@@$@$@$@@$@$@$@$$@$@$$@$$@$$@$@$$@$@$@$@$@$@$@$@$@$@@$@@$@@@@@$@$@@@@@$@@$@@@@@@@$@@@@$@@$@$@$@$@$@$@$@$@$$@$$@$$@$$@$$@$$@$@$@$@$@$@$@@$@$@$@@@@$@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@@@@@@@$@@@@$@$@@$@@$@@$@@@$@@@$@@$@@@@@@@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@O@@@@O@@O@@O@O@@@O@@O@@@@@@O@@@@@@O@@O@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@@@@@@@$@$@$@$@$@$@$@@@$@$@$@@$@@@@$@$@$@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@@@$@$@@@@@@@@@@@@@", -"@O@O@O@@@@O@@@@@@@@@@@@@@@@@@@@@@$@@$@$@$@$@$$$@$$@$$@$$$@$@$$@$@$@$@$@@$@$@@$@$@$@@$@$@@@@@@@@@@@@@@@@$@@@@@$@$@@@$@@$@@$@$@$@$$@$@$$@$$@$$$@$$@$$@$@$@$$@$@$@$@$@@$@@$@$@@@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@@@$@@$@$@$@$@$@$@@$@$@$@$@$@$@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@O@@@@@@@@O@O@@@@O@@@@@O@@O@@@@O@O@@@O@O@O@@@@@O@@O@O@O@O@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@@@@@@@@@@@@@@@$@@@@@@@@@$@$@@@@@$@@@$@$@$@@$@@$@@@@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@@@$@@@@@@@@@@@@@$@@@@@@$@@", -"@@@@@@@O@@@@@@O@@@@@@@@@@@@$@$@$@@$@$@$@$$@$@$@$$@$@$@$@$$@$@$@$$@$@$@$@$@$@$@@@$@$@@@@@$@$@@@@@$@@$@@@@@@@@@@@@$@$@@$@$@$@$@$$@$@$$@$$@$$@$@$$@$$@$$$@$@$$@$@$@$@$@$@$@@@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@$@$@@$@$@@$@$@@$@$@$@@$@$@@@$@$@@@$@@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@O@O@@@@@@O@@@@@@O@@@@@@@O@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@$@@$@@@$@$@$@$@@$@$@$@@@$@$@$@$@@@@@$@@@@@$@@@@$@@@@@@@@$@@$@@@$@@@@@@@@@@@@@@@@@@@@@@@$@@@@@@@@@@@@@$@@@@@@@@@@@$@@@@@@", -"O@@@O@@@@@@O@@@@@@@@@@@@@@@@@@@@$@@$@$@$@$@$$$$@$@$$@$$@$@$$@$@$@$@$@@$@@$@$@@$@$@@@$@$@@@@@$@@@@@@@@@@$@@@$@@$@@@@@$@@$@$@$@$@$@$$@$@$$@$$$$@$$@$$@$@$$$@$@$@$@$@$@$@@$@$@@@@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@@@@@@$@@$@$@$@$@$@$@$@$@@$@$@$@@$@$@@$@@@$@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@O@@@O@@O@@@@@O@O@@@@@@@O@O@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@@@@@@@$@@$@@@$@$@@@@@@@@$@$@@$@$@$@@@$@@@@$@$@$@@$@@@$@@@@$@$@$@@$@@@@@@@$@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", -"@@@@@@O@@O@@@@@@@@@@@@@@@@$@$@$@@$@$@$@$$@$@$@$$$$@$$@$$@$@$$@$@$@$@$@@$@$@@$@@$@$@$@@@@$@@@@@@@$@@$@@@@@@@@@$@@$@$@@$@$@$@$@$@$$@$$@$$@$$@$@$$@$$@$$@$@$@$$@$@$@$@$@$@$@@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@$@$@@$@@$@$@$@$@$@$@$@$@$@$@$@$@$@$@@$@$@@@@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@O@@@@@@@@@@@@@@O@@@@@@O@@O@@@@@@@@@O@@@@@@@@@@@@@@@@@@@@$@@@@@@$@@@@$@$@$@@@$@@$$@@$@@$$@$$@$@$@$@@$@@$@$@$@$@$@@@@@$@@$@$@@$@$@@@@@@@@@$@$@@@@@@@@$@@@@$@@$@@@@@@@@@@@@@@@@@@@@@@@@@", -"@@@O@@@@@@@@@@@@@@@@@@@@@@@@@$@@$@@$@$@$@$$@$$@$@$@$@$$@$$$@$@$@$@$@$@$@$@$@$@$@@@$@@@$@@@$@$@@@@@@@@@@$@@@@@@@@@$@@$@$@@$@$@$$@$@$@$@$$@$@$$$@$$$$$@$$$@$$@$$@$@$@$@$@@$@@$@@@$@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@$@@$@$@$@$@@$@$@$@$@$@$@$@$@@$@$@@$@$@$@@@$@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@O@@O@@@@O@@@@@@@@@O@O@@O@@@@@@@@@@@@@@@@@@@$@@@@@$@@$@@@@$@$@@@@@$@@@$@@@$@@$@@$@@$@$@@$@$@$@$@$@$@$@@$@$@$@@$@@@@$@@@@@$@$@$@@@@@@@$@@@@@@@@$@@@@@@@@@@@@@@@$@@@$@@@@@@@@@@", -"@@@@@@@@@@@@@@@@@@@@@@@@$@@$@@@$@$@$@$@$@$@$@$$$@$$@$@$$@$@$@$@$@$@$@$@$@$@$@@@$@$@@$@@@$@@@@@$@@@@@@@@@@@@$@$@$@@@$@@$@$@$@$@$@$$@$$$$@$$$$@$$$@@$@$@$@$@$@$@$@$@$@$@$@$@$@@$@@$@@@$@@@@@@@@@@@@@@@@@@@@@@@@$@$@$@$@$@@$@$@$@$@$@$@$$@$@$@$@$@$@$@$@$@$@@$@$@$@@$@$@@$@@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@@@@@$@$@@$@$@$@$@$@@$@@$@@$@$@$@$@$@@$@$@$@$@$@$@$@$@$$@$@$$@$@$@@$@@$@@@$@@@$@@@@@@@@@@@@@@$@@@@@@@@@@@@@@@@@@@@@@", -"@O@@@@O@@O@@@@@@@@@@@@@@@@@@@@$@@@$@@$@$@$@$$@$@$$@$$$$@$@$@$@$@$@$@$@$@@$@@@$@@$@@$@@$@@@@@@@@@@@@@@@@@@@@@@@@@$@$@@$@$@$@$@$@$$@$$@$@$$$$@$$$@$$@$$@$$@$$$@$@$@$@$@$@$@$@@$@@$@@$@@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@$@$@$@$@$@$@$@@$@$@$@$@$@$@$@@$@$@$@$@$@@$@@@@$@@$@@@$@$@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O@@@@@@@@@@@@O@@@@@@@@@@@@@@@@@@@@@@$@@@@$@$@@@@$@@$@@@$@@$@$@$@$@$@@$@$@$@$@$@@$@@$@$@$@$@$@$@@@$@@$@$@@$@@@$@@$@@@$@@@@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", -"@@@@@@@@@@@@@@@@@@@@@@@@$@$@$@@$@$@$@$@$@$$@$$$$@$@$@$@$$@$@$@$@$@$@@$@$@@$@$@@$@@$@@@@@$@@$@@$@@@@@@@@@@@@@@$@@@@@$@$@@$@$@$$@$@$$@$$$$@$@$$@$$$@$$@$@$$@$@$$@$@$@$@@$@@$@$@$@@$@@$@$@@@@@@@@@@@@@@@@@@@@@$@@$@$@$@$@@$@$@$@$@$@$@$$@$@$@$@$@$@$@$@$@$@$@$@@$@$@$@$@@$@@$@$@@$@@$@@$@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@@@@@$@@@@$@$@@$@@$@$@$@$@$@@$@$@$$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@@$@$@@$@$@@$@@$@@@$@@@@@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", -"@@@@@@@@@@@@@@@@@@@@@@$@@@@@@@$@@$@@$@$@$$@$@$@$$@$$$@$@$@$$@$@$@$@$@$@@$@$@@$@@$@@@$@$@@@@@@@@@@@@@@@@@@@@$@@@$@$@$@@$@$@$@$@$@$$@$@$@$$$$@$$$$@$$@$$$@$$@$@$@$$@$@$@$@$@$@$@@$@@$@@@@@$@$@@@@@@@@@@@@@@@@@$@@@@@@$@@$@$@$@$@$@$$@$@$$@$$@$$@$$@$@$@$@$@@$@$@$@$@$@$@$@$@$@$@$@$@@$@$@@@@$@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@$@@@@$@@@@$@@@$@$@$@$@$@@$@@$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@@$@$@@@$@@@$@@@@@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@", -"@@@@@@@@@@@@@@@@@@@@@@@@$@$@$@@$@$@$@$@$@$@$$@$$@$@$@$$$@$@$@$@$@$@$@@$@@@@$@@@@@$@@@@@@@$@@$@@$@@@@@@@@@@@@@$@@@@@@$@$@@$@$@$$@$@$$$$$$@$$$$@$@$$@$$@$$@$$$$@$@$$@$@$@$@$@@$@$@$@@$@$@@@@@@$@@@@@@@@@@@@$@@@@$@$@$@@$@@@$@$@$$@$@$@$@$@$@$@$$@$@$@$$@$@$@$@$@$@$@$@$@$@$@$@$@$@$$@$@@$$$@$@$@@$@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@@$@@@@@@@$@$@@$@$@@$@$@@$@$@$@$$@$$@$@$$$@$$$@$$$$$@$$@$$@$$@$$@$$@$$@$$@$@$@$@$@$@$@$@@$@@@$@$@@@@@@$@@@@@@@@@@@@@@@@@@@@@@@@", -"@@@@@@@@@@@@@@@@@@@@@@$@@@@$@@$@$@$@$@$@$@$$@$$@$$@$$@$@$$@$@$@$@@$@@$@@$@$@@@@$@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@$@$@$@@$@$@$@$@$@$$@$@$@$$@$@$$$$@$$@$$@$$$@$@$$@$@$$@$@$@$@$@$@@$@$@@@$@$@$@@@@@@@@@@@@@@@@@@$@@@$@@$@@$$@$@$@$@$$@$$$@$$$@$$@$@$@$$@$$@$$@$@$@$@$@$@$@$$@$@$@$@$@$@$$@@$@$@$@$@$@$@@$@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@$@@@@$@$@@$@$@$@$@$@$@$@$@$@$@$$@$$@$@$$$@$@$$$$@$$$$$@$$@$$@$$@$@$$@$@$@$@$@$@@$@@$@@@@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@", -"@@@@@@@@@@@@@@@@@@@$@@@@$@$@@$@@$@$@$@$$@$@$$@$$@$$@$$@$@$$@$@$@$@$@$@@$@@@@$@@@@$@@@$@@$@@$@@$@@@@@@@@@@@@$@@@@@$@@$@$@$@$@$@$$@$$@$$$$@$$$$@$$$$@$$$$$@$$$$@$$@$@$$@$@$@$@$@$@@$@$@$@@@@@@$@@$@@@@@$@@$@$@@@$@$@@$@$@$@$@$@$$$@$$@$@$@$@$$@$$$$$@$$@$$@$$@$$@$$$$@$$$@$$@$$$@$$@$@$@$@$$@$@$@$@$@$@@@@@@$@@@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@@$@@@@@$@$@@@$@@$@$@$@$@$@$$@$$@$$$@$$@$$$$@$$$$$$@$$$$@$@$$$@$$$$@$$$$@$$@$$@$@$@$@$@@$@@$@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", -"@@@@@@@@@@@@@@@$@@@@@$@$@@@@$@$@$@$@$@$@$$@$@$$@$$@$$@$$@$@$@$@$@@$@@$@@$@$@@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@$@@$@$@@$@$@$@$$@$@$$@$@$$$$@$$@$@$$$@$@$$@$@$@$@$$$@$@$@$@$@$@@$@$@@$@@@$@$@@@@@@@$@@@@@@@@@$@@@@$@$@@$@$@$@$@$@$$@$@$$$@$$@$@$@$@$$@$$@$$@$$@$@$@$$@$@$@$$@$@$$@$$$@$@$@$@$@$@@$@$@$@$$@$@@$@$@@@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@@@@@@@$@@$@@@@@$@@$@$@$@$@$@$@$@$@$$@$$@$$$$@$$$$@$@$$$$@$$$$$$$$$$@$$$$@$$@$@$@$@$@$@$@$@@$@@$@@@@$@@$@@@@@@@@@@@@@@@@@@@@@@@@", -"@@@@@@@@@@@@@@@@@$@@@@@@$@$@@$@@$@$@$$@$@$$@$$@$$@$@$@$@$@$@$@$@$@@$@@$@@@@$@@@@@$@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@@@$@@$@$@$@$@$$@$$$$$@$@$$$$$$$@$$$$$@$$@$$@$@$@$@$@$@$@$@$@$@$@$@$@$@@@$@$@$@@@@$@@$@@$@@$@$@@$@$@$@$@$@$$@$$@$$$@$@$$@$$$$$@$$@$$$$@$$$@$$$$$@$$$$$$@$$$$$@$$@$$$$@$$@$$@$$@$@$@$@@$@$@$@@$@$@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@$@@@$@@$@$$@$@$@@$@$@$@$$$@$$@$$@$$$$$@$$$$@$$$$$$$@$$$$$$@$$$@$$$@$@$$@$$$@$$$@$@$@$@$@@$@@@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", -"@@@@@@@@@@@$@@$@@@@@$@$@@$@@$@$@$@$@$@$@$$@$$@$@$@$$@$@$@$@$@$@@$@$@$@@@$@$@@@$@@@@@@@@$@@@@@@@@@@@@@@@@@@@$@@$@@$@$@$@$@$@$@$@$$@$$@$@$$$$$$@$@$@$$$@$@$$@$$@$$@$@$$@$$@$$@$@$@$@$@@$@@$@$@@@$@@@$@@@@@$@@$@@$@@$@$@$@$@$@$@$$@$$@$@$$$$@$$$@$@$$$$$$@$$$@$$$@$$@$$$@$@$$$@$@$$$@$$@$@$$@$$@$$@$$@$$@$$@$@$@$@$@@$@$@@$@$@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@@@$@@@@@$@@$@@$@@$@@$@$@$@$@$@$@$$@$$@$$$@$@$$$@$$$$$$$$$$$$$@$$$$$$$$$$$$$$@$$@$$@$@$@$@$@@$@$@@$@@$@@@@@@@@@@@@@@@@@@@@O@@O@@O@@", -"@@@@$@@$@$@@@$@@$@$@@$@$@@$@$@$@$@$@$$@$$@$$@$$$@$$@$@$@$@$@$@$@$@@$@@$@@@@@$@@@$@@$@@@@@@@@@@@@@@@@@@@@@@@@@$@@@@@$@@$@$@$@$@$@$$@$$$$@$@$@$$$$$$$@$$$$@$$@$$@$$@$@$@$@$@$@$@$@$@$@$@$@@@@$@$@@$@@@$@$@@@@@$@@$@$@$@$@$@$$@$@$$@$$$$@$@$$@$@$$$@$@$@$$$@$$$@$$@$$$@$$$$$@$$$$$@$$$@$$$$@$$@$$@$@$$@$$@$@$@$@$@@$@@$@@$@@@$@@@@$@$@@@@@@@@@@@@@@@@@@@@@@@$@@@@$@@@$@@$@@@@$@@$@$@$@@$@@$@$@$@$$@$$@$$@$$$$$@$$$$$$$$$$$$$$$$$$$$$$$@$$@$$$$$@$$@$$$@$$@$@$@$@@$@@@@@$@@@@@@@@@@@@@@@O@@@@@@@@@@@", -"@@$@@$@@@@$@$@@$@@@@$@@@$@$@$@$@$@$@$@$$@$$@$$$@$$@$@$@$@$@$@$@@$@$@@$@@$@$@@@@@@@@@@@@$@@@@@@@@@@@@@@@@@@@@@@@$@$@@$@$@@$@$@$$@$@$@$@$$$$$$$@$@$@$$@$@$$$@$$@$$@$$@$$@$$$@$$@$@$@$@$@$@$@$@@@$@@$@$@@@@@$@$@@$@$@$@$@$$@$@$$$@$$$@$@$$$@$$$$$@$$$$$$$$$$$$$$$$$$$$$$$@$$$$$@$$$$@$$$$@$$$$$$@$$$@$$@$@$$@$$$@$$@$@$@$@$@$@@@$@@@@@$@$@@$@@$@@@@@@@@$@@$@@@@$@@@@@@$@@@$@$@@$@$@@$@$@$@$@$@$$$@$$@$$@$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$$@$$@$@$$@$@@$@@$@$@@@@@@@@@@@@@@@@@@@@O@@O@@O@@", -"@@@@@@@$@@@@@$@@$@$@$@$@$@@$@$@$@$@$@$@$$@$$@$@$$@$$@$@$@$@$@@$@$@$@$@@$@@@$@@$@@$@@$@@@@@@@@@@@@@@@@@@@@@@$@@@@@$@$@@$@$@$@$@$$@$$$@$$@$@$@$$$$$$$@$$$$@$$@$$@$$@$$@$$@$@$@$$@$@$@$@@$@@$@$@$@@$@@@$@$@$@@$@$@@$@$@$@$@$@$@$@$$@$$$$$@$$$@$@$$$@$$$$@$$@$$@$$@$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$@$$$@$$@$@$$@$$@$@$@$@$@$@$@$@$@@@@@@@$@@@$@@$@@@@@@@@$@@@@$@@$@@@$@@@@$@@$@$@@$@$@$@$@$$@$$@$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$$$@$@$$@$@$@@@@$@@$@@@@@@@@@@@O@@@@@@@@@@@@", -"$@$@$@$@@$@$@@$@$@@$@@$@$@$@$@$@$@$$@$$$@$$@$$$@$@$@$$@$@$@$@$@$@@$@@@$@@$@@$@@@@@@@@@@$@@@@@@@@@@@@@@@@@@@@@@$@$@@@@$@@$@$@$@$@$$@$$@$$$$$$$@$@$@$$$$@$$@$$@$$@$$@$$@$$@$$$@$@$@$@$@$@$@$@@$@@$@@$@$@@$@@$@@$@$@$@$@$$@$$@$$$@$$$$$@$$$@$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$$$@$$$$$$$$$$@$$@$$$$$$$$@$$$$@$$@$$@$$$@$@$@$@$@$@$@@$@$@$@@@$@@$@@@@$@@$@$@@@$@@$@@@$@@$@$@@$@$@@$$@$@$$@$$$@$$@$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$@$@$$@$@$@@$@@$@@@@@@@@@@@@@@@@@@@O@@O@O@@O@", -"@@@$@@@$@$@@$@@@@$@@$@$@$@$@$@$$@$@$@$@$$@$$@$@$$$@$@$@$@$@$@$@@$@@$@$@@$@@@@@@$@@$@@$@@@@@@@@@@@@@@@@@@@@@$@@@@@$@$@$@$@$@$@$@$@$@$@$$@$@$@$$$$$$$@$@$$@$$$$$$$@$$@$$@$$@$@$@$$@$@$@$@$@@$@$@$@$@@$@@$@$@@$@$@$@$@$$@$$@$$$@$$$@$@$$$$$$$@$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$@$$$@$$@$$@$@$$$@$@$@$@$@$@$@@$@@$@@@@@@$@@@@$@@@@$@@@@@@$@@@$@$@@$@@$@$@@$@$@$@$@$$@$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$@$$$$@$$@$@$@$@@@@$@@@@@@@@@@@@@@@@@@@O@@@@@@@", -"@$@@@$@@$@@$@@$@$@@$@$@$@$@$@$@$@$@$@$$@$$@$$$$@$@$@$@$@$@$@$@$@$@$@@@$@@$@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@$@@$@@$@@$@$@$@$$@$$$@$$$$$$$@$@$@$$$$@$$$@$@$@$$@$$@$$$@$$$@$$@$@$$@$@$@$@$@$@$@@$@@$@$@@$@@$@$@$@$@$$@$@$@$$@$$$$$$$@$@$$$@$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$$@$$$@$@$$$@$@$@$@$@@$@@$@@$@$@$@@@$@@@@$@@$@$@$@@@$@$@@@$@@$@$@$@$@$@$@$$$@$$$@$$$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$@$$@$$@$@$@$@$@@@@@@@@@@@@@@O@@O@O@@@@@@O@@", -"@@$@$@@$@$@$@$@$@$$@$@$@$@$@$@$@$@$$@$@$@$$@$@$$$$$$@$$@$$@$@$@$@$@@$@@@@@@@@@@$@@$@@$@@$@@$@@$@@$@@$@@$@@$@$@@@$@$@$@$@$@$@$$$@$$@$@$$@$$@$$$$$$$$@$$$$@$$$$$$$@$$@$$@$$@$@$@$$@$@$@$@$@$@@$@$@$@$@$@$@$@$@$@$@$$@$$@$$$$@$$@$$@$@$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$@$$@$$@$$@$@$@$@$@$@$@$@@@@@@$@$@@$@@@$@@@@$@@$@@$@$@$@$@$@$@$$$$$$$$@$@$$@$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$@$@$@@$@$@$@@@@@@@@@@@@@@@@@@O@O@@@@O", -"$@@$@@$@@@$@@$@@$@@$@$@$@$@$@$@$@$$@$@$@$$@$$$$@$@$@$@$@$@$@$@$@$@@$@@@$@$@$@$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$@$@@@@$@$@$@$@$@$@$@$$$$$$@$$$$$@$$@$$$$@$$$@$@$@$$@$$@$$@$@$$@$$@$$@$@$@$@$@$@$@$@$@$@$@$@$@$@$$@$@$$@$$@$@$$@$$$$$$$$$$@$$$@$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$@$$@$@$@$@$@$@$@$@$@$$@$@@@$@@$@$@@$@$@@$@@$@@$@$@$@$@$@$@$@@$@$$@$$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$@$$@$@$$@$@$@@$@@@$@@@@@@@@@@@O@@O@@@@@@O@@", -"@$@@$@$@$@$@$@$@$@$@$@@$@$@$@$@$$@$@$$@$$@$$@$@$$@$$$@$$@$$@$@$@@$@@$@$@@@@@@@@$@@$@@$@@$@@$@@$@@$@@$@@$@$@@$@@@$@$@$@$@$$@$$@$$@$$@$@$$$$@$@$$$$$$@$$$$@$$$$$$$@$$@$$@$$$@$$@$@$@$$@$@$@$@$@$@@$@$@$@$@$@$@$@$$@$@$$@$$@$$$$$@$$@$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$@$@$$$$@$$@$$$@$$$@$$@$@$@$@$@@$@$@$@@$@@@$@@@@$@@$@@$@@$@@$@$@$@$@$@$$@$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$@$$$@@$@$@$@@@$@@@@@@@@@@@@@@@@@@O@@O@@@@", -"@$@$@$@$@$@$@$@$@$@$@$$@$@$$@$$@$@$$@$$@$$@$$@$$@$$@$@$@$@$@$@$@$@$@$@@@$@$@$@$@@@@$@@@@@$@@@@@$@@@@@$@@@@@$@@$@$@$@$@$@$@$$@$@$$$@$$$$$@$$$$$$@$@$$$$@$$$$@$$@$$@$$$@$$$@$$@$$$@$$@$@$@$@$@$@$$@$@$@$@$@$@$$@$@$$$@$$@$$$@$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$@$$@$$@$@$@$@$@$@$@$@$@@$@@$@$@$$@@$@$@$@@$@$@$@$@$@$@$@$$@$$@$$$@$$$@$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$@$@$$@$@$@@$@@@$@@@@@@@@@@@@@O@@@@@@@@@@", -"@$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@$$@$@$@$$@$$@$$$@$$@$$@$$@$@$@$@$@@$@@$@@@@@$@@@$@$@@@$@$@@@$@$@@@$@$@@@$@@$@@$@@@$@$@$@$@$@$$$$@$@$$@$$@$$$@$$$$$$$@$$$$@$$$$$$$$$$@$$$@$$@$$@$@$@$@$$@$@$@$@$@@$@$@$@$@$@$@$$@$@$@$$@$$@$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$$@$$@$$@$@$@$@$@$@$@$@@$@@$@$@@@$@$@$@$@$@$@$$@$@$$@$$@$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$@$$$@$@$@$@$@$@$@@@@@@@@@@@@@@@@@@O@@O@@O@", -"$@$@$@$@$$@$$@$$@$$@$@$@$$@$$@$$@$$$$$@$$@$$@$@$$@$$@$$@$@$$@$@$@$@$@@$@$@$@@$@$@@@@$@@@@@$@@@@@$@@@@$@@$@@$@@$@$@$@$@$@$$@$@$@$$$@$$$$$$@$$$$@$$@$$$$@$$$$$$@$$$@$$$$$$@$$@$$$$$$$$@$@$@$$@$@$$$@$$@$@$$@$$@$@$$$$@$$$$$$$$@$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$@$$@$$$$@$$@$$@$@$@$$@$@$@$@$@$@$@$@$@$@$@@$@$@$@$@$@$@$$$@$$@$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$@$$$@$@$@$@@@@@@$@@@@@@@@O@@@@@@@@@@@@@", -"@$@$@$@$@$$@$$@$$@$@$$@$@$$@$$@$$@$@$@$$@$$@$$$$@$$@$@$@$$@@$@$@$@$@$@@$@$@@$@@@$@$@@$@$@$@@$@$@@$@$@@$@@@$@@$@$@$@$@$@$@$$$@$$$@$$$@$$$$$$@$$$$@$$@$$$$$$@$$$$@$$$@$@$$$$@$$@$@$@$@$$@$$@$@$$@@$$@$@$$@$@$@$$$@$@$$$@$@$$@$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$@$$@$$@$$$@$@$@$@$@$@$@$@$@@$@$@$@$@$@$@$@$@$@$$@$@$$@$$@$@$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$@$@$@$@@$@$@$@@@@@@@@@@@@@O@@@@@@@@@@", -"$@$$@$$@$$@$$@$$@$@$$@$@$$@$$@$$@$$@$$$@$$@$$@$@$$@$$@$@$@$$@$@@$@$@@$@$@@@$@$@$@@@$@@$@@@$@@$@@$@@@$@@@$@@$@@$@@$@$@$@$$@$@$$@$$$@$$$@$$@$$$$@$$$$$$@$$@$$$$$$$$$$$$$$$@$$@$$$$$$@$$@$@$@$@$@$$$@$@$$@$@$@$$@$$@$$@$$$$@$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$@$$@$@$$$@$$@$@$@$@$@$@$@@$@@$@@$@$@$@$@$$@$@$$@$$@$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$@$@$@@$@@@@@@@@@@@@@@@@@@@@@O@@@@", -"$$@$$@$$@$$@$$@$$$$@$$$$@$$@$$@$$@$$@$@$$$$$@$$$@$$@$$@$$@$@$@$$@$@$@$@$@$@@@$@@$@$@@$@@$@@$@@$@@$@$@$@$@$@$@$@$@$@$@$$@$$@$$@$$@$$$$$$$$$$@$$$$@$$$$$$$$$$@$$@$$@$$@$$$$@$$@$@$@$$@$$$$@$$$@$@$@$$@$@$$$$$@$$@$$@$$@$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$@$$$$@$@$@$$@$$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@$$$$@$$$@$$@$$$@$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$$@$$@$@$@$@@$@$@$@@@@@@@@@@@@@@@@@@@@@", -"$@$@$$@$$@$$@$$@$@$$@$@$$@$$@$$@$$$@$$$$@$@$$$$@$$@$$@$$@$$@$$@@$@@$@$@$@@$@$@@$@$@@$@@$@@$@@$@@$@$@@@@@$@$@$@$@$@$@$@$@$@$$@$$$$$@$$@$@$@$$$$@$$$@$@$@$$@$$$$$$$$$$$$$@$$@$$$@$$@$$@$@$$@$@$$$@$$@$$@$@$@$$@$$@$$@$$@$$@$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$@$$$@$$@$@$$@$@$@$@$@$@$@$@$@$@$@$@$@$$$@$$@$$@$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$@$@$@@$@@$@@@@@$@@@@@@@@@@@@@@@@@@", -"$$@$$@$$@$$@$$@$$@$@$$@$@$$@$$@$$@$$@$@$$$$@$@$$@$$@$@$@$$@$@$$@$@$@$@$@$@$@$@$@@$@$@$@$@$@$@$@$@@$@$$@$@$@$@$@$@$@$@$$@$$$@$$@$$$$$$$$$$$$@$$$$$$$$$$$$$$$$@$$@$@$@$$$$@$$@$@$$@$$@$$@$@$$@$@$$@$$@$$@$@$@$$@$$$@$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$@$$$$@$$@$@$@$$@$$@$$@$@$@$@$@$@$$@$$@$$@$$$@$$$$@$$@$$$$@$@$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$@$@$@$@$@$@$@@$@$@@@@@@@@@@@@@@@@@@@@", -"$@$$$$@$$@$$$$$@$$$$@$$$$@$$$$$@$$@$$$$$@$@$$$$$$@$$@$$$@$$@$$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@@$@$@$@$@$@$$@$$@$$@$@$$$$@$$$$$@$$$@$$$$@$$@$$@$$@$$@$$$$$$$$$$$@$$@$$$$$$$@$$@$$$$@$$@$$@$$@$$@$$$$$@$$$$@$$$$@$$$$$@$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$@$$$@$$$$$$@$$@$$@$@$@$@$@$$@$@$$@$$@$$$@$$$@$$$@$$$@$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$@$@$@$@@$@$@@@$@$@@@@@@@@@@@@@@@", -"$$@$@$$$$$@$@$$$$@$$$$@$$$$@$@$$$@$$@$@$$$$$@$@$@$$@$$@$$@$$@$@$$@$@$@$@$@$@@$@$@$@@$@$@$@$@$@$@$@$@$@$@$$@$$@$$@$$@$$@$$$$@$@$$$$@$$$$@$$$$@$$$$$$$$$$$$$$$$@$$@$$@$$$$$$@$@$@$$$$@$$@$$$@$$@$$@$$@$$@$@$$$$@$@$$@$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$@$$$@$@$@$$@$$@$$$$@$$@$@$$@$$@$$@$$@$$@$$$$@$$$@$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$@$@$@$@$$@$@$@@$@@$@$@$@@@$@@@@@@@@@@@@@@", -"@$$$$$$$@$$$$$$@$$$$@$$$$@$$$$$@$$$$$$$$$@$@$$$$$@$$@$$@$$@$$@$$@$@$@$@$@$@$$@$@$@$@$@$@$@$@$@$@$@$@$@$@$@$$@$$@$@$$@$$$$@$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$@$$@$$$$$$$$$@$$@$$$$$$$$@$$$$$$$@$$$$@$$@$$@$$$$$$@$$$$$$$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$@$$$$$$@$$@$$$@$@$$@$$$@$$@$$$$$@$$@$$$$@$$@$@$$$$$$@$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$@$@$@$$@$@$@@@$@$@$@$@$@@@@@@$@@", -"$$@$@$@$$$@$@$$$$@$$$$@$$$$@$$$$$@$@$$@$@$$$$@$@$$$$$$@$$$$@$$@$@$$@$$@$@$@$@$@$@$$@$@$@$@$@$@$$@$@$$@$$@$$@$$@$$$@$$$@$@$$@$$$@$$$$@$$$$$$$$$$$$$$@$$$$$$$$$$@$$@$$$$$@$$$@$$@$$$$@$@$@$$$@$$$$@$$$$@$@$@$$$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$@$$$$$$$$@$$@$$$@$$@$@$$$@$$@$$$$$$$$$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$@$@$$$@$$@$$@@$@$@$@$@@$@@$@@@$@$@$@@$@", -"@$$$$$$$@$$$$$$@$$$$@$$$$@$$$@$@$$$$@$$$$$@$@$$$$$@$@$$$@$@$$@$$@$@$$@$@$$@$@$$@$$@$@$$@$$@$$@$@$$@$@$$@$@$$@$$@$@$$@$$$$@$$$$$$$$$$$$$$$$@$$@$$$$$$$$$$@$$$@$$$$$$@$@$$$$$$$$$$$@$$$$$$$@$$@$@$$$$@$$$$$$$$$$@$$$$$@$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$@$$$$$$$$@$$$$$@$@$@$$$$@$@$$$$$$$@$$@$$$$@$$@$@$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$@$@$$@$$@$$@$@@$@$@$@@$@$@$@@@$@@$@@", -"$$@$$$$$$$$$$@$$$$@$$$$@$$$@$$$$$@$$$$@$$@$$$$@$@$$$$$@$$$$@$$@$$$$@$$$$@$@$$@$@$@$$$@$$@$$@$$$$@$$$$@$$$$$$$$$$$$$$$$$$$$$$@$$@$$@$$$$@$$$$$$$$@$$$$@$$$$$$$$$$@$$$$$$$@$$@$$$$@$$@$$@$$$@$$$$@$@$$$@$@$$@$@$$$$@$$$$@$$$@$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$$$@$$$$$$$$@$$$$$$@$@$@$$$$$$@$$$$@$$$$@$@$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$@$$@$@$@$@$$@$@$@$$@@$@$@$@$@$@$@", -"@$$$$@$@$$$@$$$$@$$$$$$$$@$$$$$@$$$$@$$$$$$$@$$$$$$$@$$$$@$$@$$@$@$$@$@$$@$@$@$@$$@$@$@$$@$$@$@$$@$@$$@$@$$@$@$@$$$$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$@$$$$$$$@$$$$$@$$$@$$$$@$$$$$@$$$$@$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$@$@$$@$$$$@$$@$$$$$$$@$@$$$$@$$$$@$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$@$$$$@$$@$$@$@$@$@$@$@$@$@$@$@$@@$@", -"$$@$$$$$$@$$$@$$$$@$@$@$$$$@$@$$$@$$$$@$@$$$$$@$@$@$$$@$@$$$$$@$$$$@$$$$@$$$@$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$@$$@$$$$$$$@$$$$$@$$$@$$$@$$$$$$$$$$@$$$@$$@$$$$@$$$$$$@$@$$$@$$@$@$$@$$@$$$@$$$$@$$@$$$$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$@$@$@$$$$$@$$$$@$$$$@$$$$$$$@$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$$$$$$@$@$$@$$@$@$@$@$@$@$@$@$@$@$@$@$@", -"@$$$$$@$$$$$$$$$$$$$$$$$$@$$$$$$$$$$@$$$$@$@$@$$$$$$@$$$$$@$@$$$$@$$$$@$$$@$$$@$$$@$$@$@$@$$@$$@$@$$@$$@$$$@$$@$$$$$$@$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$@$$$@$$$$$$$$$$$$$$$$$$$$@$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$@$$$$@$$$$$$$$$$$$$$$$$$@$$$$@$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$$$$$$@$$@$$$@$$$@$@$$@$@$@$@$@$@", -"$$$@$$$$@$$@$$@$$@$$$$$@$$$@$$@$@$@$$$@$$$$$$$$@$@$$$@$@$$$$$@$@$$@$@$$@$@$$@$$$@$$$@$$$$$$@$$$$$$$@$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$@$$@$$$@$$@$$$$$$@$$$$$@$$@$$@$$@$$$@$$@$$@$$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$$@$$$$$$$$$$$$@$$@$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$@$@$$@$$@$$@$$$@$$$$@$$$$@$@$$$@$", -"$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$@$@$@$@$$$$@$$$$@$$@$$$$$$$$$$$$$$$$$$@$$$@$$$$@$$$$$@$$@$$$$$@$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$@$$$$$$$$$$$$$@$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$@$$$$$$$$$@$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$@$$$$$$$$$$$$$$$@$$$$@$$$@$@$$$@$@$$", -"$@$$$$$$$$$$$$$$$$$$$$$$$@$$@$$$$$$@$$$$$$$$$$$@$@$$@$$$$$@$$$@$@$$@$@$$@$@$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$@$$$$$$@$$@$$$$$@$$@$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$@$$$$$$$$$@$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$@$$$@$$@$$@$$$$$@$$$@$$$$$@$$$$@$", -"$$$$$@$$@$$$@$$$@$$$$$@$$$$$$$@$$@$$$$@$$@$@$@$$$$@$$$@$@$$$@$$$$$$$$$@$$$$$$@$@$$@$$$$$$$@$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$@$$$$@$$$$$$$$$$$@$$$$$$$$@$@$@$$@$$$$@$$$@$$@$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$@$$$@$$$$$$$$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$@$$$$@$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$@$$$$$$@$$$$@$$$$$$$$$@$$@$$$$$$$@$$@$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$@$$$$$$$$@$$@$$$$$$$$$$@$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$$$$@$$$@$$$$$@$$$$$$$$@$$$$$@$$$$@", -"$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$$$@$$$@$$$$@$$@$$$$@$$$$@$$@$@$$$$$$$@$$$$$$$$$$$$$$$@$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$@$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$@$$$$$$$$$$@$$$$$@$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$@$$$$@$$@$$$$@$$$$@$$$$@$$@$$$$@$$@$$$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$@$$$$$$$$$$$$$$$$$@$$$$$$@$$$$@$$$@$$$$$$$@$$$$$$$$@$$@$$$$@$$@$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$@$$$$$$$$$$$@$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$@$$@$$$$$$$$$$$$$$@$$@$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$@$$$@$$$$$$$$@$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$@$$$$$$$@$$$$$@$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$@$$$$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$@$$$@$$$$$$$$$$@$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$@$$@$$$$$$$$$$@$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$@$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$@$$$@$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$@$$$$$$$$@$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$@$@$$@$$$@$$@$$@$$@$$@$$@$$@$$@$@$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$@$$$@$$$$$$$$$$$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$@$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$$@$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$@$$$$$$$$@$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$@$$$$$$$@$$$@$$$@$$$@$$$@$$@$@$@$$@$$$$$$$@$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$@$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$@$$$$$$$$$$$$$$$$$$@$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$@$$$$$@$$$$$$$@$$$$$$$@$$$$$$$$@$$@$@$$$$$$@$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$@$$$$$$$$@$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$@$$@$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$@$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$@$$$$$$@$$$$$$$@$$$$$$@$@$@$$$$$$$$$@$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$@$$$$$$$@$$$$@$$@$$$@$@$@$$$$$$@$$@$$@$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$@$$$@$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$@$$$@$$$$$$$$$@$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$@$$@$$$@$$$$$$$@$$$$$$@$@$@$$$@$$$$$@$$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*$$*$$*$$*$$*$$*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$@$$$$$$@$$$$$@$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$@$$$@$@$@$$$@$$@$$$$$$$@$$$$$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$@$$@$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$@$$$$$$$@$$$$$$@$$$$$$@$$$$@$$@$@$@$$$@$@$$$$$$@$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$@$$@$$@$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*$$$$$$$$$$$$$$$$$$$*$$$*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$@$$@$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$$$$@$@$$@$@$@$$$$@$$@$$$$$$@$$$$$$$$$@$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*$$*$$*$$*$$*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$$$@$$$$$@$@$$$$$@$@$@$$$@$@$$@$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*$$$$$$$$$$$$$$$$$$$$*$$$$$$$*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$@$$$$@$$$$@$$$$@$@$$$$@$@$@$@$$$$@$$$$$$$@$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$@$$@$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$@$@$$@$$$$$$@$$$$$@$$$@$@$$$@$@$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*$$$$$$$$*$$$*$$$*$$$*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$@$$$$$@$$$$@$$$@$@$@$$@$@$$@$@$$$$@$$$$$@$$$@$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$*$$$*$$$$$$$$$$$$$$$$$$$$$$$$$@$$$@$$$$$$$$$$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*$$*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$@$$$$$$$@$$$@$$@$$@$$$@$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*$$$$$$$$$$$$$$$$$$$$$$$$$$$$*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$@$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$@$$$@$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$@$@$$@$@$$@$@$@$$$@$$$@$$@$$@$$$@$@$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*$$*$$*$$$*$$$$$$$$$$*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$@$$$@$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$@$$$$@$$$$$@$$$@$@$$@$$@$$@$$$$$$@$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$", -"$$$*$$$$$$$$$$$*$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*$$$$$$$$$$$$$$$$$$$$*$$$*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$$$$$$$$$$$$@$$$$$$$$$$$$$$$$@$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@$$@$@$$$$@$$$$@$@$$@$$$$@$$@$$$$$@$$$@$$$$$$$$@$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$" -}; diff --git a/org.tizen.dynamicanalyzer.workbench/icons/windows_icon.ico b/org.tizen.dynamicanalyzer.workbench/icons/windows_icon.ico deleted file mode 100644 index 0b92aeb..0000000 Binary files a/org.tizen.dynamicanalyzer.workbench/icons/windows_icon.ico and /dev/null differ diff --git a/org.tizen.dynamicanalyzer.workbench/plugin.properties b/org.tizen.dynamicanalyzer.workbench/plugin.properties deleted file mode 100644 index c20970b..0000000 --- a/org.tizen.dynamicanalyzer.workbench/plugin.properties +++ /dev/null @@ -1,10 +0,0 @@ -#Plugin name -pluginName=Dynamic Analyzer Workbench -#Provider name -providerName=Samsung Electronics - -#Product name, Application Name -DynamicAnalyzer=Tizen Dynamic Analyzer - -#Perspective name -MainPerspective=MainPerspective \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer.workbench/plugin.xml b/org.tizen.dynamicanalyzer.workbench/plugin.xml deleted file mode 100644 index a48434c..0000000 --- a/org.tizen.dynamicanalyzer.workbench/plugin.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.tizen.dynamicanalyzer.workbench/plugin_customization.ini b/org.tizen.dynamicanalyzer.workbench/plugin_customization.ini deleted file mode 100644 index ea85033..0000000 --- a/org.tizen.dynamicanalyzer.workbench/plugin_customization.ini +++ /dev/null @@ -1 +0,0 @@ -org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = false diff --git a/org.tizen.dynamicanalyzer.workbench/src/org/tizen/dynamicanalyzer/workbench/Application.java b/org.tizen.dynamicanalyzer.workbench/src/org/tizen/dynamicanalyzer/workbench/Application.java deleted file mode 100644 index 5d070c9..0000000 --- a/org.tizen.dynamicanalyzer.workbench/src/org/tizen/dynamicanalyzer/workbench/Application.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.workbench; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.PrintStream; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.Locale; - -import org.eclipse.equinox.app.IApplication; -import org.eclipse.equinox.app.IApplicationContext; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.PlatformUI; - -public class Application implements IApplication { - - private final boolean STDOUT_TO_FILE = false; - - @Override - public Object start(IApplicationContext context) throws Exception { - Display display = PlatformUI.createDisplay(); - - try { - if (STDOUT_TO_FILE) { - String logPath = WorkbenchPathManager.getLogsPath(); - File logs = new File(logPath); - if (!logs.exists()) { - logs.mkdir(); - } - - SimpleDateFormat format = new SimpleDateFormat( - "yyyy_MM_dd_HH-mm-ss", //$NON-NLS-1$ - Locale.KOREA); - Date date = new Date(); - String logFileName = "da_log_" + format.format(date); - logPath += File.separator + logFileName; - - File file = new File(logPath); - FileOutputStream fos = new FileOutputStream(file); - PrintStream ps = new PrintStream(fos); - System.setOut(ps); - System.setErr(ps); - } - } catch (Exception e) { - e.printStackTrace(); - } - - try { -// String[] args = (String[]) context.getArguments().get( -// IApplicationContext.APPLICATION_ARGS); -// if (args.length > 1) { -// ApplicationWorkbenchWindowAdvisor.deviceName = args[0]; -// ApplicationWorkbenchWindowAdvisor.appName = args[1]; -// } - - int returnCode = PlatformUI.createAndRunWorkbench(display, - new ApplicationWorkbenchAdvisor()); - - if (returnCode == PlatformUI.RETURN_RESTART) { - return IApplication.EXIT_RESTART; - } else { - return IApplication.EXIT_OK; - } - - } catch (Exception e) { - e.printStackTrace(); - } finally { - display.dispose(); - } - - return context; - } - - @Override - public void stop() { - if (!PlatformUI.isWorkbenchRunning()) { - return; - } - final IWorkbench workbench = PlatformUI.getWorkbench(); - final Display display = workbench.getDisplay(); - display.syncExec(new Runnable() { - @Override - public void run() { - if (!display.isDisposed()) { - workbench.close(); - } - } - }); - } -} diff --git a/org.tizen.dynamicanalyzer.workbench/src/org/tizen/dynamicanalyzer/workbench/ApplicationActionBarAdvisor.java b/org.tizen.dynamicanalyzer.workbench/src/org/tizen/dynamicanalyzer/workbench/ApplicationActionBarAdvisor.java deleted file mode 100644 index 7ba2e92..0000000 --- a/org.tizen.dynamicanalyzer.workbench/src/org/tizen/dynamicanalyzer/workbench/ApplicationActionBarAdvisor.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.workbench; - -import org.eclipse.jface.action.IMenuManager; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.application.ActionBarAdvisor; -import org.eclipse.ui.application.IActionBarConfigurer; - -public class ApplicationActionBarAdvisor extends ActionBarAdvisor { - - public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) { - super(configurer); - } - - @Override - protected void fillMenuBar(IMenuManager menuBar) { - } - - @Override - protected void makeActions(IWorkbenchWindow window) { - } - -} diff --git a/org.tizen.dynamicanalyzer.workbench/src/org/tizen/dynamicanalyzer/workbench/ApplicationWorkbenchAdvisor.java b/org.tizen.dynamicanalyzer.workbench/src/org/tizen/dynamicanalyzer/workbench/ApplicationWorkbenchAdvisor.java deleted file mode 100644 index 7486660..0000000 --- a/org.tizen.dynamicanalyzer.workbench/src/org/tizen/dynamicanalyzer/workbench/ApplicationWorkbenchAdvisor.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.workbench; - -import org.eclipse.ui.application.IWorkbenchWindowConfigurer; -import org.eclipse.ui.application.WorkbenchAdvisor; -import org.eclipse.ui.application.WorkbenchWindowAdvisor; -import org.tizen.dynamicanalyzer.workbench.perspective.DAMainPerspective; - - -public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor { - - @Override - public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor( - IWorkbenchWindowConfigurer configurer) { - return new ApplicationWorkbenchWindowAdvisor(configurer); - } - - @Override - public String getInitialWindowPerspectiveId() { - return DAMainPerspective.ID; - } - -} diff --git a/org.tizen.dynamicanalyzer.workbench/src/org/tizen/dynamicanalyzer/workbench/ApplicationWorkbenchWindowAdvisor.java b/org.tizen.dynamicanalyzer.workbench/src/org/tizen/dynamicanalyzer/workbench/ApplicationWorkbenchWindowAdvisor.java deleted file mode 100755 index e70a996..0000000 --- a/org.tizen.dynamicanalyzer.workbench/src/org/tizen/dynamicanalyzer/workbench/ApplicationWorkbenchWindowAdvisor.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Hyunjong Park - * Juyoung Kim - * - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.workbench; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.widgets.Monitor; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.application.ActionBarAdvisor; -import org.eclipse.ui.application.IActionBarConfigurer; -import org.eclipse.ui.application.IWorkbenchWindowConfigurer; -import org.eclipse.ui.application.WorkbenchWindowAdvisor; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.CommonConstants; -import org.tizen.dynamicanalyzer.common.DASingletonFocusManager; -import org.tizen.dynamicanalyzer.common.PathManager; -import org.tizen.dynamicanalyzer.communicator.IDECommunicator; -import org.tizen.dynamicanalyzer.communicator.ResourceCommunicator; -import org.tizen.dynamicanalyzer.handlers.ExitHandler; -import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; - -public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor { - - private static final int DEFAULT_WIDTH = 1024; - private static final int DEFAULT_HEIGHT = 768; - private static final int MIN_WIDTH = 800; - private static final int MIN_HEIGHT = 600; - private int width = DEFAULT_WIDTH; - private int height = DEFAULT_HEIGHT; - - public ApplicationWorkbenchWindowAdvisor( - IWorkbenchWindowConfigurer configurer) { - super(configurer); - } - - @Override - public ActionBarAdvisor createActionBarAdvisor( - IActionBarConfigurer configurer) { - return new ApplicationActionBarAdvisor(configurer); - } - - @Override - public void createWindowContents(Shell shell) { - ToolbarArea.createInstance(getWindowConfigurer(), shell); - - if (DASingletonFocusManager.checkDASingleton()) { - System.out.print("Already DA Running \n"); - DASingletonFocusManager.setFocusDA(); - System.exit(-1); - - } - } - - @Override - public void preWindowOpen() { - Monitor[] monitors = PlatformUI.getWorkbench().getDisplay() - .getMonitors(); - - Rectangle rectangle = null; - - rectangle = monitors[0].getBounds(); - - if (rectangle.width < DEFAULT_WIDTH - || rectangle.height < DEFAULT_HEIGHT) { - width = MIN_WIDTH; - height = MIN_HEIGHT; - } - - IWorkbenchWindowConfigurer configurer = getWindowConfigurer(); - configurer.setInitialSize(new Point(width, height)); - configurer.setShowStatusLine(false); - configurer.setShellStyle(SWT.SHELL_TRIM/* | SWT.NO_BACKGROUND */); - - } - - public void postWindowOpen() { - PathManager.pathCheck(); - DASingletonFocusManager.setSaveFocusDAPid(); - IDECommunicator.startIDECommunicatorThread(); - } - - public boolean preWindowShellClose() { - if (ResourceCommunicator.isRunning()) { - ResourceCommunicator.sendMessage(AnalyzerConstants.MSG_STOP - + CommonConstants.CMD_SPLIT + 0 - + CommonConstants.CMD_SPLIT); - } - - AnalyzerUtil.executeCommand(ExitHandler.ID); - - ToolbarArea.getInstance().dispose(); - return true; - } -} diff --git a/org.tizen.dynamicanalyzer.workbench/src/org/tizen/dynamicanalyzer/workbench/WorkbenchPathManager.java b/org.tizen.dynamicanalyzer.workbench/src/org/tizen/dynamicanalyzer/workbench/WorkbenchPathManager.java deleted file mode 100644 index 419eccb..0000000 --- a/org.tizen.dynamicanalyzer.workbench/src/org/tizen/dynamicanalyzer/workbench/WorkbenchPathManager.java +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.workbench; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStreamReader; - -public class WorkbenchPathManager { - - public static final String WIN_INSTALL_NODE = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";//$NON-NLS-1$ - public static final String WIN_INSTALL_KEY = "Local AppData"; //$NON-NLS-1$ - - public static final String LINUX_INSTALL_ENV = "HOME";//$NON-NLS-1$ - public static final String TIZEN_SDK_DATA = "tizen-sdk-data";//$NON-NLS-1$ - public static final String TIZEN_SDK_DATA_PATH = getTizenSdkDataPath(); - public static final String INSTALL = "tizensdkpath"; //$NON-NLS-1$ - public static final String TIZEN_ROOT_PATH = getDefaultRoot(); - public static final String TOOLS_FOLDER_NAME = "tools"; //$NON-NLS-1$ - public static final String DYNAMIC_ANALYZER_FOLDER_NAME = "dynamic-analyzer"; //$NON-NLS-1$ - public static final String SAVE_FOLDER_NAME = "save"; //$NON-NLS-1$ - public static final String LOG_FOLDER_NAME = "logs"; //$NON-NLS-1$ - public static final String DYNAMIC_ANALYZER_INSTALL_PATH = getInstallPath(); - public static final String CONFIG_FOLDER_NAME = "config"; //$NON-NLS-1$ - public static final String CONFIG_FOLDER_PATH = getConfigFolderPath(); - public static final String CONFIG_FILE_NAME = "config"; //$NON-NLS-1$ - - public static final String OS_KEY = "os.name"; //$NON-NLS-1$ - public static final String LINUX = "linux"; //$NON-NLS-1$ - public static final String MAC = "mac"; //$NON-NLS-1$ - public static final String WIN = "win"; //$NON-NLS-1$ - - public static String getRegistryValue(String node, String key) { - BufferedReader br = null; - String value = ""; //$NON-NLS-1$ - - String query = "reg query " + "\"" + node + "\" /v " + "\"" + key + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ - try { - Process process = Runtime.getRuntime().exec(query); - String encoding = System.getProperty("sun.jnu.encoding"); //$NON-NLS-1$ - - br = new BufferedReader(new InputStreamReader( - process.getInputStream(), encoding)); - - String line = null; - while ((line = br.readLine()) != null) { - int index = line.indexOf("REG_SZ"); //$NON-NLS-1$ - if (index >= 0) { - value = line.substring(index + "REG_SZ".length()).trim(); //$NON-NLS-1$ - } - } - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } finally { - if (br != null) { - try { - br.close(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - } - - return value; - } - - public static String getTizenSdkDataPath() { - String defaultPath = null; - if (isLinux()) { - defaultPath = System.getenv(LINUX_INSTALL_ENV) + File.separator - + TIZEN_SDK_DATA; - } else if (isWin()) { - defaultPath = getRegistryValue(WIN_INSTALL_NODE, WIN_INSTALL_KEY) - + File.separator + TIZEN_SDK_DATA; - } - - return defaultPath; - } - - public static String getDefaultRoot() { - String rootPath = null; - BufferedReader br = null; - String line = null; - try { - rootPath = TIZEN_SDK_DATA_PATH + File.separator + INSTALL; - File file = new File(rootPath); - if (!file.isFile()) { - return null; - } - br = new BufferedReader(new InputStreamReader(new FileInputStream( - file))); - line = br.readLine(); - return line.substring(line.indexOf("=") + 1); - } catch (IOException e) { - System.out.println("Fail to read."); //$NON-NLS-1$ - e.printStackTrace(); - } finally { - if (null != br) { - try { - br.close(); - } catch (IOException e) { - e.printStackTrace(); - } - } - } - - return rootPath; - } - - public static String getInstallPath() { - String installPath = TIZEN_ROOT_PATH; - if (null != installPath) { - installPath += File.separator + TOOLS_FOLDER_NAME + File.separator - + DYNAMIC_ANALYZER_FOLDER_NAME; - } - return installPath; - } - - public static String getSavePath() { - String savePath = TIZEN_SDK_DATA_PATH; - if (null != savePath) { - savePath += File.separator + DYNAMIC_ANALYZER_FOLDER_NAME - + File.separator + SAVE_FOLDER_NAME; - } - return savePath; - } - - public static String getLogsPath() { - String savePath = TIZEN_SDK_DATA_PATH + File.separator - + DYNAMIC_ANALYZER_FOLDER_NAME + File.separator; - if (null != savePath) { - savePath += LOG_FOLDER_NAME; - } - return savePath; - } - - public static String getSdbPath() { - String path = TIZEN_ROOT_PATH; - if (null != path) { - path += File.separator + "tools" + File.separator + "sdb"; //$NON-NLS-1$ //$NON-NLS-2$ - } - return path; - } - - public static String getConfigFolderPath() { - String configFolderPath = DYNAMIC_ANALYZER_INSTALL_PATH; - if (null != configFolderPath) { - configFolderPath += File.separator + CONFIG_FOLDER_NAME; - } - return configFolderPath; - } - - public static String getConfigFilePath() { - String configFilePath = CONFIG_FOLDER_PATH; - - if (null != configFilePath) { - configFilePath += File.separator + CONFIG_FILE_NAME; - } - return configFilePath; - } - - public static void pathCheck() { - if (null == TIZEN_ROOT_PATH) { - System.out.println("Tizen Root Path is null"); - System.exit(-1); - } - } - - private static String getOS() { - return System.getProperty(OS_KEY).toLowerCase(); - } - - public static boolean isLinux() { - return getOS().indexOf(LINUX) >= 0; - } - - public static boolean isMac() { - return getOS().indexOf(MAC) >= 0; - } - - public static boolean isWin() { - return getOS().indexOf(WIN) >= 0; - } -} diff --git a/org.tizen.dynamicanalyzer.workbench/src/org/tizen/dynamicanalyzer/workbench/perspective/DAMainPerspective.java b/org.tizen.dynamicanalyzer.workbench/src/org/tizen/dynamicanalyzer/workbench/perspective/DAMainPerspective.java deleted file mode 100644 index ec25996..0000000 --- a/org.tizen.dynamicanalyzer.workbench/src/org/tizen/dynamicanalyzer/workbench/perspective/DAMainPerspective.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.workbench.perspective; - -import org.eclipse.ui.IPageLayout; -import org.eclipse.ui.IPerspectiveFactory; - -public class DAMainPerspective implements IPerspectiveFactory { - - public static final String ID = DAMainPerspective.class.getName(); - - @Override - public void createInitialLayout(IPageLayout layout) { - layout.setEditorAreaVisible(false); - } - -} diff --git a/org.tizen.dynamicanalyzer/.classpath b/org.tizen.dynamicanalyzer/.classpath deleted file mode 100644 index dc27ca6..0000000 --- a/org.tizen.dynamicanalyzer/.classpath +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/org.tizen.dynamicanalyzer/.project b/org.tizen.dynamicanalyzer/.project deleted file mode 100644 index e4865f7..0000000 --- a/org.tizen.dynamicanalyzer/.project +++ /dev/null @@ -1,35 +0,0 @@ - - - org.tizen.dynamicanalyzer - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - - - Link - 2 - TEMP - - - diff --git a/org.tizen.dynamicanalyzer/.settings/org.eclipse.jdt.core.prefs b/org.tizen.dynamicanalyzer/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 36a4c0f..0000000 --- a/org.tizen.dynamicanalyzer/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,8 +0,0 @@ -#Fri Oct 01 12:23:52 KST 2010 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/org.tizen.dynamicanalyzer/META-INF/MANIFEST.MF b/org.tizen.dynamicanalyzer/META-INF/MANIFEST.MF deleted file mode 100644 index 481defd..0000000 --- a/org.tizen.dynamicanalyzer/META-INF/MANIFEST.MF +++ /dev/null @@ -1,29 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Localization: plugin -Bundle-Name: %pluginName -Bundle-SymbolicName: org.tizen.dynamicanalyzer;singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-Vendor: %providerName -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - org.tizen.dynamicanalyzer.widgets;bundle-version="1.0.0" -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Bundle-Activator: org.tizen.dynamicanalyzer.common.AnalyzerPlugin -Bundle-ActivationPolicy: lazy -Bundle-ClassPath: ., - lib/sqlitejdbc-v056.jar, - lib/org.eclipse.cdt.core_5.3.1.201109151620.jar, - lib/org.eclipse.cdt.debug.edc_2.0.0.201109151658.jar, - lib/org.eclipse.cdt.dsf_2.2.0.201109151620.jar, - lib/org.eclipse.nebula.widgets.grid_1.0.0.jar, - lib/org.eclipse.nebula.effects.stw.jar, - lib/jcommon-1.0.17.jar -Export-Package: org.tizen.dynamicanalyzer.common, - org.tizen.dynamicanalyzer.communicator, - org.tizen.dynamicanalyzer.error, - org.tizen.dynamicanalyzer.handlers, - org.tizen.dynamicanalyzer.ui.toolbar, - org.tizen.dynamicanalyzer.ui.widgets, - org.tizen.dynamicanalyzer.utils -Import-Package: org.tizen.sdblib diff --git a/org.tizen.dynamicanalyzer/build.properties b/org.tizen.dynamicanalyzer/build.properties deleted file mode 100644 index 4e16085..0000000 --- a/org.tizen.dynamicanalyzer/build.properties +++ /dev/null @@ -1,15 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = .,\ - bin/,\ - plugin.xml,\ - META-INF/,\ - theme/,\ - schema/,\ - plugin.properties,\ - lib/,\ - build.properties,\ - Link/,\ - .settings/,\ - .project,\ - .classpath,\ \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer/lib/jcommon-1.0.17.jar b/org.tizen.dynamicanalyzer/lib/jcommon-1.0.17.jar deleted file mode 100755 index f1bd165..0000000 Binary files a/org.tizen.dynamicanalyzer/lib/jcommon-1.0.17.jar and /dev/null differ diff --git a/org.tizen.dynamicanalyzer/lib/org.eclipse.cdt.core_5.3.1.201109151620.jar b/org.tizen.dynamicanalyzer/lib/org.eclipse.cdt.core_5.3.1.201109151620.jar deleted file mode 100644 index 3748965..0000000 Binary files a/org.tizen.dynamicanalyzer/lib/org.eclipse.cdt.core_5.3.1.201109151620.jar and /dev/null differ diff --git a/org.tizen.dynamicanalyzer/lib/org.eclipse.cdt.debug.edc_2.0.0.201109151658.jar b/org.tizen.dynamicanalyzer/lib/org.eclipse.cdt.debug.edc_2.0.0.201109151658.jar deleted file mode 100644 index d2c0fc1..0000000 Binary files a/org.tizen.dynamicanalyzer/lib/org.eclipse.cdt.debug.edc_2.0.0.201109151658.jar and /dev/null differ diff --git a/org.tizen.dynamicanalyzer/lib/org.eclipse.cdt.dsf_2.2.0.201109151620.jar b/org.tizen.dynamicanalyzer/lib/org.eclipse.cdt.dsf_2.2.0.201109151620.jar deleted file mode 100644 index 8868fd6..0000000 Binary files a/org.tizen.dynamicanalyzer/lib/org.eclipse.cdt.dsf_2.2.0.201109151620.jar and /dev/null differ diff --git a/org.tizen.dynamicanalyzer/lib/org.eclipse.nebula.effects.stw.jar b/org.tizen.dynamicanalyzer/lib/org.eclipse.nebula.effects.stw.jar deleted file mode 100644 index d9c7f4a..0000000 Binary files a/org.tizen.dynamicanalyzer/lib/org.eclipse.nebula.effects.stw.jar and /dev/null differ diff --git a/org.tizen.dynamicanalyzer/lib/org.eclipse.nebula.widgets.grid_1.0.0.jar b/org.tizen.dynamicanalyzer/lib/org.eclipse.nebula.widgets.grid_1.0.0.jar deleted file mode 100644 index cff3207..0000000 Binary files a/org.tizen.dynamicanalyzer/lib/org.eclipse.nebula.widgets.grid_1.0.0.jar and /dev/null differ diff --git a/org.tizen.dynamicanalyzer/lib/sqlitejdbc-v056.jar b/org.tizen.dynamicanalyzer/lib/sqlitejdbc-v056.jar deleted file mode 100644 index f95d90e..0000000 Binary files a/org.tizen.dynamicanalyzer/lib/sqlitejdbc-v056.jar and /dev/null differ diff --git a/org.tizen.dynamicanalyzer/plugin.properties b/org.tizen.dynamicanalyzer/plugin.properties deleted file mode 100644 index 869cfd8..0000000 --- a/org.tizen.dynamicanalyzer/plugin.properties +++ /dev/null @@ -1,33 +0,0 @@ -#Plugin name -pluginName=Dynamic Analyzer Core Plug-in -#Provider name -providerName=Samsung Electronics - -#Command category, View category -DynamicAnalyzer=Dynamic Analyzer - -#Command name -StartStopTrace=Start Stop Trace -Replay=Replay - -#Command name, Command label, Toolbar tooltip -SaveTrace=Save Trace -OpenTrace=Open Trace -Realtime=Realtime -Battery=Battery -Exit=Exit -OpenTraceComplete=Open Trace Complete -Clear=Clear - -#Theme name -DynamicAnalyzerTheme=Dynamic Analyzer Theme - -#View name -Timeline=Timeline -RealtimeAnalysis=Realtime analysis -Snapshot=Snapshot -Detail=Detail -BatteryAnalysis=Battery analysis -DeviceInfo=DeviceInfo -NtimeAnalysis=N-time analysis -BaseView=BaseView diff --git a/org.tizen.dynamicanalyzer/plugin.xml b/org.tizen.dynamicanalyzer/plugin.xml deleted file mode 100644 index 58ba992..0000000 --- a/org.tizen.dynamicanalyzer/plugin.xml +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.tizen.dynamicanalyzer/schema/BaseLogCenter.xsd b/org.tizen.dynamicanalyzer/schema/BaseLogCenter.xsd deleted file mode 100644 index 78206fb..0000000 --- a/org.tizen.dynamicanalyzer/schema/BaseLogCenter.xsd +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerConstants.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerConstants.java deleted file mode 100644 index f83336d..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerConstants.java +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.common; - -import org.tizen.dynamicanalyzer.nl.AnalyzerLabels; - -public class AnalyzerConstants { - // if log change occurs then increase save data version!! - public static final String SAVE_DATA_VERSION = "0.7"; //$NON-NLS-1$ - public static final boolean CHECK_INTERNAL = true; - - /* special character */ - public static final String EMPTY = ""; //$NON-NLS-1$ - public static final String COLON = ":"; //$NON-NLS-1$ - - /* folder names */ - public static final String TOOLS_FOLDER_NAME = "tools"; //$NON-NLS-1$ - public static final String DYNAMIC_ANALYZER_FOLDER_NAME = "dynamic-analyzer"; //$NON-NLS-1$ - public static final String SAVE_FOLDER_NAME = "save"; //$NON-NLS-1$ - public static final String TEMP_FOLDER_NAME = "temp"; //$NON-NLS-1$ - public static final String TEMP_FOLDER_RUN_PREFIX = ".RUN"; //$NON-NLS-1$ - public static final String IMAGE_FOLDER_NAME = "img"; //$NON-NLS-1$ - public static final String SMALL_IMAGE_FOLDER_NAME = "small"; //$NON-NLS-1$ - public static final String ICON_WORKBENCH_FOLDER_NAME = "icons"; //$NON-NLS-1$ - public static final String XML_FOLDER_NAME = "xml"; //$NON-NLS-1$ - public static final String CONFIG_FOLDER_NAME = "config"; //$NON-NLS-1$ - public static final String CONFIG_FILE_NAME = "config"; //$NON-NLS-1$ - public static final String TIZEN_SDK_DATA = "tizen-sdk-data";//$NON-NLS-1$ - public static final String INSTALL = "tizensdkpath"; //$NON-NLS-1$ - - public static final String DA_DAEMON_NAME = "da_manager"; //$NON-NLS-1$ - public static final String TOOL_RECORDER_NAME = "da_event"; //$NON-NLS-1$ - public static final String READELF_BIN = "readelf"; //$NON-NLS-1$ - - public static final String WIN_INSTALL_NODE = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders";//$NON-NLS-1$ - public static final String WIN_INSTALL_KEY = "Local AppData"; //$NON-NLS-1$ - public static final String LINUX_INSTALL_ENV = "HOME";//$NON-NLS-1$ - - public static final String VERSION_NAME = "version"; //$NON-NLS-1$ - public static final String DATABASE_NAME = "da.trace"; //$NON-NLS-1$ - public static final String DEFAULT_IMAGE_NAME = "noImage.jpg"; //$NON-NLS-1$ - public final static String PROBE_LIB_TIZEN = "da_probe_tizen.so"; //$NON-NLS-1$ - public final static String PROBE_LIB_OSP = "da_probe_osp.so"; //$NON-NLS-1$ - - /* Save Data table */ - public static final String LEAK_DATA_TABLE_NAME = "LeakData"; //$NON-NLS-1$ - public static final String FAILED_DATA_TABLE_NAME = "FailedData"; //$NON-NLS-1$ - - /* thread names */ - public static final String LOG_QUEUE_OBSERVING_THREAD = "Log Queue Observing thread"; //$NON-NLS-1$ - public static final String COMMUNICATOR_RECEIVE_THREAD = "Communicator Receive Thread"; //$NON-NLS-1$ - public static final String MESSAGE_INTERNAL_IMAGE_THREAD = "Internal Image Process Thread"; //$NON-NLS-1$ - public static final String STOP_LOG_THREAD = "Stop Log Thread"; //$NON-NLS-1$ - public static final String BATTERY_RECEIVE_THREAD = "Battery Receive Thread"; //$NON-NLS-1$ - public static final String SLP_APP_RUN_THREAD = "SLP App Run Thread"; //$NON-NLS-1$ - public static final String OPEN_TRACE_THREAD = "Open trace input thread"; //$NON-NLS-1$ - public static final String INSERT_LOG_THREAD = "Insert log thread"; //$NON-NLS-1$ - public static final String IDE_COMMUNICATOR_THREAD = "IDE Communicator thread"; //$NON-NLS-1$ - public static final String SEND_MESSAGE_THREAD = "Send message thread"; //$NON-NLS-1$ - public static final String START_STOP_THREAD = "Start stop thread"; //$NON-NLS-1$ - public static final String FILE_CHART_MANAGER_THREAD = "File Chart Manager thread"; //$NON-NLS-1$ - public static final String FUNCTION_USAGE_PROFILING_THREAD = "Function usage profiling thread"; //$NON-NLS-1$ - public static final String USER_INTERFACE_PAGE_MANAGER_THREAD = "User Interface Page Managerthread"; //$NON-NLS-1$ - - /* log parsing token and callstack parsing token, etc... */ - public static final String CALLSTACK_START = "callstack_start"; //$NON-NLS-1$ - public static final String CALLSTACK_END = "callstack_end"; //$NON-NLS-1$ - public static final String CALLSTACK_CUT_MEMORY_TOKEN = "\\["; //$NON-NLS-1$ - public static final String CALLSTACK_API_TOKEN = "\\("; //$NON-NLS-1$ - public static final String CALLSTACK_API_TOKEN_STRING = "("; //$NON-NLS-1$ - public static final String CALLSTACK_API_EMPTY_TOKEN = "\\)"; //$NON-NLS-1$ - public static final String CALLSTACK_API_OFFSET_TOKEN = "\\+"; //$NON-NLS-1$ - public static final String CLASS = "class"; //$NON-NLS-1$ - public static final String DATA_PARSING_TOKEN = "`,"; //$NON-NLS-1$ - - /* timer intervals */ - public static final int SOCKET_CHECK_INTERVAL = 10; - public static final int SOCKET_TIMEOUT = 10000; - public static final int SOCKET_FORWARD_INTERVAL = 1000; - public static final int LOG_CHECK_INTERVAL = 1000; - public static final int SAVE_PREPARE_TIME = 2000; - public static final long TIMER_START_TIME_DEFAULT = 1000; - public static final int TIMER_INTERVAL_DEFAULT = 1000; - - /* project save index */ - public static final int PROJECT_VERSION_INDEX = 0; - public static final int PROJECT_CREATE_TIME_INDEX = 1; - public static final int PROJECT_APPNAME_INDEX = 2; - public static final int PROJECT_DEVICE_INDEX = 3; - public static final int PROJECT_LAST_DATA_INDEX = 4; - public static final int PROJECT_LAST_TIME_INDEX = 5; - public static final int PROJECT_TOTAL_SAMPLE_COUNT = 6; - - /* save return values */ - public static final int ERROR_EXTENSION_FAIL = -1; - public static final int SUCCESS = 1; - public static final int ERROR_SAVE_FAIL = 0; - public static final int FAIL = -2; - - /* data size */ - public static final int INSERT_DATA_PACKAGE_SIZE = 80; - public static final int MAX_REPEAT_COUNT = 5; - - /* log parsing size */ - public static final int DATABASE_READ_SIZE = 100; - - /* Message Type */ - public static final int MSG_APP_INFO = 1; //$NON-NLS-1$ - public static final int MSG_USER_PROFILING_SAMPLE = 3; //$NON-NLS-1$ - public static final int MSG_DEVICE_LOG = 4; //$NON-NLS-1$ - public static final int MSG_LOG = 5; //$NON-NLS-1$ - public static final int MSG_IMAGE = 6; //$NON-NLS-1$ - public static final int MSG_TERMINATE = 7; //$NON-NLS-1$ - public static final int MSG_DEBUG = 9; //$NON-NLS-1$ - - public static final String MSG_START = "100"; //$NON-NLS-1$ - public static final String MSG_STOP = "101"; //$NON-NLS-1$ - public static final String MSG_PAUSE = "102"; //$NON-NLS-1$ - public static final String MSG_SNAPSHOT = "103"; //$NON-NLS-1$ - public static final String MSG_BATT_START = "104"; //$NON-NLS-1$ - public static final String MSG_BATT_STOP = "105"; //$NON-NLS-1$ - public static final String MSG_ALIVE = "110"; //$NON-NLS-1$ - - public static final int SNAPSHOT_OFF = 0; - public static final int SNAPSHOT_ON = 1; - - public static final int DAEMON_LISTEN_TRY = 50; - - /* app info */ - public static final int APP_INFO_SYSTEM_MEMORY_SIZE = 0; - public static final int APP_INFO_STORAGE_SIZE = 1; - public static final int APP_INFO_BLUETOOTH_SUPPORT = 2; - public static final int APP_INFO_GPS_SUPPORT = 3; - public static final int APP_INFO_WIFI_SUPPORT = 4; - public static final int APP_INFO_CAMERA_COUNT = 5; - public static final int APP_INFO_NETWORK_TYPE = 6; - public static final int APP_INFO_MAX_BRIGHTNESS = 7; - public static final int APP_INFO_WIDTH = 8; - public static final int APP_INFO_HEIGHT = 9; - public static final int APP_INFO_THEME = 10; - public static final int APP_INFO_VERSION = 11; - public static final int APP_INFO_SCALE = 12; - public static final int APP_INFO_REMOVABLE = 13; - public static final int APP_INFO_COMMENT = 14; - public static final int APP_INFO_PID = 15; - public static final int APP_INFO_START_TIME = 16; - public static final int APP_INFO_PIE_BUILD = 17; - public static final int APP_INFO_BASE_ADDRESS = 18; - public static final int APP_INFO_APP_TYPE = 19; - public static final int APP_INFO_BINARY_PATH = 20; - public static final int APP_INFO_SIZE = 21; - - /* app type */ - public static final int APP_TYPE_TIZEN = 0; - public static final int APP_TYPE_OSP = 1; - - /* Source Line errors */ - public static final int SOURCELINE_NOERROR = 0; - public static final int SOURCELINE_NULL_PATH = 1; - public static final int SOURCELINE_NULL_ADDRESS = 2; - public static final int SOURCELINE_FILE_NOT_FOUND = 3; - public static final int SOURCELINE_BAD_ADDRESS = 4; - public static final int SOURCELINE_NO_SYMBOL_INFORMATION = 5; - public static final int SOURCELINE_NO_MATCHING_LINE = 6; - public static final int SOURCELINE_UNKNOWN_ERROR = 7; - public static final int SOURCELINE_NO_SOURCELINE_DATA = 8; - public static final int SOURCELINE_PIE_BUILD = 9; - public static final int SOURCE_FILE_NOT_FOUND = 10; - - public static final String[] sourcelineErrorMsg = { - AnalyzerLabels.EMPTY_STRING, - AnalyzerLabels.ANALYZER_CONSTANTS_SOURCELINE_NULL_PATH, - AnalyzerLabels.ANALYZER_CONSTANTS_SOURCELINE_NULL_ADDRESS, - AnalyzerLabels.ANALYZER_CONSTANTS_SOURCELINE_FILE_NOT_FOUND, - AnalyzerLabels.ANALYZER_CONSTANTS_SOURCELINE_BAD_ADDRESS, - AnalyzerLabels.ANALYZER_CONSTANTS_SOURCELINE_NO_SYMBOL_INFORMATION, - AnalyzerLabels.ANALYZER_CONSTANTS_SOURCELINE_NO_MATCHING_LINE, - AnalyzerLabels.ANALYZER_CONSTANTS_SOURCELINE_UNKNOWN_ERROR, - AnalyzerLabels.ANALYZER_CONSTANTS_SOURCELINE_NO_SOURCELINE_DATA, - AnalyzerLabels.ANALYZER_CONSTANTS_SOURCELINE_PIE_BUILD, - AnalyzerLabels.ANALYZER_CONSTANTS_SOURCELINE_NOT_FOUND }; - - // user call check - public final static String USER_BIN_POS = "/opt/apps/"; //$NON-NLS-1$ - public final static int USER_CALL = 1; - public final static int INTERNAL_CALL = 2; - public final static int USER_CALL_CHECK_ERROR = -1; - - // comparator type - public final static int SORT_TYPE_NONE = 0; - public final static int SORT_TYPE_NUM = 1; - public final static int SORT_TYPE_STRING = 2; - public final static int SORT_TYPE_GRID = 3; - - // function usage profile data type - public final static int FUPD_APPLICATION = 1; - public final static int FUPD_DEPENDENT_LIB = 2; -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerManager.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerManager.java deleted file mode 100755 index 7097947..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerManager.java +++ /dev/null @@ -1,506 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.common; - -import java.io.File; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; - -import org.tizen.dynamicanalyzer.handlers.ClearHandler; -import org.tizen.dynamicanalyzer.handlers.StartHandler; -import org.tizen.dynamicanalyzer.model.BaseLogCenter; -import org.tizen.dynamicanalyzer.model.ImageInfo; -import org.tizen.dynamicanalyzer.model.LeakCheckList; -import org.tizen.dynamicanalyzer.model.LogCenter; -import org.tizen.dynamicanalyzer.project.Project; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.theme.DATheme; -import org.tizen.dynamicanalyzer.theme.DAThemeWhite; -import org.tizen.dynamicanalyzer.ui.page.BaseView; -import org.tizen.dynamicanalyzer.ui.page.DAPageComposite; -import org.tizen.dynamicanalyzer.ui.summary.failed.FailedChecker; -import org.tizen.dynamicanalyzer.ui.summary.leaks.LeakDetector; -import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfiler; -import org.tizen.dynamicanalyzer.ui.summary.warning.WarningChecker; -import org.tizen.dynamicanalyzer.ui.timeline.calltrace.UserFunctionManager; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; -import org.tizen.dynamicanalyzer.utils.ExtensionFilter; -import org.tizen.dynamicanalyzer.utils.ImageListSortComparator; -import org.tizen.dynamicanalyzer.utils.XMLManager; - -public class AnalyzerManager { - private static DATheme theme = null; - private static Project project = null; - - private static boolean isLogParsingComplete = false; - - private static List baseLogCenters; - private static List logCenters; - private static List projectList = null; - - private static HashMap imageSet = null; - private static List imageList = null; - private static int imageListSize = 0; - - private static LeakDetector leakDetector = null; - private static FailedChecker failedChecker = null; - private static FailedChecker calledChecker = null; - private static WarningChecker warningChecker = null; - - private static boolean appInfoArrived = false; - private static boolean isHaveSampleThread = false; - private static boolean exit = false; - - private static String startBinaryAddr = null; - private static String endBinaryAddr = null; - - public static boolean isExit() { - return exit; - } - - public static void setExit(boolean e) { - exit = e; - } - - public static List getProjectList() { - if (null == projectList) { - projectList = new ArrayList(); - } - return projectList; - } - - public static void removeFromProjectList(String path) { - int size = getProjectList().size(); - for (int i = 0; i < size; i++) { - if (projectList.get(i).equals(path)) { - projectList.remove(i); - break; - } - } - } - - public static DATheme getTheme() { - if (null == theme) { - // theme = DAThemeBlack.getInstance(); - theme = DAThemeWhite.getInstance(); - } - return theme; - } - - public static void setTheme(DATheme t) { - theme = t; - ColorResources.initColors(); - - // TODO: redraw all widgets! - // AnalyzerUtil.getWorkbenchWindow().getWorkbench() - // .getActiveWorkbenchWindow(); - } - - public static boolean isLogParsingComplete() { - return isLogParsingComplete; - } - - public static void setLogParsingComplete(boolean complete) { - isLogParsingComplete = complete; - } - - public static boolean hasSampleThread() { - return isHaveSampleThread; - } - - public static void setSampleThread(boolean b) { - isHaveSampleThread = b; - } - - public static boolean isBinStartEndSet() { - if ((null != startBinaryAddr && !startBinaryAddr.isEmpty()) - && (null != endBinaryAddr && !endBinaryAddr.isEmpty())) { - return true; - } - return false; - } - - public static void setBinaryStartEndAddr(String start, String end) { - startBinaryAddr = start; - endBinaryAddr = end; - } - - public static boolean isInBinaryRange(String addrStr) { - try { - long startAddr = Long.parseLong(startBinaryAddr); - long endAddr = Long.parseLong(endBinaryAddr); - long addr = Long.parseLong(addrStr); - if (addr > endAddr || addr < startAddr) { - return false; - } - return true; - - } catch (NumberFormatException e) { - e.printStackTrace(); - return false; - } - - } - - public static void clear() { - if (null != project) { - if (!project.isValid()) { - try { - project.closeConnection(); - String sourcePath = project.getSavePath(); - if (null != sourcePath && !sourcePath.isEmpty()) { - boolean success = AnalyzerUtil.deleteFile(new File( - sourcePath)); - AnalyzerManager.removeFromProjectList(sourcePath); - if (success) { - // add snapshot model update - // SnapshotData.getInstance().update(); - System.out.println("invalid project deleted!"); //$NON-NLS-1$ - } else { - System.out - .println("invalid project delete fail..."); //$NON-NLS-1$ - } - } - } catch (Exception e) { - e.printStackTrace(); - } - } - project = null; - } - - imageSet = null; - imageList = null; - imageListSize = 0; - - leakDetector = null; - failedChecker = null; - warningChecker = null; - calledChecker = null; - isHaveSampleThread = false; - UserFunctionManager.getInstance().clear(); - FunctionUsageProfiler.clear(); - FunctionUsageProfiler.stopProfiler(); - startBinaryAddr = null; - endBinaryAddr = null; - appInfoArrived = false; - } - - public static List getImageList() { - if (null == imageList) { - imageList = new ArrayList(); - imageListSize = 0; - } - if (imageList.size() != getImageSet().size()) { - imageList.clear(); - Collection imageCol = getImageSet().values(); - imageList.addAll(imageCol); - Collections.sort(imageList, new ImageListSortComparator()); - imageListSize = imageList.size(); - } - return imageList; - } - - public static HashMap getImageSet() { - if (null == imageSet) { - imageSet = new HashMap(); - ImageInfo noImage = new ImageInfo(); - noImage.setSeq("-1"); //$NON-NLS-1$ - noImage.setTime("-1"); //$NON-NLS-1$ - imageSet.put(noImage.getSeq(), noImage); - } - return imageSet; - } - - public static String getImagePathByTime(String timeStr) { - imageList = getImageList(); - String path = null; - for (int i = 0; i < imageListSize; i++) { - long imgTime = Long.parseLong(imageList.get(i).getTime()); - long time = Long.parseLong(timeStr); - if (imgTime <= time) { - path = AnalyzerManager.getProject().getSavePath() - + File.separator + AnalyzerConstants.IMAGE_FOLDER_NAME - + File.separator + imageList.get(i).getSeq() - + CommonConstants.EXTENSION_PNG_IMAGE; - } else { - break; - } - } - if (null != path) { - return path; - } else { - return AnalyzerConstants.DEFAULT_IMAGE_NAME; - } - } - - public static ImageInfo getImageInfoByTime(String timeStr) { - imageList = getImageList(); - for (int i = imageListSize - 1; i >= 0; i--) { - long imgTime = Long.parseLong(imageList.get(i).getTime()); - long time = Long.parseLong(timeStr); - if (imgTime <= time) { - return imageList.get(i); - } - } - return null; - } - - public static int getImageIndexByTime(String timeStr) { - imageList = getImageList(); - for (int i = imageListSize - 1; i >= 0; i--) { - long imgTime = Long.parseLong(imageList.get(i).getTime()); - long time = Long.parseLong(timeStr); - if (imgTime <= time) { - return i; - } - } - return -1; - } - - public static void setProject(Project p) { - project = p; - getProjectList().add(p.getSavePath()); - } - - public static void setProjectNoRegist(Project p) { - project = p; - } - - public static Project getProject() { - return project; - } - - public static List getBaseLogCenters() { - if (null == baseLogCenters) { - baseLogCenters = getAvailableLogCenters(); - } - return baseLogCenters; - } - - public static List getInnerLogCenters() { - if (null == logCenters || logCenters.isEmpty()) { - if (null == logCenters) { - logCenters = new ArrayList(); - } - List baseLogcs = AnalyzerManager.getBaseLogCenters(); - if (null == baseLogcs || baseLogcs.isEmpty()) { - System.out - .println("DynamicAnalyzer folder or logc file is missing! ");//$NON-NLS-1$ - return null; - } - int size = baseLogcs.size(); - for (int i = 0; i < size; i++) { - logCenters.add(copyLogCenter(baseLogcs.get(i))); - } - } - return logCenters; - } - - public static LogCenter copyLogCenter(BaseLogCenter from) { - LogCenter to = new LogCenter(); - to.setId(from.getId()); - to.setName(from.getName()); - to.setTotalColumnCount(from.getTotalColumnCount()); - to.setCustomColumn(from.isCustomColumn()); - - to.getColumnName().addAll(from.getColumnName()); - to.getType().addAll(from.getType()); - to.getColumnSizes().addAll(from.getColumnSize()); - to.getColumnOrder().addAll(from.getColumnOrder()); - to.getColumnVisibility().addAll(from.getColumnVisibility()); - to.getTableColumnName().addAll(from.getTableColumnName()); - return to; - } - - public static BaseLogCenter getBaseLogCenterById(int id) { - if (null != baseLogCenters) { - int size = baseLogCenters.size(); - for (int i = 0; i < size; i++) { - if (id == baseLogCenters.get(i).getId()) { - return baseLogCenters.get(i); - } - } - } - return null; - } - - public static List getAvailableLogCenters() { - String path = AnalyzerPaths.DYNAMIC_ANALYZER_INSTALL_PATH - + File.separator + AnalyzerConstants.XML_FOLDER_NAME; - File file = new File(path); - if (!file.exists()) { - return null; - } - - File fileList[] = file.listFiles(new ExtensionFilter( - CommonConstants.EXTENSION_LOG_CENTER)); - int fileListLength = fileList.length; - if (1 > fileListLength) { - return null; - } - - List logcs = new ArrayList(); - BaseLogCenter logc = new BaseLogCenter(); - for (int i = 0; i < fileListLength; i++) { - logc = (BaseLogCenter) XMLManager.unmarshal(new File(path - + File.separator + fileList[i].getName())); - if (null != logc) { - logcs.add(logc); - } - } - - return logcs; - } - - public static LeakDetector getLeakDetector() { - - if (leakDetector == null) { - leakDetector = new LeakDetector(); - } - return leakDetector; - } - - public static FailedChecker getFailedChecker() { - if (null == failedChecker) { - failedChecker = new FailedChecker(); - } - return failedChecker; - } - - public static WarningChecker getWarningChecker() { - if (null == warningChecker) { - warningChecker = new WarningChecker(); - } - return warningChecker; - } - - public static FailedChecker getCalledFunctionChecker() { - if (null == calledChecker) { - calledChecker = new FailedChecker(); - } - return calledChecker; - } - - // public static FunctionUsageProfiler getFunctionUserProfiler() { - // if (null == functionUsageProfiler) { - // functionUsageProfiler = new FunctionUsageProfiler(); - // } - // return functionUsageProfiler; - // } - - public static boolean recordStart() { - AnalyzerUtil.executeCommand(ClearHandler.ID); - Project project = new Project(); - project.init(); - leakDetector = new LeakDetector(); - - AnalyzerUtil.executeCommand(StartHandler.ID); - return true; - } - - public static List getLogCenters() { - if (null != project) { - return project.getLogCenters(); - } - return getInnerLogCenters(); - } - - public void initLogCenters() { - if (null != logCenters) { - logCenters.clear(); - } else { - logCenters = new ArrayList(); - } - - logCenters.addAll(AnalyzerManager.getLogCenters()); - } - - public static LogCenter getLogCenterById(int id) { - List logcs = getLogCenters(); - if (null != logcs) { - int size = logcs.size(); - for (int i = 0; i < size; i++) { - if (id == logcs.get(i).getId()) { - return logcs.get(i); - } - } - } - return null; - } - - public static LeakCheckList getLeakCheckList() { - String path = AnalyzerPaths.DYNAMIC_ANALYZER_INSTALL_PATH - + File.separator + AnalyzerConstants.XML_FOLDER_NAME; - - File file = new File(path); - if (!file.exists()) { - return null; - } - - File fileList[] = file.listFiles(new ExtensionFilter( - CommonConstants.EXTENSION_LEAK_CHECK)); - int fileListLength = fileList.length; - if (1 > fileListLength) { - return null; - } - - LeakCheckList output = new LeakCheckList(); - LeakCheckList leakCheckList = new LeakCheckList(); - for (int i = 0; i < fileListLength; i++) { - leakCheckList = (LeakCheckList) XMLManager.unmarshal(new File(path - + File.separator + fileList[i].getName())); - output.getChecks().addAll(leakCheckList.getChecks()); - } - leakCheckList = null; - return output; - } - - public static boolean isOsp() { - int type = Integer.parseInt(getProject().getAppInfo().get( - AnalyzerConstants.APP_INFO_APP_TYPE)); - if (type == AnalyzerConstants.APP_TYPE_OSP) { - return true; - } - return false; - } - - public static void setAppInfoArrived(boolean arrived) { - appInfoArrived = arrived; - } - - public static boolean isAppInfoArrived() { - return appInfoArrived; - } - - public static DAPageComposite getCurrentPage() { - BaseView bv = (BaseView) AnalyzerUtil.getViewPart(BaseView.ID); - return bv.getTopComposite(); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerPaths.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerPaths.java deleted file mode 100644 index f279e35..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerPaths.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.common; - -import java.io.File; - -public class AnalyzerPaths { - /* paths */ - public static final String TIZEN_SDK_DATA_PATH = PathManager - .getTizenSdkDataPath(); - public static final String TIZEN_ROOT_PATH = PathManager.getDefaultRoot(); - public static final String DYNAMIC_ANALYZER_INSTALL_PATH = PathManager - .getInstallPath(); - public static final String DYNAMIC_ANALYZER_SAVE_PATH = PathManager - .getSavePath(); - public static final String TOOL_FOLDER_PATH = DYNAMIC_ANALYZER_INSTALL_PATH - + File.separator + AnalyzerConstants.TOOLS_FOLDER_NAME; - public static final String TEMP_FOLDER_PATH = DYNAMIC_ANALYZER_SAVE_PATH - + File.separator + AnalyzerConstants.TEMP_FOLDER_NAME; - public static final String CONFIG_FOLDER_PATH = PathManager - .getConfigFolderPath(); - public static final String SDB_PATH = PathManager.getSdbPath(); - public static final String TARGET_PATH = DYNAMIC_ANALYZER_INSTALL_PATH - + File.separator + "target" + File.separator; //$NON-NLS-1$ - - public static final String DA_SINGLETON_FILE_PATH = PathManager - .getSavePath() + File.separator + "active_da"; //$NON-NLS-1$ - public static final String IDE_ACTIVE_PORT_PATH = PathManager.getSavePath() - + File.separator + "active_da_plugin"; //$NON-NLS-1$ - public static final String IDE_ACTIVE_SAVE_PORT_PATH = PathManager - .getSavePath() + File.separator + "current_active_ide_port"; //$NON-NLS-1$ - - public static final String WINDOW_ACTIVATOR_LINUX_PATH = TIZEN_ROOT_PATH - + "/tools/dynamic-analyzer/tool/windowactivator.sh";//$NON-NLS-1$ - public static final String WINDOW_ACTIVATOR_WIDOWS_PATH = TIZEN_ROOT_PATH - + "/tools/dynamic-analyzer/tool/windowactivator.bat";//$NON-NLS-1$ - public static final String WINDOW_ACTIVATOR_MACOS_PATH = TIZEN_ROOT_PATH - + "/tools/dynamic-analyzer/tool/macoswindowactivator.sh";//$NON-NLS-1$ - - public static final String DA_OSP_EMULATOR_SOUECE_PATH = TIZEN_ROOT_PATH - + "/platforms/tizen2.0/rootstraps/tizen-emulator-2.0.cpp/usr/include/osp"; //$NON-NLS-1$ - public static final String DA_OSP_DEVICE_SOUECE_PATH = TIZEN_ROOT_PATH - + "/platforms/tizen2.0/rootstraps/tizen-device-2.0.cpp/usr/include/osp"; //$NON-NLS-1$ - - /* Name & Path */ - public static final String DA_REMOTE_PROBE_PATH = "/opt/developer/sdk_tools/da/"; //$NON-NLS-1$ - public static final String DA_REMOTE_PATH = "/opt/home/developer/sdk_tools/da/"; //$NON-NLS-1$ - public static final String DA_REMOTE_DAEMON_BINARY_PATH = DA_REMOTE_PATH - + AnalyzerConstants.DA_DAEMON_NAME; - public static final String TOOL_REMOTE_RECORDER_BINARY_PATH = DA_REMOTE_PATH - + AnalyzerConstants.TOOL_RECORDER_NAME; - public static final String APPLICATION_LIST_PATH = "/opt/share/applications/"; //$NON-NLS-1$ -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerPlugin.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerPlugin.java deleted file mode 100644 index 4e006c8..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerPlugin.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.common; - -import java.io.File; -import java.util.List; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IPartService; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchListener; -import org.eclipse.ui.IWorkbenchWindow; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; -import org.tizen.dynamicanalyzer.listeners.AnalyzerPartListener; -import org.tizen.dynamicanalyzer.listeners.AnalyzerPerspectiveListener; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; - -public class AnalyzerPlugin extends AbstractUIPlugin { - - private static final String THEME_ID = "org.tizen.dynamicanalyzer.theme"; //$NON-NLS-1$ - private static AnalyzerPlugin plugin; - - public static AnalyzerPlugin getDefault() { - return plugin; - } - - @Override - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - - // Adds workbench listener. - IWorkbench workbench = PlatformUI.getWorkbench(); - workbench.getActiveWorkbenchWindow().getPages(); - workbench.addWorkbenchListener(new IWorkbenchListener() { - @Override - public void postShutdown(IWorkbench workbench) { - try { - List tempProjects = AnalyzerManager - .getProjectList(); - int size = tempProjects.size(); - for (int i = 0; i < size; i++) { - File tempFile = new File(tempProjects.get(i)); - if (tempFile.isFile() && tempFile.exists()) { - AnalyzerUtil.deleteFile(tempFile); - } - } - // File tempFolder = new File( - // AnalyzerConstants.TEMP_FOLDER_PATH); - boolean delete = true; - /** do not delete : for multi da running **/ - /** - * boolean delete = false; if (tempFolder.exists() && - * tempFolder.isDirectory()) { String[] list = - * tempFolder.list(); if (0 == list.length) { delete = true; - * } else { int count = list.length; for (int i = 0; i < - * count; i++) { String fileName = list[i]; if (fileName - * .contains(AnalyzerConstants.TEMP_FOLDER_RUN_PREFIX)) { - * delete = false; break; } if (i + 1 == count) { delete = - * true; } } } - **/ - if (delete) { - File tempDir = new File(AnalyzerPaths.TEMP_FOLDER_PATH); - if (tempDir.isDirectory() && tempDir.exists()) { - if (AnalyzerUtil.deleteFile(tempDir)) { - System.out.println("Delete temp folder!"); //$NON-NLS-1$ - } else { - System.out - .println("Delete temp folder fail..."); //$NON-NLS-1$ - } - } - } - // } - } catch (Exception e) { - e.printStackTrace(); - } - } - - @Override - public boolean preShutdown(IWorkbench workbench, boolean forced) { - // AnalyzerUtil.executeCommand(ExitHandler.ID); - // - // CoolbarArea.getInstance().dispose(); - - return true; - } - }); - - // Adds perspective listener. - IWorkbenchWindow window = workbench.getActiveWorkbenchWindow(); - window.addPerspectiveListener(new AnalyzerPerspectiveListener()); - - // Sets theme and color. - workbench.getThemeManager().setCurrentTheme(THEME_ID); - Shell shell = window.getShell(); - shell.setBackgroundMode(SWT.INHERIT_FORCE); - shell.setBackground(ColorResources.WINDOW_BG_COLOR); - - File saveFolder = new File(AnalyzerPaths.TEMP_FOLDER_PATH); - if (!saveFolder.isDirectory()) { - saveFolder.mkdirs(); - } - - // SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss", //$NON-NLS-1$ - // Locale.KOREA); - // Date date = new Date(); - // String idFilePath = AnalyzerPaths.TEMP_FOLDER_PATH + File.separator - // + AnalyzerConstants.TEMP_FOLDER_RUN_PREFIX - // + format.format(date); - // File idFile = new File(idFilePath); - // idFile.createNewFile(); - // if (idFile.exists()) { - // AnalyzerManager.getProjectList().add(idFile.getPath()); - // } else { - // System.out.println(" start up failed..."); //$NON-NLS-1$ - // return; - // } - - IPartService partService = PlatformUI.getWorkbench() - .getActiveWorkbenchWindow().getPartService(); - - AnalyzerPartListener partListener = new AnalyzerPartListener(); - partService.addPartListener(partListener); - - } - - @Override - public void stop(BundleContext context) throws Exception { - plugin = null; - - super.stop(context); - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerShellCommands.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerShellCommands.java deleted file mode 100644 index 3831830..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerShellCommands.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.common; - - -public class AnalyzerShellCommands { - public static final String REMOVE_RECURSIVE_FORCE = "rm -rf "; //$NON-NLS-1$ - - /* Commands */ - public static final String CMD_GET_LIST = "ls -1 "; //$NON-NLS-1$ - public static final String CMD_NO_LIST = "ls:"; //$NON-NLS-1$ - public static final String CMD_CAT_PRINT = "cat "; //$NON-NLS-1$ - public static final String CMD_NO_CAT_PRINT = "cat:"; //$NON-NLS-1$ - public static final String CMD_REMOVE = "rm -rf"; //$NON-NLS-1$ - public static final String CMD_EXE_PERMISSION = "chmod +x "; //$NON-NLS-1$ - - public static final String CMD_APPLICATION_LIST = "ls -t " + //$NON-NLS-1$ - AnalyzerPaths.APPLICATION_LIST_PATH - + "*.desktop | xargs egrep -Li \"Hidden=true|PackageType=wgt|taskmanage=false\" | xargs egrep -i \"exec|name=\"";//$NON-NLS-1$ - - public static final String CMD_DAEMON_EXE_PERMISSION = CMD_EXE_PERMISSION - + AnalyzerPaths.DA_REMOTE_DAEMON_BINARY_PATH; - - public static final String CMD_READELF_PERMISSION = CMD_EXE_PERMISSION - + AnalyzerPaths.DA_REMOTE_PATH + AnalyzerConstants.READELF_BIN; - - public static final String CMD_IS_DAEMON_EXIST = CMD_GET_LIST - + AnalyzerPaths.DA_REMOTE_DAEMON_BINARY_PATH; - - public static final String CMD_IS_DAEMON_LISTEN = "ps ax | grep " - + AnalyzerConstants.DA_DAEMON_NAME + " | grep -v grep"; - - public static final String CMD_LS_VERSION = CMD_GET_LIST - + AnalyzerPaths.DA_REMOTE_PATH + AnalyzerConstants.VERSION_NAME; - - public static final String CMD_CAT_VERSION = CMD_CAT_PRINT - + AnalyzerPaths.DA_REMOTE_PATH + AnalyzerConstants.VERSION_NAME; - - public static final String CMD_PIDOF_DAEMON = "pidof " //$NON-NLS-1$ - + AnalyzerConstants.DA_DAEMON_NAME; - - public static final String CMD_KILL_DAEMON = "kill -9 "; //$NON-NLS-1$ - public static final String CMD_IS_ARM_ARCH = "uname -m"; //$NON-NLS-1$ - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/CommonConstants.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/CommonConstants.java deleted file mode 100644 index 07f24df..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/CommonConstants.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.common; - -public class CommonConstants { - - /* special character */ - public static final String EMPTY = ""; //$NON-NLS-1$ - public static final String SPACE = " "; //$NON-NLS-1$ - public static final String TAB = " "; //$NON-NLS-1$ - public static final String SLASH = "/"; //$NON-NLS-1$ - public static final String BSLASH = "\\"; //$NON-NLS-1$ - public static final String CMD_SPLIT = "|"; //$NON-NLS-1$ - public static final String CMD_SPLIT_READ = "\\|"; //$NON-NLS-1$ - public static final String CMD_SPLIT_DOT = "\\."; //$NON-NLS-1$ - public static final String NEW_LINE_CHAR = "\\n"; //$NON-NLS-1$ - public static final String NEW_LINE = "\n"; //$NON-NLS-1$ - public static final String DOT = "."; //$NON-NLS-1$ - public static final String COMMA = ","; //$NON-NLS-1$ - public static final String COLON = ":"; //$NON-NLS-1$ - public static final String SEMICOLON = ";"; //$NON-NLS-1$ - public static final String DASH = "-"; //$NON-NLS-1$ - public static final String UNDERBAR = "_"; //$NON-NLS-1$ - public static final String OPEN_BRACKET = "("; //$NON-NLS-1$ - public static final String CLOSE_BRACKET = ")"; //$NON-NLS-1$ - public static final String OPEN_SQUARE_BRACKET = "["; //$NON-NLS-1$ - public static final String CLOSE_SQUARE_BRACKET = "]"; //$NON-NLS-1$ - public static final String TILDE = "~"; //$NON-NLS-1$ - public static final String ELLIPSIS = "..."; //$NON-NLS-1$ - public static final String ZERO = "0"; //$NON-NLS-1$ - public static final String EQUAL = "="; //$NON-NLS-1$ - public static final String ASTERISK = "*"; //$NON-NLS-1$ - public static final String GRAVE_ACCENT = "`"; //$NON-NLS-1$ - public static final String PERCENT = "%"; //$NON-NLS-1$ - public static final String EMULATOR = "emulator"; //$NON-NLS-1$ - public static final String ON = "on"; //$NON-NLS-1$ - public static final String OFF = "off"; //$NON-NLS-1$ - - public static final String LOCAL_HOST = "127.0.0.1"; //$NON-NLS-1$ - - /* extensions */ - public static final String EXTENSION_LOG_CENTER = ".logc"; //$NON-NLS-1$ - public static final String EXTENSION_LEAK_CHECK = ".leak"; //$NON-NLS-1$ - public static final String EXTENSION_JPG_IMAGE = ".jpg"; //$NON-NLS-1$ - public static final String EXTENSION_PNG_IMAGE = ".png"; //$NON-NLS-1$ - public static final String EXTENSION_GIF_IMAGE = ".gif"; //$NON-NLS-1$ - - /* Arch */ - public static final String ARM_ARCH = "arm"; //$NON-NLS-1$ - public static final String X86_ARCH = "x86"; //$NON-NLS-1$ - - /* OS */ - public static final String OS_KEY = "os.name"; //$NON-NLS-1$ - public static final String LINUX = "linux"; //$NON-NLS-1$ - public static final String MAC = "mac"; //$NON-NLS-1$ - public static final String WIN = "win"; //$NON-NLS-1$ - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/DASelectionData.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/DASelectionData.java deleted file mode 100644 index cd31600..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/DASelectionData.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.common; - -import org.eclipse.swt.widgets.Control; - -public class DASelectionData { - private String viewId; - private long startTime; - private long endTime; - private Object data; - private Control control; - - public DASelectionData() { - // TODO Auto-generated constructor stub - } - - public DASelectionData(String id, long start, long end, Object data, - Control ctrl) { - viewId = id; - startTime = start; - endTime = end; - this.data = data; - control = ctrl; - } - - public Control getControl() { - return control; - } - - public void setControl(Control control) { - this.control = control; - } - - public String getViewId() { - return viewId; - } - - public void setViewId(String viewId) { - this.viewId = viewId; - } - - public long getStartTime() { - return startTime; - } - - public void setStartTime(long startTime) { - this.startTime = startTime; - } - - public long getEndTime() { - return endTime; - } - - public void setEndTime(long endTime) { - this.endTime = endTime; - } - - public Object getData() { - return data; - } - - public void setData(Object data) { - this.data = data; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/DASingletonFocusManager.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/DASingletonFocusManager.java deleted file mode 100644 index 39dd980..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/DASingletonFocusManager.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Hyunjong Park - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.common; - -import java.io.File; -import java.io.IOException; -import java.io.RandomAccessFile; -import java.lang.management.ManagementFactory; -import java.lang.management.RuntimeMXBean; -import java.nio.channels.FileChannel; -import java.nio.channels.FileLock; -import org.tizen.dynamicanalyzer.nl.ConfigureLabels; -import org.tizen.dynamicanalyzer.ui.toolbar.ConfigureManager; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; - -public class DASingletonFocusManager { - private static String pid = null; - private static String Processid = null; - private static int selfPid = 0; - private static Runtime runtime; - private static Process process; - - private DASingletonFocusManager() { - selfPid = -1; - } - - private DASingletonFocusManager(int iPid) { - selfPid = iPid; - } - - private static void getPid() { - - if (selfPid > 0) { - pid = String.valueOf(selfPid); - } else { - ManagementFactory.getRuntimeMXBean(); - RuntimeMXBean rt = ManagementFactory.getRuntimeMXBean(); - Processid = rt.getName(); - pid = Processid.substring(0, Processid.indexOf("@")); - } - } - - private static String[] getSaveFocusPath() { - - String[] returnStr = null; - String strPid = ConfigureManager.getInstance().getValue( - ConfigureLabels.SINGLETON_FOCUS_DA_PID); - - if (AnalyzerUtil.isWin()) { - returnStr = new String[] { - AnalyzerPaths.WINDOW_ACTIVATOR_WIDOWS_PATH, strPid }; - } else if ( AnalyzerUtil.isMac() ){ - returnStr = new String[] { - AnalyzerPaths.WINDOW_ACTIVATOR_MACOS_PATH, strPid }; - }else{ - returnStr = new String[] { - AnalyzerPaths.WINDOW_ACTIVATOR_LINUX_PATH, strPid }; - } - - - - return returnStr; - } - - private static int executeCommand(String[] cmds) { - int retValue = 0; - - try { - - if (cmds.length == 0) { - retValue = -1; - } else { - - runtime = Runtime.getRuntime(); - process = runtime.exec(cmds); - - if (process != null) { - process.waitFor(); - retValue = process.exitValue(); - } - } - } catch (IOException e) { - } catch (InterruptedException e) { - } finally { - if (process != null) { - process.destroy(); - } - } - return retValue; - } - - public static void setFocusDA() { - executeCommand(getSaveFocusPath()); - } - - public static void setSaveFocusDAPid() { - getPid(); - ConfigureManager.getInstance().setValue( - ConfigureLabels.SINGLETON_FOCUS_DA_PID, pid); - } - - public static boolean checkDASingleton() { - - File file = null; - FileLock fileLock = null; - FileChannel fchannel = null; - try { - file = new File(AnalyzerPaths.DA_SINGLETON_FILE_PATH); - fchannel = new RandomAccessFile(file, "rw").getChannel(); - fileLock = fchannel.tryLock(); - if (fileLock == null) { - return true; - } - } catch (Exception e) { - return true; - } - - return false; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/DesignConstants.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/DesignConstants.java deleted file mode 100644 index 2bbd2ed..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/DesignConstants.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.common; - -public class DesignConstants { - public static final int VIEW_TITLEBAR_HEIGHT = 22; - - public static final int COMBO_DEVICE_TOP = 7; - public static final int COMBO_DEVICE_LEFT = 6; - public static final int COMBO_DEVICE_HEIGHT = 24; - public static final int COMBO_DEVICE_WIDTH = 145; - - public static final int COMBO_APP_TOP = 7; - public static final int COMBO_APP_LEFT = 6; - public static final int COMBO_APP_HEIGHT = 24; - public static final int COMBO_APP_WIDTH = 145; - - public static final int SNAPSHOT_VIEW_WIDTH = 220; - public static final int SNAPSHOT_VIEW_HEIGHT = 310 ; - - public static final int DA_BUTTON_HEIGHT = 28; - public static final int DA_BUTTON_WIDTH = 100; -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/PathManager.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/PathManager.java deleted file mode 100755 index 81ad147..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/PathManager.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.common; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStreamReader; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Shell; -import org.tizen.dynamicanalyzer.nl.AnalyzerLabels; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.ui.widgets.DADialog; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; - -public class PathManager { - public static String getRegistryValue(String node, String key) { - BufferedReader br = null; - String value = ""; //$NON-NLS-1$ - - String query = "reg query " + "\"" + node + "\" /v " + "\"" + key + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ - try { - Process process = Runtime.getRuntime().exec(query); - String encoding = System.getProperty("sun.jnu.encoding"); //$NON-NLS-1$ - - br = new BufferedReader(new InputStreamReader( - process.getInputStream(), encoding)); - - String line = null; - while ((line = br.readLine()) != null) { - int index = line.indexOf("REG_SZ"); //$NON-NLS-1$ - if (index >= 0) { - value = line.substring(index + "REG_SZ".length()).trim(); //$NON-NLS-1$ - } - } - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } finally { - if (br != null) { - try { - br.close(); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - } - - return value; - } - - public static String getTizenSdkDataPath() { - String defaultPath = null; - if (AnalyzerUtil.isLinux()) { - defaultPath = System.getenv(AnalyzerConstants.LINUX_INSTALL_ENV) - + File.separator + AnalyzerConstants.TIZEN_SDK_DATA; - } else if (AnalyzerUtil.isWin()) { - defaultPath = getRegistryValue(AnalyzerConstants.WIN_INSTALL_NODE, - AnalyzerConstants.WIN_INSTALL_KEY) - + File.separator - + AnalyzerConstants.TIZEN_SDK_DATA; - } else if (AnalyzerUtil.isMac()) { - defaultPath = System.getenv(AnalyzerConstants.LINUX_INSTALL_ENV) - + File.separator + AnalyzerConstants.TIZEN_SDK_DATA; - } else { - final Shell shell = AnalyzerUtil.getWorkbenchWindow().getShell(); - DADialog dialog = new DADialog(shell, SWT.NONE); // FIXME - dialog.setIcon(ImageResources.DIALOG_WARNING_ICON); - dialog.setMessage(AnalyzerLabels.OS_WARNING); - if (dialog.open() == true) { - System.exit(-1); - } - } - - return defaultPath; - } - - public static String getDefaultRoot() { - String rootPath = null; - BufferedReader br = null; - String line = null; - try { - rootPath = AnalyzerPaths.TIZEN_SDK_DATA_PATH + File.separator - + AnalyzerConstants.INSTALL; - File file = new File(rootPath); - if (!file.isFile()) { - return null; - } - br = new BufferedReader(new InputStreamReader(new FileInputStream( - file))); - line = br.readLine(); - return line.substring(line.indexOf(CommonConstants.EQUAL) + 1); - } catch (IOException e) { - System.out.println("Fail to read."); //$NON-NLS-1$ - e.printStackTrace(); - } finally { - if (null != br) { - try { - br.close(); - } catch (IOException e) { - e.printStackTrace(); - } - } - } - - return rootPath; - } - - public static String getInstallPath() { - String installPath = AnalyzerPaths.TIZEN_ROOT_PATH; - if (null != installPath) { - installPath += File.separator + AnalyzerConstants.TOOLS_FOLDER_NAME - + File.separator - + AnalyzerConstants.DYNAMIC_ANALYZER_FOLDER_NAME; - } - return installPath; - } - - public static String getSavePath() { - String savePath = AnalyzerPaths.TIZEN_SDK_DATA_PATH; - if (null != savePath) { - savePath += File.separator - + AnalyzerConstants.DYNAMIC_ANALYZER_FOLDER_NAME - + File.separator + AnalyzerConstants.SAVE_FOLDER_NAME; - } - return savePath; - } - - public static String getSdbPath() { - String path = AnalyzerPaths.TIZEN_ROOT_PATH; - if (null != path) { - path += File.separator + "tools" + File.separator + "sdb"; //$NON-NLS-1$ //$NON-NLS-2$ - } - return path; - } - - public static String getConfigFolderPath() { - String configFolderPath = AnalyzerPaths.DYNAMIC_ANALYZER_INSTALL_PATH; - if (null != configFolderPath) { - configFolderPath += File.separator - + AnalyzerConstants.CONFIG_FOLDER_NAME; - } - return configFolderPath; - } - - public static String getConfigFilePath() { - String configFilePath = AnalyzerPaths.CONFIG_FOLDER_PATH; - - if (null != configFilePath) { - configFilePath += File.separator - + AnalyzerConstants.CONFIG_FILE_NAME; - } - return configFilePath; - } - - public static void pathCheck() { - if (null == AnalyzerPaths.TIZEN_ROOT_PATH) { - final Shell shell = AnalyzerUtil.getWorkbenchWindow().getShell(); - DADialog dialog = new DADialog(shell, SWT.NONE); // FIXME - dialog.setIcon(ImageResources.DIALOG_WARNING_ICON); - dialog.setMessage(AnalyzerLabels.PATH_WARNING); - if (dialog.open() == true) { - System.exit(-1); - } - } - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/SnapshotConstants.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/SnapshotConstants.java deleted file mode 100644 index 4a4e49a..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/SnapshotConstants.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.common; - -public class SnapshotConstants { - public static final int DEFAULT_IMAGE_WIDTH = 270; - public static final int DEFAULT_IMAGE_HEIGHT = 450; - public static final int DEFAULT_IMAGE_MARGIN_X = 5; - public static final int DEFAULT_IMAGE_MARGIN_Y = 5; - public static final int MAX_IMAGE_WIDTH = 480; - public static final int MAX_IMAGE_HEIGHT = 800; -// public static final int MIN_IMAGE_WIDTH = 90; -// public static final int MIN_IMAGE_HEIGHT = 150; - public static final int MIN_IMAGE_WIDTH = 130; - public static final int MIN_IMAGE_HEIGHT = 216; - public static final double IMAGE_WIDTH_RATE = 130.0; - public static final double IMAGE_HEIGHT_RATE = 216.0; - - public static final int DEFAULT_W_IMAGE_WIDTH = 450; - public static final int DEFAULT_W_IMAGE_HEIGHT = 270; - public static final int MAX_W_IMAGE_WIDTH = 800; - public static final int MAX_W_IMAGE_HEIGHT = 480; - public static final int MIN_W_IMAGE_WIDTH = 150; - public static final int MIN_W_IMAGE_HEIGHT = 90; - public static final double W_IMAGE_WIDTH_RATE = 216.0; - public static final double W_IMAGE_HEIGHT_RATE = 130.0; - - public static final int IMAGE_TYPE_NORMAL = 0; - public static final int IMAGE_TYPE_WIDE = 1; - - /* chart */ - public static final int GRAPH_COMP_MARGIN_W = 0; - public static final int GRAPH_COMP_MARGIN_H = 0; - - public static final int IMAGE_MARGIN_TOP = 5; - public static final int IMAGE_MARGIN_BOTTOM = 10; - - public static final int SNAPSHOT_IMAGE_WIDTH = 50; - public static final int SNAPSHOT_IMAGE_HEIGHT = 70; - - public static final int CANVAS_MARGIN_TOP = 10; - public static final int CANVAS_MARGIN_BOTTOM = 10; - public static final int CANVAS_MARGIN_LEFT = 0; - public static final int CANVAS_MARGIN_RIGHT = 0; - - public static final int DEFAULT_FONT_WIDTH = 5; -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/SymbolManager.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/SymbolManager.java deleted file mode 100644 index a814666..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/SymbolManager.java +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * WooJin Jung - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.common; - -import java.io.File; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.lang.ref.WeakReference; -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.cdt.debug.edc.internal.symbols.dwarf.DwarfDebugInfoProviderFactory; -import org.eclipse.cdt.debug.edc.internal.symbols.dwarf.EDCSymbolReader; -import org.eclipse.cdt.debug.edc.internal.symbols.files.ElfExecutableSymbolicsReaderFactory; -import org.eclipse.cdt.debug.edc.internal.symbols.files.UnmanglerEABI; -import org.eclipse.cdt.debug.edc.internal.symbols.files.UnmanglingException; -import org.eclipse.cdt.debug.edc.symbols.IDebugInfoProvider; -import org.eclipse.cdt.debug.edc.symbols.IDebugInfoProviderFactory; -import org.eclipse.cdt.debug.edc.symbols.IEDCSymbolReader; -import org.eclipse.cdt.debug.edc.symbols.IExecutableSymbolicsReader; -import org.eclipse.cdt.debug.edc.symbols.IExecutableSymbolicsReaderFactory; -import org.eclipse.cdt.debug.edc.symbols.ILineEntry; -import org.eclipse.cdt.debug.edc.symbols.IModuleLineEntryProvider; -import org.eclipse.cdt.debug.edc.symbols.IUnmangler; -import org.eclipse.cdt.utils.Addr32; -import org.eclipse.cdt.utils.elf.Elf; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.Path; -import org.tizen.dynamicanalyzer.nl.AnalyzerLabels; - -public class SymbolManager { - private static Map> readerCache = new HashMap>(); - private static Map> elfCache = new HashMap>(); - - public static class SourceLine { - private ILineEntry lineEntry; - private int errorNo = AnalyzerConstants.SOURCELINE_NOERROR; - - public SourceLine() { - this.lineEntry = null; - } - - public SourceLine(ILineEntry lineEntry) { - this.lineEntry = lineEntry; - } - - public int getError() { - return errorNo; - } - - public void setError(int errorNo) { - this.errorNo = errorNo; - } - - public void setLineEntry(ILineEntry lineEntry) { - this.lineEntry = lineEntry; - } - - public boolean isValid() { - if (null == lineEntry - || errorNo != AnalyzerConstants.SOURCELINE_NOERROR) { - return false; - } - return true; - } - - public String getFilePath() { - String filePath = lineEntry.getFilePath().toString(); - try { - return new String(stringToBytesASCII(filePath), "UTF-8"); //$NON-NLS-1$ - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - return filePath; - } - } - - public int getLineNumber() { - return lineEntry.getLineNumber(); - } - } - - public static byte[] stringToBytesASCII(String str) { - char[] buffer = str.toCharArray(); - byte[] b = new byte[buffer.length]; - - for (int i = 0; i < b.length; i++) { - b[i] = (byte) buffer[i]; - } - return b; - } - - public static IEDCSymbolReader getSymbolReader(IPath path) { - IEDCSymbolReader reader = null; - WeakReference cacheEntry = readerCache.get(path); - - if (cacheEntry != null) { - reader = cacheEntry.get(); - } - - if (reader != null) { - if (reader.getSymbolFile() != null - && reader.getSymbolFile().toFile().exists() - && reader.getSymbolFile().toFile().lastModified() == reader - .getModificationDate()) { - return reader; - } - readerCache.remove(path); - } - - IExecutableSymbolicsReaderFactory provider = new ElfExecutableSymbolicsReaderFactory(); - IExecutableSymbolicsReader exeReader = provider - .createExecutableSymbolicsReader(path); - if (exeReader != null) { - IDebugInfoProviderFactory providerProvider = new DwarfDebugInfoProviderFactory(); - IDebugInfoProvider dprovider = providerProvider - .createDebugInfoProvider(path, exeReader); - if (dprovider != null) { - if (!exeReader.getSymbolFile().equals( - dprovider.getExecutableSymbolicsReader() - .getSymbolFile())) { - exeReader.dispose(); - exeReader = dprovider.getExecutableSymbolicsReader(); - } - } - reader = new EDCSymbolReader(exeReader, dprovider); - } - - if (reader != null) { - readerCache.put(path, new WeakReference(reader)); - } - - return reader; - } - - public static SourceLine addr2line(String strPath, String strAddr, - boolean isPieBuild, String strBaseAddr) { - Addr32 addr, baseAddr, offsetAddr; - IEDCSymbolReader reader; - SourceLine srcline = new SourceLine(); - - if (strPath == null || strPath.isEmpty()) { - srcline.setError(AnalyzerConstants.SOURCELINE_NULL_PATH); - return srcline; - } - - if (strAddr == null || strAddr.isEmpty()) { - srcline.setError(AnalyzerConstants.SOURCELINE_NULL_ADDRESS); - return srcline; - } - - IPath path = new Path(strPath); - if (path.toFile().exists() == false) { - srcline.setError(AnalyzerConstants.SOURCELINE_FILE_NOT_FOUND); - return srcline; - } - - try { - addr = new Addr32(strAddr); - } catch (Exception e) { - srcline.setError(AnalyzerConstants.SOURCELINE_BAD_ADDRESS); - return srcline; - } - - if (isPieBuild) { - if (strBaseAddr == null || strBaseAddr.isEmpty()) { - srcline.setError(AnalyzerConstants.SOURCELINE_NULL_ADDRESS); - return srcline; - } - - try { - baseAddr = new Addr32(strBaseAddr); - } catch (Exception e) { - srcline.setError(AnalyzerConstants.SOURCELINE_BAD_ADDRESS); - return srcline; - } - offsetAddr = new Addr32(baseAddr.distanceTo(addr).longValue()); - addr = offsetAddr; - } - - try { - reader = getSymbolReader(path); - } catch (NoClassDefFoundError e) { - srcline.setError(AnalyzerConstants.SOURCELINE_NO_SYMBOL_INFORMATION); - return srcline; - } - - if (reader != null) { - IModuleLineEntryProvider moduleLineEntryProvider = reader - .getModuleScope().getModuleLineEntryProvider(); - if (moduleLineEntryProvider != null) { - ILineEntry lineEntry = moduleLineEntryProvider - .getLineEntryAtAddress(addr); - if (lineEntry != null) { - if (lineEntry.getLowAddress().compareTo(addr) == 0) { - ILineEntry prevEntry = moduleLineEntryProvider - .getPreviousLineEntry(lineEntry, false); - if (prevEntry != null) { - srcline.setLineEntry(prevEntry); - return srcline; - } else { - srcline.setLineEntry(lineEntry); - return srcline; - } - } else { - srcline.setLineEntry(lineEntry); - return srcline; - } - } else { - srcline.setError(AnalyzerConstants.SOURCELINE_NO_MATCHING_LINE); - return srcline; - } - } - } - // never goes here - srcline.setError(AnalyzerConstants.SOURCELINE_UNKNOWN_ERROR); - return srcline; - } - - public static String addr2func(String strBinPath, String strAddr, - boolean isPieBuild, String strBaseAddr) { - Addr32 addr, baseAddr, offsetAddr; - - if (strBinPath == null || strBinPath.isEmpty()) { - // FIXME : temp code - return AnalyzerLabels.SYMBOL_MANAGER_UNKNOWN; - } else { - if (!new File(strBinPath).exists()) { - return AnalyzerLabels.SYMBOL_MANAGER_UNKNOWN; - } - } - - if (strAddr == null || strAddr.isEmpty()) { - // FIXME - return AnalyzerLabels.SYMBOL_MANAGER_UNKNOWN; - } - - if (isPieBuild) { - if (strBaseAddr == null || strBaseAddr.isEmpty()) { - // FIXME - return AnalyzerLabels.SYMBOL_MANAGER_UNKNOWN; - } - } - - addr = new Addr32(strAddr); - if (isPieBuild) { - baseAddr = new Addr32(strBaseAddr); - offsetAddr = new Addr32(baseAddr.distanceTo(addr).longValue()); - addr = offsetAddr; - } - - Elf elf = null; - WeakReference elfEntry = elfCache.get(strBinPath); - - if (elfEntry != null) { - elf = elfEntry.get(); - } - - if (elf == null) { - try { - elf = new Elf(strBinPath); - elf.loadSymbols(); - elfCache.put(strBinPath, new WeakReference(elf)); - } catch (IOException e) { - // FIXME - e.printStackTrace(); - return null; - } - } - - return elf.getSymbol(addr).toString(); - } - - public static String demanglingFunctionName(String mangled) { - IUnmangler unmangler = null; - String demangled = null; - unmangler = new UnmanglerEABI(); - try { - demangled = unmangler.unmangle(mangled); - } catch (UnmanglingException e) { - e.printStackTrace(); - demangled = mangled; - // for debug log - System.out.println("Mangled name :" + mangled); - } - return demangled; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/communicator/DACommunicator.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/communicator/DACommunicator.java deleted file mode 100644 index 0b7e1cd..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/communicator/DACommunicator.java +++ /dev/null @@ -1,854 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.communicator; - -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.net.Socket; -import java.net.SocketTimeoutException; -import java.net.UnknownHostException; -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.widgets.Display; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.AnalyzerPaths; -import org.tizen.dynamicanalyzer.common.AnalyzerShellCommands; -import org.tizen.dynamicanalyzer.common.CommonConstants; -import org.tizen.dynamicanalyzer.nl.AnalyzerLabels; -import org.tizen.dynamicanalyzer.project.AppDesktopInfo; -import org.tizen.dynamicanalyzer.services.RecordStateSourceProvider; -import org.tizen.dynamicanalyzer.ui.info.range.StopProcessManager; -import org.tizen.dynamicanalyzer.ui.toolbar.StopLogProcessor; -import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea; -import org.tizen.dynamicanalyzer.uirecorder.UIRecorderTool; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; -import org.tizen.sdblib.IDevice; -import org.tizen.sdblib.IShellOutputReceiver; -import org.tizen.sdblib.MultiLineReceiver; -import org.tizen.sdblib.NullOutputReceiver; -import org.tizen.sdblib.SdbCommandRejectedException; -import org.tizen.sdblib.SdbShellProcess; -import org.tizen.sdblib.ShellCommandUnresponsiveException; -import org.tizen.sdblib.SmartDevelopmentBridge; -import org.tizen.sdblib.SmartDevelopmentBridge.IDeviceChangeListener; -import org.tizen.sdblib.SyncService; -import org.tizen.sdblib.SyncService.ISyncProgressMonitor; -import org.tizen.sdblib.SyncService.SyncResult; -import org.tizen.sdblib.TimeoutException; - -public class DACommunicator { - /* Port */ - public static final int LOCAL_PORT = 8000; - public static final int REMOTE_PORT = 8001; - - private static Socket sock = null; - private static SmartDevelopmentBridge sdbBridge = null; - private static AppDesktopInfo selectedApp = null; - private static IDevice currentDevice = null; - private static BufferedWriter writer = null; - private static BufferedReader reader = null; - private static boolean isRunning = false; - private static List devs = null; - private static List appDesktopList = null; - private static List appDesktopString = null; - private static boolean isDeviceConnected = false; - - public static void init() { - SmartDevelopmentBridge.init(); - setNewBridge(); - sock = null; - selectedApp = null; - currentDevice = null; - writer = null; - reader = null; - isRunning = false; - devs = null; - isArch = false; - appDesktopList = null; - pidOfDaemon = null; - existVersion = false; - correctVersion = false; - } - - public static List getDevs() { - if (null == devs) { - devs = new ArrayList(); - } - return devs; - } - - public static boolean isDeviceConnected() { - return isDeviceConnected; - } - - public static void setDevs(List devs) { - if (null != devs && !devs.isEmpty()) { - isDeviceConnected = true; - } else { - isDeviceConnected = false; - } - DACommunicator.devs = devs; - } - - public static IDevice getSelectedDevice() { - return currentDevice; - } - - public static void setSelectedDevice(IDevice device) { - currentDevice = device; - } - - public static AppDesktopInfo getSelectedApp() { - return selectedApp; - } - - public static void setSelectedApp(AppDesktopInfo app) { - selectedApp = app; - } - - public static Socket getSocket() { - return sock; - } - - public static void setSocket(Socket socket) { - sock = socket; - } - - public static SmartDevelopmentBridge getBridge() { - return sdbBridge; - } - - public static void setBridge(SmartDevelopmentBridge bridge) { - sdbBridge = bridge; - } - - public static void setNewBridge() { - if (null != AnalyzerPaths.SDB_PATH) { - try { - sdbBridge = SmartDevelopmentBridge.createBridge( - AnalyzerPaths.SDB_PATH, false); - } catch (Exception e) { - e.printStackTrace(); - } - } - } - - public static boolean isRunning() { - return isRunning; - } - - public static void setRunning(boolean run) { - isRunning = run; - } - - protected static void reloadDevices() { - IDevice[] devices = null; - getDevs().clear(); - isDeviceConnected = false; - if (null != sdbBridge) { - devices = sdbBridge.getDevices(); - int size = devices.length; - if (size > 0) { - isDeviceConnected = true; - for (int i = 0; i < size; i++) { - devs.add(devices[i]); - } - } - } - } - - private static boolean isArch = false; - - private static MultiLineReceiver archReceiver = new MultiLineReceiver() { - @Override - public void processNewLines(String[] lines) { - if (lines[0].contains(CommonConstants.ARM_ARCH)) { - isArch = true; - } - } - }; - - public static boolean isCurrentDeviceArmArch() { - execShellCommand(AnalyzerShellCommands.CMD_IS_ARM_ARCH, archReceiver); - - return isArch; - } - - protected static List getDevicesNameList() { - List deviceList = null; - if (null != sdbBridge) { - List devicesList = getDevs(); - deviceList = new ArrayList(); - for (IDevice device : devicesList) { - deviceList.add(device.getSerialNumber()); - } - } - - return deviceList; - } - - private static MultiLineReceiver appListReceiver = new MultiLineReceiver() { - @Override - public void processNewLines(String[] appLines) { - for (int i = 0; i < appLines.length; i++) { - appDesktopString.add(appLines[i]); - } - } - }; - - private static AppDesktopInfo findDesktopInfoByDesktopName( - String desktopName) { - appDesktopList = getAppDesktopList(); - int size = appDesktopList.size(); - for (int i = 0; i < size; i++) { - if (appDesktopList.get(i).getDesktopName().equals(desktopName)) { - return appDesktopList.get(i); - } - } - return null; - } - - public static List getAppListFromTarget() { - getAppDesktopList().clear(); - getAppDesktopString().clear(); - - execShellCommand(AnalyzerShellCommands.CMD_APPLICATION_LIST, - appListReceiver); - - int size = appDesktopString.size(); - for (int i = 0; i < size; i++) { - String line = appDesktopString.get(i); - String[] splitLine = line.split(":"); //$NON-NLS-1$ - String desktopName = splitLine[0]; - - AppDesktopInfo desktopInfo = findDesktopInfoByDesktopName(desktopName); - if (null == desktopInfo) { - desktopInfo = new AppDesktopInfo(); - desktopInfo.setDesktopName(desktopName); - String[] tempString = desktopName.split("\\."); - String[] tempString2 = tempString[0].split("\\/"); - String appid = new String(tempString2[tempString2.length - 1]); - desktopInfo.setAppId(appid); - appDesktopList.add(desktopInfo); - } - - String[] splitData = splitLine[1].split("="); //$NON-NLS-1$ - String strData = splitData[0]; - - if (strData.toLowerCase().equals("name")) { //$NON-NLS-1$ - desktopInfo.setName(new String(splitData[1])); - } else if (strData.toLowerCase().equals("exec")) { //$NON-NLS-1$ - desktopInfo.setExecPath(new String(splitData[1])); - } - } - - // verification - size = appDesktopList.size(); - for (int i = 0; i < size; i++) { - AppDesktopInfo appInfo = appDesktopList.get(i); - if (null == appInfo.getExecPath() - || appInfo.getExecPath().isEmpty()) { - appDesktopList.remove(i); - } - - else if (null == appInfo.getName() || appInfo.getName().isEmpty()) { - String execPath = appInfo.getExecPath(); - String[] splitPath = execPath.split("\\/"); - String name = new String(splitPath[splitPath.length - 1]); - appInfo.setName(name); - } - } - - // /*** dont delete for debug ***/ - // for (int i = 0; i < appDesktopList.size(); i++) { - // AppDesktopInfo info = appDesktopList.get(i); - // System.out.println("name " + info.getName() + " path : " - // + info.getExecPath()); - // } - - return appDesktopList; - } - - private static List getAppDesktopList() { - if (null == appDesktopList) { - appDesktopList = new ArrayList(); - } - return appDesktopList; - } - - private static List getAppDesktopString() { - if (null == appDesktopString) { - appDesktopString = new ArrayList(); - } - return appDesktopString; - } - - public static AppDesktopInfo getAppDesktopInfoByName(String name) { - List appInfoList = getAppDesktopList(); - int size = appInfoList.size(); - for (int i = 0; i < size; i++) { - AppDesktopInfo ai = appInfoList.get(i); - if (ai.getName().equals(name)) { - return ai; - } - } - return null; - } - - public static AppDesktopInfo getAppDesktopInfoByAppId(String id) { - List appInfoList = getAppDesktopList(); - int size = appInfoList.size(); - for (int i = 0; i < size; i++) { - AppDesktopInfo ai = appInfoList.get(i); - if (ai.getAppId().equals(id)) { - return ai; - } - } - return null; - } - - public static Socket createSocket(int port) { - try { - sock = new Socket(CommonConstants.LOCAL_HOST, port); - if (null == sock) { - System.out.println("failed to create a socket"); //$NON-NLS-1$ - return null; - } - - sock.setSoTimeout(AnalyzerConstants.SOCKET_TIMEOUT); - sock.setReuseAddress(true); - sock.setTcpNoDelay(true); - - reader = new BufferedReader(new InputStreamReader( - sock.getInputStream())); - writer = new BufferedWriter(new OutputStreamWriter( - sock.getOutputStream())); - - new Thread(null, new ReceiveCommunicator(), - AnalyzerConstants.COMMUNICATOR_RECEIVE_THREAD).start(); - - } catch (SocketTimeoutException e) { - System.out.println("socket timeout."); //$NON-NLS-1$ - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - - return sock; - } - - public static void closeSocket() { - try { - if (null != reader) { - reader.close(); - reader = null; - } - if (null != writer) { - writer.close(); - writer = null; - } - if (null != sock) { - sock.close(); - sock = null; - } - } catch (IOException e) { - e.printStackTrace(); - } - } - - public static BufferedReader getSockBufferedReader() { - return reader; - } - - public static BufferedWriter getSockBufferedWriter() { - return writer; - } - - public static void foward(int local, int remote) { - if (null != currentDevice && currentDevice.isOnline()) { - try { - currentDevice.createForward(local, remote); - Thread.sleep(AnalyzerConstants.SOCKET_FORWARD_INTERVAL); - } catch (TimeoutException e) { - e.printStackTrace(); - } catch (SdbCommandRejectedException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - public static void unfoward(int local, int remote) { - if (null != currentDevice && currentDevice.isOnline()) { - try { - currentDevice.removeForward(local, remote); - Thread.sleep(AnalyzerConstants.SOCKET_FORWARD_INTERVAL); - } catch (TimeoutException e) { - e.printStackTrace(); - } catch (SdbCommandRejectedException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - private static String pidOfDaemon = null; - - private static MultiLineReceiver pidofDaemon = new MultiLineReceiver() { - @Override - public void processNewLines(String[] lines) { - if (0 != lines.length && !lines[0].isEmpty()) { - pidOfDaemon = lines[0]; - } - } - }; - - public static boolean isDaemonAlive() { - execShellCommand(AnalyzerShellCommands.CMD_PIDOF_DAEMON, pidofDaemon); - if (null != pidOfDaemon) { - return true; - } - return false; - } - - public static void killDaemon() { - if (null != pidOfDaemon) { - System.out.println("kill daemon : " + pidOfDaemon); //$NON-NLS-1$ - execShellCommand(AnalyzerShellCommands.CMD_KILL_DAEMON - + CommonConstants.SPACE + pidOfDaemon); - } - } - - public static void execShellCommand(String command) { - execShellCommand(command, new NullOutputReceiver()); - } - - public static void execShellCommand(String command, - IShellOutputReceiver receiver) { - if (null != currentDevice && currentDevice.isOnline()) { - try { - currentDevice.executeShellCommand(command, receiver); - } catch (TimeoutException e) { - e.printStackTrace(); - } catch (SdbCommandRejectedException e) { - e.printStackTrace(); - } catch (ShellCommandUnresponsiveException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - } - } - - public static SdbShellProcess execCommand(String command) { - if (null != currentDevice && currentDevice.isOnline()) { - try { - return currentDevice.executeShellCommand(command); - } catch (IOException e) { - e.printStackTrace(); - } - } - - return null; - } - - public static void sendMessage(String message) { - try { - if (null != sock) { - writer.write(message); - // writer.newLine(); - writer.flush(); - } - - } catch (IOException e) { - e.printStackTrace(); - } - } - - public static SyncResult push(String local, String remote) { - return push(local, remote, SyncService.getNullProgressMonitor()); - } - - public static SyncResult push(String local, String remote, - ISyncProgressMonitor monitor) { - SyncResult result = null; - if (null != currentDevice && currentDevice.isOnline()) { - try { - SyncService service = currentDevice.getSyncService(); - if (null != service) { - result = service.pushFile(local, remote, monitor); - } - } catch (TimeoutException e) { - e.printStackTrace(); - } catch (SdbCommandRejectedException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - } - - return result; - } - - public static SyncResult pull(String remote, String local) { - return pull(remote, local, SyncService.getNullProgressMonitor()); - } - - public static SyncResult pull(String remote, String local, - ISyncProgressMonitor monitor) { - SyncResult result = null; - if (null != currentDevice && currentDevice.isOnline()) { - try { - SyncService service = currentDevice.getSyncService(); - if (null != service) { - result = service.pullFile(remote, local, monitor); - } - } catch (TimeoutException e) { - e.printStackTrace(); - } catch (SdbCommandRejectedException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - } - - return result; - } - - public static void remove(String path) { - if (null != currentDevice && currentDevice.isOnline()) { - try { - currentDevice.executeShellCommand( - AnalyzerShellCommands.CMD_REMOVE - + CommonConstants.SPACE + path, - new NullOutputReceiver()); - } catch (TimeoutException e) { - e.printStackTrace(); - } catch (SdbCommandRejectedException e) { - e.printStackTrace(); - } catch (ShellCommandUnresponsiveException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - } - } - - public static boolean isTargetEmulator() { - IDevice device = getSelectedDevice(); - if (device != null) { - if (device.getSerialNumber().contains(CommonConstants.EMULATOR)) { - return true; - } - } - return false; - } - - public static boolean uploadSo() { - String target = AnalyzerPaths.TARGET_PATH; - - if (isCurrentDeviceArmArch()) { - target += CommonConstants.ARM_ARCH; - } else { - target += CommonConstants.X86_ARCH; - } - String target_osp = target + File.separator - + AnalyzerConstants.PROBE_LIB_OSP; - target += File.separator + AnalyzerConstants.PROBE_LIB_TIZEN; - - SyncResult result = push(target, AnalyzerPaths.DA_REMOTE_PROBE_PATH - + AnalyzerConstants.PROBE_LIB_TIZEN); - if (null == result || SyncService.RESULT_OK != result.getCode()) { - System.out - .println("upload " + AnalyzerConstants.PROBE_LIB_TIZEN + " is failed : " + target); //$NON-NLS-1$ - System.out.println("Error : " + result.getMessage()); //$NON-NLS-1$ - return false; - } - - result = push(target_osp, AnalyzerPaths.DA_REMOTE_PROBE_PATH - + AnalyzerConstants.PROBE_LIB_OSP); - if (null == result || SyncService.RESULT_OK != result.getCode()) { - System.out - .println("upload " + AnalyzerConstants.PROBE_LIB_OSP + " is failed : " + target_osp); //$NON-NLS-1$ - System.out.println("Error : " + result.getMessage()); //$NON-NLS-1$ - return false; - } - return true; - } - - public static boolean uploadVersion() { - SyncResult result = push(AnalyzerPaths.DYNAMIC_ANALYZER_INSTALL_PATH - + File.separator + File.separator - + AnalyzerConstants.VERSION_NAME, AnalyzerPaths.DA_REMOTE_PATH - + AnalyzerConstants.VERSION_NAME); - if (null != result && SyncService.RESULT_OK == result.getCode()) { - return true; - } - System.out.println("version file upload is failed : "); //$NON-NLS-1$ - System.out.println("Error : " + result.getMessage()); //$NON-NLS-1$ - return false; - } - - public static boolean uploadDaemon() { - String target = AnalyzerPaths.TARGET_PATH; - - if (DACommunicator.isCurrentDeviceArmArch()) { - target += CommonConstants.ARM_ARCH; - } else { - target += CommonConstants.X86_ARCH; - } - target += File.separator + AnalyzerConstants.DA_DAEMON_NAME; - - SyncResult result = push(target, - AnalyzerPaths.DA_REMOTE_DAEMON_BINARY_PATH); - if (null != result && SyncService.RESULT_OK == result.getCode()) { - DACommunicator - .execShellCommand(AnalyzerShellCommands.CMD_DAEMON_EXE_PERMISSION); - return true; - } - System.out.println("upload Daemon is failed : " + target); //$NON-NLS-1$ - System.out.println("Error : " + result.getMessage()); //$NON-NLS-1$ - return false; - } - - public static boolean uploadReadelf() { - String target = AnalyzerPaths.TARGET_PATH; - - if (DACommunicator.isCurrentDeviceArmArch()) { - target += CommonConstants.ARM_ARCH; - } else { - target += CommonConstants.X86_ARCH; - } - target += File.separator + AnalyzerConstants.READELF_BIN; - - SyncResult result = push(target, AnalyzerPaths.DA_REMOTE_PATH - + AnalyzerConstants.READELF_BIN); - if (null != result && SyncService.RESULT_OK == result.getCode()) { - DACommunicator - .execShellCommand(AnalyzerShellCommands.CMD_READELF_PERMISSION); - return true; - } - System.out.println("upload readelf is failed : " + target); //$NON-NLS-1$ - System.out.println("Error : " + result.getMessage()); //$NON-NLS-1$ - return false; - } - - public static boolean upload() { - if (uploadReadelf() && uploadSo() && uploadDaemon() && uploadVersion()) { - return true; - } - return false; - } - - private static boolean existVersion = false; - - private static MultiLineReceiver lsVersion = new MultiLineReceiver() { - @Override - public void processNewLines(String[] lines) { - if (0 != lines.length && !lines[0].isEmpty() - && !lines[0].startsWith(AnalyzerShellCommands.CMD_NO_LIST)) { - existVersion = true; - } - } - }; - - private static boolean isVersionExist() { - execShellCommand(AnalyzerShellCommands.CMD_LS_VERSION, lsVersion); - return existVersion; - } - - private static String getDAVersion() { - File version = new File(AnalyzerPaths.DYNAMIC_ANALYZER_INSTALL_PATH - + File.separator + AnalyzerConstants.VERSION_NAME); - if (version.exists()) { - BufferedReader br; - try { - br = new BufferedReader(new FileReader(version)); - return br.readLine(); - } catch (FileNotFoundException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - } - return null; - } - - private static boolean correctVersion = false; - - private static MultiLineReceiver catVersion = new MultiLineReceiver() { - @Override - public void processNewLines(String[] lines) { - if (0 != lines.length && !lines[0].isEmpty() - && !lines[0].startsWith(AnalyzerShellCommands.CMD_NO_LIST)) { - - String daVersion = getDAVersion(); - if (null != daVersion && daVersion.equals(lines[0])) { - correctVersion = true; - return; - } - } - } - }; - - private static boolean isCorrectVersion() { - execShellCommand(AnalyzerShellCommands.CMD_CAT_VERSION, catVersion); - return correctVersion; - } - - public static boolean needUpdateVersion() { - if (!isVersionExist() || !isCorrectVersion()) { - return true; - } - return false; - } - - public static void addDeviceListener() { - SmartDevelopmentBridge.addDeviceChangeListener(deviceChanged); - } - - public static void removeDeviceListener() { - SmartDevelopmentBridge.removeDeviceChangeListener(deviceChanged); - } - - private static IDeviceChangeListener deviceChanged = new IDeviceChangeListener() { - @Override - public void deviceDisconnected(IDevice device) { - checkDevices(); - setSelectedDevice(null); - if (isRunning()) { - System.out.println("Disconnected while DA is running."); //$NON-NLS-1$ - UIRecorderTool.getInstance().stop(); - - AnalyzerUtil - .setRecordState(RecordStateSourceProvider.RECORD_READY); - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - ToolbarArea.getInstance().setStartButtonEnablement( - false); - ToolbarArea.getInstance().setToolbarEnablement(false); - ToolbarArea.getInstance().stopTrace(); - } - }); - - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - StopProcessManager - .getInstance() - .stopProcessStart( - AnalyzerLabels.STOP_PROCESS_DLG_DEVICE_DISCONNECTED); - } - }); - System.out - .println("stop log process thread call by device disconnected");//$NON-NLS-1$ - StopLogProcessor.runStopLogProcessThread(); - } else { - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - ToolbarArea.getInstance().setStartButtonEnablement( - false); - } - }); - } - } - - @Override - public void deviceConnected(IDevice device) { - - } - - @Override - public void deviceChanged(IDevice device, int changeMask) { - if (1 == changeMask) { - checkDevices(); - if (null != getSelectedDevice() && null != getSelectedApp()) { - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - ToolbarArea.getInstance().setStartButtonEnablement( - true); - } - }); - } - } - } - }; - - public static void checkDevices() { - reloadDevices(); - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - List deviceSerials = new ArrayList(); - String selDev = ToolbarArea.getInstance().getSelectedDevice(); - int size = getDevs().size(); - int selIndex = 0; - for (int i = 0; i < size; i++) { - String serial = devs.get(i).getSerialNumber(); - deviceSerials.add(serial); - if (null != selDev && selDev.equals(serial)) { - selIndex = i; - } - } - if (!devs.isEmpty()) { - setSelectedDevice(devs.get(selIndex)); - } - ToolbarArea.getInstance().setDeviceComboItems(deviceSerials); - } - }); - } - - public static void setSelectedDeviceBySerial(String serial) { - if (null == serial || serial.isEmpty()) { - setSelectedDevice(null); - } - int size = getDevs().size(); - for (int i = 0; i < size; i++) { - if (serial.equals(devs.get(i).getSerialNumber())) { - setSelectedDevice(devs.get(i)); - } - } - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/communicator/DaemonExecution.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/communicator/DaemonExecution.java deleted file mode 100644 index f5d63fb..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/communicator/DaemonExecution.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.communicator; - -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.AnalyzerPaths; -import org.tizen.dynamicanalyzer.common.AnalyzerShellCommands; -import org.tizen.sdblib.MultiLineReceiver; - -public class DaemonExecution { - - private static boolean isDaemonExist = false; - - private static DaemonExecution execution = new DaemonExecution(); - - public static DaemonExecution getInstance() { - return execution; - } - - private boolean listen = false; - - private MultiLineReceiver netDaemonReceiver = new MultiLineReceiver() { - @Override - public void processNewLines(String[] lines) { - for (String line : lines) { - if (line.contains(AnalyzerConstants.DA_DAEMON_NAME)) { - listen = true; - } - } - } - }; - - private boolean isDaemonListen() { - DACommunicator.execShellCommand(AnalyzerShellCommands.CMD_IS_DAEMON_LISTEN, - netDaemonReceiver); - - return listen; - } - - public boolean runDaemon() { - DACommunicator.execCommand(AnalyzerPaths.DA_REMOTE_DAEMON_BINARY_PATH); - int i = 1; - - while (!isDaemonListen()) { - if (i > AnalyzerConstants.DAEMON_LISTEN_TRY) { - return false; - } - System.out.println("waiting for daemon until listening. try # : " //$NON-NLS-1$ - + i); - try { - Thread.sleep(100); - } catch (InterruptedException e) { - e.printStackTrace(); - } - i++; - } - return true; - } - - private MultiLineReceiver isDaemonReceiver = new MultiLineReceiver() { - @Override - public void processNewLines(String[] lines) { - if (0 == lines.length - || lines[0].startsWith(AnalyzerShellCommands.CMD_NO_LIST)) { - return; - } - - for (String line : lines) { - if (line.contains(AnalyzerPaths.DA_REMOTE_DAEMON_BINARY_PATH)) { - isDaemonExist = true; - break; - } - } - } - }; - - public boolean isDaemonExist() { - DACommunicator.execShellCommand(AnalyzerShellCommands.CMD_IS_DAEMON_EXIST, - isDaemonReceiver); - - return isDaemonExist; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/communicator/IDECommunicator.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/communicator/IDECommunicator.java deleted file mode 100644 index 7e41688..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/communicator/IDECommunicator.java +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Hyunjong Park - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.communicator; - -import java.io.BufferedWriter; -import java.io.DataInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStreamWriter; -import java.io.RandomAccessFile; -import java.net.Socket; -import java.net.UnknownHostException; -import java.nio.channels.FileChannel; -import java.nio.channels.FileLock; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.AnalyzerPaths; -import org.tizen.dynamicanalyzer.common.CommonConstants; -import org.tizen.dynamicanalyzer.common.DASingletonFocusManager; -import org.tizen.dynamicanalyzer.nl.AnalyzerLabels; -import org.tizen.dynamicanalyzer.project.AppDesktopInfo; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.services.RecordStateSourceProvider; -import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea; -import org.tizen.dynamicanalyzer.ui.widgets.DADialog; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; - -public class IDECommunicator implements Runnable { - private final int MAXBUFSIZE = 1024; - - private final String IDE_DA_COMMUNICATION_TYPE_1 = "STATUS";//$NON-NLS-1$ - private final String IDE_DA_COMMUNICATION_TYPE_2 = "RUN";//$NON-NLS-1$ - private final static String IDE_DA_COMMUNICATION_TYPE_3 = "SOURCE";//$NON-NLS-1$ - private final String IDE_DA_COMMUNICATION_TYPE_1_RECORD = "record";//$NON-NLS-1$ - private final String IDE_DA_COMMUNICATION_TYPE_1_STOP = "stop";//$NON-NLS-1$ - private static Socket socket = null; - private int port = 0; - private static BufferedWriter writer = null; - private static Thread instance; - - public void run() { - while (true) { - try { - resetSocket(); - // Waiting Start IDE - System.out.println(" Waiting Start IDE");//$NON-NLS-1$ - while (true) { - File file = null; - FileLock fileLock = null; - FileChannel fchannel = null; - try { - file = new File(AnalyzerPaths.IDE_ACTIVE_PORT_PATH); - fchannel = new RandomAccessFile(file, "rw").getChannel();//$NON-NLS-1$ - fileLock = fchannel.tryLock(); - if (fileLock == null) { // Active IDE - break; - } else { - fileLock.release(); - Thread.sleep(1000); - } - } catch (Exception e) { - continue; - } - } - - // Read IDE Port - if (readActiveIdePort() != true) { - System.out.println("Failed Read Active IDE Port");//$NON-NLS-1$ - continue; - } - - // Connect IDE Socket - if (setIDESocket() != true) { - System.out.println("Failed Connect IDE Socket");//$NON-NLS-1$ - continue; - } - System.out.println("Connect IDE");//$NON-NLS-1$ - int readSize = 0; - byte receiveBuffer[] = new byte[MAXBUFSIZE]; - InputStream in = null; - while (true) { - try { - in = getSocket().getInputStream(); - System.out.print("IDE recvMessage Wait\n");//$NON-NLS-1$ - readSize = in.read(receiveBuffer); - if (readSize > 0) { - parsingReceiveMessage(new String(receiveBuffer)); - } else { - break; - } - } catch (IOException e) { - e.printStackTrace(); - break; - } - } - Thread.sleep(100); - System.out.println("Disconnect IDE");//$NON-NLS-1$ - } catch (InterruptedException e) { - break; - } - } - } - - public static void startIDECommunicatorThread() { - if (null == instance || !instance.isAlive()) { - instance = new Thread(null, new IDECommunicator(), - AnalyzerConstants.IDE_COMMUNICATOR_THREAD); - instance.start(); - } - } - - public static void stopIDEcommunicatorThread() { - if (null != instance && instance.isAlive()) { - instance.interrupt(); - } - } - - private Socket getSocket() { - return socket; - } - - private void resetSocket() { - socket = null; - writer = null; - } - - public static boolean isConnected() { - if (socket == null) { - return false; - } - return true; - } - - public static void sendCodeInfoToIDE(final String path, final String line) { - sendMessageToIDE(sendMessageString(IDE_DA_COMMUNICATION_TYPE_3, path, - line)); - } - - public static boolean sendMessageToIDE(final String message) { - - System.out.println("sendMessageOpenIDE " + message); - try { - if (socket != null) { - writer = new BufferedWriter(new OutputStreamWriter( - socket.getOutputStream())); - writer.write(message); - writer.flush(); - } - } catch (IOException e) { - e.printStackTrace(); - return false; - } - return true; - } - - // Management Receive Message - private void parsingReceiveMessage(String msg) { - String[] strMsg = msg.split(AnalyzerConstants.DATA_PARSING_TOKEN); - if (strMsg[0].equals(IDE_DA_COMMUNICATION_TYPE_1)) { - sendDAStatus(); - } else if (strMsg[0].equals(IDE_DA_COMMUNICATION_TYPE_2)) { - autoStartApplication(strMsg); - } else { - System.out.println(" wrong receive message ");//$NON-NLS-1$ - } - } - - // Receive Message DA Status , Send DA Status - private void sendDAStatus() { - String state = AnalyzerUtil.getRecordState(); - // da is running?? - if (state.equals(RecordStateSourceProvider.RECORD_RECORDING)) { - sendMessageToIDE(sendMessageString(IDE_DA_COMMUNICATION_TYPE_1, - IDE_DA_COMMUNICATION_TYPE_1_RECORD, "")); - DASingletonFocusManager.setFocusDA(); - Display.getDefault().syncExec(new Runnable() { - public void run() { - popupMessage(AnalyzerLabels.RE_TRACE_FORM_IDE); - } - }); - - } else { // DA Stop Status - sendMessageToIDE(sendMessageString(IDE_DA_COMMUNICATION_TYPE_1, - IDE_DA_COMMUNICATION_TYPE_1_STOP, "")); - } - } - - private static String sendMessageString(String first, String second, - String third) { - - StringBuffer sendMsg = new StringBuffer(); - sendMsg.append(first).append(AnalyzerConstants.DATA_PARSING_TOKEN) - .append(second).append(AnalyzerConstants.DATA_PARSING_TOKEN) - .append(third); - return sendMsg.toString(); - - } - - // trace Application - private void autoStartApplication(String[] strMsg) { - - final String deviceName = new String(strMsg[1].trim()); - final String appid = new String(strMsg[2].trim()); - DACommunicator.getAppListFromTarget(); - AppDesktopInfo appInfo = DACommunicator.getAppDesktopInfoByAppId(appid); - final String appName = appInfo.getName(); - - Display.getDefault().syncExec(new Runnable() { - public void run() { - ToolbarArea.getInstance().setDeviceComboText(deviceName); - ToolbarArea.getInstance().setAppComboText(appName); - ToolbarArea.getInstance().startTraceButton(); - } - }); - DASingletonFocusManager.setFocusDA(); - } - - private void popupMessage(final String message) { - Shell shell = AnalyzerUtil.getWorkbenchWindow().getShell(); - DADialog warning = new DADialog(shell, SWT.NONE); - warning.setMessage(message); - warning.setIcon(ImageResources.DIALOG_WARNING_ICON); - warning.open(); - } - - private boolean readActiveIdePort() { - boolean bSuccess = true; - // read port from current_active_ide_port - try { - File logs = new File(AnalyzerPaths.IDE_ACTIVE_SAVE_PORT_PATH); - if (!logs.exists()) { - bSuccess = false; - } - FileInputStream fis = new FileInputStream( - AnalyzerPaths.IDE_ACTIVE_SAVE_PORT_PATH); - DataInputStream dis = new DataInputStream(fis); - try { - port = dis.readInt(); - } catch (IOException e) { - e.printStackTrace(); - bSuccess = false; - } - - } catch (FileNotFoundException e) { - e.printStackTrace(); - bSuccess = false; - } - return bSuccess; - } - - private boolean setIDESocket() { - try { - socket = new Socket(CommonConstants.LOCAL_HOST, port); - } catch (UnknownHostException e) { - e.printStackTrace(); - socket = null; - return false; - } catch (IOException e) { - e.printStackTrace(); - socket = null; - return false; - } - return true; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/communicator/ReceiveCommunicator.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/communicator/ReceiveCommunicator.java deleted file mode 100644 index 836d712..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/communicator/ReceiveCommunicator.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.communicator; - -import org.tizen.dynamicanalyzer.logparser.MessageProcess; - -public class ReceiveCommunicator implements Runnable { - - @Override - public void run() { - MessageProcess.getInstance().run( - ResourceCommunicator.getSockBufferedReader()); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/communicator/ResourceCommunicator.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/communicator/ResourceCommunicator.java deleted file mode 100644 index 8902b20..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/communicator/ResourceCommunicator.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.communicator; - -import java.util.ArrayList; -import java.util.List; - -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.CommonConstants; -import org.tizen.dynamicanalyzer.nl.ConfigureLabels; -import org.tizen.dynamicanalyzer.ui.toolbar.ConfigureManager; -import org.tizen.sdblib.IDevice; -import org.tizen.sdblib.SmartDevelopmentBridge; - -public class ResourceCommunicator extends DACommunicator { - - public static List getDevicesNameList() { - List deviceNames = null; - SmartDevelopmentBridge sdbBridge = getBridge(); - if (null != sdbBridge) { - List devicesList = getDevs(); - deviceNames = new ArrayList(); - for (IDevice device : devicesList) { - deviceNames.add(device.getSerialNumber()); - } - } - - return deviceNames; - } - - public static boolean connect() { - - if (isDaemonAlive()) { - killDaemon(); - } - - if (needUpdateVersion()) { - System.out.println("Update utils and libs..."); //$NON-NLS-1$ - if (!upload()) { - System.out.println("Failed to upload files..."); //$NON-NLS-1$ - return false; - } - } - - if (!DaemonExecution.getInstance().runDaemon()) { - System.out.println("Failed to start da_daemon"); //$NON-NLS-1$ - return false; - } - - foward(LOCAL_PORT, REMOTE_PORT); - - setRunning(true); - - if (null == createSocket(LOCAL_PORT)) { - System.out.println("socket creation failed."); //$NON-NLS-1$ - return false; - } - - return true; - } - - public static void sendStartMessage() { - int isArm = 0; - int isEmul = 0; - int res = 0; - - if (!isCurrentDeviceArmArch()) { - isArm = 1; - } - - IDevice device = getSelectedDevice(); - if (null != device - && device.getSerialNumber() - .startsWith(CommonConstants.EMULATOR)) { - isEmul = 1; - } - - String message = AnalyzerConstants.MSG_START - + CommonConstants.CMD_SPLIT - + (ResourceCommunicator.getSelectedApp().getExecPath().length() + 7) - + CommonConstants.CMD_SPLIT - + res - + isEmul - + isArm - + CommonConstants.CMD_SPLIT - + ConfigureManager.getInstance().getValueInt( - ConfigureLabels.SNAPSHOT) - + ConfigureManager.getInstance().getValueInt( - ConfigureLabels.INTERNALCALL) - + CommonConstants.CMD_SPLIT - + ResourceCommunicator.getSelectedApp().getExecPath(); - System.out.println("Send message :" + message); //$NON-NLS-1$ - sendMessage(message); - } - - public static void sendSnapshotMessage(int state) { - if (state != AnalyzerConstants.SNAPSHOT_ON) { - state = AnalyzerConstants.SNAPSHOT_OFF; - } - String message = AnalyzerConstants.MSG_SNAPSHOT - + CommonConstants.CMD_SPLIT + 1 + CommonConstants.CMD_SPLIT - + state; - System.out.println("Send message :" + message); //$NON-NLS-1$ - sendMessage(message); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/error/DAErrorCode.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/error/DAErrorCode.java deleted file mode 100644 index f344f52..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/error/DAErrorCode.java +++ /dev/null @@ -1,416 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.error; - -import org.tizen.dynamicanalyzer.nl.ErrorLabels; - -public enum DAErrorCode { - /** /usr/include/asm-generic/errno-base.h **/ - EPERM(1,ErrorLabels.EPERM), - ENOENT(2, ErrorLabels.ENOENT), - ESRCH(3,ErrorLabels.ESRCH), - EINTR(4,ErrorLabels.EINTR), - EIO(5,ErrorLabels.EIO), - ENXIO(6,ErrorLabels.ENXIO), - E2BIG(7,ErrorLabels.E2BIG), - ENOEXEC(8, ErrorLabels.ENOEXEC), - EBADF(9, ErrorLabels.EBADF), - ECHILD(10, ErrorLabels.ECHILD), - EAGAIN(11, ErrorLabels.EAGAIN), - ENOMEM(12, ErrorLabels.ENOMEM), - EACCES(13, ErrorLabels.EACCES), - EFAULT(14, ErrorLabels.EFAULT), - ENOTBLK(15, ErrorLabels.ENOTBLK), - EBUSY(16, ErrorLabels.EBUSY), - EEXIST(17, ErrorLabels.EEXIST), - EXDEV(18, ErrorLabels.EXDEV), - ENODEV(19, ErrorLabels.ENODEV), - ENOTDIR(20, ErrorLabels.ENOTDIR), - EISDIR(21, ErrorLabels.EISDIR), - EINVAL(22, ErrorLabels.EINVAL), - ENFILE(23, ErrorLabels.ENFILE), - EMFILE(24, ErrorLabels.EMFILE), - ENOTTY(25, ErrorLabels.ENOTTY), - ETXTBSY(26, ErrorLabels.ETXTBSY), - EFBIG(27, ErrorLabels.EFBIG), - ENOSPC(28, ErrorLabels.ENOSPC), - ESPIPE(29, ErrorLabels.ESPIPE), - EROFS(30, ErrorLabels.EROFS), - EMLINK(31, ErrorLabels.EMLINK), - EPIPE(32, ErrorLabels.EPIPE), - EDOM(33, ErrorLabels.EDOM), - ERANGE(34, ErrorLabels.ERANGE), - - /** /usr/include/asm-generic/errno.h **/ - EDEADLK(35, ErrorLabels.EDEADLK), - ENAMETOOLONG(36, ErrorLabels.ENAMETOOLONG), - ENOLCK(37, ErrorLabels.ENOLCK), - ENOSYS(38, ErrorLabels.ENOSYS), - ENOTEMPTY(39, ErrorLabels.ENOTEMPTY), - ELOOP(40, ErrorLabels.ELOOP), -// EWOULDBLOCK(EAGAIN, ErrorLabels.E), - ENOMSG(42, ErrorLabels.ENOMSG), - EIDRM(43, ErrorLabels.EIDRM), - ECHRNG(44, ErrorLabels.ECHRNG), - EL2NSYNC(45, ErrorLabels.EL2NSYNC), - EL3HLT(46, ErrorLabels.EL3HLT), - EL3RST(47, ErrorLabels.EL3RST), - ELNRNG(48, ErrorLabels.ELNRNG), - EUNATCH(49, ErrorLabels.EUNATCH), - ENOCSI(50, ErrorLabels.ENOCSI), - EL2HLT(51, ErrorLabels.EL2HLT), - EBADE(52, ErrorLabels.EBADE), - EBADR(53, ErrorLabels.EBADR), - EXFULL(54, ErrorLabels.EXFULL), - ENOANO(55, ErrorLabels.ENOANO), - EBADRQC(56, ErrorLabels.EBADRQC), - EBADSLT(57, ErrorLabels.EBADSLT), - -// #define EDEADLOCK EDEADLK ?? - - EBFONT(59, ErrorLabels.EBFONT), - ENOSTR(60, ErrorLabels.ENOSTR), - ENODATA(61, ErrorLabels.ENODATA), - ETIME(62, ErrorLabels.ETIME), - ENOSR(63, ErrorLabels.ENOSR), - ENONET(64, ErrorLabels.ENONET), - ENOPKG(65, ErrorLabels.ENOPKG), - EREMOTE(66, ErrorLabels.EREMOTE), - ENOLINK(67, ErrorLabels.ENOLINK), - EADV(68, ErrorLabels.EADV), - ESRMNT(69, ErrorLabels.ESRMNT), - ECOMM(70, ErrorLabels.ECOMM), - EPROTO(71, ErrorLabels.EPROTO), - EMULTIHOP(72, ErrorLabels.EMULTIHOP), - EDOTDOT(73, ErrorLabels.EDOTDOT), - EBADMSG(74, ErrorLabels.EBADMSG), - EOVERFLOW(75, ErrorLabels.EOVERFLOW), - ENOTUNIQ(76, ErrorLabels.ENOTUNIQ), - EBADFD(77, ErrorLabels.EBADFD), - EREMCHG(78, ErrorLabels.EREMCHG), - ELIBACC(79, ErrorLabels.ELIBACC), - ELIBBAD(80, ErrorLabels.ELIBBAD), - ELIBSCN(81, ErrorLabels.ELIBSCN), - ELIBMAX(82, ErrorLabels.ELIBMAX), - ELIBEXEC(83, ErrorLabels.ELIBEXEC), - EILSEQ(84, ErrorLabels.EILSEQ), - ERESTART(85, ErrorLabels.ERESTART), - ESTRPIPE(86, ErrorLabels.ESTRPIPE), - EUSERS(87, ErrorLabels.EUSERS), - ENOTSOCK(88, ErrorLabels.ENOTSOCK), - EDESTADDRREQ(89, ErrorLabels.EDESTADDRREQ), - EMSGSIZE(90, ErrorLabels.EMSGSIZE), - EPROTOTYPE(91, ErrorLabels.EPROTOTYPE), - ENOPROTOOPT(92, ErrorLabels.ENOPROTOOPT), - EPROTONOSUPPORT(93, ErrorLabels.EPROTONOSUPPORT), - ESOCKTNOSUPPORT(94, ErrorLabels.ESOCKTNOSUPPORT), - EOPNOTSUPP(95, ErrorLabels.EOPNOTSUPP), - EPFNOSUPPORT(96, ErrorLabels.EPFNOSUPPORT), - EAFNOSUPPORT(97, ErrorLabels.EAFNOSUPPORT), - EADDRINUSE(98, ErrorLabels.EADDRINUSE), - EADDRNOTAVAIL(99, ErrorLabels.EADDRNOTAVAIL), - ENETDOWN(100, ErrorLabels.ENETDOWN), - ENETUNREACH(101, ErrorLabels.ENETUNREACH), - ENETRESET(102, ErrorLabels.ENETRESET), - ECONNABORTED(103, ErrorLabels.ECONNABORTED), - ECONNRESET(104, ErrorLabels.ECONNRESET), - ENOBUFS(105, ErrorLabels.ENOBUFS), - EISCONN(106, ErrorLabels.EISCONN), - ENOTCONN(107, ErrorLabels.ENOTCONN), - ESHUTDOWN(108, ErrorLabels.ESHUTDOWN), - ETOOMANYREFS(109, ErrorLabels.ETOOMANYREFS), - ETIMEDOUT(110, ErrorLabels.ETIMEDOUT), - ECONNREFUSED(111, ErrorLabels.ECONNREFUSED), - EHOSTDOWN(112, ErrorLabels.EHOSTDOWN), - EHOSTUNREACH(113, ErrorLabels.EHOSTUNREACH), - EALREADY(114, ErrorLabels.EALREADY), - EINPROGRESS(115, ErrorLabels.EINPROGRESS), - ESTALE(116, ErrorLabels.ESTALE), - EUCLEAN(117, ErrorLabels.EUCLEAN), - ENOTNAM(118, ErrorLabels.ENOTNAM), - ENAVAIL(119, ErrorLabels.ENAVAIL), - EISNAM(120, ErrorLabels.EISNAM), - EREMOTEIO(121, ErrorLabels.EREMOTEIO), - EDQUOT(122, ErrorLabels.EDQUOT), - ENOMEDIUM(123, ErrorLabels.ENOMEDIUM), - EMEDIUMTYPE(124, ErrorLabels.EMEDIUMTYPE), - ECANCELED(125, ErrorLabels.ECANCELED), - ENOKEY(126, ErrorLabels.ENOKEY), - EKEYEXPIRED(127, ErrorLabels.EKEYEXPIRED), - EKEYREVOKED(128, ErrorLabels.EKEYREVOKED), - EKEYREJECTED(129, ErrorLabels.EKEYREJECTED), - - EOWNERDEAD(130, ErrorLabels.EOWNERDEAD), - ENOTRECOVERABLE(131, ErrorLabels.ENOTRECOVERABLE), - - - E_SUCCESS(SET_E_SEVERITY(0), ErrorLabels.E_SUCCESS), - E_FAILURE(SET_E_SEVERITY(1), ErrorLabels.E_FAILURE), - ERR_SRC_FRAMEWORK(getE_FAILURE() + SET_E_TYPE(1), ErrorLabels.ERR_SRC_FRAMEWORK), - ERR_SRC_USER(getE_FAILURE() + SET_E_TYPE(2), ErrorLabels.ERR_SRC_USER), - - /** --- A --- **/ - E_ADDRESS_CHANGED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1100), ErrorLabels.E_ADDRESS_CHANGED), - E_ALREADY_BOUND(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1101), ErrorLabels.E_ALREADY_BOUND), - E_ALREADY_CONNECTED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1102), ErrorLabels.E_ALREADY_CONNECTED), - E_ALREADY_OPENED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1103), "the target is already opened."), - E_AUTHENTICATION(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1104), ErrorLabels.E_AUTHENTICATION), - E_APP_NOT_INSTALLED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1105), ErrorLabels.E_APP_NOT_INSTALLED), - E_ALREADY_SET(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1106), ErrorLabels.E_ALREADY_SET), - /** --- B --- **/ - /** --- C --- **/ - E_CHUNKED_TRANSACTION(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1300), ErrorLabels.E_CHUNKED_TRANSACTION), - E_CONNECTION_BUSY(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1301), ErrorLabels.E_CONNECTION_BUSY), - E_CONNECTION_FAILED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1302), ErrorLabels.E_CONNECTION_FAILED), - E_CONNECTION_RESET(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1303), ErrorLabels.E_CONNECTION_RESET), - E_CREDENTIAL_EXPIRED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1304), ErrorLabels.E_CREDENTIAL_EXPIRED), - E_CERTIFICATE_VERIFICATION_FAILED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1305), ErrorLabels.E_CERTIFICATE_VERIFICATION_FAILED), - - /** --- D --- **/ - E_DATA_NOT_FOUND(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1400), ErrorLabels.E_DATA_NOT_FOUND), - E_DATABASE(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1401), ErrorLabels.E_DATABASE), - E_DECODING_FAILED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1402), ErrorLabels.E_DECODING_FAILED), - E_DEVICE_BUSY(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1403), ErrorLabels.E_DEVICE_BUSY), - E_DEVICE_FAILED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1404), ErrorLabels.E_DEVICE_FAILED), - E_DEVICE_INCOMPATIBLE(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1405), ErrorLabels.E_DEVICE_INCOMPATIBLE), - E_DEVICE_UNAVAILABLE(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1406), ErrorLabels.E_DEVICE_UNAVAILABLE), - E_DHCP(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1407), ErrorLabels.E_DHCP), - E_DIMENSION_CHANGED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1408), ErrorLabels.E_DIMENSION_CHANGED), - E_DNS(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1409), ErrorLabels.E_DNS), - E_DNS_NOT_FOUND(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1410), ErrorLabels.E_DNS_NOT_FOUND), - - /** --- E --- **/ - E_EFFECTS_DISABLED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1500), ErrorLabels.E_EFFECTS_DISABLED), - E_EMPTY_BODY(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1501), ErrorLabels.E_EMPTY_BODY), - E_ENCODING_FAILED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1502), ErrorLabels.E_ENCODING_FAILED), - E_END_OF_FILE(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1503), ErrorLabels.E_END_OF_FILE), - - /** --- F --- **/ -// E_FAILURE(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1600), ErrorLabels.E_), - E_FDN_MODE(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1600), ErrorLabels.E_FDN_MODE), - E_FILE_ALREADY_EXIST(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1601), ErrorLabels.E_FILE_ALREADY_EXIST), - E_FILE_NOT_FOUND(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1602), ErrorLabels.E_FILE_NOT_FOUND), - - /** --- G --- **/ - E_GROUP_NOT_FOUND(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1700), ErrorLabels.E_GROUP_NOT_FOUND), - - /** --- H --- **/ - E_HOST_NOT_FOUND(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1800), ErrorLabels.E_HOST_NOT_FOUND), - E_HOST_UNREACHABLE(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1801), ErrorLabels.E_HOST_UNREACHABLE), - E_HTTP_USER(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1802), ErrorLabels.E_HTTP_USER), - - /** --- I --- **/ - E_ILLEGAL_ACCESS(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1900), ErrorLabels.E_ILLEGAL_ACCESS), - E_IN_PROGRESS(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1901), ErrorLabels.E_IN_PROGRESS), - E_INACCESSIBLE_PATH(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1902), ErrorLabels.E_INACCESSIBLE_PATH), - E_INIT_FAILED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1903), ErrorLabels.E_INIT_FAILED), - E_INSTANTIATION_FAILED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1904), ErrorLabels.E_INSTANTIATION_FAILED), - E_INSUFFICIENT_PRIORITY(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1905), ErrorLabels.E_INSUFFICIENT_PRIORITY), - E_INTERRUPTED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1906), ErrorLabels.E_INTERRUPTED), - E_INVALID_ACCOUNT(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1907), ErrorLabels.E_INVALID_ACCOUNT), - E_INVALID_ADDRESS(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1908), ErrorLabels.E_INVALID_ADDRESS), - E_INVALID_ARG(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1909), ErrorLabels.E_INVALID_ARG), - E_INVALID_CONDITION(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1910), ErrorLabels.E_INVALID_CONDITION), - E_INVALID_CONNECTION(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1911), ErrorLabels.E_INVALID_CONNECTION), - E_INVALID_CONTENT(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1912), ErrorLabels.E_INVALID_CONTENT), - E_INVALID_CONTEXT(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1913), ErrorLabels.E_INVALID_CONTEXT), - E_INVALID_DATA(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1914), ErrorLabels.E_INVALID_DATA), - E_INVALID_DOMAIN(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1915), ErrorLabels.E_INVALID_DOMAIN), - E_INVALID_ENCODING_RANGE(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1916), ErrorLabels.E_INVALID_ENCODING_RANGE), - E_INVALID_FORMAT(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1917), ErrorLabels.E_INVALID_FORMAT), - E_INVALID_HEADER(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1918), ErrorLabels.E_INVALID_HEADER), - E_INVALID_KEY(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1919), ErrorLabels.E_INVALID_KEY), - E_INVALID_OPERATION(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1920), ErrorLabels.E_INVALID_OPERATION), - E_INVALID_PROXY(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1921), ErrorLabels.E_INVALID_PROXY), - E_INVALID_SIM_STATE(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1922), ErrorLabels.E_INVALID_SIM_STATE), - E_INVALID_SERVER(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1923), ErrorLabels.E_INVALID_SERVER), - E_INVALID_SESSION(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1924), ErrorLabels.E_INVALID_SESSION), - E_INVALID_SOCKET(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1925), ErrorLabels.E_INVALID_SOCKET), - E_INVALID_STATE(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1926), ErrorLabels.E_INVALID_STATE), - E_INVALID_TRANSACTION(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1927), ErrorLabels.E_INVALID_TRANSACTION), - E_IO(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1928), ErrorLabels.E_IO), - E_NOT_JOINED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1929), ErrorLabels.E_NOT_JOINED), - E_INVALID_CERTIFICATE(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1930), ErrorLabels.E_INVALID_CERTIFICATE), - E_INVALID_URL(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(1931), ErrorLabels.E_INVALID_URL), - - /** --- J ---**/ - /** --- K --- **/ - E_KEY_ALREADY_EXIST(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2100), ErrorLabels.E_KEY_ALREADY_EXIST), - E_KEY_NOT_FOUND(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2101), ErrorLabels.E_KEY_NOT_FOUND), - - /** --- L --- **/ - E_LANDMARK(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2200), ErrorLabels.E_LANDMARK), - E_LIBRARY_NOT_FOUND(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2201), ErrorLabels.E_LIBRARY_NOT_FOUND), - E_LIBRARY_NOT_LOADED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2202), ErrorLabels.E_LIBRARY_NOT_LOADED), - E_LINK(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2203), ErrorLabels.E_LINK), - E_LOCATION(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2204), ErrorLabels.E_LOCATION), - E_LOCATION_SERVICE(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2205), ErrorLabels.E_LOCATION_SERVICE), - E_LOCK_FAILED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2206), ErrorLabels.E_LOCK_FAILED), - E_LANGUAGE_NOT_SET(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2207), ErrorLabels.E_LANGUAGE_NOT_SET), - - /** --- M --- **/ - E_MAX_EXCEEDED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2300), ErrorLabels.E_MAX_EXCEEDED), - E_MISSING_INPUT(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2301), ErrorLabels.E_MISSING_INPUT), - E_MOBILE_FAILED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2302), ErrorLabels.E_MOBILE_FAILED), - E_MODEL_NOT_FOUND(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2303), ErrorLabels.E_MODEL_NOT_FOUND), - - /** --- N --- **/ - E_NETWORK_FAILED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2400), ErrorLabels.E_NETWORK_FAILED), - E_NETWORK_UNAVAILABLE(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2401), ErrorLabels.E_NETWORK_UNAVAILABLE), - E_NO_CERTIFICATE(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2402), ErrorLabels.E_NO_CERTIFICATE), - E_NOT_A_MEMBER(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2403), ErrorLabels.E_NOT_A_MEMBER), - E_NOT_PAIRED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2404), ErrorLabels.E_NOT_PAIRED), - E_NOT_RESPONDING(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2405), ErrorLabels.E_NOT_RESPONDING), - E_NUM_FORMAT(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2406), ErrorLabels.E_NUM_FORMAT), - - /** --- O --- **/ - E_OBJ_ALREADY_EXIST(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2500), ErrorLabels.E_OBJ_ALREADY_EXIST), - E_OBJ_NOT_FOUND(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2501), ErrorLabels.E_OBJ_NOT_FOUND), - E_OBJECT_LOCKED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2502), ErrorLabels.E_OBJECT_LOCKED), - E_ON_INITIALIZING(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2503), ErrorLabels.E_ON_INITIALIZING), - E_OPERATION_CANCELED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2504), ErrorLabels.E_OPERATION_CANCELED), - E_OPERATION_FAILED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2505), ErrorLabels.E_OPERATION_FAILED), - E_OUT_OF_MEMORY(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2506), ErrorLabels.E_OUT_OF_MEMORY), - E_OUT_OF_RANGE(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2507), ErrorLabels.E_OUT_OF_RANGE), - E_OVERFLOW(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2508), ErrorLabels.E_OVERFLOW), - - /** --- P --- **/ - E_PAIRING_FAILED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2600), ErrorLabels.E_PAIRING_FAILED), - E_PARSING_FAILED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2601), ErrorLabels.E_PARSING_FAILED), - E_PRIVILEGE_DENIED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2602), ErrorLabels.E_PRIVILEGE_DENIED), - - /** --- Q --- **/ - - /** --- R --- **/ - E_READ_ONLY(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2800), ErrorLabels.E_READ_ONLY), - E_REJECTED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2801), ErrorLabels.E_REJECTED), - // not used - E_REMOTE_DEVICE_NOT_FOUND(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2802), ErrorLabels.E_REMOTE_DEVICE_NOT_FOUND), - // not used - E_REMOVE_SERVICE_NOT_FOUND(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2803), ErrorLabels.E_REMOVE_SERVICE_NOT_FOUND), - E_RESOURCE_UNAVAILABLE(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2804), ErrorLabels.E_RESOURCE_UNAVAILABLE), - E_RIGHT_EXPIRED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2805), ErrorLabels.E_RIGHT_EXPIRED), - - /** --- S --- **/ - E_SECTION_ALREADY_EXIST(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2900), ErrorLabels.E_SECTION_ALREADY_EXIST), - E_SECTION_NOT_FOUND(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2901), ErrorLabels.E_SECTION_NOT_FOUND), - E_SERVER(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2902), ErrorLabels.E_SERVER), - E_SERVICE_BUSY(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2903), ErrorLabels.E_SERVICE_BUSY), - E_SERVICE_LIMITED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2904), ErrorLabels.E_SERVICE_LIMITED), - E_SERVICE_LOCKED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2905), ErrorLabels.E_SERVICE_LOCKED), - E_SERVICE_UNAVAILABLE(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2906), ErrorLabels.E_SERVICE_UNAVAILABLE), - E_SESSION_DEACTIVATED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2907), ErrorLabels.E_SESSION_DEACTIVATED), - // not used - E_SESSION_UNAVAILABLE(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2908), ErrorLabels.E_SESSION_UNAVAILABLE), - // not used - E_SIZE_MISMATCH(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2909), ErrorLabels.E_SIZE_MISMATCH), - E_SOCKET_USER(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2910), ErrorLabels.E_SOCKET_USER), - E_STORAGE_FULL(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2911), ErrorLabels.E_STORAGE_FULL), - E_SYMBOL_NOT_FOUND(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2912), ErrorLabels.E_SYMBOL_NOT_FOUND), - E_SYNTAX(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2913), ErrorLabels.E_SYNTAX), - E_SYSTEM(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2914), ErrorLabels.E_SYSTEM), - E_SERVICE_DEACTIVATED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(2915), ErrorLabels.E_SERVICE_DEACTIVATED), - - /** --- T --- **/ - E_TABLE_NOT_FOUND(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(3000), ErrorLabels.E_TABLE_NOT_FOUND), - E_TIMEOUT(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(3001), ErrorLabels.E_TIMEOUT), - E_TYPE_MISMATCH(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(3002), ErrorLabels.E_TYPE_MISMATCH), - - /** --- U --- **/ - E_UNDERFLOW(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(3100), ErrorLabels.E_UNDERFLOW), - E_UNKNOWN(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(3101), ErrorLabels.E_UNKNOWN), - E_UNSUPPORTED_ALGORITHM(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(3102), ErrorLabels.E_UNSUPPORTED_ALGORITHM), - E_UNSUPPORTED_CODEC(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(3103), ErrorLabels.E_UNSUPPORTED_CODEC), - E_UNSUPPORTED_FAMILY(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(3104), ErrorLabels.E_UNSUPPORTED_FAMILY), - E_UNSUPPORTED_FORMAT(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(3105), ErrorLabels.E_UNSUPPORTED_FORMAT), - E_UNSUPPORTED_PROTOCOL(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(3106), ErrorLabels.E_UNSUPPORTED_PROTOCOL), - E_UNSUPPORTED_OPERATION(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(3107), ErrorLabels.E_UNSUPPORTED_OPERATION), - E_UNSUPPORTED_OPTION(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(3108), ErrorLabels.E_UNSUPPORTED_OPTION), - E_UNSUPPORTED_SERVICE(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(3109), ErrorLabels.E_UNSUPPORTED_SERVICE), - E_UNSUPPORTED_TYPE(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(3110), ErrorLabels.E_UNSUPPORTED_TYPE), - E_URL_CHANGED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(3111), ErrorLabels.E_URL_CHANGED), - E_USER_AGENT_NOT_ALLOWED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(3112), ErrorLabels.E_USER_AGENT_NOT_ALLOWED), - E_USER_ALREADY_REGISTERED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(3113), ErrorLabels.E_USER_ALREADY_REGISTERED), - E_USER_NOT_FOUND(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(3114), ErrorLabels.E_USER_NOT_FOUND), - E_USER_NOT_REGISTERED(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(3115), ErrorLabels.E_USER_NOT_REGISTERED), - E_UNSUPPORTED_LANGUAGE(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(3116), ErrorLabels.E_UNSUPPORTED_LANGUAGE), - E_UNSUPPORTED_VERSION(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(3117), ErrorLabels.E_UNSUPPORTED_VERSION), - E_UNSUPPORTED_LOCALE(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(3118), ErrorLabels.E_UNSUPPORTED_LOCALE), - - /** --- V --- **/ - - /** --- W --- **/ - E_WOULD_BLOCK(getERR_SRC_FRAMEWORK() + SET_E_CAUSE(3300), ErrorLabels.E_WOULD_BLOCK); - /** --- X --- **/ - /** --- Y --- **/ - /** --- Z --- **/ - - private final long errno; - private final String message; - private static final int E_SEVERITY_POS = 31; - private static final int E_TYPE_POS = 29; - - private DAErrorCode(long errno, String message) { - this.errno = errno; - this.message = message; - } - - public long getErrno() { - return errno; - - } - - public String getMessage() { - return message; - } - - private static long SET_E_SEVERITY(long x) { - return PUT_MASK(0, x, E_SEVERITY_POS); - } - - private static long PUT_MASK(long var, long val, long pos) { - return ((var) | ((val) << (pos))); - } - - private static long SET_E_TYPE(long x) { - return PUT_MASK(0, x, E_TYPE_POS); - } - - private static long getE_FAILURE() - { - return SET_E_SEVERITY(1); - } - - private static long getERR_SRC_FRAMEWORK() - { - return SET_E_SEVERITY(1) + SET_E_TYPE(1); - } - - private static long SET_E_CAUSE(long x) { - return x; - } -} \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/error/ErrorCodeManager.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/error/ErrorCodeManager.java deleted file mode 100644 index 95f8fb5..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/error/ErrorCodeManager.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.error; - -import java.util.Hashtable; - -public class ErrorCodeManager { - private static ErrorCodeManager instance = null; - private Hashtable hash = new Hashtable(); - - public static ErrorCodeManager getInatance() { - if (instance == null) { - instance = new ErrorCodeManager(); - } - return instance; - } - - public ErrorCodeManager() { - initErrorCode(); - } - - public DAErrorCode getErrorCode(long errno) { - return hash.get(errno); - } - - public String getErrorCode(String strErr) { - long errno = -1; - try { - errno = Long.parseLong(strErr); - } catch (NumberFormatException e) { - e.printStackTrace(); - // errno = -1 and returns null - } - return hash.get(errno).name(); - } - - public String getErrorDescription(String strErr) { - long errno = -1; - try { - errno = Long.parseLong(strErr); - } catch (NumberFormatException e) { - e.printStackTrace(); - // errno = -1 and returns null - } - return hash.get(errno).getMessage(); - } - - public void initErrorCode() { - DAErrorCode[] cErrorCodes = DAErrorCode.values(); - int size = cErrorCodes.length; - for (int i = 0; i < size; i++) { - hash.put((long) cErrorCodes[i].getErrno(), cErrorCodes[i]); - } - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/ClearHandler.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/ClearHandler.java deleted file mode 100644 index 1487657..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/ClearHandler.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.handlers; - -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.swt.widgets.Display; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.logparser.LogInserter; -import org.tizen.dynamicanalyzer.logparser.LogParser; -import org.tizen.dynamicanalyzer.sql.SqlManager; -import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackManager; -import org.tizen.dynamicanalyzer.ui.page.BaseView; -import org.tizen.dynamicanalyzer.ui.toolbar.StopLogProcessor; -import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; -import org.tizen.dynamicanalyzer.utils.UpdateViewTimer; - -public class ClearHandler extends AbstractHandler { - - public final static String ID = ClearHandler.class.getName(); - - @Override - public Object execute(ExecutionEvent event) throws ExecutionException { - System.out.println("clear handler"); - - UpdateViewTimer.stop(); - - AnalyzerManager.clear(); - - LogParser.clear(); - LogInserter.clear(); - CallStackManager.clear(); - AnalyzerManager.getWarningChecker().clear(); - StopLogProcessor.clear(); - - SqlManager.unlockDB(); - - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - ((BaseView) AnalyzerUtil.getViewPart(BaseView.ID)).clear(); - ToolbarArea.getInstance().clearTimer(); - System.out.println("view clear"); - } - }); - - System.out.println("clear handler exit"); - return null; - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/ExitHandler.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/ExitHandler.java deleted file mode 100644 index deae643..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/ExitHandler.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.handlers; - -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.communicator.DACommunicator; -import org.tizen.dynamicanalyzer.communicator.IDECommunicator; -import org.tizen.dynamicanalyzer.logparser.LogInserter; -import org.tizen.dynamicanalyzer.logparser.LogParser; -import org.tizen.dynamicanalyzer.ui.toolbar.StopLogProcessor; -import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea; -import org.tizen.dynamicanalyzer.ui.toolbar.opentrace.OpenTraceInputReader; -import org.tizen.dynamicanalyzer.utils.UpdateViewTimer; - -public class ExitHandler extends AbstractHandler { - - public static final String ID = ExitHandler.class.getName(); - - @Override - public Object execute(ExecutionEvent event) throws ExecutionException { - AnalyzerManager.setExit(true); - ToolbarArea.getInstance().stopTimer(); - UpdateViewTimer.stop(); - OpenTraceInputReader.stopOpenTraceInputReader(); - LogInserter.stopInsertLogThread(); - LogParser.stopLogParser(); - StopLogProcessor.stopStopLogProcessThread(); - IDECommunicator.stopIDEcommunicatorThread(); - - if (DACommunicator.isDaemonAlive()) { - DACommunicator.killDaemon(); - } - - return null; - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/OpenTraceCompleteHandler.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/OpenTraceCompleteHandler.java deleted file mode 100644 index 2f9f89c..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/OpenTraceCompleteHandler.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.handlers; - -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.swt.widgets.Display; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.AnalyzerPaths; -import org.tizen.dynamicanalyzer.ui.page.DAPageComposite; -import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea; - -public class OpenTraceCompleteHandler extends AbstractHandler { - public static String ID = OpenTraceCompleteHandler.class.getName(); - - @Override - public Object execute(ExecutionEvent event) throws ExecutionException { - - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - DAPageComposite page = AnalyzerManager.getCurrentPage(); - page.updatePage(); - if (AnalyzerManager.getProject().getSavePath() - .contains(AnalyzerPaths.TEMP_FOLDER_PATH)) { - ToolbarArea.getInstance().setToolbarEnablement(true); - } else { - ToolbarArea.getInstance().setSaveButtonEnable(false); - } - } - }); - - System.out.println("open trace complete handler "); - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - DAPageComposite page = AnalyzerManager.getCurrentPage(); - page.updatePage(); - } - }); - System.out.println("open trace complete!!"); //$NON-NLS-1$ - return null; - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/OpenTraceHandler.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/OpenTraceHandler.java deleted file mode 100644 index 07717cc..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/OpenTraceHandler.java +++ /dev/null @@ -1,494 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.handlers; - -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.communicator.DACommunicator; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.model.ImageInfo; -import org.tizen.dynamicanalyzer.model.LogCenter; -import org.tizen.dynamicanalyzer.nl.AnalyzerLabels; -import org.tizen.dynamicanalyzer.project.Project; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.sql.DBTableInfo; -import org.tizen.dynamicanalyzer.sql.DBTableManager; -import org.tizen.dynamicanalyzer.sql.SqlManager; -import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackData; -import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackManager; -import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackUnit; -import org.tizen.dynamicanalyzer.ui.summary.failed.FailedChecker; -import org.tizen.dynamicanalyzer.ui.summary.failed.FailedData; -import org.tizen.dynamicanalyzer.ui.summary.leaks.LeakData; -import org.tizen.dynamicanalyzer.ui.summary.leaks.LeakDetector; -import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfiler; -import org.tizen.dynamicanalyzer.ui.summary.profiling.ProfileDataMaker; -import org.tizen.dynamicanalyzer.ui.summary.profiling.ProfilingChildData; -import org.tizen.dynamicanalyzer.ui.summary.profiling.ProfilingData; -import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea; -import org.tizen.dynamicanalyzer.ui.toolbar.opentrace.OpenTraceProgressManager; -import org.tizen.dynamicanalyzer.ui.userinterface.UIDataManager; -import org.tizen.dynamicanalyzer.ui.widgets.DADialog; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; -import org.tizen.dynamicanalyzer.widgets.combo.DACustomCombo; - -public class OpenTraceHandler extends AbstractHandler { - - public static final String ID = OpenTraceHandler.class.getName(); - Project p = null; - - @Override - public Object execute(ExecutionEvent event) throws ExecutionException { - - p = AnalyzerManager.getProject(); - ResultSet rs = SqlManager.selectAllFromProject(p); - if (null == rs) { - AnalyzerUtil.executeCommand(ClearHandler.ID); - return null; - } - List pInfo = new ArrayList(); - try { - while (rs.next()) { - pInfo.add(rs.getString("info")); //$NON-NLS-1$ - } - rs.close(); - } catch (SQLException e) { - AnalyzerUtil.executeCommand(ClearHandler.ID); - e.printStackTrace(); - return null; - } - - if (pInfo.isEmpty()) { - // TODO: message box - // TODO: valid check - System.out.println("invalid save file"); //$NON-NLS-1$ - AnalyzerUtil.executeCommand(ClearHandler.ID); - return null; - } - OpenTraceProgressManager.getInstance().openTracePrgressStart( - "Loading xml files.."); - int size = pInfo.size(); - List logCenterNames = new ArrayList(); - for (int i = 0; i < size; i++) { - if (i == AnalyzerConstants.PROJECT_VERSION_INDEX) { - if (!AnalyzerConstants.SAVE_DATA_VERSION.equals(pInfo - .get(AnalyzerConstants.PROJECT_VERSION_INDEX))) { - System.out.println("save version is invalid"); //$NON-NLS-1$ - OpenTraceProgressManager.getInstance() - .closeOpenTraceDialog("Save version is invalid"); - createWarningDialog("The save file is invalid. This file will be removed."); - return null; - } - p.setVersion(AnalyzerConstants.SAVE_DATA_VERSION); - } else if (i == AnalyzerConstants.PROJECT_CREATE_TIME_INDEX) { - p.setCreateTime(pInfo.get(i)); - } else if (i == AnalyzerConstants.PROJECT_APPNAME_INDEX) { - p.setAppName(pInfo.get(i)); - } else if (i == AnalyzerConstants.PROJECT_DEVICE_INDEX) { - p.setDevice(pInfo.get(i)); - } else if (i == AnalyzerConstants.PROJECT_LAST_DATA_INDEX) { - p.setLastLogNum(pInfo.get(i)); - } else if (i == AnalyzerConstants.PROJECT_LAST_TIME_INDEX) { - try { - long lastTime = Long.parseLong(pInfo.get(i)); - p.setLastTime(lastTime); - } catch (NumberFormatException e) { - OpenTraceProgressManager.getInstance() - .closeOpenTraceDialog("Trace file is invalid..."); - createWarningDialog("The save file is invalid. This file will be removed."); - AnalyzerUtil.executeCommand(ClearHandler.ID); - return null; - } - } else if (i == AnalyzerConstants.PROJECT_TOTAL_SAMPLE_COUNT) { - try { - int totalSampleCount = Integer.parseInt(pInfo.get(i)); - p.setTotalProfilingSampleCount(totalSampleCount); - } catch (NumberFormatException e) { - OpenTraceProgressManager.getInstance() - .closeOpenTraceDialog("Trace file is invalid..."); - createWarningDialog("The save file is invalid. This file will be removed."); - AnalyzerUtil.executeCommand(ClearHandler.ID); - return null; - } - } else { - logCenterNames.add(pInfo.get(i)); - } - } - - if (!DACommunicator.isDeviceConnected()) { - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - DACustomCombo deviceCombo = ToolbarArea.getInstance() - .getDeviceCombo(); - DACustomCombo appCombo = ToolbarArea.getInstance() - .getAppCombo(); - deviceCombo.setText(AnalyzerManager.getProject() - .getDevice()); - appCombo.setText(AnalyzerManager.getProject().getAppName()); - deviceCombo.setEnabled(true); - appCombo.setEnabled(true); - } - }); - } - - int percent = OpenTraceProgressManager.getInstance().getPercent(); - if (p.initLogCenters(logCenterNames) && loadAppInfo(p) - && loadCallStackData(p) && loadCallStackApis(p) - && loadProfilingData() && loadProfilingChildData() - && loadLeakData(p) && loadFailedData() && loadImageSet(p)) { - OpenTraceProgressManager.getInstance().setProgressPercent( - "Loading appInfo..", percent += 60); - } else { - OpenTraceProgressManager.getInstance().closeOpenTraceDialog( - "Trace data loading failed..."); - createWarningDialog("The save file is invalid. This file will be removed."); - AnalyzerUtil.executeCommand(ClearHandler.ID); - return null; - } - - p.closeConnection(); - - ToolbarArea.getInstance().setTime(p.getLastTime()); - ToolbarArea.getInstance().setAppComboText(p.getAppName()); - ToolbarArea.getInstance().setRepalyButtonEnable(true); - if (AnalyzerManager.getProject().getBinaryPath().isEmpty()) { - ToolbarArea.getInstance().setSourceViewEnable(false); - ToolbarArea.getInstance().setSourceViewTooltip( - AnalyzerLabels.MESSAGE_PROCESS_PG_WARNING); - } else { - ToolbarArea.getInstance().setSourceViewEnable(true); - ToolbarArea.getInstance().setSourceViewTooltip( - AnalyzerLabels.MESSAGE_PROCESS_VIEW_SOURCE); - } - OpenTraceProgressManager.getInstance().setProgressPercent( - "Loading data..", percent += 3); - /* add each part action.. close... open...etc... */ - - /* resource log view action start */ - List logCenters = AnalyzerManager.getLogCenters(); - size = logCenters.size(); - for (int i = 0; i < size; i++) { - LogCenter center = logCenters.get(i); - int dataSize = SqlManager.selectCount(center); - center.setDataSize(dataSize); - } - - OpenTraceProgressManager.getInstance().runThreads(); - OpenTraceProgressManager.getInstance().openTraceComplete(); - - return null; - } - - private boolean loadCallStackData(Project p) { - ResultSet rs = SqlManager.selectAllFromTable("CallStackData"); //$NON-NLS-1$ - if (null == rs) { - return false; - } - - try { - while (rs.next()) { - int seq = rs.getInt("seq"); //$NON-NLS-1$ - String addrs = rs.getString("callstack"); //$NON-NLS-1$ - if (null == addrs) { - continue; - } - String[] splitAddrs = addrs.split("/"); //$NON-NLS-1$ - CallStackData csd = new CallStackData(seq); - List addrList = csd.getAddrs(); - int size = splitAddrs.length; - for (int i = 0; i < size; i++) { - long addr = Long.parseLong(splitAddrs[i]); - addrList.add(addr); - } - CallStackManager.getInstance().getCallStackDataBySeqMap() - .put(seq, csd); - } - rs.close(); - } catch (SQLException e) { - e.printStackTrace(); - return false; - } - return true; - } - - private boolean loadCallStackApis(Project p) { - ResultSet rs = SqlManager.selectAllFromTable("CallStackUnits"); //$NON-NLS-1$ - if (null == rs) { - return false; - } - - HashMap apiHash = CallStackManager.getInstance() - .getCallStackApiByAddrMap(); - try { - while (rs.next()) { - long addr = rs.getLong("addr"); //$NON-NLS-1$ - String api = rs.getString("api"); //$NON-NLS-1$ - CallStackUnit csa = new CallStackUnit(addr, api); - // apiHash.put(addr, api); - apiHash.put(addr, csa); - } - rs.close(); - } catch (SQLException e) { - e.printStackTrace(); - return false; - } - return true; - } - - private boolean loadAppInfo(Project p) { - ResultSet rs = SqlManager.selectAllFromTable("AppInfo"); //$NON-NLS-1$ - if (null == rs) { - return false; - } - - List info = p.getAppInfo(); - try { - int index = 0; - while (rs.next()) { - info.set(index++, rs.getString("info")); //$NON-NLS-1$ - } - rs.close(); - } catch (SQLException e) { - e.printStackTrace(); - return false; - } - return true; - } - - private boolean loadImageSet(Project p) { - ResultSet rs = SqlManager.selectAllFromTable("screenshot"); //$NON-NLS-1$ - if (null == rs) { - return false; - } - - try { - while (rs.next()) { - String seq = rs.getString("seqNumber"); //$NON-NLS-1$ - String time = rs.getString("time"); //$NON-NLS-1$ - ImageInfo imgInfo = new ImageInfo(); - imgInfo.setSeq(seq); - imgInfo.setTime(time); - AnalyzerManager.getImageSet().put(seq, imgInfo); - } - rs.close(); - } catch (SQLException e) { - e.printStackTrace(); - return false; - } - return true; - } - - private boolean loadLeakData(Project p) { - ResultSet rs = SqlManager - .selectAllFromTable(AnalyzerConstants.LEAK_DATA_TABLE_NAME); - LeakDetector leakDectector = AnalyzerManager.getLeakDetector(); - if (null == rs || leakDectector == null) { - return false; - } - - int size = DBTableManager.commonColumns.length; - - try { - while (rs.next()) { - List data = new ArrayList(); - for (int i = 1; i <= size; i++) { - data.add(rs.getString(i)); - } - LeakData leakData = new LeakData(data); - if (null != leakData.getParentKey() - && !leakData.getParentKey().isEmpty()) { - LeakData parent = leakDectector.getLeakHash().get( - leakData.getParentKey()); - if (null == parent) { - continue; - } else { - parent.getChildren().add(leakData); - } - } else { - leakDectector.getLeakHash() - .put(leakData.getKey(), leakData); - } - } - rs.close(); - } catch (SQLException e) { - e.printStackTrace(); - return false; - } - return true; - } - - private boolean loadFailedData() { - ResultSet rs = SqlManager - .selectAllFromTable(AnalyzerConstants.FAILED_DATA_TABLE_NAME); - FailedChecker failedChecker = AnalyzerManager.getFailedChecker(); - if (null == rs || failedChecker == null) { - return false; - } - - int size = DBTableManager.commonColumns.length; - - try { - while (rs.next()) { - List data = new ArrayList(); - for (int i = 1; i <= size; i++) { - data.add(rs.getString(i)); - } - // possibility of extensions - network, efl, db, etc... - int id = Integer - .parseInt(data.get(LogCenterConstants.ID_INDEX)); - if (id == LogCenterConstants.LOG_RESOURCE) { - // if file failed api data is skip - file chart make it! - int type = Integer.parseInt(data - .get(LogCenterConstants.RESOURCE_FDTYPE_INDEX)); - if (type == LogCenterConstants.FD_TYPE_FILE) { - continue; - } - } - FailedData failedData = new FailedData(data); - failedChecker.getFailedList().add(failedData); - } - rs.close(); - } catch (SQLException e) { - e.printStackTrace(); - return false; - } - return true; - } - - private boolean loadProfilingData() { - DBTableInfo profilingData = DBTableManager.getInstance().getTableInfo( - DBTableManager.TABLE_INDEX_PROFILING_DATA); - String tableName = profilingData.getTableName(); - ResultSet rs = SqlManager.selectAllFromTable(tableName); - ProfileDataMaker profiler = FunctionUsageProfiler.getInstance() - .getProfileDataMaker(); - if (null == rs || profiler == null) { - return false; - } - - int size = profilingData.getColumnNames().length; - - try { - while (rs.next()) { - List data = new ArrayList(); - for (int i = 1; i <= size; i++) { - data.add(rs.getString(i)); - } - // possibility of extensions - network, efl, db, etc... - ProfilingData fupData = new ProfilingData(data); - String seq = data.get(ProfilingData.SEQUENCE_INDEX); - profiler.getProfilingDataMap().put(seq, fupData); - String symbol = data.get(ProfilingData.KEY_INDEX); - FunctionUsageProfiler.getSymbolSeqHash().put(symbol, seq); - UIDataManager.getInstance().getfunctionProfilingDataChecker() - .addProfilingData(fupData); - } - rs.close(); - } catch (SQLException e) { - e.printStackTrace(); - return false; - } - - ProfilingData ab = profiler - .getProfilingDataByKey(FunctionUsageProfiler.APPLICATION_KEY); - profiler.setAppBin(ab); - ProfilingData dl = profiler - .getProfilingDataByKey(FunctionUsageProfiler.DEPENDENT_LIB_KEY); - profiler.setDependentLib(dl); - return true; - } - - private boolean loadProfilingChildData() { - DBTableInfo profilingChildData = DBTableManager.getInstance() - .getTableInfo(DBTableManager.TABLE_INDEX_PROFILING_CHILD_DATA); - String tableName = profilingChildData.getTableName(); - ResultSet rs = SqlManager.selectAllFromTable(tableName); - ProfileDataMaker profiler = FunctionUsageProfiler.getInstance() - .getProfileDataMaker(); - if (null == rs || profiler == null) { - return false; - } - - int size = profilingChildData.getColumnNames().length; - - try { - while (rs.next()) { - List data = new ArrayList(); - for (int i = 1; i <= size; i++) { - data.add(rs.getString(i)); - } - - if (data.size() < 2) { - continue; - } - - String seqs = data.get(1); - String[] splitSeqs = seqs.split("/"); //$NON-NLS-1$ - List childData = new ArrayList(); - for (int ii = 0; ii < splitSeqs.length; ii++) { - childData.add(new String(splitSeqs[ii])); - } - ProfilingData parent = profiler.getProfilingDataMap().get( - data.get(0)); - ProfilingChildData child = parent.getChildData(); - child.getChildren().addAll(childData); - profiler.getChildListMap().put(data.get(0), child); - } - rs.close(); - } catch (SQLException e) { - e.printStackTrace(); - return false; - } - return true; - } - - private void createWarningDialog(String message) { - final Shell shell = AnalyzerUtil.getWorkbenchWindow().getShell(); - final DADialog dialog = new DADialog(shell, SWT.NONE); // FIXME - dialog.setIcon(ImageResources.DIALOG_WARNING_ICON); - dialog.setMessage(message); - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - dialog.open(); - } - }); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/RealtimePerspectiveHandler.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/RealtimePerspectiveHandler.java deleted file mode 100644 index 7414501..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/RealtimePerspectiveHandler.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.handlers; - -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.WorkbenchException; - -public class RealtimePerspectiveHandler extends AbstractHandler { - - public static final String ID = RealtimePerspectiveHandler.class.getName(); - public static final String PERSPECTIVE_ID = "org.tizen.dynamicanalyzer.workbench.perspective.DAMainPerspective"; //$NON-NLS-1$ - - @Override - public Object execute(ExecutionEvent event) throws ExecutionException { - IWorkbench workbench = PlatformUI.getWorkbench(); - try { - workbench.showPerspective(PERSPECTIVE_ID, - workbench.getActiveWorkbenchWindow()); - } catch (WorkbenchException e) { - e.printStackTrace(); - } - - return null; - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/ReplayTraceHandler.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/ReplayTraceHandler.java deleted file mode 100644 index 7fa8f52..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/ReplayTraceHandler.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.handlers; - -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.uirecorder.UIRecorderTool; - -public class ReplayTraceHandler extends AbstractHandler { - - public static final String ID = ReplayTraceHandler.class.getName(); - public static Integer FAILED = 1; - public static String RECORD_DATA_FILE_NAME = "/uirecorder.xml"; //$NON-NLS-1$ - - @Override - public Object execute(ExecutionEvent event) throws ExecutionException { - UIRecorderTool recorderMng = UIRecorderTool.getInstance(); - // String xmlFileName = getLoadFileName("xml"); - String xmlFileName = AnalyzerManager.getProject().getSavePath() - + RECORD_DATA_FILE_NAME; - - if (xmlFileName == null || xmlFileName.isEmpty()) { - return FAILED; - } else { - recorderMng.setXmlPath(xmlFileName); - recorderMng.setReplayFlag(true); - } - return null; - } - - // private String getLoadFileName(String extension) { - // String[] extFilter = {"*."+extension}; //$NON-NLS-1$ - // IWorkbenchWindow window = - // PlatformUI.getWorkbench().getActiveWorkbenchWindow(); - // - // - // FileDialog dialog = new FileDialog(window.getShell(), SWT.OPEN); - // dialog.setFilterPath(AnalyzerConstants.SAVE_FOLDER_PATH); - // dialog.setFilterExtensions(extFilter); - // return dialog.open(); - // } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/StartHandler.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/StartHandler.java deleted file mode 100644 index 7cb4fc5..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/StartHandler.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.tizen.dynamicanalyzer.handlers; - -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.swt.widgets.Display; -import org.tizen.dynamicanalyzer.ui.summary.SummaryPage; -import org.tizen.dynamicanalyzer.ui.summary.leaks.LeakView; -import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfilingView; -import org.tizen.dynamicanalyzer.ui.userinterface.UIPage; -import org.tizen.dynamicanalyzer.ui.userinterface.control.UIControlListView; -import org.tizen.dynamicanalyzer.ui.userinterface.profiling.UIFunctionProfilingView; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATreeComposite; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; - -public class StartHandler extends AbstractHandler { - - public final static String ID = StartHandler.class.getName(); - - @Override - public Object execute(ExecutionEvent event) throws ExecutionException { - System.out.println("start handler called!!"); - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - - FunctionUsageProfilingView profilingView = (FunctionUsageProfilingView) AnalyzerUtil - .getView(SummaryPage.ID, FunctionUsageProfilingView.ID); - ((DATreeComposite) profilingView.getControl()).getTable() - .setSelectionEnabled(false); - LeakView leakView = (LeakView) AnalyzerUtil.getView( - SummaryPage.ID, LeakView.ID); - ((DATreeComposite) leakView.getControl()).getTable() - .setSelectionEnabled(false); - UIFunctionProfilingView uiProfilingView = (UIFunctionProfilingView) AnalyzerUtil.getView( - UIPage.ID, UIFunctionProfilingView.ID); - ((DATreeComposite) uiProfilingView.getControl()).getTable() - .setSelectionEnabled(false); - UIControlListView uiControlView = (UIControlListView) AnalyzerUtil.getView( - UIPage.ID, UIControlListView.ID); - ((DATreeComposite) uiControlView.getControl()).getTable() - .setSelectionEnabled(false); - } - }); - return null; - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/StopHandler.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/StopHandler.java deleted file mode 100644 index 56b85ee..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/StopHandler.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.tizen.dynamicanalyzer.handlers; - -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; -import org.eclipse.swt.widgets.Display; -import org.tizen.dynamicanalyzer.ui.summary.SummaryPage; -import org.tizen.dynamicanalyzer.ui.summary.leaks.LeakView; -import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfilingView; -import org.tizen.dynamicanalyzer.ui.userinterface.UIPage; -import org.tizen.dynamicanalyzer.ui.userinterface.control.UIControlListView; -import org.tizen.dynamicanalyzer.ui.userinterface.profiling.UIFunctionProfilingView; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATreeComposite; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; - -public class StopHandler extends AbstractHandler { - - public final static String ID = StopHandler.class.getName(); - - @Override - public Object execute(ExecutionEvent event) throws ExecutionException { - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - System.out.println("Stop trace handler called!!!"); - FunctionUsageProfilingView profilingView = (FunctionUsageProfilingView) AnalyzerUtil - .getView(SummaryPage.ID, FunctionUsageProfilingView.ID); - ((DATreeComposite) profilingView.getControl()).getTable() - .setSelectionEnabled(true); - LeakView leakView = (LeakView) AnalyzerUtil.getView( - SummaryPage.ID, LeakView.ID); - ((DATreeComposite) leakView.getControl()).getTable() - .setSelectionEnabled(true); - UIFunctionProfilingView uiProfilingView = (UIFunctionProfilingView) AnalyzerUtil.getView( - UIPage.ID, UIFunctionProfilingView.ID); - ((DATreeComposite) uiProfilingView.getControl()).getTable() - .setSelectionEnabled(true); - UIControlListView uiControlView = (UIControlListView) AnalyzerUtil.getView( - UIPage.ID, UIControlListView.ID); - ((DATreeComposite) uiControlView.getControl()).getTable() - .setSelectionEnabled(true); - } - }); - return null; - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/listeners/AnalyzerPartListener.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/listeners/AnalyzerPartListener.java deleted file mode 100644 index 41b175c..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/listeners/AnalyzerPartListener.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.listeners; - -import org.eclipse.ui.IPartListener2; -import org.eclipse.ui.IWorkbenchPartReference; - -public class AnalyzerPartListener implements IPartListener2 { - - @Override - public void partActivated(IWorkbenchPartReference partRef) { - } - - @Override - public void partBroughtToTop(IWorkbenchPartReference partRef) { - } - - @Override - public void partClosed(IWorkbenchPartReference partRef) { - } - - @Override - public void partDeactivated(IWorkbenchPartReference partRef) { - } - - @Override - public void partOpened(IWorkbenchPartReference partRef) { - } - - @Override - public void partHidden(IWorkbenchPartReference partRef) { - } - - @Override - public void partVisible(IWorkbenchPartReference partRef) { - - } - - @Override - public void partInputChanged(IWorkbenchPartReference partRef) { - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/listeners/AnalyzerPerspectiveListener.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/listeners/AnalyzerPerspectiveListener.java deleted file mode 100644 index 80bd64a..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/listeners/AnalyzerPerspectiveListener.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.listeners; - -import org.eclipse.ui.IPerspectiveDescriptor; -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.PerspectiveAdapter; -import org.tizen.dynamicanalyzer.communicator.DACommunicator; -import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea; - - -public class AnalyzerPerspectiveListener extends PerspectiveAdapter { - - @Override - public void perspectiveActivated(IWorkbenchPage page, - IPerspectiveDescriptor perspective) { - - ToolbarArea.getInstance().initToolbarEnablement(); - DACommunicator.init(); - - DACommunicator.checkDevices(); - DACommunicator.addDeviceListener(); - - } - - @Override - public void perspectiveDeactivated(IWorkbenchPage page, - IPerspectiveDescriptor perspective) { - DACommunicator.removeDeviceListener(); - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/listeners/DAContextMenuListener.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/listeners/DAContextMenuListener.java deleted file mode 100644 index 8ae4d27..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/listeners/DAContextMenuListener.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.listeners; - -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; - -public abstract class DAContextMenuListener implements Listener { - - @Override - public void handleEvent(Event event) { - // TODO Auto-generated method stub - handleClickEvent(event); - } - - public abstract void handleClickEvent(Event event); -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/listeners/TableTooltipListener.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/listeners/TableTooltipListener.java deleted file mode 100644 index 9beb891..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/listeners/TableTooltipListener.java +++ /dev/null @@ -1,416 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.listeners; - -import java.io.BufferedReader; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.IOException; -import java.util.List; - -import org.eclipse.nebula.widgets.grid.Grid; -import org.eclipse.nebula.widgets.grid.GridItem; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Cursor; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Shell; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.CommonConstants; -import org.tizen.dynamicanalyzer.common.SymbolManager; -import org.tizen.dynamicanalyzer.common.SymbolManager.SourceLine; -import org.tizen.dynamicanalyzer.communicator.IDECommunicator; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.nl.AnalyzerLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.FontResources; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackManager; -import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea; -import org.tizen.dynamicanalyzer.ui.widgets.DADialog; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; - -public class TableTooltipListener implements Listener { - - private Grid grid = null; - private Shell tooltip; - private Object oldItem; - private boolean enabled = true; - - private static final int MARGIN = 5; - private static final int SPACING = 0; - private static final int SOURCE_LINE_TOP = 5; - private static final int SOURCE_LINE_BOTTOM = 11; - private static final int TOOLTIP_OFFSET = 5; - private static final Cursor sourceCursor = new Cursor(null, - ImageResources.VIEW_SOURCE_CURSOR.getImageData(), 0, 0); - private static Cursor defaultCursor = null; - - public TableTooltipListener(Grid table) { - this.grid = table; - defaultCursor = grid.getCursor(); - } - - public void handleEvent(Event event) { - if (!ToolbarArea.getInstance().getSourceViewEnable()) { - return; - } - - int columnHeight = grid.getHeaderHeight(); - boolean isHeader = false; - if (event.y < columnHeight) { - isHeader = true; - } - - boolean isToggled = ToolbarArea.getInstance() - .getSourceViewToggleState(); - if (enabled && !isHeader) { - setViewCursor(isToggled); - } - - GridItem gridItem = null; - switch (event.type) { - case SWT.Dispose: - disposeTooltip(); - break; - case SWT.KeyDown: - break; - case SWT.KeyUp: - if (SWT.F2 == event.keyCode) { - isToggled = !isToggled; - if (enabled && !isHeader) { - setViewCursor(isToggled); - } - ToolbarArea.getInstance().setSourceViewState(isToggled); - } - break; - case SWT.MouseEnter: - grid.setFocus(); - if (isToggled && enabled) { - createTooltip(event); - } - break; - case SWT.MouseExit: - disposeTooltip(); - break; - case SWT.MouseMove: - gridItem = grid.getItem(new Point(event.x, event.y)); - if (null == oldItem) { - oldItem = gridItem; - } - if (null != tooltip) { - if (null != gridItem) { - if (!gridItem.equals((GridItem) oldItem)) { - oldItem = gridItem; - } else { - return; - } - } - tooltip.dispose(); - tooltip = null; - } - break; - case SWT.MouseDoubleClick: - if (isToggled && enabled) { - openIDE(event); - } - break; - case SWT.MouseHover: - grid.setFocus(); - if (isToggled && enabled) { - createTooltip(event); - } - break; - default: - break; - } - } - - public void setEnable(boolean enabled) { - this.enabled = enabled; - } - - private void setViewCursor(boolean toggled) { - if (!toggled) { - grid.setCursor(defaultCursor); - disposeTooltip(); - } else { - grid.setCursor(sourceCursor); - } - } - - private void createErrorPopup(String message) { - Shell shell = AnalyzerUtil.getWorkbenchWindow().getShell(); - DADialog warning = new DADialog(shell, SWT.NONE); - warning.setMessage(message); - warning.setIcon(ImageResources.DIALOG_WARNING_ICON); - warning.open(); - } - - private void createErrorTooltip(Event event, int errno) { - // Creates tooltip. - Shell shell = AnalyzerUtil.getWorkbenchWindow().getShell(); - tooltip = new Shell(shell, SWT.ON_TOP | SWT.NO_FOCUS | SWT.TOOL); - tooltip.setBackground(ColorResources.TOOLTIP); - GridLayout gridLayout = new GridLayout(); - gridLayout.marginTop = MARGIN; - gridLayout.marginBottom = MARGIN; - gridLayout.marginLeft = MARGIN; - gridLayout.marginRight = MARGIN; - gridLayout.verticalSpacing = SPACING; - tooltip.setLayout(gridLayout); - - // error no check - if (AnalyzerConstants.SOURCELINE_NO_MATCHING_LINE == errno) { - // boolean isPie = AnalyzerManager.getProject().isPieBuild(); - // if (isPie) { - // errno = AnalyzerConstants.SOURCELINE_PIE_BUILD; - // } - } - - // Creates tooltip title label. - Label title = new Label(tooltip, SWT.NONE); - title.setForeground(ColorResources.BLACK); - title.setBackground(ColorResources.TOOLTIP); - String text = AnalyzerConstants.sourcelineErrorMsg[errno]; - title.setText(text); - - tooltipShow(event.x, event.y); - } - - private void createTooltip(Event event) { - GridItem item = grid.getItem(new Point(event.x, event.y)); - if (null != item) { - disposeTooltip(); - - // Gets source path and line. - SourceLine sl = getSourceLine(item); - if (null == sl - || sl.getError() != AnalyzerConstants.SOURCELINE_NOERROR) { - createErrorTooltip(event, sl.getError()); - return; - } - - // Creates tooltip. - Shell shell = AnalyzerUtil.getWorkbenchWindow().getShell(); - tooltip = new Shell(shell, SWT.ON_TOP | SWT.NO_FOCUS | SWT.TOOL); - tooltip.setBackground(ColorResources.TOOLTIP); - GridLayout gridLayout = new GridLayout(); - gridLayout.marginTop = MARGIN; - gridLayout.marginBottom = MARGIN; - gridLayout.marginLeft = MARGIN; - gridLayout.marginRight = MARGIN; - gridLayout.verticalSpacing = SPACING; - tooltip.setLayout(gridLayout); - - // Creates tooltip title label. - Label title = new Label(tooltip, SWT.NONE); - title.setFont(FontResources.TOOLTIP); - title.setForeground(ColorResources.BLACK); - title.setBackground(ColorResources.TOOLTIP); - - // Sets tooltip title text. - String filePath = sl.getFilePath(); - int line = sl.getLineNumber(); - title.setText(filePath + CommonConstants.SPACE - + CommonConstants.SPACE + CommonConstants.NEW_LINE); - - // Creates tooltip label. - Label top = new Label(tooltip, SWT.NONE); - top.setForeground(ColorResources.BLACK); - top.setBackground(ColorResources.TOOLTIP); - - Label center = new Label(tooltip, SWT.NONE); - center.setForeground(ColorResources.RED); - center.setBackground(ColorResources.TOOLTIP); - - Label bottom = new Label(tooltip, SWT.NONE); - bottom.setForeground(ColorResources.BLACK); - bottom.setBackground(ColorResources.TOOLTIP); - - // Makes tooltip text. - BufferedReader reader = null; - StringBuilder topStr = new StringBuilder(CommonConstants.EMPTY); - StringBuilder centerStr = new StringBuilder(CommonConstants.EMPTY); - StringBuilder bottomStr = new StringBuilder(CommonConstants.EMPTY); - try { - reader = new BufferedReader(new FileReader(filePath)); - int topStart = line - SOURCE_LINE_TOP; - if (0 > topStart - 1) { - topStart = 1; - } - int topEnd = line; - int bottomStart = line + 1; - int bottomEnd = line + SOURCE_LINE_BOTTOM; - - for (int i = 0; i < topStart - 1; i++) { - reader.readLine(); - } - - String temp = null; - for (int i = topStart; i < topEnd; i++) { - if (null != (temp = reader.readLine())) { - topStr.append(i + CommonConstants.TAB + temp); - } else { - break; - } - if (i != topEnd - 1) { - topStr.append(CommonConstants.NEW_LINE); - } - } - - if (null != (temp = reader.readLine())) { - centerStr.append(line + CommonConstants.TAB + temp); - } - - for (int i = bottomStart; i < bottomEnd; i++) { - if (null != (temp = reader.readLine())) { - bottomStr.append(i + CommonConstants.TAB + temp); - } else { - break; - } - if (i != bottomEnd - 1) { - bottomStr.append(CommonConstants.NEW_LINE); - } - } - } catch (FileNotFoundException e) { - e.printStackTrace(); - createErrorTooltip(event, - AnalyzerConstants.SOURCE_FILE_NOT_FOUND); - } catch (IOException e) { - e.printStackTrace(); - } finally { - try { - reader.close(); - } catch (IOException e) { - e.printStackTrace(); - } - } - - // Sets tooltip text. - top.setText(topStr.toString()); - center.setText(centerStr.toString()); - bottom.setText(bottomStr.toString()); - - tooltipShow(event.x, event.y); - } - } - - private void tooltipShow(int x, int y) { - Point size = tooltip.computeSize(SWT.DEFAULT, SWT.DEFAULT); - Point pt = grid.toDisplay(x, y); - Rectangle displayRect = Display.getCurrent().getBounds(); - // 1. right side check! - pt.x = ((pt.x + size.x) > displayRect.width) ? pt.x - size.x - - TOOLTIP_OFFSET : pt.x + TOOLTIP_OFFSET; - // 2. bottom check! - pt.y = ((pt.y + size.y) > displayRect.height) ? pt.y - size.y - - TOOLTIP_OFFSET : pt.y + TOOLTIP_OFFSET; - tooltip.setBounds(pt.x, pt.y, size.x, size.y); - tooltip.setVisible(true); - } - - private void disposeTooltip() { - if (null != tooltip && !tooltip.isDisposed()) { - tooltip.dispose(); - tooltip = null; - } - } - - private SourceLine getSourceLine(GridItem item) { - // Gets source path and line. - DATableDataFormat tableData = (DATableDataFormat) item.getData(); - List data = tableData.getData(); - String addr = null; - int id = Integer.parseInt(data.get(LogCenterConstants.ID_INDEX)); - if (id == LogCenterConstants.LOG_USER_FUNCTION) { - addr = data.get(LogCenterConstants.CALLER_PCADDR_INDEX); - } else if (id == LogCenterConstants.TYPE_CALLSTACK) { - addr = (String) tableData.getObject(); - } else { - String seq = data.get(LogCenterConstants.SEQUENCE_NUMBER_INDEX); - if (seq == null || seq.isEmpty()) { - SourceLine sl = new SourceLine(); - sl.setError(AnalyzerConstants.SOURCELINE_NO_SOURCELINE_DATA); - return sl; - } - int seqNum = -1; - try { - seqNum = Integer.parseInt(seq); - } catch (NumberFormatException e) { - seq = data.get(LogCenterConstants.SEQUENCE_NUMBER_INDEX); - try { - seqNum = Integer.parseInt(seq); - } catch (Exception e2) { - // not supported action - SourceLine sl = new SourceLine(); - sl.setError(AnalyzerConstants.SOURCELINE_NO_SOURCELINE_DATA); - return sl; - } - } - if (seqNum < 0) { - SourceLine sl = new SourceLine(); - sl.setError(AnalyzerConstants.SOURCELINE_NO_SOURCELINE_DATA); - return sl; - } - addr = CallStackManager.getInstance().getPCAddrBySeq(seqNum); - } - boolean isPieBuild = AnalyzerManager.getProject().isPieBuild(); - String baseAddr = AnalyzerManager.getProject().getBaseAddress(); - String path = AnalyzerManager.getProject().getBinaryPath(); - SourceLine sl = SymbolManager.addr2line(path, addr, isPieBuild, - baseAddr); - return sl; - } - - private void openIDE(Event event) { - - SourceLine sl = null; - - GridItem item = grid.getItem(new Point(event.x, event.y)); - if (null == item) { - return; - } - sl = getSourceLine(item); - - if ((null == sl) || (!sl.isValid()) - || (IDECommunicator.isConnected() == false)) { - createErrorPopup(AnalyzerLabels.SOURCE_NOT_EXIST); - return; - } - - IDECommunicator.sendCodeInfoToIDE(sl.getFilePath(), - Integer.toString(sl.getLineNumber())); - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/InsertLogQueue.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/InsertLogQueue.java deleted file mode 100644 index da63c9d..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/InsertLogQueue.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.logparser; - -import java.util.ArrayList; -import java.util.List; - -public class InsertLogQueue { - List logs = null; - - private List getLogs() { - if (null == logs) { - logs = new ArrayList(); - } - return logs; - } - - public LogPackage getFirstLog() { - if (!isEmpty()) { - LogPackage output = logs.get(0); - logs.remove(0); - return output; - } - return null; - } - - public void push(LogPackage input) { - getLogs().add(input); - } - - public boolean isEmpty() { - return getLogs().isEmpty(); - } - - public int size() { - return getLogs().size(); - } - - public void clear() { - getLogs().clear(); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogCenterConstants.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogCenterConstants.java deleted file mode 100644 index f643327..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogCenterConstants.java +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.logparser; - -public class LogCenterConstants { - - /* probe IDs */ - public static final int LOG_MEMORY = 1; - public static final int LOG_CONTROL = 2; - public static final int LOG_RECODER = 3; - public static final int LOG_USER_FUNCTION = 4; - public static final int LOG_RESOURCE = 5; - public static final int LOG_LIFECYCLE = 6; - public static final int LOG_SCREENSHOT = 7; - public static final int LOG_SCENE = 8; - public static final int LOG_DEVICE = 9; - public static final int LOG_SAMPLE = 11; - public static final int LOG_THREAD = 12; - public static final int LOG_CUSTOM_CHART = 13; - public static final int LOG_SYNC = 14; - - public static final int TYPE_CALLSTACK = 99; - - /* log common index */ - public static final int ID_INDEX = 0; - public static final int SEQUENCE_NUMBER_INDEX = 1; - public static final int APINAME_INDEX = 2; - public static final int TIME_INDEX = 3; - public static final int PROCESS_ID_INDEX = 4; - public static final int THREAD_ID_INDEX = 5; - public static final int INPUTPARM_INDEX = 6; - public static final int RETURN_INDEX = 7; - public static final int PCADDR_INDEX = 8; - public static final int ERROR_INDEX = 9; - public static final int INTERNAL_FLAG_INDEX = 10; - public static final int CALLER_PCADDR_INDEX = 11; - - /* log memory : 1 */ - public static final int MEMORY_SIZE_INDEX = 12; - public static final int MEMORY_APITYPE_INDEX = 13; - public static final int MEMORY_ADDR_INDEX = 14; - public static final int MEMORY_RESERVED_INDEX = 15; - - /* Log UserInterface Control : 2 */ - public static final int USER_INTERFACE_CONTROL_LIST_PARENT_NAME_INDEX = 12; - public static final int USER_INTERFACE_CONTROL_LIST_PARENT_CLASS_NAME_INDEX = 13; - public static final int USER_INTERFACE_CONTROL_LIST_PARENT_POINTER_INDEX = 14; - public static final int USER_INTERFACE_CONTROL_LIST_CHILD_NAME_INDEX = 15; - public static final int USER_INTERFACE_CONTROL_LIST_CHILD_CLASS_NAME_INDEX = 16; - public static final int USER_INTERFACE_CONTROL_LIST_CHILD_POINTER_INDEX = 17; - public static final int USER_INTERFACE_CONTROL_LIST_CONTRIL_TYPE_INDEX = 18; - - /* Log UI Event : 3 */ - public static final int UI_EVENT_EVENT_TYPE = 12; - public static final int UI_EVENT_DETAIL_TYPE = 13; - public static final int UI_EVENT_X = 14; - public static final int UI_EVENT_Y = 15; - public static final int UI_EVENT_INFO1 = 16; - public static final int UI_EVENT_INFO2 = 17; - - /* log user function : 4 */ - public static final int USER_FUNCTION_BINARY_RANGE_START_INDEX = 12; - public static final int USER_FUNCTION_BINARY_RANGE_END_INDEX = 13; - public static final int USER_FUNCTION_TYPE_INDEX = 14; - public static final int USER_FUNCTION_ELAPSED_TIME_INDEX = 15; - - public static final int USER_FUNCTION_EVENT_TYPE_ENTER = 0; - public static final int USER_FUNCTION_EVENT_TYPE_EXIT = 1; - - public static final String USER_FUNCTION_CALLBACK_FUNC_SYMBOL = "(~~ internal library ~~"; //$NON-NLS-1$ - public static final String USER_FUNCTION_CALLBACK_FUNC = "~~ internal library ~~"; //$NON-NLS-1$ - public static final long USER_FUNCTION_CALLBACK_FUNC_ADDR = 0; - - /* log resource (file) : 5 */ - public static final int RESOURCE_SIZE_INDEX = 12; - public static final int RESOURCE_FDVALUE_INDEX = 13; - public static final int RESOURCE_FDTYPE_INDEX = 14; - public static final int RESOURCE_FDAPITYPE_INDEX = 15; - public static final int RESOURCE_FILE_SIZE_INDEX = 16; - public static final int RESOURCE_FILE_PATH_INDEX = 17; - public static final int RESOURCE_RESERVED_INDEX = 18; - - public static final int FD_TYPE_FILE = 0; - public static final int FD_TYPE_SOCKET = 1; - public static final int FD_TYPE_THREAD = 2; - - public static final String FD_API_TYPE_OPEN = "0"; //$NON-NLS-1$ - public static final String FD_API_TYPE_CLOSE = "1"; //$NON-NLS-1$ - public static final String FD_API_TYPE_READ = "2"; //$NON-NLS-1$ - public static final String FD_API_TYPE_WRITE = "3"; //$NON-NLS-1$ - public static final String FD_API_TYPE_OTHERS = "4"; //$NON-NLS-1$ - public static final String FD_API_INTERNAL_START = "11"; //$NON-NLS-1$ - public static final String FD_API_INTERNAL_CLOSE = "12"; //$NON-NLS-1$ - public static final String FD_API_WAIT = "13"; //$NON-NLS-1$ - public static final String FD_API_INTERNAL_USE = "14"; //$NON-NLS-1$ - - /* Log snapshot */ - public static final int SNAPSHOT_IMAGE_PATH_INDEX = 12; - public static final int SNAPSHOT_ROTATE_INDEX = 13; - - /* Log UserInterface Scene Transforms : 8 */ - public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_SCENE_NAME_INDEX = 12; - public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_FORM_NAME_INDEX = 13; - public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_FORM_POINTER_INDEX = 14; - public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_PANEL_NAME_INDEX = 15; - public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_PANEL_POINTER_INDEX = 16; - public static final int USER_INTERFACE_SCENE_TRANSFORMS_LIST_DIRECTION_INDEX = 17; - - /* log Device : 9 */ - public static final int DEVICE_ENERGY_INDEX = 2; - public static final int DEVICE_TIME_INDEX = TIME_INDEX; - public static final int DEVICE_WIFI_INDEX = 4; - public static final int DEVICE_BLUETOOTH_INDEX = 5; - public static final int DEVICE_GPS_INDEX = 6; - public static final int DEVICE_BRIGHTNESS_INDEX = 7; - public static final int DEVICE_CAMERA_INDEX = 8; - public static final int DEVICE_SOUND_INDEX = 9; - public static final int DEVICE_AUDIO_INDEX = 10; - public static final int DEVICE_VIBRATION_INDEX = 11; - public static final int DEVICE_VOLTAGE_INDEX = 12; - public static final int DEVICE_RSSI_INDEX = 13; - public static final int DEVICE_VIDEO_INDEX = 14; - public static final int DEVICE_CALL_INDEX = 15; - public static final int DEVICE_DNET_INDEX = 16; - public static final int DEVICE_CALL_ALPHA_INDEX = 17; - public static final int DEVICE_RSSI_ALPHA_INDEX = 18; - public static final int DEVICE_CPU_FREQUENCY_INDEX = 19; - public static final int DEVICE_APP_CPU_USAGE_INDEX = 20; - public static final int DEVICE_SYSTEM_CPU_USAGE_INDEX = 21; - public static final int DEVICE_VSS_MEMORY_INDEX = 22; - public static final int DEVICE_RSS_MEMORY_INDEX = 23; - public static final int DEVICE_SHARED_MEMORY_INDEX = 24; - public static final int DEVICE_PSS_MEMORY_INDEX = 25; - public static final int DEVICE_ALLOCATION_SIZE_INDEX = 26; - public static final int DEVICE_SYSTEM_TOTAL_MEMORY_INDEX = 27; - public static final int DEVICE_SYSTEM_USED_MEMORY_INDEX = 28; - public static final int DEVICE_SYSTEM_USED_STORAGE_INDEX = 29; - public static final int DEVICE_THREAD_COUNT_INDEX = 30; - public static final int DEVICE_THREAD_LOAD_INDEX = 31; - public static final int DEVICE_THREAD_RESERVED_INDEX = 32; - - /* thread log : 12 */ - public static final int THREAD_PTHREAD_ID_INDEX = 12; - public static final int THREAD_OSPTHREAD_ID_INDEX = 13; - public static final int THREAD_TYPE_INDEX = 14; - public static final int THREAD_API_TYPE_INDEX = 15; - - public static final int THREAD_TYPE_PTHREAD = 0; - public static final int THREAD_TYPE_OSP = 1; - public static final int THREAD_TYPE_MAIN = 2; - - public static final int THREAD_API_TYPE_NEW = 0; - public static final int THREAD_API_TYPE_START = 1; - public static final int THREAD_API_TYPE_STOP = 2; - public static final int THREAD_API_TYPE_EXIT = 3; - public static final int THREAD_API_TYPE_WAIT_START = 4; - public static final int THREAD_API_TYPE_WAIT_END = 5; - public static final int THREAD_API_TYPE_INTERNAL_START = 6; - public static final int THREAD_API_TYPE_INTERNAL_STOP = 7; - public static final int THREAD_API_TYPE_OTHER = 8; - - /* internal log */ - public static final int INTERNAL_CALL = 1; - public static final int USER_CALL = 2; - - /* custom log : 13 */ - public static final int CUSTOM_CHART_HANDLE = 12; - public static final int CUSTOM_CHART_TYPE = 13; - public static final int CUSTOM_CHART_TEXT = 14; - public static final int CUSTOM_CHART_COLOR = 15; - public static final int CUSTOM_CHART_VALUE = 16; - public static final int CUSTOM_CHART_RESERVED = 17; - - /* synchronization log : 14 */ - public static final int SYNC_VAL_INDEX = 12; - public static final int SYNC_TYPE_INDEX = 13; - public static final int SYNC_API_TYPE_INDEX = 14; - - public static final int SYNC_TYPE_OSP_MUTEX = 0; - public static final int SYNC_TYPE_OSP_MONITOR = 1; - public static final int SYNC_TYPE_OSP_SEMAPHORE = 2; - public static final int SYNC_TYPE_PTHREAD_MUTEX = 3; - public static final int SYNC_TYPE_PTHREAD_COND_VARIABLE = 4; - public static final int SYNC_TYPE_PTHREAD_RWLOCK = 5; - public static final int SYNC_TYPE_PTHREAD_SPINLOCK = 6; - public static final int SYNC_TYPE_PTHREAD_BARRIER = 7; - - public static final int SYNC_API_TYPE_NEW = 0; - public static final int SYNC_API_TYPE_ACQUIRE_WAIT_START = 1; - public static final int SYNC_API_TYPE_ACQUIRE_WAIT_END = 2; - public static final int SYNC_API_TYPE_RELEASE = 3; - public static final int SYNC_API_TYPE_TRY_ACQUIRE = 4; - public static final int SYNC_API_TYPE_COND_WAIT_START = 5; - public static final int SYNC_API_TYPE_COND_WAIT_END = 6; - public static final int SYNC_API_TYPE_NOTIFY = 7; - public static final int SYNC_API_TYPE_NOTIFY_ALL = 8; - public static final int SYNC_API_TYPE_OTHER = 9; - - /* Common Column Size */ - public static final int COMMON_COLUMN_SIZE_RID = 80; - public static final int COMMON_COLUMN_SIZE_ID = 20; - public static final int COMMON_COLUMN_SIZE_SEQNUMBER = 0; - public static final int COMMON_COLUMN_SIZE_APINAME = 100; - public static final int COMMON_COLUMN_SIZE_TIME = 120; - public static final int COMMON_COLUMN_SIZE_PID = 80; - public static final int COMMON_COLUMN_SIZE_TID = 80; - public static final int COMMON_COLUMN_SIZE_INPUTPARAM = 200; - public static final int COMMON_COLUMN_SIZE_RETURN = 0; - public static final int COMMON_COLUMN_SIZE_PCADDR = 0; - public static final int COMMON_COLUMN_SIZE_ERROR = 0; - - public static String getLogCenterNameFromId(int id) { - if (id == LOG_MEMORY) { - return "memory"; //$NON-NLS-1$ - } else if (id == LOG_USER_FUNCTION) { - return "user function"; //$NON-NLS-1$ - } else if (id == LOG_RESOURCE) { - return "resource"; //$NON-NLS-1$ - } else { - return "etc..."; //$NON-NLS-1$ - } - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogInserter.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogInserter.java deleted file mode 100644 index 5c9144e..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogInserter.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.logparser; - -import java.util.List; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.model.LogCenter; -import org.tizen.dynamicanalyzer.sql.SqlManager; - -/** log insert into database **/ -public class LogInserter implements Runnable { - - private static Thread insertLogThread = null; - private static InsertLogQueue insertLogQueue = null; - - public static void startInsertLogThread() { - if (null == insertLogThread || !insertLogThread.isAlive()) { - insertLogThread = new Thread(null, new LogInserter(), - AnalyzerConstants.INSERT_LOG_THREAD); - insertLogThread.start(); - } - } - - public static void stopInsertLogThread() { - if (null != insertLogThread && insertLogThread.isAlive()) { - insertLogThread.interrupt(); - } - } - - public static InsertLogQueue getInsertLogQueue() { - if (null == insertLogQueue) { - insertLogQueue = new InsertLogQueue(); - } - return insertLogQueue; - } - - public static void clear() { - stopInsertLogThread(); - getInsertLogQueue().clear(); - } - - /** insert thread **/ - private int packCount; - private LogPackage logPackage; - - public LogInserter() { - packCount = 0; - logPackage = new LogPackage(); - } - - public void initLogPackage() { - packCount = 0; - logPackage.clear(); - } - - private LogPackage getLogPackage() { - if (null == logPackage) { - logPackage = new LogPackage(); - } - return logPackage; - } - - @Override - public void run() { - List logcs = AnalyzerManager.getLogCenters(); - int size = logcs.size(); - InsertLogQueue logQueue = getInsertLogQueue(); - while (true) { - try { - if (!logQueue.isEmpty()) { - LogPackage logPack = logQueue.getFirstLog(); - packCount++; - for (int i = 0; i < size; i++) { - LogCenter logCenter = logcs.get(i); - Logs newLogs = new Logs(logCenter.getId()); - Logs logs = logPack.getLogs(logCenter.getId()); - if (null != logs) { - newLogs.getLogs().addAll(logs.getCloneLogs()); - getLogPackage().putLogs(logs); - } - } // for - } else { - Thread.sleep(AnalyzerConstants.LOG_CHECK_INTERVAL); - } - - if (packCount > AnalyzerConstants.INSERT_DATA_PACKAGE_SIZE - || (packCount > 0 && logQueue.isEmpty())) { - for (int i = 0; i < size; i++) { - LogCenter logCenter = logcs.get(i); - Logs logs = getLogPackage().getLogs(logCenter.getId()); - if (null != logs) { - SqlManager.insert(logCenter, logs.getLogs()); - int count = logCenter.getDataSize(); - count += logs.getLogs().size(); - logCenter.setDataSize(count); - } - } - initLogPackage(); - Thread.sleep(100); - } - } catch (InterruptedException e) { - // stop thread by interrupt - break; - } - } - System.out.println("insert log thread end"); //$NON-NLS-1$ - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogListQueue.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogListQueue.java deleted file mode 100644 index 5873de5..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogListQueue.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.tizen.dynamicanalyzer.logparser; - -import java.util.ArrayList; -import java.util.List; - -public class LogListQueue { - private List>> data = null; - - public LogListQueue() { - data = new ArrayList>>(); - } - - public List> getFirst() { - if (null == data) { - data = new ArrayList>>(); - return null; - } - List> output = data.get(0); - data.remove(0); - return output; - } - - public void putLog(List> input) { - if (null == data) { - data = new ArrayList>>(); - } - data.add(input); - } - - public boolean isEmpty() { - if (null == data) { - data = new ArrayList>>(); - } - return data.isEmpty(); - } - - public int size() { - return data.size(); - } - - public void clear() { - data.clear(); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogPackage.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogPackage.java deleted file mode 100644 index 01e53b3..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogPackage.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.logparser; - -import java.util.HashMap; -import java.util.List; - - -public class LogPackage { - private HashMap logMap; - - public void clear() - { - getLogMap().clear(); - } - - public LogPackage() { - logMap = new HashMap(); - } - - private HashMap getLogMap() - { - if (null == logMap) - { - logMap = new HashMap(); - } - return logMap; - } - public boolean isEmpty() - { - return getLogMap().isEmpty(); - } - - public void setLogs(int id, List input) { - Logs logs = getLogMap().get(id); - if (null == logs) - { - logs = new Logs(id); - logMap.put(id, logs); - } - logs.getLogs().add(input); - } - - public void setLogs(int id, Logs logs) - { - if (null != getLogMap().get(id)) - { - logMap.remove(id); - } - logMap.put(id, logs); - } - - public Logs getLogs(int id) - { - return getLogMap().get(id); - } - - public void putLogs(Logs logs) - { - if (null != logs) - { - int id = logs.getId(); - Logs base = getLogMap().get(id); - if (null == base) - { - logMap.put(id, logs); - } - else - { - base.getLogs().addAll(logs.getLogs()); - } - } - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogParser.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogParser.java deleted file mode 100644 index 403f01b..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogParser.java +++ /dev/null @@ -1,355 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.logparser; - -import java.io.File; -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.widgets.Display; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.CommonConstants; -import org.tizen.dynamicanalyzer.common.SymbolManager; -import org.tizen.dynamicanalyzer.communicator.DACommunicator; -import org.tizen.dynamicanalyzer.model.ImageInfo; -import org.tizen.dynamicanalyzer.model.LogCenter; -import org.tizen.dynamicanalyzer.nl.InformationViewLabels; -import org.tizen.dynamicanalyzer.project.Project; -import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackManager; -import org.tizen.dynamicanalyzer.ui.info.range.StopProcessManager; -import org.tizen.dynamicanalyzer.ui.page.BaseView; -import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; -import org.tizen.dynamicanalyzer.utils.ImageUtil; -import org.tizen.sdblib.SyncService; -import org.tizen.sdblib.SyncService.SyncResult; - -public class LogParser implements Runnable { - private final String OSP_MAIN = "OspMain"; //$NON-NLS-1$ - private final String TIME_POST_FIX = "00";//$NON-NLS-1$ - private static Thread logParser = null; - private static boolean dropCallTraceLog = false; - private static LogQueue logQueue = null; - - private int SMALL_IMG_WIDTH = 40; - private int SMALL_IMG_HEIGHT = 66; - - private int DEFAULT_IMG_WIDTH = 480; - private int DEFAULT_IMG_HEIGHT = 800; - - /** thread **/ - // range of values?? - private String pid = null; - private String lastLogSeqNumber = null; - - public static void clear() { - stopLogParser(); - getLogQueue().clear(); - } - - public static LogQueue getLogQueue() { - if (null == logQueue) { - logQueue = new LogQueue(); - } - return logQueue; - } - - public static void setDropCallTraceLog(boolean drop) { - dropCallTraceLog = drop; - } - - public static boolean isDrapCallTraceLog() { - return dropCallTraceLog; - } - - public static void startLogParser() { - if (null == logParser || !logParser.isAlive()) { - logParser = new Thread(null, new LogParser(), - AnalyzerConstants.LOG_QUEUE_OBSERVING_THREAD); - logParser.start(); - } - } - - public static void stopLogParser() { - if (null != logParser && logParser.isAlive()) { - logParser.interrupt(); - } - } - - public static boolean isLogParsingEnd() { - if (null != logParser && logParser.isAlive()) { - return false; - } - return true; - } - - /*** log parsing thread ***/ - @Override - public void run() { - AnalyzerManager.setLogParsingComplete(false); - LogQueue logQueue = getLogQueue(); - while (true) { - try { - if (!logQueue.isEmpty()) { - List logs = logQueue.getFirst(); - logSlicing(logs); - } else { - Thread.sleep(AnalyzerConstants.LOG_CHECK_INTERVAL); - } - } catch (InterruptedException e) { - /** thread stop by interrupt */ - break; - } - } - - /* log for debug */ - System.out.println("log parsing thread end!!"); //$NON-NLS-1$ - AnalyzerManager.setLogParsingComplete(true); - - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - StopProcessManager.getInstance().logParsingThreadEnd(); - } - }); - ToolbarArea.getInstance().stopTimer(); - } - - private void logSlicing(List logLumb) { - String[] slicedLog = null; - Project project = AnalyzerManager.getProject(); - - int size = logLumb.size(); - String logId = null; - LogPackage logPack = new LogPackage(); - - for (int i = 0; i < size; i++) { - if (logLumb.get(i).isEmpty()) { - continue; - } - String[] log = logLumb.get(i).split(CommonConstants.NEW_LINE); - - slicedLog = log[0].split(AnalyzerConstants.DATA_PARSING_TOKEN); - logId = slicedLog[LogCenterConstants.ID_INDEX]; - int id = Integer.parseInt(logId); - if (LogCenterConstants.LOG_DEVICE != id) { - if (null == pid) { - pid = slicedLog[LogCenterConstants.PROCESS_ID_INDEX]; - } else { - String p = slicedLog[LogCenterConstants.PROCESS_ID_INDEX]; - if (!pid.equals(p)) { - continue; - } - } - } - - String currentTime = null; - try { - currentTime = slicedLog[LogCenterConstants.TIME_INDEX]; - } catch (ArrayIndexOutOfBoundsException e) { - e.printStackTrace(); - return; - } - - long longTime = Long.parseLong(currentTime); - long lastTime = longTime - project.getStartTime(); - String modifyedTime = Long.toString(lastTime) + TIME_POST_FIX; - slicedLog[LogCenterConstants.TIME_INDEX] = modifyedTime; - - lastLogSeqNumber = slicedLog[LogCenterConstants.SEQUENCE_NUMBER_INDEX]; - if (Integer.parseInt(logId) == LogCenterConstants.LOG_USER_FUNCTION) { - String apiName = slicedLog[LogCenterConstants.APINAME_INDEX]; - if (apiName.isEmpty()) { - setFuncName(slicedLog); - } - - if (LogParser.isDrapCallTraceLog()) { - apiName = slicedLog[LogCenterConstants.APINAME_INDEX]; - if (!apiName.equals(OSP_MAIN)) { - continue; - } - LogParser.setDropCallTraceLog(false); - } - - String start = slicedLog[LogCenterConstants.USER_FUNCTION_BINARY_RANGE_START_INDEX]; - String end = slicedLog[LogCenterConstants.USER_FUNCTION_BINARY_RANGE_END_INDEX]; - if (!start.isEmpty() && !end.isEmpty() - && !AnalyzerManager.isBinStartEndSet()) { - AnalyzerManager.setBinaryStartEndAddr(start, end); - } - - if (CallStackManager.getInstance().isIrregularUserCall( - slicedLog)) { - continue; - } - pushLog(logId, slicedLog, logPack); - - /* user callstack create by entry and exit */ - CallStackManager.getInstance().makeUserCallstack(slicedLog); - } else if (Integer.parseInt(logId) == LogCenterConstants.LOG_DEVICE) { - pushLog(logId, slicedLog, logPack); - } else { - if (Integer.parseInt(logId) == LogCenterConstants.LOG_SCREENSHOT) { - String remoteImgPath = new String( - slicedLog[LogCenterConstants.SNAPSHOT_IMAGE_PATH_INDEX]); - String rotate = new String( - slicedLog[LogCenterConstants.SNAPSHOT_ROTATE_INDEX]); - processImage(remoteImgPath, rotate); - } - pushLog(logId, slicedLog, logPack); - CallStackManager.getInstance().makeCallstackWithoutBacktrace( - slicedLog); - if (id == LogCenterConstants.LOG_RESOURCE - || id == LogCenterConstants.LOG_MEMORY) { - AnalyzerManager.getLeakDetector().runLeakDectect(slicedLog); - } - - AnalyzerManager.getFailedChecker().check(slicedLog); - } - } - AnalyzerManager.getProject().setLastLogNum(lastLogSeqNumber); - - updateLog(logPack); - } - - private void processImage(final String from, String rotate) { - final String fileName = getImageName(from); - final String to = AnalyzerManager.getProject().getSavePath() - + File.separator + AnalyzerConstants.IMAGE_FOLDER_NAME - + File.separator + fileName; - final int angle = Integer.parseInt(rotate); - - new Thread(null, new Runnable() { - @Override - public void run() { - SyncResult res = DACommunicator.pull(from, to); - if (null != res && SyncService.RESULT_OK == res.getCode()) { - DACommunicator.remove(from); - /* image resizing */ - String smallImagePath = AnalyzerManager.getProject() - .getSavePath() - + File.separator - + AnalyzerConstants.IMAGE_FOLDER_NAME - + File.separator - + AnalyzerConstants.SMALL_IMAGE_FOLDER_NAME - + File.separator + fileName; - ImageUtil.transform(to, to, DEFAULT_IMG_WIDTH, - DEFAULT_IMG_HEIGHT, angle); - if (angle == 90 || angle == 270) { - ImageUtil.resize(to, smallImagePath, SMALL_IMG_HEIGHT, - SMALL_IMG_WIDTH); - } else { - ImageUtil.resize(to, smallImagePath, SMALL_IMG_WIDTH, - SMALL_IMG_HEIGHT); - } - } else { - System.out.println("Failed to get '" + from + "' file"); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - }, AnalyzerConstants.MESSAGE_INTERNAL_IMAGE_THREAD).start(); - - } - - private String getImageName(String fullPath) { - String name = null; - name = fullPath - .substring(fullPath.lastIndexOf(CommonConstants.SLASH) + 1); - return name; - } - - private void updateLog(LogPackage logPack) { - if (null == logPack || logPack.isEmpty()) { - return; - } - - /* 1. InsertLog extension */ - LogInserter.getInsertLogQueue().push(logPack); - LogInserter.startInsertLogThread(); - - BaseView bv = (BaseView) AnalyzerUtil.getViewPart(BaseView.ID); - bv.getMainTab().updateLog(logPack); - } - - private void setFuncName(String[] input) { - boolean isPieBuild = AnalyzerManager.getProject().isPieBuild(); - String baseAddr = AnalyzerManager.getProject().getBaseAddress(); - String path = AnalyzerManager.getProject().getBinaryPath(); - String pcAddr = input[LogCenterConstants.PCADDR_INDEX]; - String functionName = SymbolManager.addr2func(path, pcAddr, isPieBuild, - baseAddr); - if (null == functionName || functionName.isEmpty()) { - functionName = InformationViewLabels.CALLSTACK_TABLE_UNKNOWN_FUNCTION; - } else { - String prevFunctionName = functionName; - functionName = SymbolManager - .demanglingFunctionName(prevFunctionName); - } - - input[LogCenterConstants.APINAME_INDEX] = functionName; - } - - private void pushLog(String logId, String[] slicedLog, LogPackage logPack) { - - int id = -1; - try { - id = Integer.parseInt(logId); - } catch (NumberFormatException e) { - /* log for debug */ - System.out.println("in pushLog : 'id' number format is wrong!!"); - return; - } - if (id < 0) { - return; - } - - List input = new ArrayList(); - LogCenter logc = AnalyzerManager.getLogCenterById(id); - if (null == logc) { - return; - } - - int count = logc.getTotalColumnCount(); - int length = slicedLog.length; - for (int i = 0; i < count; i++) { - if (i < length && i < count) { - input.add(slicedLog[i]); - } else { - input.add(CommonConstants.EMPTY); - } - } - - if (id == LogCenterConstants.LOG_SCREENSHOT) { - ImageInfo imgInfo = new ImageInfo(); - imgInfo.setSeq(input.get(LogCenterConstants.SEQUENCE_NUMBER_INDEX)); - imgInfo.setTime(input.get(LogCenterConstants.TIME_INDEX)); - AnalyzerManager.getImageSet().put(imgInfo.getSeq(), imgInfo); - } - - logPack.setLogs(id, input); - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogQueue.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogQueue.java deleted file mode 100644 index a943ed6..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogQueue.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.logparser; - -import java.util.ArrayList; -import java.util.List; - -/** log queue model **/ -public class LogQueue { - private List> data = null; - - public LogQueue() { - data = new ArrayList>(); - } - - public List getFirst() { - if (null == data) { - data = new ArrayList>(); - return null; - } - List output = data.get(0); - data.remove(0); - return output; - } - - public void putLog(List input) { - if (null == data) { - data = new ArrayList>(); - } - data.add(input); - } - - public boolean isEmpty() { - if (null == data) { - data = new ArrayList>(); - } - return data.isEmpty(); - } - - public int size() { - return data.size(); - } - - public void clear() { - data.clear(); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/Logs.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/Logs.java deleted file mode 100644 index 360414f..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/Logs.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.logparser; - -import java.util.ArrayList; -import java.util.List; - -public class Logs { - private List> logs; - int logCenterId; - - public Logs(int id) { - logs = new ArrayList>(); - logCenterId = id; - } - - public int getId() { - return logCenterId; - } - - // getLogs -> getRawLogs - public List> getLogs() { - if (null == logs) { - logs = new ArrayList>(); - } - return logs; - } - - public void setLogs(List> input) { - logs = input; - } - - public void setLogCenterId(int id) { - logCenterId = id; - } - - // cloneLogs -> getLogs - public List> getCloneLogs() { - List> newLogs = new ArrayList>(); - int size = logs.size(); - for (int i = 0; i < size; i++) { - List newLog = new ArrayList(); - newLog.addAll(logs.get(i)); - newLogs.add(newLog); - } - return newLogs; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/MessageProcess.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/MessageProcess.java deleted file mode 100644 index 5aeebe9..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/MessageProcess.java +++ /dev/null @@ -1,363 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.logparser; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.Timer; -import java.util.TimerTask; -import java.util.concurrent.locks.Lock; -import java.util.concurrent.locks.ReentrantLock; - -import org.eclipse.swt.widgets.Display; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.CommonConstants; -import org.tizen.dynamicanalyzer.communicator.DACommunicator; -import org.tizen.dynamicanalyzer.handlers.StopHandler; -import org.tizen.dynamicanalyzer.nl.AnalyzerLabels; -import org.tizen.dynamicanalyzer.services.RecordStateSourceProvider; -import org.tizen.dynamicanalyzer.ui.info.range.StopProcessManager; -import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfiler; -import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineMaster; -import org.tizen.dynamicanalyzer.ui.toolbar.RecordStartStopThread; -import org.tizen.dynamicanalyzer.ui.toolbar.StopLogProcessor; -import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea; -import org.tizen.dynamicanalyzer.uirecorder.UIRecorderTool; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; -import org.tizen.sdblib.SyncService; -import org.tizen.sdblib.SyncService.SyncResult; - -public class MessageProcess { - - /* Message Buffer max length */ - final int MSG_BUFFER_MAX = 100; - final int MSG_BUFFER_TIMER_DELAY = 5; - final int MSG_BUFFER_TIMER_PERIOD = 1000; // 1 second - - class AddBufferTimerTask extends TimerTask { - @Override - public void run() { - if (!buffer.isEmpty()) { - addBufferToList(); - } - } - } - - private List buffer = new ArrayList();; - private Lock lock = new ReentrantLock(); - private Timer timer = null; - - private static MessageProcess receivedMessage = new MessageProcess(); - private int messageCount = 0; - - public static MessageProcess getInstance() { - return receivedMessage; - } - - public void startTimer() { - timer = new Timer(); - timer.scheduleAtFixedRate(new AddBufferTimerTask(), - MSG_BUFFER_TIMER_DELAY, MSG_BUFFER_TIMER_PERIOD); - } - - public void stopTimer() { - if (null != timer) { - timer.cancel(); - timer = null; - } - } - - private void addBufferToList() { - lock.lock(); - if (null == buffer || 0 == buffer.size()) { - lock.unlock(); - return; - } - LogParser.getLogQueue().putLog(buffer); - buffer = new ArrayList(); - lock.unlock(); - } - - public void processMessage(String message) { - // DO NOT DELETE : for debugging - // System.out.println("count " + messageCount + ": " + message); - try { - String[] messages = message - .split(CommonConstants.CMD_SPLIT_READ, 2); - int messageIndex = Integer.parseInt(messages[0]); - - switch (messageIndex) { - case AnalyzerConstants.MSG_APP_INFO: /* app info : 1 */ - if (!AnalyzerManager.isAppInfoArrived()) { - processAppInfo(messages[1]); - setDeviceInfo(messages[1]); - AnalyzerManager.setAppInfoArrived(true); - } - break; - case AnalyzerConstants.MSG_USER_PROFILING_SAMPLE: /* sample : 3 */ - if (!AnalyzerManager.hasSampleThread()) { - AnalyzerManager.setSampleThread(true); - } - processUserProfiling(messages[1]); - break; - case AnalyzerConstants.MSG_DEVICE_LOG: /* device info : 4 */ - case AnalyzerConstants.MSG_LOG: /* log : 5 */ -// if (AnalyzerConstants.MSG_LOG == messageIndex) { -// System.out -// .println("count " + messageCount + ": " + message); -// } - buffer.add(messages[1]); - messageCount += 1; - break; - case AnalyzerConstants.MSG_IMAGE: /* screenshot : 6 */ - processImage(messages[1]); - break; - case AnalyzerConstants.MSG_TERMINATE: /* terminate : 7 */ - processTerminate(); - break; - case AnalyzerConstants.MSG_DEBUG: /* debug message : 9 */ - default: - // System.out.println("DA_LOG : " + message); //$NON-NLS-1$ - break; - } - - if (MSG_BUFFER_MAX < messageCount) { - addBufferToList(); - messageCount = 0; - } - - } catch (NumberFormatException e) { - e.printStackTrace(); - } - } - - private void processAppInfo(String message) { - String[] datas = message.split(AnalyzerConstants.DATA_PARSING_TOKEN); - List appInfo = AnalyzerManager.getProject().getAppInfo(); - int size = datas.length; - for (int i = 0; i < size; i++) { - appInfo.set(i, new String(datas[i])); - } - - if (size - 1 < AnalyzerConstants.APP_INFO_BINARY_PATH - || null == appInfo.get(AnalyzerConstants.APP_INFO_BINARY_PATH) - || appInfo.get(AnalyzerConstants.APP_INFO_BINARY_PATH) - .isEmpty()) { - ToolbarArea.getInstance().setSourceViewEnable(false); - ToolbarArea.getInstance().setSourceViewTooltip( - AnalyzerLabels.MESSAGE_PROCESS_PG_WARNING); - } else { - ToolbarArea.getInstance().setSourceViewEnable(true); - ToolbarArea.getInstance().setSourceViewTooltip( - AnalyzerLabels.MESSAGE_PROCESS_VIEW_SOURCE); - } - - // User Call Trace : App is Tizen C++ or Tizen native - int type = Integer.parseInt(appInfo - .get(AnalyzerConstants.APP_INFO_APP_TYPE)); - if (type == AnalyzerConstants.APP_TYPE_OSP) { - LogParser.setDropCallTraceLog(true); - } - } - - private void setDeviceInfo(String message) { - String[] datas = message.split(AnalyzerConstants.DATA_PARSING_TOKEN); - TimelineMaster.getInstance().initAppInfo(datas); - } - - private String getImageName(String fullPath) { - String name = null; - name = fullPath - .substring(fullPath.lastIndexOf(CommonConstants.SLASH) + 1); - return name; - } - - private void processImage(final String from) { - final String fileName = getImageName(from); - final String to = AnalyzerManager.getProject().getSavePath() - + File.separator + AnalyzerConstants.IMAGE_FOLDER_NAME - + File.separator + fileName; - - new Thread(null, new Runnable() { - @Override - public void run() { - SyncResult res = DACommunicator.pull(from, to); - if (null != res && SyncService.RESULT_OK == res.getCode()) { - DACommunicator.remove(from); - } else { - System.out.println("Failed to get '" + from + "' file"); //$NON-NLS-1$ //$NON-NLS-2$ - } - } - }, AnalyzerConstants.MESSAGE_INTERNAL_IMAGE_THREAD).start(); - - } - - private void syncStopTrace() { - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - ToolbarArea.getInstance().setStartButtonEnablement(false); - ToolbarArea.getInstance().setToolbarEnablement(false); - ToolbarArea.getInstance().stopTrace(); - } - }); - } - - private void processTerminate() { - DACommunicator.setRunning(false); - AnalyzerUtil.setRecordState(RecordStateSourceProvider.RECORD_READY); - RecordStartStopThread.runStartStopThread(); - - addBufferToList(); - UIRecorderTool.getInstance().stop(); - System.out - .println("stop log process thread call by process terminated"); //$NON-NLS-1$ - } - - private String message = null; - private String[] messages = null; - - private int sentenceIndex = -1; - private String sentence = null; - - public void run(BufferedReader bufferedReader) { - - startTimer(); - - try { - while (DACommunicator.isRunning() - && null != (message = bufferedReader.readLine())) { - if (message.isEmpty()) { - continue; - } - - messages = message.split(CommonConstants.CMD_SPLIT_READ, 2); - - try { - int index = Integer.parseInt(messages[0]); - if (AnalyzerConstants.MSG_APP_INFO == index) { - sentenceIndex = AnalyzerConstants.MSG_APP_INFO; - sentence = message; - } else { - if (AnalyzerConstants.MSG_APP_INFO == sentenceIndex) { - processMessage(sentence); - sentence = null; - sentenceIndex = -1; - } - - if (AnalyzerConstants.MSG_LOG == index - || AnalyzerConstants.MSG_USER_PROFILING_SAMPLE == index) { - sentenceIndex = AnalyzerConstants.MSG_LOG; - if (null != sentence) { - processMessage(sentence); - } - sentence = message; - } else { - processMessage(message); - } - } - } catch (NumberFormatException e) { - if (message.endsWith(AnalyzerConstants.CALLSTACK_END)) { - sentence += CommonConstants.NEW_LINE + message; - processMessage(sentence); - sentence = null; - sentenceIndex = -1; - } else { - if (null != sentence) { - sentence += CommonConstants.NEW_LINE_CHAR + message; - if (AnalyzerConstants.MSG_APP_INFO == sentenceIndex) { - processMessage(sentence); - sentence = null; - sentenceIndex = -1; - } - } - } - } - } - } catch (IOException e) { - System.out - .println("### socket timeout - TODO: show this as a dialog."); //$NON-NLS-1$ - - UIRecorderTool.getInstance().stop(); - - syncStopTrace(); - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - StopProcessManager - .getInstance() - .stopProcessStart( - AnalyzerLabels.STOP_PROCESS_DLG_DEVICE_DISCONNECTED); // socket - // timeout - } - }); - System.out - .println("stop log process thread call by socket time out"); //$NON-NLS-1$ - // AnalyzerManager.runStopLogProcessThread(); - - } finally { - message = null; - - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - if (!AnalyzerManager.isExit()) { - StopProcessManager - .getInstance() - .stopProcessStart( - AnalyzerLabels.STOP_PROCESS_DLG_SUMMARIZING_DATA); - } - } - }); - addBufferToList(); - stopTimer(); - - DACommunicator.closeSocket(); - DACommunicator.unfoward(DACommunicator.LOCAL_PORT, - DACommunicator.REMOTE_PORT); - - // FIXME: unexpceted terminated - popup window? - UIRecorderTool.getInstance().stop(); - - syncStopTrace(); - System.out.println("finally part run stop log process thread"); //$NON-NLS-1$ - StopLogProcessor.runStopLogProcessThread(); - AnalyzerUtil.executeCommand(StopHandler.ID); - } - } - - public void processUserProfiling(String input) { - // FunctionUsageProfiler profiler = AnalyzerManager - // .getFunctionUserProfiler(); - FunctionUsageProfiler profiler = FunctionUsageProfiler.getInstance(); - profiler.pushSample(input); - // profiler.makeFunctionUsageProfileData(input); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/BaseLogCenter.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/BaseLogCenter.java deleted file mode 100644 index 651d4ea..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/BaseLogCenter.java +++ /dev/null @@ -1,327 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.1-b02-fcs -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.04.18 at 02:25:05 오후 KST -// - - -package org.tizen.dynamicanalyzer.model; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for BaseLogCenter complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="BaseLogCenter">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="id" type="{http://www.w3.org/2001/XMLSchema}int"/>
- *         <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="totalColumnCount" type="{http://www.w3.org/2001/XMLSchema}int"/>
- *         <element name="customColumn" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
- *         <element name="ColumnName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="type" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="ColumnSize" type="{http://www.w3.org/2001/XMLSchema}int" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="ColumnOrder" type="{http://www.w3.org/2001/XMLSchema}int" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="ColumnVisibility" type="{http://www.w3.org/2001/XMLSchema}boolean" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="TableColumnName" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "BaseLogCenter", propOrder = { - "id", - "name", - "totalColumnCount", - "customColumn", - "columnName", - "type", - "columnSize", - "columnOrder", - "columnVisibility", - "tableColumnName" -}) -@XmlRootElement(name = "BaseLogCenter") -public class BaseLogCenter { - - protected int id; - @XmlElement(required = true) - protected String name; - protected int totalColumnCount; - protected boolean customColumn; - @XmlElement(name = "ColumnName") - protected List columnName; - protected List type; - @XmlElement(name = "ColumnSize", type = Integer.class) - protected List columnSize; - @XmlElement(name = "ColumnOrder", type = Integer.class) - protected List columnOrder; - @XmlElement(name = "ColumnVisibility", type = Boolean.class) - protected List columnVisibility; - @XmlElement(name = "TableColumnName") - protected List tableColumnName; - - /** - * Gets the value of the id property. - * - */ - public int getId() { - return id; - } - - /** - * Sets the value of the id property. - * - */ - public void setId(int value) { - this.id = value; - } - - /** - * Gets the value of the name property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setName(String value) { - this.name = value; - } - - /** - * Gets the value of the totalColumnCount property. - * - */ - public int getTotalColumnCount() { - return totalColumnCount; - } - - /** - * Sets the value of the totalColumnCount property. - * - */ - public void setTotalColumnCount(int value) { - this.totalColumnCount = value; - } - - /** - * Gets the value of the customColumn property. - * - */ - public boolean isCustomColumn() { - return customColumn; - } - - /** - * Sets the value of the customColumn property. - * - */ - public void setCustomColumn(boolean value) { - this.customColumn = value; - } - - /** - * Gets the value of the columnName property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the columnName property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getColumnName().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link String } - * - * - */ - public List getColumnName() { - if (columnName == null) { - columnName = new ArrayList(); - } - return this.columnName; - } - - /** - * Gets the value of the type property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the type property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getType().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link String } - * - * - */ - public List getType() { - if (type == null) { - type = new ArrayList(); - } - return this.type; - } - - /** - * Gets the value of the columnSize property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the columnSize property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getColumnSize().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link Integer } - * - * - */ - public List getColumnSize() { - if (columnSize == null) { - columnSize = new ArrayList(); - } - return this.columnSize; - } - - /** - * Gets the value of the columnOrder property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the columnOrder property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getColumnOrder().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link Integer } - * - * - */ - public List getColumnOrder() { - if (columnOrder == null) { - columnOrder = new ArrayList(); - } - return this.columnOrder; - } - - /** - * Gets the value of the columnVisibility property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the columnVisibility property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getColumnVisibility().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link Boolean } - * - * - */ - public List getColumnVisibility() { - if (columnVisibility == null) { - columnVisibility = new ArrayList(); - } - return this.columnVisibility; - } - - /** - * Gets the value of the tableColumnName property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the tableColumnName property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getTableColumnName().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link String } - * - * - */ - public List getTableColumnName() { - if (tableColumnName == null) { - tableColumnName = new ArrayList(); - } - return this.tableColumnName; - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/Check.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/Check.java deleted file mode 100644 index 813bde3..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/Check.java +++ /dev/null @@ -1,164 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.1-b02-fcs -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.04.18 at 02:25:05 오후 KST -// - - -package org.tizen.dynamicanalyzer.model; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for Check complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="Check">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="name" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="type" type="{http://www.w3.org/2001/XMLSchema}int"/>
- *         <element name="category" type="{http://www.w3.org/2001/XMLSchema}int"/>
- *         <element name="keyIndex" type="{http://www.w3.org/2001/XMLSchema}int"/>
- *         <element name="freeIndex" type="{http://www.w3.org/2001/XMLSchema}int"/>
- *         <element name="checkUserCall" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "Check", propOrder = { - "name", - "type", - "category", - "keyIndex", - "freeIndex", - "checkUserCall" -}) -public class Check { - - @XmlElement(required = true) - protected String name; - protected int type; - protected int category; - protected int keyIndex; - protected int freeIndex; - protected boolean checkUserCall; - - /** - * Gets the value of the name property. - * - * @return - * possible object is - * {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is - * {@link String } - * - */ - public void setName(String value) { - this.name = value; - } - - /** - * Gets the value of the type property. - * - */ - public int getType() { - return type; - } - - /** - * Sets the value of the type property. - * - */ - public void setType(int value) { - this.type = value; - } - - /** - * Gets the value of the category property. - * - */ - public int getCategory() { - return category; - } - - /** - * Sets the value of the category property. - * - */ - public void setCategory(int value) { - this.category = value; - } - - /** - * Gets the value of the keyIndex property. - * - */ - public int getKeyIndex() { - return keyIndex; - } - - /** - * Sets the value of the keyIndex property. - * - */ - public void setKeyIndex(int value) { - this.keyIndex = value; - } - - /** - * Gets the value of the freeIndex property. - * - */ - public int getFreeIndex() { - return freeIndex; - } - - /** - * Sets the value of the freeIndex property. - * - */ - public void setFreeIndex(int value) { - this.freeIndex = value; - } - - /** - * Gets the value of the checkUserCall property. - * - */ - public boolean isCheckUserCall() { - return checkUserCall; - } - - /** - * Sets the value of the checkUserCall property. - * - */ - public void setCheckUserCall(boolean value) { - this.checkUserCall = value; - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/ColumnData.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/ColumnData.java deleted file mode 100644 index 10776f3..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/ColumnData.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.tizen.dynamicanalyzer.model; - -import java.util.ArrayList; -import java.util.List; - -public class ColumnData { - private String text = null; - private int width = 0; - private List children = null; - - public ColumnData(String columnName) { - text = columnName; - children = new ArrayList(); - } - - public ColumnData(String columnName, int width) { - text = columnName; - this.width = width; - children = new ArrayList(); - } - - public String getText() { - return text; - } - - public List getChildren() { - return children; - } - - public boolean isParent() { - if (children.isEmpty()) { - return false; - } - return true; - } - - public void setWidth(int width) { - this.width = width; - } - - public int getWidth() { - return width; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/DAException.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/DAException.java deleted file mode 100644 index 98de204..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/DAException.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.tizen.dynamicanalyzer.model; - -public class DAException extends Exception { - /** - * - */ - private static final long serialVersionUID = 1L; - private String message = null; - - public DAException(String msg) { - super("DAException"); - message = msg; - } - - public String getMessage() { - return message; - } - - public void setMessage(String msg) { - message = msg; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/DAView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/DAView.java deleted file mode 100644 index 8258acd..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/DAView.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.model; - -import java.util.List; - -import org.eclipse.swt.custom.SashForm; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.logparser.LogPackage; -import org.tizen.dynamicanalyzer.ui.page.ViewAction; - -public class DAView extends Composite implements ViewAction { - protected String name = null; - protected int[] oldInnerLayout = null; - protected int[] oldOuterLayout = null; - - private int[] innerMaxWeight = null; - private int[] outerMaxWeight = null; - - public DAView(Composite parent, int style) { - super(parent, style); - // TODO Auto-generated constructor stub - } - - @Override - public void updateView() { - // TODO Auto-generated method stub - - } - - @Override - public void updateLog(LogPackage logPack) { - // TODO Auto-generated method stub - - } - - @Override - public void clear() { - // TODO Auto-generated method stub - - } - - @Override - public Control getControl() { - // TODO Auto-generated method stub - return null; - } - - @Override - public void updateView(DASelectionData data) { - // TODO Auto-generated method stub - - } - - @Override - public void otherViewSelectionOccured() { - // TODO Auto-generated method stub - - } - - @Override - public String getViewName() { - return name; - } - - public void setMaxSize(boolean maximized) { - - if (null == innerMaxWeight || null == outerMaxWeight) { - return; - } - - Composite parent = getParent(); - if (!(parent instanceof SashForm)) { - parent = parent.getParent(); - if (!(parent instanceof SashForm)) { - return; - } - } - - Composite pParent = parent.getParent(); - if (!(pParent instanceof SashForm)) { - return; - } - - SashForm innerForm = (SashForm) parent; - SashForm outerForm = (SashForm) pParent; - - if (maximized) { - oldInnerLayout = innerForm.getWeights(); - oldOuterLayout = outerForm.getWeights(); - innerForm.setWeights(innerMaxWeight); - outerForm.setWeights(outerMaxWeight); - } else { - innerForm.setWeights(oldInnerLayout); - outerForm.setWeights(oldOuterLayout); - } - } - - public void setMaxWeight(int[] inner, int[] outer) { - innerMaxWeight = inner; - outerMaxWeight = outer; - } - - @Override - public void setSelection(List data) { - // TODO Auto-generated method stub - - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/FindProperty.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/FindProperty.java deleted file mode 100644 index 0ab85fe..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/FindProperty.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.tizen.dynamicanalyzer.model; - -import org.tizen.dynamicanalyzer.common.CommonConstants; - -public class FindProperty { - private boolean backward; - private boolean caseSensitive; - private boolean wholeWord; - private int index; - private String lastSearch; - - public FindProperty() { - backward = false; - caseSensitive = false; - wholeWord = false; - index = -1; - lastSearch = CommonConstants.EMPTY; - } - - public String getLastSearch() { - return lastSearch; - } - - public void setLastSearch(String lastSearch) { - this.lastSearch = lastSearch; - } - - public boolean isBackward() { - return backward; - } - - public void setBackward(boolean backward) { - this.backward = backward; - } - - public boolean isCaseSensitive() { - return caseSensitive; - } - - public void setCaseSensitive(boolean caseSensitive) { - this.caseSensitive = caseSensitive; - } - - public boolean isWholeWord() { - return wholeWord; - } - - public void setWholeWord(boolean wholeWord) { - this.wholeWord = wholeWord; - } - - public int getIndex() { - return index; - } - - public void setIndex(int index) { - this.index = index; - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/ImageInfo.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/ImageInfo.java deleted file mode 100644 index 2116ea3..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/ImageInfo.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.model; - -public class ImageInfo { - private String seq; - private String time; - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public void setSeq(String seq) { - this.seq = seq; - } - - public String getSeq() - { - return seq; - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/LeakCheckList.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/LeakCheckList.java deleted file mode 100644 index c7731bd..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/LeakCheckList.java +++ /dev/null @@ -1,77 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.1-b02-fcs -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.04.18 at 02:25:05 오후 KST -// - - -package org.tizen.dynamicanalyzer.model; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlRootElement; - - - -/** - *

Java class for LeakCheckList complex type. - * - *

The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="LeakCheckList">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="checks" type="{org.tizen.dynamicanalyzer}Check" maxOccurs="unbounded" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "LeakCheckList", propOrder = { - "checks" -}) -@XmlRootElement(name = "LeakCheckList") -public class LeakCheckList { - - protected List checks; - - /** - * Gets the value of the checks property. - * - *

- * This accessor method returns a reference to the live list, - * not a snapshot. Therefore any modification you make to the - * returned list will be present inside the JAXB object. - * This is why there is not a set method for the checks property. - * - *

- * For example, to add a new item, do as follows: - *

-     *    getChecks().add(newItem);
-     * 
- * - * - *

- * Objects of the following type(s) are allowed in the list - * {@link Check } - * - * - */ - public List getChecks() { - if (checks == null) { - checks = new ArrayList(); - } - return this.checks; - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/LogCenter.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/LogCenter.java deleted file mode 100644 index a5959ca..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/LogCenter.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.model; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import org.tizen.dynamicanalyzer.sql.SqlManager; -import org.tizen.dynamicanalyzer.ui.summary.leaks.LeakData; - -public class LogCenter extends BaseLogCenter { - - private String insertQuery = null; - private String selectCountQuery = null; - private int dataSize = 0; - private HashMap leakHash = null; - private int index = 0; - private List columnSizes = null; - private boolean leakHashLock = false; - - public List getColumnSizes() { - if (null == columnSizes) { - columnSizes = new ArrayList(); - } - return columnSizes; - } - - public int getIndex() { - return index; - } - - public void addIndex() { - index++; - } - - public int getDataSize() { - return dataSize; - } - - public void setDataSize(int size) { - dataSize = size; - } - - public String getInsertQuery() { - if (null == insertQuery) { - insertQuery = SqlManager.createInsertQuery(this); - } - return insertQuery; - } - - public String getSelectCountQuery() { - if (null == selectCountQuery) { - StringBuffer query = new StringBuffer(); - query.append("select count(*) from "); //$NON-NLS-1$ - query.append(this.name); - query.append(";"); //$NON-NLS-1$ - selectCountQuery = query.toString(); - } - return selectCountQuery; - } - - private HashMap getLeakHash() { - if (null == leakHash) { - leakHash = new HashMap(); - } - return leakHash; - } - - private void leakHashLock() { - while (leakHashLock) { - try { - Thread.sleep(500); - } catch (InterruptedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - leakHashLock = true; - } - - private void leakHashUnLock() { - leakHashLock = false; - } - - public LeakData getLeakData(String key) { - leakHashLock(); - LeakData ret = getLeakHash().get(key); - leakHashUnLock(); - return ret; - } - - public void removeLeakData(String key) { - leakHashLock(); - getLeakHash().remove(key); - leakHashUnLock(); - } - - public void putLeakData(String key, LeakData value) { - leakHashLock(); - getLeakHash().put(key, value); - leakHashUnLock(); - } - - public int sizeOfLeakDatas() { - leakHashLock(); - int ret = getLeakHash().size(); - leakHashUnLock(); - return ret; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/ObjectFactory.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/ObjectFactory.java deleted file mode 100644 index 8e8160e..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/ObjectFactory.java +++ /dev/null @@ -1,64 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.1-b02-fcs -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.04.18 at 02:25:05 오후 KST -// - - -package org.tizen.dynamicanalyzer.model; - -import javax.xml.bind.annotation.XmlRegistry; - - - -/** - * This object contains factory methods for each - * Java content interface and Java element interface - * generated in the org.tizen.dynamicanalyzer.model package. - *

An ObjectFactory allows you to programatically - * construct new instances of the Java representation - * for XML content. The Java representation of XML - * content can consist of schema derived interfaces - * and classes representing the binding of schema - * type definitions, element declarations and model - * groups. Factory methods for each of these are - * provided in this class. - * - */ -@XmlRegistry -public class ObjectFactory { - - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.tizen.dynamicanalyzer.model - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link Check } - * - */ - public Check createCheck() { - return new Check(); - } - - /** - * Create an instance of {@link LeakCheckList } - * - */ - public LeakCheckList createLeakCheckList() { - return new LeakCheckList(); - } - - /** - * Create an instance of {@link BaseLogCenter } - * - */ - public BaseLogCenter createBaseLogCenter() { - return new BaseLogCenter(); - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/SnapShotInfo.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/SnapShotInfo.java deleted file mode 100644 index ba62dea..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/SnapShotInfo.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.model; - -public class SnapShotInfo { - private double snapshotTime; - private int snapshotSeq; - - public double getTime() { - return snapshotTime; - } - - public void setTime(long time) { - snapshotTime = time; - } - - public int getSequence() { - return snapshotSeq; - } - - public void setSequence(int sequence) { - snapshotSeq = sequence; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/SnapshotData.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/SnapshotData.java deleted file mode 100644 index 4555105..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/SnapshotData.java +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.model; - -import java.awt.Color; -import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.CommonConstants; -import org.tizen.dynamicanalyzer.common.SnapshotConstants; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.project.Project; -import org.tizen.dynamicanalyzer.sql.SqlManager; -import org.tizen.dynamicanalyzer.utils.ImageUtil; - - -public class SnapshotData { - private final String SNAPSHOT = "snapshot"; - private static SnapshotData snapshotData = new SnapshotData(); - - private List infos = new ArrayList(); - private HashMap imageHash = new HashMap(); - private HashMap timeHash = new HashMap(); - private double parseStartTime = 0; - - public static SnapshotData getInstance() { - return snapshotData; - } - - public void addImageItem(SnapShotInfo snapshotInfo) { - if (null != snapshotInfo) { - ImageDescriptor imageDesc = null; - if (!timeHash.containsKey(snapshotInfo.getSequence())) { - infos.add(snapshotInfo); - } - - String origImagePath = getImagePathBySeq(snapshotInfo.getSequence()); - String newImagePath = getImageNewPathBySeq(snapshotInfo.getSequence()); - ImageUtil.resize(origImagePath, newImagePath, SnapshotConstants.SNAPSHOT_IMAGE_WIDTH, - SnapshotConstants.SNAPSHOT_IMAGE_HEIGHT, Color.WHITE); - File imageFile = new File(newImagePath); - if (imageFile.exists()) { - imageDesc = ImageDescriptor.createFromFile(null, newImagePath); - parseStartTime = snapshotInfo.getTime(); - } - - imageHash.put(snapshotInfo.getSequence(), imageDesc); - timeHash.put(snapshotInfo.getSequence(), snapshotInfo.getTime()); - } - } - - public ImageDescriptor getRedRectImageBySeq(int seq) { - ImageDescriptor imageDesc = null; - - String origImagePath = getImagePathBySeq(seq); - String newImagePath = getImageNewPathBySeq(seq); - ImageUtil.resize(origImagePath, newImagePath, SnapshotConstants.SNAPSHOT_IMAGE_WIDTH, - SnapshotConstants.SNAPSHOT_IMAGE_HEIGHT, Color.RED); - File imageFile = new File(newImagePath); - if (imageFile.exists()) { - imageDesc = ImageDescriptor.createFromFile(null, newImagePath); - } - - return imageDesc; - } - - private String getImageNewPathBySeq(int seq) { - Project project = AnalyzerManager.getProject(); - String imageFolderPath = - project.getSavePath() + File.separator + AnalyzerConstants.IMAGE_FOLDER_NAME; - String imagePath = imageFolderPath + File.separator + seq + "_new" //$NON-NLS-1$ - + CommonConstants.EXTENSION_PNG_IMAGE; - return imagePath; - } - - private String getImagePathBySeq(int seq) { - Project project = AnalyzerManager.getProject(); - String imageFolderPath = - project.getSavePath() + File.separator + AnalyzerConstants.IMAGE_FOLDER_NAME; - String imagePath = - imageFolderPath + File.separator + seq + CommonConstants.EXTENSION_PNG_IMAGE; - return imagePath; - } - - public void clear() { - infos.clear(); - imageHash.clear(); - timeHash.clear(); - parseStartTime = 0; - } - - public List getSnapshotInfos() { - return infos; - } - - public HashMap getImageHash() { - return imageHash; - } - - public HashMap getTimeHash() { - return timeHash; - } - - private String query() { - return "select * from " + SNAPSHOT; //$NON-NLS-1$ - } - - private String query(String min, String max) { - return "select * from " + SNAPSHOT + " where time <= " + max + " and time > " //$NON-NLS-1$ //$NON-NLS-2$ - + min + " ;"; //$NON-NLS-1$ - } - - private void processQuery(String query) { - if (null == query || query.isEmpty()) { - return; - } - - LogCenter logc = AnalyzerManager.getLogCenterById(LogCenterConstants.LOG_SCREENSHOT); - if (null == logc) { - return; - } - - List> output = SqlManager.executeSelectQueryImage(query, logc); - - int size = output.size(); - for (int i = 0; i < size; i++) { - List log = output.get(i); - String strTime = log.get(LogCenterConstants.TIME_INDEX + 1); - long conversionTime = Long.parseLong(strTime); - SnapShotInfo ssi = new SnapShotInfo(); - ssi.setTime(conversionTime); - String seq = log.get(LogCenterConstants.SEQUENCE_NUMBER_INDEX + 1); - ssi.setSequence(Integer.parseInt(seq)); - addImageItem(ssi); - } - } - - public void querySnapshotInfo(double currentTime) { - String query = query(Double.toString(parseStartTime), Double.toString(currentTime)); - processQuery(query); - } - - public void update() { - clear(); - processQuery(query()); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/TableInput.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/TableInput.java deleted file mode 100644 index b541565..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/TableInput.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.tizen.dynamicanalyzer.model; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.graphics.Image; - -public class TableInput { - private List text; - private List images; - private Object data; - - public TableInput() { - text = new ArrayList(); - images = new ArrayList(); - } - - public List getText() { - return text; - } - - public void setText(List text) { - this.text = text; - } - public List getImages() { - return images; - } - public void setImages(List images) { - this.images = images; - } - public Object getData() { - return data; - } - public void setData(Object data) { - this.data = data; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/TreeInput.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/TreeInput.java deleted file mode 100644 index 723c36f..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/TreeInput.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.tizen.dynamicanalyzer.model; - -import java.util.ArrayList; -import java.util.List; - -public class TreeInput extends TableInput { - List children = null; - String parent = null; - String child = null; - - public List getChildren() { - if (null == children) { - children = new ArrayList(); - } - return children; - } - - public String getParent() { - return parent; - } - public void setParent(String parent) { - this.parent = parent; - } - - public String getChild() { - return child; - } - public void setChild(String child) { - this.child = child; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/package-info.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/package-info.java deleted file mode 100644 index 8350335..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.1-b02-fcs -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2012.04.18 at 02:25:05 오후 KST -// - -@javax.xml.bind.annotation.XmlSchema(namespace = "org.tizen.dynamicanalyzer", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) -package org.tizen.dynamicanalyzer.model; diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/AnalyzerLabels.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/AnalyzerLabels.java deleted file mode 100755 index 4484e94..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/AnalyzerLabels.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.nl; - -import org.eclipse.osgi.util.NLS; - -public class AnalyzerLabels extends NLS { - - private static final String BUNDLE_NAME = "org.tizen.dynamicanalyzer.nl.AnalyzerLabels"; //$NON-NLS-1$ - - public static String OFF; - public static String ON; - - public static String OK; - public static String CANCEL; - - public static String YES; - public static String NO; - - public static String OPEN; - public static String CLOSE; - - // Toolbar button - public static String START_TRACE; - public static String STOP_TRACE; - public static String SAVE_TRACE; - public static String OPEN_TRACE; - public static String REPLAY; - public static String VIEW_SOURCE; - public static String SNAPSHOT_ENABLE; - public static String SETTING; - - // setting menu - public static String ABOUT; - public static String LICENSE; - public static String CONFIGURATION; - - // SingletonInfoDlg. - public static String DA_WARNING; - public static String SINGLETON_INFO_DLG_MESSAGE_1; - public static String SINGLETON_INFO_DLG_MESSAGE_2; - - // Source tooltip - public static String SOURCE_NOT_EXIST; - - // Source popup - public static String ERROR; - public static String CONFIRMATION; - public static String VIEW_SOURCE_MESSAGE; - public static String VIEW_SOURCE_ERROR_MESSAGE; - - public static String EMPTY_STRING; - - public static String SYMBOL_MANAGER_UNKNOWN; - - public static String MESSAGE_PROCESS_PG_WARNING; - public static String MESSAGE_PROCESS_VIEW_SOURCE; - - public static String ANALYZER_CONSTANTS_SOURCELINE_BAD_ADDRESS; - public static String ANALYZER_CONSTANTS_SOURCELINE_FILE_NOT_FOUND; - public static String ANALYZER_CONSTANTS_SOURCELINE_NO_MATCHING_LINE; - public static String ANALYZER_CONSTANTS_SOURCELINE_NO_SOURCELINE_DATA; - public static String ANALYZER_CONSTANTS_SOURCELINE_NO_SYMBOL_INFORMATION; - public static String ANALYZER_CONSTANTS_SOURCELINE_NOT_FOUND; - public static String ANALYZER_CONSTANTS_SOURCELINE_NULL_ADDRESS; - public static String ANALYZER_CONSTANTS_SOURCELINE_NULL_PATH; - public static String ANALYZER_CONSTANTS_SOURCELINE_PIE_BUILD; - public static String ANALYZER_CONSTANTS_SOURCELINE_UNKNOWN_ERROR; - - public static String COOLBAR_AREA_FILE; - public static String COOLBAR_AREA_SUMMARY; - public static String COOLBAR_AREA_THREAD; - public static String COOLBAR_AREA_UI; - public static String COOLBAR_AREA_TIMELINE; - public static String COOLBAR_AREA_RANGE; - - public static String LICENSE_DIALOG_LICENSE_FILE_NAME; - public static String LICENSE_DIALOG_NOT_FOUND; - - public static String ABOUT_DIALOG_TITLE; - public static String ABOUT_DIALOG_BUILD_TIME; - public static String ABOUT_DIALOG_BUILD_TIME_TAB; - public static String ABOUT_DIALOG_VERSION; - public static String ABOUT_DIALOG_VERSION_TAB; - public static String ABOUT_DIALOG_LICENSE; - - public static String CONFIGURATION_DIALOG_AUTO_RANGE; - public static String CONFIGURATION_DIALOG_INTERNAL_LEAK; - public static String CONFIGURATION_DIALOG_SHOW_SNAPSHOT; - - public static String OPEN_TRACE_DLG_SAVED_FILE; - public static String OPEN_TRACE_DLG_TEMP_FILE; - public static String OPEN_TRACE_DLG_TEMP_FILE_NAME; - public static String OPEN_TRACE_DLG_TRACE_FILE_NAME; - public static String OPEN_TRACE_DLG_TRACE_DATE; - - public static String PATH_WARNING; - public static String OS_WARNING; - public static String RE_TRACE_FORM_IDE; - - public static String STOP_PROCESS_DLG_PLEASE_WAIT; - public static String STOP_PROCESS_DLG_SUMMARIZING_DATA; - public static String STOP_PROCESS_DLG_DEVICE_DISCONNECTED; - public static String STOP_PROCESS_DLG_ERROR_1; - public static String STOP_PROCESS_DLG_ERROR_2; - public static String STOP_PROCESS_DLG_ERROR_3; - - public static String USER_INTERFACE_API_LIST_FILE_NAME; - - static { - NLS.initializeMessages(BUNDLE_NAME, AnalyzerLabels.class); - } - - private AnalyzerLabels() { - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/AnalyzerLabels.properties b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/AnalyzerLabels.properties deleted file mode 100755 index 7a0bb71..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/AnalyzerLabels.properties +++ /dev/null @@ -1,100 +0,0 @@ - -OFF=Off -ON=On - -OK=Ok -CANCEL=Cancel - -YES=Yes -NO=No - -OPEN=Open -CLOSE=Close - -#Toolbar button -START_TRACE=Start trace -STOP_TRACE=Stop trace -SAVE_TRACE=Save trace -OPEN_TRACE=Open trace -REPLAY=Replay -VIEW_SOURCE=View source -SNAPSHOT_ENABLE=Take snapshot -SETTING=Settings - -#Setting menu -ABOUT=About Tizen Dynamic Analyzer -LICENSE=License -CONFIGURATION=Configuration - - -# SingletonInfoDlg. -DA_WARNING=Warning -SINGLETON_INFO_DLG_MESSAGE_1 = Can not launch Dynamic Analzer. -SINGLETON_INFO_DLG_MESSAGE_2 = Another one with the same user name is running now. - - -#Source tooltip -SOURCE_NOT_EXIST=Source file does not exist. - -#Source popup -ERROR=Error -CONFIRMATION=Confirmation -VIEW_SOURCE_MESSAGE=Are you sure you want to view the source in the IDE? -VIEW_SOURCE_ERROR_MESSAGE=Opening the source file failed. -EMPTY_STRING= - -SYMBOL_MANAGER_UNKNOWN=Unknown function - -MESSAGE_PROCESS_PG_WARNING=To view the source, compile with the '-pg' option -MESSAGE_PROCESS_VIEW_SOURCE=View source - -ANALYZER_CONSTANTS_SOURCELINE_BAD_ADDRESS=Address not found. Check the address. -ANALYZER_CONSTANTS_SOURCELINE_FILE_NOT_FOUND=Application binary is not found in the host. -ANALYZER_CONSTANTS_SOURCELINE_NO_MATCHING_LINE=Matching source not found; the method comes from a shared library. -ANALYZER_CONSTANTS_SOURCELINE_NO_SOURCELINE_DATA=Source data not supported. -ANALYZER_CONSTANTS_SOURCELINE_NO_SYMBOL_INFORMATION=Error in reading the symbol. The host and target application binary may not be the same. -ANALYZER_CONSTANTS_SOURCELINE_NOT_FOUND=Source file not found. -ANALYZER_CONSTANTS_SOURCELINE_NULL_ADDRESS=Address not found. Enter the address. -ANALYZER_CONSTANTS_SOURCELINE_NULL_PATH=Symbol not found in the application binary. -ANALYZER_CONSTANTS_SOURCELINE_PIE_BUILD=Application built with the '-pie' option. Matching source with this option not found. -ANALYZER_CONSTANTS_SOURCELINE_UNKNOWN_ERROR=Unknown error. - -COOLBAR_AREA_FILE=File -COOLBAR_AREA_SUMMARY=Summary -COOLBAR_AREA_THREAD=Thread -COOLBAR_AREA_UI=UI -COOLBAR_AREA_TIMELINE=Timeline -COOLBAR_AREA_RANGE=Range - -LICENSE_DIALOG_LICENSE_FILE_NAME=license -LICENSE_DIALOG_NOT_FOUND=License file not found - -ABOUT_DIALOG_TITLE=Tizen Dynamic Analyzer -ABOUT_DIALOG_BUILD_TIME=Build time -ABOUT_DIALOG_BUILD_TIME_TAB=Build time\t: -ABOUT_DIALOG_VERSION=Version -ABOUT_DIALOG_VERSION_TAB=Version\t\t: -ABOUT_DIALOG_LICENSE=License - -CONFIGURATION_DIALOG_AUTO_RANGE=Auto Range View Transmit -CONFIGURATION_DIALOG_INTERNAL_LEAK=Internal Leak Analysis -CONFIGURATION_DIALOG_SHOW_SNAPSHOT=Show Snapshot - -OPEN_TRACE_DLG_SAVED_FILE=Saved file -OPEN_TRACE_DLG_TEMP_FILE=Temporary file -OPEN_TRACE_DLG_TEMP_FILE_NAME=Temporary file name -OPEN_TRACE_DLG_TRACE_FILE_NAME=Trace file name -OPEN_TRACE_DLG_TRACE_DATE=Create time - -PATH_WARNING=Please install the Tizen SDK -OS_WARNING=Not supported OS -RE_TRACE_FORM_IDE=Another application is currently running. - -STOP_PROCESS_DLG_PLEASE_WAIT=Please wait... -STOP_PROCESS_DLG_SUMMARIZING_DATA=Summarizing collected data -STOP_PROCESS_DLG_DEVICE_DISCONNECTED=Device disconnected -STOP_PROCESS_DLG_ERROR_1=error occurred(1) -STOP_PROCESS_DLG_ERROR_2=error occurred(2) -STOP_PROCESS_DLG_ERROR_3=error occurred(3) - -USER_INTERFACE_API_LIST_FILE_NAME=user_interface_api_list \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/CommonPageLabels.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/CommonPageLabels.java deleted file mode 100644 index 056daf2..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/CommonPageLabels.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.nl; - -import org.eclipse.osgi.util.NLS; - -public class CommonPageLabels extends NLS { - private static final String BUNDLE_NAME = "org.tizen.dynamicanalyzer.nl.CommonPageLabels"; //$NON-NLS-1$ - - public static String COMMON_DATA_COLUMN_KEY; - public static String COMMON_DATA_COLUMN_NUMBER; - public static String COMMON_DATA_COLUMN_TIME; - public static String COMMON_DATA_COLUMN_NAME; - public static String COMMON_DATA_COLUMN_PARAMETER; - public static String COMMON_DATA_COLUMN_THREADID; - public static String COMMON_DATA_COLUMN_RETURN; - public static String COMMON_DATA_COLUMN_ERRNO; - public static String COMMON_DATA_COLUMN_APITYPE; - public static String PAGE_CHART_SERIES_NAME; - - static { - // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, CommonPageLabels.class); - } - - private CommonPageLabels(){ - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/CommonPageLabels.properties b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/CommonPageLabels.properties deleted file mode 100644 index 843baeb..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/CommonPageLabels.properties +++ /dev/null @@ -1,10 +0,0 @@ -COMMON_DATA_COLUMN_KEY=Key -COMMON_DATA_COLUMN_NUMBER=# -COMMON_DATA_COLUMN_TIME=Time -COMMON_DATA_COLUMN_NAME=Name -COMMON_DATA_COLUMN_PARAMETER=Parameter -COMMON_DATA_COLUMN_THREADID=Thread ID -COMMON_DATA_COLUMN_RETURN=Return value -COMMON_DATA_COLUMN_ERRNO=Error number -COMMON_DATA_COLUMN_APITYPE=API type -PAGE_CHART_SERIES_NAME=Page \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/ConfigureLabels.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/ConfigureLabels.java deleted file mode 100644 index 9b1d9a2..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/ConfigureLabels.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * YeongTaik Byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.nl; - -import org.eclipse.osgi.util.NLS; - -public class ConfigureLabels extends NLS { - private static final String BUNDLE_NAME = "org.tizen.dynamicanalyzer.nl.ConfigureLabels"; //$NON-NLS-1$ - - public static String OFF; - public static String ON; - public static String INTERNALCALL; - public static String RANGEAUTOSELECT; - public static String SNAPSHOT; - public static String SHOWLOG; - public static String SAMPLINGPERIOD; - public static String PROCESSSIZE; - public static String SINGLETON_FOCUS_DA_PID; - public static String CONFIGUREMANAGER_CHART_AVAILABLE_ITEM_LIST; - public static String CONFIGUREMANAGER_CHART_SELECTED_ITEM_LIST; - - static { - NLS.initializeMessages(BUNDLE_NAME, ConfigureLabels.class); - } - - private ConfigureLabels(){ - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/ConfigureLabels.properties b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/ConfigureLabels.properties deleted file mode 100644 index 0d7fd61..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/ConfigureLabels.properties +++ /dev/null @@ -1,11 +0,0 @@ -OFF=off -ON=on -INTERNALCALL=Internal call -RANGEAUTOSELECT=Ragne auto select -SNAPSHOT=Snapshot -SHOWLOG=Show log -SAMPLINGPERIOD=Sampling period -PROCESSSIZE=Process size -SINGLETON_FOCUS_DA_PID=Singleton focus DA PID -CONFIGUREMANAGER_CHART_AVAILABLE_ITEM_LIST=Available chart list -CONFIGUREMANAGER_CHART_SELECTED_ITEM_LIST=Selected chart list \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/DAPageChartLabels.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/DAPageChartLabels.java deleted file mode 100644 index c170a68..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/DAPageChartLabels.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * YeongTaik Byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.nl; - -import org.eclipse.osgi.util.NLS; - -public class DAPageChartLabels extends NLS { - private static final String BUNDLE_NAME = "org.tizen.dynamicanalyzer.nl.DAPageChartLabels"; //$NON-NLS-1$ - public static String KEY_COLUMN_HEADER_IMAGE_LEFT_MARGIN; - public static String KEY_COLUMN_HEADER_IMAGE_TOP_MARGIN; - public static String KEY_COLUMN_HEADER_TEXT_LEFT_MARGIN; - public static String KEY_COLUMN_HEADER_TEXT_TOP_MARGIN; - public static String KEY_CHART_SCALE; - public static String KEY_CHART_START_TIME; - public static String KEY_CHART_LAST_TIME; - public static String KEY_CHART_ZOOMIN_HEIGHT; - public static String KEY_CHART_ZOOMOUT_HEIGHT; - public static String KEY_SERIES_SERIES_LIST; - public static String KEY_SERIES_CHILDREN; - - static { - // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, DAPageChartLabels.class); - } - private DAPageChartLabels() { - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/DAPageChartLabels.properties b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/DAPageChartLabels.properties deleted file mode 100644 index 0c6d456..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/DAPageChartLabels.properties +++ /dev/null @@ -1,11 +0,0 @@ -KEY_COLUMN_HEADER_IMAGE_LEFT_MARGIN=ImageLeftMargin -KEY_COLUMN_HEADER_IMAGE_TOP_MARGIN=ImageTopMargin -KEY_COLUMN_HEADER_TEXT_LEFT_MARGIN=TextLeftMargin -KEY_COLUMN_HEADER_TEXT_TOP_MARGIN=TextTopMargin -KEY_CHART_SCALE=ChartScale -KEY_CHART_START_TIME=StartTime -KEY_CHART_LAST_TIME=LastTime -KEY_CHART_ZOOMIN_HEIGHT=ZoomInHeight -KEY_CHART_ZOOMOUT_HEIGHT=ZoomOutHeight -KEY_SERIES_SERIES_LIST=SeriesList -KEY_SERIES_CHILDREN=Children diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/ErrorLabels.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/ErrorLabels.java deleted file mode 100644 index 78bbf67..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/ErrorLabels.java +++ /dev/null @@ -1,320 +0,0 @@ -package org.tizen.dynamicanalyzer.nl; - -import org.eclipse.osgi.util.NLS; - -public class ErrorLabels extends NLS { - private static final String BUNDLE_NAME = "org.tizen.dynamicanalyzer.nl.ErrorLabels"; //$NON-NLS-1$ - - public static String EPERM; - public static String ENOENT; - public static String ESRCH; - public static String EINTR; - public static String EIO; - public static String ENXIO; - public static String E2BIG; - public static String ENOEXEC; - public static String EBADF; - public static String ECHILD; - public static String EAGAIN; - public static String ENOMEM; - public static String EACCES; - public static String EFAULT; - public static String ENOTBLK; - public static String EBUSY; - public static String EEXIST; - public static String EXDEV; - public static String ENODEV; - public static String ENOTDIR; - public static String EISDIR; - public static String EINVAL; - public static String ENFILE; - public static String EMFILE; - public static String ENOTTY; - public static String ETXTBSY; - public static String EFBIG; - public static String ENOSPC; - public static String ESPIPE; - public static String EROFS; - public static String EMLINK; - public static String EPIPE; - public static String EDOM; - public static String ERANGE; - - public static String EDEADLK; - public static String ENAMETOOLONG; - public static String ENOLCK; - public static String ENOSYS; - public static String ENOTEMPTY; - public static String ELOOP; - public static String ENOMSG; - public static String EIDRM; - public static String ECHRNG; - public static String EL2NSYNC; - public static String EL3HLT; - public static String EL3RST; - public static String ELNRNG; - public static String EUNATCH; - public static String ENOCSI; - public static String EL2HLT; - public static String EBADE; - public static String EBADR; - public static String EXFULL; - public static String ENOANO; - public static String EBADRQC; - public static String EBADSLT; - - - public static String EBFONT; - public static String ENOSTR; - public static String ENODATA; - public static String ETIME; - public static String ENOSR; - public static String ENONET; - public static String ENOPKG; - public static String EREMOTE; - public static String ENOLINK; - public static String EADV; - public static String ESRMNT; - public static String ECOMM; - public static String EPROTO; - public static String EMULTIHOP; - public static String EDOTDOT; - public static String EBADMSG; - public static String EOVERFLOW; - public static String ENOTUNIQ; - public static String EBADFD; - public static String EREMCHG; - public static String ELIBACC; - public static String ELIBBAD; - public static String ELIBSCN; - public static String ELIBMAX; - public static String ELIBEXEC; - public static String EILSEQ; - public static String ERESTART; - public static String ESTRPIPE; - public static String EUSERS; - public static String ENOTSOCK; - public static String EDESTADDRREQ; - public static String EMSGSIZE; - public static String EPROTOTYPE; - public static String ENOPROTOOPT; - public static String EPROTONOSUPPORT; - public static String ESOCKTNOSUPPORT; - public static String EOPNOTSUPP; - public static String EPFNOSUPPORT; - public static String EAFNOSUPPORT; - public static String EADDRINUSE; - public static String EADDRNOTAVAIL; - public static String ENETDOWN; - public static String ENETUNREACH; - public static String ENETRESET; - public static String ECONNABORTED; - public static String ECONNRESET; - public static String ENOBUFS; - public static String EISCONN; - public static String ENOTCONN; - public static String ESHUTDOWN; - public static String ETOOMANYREFS; - public static String ETIMEDOUT; - public static String ECONNREFUSED; - public static String EHOSTDOWN; - public static String EHOSTUNREACH; - public static String EALREADY; - public static String EINPROGRESS; - public static String ESTALE; - public static String EUCLEAN; - public static String ENOTNAM; - public static String ENAVAIL; - public static String EISNAM; - public static String EREMOTEIO; - public static String EDQUOT; - public static String ENOMEDIUM; - public static String EMEDIUMTYPE; - public static String ECANCELED; - public static String ENOKEY; - public static String EKEYEXPIRED; - public static String EKEYREVOKED; - public static String EKEYREJECTED; - - public static String EOWNERDEAD; - public static String ENOTRECOVERABLE; - - public static String E_SUCCESS; - public static String E_FAILURE; - public static String ERR_SRC_FRAMEWORK; - public static String ERR_SRC_USER; - - public static String E_ADDRESS_CHANGED; - public static String E_ALREADY_BOUND; - public static String E_ALREADY_CONNECTED; - public static String E_ALREADY_OPENED; - public static String E_AUTHENTICATION; - public static String E_APP_NOT_INSTALLED; - public static String E_ALREADY_SET; - - public static String E_CHUNKED_TRANSACTION; - public static String E_CONNECTION_BUSY; - public static String E_CONNECTION_FAILED; - public static String E_CONNECTION_RESET; - public static String E_CREDENTIAL_EXPIRED; - public static String E_CERTIFICATE_VERIFICATION_FAILED; - - public static String E_DATA_NOT_FOUND; - public static String E_DATABASE; - public static String E_DECODING_FAILED; - public static String E_DEVICE_BUSY; - public static String E_DEVICE_FAILED; - public static String E_DEVICE_INCOMPATIBLE; - public static String E_DEVICE_UNAVAILABLE; - public static String E_DHCP; - public static String E_DIMENSION_CHANGED; - public static String E_DNS; - public static String E_DNS_NOT_FOUND; - - public static String E_EFFECTS_DISABLED; - public static String E_EMPTY_BODY; - public static String E_ENCODING_FAILED; - public static String E_END_OF_FILE; - - public static String E_FDN_MODE; - public static String E_FILE_ALREADY_EXIST; - public static String E_FILE_NOT_FOUND; - - public static String E_GROUP_NOT_FOUND; - - public static String E_HOST_NOT_FOUND; - public static String E_HOST_UNREACHABLE; - public static String E_HTTP_USER; - - public static String E_ILLEGAL_ACCESS; - public static String E_IN_PROGRESS; - public static String E_INACCESSIBLE_PATH; - public static String E_INIT_FAILED; - public static String E_INSTANTIATION_FAILED; - public static String E_INSUFFICIENT_PRIORITY; - public static String E_INTERRUPTED; - public static String E_INVALID_ACCOUNT; - public static String E_INVALID_ADDRESS; - public static String E_INVALID_ARG; - public static String E_INVALID_CONDITION; - public static String E_INVALID_CONNECTION; - public static String E_INVALID_CONTENT; - public static String E_INVALID_CONTEXT; - public static String E_INVALID_DATA; - public static String E_INVALID_DOMAIN; - public static String E_INVALID_ENCODING_RANGE; - public static String E_INVALID_FORMAT; - public static String E_INVALID_HEADER; - public static String E_INVALID_KEY; - public static String E_INVALID_OPERATION; - public static String E_INVALID_PROXY; - public static String E_INVALID_SIM_STATE; - public static String E_INVALID_SERVER; - public static String E_INVALID_SESSION; - public static String E_INVALID_SOCKET; - public static String E_INVALID_STATE; - public static String E_INVALID_TRANSACTION; - public static String E_IO; - public static String E_NOT_JOINED; - public static String E_INVALID_CERTIFICATE; - public static String E_INVALID_URL; - - public static String E_KEY_ALREADY_EXIST; - public static String E_KEY_NOT_FOUND; - - public static String E_LANDMARK; - public static String E_LIBRARY_NOT_FOUND; - public static String E_LIBRARY_NOT_LOADED; - public static String E_LINK; - public static String E_LOCATION; - public static String E_LOCATION_SERVICE; - public static String E_LOCK_FAILED; - public static String E_LANGUAGE_NOT_SET; - - public static String E_MAX_EXCEEDED; - public static String E_MISSING_INPUT; - public static String E_MOBILE_FAILED; - public static String E_MODEL_NOT_FOUND; - - public static String E_NETWORK_FAILED; - public static String E_NETWORK_UNAVAILABLE; - public static String E_NO_CERTIFICATE; - public static String E_NOT_A_MEMBER; - public static String E_NOT_PAIRED; - public static String E_NOT_RESPONDING; - public static String E_NUM_FORMAT; - - public static String E_OBJ_ALREADY_EXIST; - public static String E_OBJ_NOT_FOUND; - public static String E_OBJECT_LOCKED; - public static String E_ON_INITIALIZING; - public static String E_OPERATION_CANCELED; - public static String E_OPERATION_FAILED; - public static String E_OUT_OF_MEMORY; - public static String E_OUT_OF_RANGE; - public static String E_OVERFLOW; - - public static String E_PAIRING_FAILED; - public static String E_PARSING_FAILED; - public static String E_PRIVILEGE_DENIED; - - public static String E_READ_ONLY; - public static String E_REJECTED; - - public static String E_REMOTE_DEVICE_NOT_FOUND; - - public static String E_REMOVE_SERVICE_NOT_FOUND; - public static String E_RESOURCE_UNAVAILABLE; - public static String E_RIGHT_EXPIRED; - - public static String E_SECTION_ALREADY_EXIST; - public static String E_SECTION_NOT_FOUND; - public static String E_SERVER; - public static String E_SERVICE_BUSY; - public static String E_SERVICE_LIMITED; - public static String E_SERVICE_LOCKED; - public static String E_SERVICE_UNAVAILABLE; - public static String E_SESSION_DEACTIVATED; - public static String E_SESSION_UNAVAILABLE; - public static String E_SIZE_MISMATCH; - public static String E_SOCKET_USER; - public static String E_STORAGE_FULL; - public static String E_SYMBOL_NOT_FOUND; - public static String E_SYNTAX; - public static String E_SYSTEM; - public static String E_SERVICE_DEACTIVATED; - - public static String E_TABLE_NOT_FOUND; - public static String E_TIMEOUT; - public static String E_TYPE_MISMATCH; - - public static String E_UNDERFLOW; - public static String E_UNKNOWN; - public static String E_UNSUPPORTED_ALGORITHM; - public static String E_UNSUPPORTED_CODEC; - public static String E_UNSUPPORTED_FAMILY; - public static String E_UNSUPPORTED_FORMAT; - public static String E_UNSUPPORTED_PROTOCOL; - public static String E_UNSUPPORTED_OPERATION; - public static String E_UNSUPPORTED_OPTION; - public static String E_UNSUPPORTED_SERVICE; - public static String E_UNSUPPORTED_TYPE; - public static String E_URL_CHANGED; - public static String E_USER_AGENT_NOT_ALLOWED; - public static String E_USER_ALREADY_REGISTERED; - public static String E_USER_NOT_FOUND; - public static String E_USER_NOT_REGISTERED; - public static String E_UNSUPPORTED_LANGUAGE; - public static String E_UNSUPPORTED_VERSION; - public static String E_UNSUPPORTED_LOCALE; - - public static String E_WOULD_BLOCK; - - static { - // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, ErrorLabels.class); - } - - private ErrorLabels() { - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/ErrorLabels.properties b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/ErrorLabels.properties deleted file mode 100644 index f833570..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/ErrorLabels.properties +++ /dev/null @@ -1,306 +0,0 @@ -EPERM=Operation not permitted -ENOENT=No such file or directory -ESRCH=No such process -EINTR=Interrupted system call -EIO=I/O error -ENXIO=No such device or address -E2BIG=Argument list too long -ENOEXEC=Exec format error -EBADF=Bad file number -ECHILD=No child processes -EAGAIN=Try again -ENOMEM=Out of memory -EACCES=Permission denied -EFAULT=Bad address -ENOTBLK=Block device required -EBUSY=Device or resource busy -EEXIST=File exists -EXDEV=Cross-device link -ENODEV=No such device -ENOTDIR=Not a directory -EISDIR=Is a directory -EINVAL=Invalid argument -ENFILE=File table overflow -EMFILE=Too many open files -ENOTTY=Not a typewriter -ETXTBSY=Text file busy -EFBIG=File too large -ENOSPC=No space left on device -ESPIPE=Illegal seek -EROFS=Read-only file system -EMLINK=Too many links -EPIPE=Broken pipe -EDOM=Math argument out of domain of func -ERANGE=Math result not representable - -EDEADLK=Resource deadlock would occur -ENAMETOOLONG=File name too long -ENOLCK=No record locks available -ENOSYS=Function not implemented -ENOTEMPTY=Directory not empty -ELOOP=Too many symbolic links encountered - -ENOMSG=No message of desired type -EIDRM=Identifier removed -ECHRNG=Channel number out of range -EL2NSYNC=Level 2 not synchronized -EL3HLT=Level 3 halted -EL3RST=Level 3 reset -ELNRNG=Link number out of range -EUNATCH=Protocol driver not attached -ENOCSI=No CSI structure available -EL2HLT=Level 2 halted -EBADE=Invalid exchange -EBADR=Invalid request descriptor -EXFULL=Exchange full -ENOANO=No anode -EBADRQC=Invalid request code -EBADSLT=Invalid slot - -EBFONT=Bad font file format -ENOSTR=Device not a stream -ENODATA=No data available -ETIME=Timer expired -ENOSR=Out of streams resources -ENONET=Machine is not on the network -ENOPKG=Package not installed -EREMOTE=Object is remote -ENOLINK=Link has been severed -EADV=Advertise error -ESRMNT=Srmount error -ECOMM=Communication error on send -EPROTO=Protocol error -EMULTIHOP=Multihop attempted -EDOTDOT=RFS specific error -EBADMSG=Not a data message -EOVERFLOW=Value too large for defined data type -ENOTUNIQ=Name not unique on network -EBADFD=File descriptor in bad state -EREMCHG=Remote address changed -ELIBACC=Can not access a needed shared library -ELIBBAD=Accessing a corrupted shared library -ELIBSCN=.lib section in a.out corrupted -ELIBMAX=Attempting to link in too many shared libraries -ELIBEXEC=Cannot exec a shared library directly -EILSEQ=Illegal byte sequence -ERESTART=Interrupted system call should be restarted -ESTRPIPE=Streams pipe error -EUSERS=Too many users -ENOTSOCK=Socket operation on non-socket -EDESTADDRREQ=Destination address required -EMSGSIZE=Message too long -EPROTOTYPE=Protocol wrong type for socket -ENOPROTOOPT=Protocol not available -EPROTONOSUPPORT=Protocol not supported -ESOCKTNOSUPPORT=Socket type not supported -EOPNOTSUPP=Operation not supported on transport endpoint -EPFNOSUPPORT=Protocol family not supported -EAFNOSUPPORT=Address family not supported by protocol -EADDRINUSE=Address already in use -EADDRNOTAVAIL=Cannot assign requested address -ENETDOWN=Network is down -ENETUNREACH=Network is unreachable -ENETRESET=Network dropped connection because of reset -ECONNABORTED=Software caused connection abort -ECONNRESET=Connection reset by peer -ENOBUFS=No buffer space available -EISCONN=Transport endpoint is already connected -ENOTCONN=Transport endpoint is not connected -ESHUTDOWN=Cannot send after transport endpoint shutdown -ETOOMANYREFS=Too many references: cannot splice -ETIMEDOUT=Connection timed out -ECONNREFUSED=Connection refused -EHOSTDOWN=Host is down -EHOSTUNREACH=No route to host -EALREADY=Operation already in progress -EINPROGRESS=Operation now in progress -ESTALE=Stale NFS file handle -EUCLEAN=Structure needs cleaning -ENOTNAM=Not a XENIX named type file -ENAVAIL=No XENIX semaphores available -EISNAM=Is a named type file -EREMOTEIO=Remote I/O error -EDQUOT=Quota exceeded -ENOMEDIUM=No medium found -EMEDIUMTYPE=Wrong medium type -ECANCELED=Operation Canceled -ENOKEY=Required key not available -EKEYEXPIRED=Key has expired -EKEYREVOKED=Key has been revoked -EKEYREJECTED=Key was rejected by service - -EOWNERDEAD=Owner died -ENOTRECOVERABLE=State not recoverable - -# Tizen API defined Error codes -E_SUCCESS=Success -E_FAILURE=Failure -ERR_SRC_FRAMEWORK=ERR_SRC_FRAMEWORK -ERR_SRC_USER=ERR_SRC_USER - -E_ADDRESS_CHANGED=The network address is changed externally. -E_ALREADY_BOUND=The target is bounded to another source. -E_ALREADY_CONNECTED=The target is connected to another source. -E_ALREADY_OPENED=The target is already opened. -E_AUTHENTICATION=The authentication request fails. -E_APP_NOT_INSTALLED=The required application is not installed. -E_ALREADY_SET=The specified instance is already set to other values, instances or resources. - -E_CHUNKED_TRANSACTION=E_CHUNKED_TRANSACTION -E_CONNECTION_BUSY=The connection is busy and therefore cannot process a new request. -E_CONNECTION_FAILED=The connection to the specific destination fails. -E_CONNECTION_RESET=The connection is reset while the other thread is still working on it. -E_CREDENTIAL_EXPIRED=The token is expired. -E_CERTIFICATE_VERIFICATION_FAILED=The server certificate verification has failed. - -E_DATA_NOT_FOUND=The requested data does not exist. -E_DATABASE=The underlying database system raises an exception. -E_DECODING_FAILED=The decoding operation fails. -E_DEVICE_BUSY=The device is processing the previous task and therefore cannot process a new request. -E_DEVICE_FAILED=The device fails with an unknown reason. -E_DEVICE_INCOMPATIBLE=The device does not support a specific request. -E_DEVICE_UNAVAILABLE=The device is not installed, or not answering at all. -E_DHCP=General DHCP exception. -E_DIMENSION_CHANGED=The dimension has changed. -E_DNS=General DNS exception. -E_DNS_NOT_FOUND=The DNS cannot resolve the requested address. - -E_EFFECTS_DISABLED=Effects being played on the current haptic device are disabled. -E_EMPTY_BODY=A body is empty. -E_ENCODING_FAILED=The encoding operation fails. -E_END_OF_FILE=The end of file or end of stream is reached unexpectedly during an input operation. - -E_FDN_MODE=The application tries to call with a number that is not allowed in the FDN mode, while the FDN mode is enabled. -E_FILE_ALREADY_EXIST=An attempt to create the file denoted by the specified pathname fails. -E_FILE_NOT_FOUND=An attempt to open the file denoted by a specified pathname fails. - -E_GROUP_NOT_FOUND=A required group does not exist. - -E_HOST_NOT_FOUND=The destination host is not found. -E_HOST_UNREACHABLE=The destination host is unreachable. -E_HTTP_USER=E_HTTP_USER - -E_ILLEGAL_ACCESS=The user does not have proper permissions. -E_IN_PROGRESS=The application requests an operation which is in progress. -E_INACCESSIBLE_PATH=The return type is supposed to be a file path, but the path is not accessible by the application. -E_INIT_FAILED=Initialization fails. -E_INSTANTIATION_FAILED=An instantiation fails by certain reason. -E_INSUFFICIENT_PRIORITY=The haptic device priority is lower than that of the current effects being played, belonging to another device instance.. -E_INTERRUPTED=Interruption from other thread. -E_INVALID_ACCOUNT=An account configuration is invalid. -E_INVALID_ADDRESS=A given address is invalid or not suitable for a requested operation. -E_INVALID_ARG=A combination of passed information is not proper for performing the requested operation. -E_INVALID_CONDITION=A combination of passed information is not proper for performing the requested operation. -E_INVALID_CONNECTION=An operation requests for invalid connection. -E_INVALID_CONTENT=Content is invalid. -E_INVALID_CONTEXT=Context is invalid. -E_INVALID_DATA=The requested (given or referenced) data is invalid. -E_INVALID_DOMAIN=The requested (given or referenced) domain is invalid. -E_INVALID_ENCODING_RANGE=An indicated string contains code pointing outside of bounds by the specified character encoding scheme. -E_INVALID_FORMAT=The specified input has invalid format. -E_INVALID_HEADER=The specified input has invalid header. -E_INVALID_KEY=The specified input has invalid format. -E_INVALID_OPERATION=Current state of the instance prohibits the execution of the specified operation. -E_INVALID_PROXY=The proxy address is invalid. -E_INVALID_SIM_STATE=The SIM is not in proper state for processing the requested operation. -E_INVALID_SERVER=The DNS request goes to an invalid DNS server. -E_INVALID_SESSION=The relevant session is invalid. -E_INVALID_SOCKET=The socket which is responsible for the application's request is invalid. -E_INVALID_STATE=An instance is not in valid state. -E_INVALID_TRANSACTION=The relevant transaction is invalid. -E_IO=An exception occurs during I/O operations. This is a general exception produced by failed or interrupted I/O operations. -E_NOT_JOINED=The client has not joined the domain controller. -E_INVALID_CERTIFICATE=The server certificate verification has failed on client. -E_INVALID_URL=A given url is invalid or not suitable for a requested operation. - -E_KEY_ALREADY_EXIST=A specified key already exists. -E_KEY_NOT_FOUND=A required key does not exist. - -E_LANDMARK=An error related to handling landmark occurs. -E_LIBRARY_NOT_FOUND=A specified library not exists. -E_LIBRARY_NOT_LOADED=A specified library is not loaded. -E_LINK=A link error occurs. -E_LOCATION=A Location API specific error has occurred. -E_LOCATION_SERVICE=An error related to handling service provider requests has occurred. -E_LOCK_FAILED=Locking (or unlocking) fails inside the logic. So cannot guarantee synchronous operation. -E_LANGUAGE_NOT_SET=The language is not set yet. - -E_MAX_EXCEEDED=The defined limit exceeds. -E_MISSING_INPUT=One or more of the required input is not provided. -E_MOBILE_FAILED=E_MOBILE_FAILED -E_MODEL_NOT_FOUND=E_MODEL_NOT_FOUND - -E_NETWORK_FAILED=General network exception. -E_NETWORK_UNAVAILABLE=The network is not enabled. -E_NO_CERTIFICATE=The client certificate is required to connect to the server. -E_NOT_A_MEMBER=The operation is permitted only for members, but the current user is not. -E_NOT_PAIRED=Bluetooth pairing is not established. -E_NOT_RESPONDING=The target is not responding. -E_NUM_FORMAT=The specified string does not represent valid number. - -E_OBJ_ALREADY_EXIST=The specified instance already exists. -E_OBJ_NOT_FOUND=The required instance does not exist. -E_OBJECT_LOCKED=The specified instance is already locked. -E_ON_INITIALIZING=Any request occurs while the target is still initializing. -E_OPERATION_CANCELED=The operation is canceled explicitly. -E_OPERATION_FAILED=The operation fails due to certain reason. -E_OUT_OF_MEMORY=The memory is not sufficient to perform the requested operation. -E_OUT_OF_RANGE=The internal state of the current instance reaches the valid range. -E_OVERFLOW=The operation has caused an overflow. - -E_PAIRING_FAILED=The requested Bluetooth pairing fails. -E_PARSING_FAILED=The paring fails due to any reason. -E_PRIVILEGE_DENIED=An application invokes an API without a proper privilege. - -E_READ_ONLY=A write operation is requested for an instance in read only mode. -E_REJECTED=The operation is rejected by remote site. - -E_REMOTE_DEVICE_NOT_FOUND=E_REMOTE_DEVICE_NOT_FOUND - -E_REMOVE_SERVICE_NOT_FOUND=E_REMOVE_SERVICE_NOT_FOUND -E_RESOURCE_UNAVAILABLE=The required resource is currently unavailable. -E_RIGHT_EXPIRED=The right to get served has expired. - -E_SECTION_ALREADY_EXIST=The specified section already exists. -E_SECTION_NOT_FOUND=The required section does not exist. -E_SERVER=A server tells the device that operation has failed due to some reason. -E_SERVICE_BUSY=The dedicated service module is too busy to handle another request. -E_SERVICE_LIMITED=The specific service is restricted by policy. -E_SERVICE_LOCKED=A service is locked. -E_SERVICE_UNAVAILABLE=The dedicated service is not available. -E_SESSION_DEACTIVATED=The base session is deactivated while it's still being used. -E_SESSION_UNAVAILABLE=E_SESSION_UNAVAILABLE -E_SIZE_MISMATCH=E_SIZE_MISMATCH -E_SOCKET_USER=The socket connection is closed by user. -E_STORAGE_FULL=The storage is full. -E_SYMBOL_NOT_FOUND=The specified symbol is not found. -E_SYNTAX=The input statement does not confirm to the specific syntax. -E_SYSTEM=A failure occurs from the underlying system. -E_SERVICE_DEACTIVATED=A service is deactivated. - -E_TABLE_NOT_FOUND=The specified table does not exist. -E_TIMEOUT=The operation cannot be completed within the specified time period. -E_TYPE_MISMATCH=The specified type does not match. - -E_UNDERFLOW=The operation causes an underflow. -E_UNKNOWN=A unknown error occurs. -E_UNSUPPORTED_ALGORITHM=The specified algorithm is not supported. -E_UNSUPPORTED_CODEC=The required CODEC is not found. -E_UNSUPPORTED_FAMILY=The requested address family is not supported. -E_UNSUPPORTED_FORMAT=The current implementation does not support the format of the input. -E_UNSUPPORTED_PROTOCOL=The specified protocol is not supported. -E_UNSUPPORTED_OPERATION=The current implementation does not support the requested operation. -E_UNSUPPORTED_OPTION=The specified option is not supported. -E_UNSUPPORTED_SERVICE=The specified service is not supported. -E_UNSUPPORTED_TYPE=The specified type is not supported. -E_URL_CHANGED=The URL is changed. -E_USER_AGENT_NOT_ALLOWED=Used by HTTP transaction. -E_USER_ALREADY_REGISTERED=A user is already registered to the device. -E_USER_NOT_FOUND=The required user does not exist. -E_USER_NOT_REGISTERED=No user is registered to the device yet. -E_UNSUPPORTED_LANGUAGE=The specified language is not supported. -E_UNSUPPORTED_VERSION=The specified version of the input content is not supported. -E_UNSUPPORTED_LOCALE=The specified locale is not supported. - -E_WOULD_BLOCK=Completed immediately. - diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/FilePageLabels.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/FilePageLabels.java deleted file mode 100644 index e18c217..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/FilePageLabels.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Hyun Jong Park - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.nl; - -import org.eclipse.osgi.util.NLS; - -public class FilePageLabels extends NLS { - private static final String BUNDLE_NAME = "org.tizen.dynamicanalyzer.nl.FilePageLabels"; //$NON-NLS-1$ - - public static String FILE_API_LIST_VIEW_TITLE; - public static String FILE_API_LIST_VIEW_INDEX; - public static String FILE_API_LIST_VIEW_TIME; - public static String FILE_API_LIST_VIEW_API; - public static String FILE_API_LIST_VIEW_PARAMETER; - public static String FILE_API_LIST_VIEW_THREAD_ID; - public static String FILE_API_LIST_VIEW_RETURN; - public static String FILE_API_LIST_VIEW_ERRNO; - - public static String FILE_CHART_TITLE; - public static String FILE_CHART_CHART; - public static String FILE_CHART_FILE; - public static String FILE_CHART_TOGGLE_RENDERER_FD; - public static String FILE_CHART_TOGGLE_RENDERER_OMIT; - public static String FILE_CHART_TOGGLE_RENDERER_OBJ; - public static String FILE_CHART_TOGGLE_RENDERER_OBJECT; - - public static String FILE_DETAILS_TITLE; - public static String FILE_DETAILS_API_COUNT; - public static String FILE_DETAILS_FAILED_API_COUNT; - public static String FILE_DETAILS_FILE_NAME; - public static String FILE_DETAILS_FILE_NAME_NEWLINE; - public static String FILE_DETAILS_FILE_PATH; - public static String FILE_DETAILS_READ_SIZE; - public static String FILE_DETAILS_TOTAL_USE_TIME; - public static String FILE_DETAILS_WRITE_SIZE; - public static String FILE_DETAILS_TOTAL_SIZE; - - public static String FILE_TIMELINE_DATA_STR1; - public static String FILE_TIMELINE_DATA_STR2; - public static String FILE_TIMELINE_DATA_STR3; - public static String FILE_TIMELINE_DATA_STR4; - static { - // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, FilePageLabels.class); - } - - private FilePageLabels() { - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/FilePageLabels.properties b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/FilePageLabels.properties deleted file mode 100644 index a62eeca..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/FilePageLabels.properties +++ /dev/null @@ -1,33 +0,0 @@ -FILE_API_LIST_VIEW_TITLE=File API List -FILE_API_LIST_VIEW_INDEX=\# -FILE_API_LIST_VIEW_TIME=Time -FILE_API_LIST_VIEW_API=File API -FILE_API_LIST_VIEW_PARAMETER=Parameter -FILE_API_LIST_VIEW_THREAD_ID=Thread ID -FILE_API_LIST_VIEW_RETURN=Return value -FILE_API_LIST_VIEW_ERRNO=Error code - -FILE_CHART_CHART=Chart -FILE_CHART_FILE=File -FILE_CHART_TITLE=File Chart -FILE_CHART_TOGGLE_RENDERER_FD=FD: -FILE_CHART_TOGGLE_RENDERER_OMIT=... -FILE_CHART_TOGGLE_RENDERER_OBJ=0x -FILE_CHART_TOGGLE_RENDERER_OBJECT=Object - -FILE_DETAILS_API_COUNT=API count : -FILE_DETAILS_FAILED_API_COUNT=Failed API count : -FILE_DETAILS_FILE_NAME=File name : -FILE_DETAILS_FILE_NAME_NEWLINE=File name : \n -FILE_DETAILS_FILE_PATH=File path : -FILE_DETAILS_READ_SIZE=Read size : -FILE_DETAILS_TITLE=File Details -FILE_DETAILS_TOTAL_USE_TIME=Total use time : -FILE_DETAILS_WRITE_SIZE=Write size : -FILE_DETAILS_TOTAL_SIZE=File size : - - -FILE_TIMELINE_DATA_STR1=time: -FILE_TIMELINE_DATA_STR2=\ \ open API count : -FILE_TIMELINE_DATA_STR3=\ \ close API count : -FILE_TIMELINE_DATA_STR4=\ \ current open count : diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/InformationViewLabels.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/InformationViewLabels.java deleted file mode 100644 index 9682c61..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/InformationViewLabels.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * YeongTaik Byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.nl; - -import org.eclipse.osgi.util.NLS; - -public class InformationViewLabels extends NLS { - private static final String BUNDLE_NAME = "org.tizen.dynamicanalyzer.nl.InformationViewLabels"; //$NON-NLS-1$ - public static String CALLSTACK_TABLE_UNKNOWN_LIBRARY; - public static String CALLSTACK_TABLE_UNKNOWN_FUNCTION; - public static String CALLSTACK_VIEW_ADDRESS; - public static String CALLSTACK_VIEW_BINARY_PATH; - public static String CALLSTACK_VIEW_FUNCTION; - public static String CALLSTACK_VIEW_TITLE; - public static String CURRENT_TABLE_AVAILABLE_MEMORY; - public static String CURRENT_TABLE_BRIGHTNESS; - public static String CURRENT_TABLE_THREAD; - - public static String RANGE_VIEW_TITLE; - public static String RANGE_VIEW_AVERAGE; - public static String RANGE_VIEW_END; - public static String RANGE_VIEW_MAXIMUM; - public static String RANGE_VIEW_MINIMUM; - public static String RANGE_VIEW_NAME; - public static String RANGE_VIEW_START; - public static String RANGE_VIEW_STATISTICS; - - public static String SCORE_VIEW_ELECTRIC_ENERGY; - public static String SCORE_VIEW_FAIL_COUNT; - public static String SCORE_VIEW_LEAK_SIZE; - public static String SCORE_VIEW_SCORE; - public static String SCORE_VIEW_WARNING_COUNT; - - public static String SNAPSHOT_VIEW_TITLE; - public static String SNAPSHOT_VIEW_BLUETOOTH_ELSE; - public static String SNAPSHOT_VIEW_BLUETOOTH_OFF; - public static String SNAPSHOT_VIEW_BLUETOOTH_TRANSFER; - public static String SNAPSHOT_VIEW_BYTE; - public static String SNAPSHOT_VIEW_CPU; - public static String SNAPSHOT_VIEW_CURRENT_VIEW; - public static String SNAPSHOT_VIEW_GPS_CONNECTED; - public static String SNAPSHOT_VIEW_GPS_OFF; - public static String SNAPSHOT_VIEW_GPS_SEARCHING; - public static String SNAPSHOT_VIEW_MB; - public static String SNAPSHOT_VIEW_PROCESS; - public static String SNAPSHOT_VIEW_WIFI_CONNECTED; - public static String SNAPSHOT_VIEW_WIFI_OFF; - public static String SNAPSHOT_VIEW_WIFI_TRANSFER; - public static String SNAPSHOT_VIEW_WIFI_UNCONNECTED; - - public static String STATS_TABLE_CHILD; - public static String STATS_TABLE_CPU_APP; - public static String STATS_TABLE_CPU_CORE0; - public static String STATS_TABLE_CPU_CORE1; - public static String STATS_TABLE_CPU_CORE2; - public static String STATS_TABLE_CPU_CORE3; - public static String STATS_TABLE_CPU_TOTAL; - public static String STATS_TABLE_CPU_FREQUENCY; - public static String STATS_TABLE_ENERGY; - public static String STATS_TABLE_FILE_COUNT; - public static String STATS_TABLE_HEAP_USER; - public static String STATS_TABLE_PROCESS_PSS; - public static String STATS_TABLE_PROCESS_RSS; - public static String STATS_TABLE_PROCESS_VSS; - public static String STATS_TABLE_MEMORY_PROCESS; - public static String STATS_TABLE_MEMORY_SYSTEM; - public static String STATS_TABLE_MEMORY_TOTAL; - public static String STATS_TABLE_READ_SIZE; - public static String STATS_TABLE_TIME; - public static String STATS_TABLE_WRITE_SIZE; - static { - // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, InformationViewLabels.class); - } - - private InformationViewLabels() { - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/InformationViewLabels.properties b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/InformationViewLabels.properties deleted file mode 100644 index f81d389..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/InformationViewLabels.properties +++ /dev/null @@ -1,62 +0,0 @@ -CALLSTACK_TABLE_UNKNOWN_LIBRARY= -CALLSTACK_TABLE_UNKNOWN_FUNCTION= -CALLSTACK_VIEW_ADDRESS=Address -CALLSTACK_VIEW_BINARY_PATH=Binary path -CALLSTACK_VIEW_FUNCTION=Function -CALLSTACK_VIEW_TITLE=Callstack -CURRENT_TABLE_AVAILABLE_MEMORY=Available memory -CURRENT_TABLE_BRIGHTNESS=Brightness -CURRENT_TABLE_THREAD=Thread - -RANGE_VIEW_TITLE=Range -RANGE_VIEW_AVERAGE=Avg. -RANGE_VIEW_END=End -RANGE_VIEW_MAXIMUM=Max. -RANGE_VIEW_MINIMUM=Min. -RANGE_VIEW_NAME=Name -RANGE_VIEW_START=Start -RANGE_VIEW_STATISTICS=Stats - -SCORE_VIEW_ELECTRIC_ENERGY=Electric energy -SCORE_VIEW_FAIL_COUNT=Fail count -SCORE_VIEW_LEAK_SIZE=Leak size -SCORE_VIEW_SCORE=Score -SCORE_VIEW_WARNING_COUNT=Warning count - -SNAPSHOT_VIEW_TITLE=Snapshot -SNAPSHOT_VIEW_BLUETOOTH_ELSE=Bluetooth on -SNAPSHOT_VIEW_BLUETOOTH_OFF=Bluetooth off -SNAPSHOT_VIEW_BLUETOOTH_TRANSFER=Bluetooth transfer in progress... -SNAPSHOT_VIEW_BYTE=Byte -SNAPSHOT_VIEW_CPU=CPU -SNAPSHOT_VIEW_CURRENT_VIEW=Current view -SNAPSHOT_VIEW_GPS_CONNECTED=GPS connected -SNAPSHOT_VIEW_GPS_OFF=GPS off -SNAPSHOT_VIEW_GPS_SEARCHING=GPS searching -SNAPSHOT_VIEW_MB=\ MB -SNAPSHOT_VIEW_PROCESS=Process -SNAPSHOT_VIEW_WIFI_CONNECTED=Wi-Fi connected -SNAPSHOT_VIEW_WIFI_OFF=Wi-Fi off -SNAPSHOT_VIEW_WIFI_TRANSFER=Wi-Fi transfer in progress... -SNAPSHOT_VIEW_WIFI_UNCONNECTED=Wi-Fi ont connected - -STATS_TABLE_CHILD= - -STATS_TABLE_CPU_APP=Application CPU load -STATS_TABLE_CPU_CORE0=Core 0 -STATS_TABLE_CPU_CORE1=Core 1 -STATS_TABLE_CPU_CORE2=Core 2 -STATS_TABLE_CPU_CORE3=Core 3 -STATS_TABLE_CPU_TOTAL=Total CPU load -STATS_TABLE_CPU_FREQUENCY=CPU frequency -STATS_TABLE_ENERGY=Energy (mW) -STATS_TABLE_FILE_COUNT=File count -STATS_TABLE_HEAP_USER=Application heap size -STATS_TABLE_PROCESS_PSS=PSS -STATS_TABLE_PROCESS_RSS=RSS -STATS_TABLE_PROCESS_VSS=VSS -STATS_TABLE_MEMORY_PROCESS=Process memory -STATS_TABLE_MEMORY_SYSTEM=System memory -STATS_TABLE_MEMORY_TOTAL=Total memory -STATS_TABLE_READ_SIZE=File read size -STATS_TABLE_TIME=Time -STATS_TABLE_WRITE_SIZE=File write size diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/SummaryLabels.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/SummaryLabels.java deleted file mode 100644 index 0eacc0e..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/SummaryLabels.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * This program and the accompanying materials are made available - * under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * - S-Core Co., Ltd - * - */ - -package org.tizen.dynamicanalyzer.nl; - -import org.eclipse.osgi.util.NLS; - -public class SummaryLabels extends NLS { - private static final String BUNDLE_NAME = "org.tizen.dynamicanalyzer.nl.SummaryLabels"; //$NON-NLS-1$ - - public static String FAILED_API_LIST_VIEW_TITLE; - public static String FAILED_API_LIST_VIEW_INDEX; - public static String FAILED_API_LIST_VIEW_NAME; - public static String FAILED_API_LIST_VIEW_PARAMETER; - public static String FAILED_API_LIST_VIEW_RETURN; - public static String FAILED_API_LIST_VIEW_TIME; - public static String FAILED_API_LIST_VIEW_ERROR_CODE; - public static String FAILED_API_LIST_VIEW_ERROR_DESCRIPTION; - - public static String FUNCTION_USAGE_PROFILER_APPLICATION; - public static String FUNCTION_USAGE_PROFILER_DEPENDENT_LIB; - - public static String FUNCTION_USER_PROFILING_VIEW_TITLE; - public static String FUNCTION_USER_PROFILING_VIEW_NAME; - public static String FUNCTION_USER_PROFILING_VIEW_CPU_TIME; - public static String FUNCTION_USER_PROFILING_VIEW_CPU_RATE; - public static String FUNCTION_USER_PROFILING_VIEW_ELASPED_TIME; - public static String FUNCTION_USER_PROFILING_VIEW_CALL_COUNT; - - public static String WARNING_CASE_BRIEF_DUPLICATE; - public static String WARNING_CASE_BRIEF_NO_OPERATION; - public static String WARNING_CASE_BRIEF_REPEAT; - public static String WARNING_CASE_BRIEF_UNUSED; - public static String WARNING_CASE_POST_FIX_DUPLICATE; - public static String WARNING_CASE_POST_FIX_NO_OPERATION; - public static String WARNING_CASE_POST_FIX_REPEAT; - public static String WARNING_CASE_POST_FIX_UNUSED; - - public static String WARNING_CASE_PRE_FIX; - - public static String WARNING_LIST_VIEW_TITLE; - public static String WARNING_LIST_VIEW_CATEGORY; - public static String WARNING_LIST_VIEW_INDEX; - public static String WARNING_LIST_VIEW_WARNING_MESSAGE; - public static String WARNING_TABLE_FILE; - public static String WARNING_TABLE_SOCKET; - - public static String FILE_DETAILS_TITLE; - - public static String LEAK_DATA_DEFAULT_FORMAT; - - public static String LEAK_TABLE_ETC; - public static String LEAK_TABLE_MEMORY; - public static String LEAK_TABLE_RESOURCE; - - public static String LEAK_VIEW_TITLE; - public static String LEAK_VIEW_FILE_PARAMETER; - public static String LEAK_VIEW_INDEX; - public static String LEAK_VIEW_NAME; - public static String LEAK_VIEW_RETURN; - public static String LEAK_VIEW_TIME; - public static String LEAK_VIEW_TYPE; - - public static String SUMMARY_PAGE_CALLSTACK_TITLE; - public static String SUMMARY_PAGE_SNAPSHOT_TITLE; - static { - // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, SummaryLabels.class); - } - - private SummaryLabels() { - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/SummaryLabels.properties b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/SummaryLabels.properties deleted file mode 100644 index 0310b01..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/SummaryLabels.properties +++ /dev/null @@ -1,55 +0,0 @@ -FAILED_API_LIST_VIEW_TITLE=Failed APIs -FAILED_API_LIST_VIEW_INDEX=\# -FAILED_API_LIST_VIEW_NAME=Name -FAILED_API_LIST_VIEW_PARAMETER=Parameter -FAILED_API_LIST_VIEW_RETURN=Return -FAILED_API_LIST_VIEW_TIME=Time -FAILED_API_LIST_VIEW_ERROR_CODE=Error code -FAILED_API_LIST_VIEW_ERROR_DESCRIPTION=Error description - -FUNCTION_USAGE_PROFILER_APPLICATION=Application -FUNCTION_USAGE_PROFILER_DEPENDENT_LIB=Dependent library - -FUNCTION_USER_PROFILING_VIEW_TITLE=Function Usage Profiling -FUNCTION_USER_PROFILING_VIEW_NAME=Library or function name -FUNCTION_USER_PROFILING_VIEW_CPU_RATE=CPU rate -FUNCTION_USER_PROFILING_VIEW_CPU_TIME=CPU time -FUNCTION_USER_PROFILING_VIEW_ELASPED_TIME=Elapsed time -FUNCTION_USER_PROFILING_VIEW_CALL_COUNT=Call count - -WARNING_CASE_BRIEF_DUPLICATE=Duplicate file open. -WARNING_CASE_BRIEF_NO_OPERATION=File closed without changes. -WARNING_CASE_BRIEF_REPEAT=File opened and closed repeatedly. -WARNING_CASE_BRIEF_UNUSED=File opened and unused for more than a minute. -WARNING_CASE_POST_FIX_DUPLICATE=> file opened more than once with different file descriptors. Open it once and share the file descriptor. -WARNING_CASE_POST_FIX_NO_OPERATION=> file closed without changes. Check whether the file must be opened at all. -WARNING_CASE_POST_FIX_REPEAT=> file opened and closed repeatedly. Keep the file open until not required. -WARNING_CASE_POST_FIX_UNUSED=> file opened and unused for more than a minute. - -WARNING_CASE_PRE_FIX=< - -WARNING_LIST_VIEW_TITLE=Warning List -WARNING_LIST_VIEW_CATEGORY=Category -WARNING_LIST_VIEW_INDEX=\# -WARNING_LIST_VIEW_WARNING_MESSAGE=Warning message -WARNING_TABLE_FILE=File -WARNING_TABLE_SOCKET=Socket - -FILE_DETAILS_TITLE=* Warning message * - -LEAK_DATA_DEFAULT_FORMAT=--:--:--- - -LEAK_TABLE_ETC=Other -LEAK_TABLE_MEMORY=Memory -LEAK_TABLE_RESOURCE=Resource - -LEAK_VIEW_TITLE=Leaks -LEAK_VIEW_FILE_PARAMETER=File or parameter -LEAK_VIEW_INDEX=\# -LEAK_VIEW_NAME=API -LEAK_VIEW_RETURN=Return value -LEAK_VIEW_TIME=Time -LEAK_VIEW_TYPE=Leak type - -SUMMARY_PAGE_CALLSTACK_TITLE=Callstack -SUMMARY_PAGE_SNAPSHOT_TITLE=Snapshot diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/ThreadPageLabels.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/ThreadPageLabels.java deleted file mode 100644 index 9a59d67..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/ThreadPageLabels.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * YeongTaik Byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.nl; - -import org.eclipse.osgi.util.NLS; - -public class ThreadPageLabels extends NLS { - private static final String BUNDLE_NAME = "org.tizen.dynamicanalyzer.nl.ThreadPageLabels"; //$NON-NLS-1$ - public static String THREAD_CHART_THREAD; - public static String THREAD_CHART_TITLE; - public static String THREAD_DETAILS_TITLE; - public static String SYNC_CHART_TITLE; - - public static String THREAD_CHART_SERIES_LOAD; - public static String THREAD_CHART_SERIES_EVENT; - public static String THREAD_CHART_SERIES_API; - - public static String THREAD_ITEM_TYPE_MAIN; - public static String THREAD_ITEM_TYPE_OSP; - public static String THREAD_ITEM_TYPE_PTHREAD; - - public static String SYNC_TYPE_OSP_MUTEX; - public static String SYNC_TYPE_OSP_MONITOR; - public static String SYNC_TYPE_OSP_SEMAPHORE; - public static String SYNC_TYPE_PTHREAD_MUTEX; - public static String SYNC_TYPE_PTHREAD_COND_VARIABLE; - public static String SYNC_TYPE_PTHREAD_RWLOCK; - public static String SYNC_TYPE_PTHREAD_SPINLOCK; - public static String SYNC_TYPE_PTHREAD_BARRIER; - - public static String THREAD_API_JOIN; - - public static String THREAD_CHART_NAME_PREFIX; - public static String THREAD_CHART_NAME_POSTFIX; - public static String THREAD_CHART_NAME_TID; - public static String THREAD_CHART_NAME_OBJ; - - public static String THREAD_SYNC_CHART_SERIES_STATE; - - /* Thread API List view */ - public static String THREAD_API_LIST_VEIW_TITLE; - public static String THREAD_API_LIST_VIEW_INDEX; - public static String THREAD_API_LIST_VIEW_TIME; - public static String THREAD_API_LIST_VIEW_NAME; - public static String THREAD_API_LIST_VIEW_PARAMETER; - public static String THREAD_API_LIST_VIEW_THREAD_ID; - public static String THREAD_API_LIST_VIEW_RETURN; - public static String THREAD_API_LIST_VIEW_ERRNO; - - /* Thread Details*/ - public static String THREAD_DETAILS_TID; - public static String THREAD_DETAILS_TTYPE; - - static { - // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, ThreadPageLabels.class); - } - - private ThreadPageLabels() { - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/ThreadPageLabels.properties b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/ThreadPageLabels.properties deleted file mode 100644 index 75f2d0b..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/ThreadPageLabels.properties +++ /dev/null @@ -1,42 +0,0 @@ -THREAD_CHART_THREAD=Thread -THREAD_CHART_TITLE=Thread Chart -THREAD_DETAILS_TITLE=Thread Details -SYNC_CHART_TITLE=Sync Chart - -THREAD_CHART_SERIES_LOAD=LOAD -THREAD_CHART_SERIES_EVENT=EVENT -THREAD_CHART_SERIES_API=API - -THREAD_ITEM_TYPE_MAIN=main -THREAD_ITEM_TYPE_OSP=OSP -THREAD_ITEM_TYPE_PTHREAD=pthread - -SYNC_TYPE_OSP_MUTEX=OSP mutex -SYNC_TYPE_OSP_MONITOR=OSP monitor -SYNC_TYPE_OSP_SEMAPHORE=OSP semaphore -SYNC_TYPE_PTHREAD_MUTEX=pthread mutex -SYNC_TYPE_PTHREAD_COND_VARIABLE=pthread \ncond variable -SYNC_TYPE_PTHREAD_RWLOCK=pthread rwlock -SYNC_TYPE_PTHREAD_SPINLOCK=pthread spinlock -SYNC_TYPE_PTHREAD_BARRIER=pthread barrier - -THREAD_API_JOIN=Thread::Join - -THREAD_CHART_NAME_PREFIX=\n( -THREAD_CHART_NAME_POSTFIX=) -THREAD_CHART_NAME_TID=tid : -THREAD_CHART_NAME_OBJ=obj :\n - -THREAD_SYNC_CHART_SERIES_STATE=STATE - -THREAD_API_LIST_VEIW_TITLE=Thread API List -THREAD_API_LIST_VIEW_INDEX=# -THREAD_API_LIST_VIEW_TIME=Time -THREAD_API_LIST_VIEW_NAME=Thread API -THREAD_API_LIST_VIEW_PARAMETER=Parameter -THREAD_API_LIST_VIEW_THREAD_ID=Thread ID -THREAD_API_LIST_VIEW_RETURN=Return value -THREAD_API_LIST_VIEW_ERRNO=Error Code - -THREAD_DETAILS_TID=Thread ID : -THREAD_DETAILS_TTYPE=Type : \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/TimelineChartLabels.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/TimelineChartLabels.java deleted file mode 100644 index bd5fe81..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/TimelineChartLabels.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * SangHyun Lee - * YeongTaik Byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.nl; - -import org.eclipse.osgi.util.NLS; - -public class TimelineChartLabels extends NLS { - private static final String BUNDLE_NAME = "org.tizen.dynamicanalyzer.nl.TimelineChartLabels"; //$NON-NLS-1$ - public static String CPU_CHART_SERIES_NAME_APP_LOAD; - public static String CPU_CHART_SERIES_NAME_TOTAL_LOAD; - public static String CPU_CHART_TITLE; - - public static String CPU_CORE_CHART_SERIES_NAME_CORE0; - public static String CPU_CORE_CHART_SERIES_NAME_CORE1; - public static String CPU_CORE_CHART_SERIES_NAME_CORE2; - public static String CPU_CORE_CHART_SERIES_NAME_CORE3; - public static String CPU_CORE_CHART_TITLE; - - public static String CPU_FREQUENCY_CHART_FREQUENCY; - public static String CPU_FREQUENCY_CHART_TITLE; - - public static String FILE_CHART_SERIES_NAME_FD_COUNT; - public static String FILE_CHART_SERIES_NAME_READ; - public static String FILE_CHART_SERIES_NAME_WRITE; - public static String FILE_CHART_TITLE; - - public static String HEAP_CHART_SERIES_NAME_PLATFORM_ALLOCATION; - public static String HEAP_CHART_SERIES_NAME_USER_ALLOCATION; - public static String HEAP_CHART_TITLE; - - public static String PROCESS_MEMORY_CHART_PSS; - public static String PROCESS_MEMORY_CHART_RSS; - public static String PROCESS_MEMORY_CHART_VSS; - public static String PROCESS_MEMORY_CHART_TITLE; - - public static String SYSTEM_MEMORY_CHART_SERIES_NAME_PROC_RESIDENT; - public static String SYSTEM_MEMORY_CHART_SERIES_NAME_SYSTEM; - public static String SYSTEM_MEMORY_CHART_SERIES_NAME_TOTAL; - public static String SYSTEM_MEMORY_CHART_TITLE; - - public static String SCREENSHOT_CHART_TITLE; - - public static String UI_EVENT_CHART_SERIES_NAME_KEY; - public static String UI_EVENT_CHART_SERIES_NAME_TOUCH; - public static String UI_EVENT_CHART_SERIES_NAME_GESTURE; - public static String UI_EVENT_CHART_SERIES_NAME_ORIENTATION; - public static String UI_EVENT_CHART_SERIES_NAME_FRAMEWORK; - public static String UI_EVENT_CHART_TITLE; - - public static String TIMELINE_TICK_ADD; - - public static String EDIT_CHART_DLG_TITLE; - - - - - - static { - // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, TimelineChartLabels.class); - } - - private TimelineChartLabels() { - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/TimelineChartLabels.properties b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/TimelineChartLabels.properties deleted file mode 100644 index be8e802..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/TimelineChartLabels.properties +++ /dev/null @@ -1,44 +0,0 @@ -CPU_CHART_SERIES_NAME_APP_LOAD=Application -CPU_CHART_SERIES_NAME_TOTAL_LOAD=Total CPU load -CPU_CHART_TITLE=CPU - -CPU_CORE_CHART_SERIES_NAME_CORE0=Core 0 -CPU_CORE_CHART_SERIES_NAME_CORE1=Core 1 -CPU_CORE_CHART_SERIES_NAME_CORE2=Core 2 -CPU_CORE_CHART_SERIES_NAME_CORE3=Core 3 -CPU_CORE_CHART_TITLE=CPU core - -CPU_FREQUENCY_CHART_FREQUENCY=CPU frequency -CPU_FREQUENCY_CHART_TITLE=CPU frequency - -FILE_CHART_SERIES_NAME_FD_COUNT=File count -FILE_CHART_SERIES_NAME_READ=Read size -FILE_CHART_SERIES_NAME_WRITE=Write size -FILE_CHART_TITLE=File - -HEAP_CHART_SERIES_NAME_PLATFORM_ALLOCATION=Platform -HEAP_CHART_SERIES_NAME_USER_ALLOCATION=Application -HEAP_CHART_TITLE=Heap allocation - -PROCESS_MEMORY_CHART_PSS=Proportional set size -PROCESS_MEMORY_CHART_RSS=Resident set size -PROCESS_MEMORY_CHART_VSS=Virtual set size -PROCESS_MEMORY_CHART_TITLE=Process Size - -SYSTEM_MEMORY_CHART_SERIES_NAME_PROC_RESIDENT=Process memory size -SYSTEM_MEMORY_CHART_SERIES_NAME_SYSTEM=System memory size -SYSTEM_MEMORY_CHART_SERIES_NAME_TOTAL=Total memory size -SYSTEM_MEMORY_CHART_TITLE=Memory - -SCREENSHOT_CHART_TITLE=Screenshot - -UI_EVENT_CHART_SERIES_NAME_KEY=Key -UI_EVENT_CHART_SERIES_NAME_TOUCH=Touch -UI_EVENT_CHART_SERIES_NAME_GESTURE=Gesture -UI_EVENT_CHART_SERIES_NAME_ORIENTATION=Orientation -UI_EVENT_CHART_SERIES_NAME_FRAMEWORK=Framework -UI_EVENT_CHART_TITLE=UI Event - -TIMELINE_TICK_ADD=Add - -EDIT_CHART_DLG_TITLE=Edit chart diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/TimelinePageLabels.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/TimelinePageLabels.java deleted file mode 100644 index 162eeb3..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/TimelinePageLabels.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * SangHyun Lee - * Jooyoul Lee - * YeongTaik Byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.nl; - -import org.eclipse.osgi.util.NLS; - -public class TimelinePageLabels extends NLS { - private static final String BUNDLE_NAME = "org.tizen.dynamicanalyzer.nl.TimelinePageLabels"; //$NON-NLS-1$ - public static String CALL_TRACE_VIEW_NAME; - public static String CALL_TRACE_VIEW_TIME; - public static String CALL_TRACE_VIEW_TITLE; - static { - // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, TimelinePageLabels.class); - } - - private TimelinePageLabels() { - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/TimelinePageLabels.properties b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/TimelinePageLabels.properties deleted file mode 100644 index 5339848..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/TimelinePageLabels.properties +++ /dev/null @@ -1,4 +0,0 @@ -CALL_TRACE_VIEW_NAME=API -CALL_TRACE_VIEW_TIME=Time -CALL_TRACE_VIEW_TITLE=Call Trace - diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/UserInterfacePageLabels.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/UserInterfacePageLabels.java deleted file mode 100644 index 9a51d76..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/UserInterfacePageLabels.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Hyunjong Park - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.nl; - -import org.eclipse.osgi.util.NLS; - -public class UserInterfacePageLabels extends NLS { - - private static final String BUNDLE_NAME = "org.tizen.dynamicanalyzer.nl.UserInterfacePageLabels"; //$NON-NLS-1$ - - - public static String USERINTERFACE_SNAPSHOT_VIEW_NAME; - - public static String USERINTERFACE_CONTROL_LIST_VIEW_NAME; - public static String USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_0; - public static String USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_1; - public static String USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_2; - public static String USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_3; - - public static String USERINTERFACE_SCENETRANSFORM_LIST_VIEW_NAME; - public static String USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_0; - public static String USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_1; - public static String USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_2; - public static String USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_3; - public static String USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_4; - - public static String USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_NAME; - public static String USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_0; - public static String USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_1; - public static String USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_2; - public static String USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_3; - public static String USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_4; - public static String USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_5; - public static String USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_6; - public static String USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_7; - public static String USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_8; - - static { - // initialize resource bundle - NLS.initializeMessages(BUNDLE_NAME, UserInterfacePageLabels.class); - } - - private UserInterfacePageLabels() { - } -} \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/UserInterfacePageLabels.properties b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/UserInterfacePageLabels.properties deleted file mode 100644 index ec1c9b7..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/UserInterfacePageLabels.properties +++ /dev/null @@ -1,27 +0,0 @@ - -USERINTERFACE_CONTROL_LIST_VIEW_NAME = Controls - -USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_0 = Class name -USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_1 = Initializing time -USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_2 = Terminating time -USERINTERFACE_CONTROL_LIST_VIEW_COLUMN_3 = Control type - -USERINTERFACE_SCENETRANSFORM_LIST_VIEW_NAME = Scene Transforms -USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_0 = Time -USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_1 = Scene name -USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_2 = Form name -USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_3 = Panel name -USERINTERFACE_SCENETRANSFORM_LIST_VIEW_COLUMN_4 = Transform time - -USERINTERFACE_SNAPSHOT_VIEW_NAME = Snapshot - -USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_NAME = UI Function Profiling -USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_0 = Library or function name -USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_1 = Sum -USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_2 = Average -USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_3 = Sum -USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_4 = Average -USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_5 = Sum -USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_6 = Average -USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_7 = Sum -USERINTERFACE_UIFUNCTIONPROFILING_LIST_VIEW_COLUMN_8 = Average \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/project/AppDesktopInfo.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/project/AppDesktopInfo.java deleted file mode 100644 index d07ee41..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/project/AppDesktopInfo.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.project; - -public class AppDesktopInfo { - private String desktopName; - private String name; - private String id; - private String execPath; - - public String getDesktopName() { - return desktopName; - } - - public void setDesktopName(String desktopName) { - this.desktopName = desktopName; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getExecPath() { - return execPath; - } - - public void setExecPath(String execPath) { - this.execPath = execPath; - } - - public void setAppId(String appid) { - id = appid; - } - - public String getAppId() { - return id; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/project/Project.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/project/Project.java deleted file mode 100755 index 466bfb5..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/project/Project.java +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.project; - -import java.io.File; -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.SQLException; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Locale; - -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.AnalyzerPaths; -import org.tizen.dynamicanalyzer.common.CommonConstants; -import org.tizen.dynamicanalyzer.communicator.DACommunicator; -import org.tizen.dynamicanalyzer.model.BaseLogCenter; -import org.tizen.dynamicanalyzer.model.LogCenter; -import org.tizen.dynamicanalyzer.sql.SqlManager; -import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfiler; -import org.tizen.sdblib.IDevice; - -public class Project { - private final String DEFAULT_TIME_FORMAT = "_yyyy-MM-dd-HH-mm-ss";//$NON-NLS-1$ - - private String appName = null; - private String createTime = null; - private List logCenters; - private Connection connection; - private String savePath; - private String lastLogNum = CommonConstants.ZERO; - private String version = null; - private String device = null; - private List appInfo = null; - private long startTime = 0; - private long lastTime = 0; - private int systemMemorySize = 0; - private int pid = 0; - - public String getMaxBrightness() { - if (!getAppInfo().isEmpty()) { - String size = appInfo - .get(AnalyzerConstants.APP_INFO_MAX_BRIGHTNESS); - return size; - } - return null; - } - - public long getStartTime() { - if (0 == startTime) { - if (!getAppInfo().isEmpty()) { - String time = appInfo - .get(AnalyzerConstants.APP_INFO_START_TIME); - if (time.isEmpty()) { - System.out.println("ERROR : start time is empty!!"); //$NON-NLS-1$ - } else { - startTime = Long.parseLong(time); - } - } - } - return startTime; - } - - public int getSystemMemorySize() { - if (0 == systemMemorySize) { - if (!getAppInfo().isEmpty()) { - String time = appInfo - .get(AnalyzerConstants.APP_INFO_SYSTEM_MEMORY_SIZE); - systemMemorySize = Integer.parseInt(time); - } - } - return systemMemorySize; - } - - public int getPID() { - if (0 == pid) { - if (!getAppInfo().isEmpty()) { - String pID = appInfo.get(AnalyzerConstants.APP_INFO_PID); - pid = Integer.parseInt(pID); - } - } - return pid; - } - - public long getLastTime() { - return lastTime; - } - - public void setLastTime(long lastTime) { - this.lastTime = lastTime; - } - - public List getAppInfo() { - if (null == appInfo) { - appInfo = new ArrayList(); - for (int i = 0; i < AnalyzerConstants.APP_INFO_SIZE; i++) { - appInfo.add(""); //$NON-NLS-1$ - } - } - return appInfo; - } - - public void setVersion(String ver) { - version = ver; - } - - public void setDevice(String dev) { - device = dev; - } - - public String getDevice() { - return device; - } - - public String getVersion() { - return version; - } - - public String getLastLogNum() { - return lastLogNum; - } - - public String getCreateTime() { - return createTime; - } - - public void setCreateTime(String createTime) { - this.createTime = createTime; - } - - public void setLastLogNum(String last) { - long prev = 0, current = 0; - try { - prev = Long.parseLong(lastLogNum); - current = Long.parseLong(last); - } catch (NumberFormatException e) { - e.printStackTrace(); - return; - } - if (prev < current) { - lastLogNum = last; - } - } - - public void init() { - appName = DACommunicator.getSelectedApp().getName(); - IDevice deviceName = DACommunicator.getSelectedDevice(); - if (null != deviceName && null != deviceName.getSerialNumber() - && !deviceName.getSerialNumber().isEmpty()) { - device = DACommunicator.getSelectedDevice().getSerialNumber(); - } else { - device = CommonConstants.SPACE; - } - - version = AnalyzerConstants.SAVE_DATA_VERSION; - - SimpleDateFormat format = new SimpleDateFormat(DEFAULT_TIME_FORMAT, - Locale.KOREA); - Date date = new Date(); - createTime = date.toString(); - savePath = AnalyzerPaths.TEMP_FOLDER_PATH + File.separator + appName - + format.format(date); - File imgFolder = new File(savePath + File.separator - + AnalyzerConstants.IMAGE_FOLDER_NAME); - if (!imgFolder.isDirectory()) { - imgFolder.mkdirs(); - } - - File samallImage = new File(savePath + File.separator - + AnalyzerConstants.IMAGE_FOLDER_NAME + File.separator - + AnalyzerConstants.SMALL_IMAGE_FOLDER_NAME); - if (!samallImage.isDirectory()) { - samallImage.mkdirs(); - } - - initLogCenters(null); - AnalyzerManager.setProject(this); - - // create table - SqlManager.createProjectTable(this); - int size = getLogCenters().size(); - for (int i = 0; i < size; i++) { - SqlManager.createTable(logCenters.get(i)); - } - // create save tables - SqlManager.createTables(); - } - - public String getSavePath() { - return savePath; - } - - public void setSavePath(String path) { - savePath = path; - } - - public Connection getConnection() { - try { - if (connection == null || connection.isClosed()) { - Class.forName("org.sqlite.JDBC"); //$NON-NLS-1$ - connection = DriverManager.getConnection("jdbc:sqlite:" //$NON-NLS-1$ - + savePath - + File.separator - + AnalyzerConstants.DATABASE_NAME); - } - } catch (Exception e) { - e.printStackTrace(); - } - return connection; - } - - public void closeConnection() { - try { - if (connection != null && !connection.isClosed()) { - connection.close(); - } - } catch (SQLException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - public String getAppName() { - return appName; - } - - public void setAppName(String name) { - appName = name; - } - - public boolean initLogCenters(List names) { - if (null != logCenters) { - logCenters = null; - } - - logCenters = new ArrayList(); - List baseLogcs = AnalyzerManager.getInnerLogCenters(); - if (null == baseLogcs || baseLogcs.isEmpty()) { - System.out - .println("DynamicAnalyzer folder or logc file is missing! "); //$NON-NLS-1$ - return false; - } - if (null == names || names.isEmpty()) { - int size = baseLogcs.size(); - for (int i = 0; i < size; i++) { - logCenters.add(copyLogCenter(baseLogcs.get(i))); - } - return true; - } - - int size = names.size(); - int baseSize = baseLogcs.size(); - for (int i = 0; i < size; i++) { - for (int a = 0; a < baseSize; a++) { - if (names.get(i).equals(baseLogcs.get(a).getName())) { - logCenters.add(copyLogCenter(baseLogcs.get(a))); - } - } - } - return true; - } - - private LogCenter copyLogCenter(BaseLogCenter from) { - LogCenter to = new LogCenter(); - to.setId(from.getId()); - to.setName(from.getName()); - to.setTotalColumnCount(from.getTotalColumnCount()); - to.setCustomColumn(from.isCustomColumn()); - - to.getColumnName().addAll(from.getColumnName()); - to.getType().addAll(from.getType()); - to.getColumnSizes().addAll(from.getColumnSize()); - to.getColumnOrder().addAll(from.getColumnOrder()); - to.getColumnVisibility().addAll(from.getColumnVisibility()); - to.getTableColumnName().addAll(from.getTableColumnName()); - return to; - } - - public List getLogCenters() { - return logCenters; - } - - public boolean isValid() { - if (null == version || null == appName || null == device - || null == lastLogNum || null == logCenters - || logCenters.isEmpty()) { - return false; - } - return true; - } - - public String getBinaryPath() { - if (null != getAppInfo() || !getAppInfo().isEmpty()) { - return appInfo.get(AnalyzerConstants.APP_INFO_BINARY_PATH); - } - return null; - } - - public boolean isPieBuild() { - try { - if ("1".equals(appInfo.get(AnalyzerConstants.APP_INFO_PIE_BUILD))) { //$NON-NLS-1$ - return true; - } - } catch (NullPointerException e) { - System.out.println(appInfo - .get(AnalyzerConstants.APP_INFO_PIE_BUILD)); - e.printStackTrace(); - return false; - } - return false; - } - - public String getBaseAddress() { - if (null != getAppInfo() || !getAppInfo().isEmpty()) { - return appInfo.get(AnalyzerConstants.APP_INFO_BASE_ADDRESS); - } - return null; - } - - public int getApplicationType() { - if (!getAppInfo().isEmpty()) { - String appType = appInfo.get(AnalyzerConstants.APP_INFO_APP_TYPE); - return Integer.parseInt(appType); - } - return AnalyzerConstants.APP_TYPE_TIZEN; - } - - public void setTotalProfilingSampleCount(int count) { - FunctionUsageProfiler.getInstance().getProfileDataMaker() - .setTotalSampleCount(count); - } - - public int getTotalProfilingSampleCount() { - return FunctionUsageProfiler.getInstance().getProfileDataMaker() - .getTotalSampleCount(); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/resources/ColorResources.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/resources/ColorResources.java deleted file mode 100755 index 34eae0e..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/resources/ColorResources.java +++ /dev/null @@ -1,756 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.resources; - -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.RGB; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; - -public class ColorResources { - public static final Color WHITE = getColor("white"); //$NON-NLS-1$ - public static final Color BLACK = getColor("black"); //$NON-NLS-1$ - public static final Color BLUE = getColor("blue"); //$NON-NLS-1$ - public static final Color RED = getColor("red"); //$NON-NLS-1$ - public static final Color YELLOW = getColor("yellow"); //$NON-NLS-1$ - public static final Color PURPLE = getColor("purple"); //$NON-NLS-1$ - - public static final Color GREEN = getColor("green"); //$NON-NLS-1$ - public static final Color BROWN = getColor("brown"); //$NON-NLS-1$ - public static final Color NAVY = getColor("navy"); //$NON-NLS-1$ - public static final Color DARKVIOLET = getColor("darkviolet"); //$NON-NLS-1$ - public static final Color MAROON = getColor("maroon"); //$NON-NLS-1$ - public static final Color TEAL = getColor("teal"); //$NON-NLS-1$ - public static final Color INDIGO = getColor("indigo"); //$NON-NLS-1$ - public static final Color DARKGOLDENROD = getColor("darkgoldenrod"); //$NON-NLS-1$ - public static final Color CHOCOLATE = getColor("chocolate"); //$NON-NLS-1$ - public static final Color MAGNETA = getColor("magneta"); //$NON-NLS-1$ - - public static final Color GOLDENROD = getColor("goldenrod"); //$NON-NLS-1$ - public static final Color TURQUOISE = getColor("turquoise"); //$NON-NLS-1$ - public static final Color VIOLET = getColor("violet"); //$NON-NLS-1$ - public static final Color SLATEBLUE = getColor("slateblue"); //$NON-NLS-1$ - public static final Color ORANGE = getColor("orange"); //$NON-NLS-1$ - public static final Color YELLOWGREEN = getColor("yellowgreen"); //$NON-NLS-1$ - public static final Color SKYBLUE = getColor("skyblue"); //$NON-NLS-1$ - public static final Color ORCHID = getColor("orchid"); //$NON-NLS-1$ - public static final Color SANDYBROWN = getColor("sandybrown"); //$NON-NLS-1$ - public static final Color MEDIUMPURPLE = getColor("mediumpurple"); //$NON-NLS-1$ - - // shell window background color - public static Color WINDOW_BG_COLOR = getColor("window_bg_color"); //$NON-NLS-1$ - - public static Color DIALOG_BG_UPPER = getColor("dialg_bg_upper");//$NON-NLS-1$ - public static Color DIALOG_BG_LOWER = getColor("dialg_bg_lower");//$NON-NLS-1$ - public static Color DIALOG_SUNKEN_1 = getColor("dialg_sunken_1");//$NON-NLS-1$ - public static Color DIALOG_SUNKEN_2 = getColor("dialg_sunken_2");//$NON-NLS-1$ - - public static Color EDIT_CHART_DIALOG_UPPER = getColor("edit_chart_dialog_upper");//$NON-NLS-1$ - public static Color EDIT_CHART_DIALOG_LOWER = getColor("edit_chart_dialog_lower");//$NON-NLS-1$ - - public static Color VIEW_BORDER = getColor("view_border"); //$NON-NLS-1$ - public static Color VIEW_BG_COLOR = getColor("view_bg_color"); //$NON-NLS-1$ - public static Color VIEW_TITLE_FONT_COLOR = getColor("view_title_font_color");//$NON-NLS-1$ - - /** title bar colors **/ - public static Color TITLEBAR_TEXT_COLOR = getColor("titlebar_text_color"); //$NON-NLS-1$ - public static Color TITLEBAR_BG_COLOR = getColor("titlebar_bg"); //$NON-NLS-1$ - public static Color TITLEBAR_START_COLOR = getColor("titlebar_start_color"); //$NON-NLS-1$ - public static Color TITLEBAR_END_COLOR = getColor("titlebar_end_color"); //$NON-NLS-1$ - public static Color TITLEBAR_BOTTOM_STROKE_1 = getColor("titlebar_bottom_stroke_1"); //$NON-NLS-1$ - public static Color TITLEBAR_BOTTOM_STROKE_2 = getColor("titlebar_bottom_stroke_2"); //$NON-NLS-1$ - - /** Coolbar bg color **/ - public static Color COOLBAR_BG_COLOR = getColor("coolbar_bg_color"); //$NON-NLS-1$ - public static Color DEFAULT_FONT_COLOR = getColor("default_font_color");//$NON-NLS-1$ - - /** device and application combo specific colors start **/ - public static Color DEVICE_APPLICATION_ENABLE = getColor("device_application_enable_font"); //$NON-NLS-1$ - public static Color DEVICE_APPLICATION_DISABLE = getColor("device_application_disable"); //$NON-NLS-1$ - public static Color DEVICE_APPLICATION_POPUP_OUTER_1 = getColor("device_application_popup_outer_1"); //$NON-NLS-1$ - public static Color DEVICE_APPLICATION_POPUP_OUTER_2 = getColor("device_application_popup_outer_2"); //$NON-NLS-1$ - // public static Color DEVICE_APPLICATION_POPUP_OUTER_1 = RED; - public static Color DEVICE_APPLICATION_DROPDOWN_TEXT = getColor("device_application_enable_font"); //$NON-NLS-1$ - public static Color DEVICE_APPLICATION_ITEM_NORMAL_TOP = getColor("device_application_item_normal_top"); //$NON-NLS-1$ - public static Color DEVICE_APPLICATION_ITEM_NORMAL_INNER = getColor("device_application_item_normal_inner"); //$NON-NLS-1$ - public static Color DEVICE_APPLICATION_ITEM_NORMAL_BOTTOM = getColor("device_application_item_normal_bottom"); //$NON-NLS-1$ - public static Color DEVICE_APPLICATION_ITEM_SELECT_TOP = getColor( - "device_application_item_select_top", new RGB(76, 76, 77)); //$NON-NLS-1$ - public static Color DEVICE_APPLICATION_ITEM_SELECT_INNER = getColor("device_application_item_select_inner"); //$NON-NLS-1$ - public static Color DEVICE_APPLICATION_ITEM_SELECT_BOTTOM = getColor("device_application_item_select_bottom"); //$NON-NLS-1$ - - /*** combo button color ***/ - public static Color DEVICE_APPLICATION_BUTTON_NORMAL_START = getColor("device_application_button_normal_start"); //$NON-NLS-1$ - public static Color DEVICE_APPLICATION_BUTTON_NORMAL_END = getColor("device_application_button_normal_end"); //$NON-NLS-1$ - public static Color DEVICE_APPLICATION_BUTTON_PUSH_START = getColor("device_application_button_push_start"); //$NON-NLS-1$ - public static Color DEVICE_APPLICATION_BUTTON_PUSH_END = getColor("device_application_button_push_end"); //$NON-NLS-1$ - public static Color DEVICE_APPLICATION_BUTTON_HOVER_START = getColor("device_application_button_hover_start"); //$NON-NLS-1$ - public static Color DEVICE_APPLICATION_BUTTON_HOVER_END = getColor("device_application_button_hover_end"); //$NON-NLS-1$ - public static Color DEVICE_APPLICATION_BUTTON_DISABLE_START = getColor("device_application_button_disable_start"); //$NON-NLS-1$ - public static Color DEVICE_APPLICATION_BUTTON_DISABLE_END = getColor("device_application_button_disable_end"); //$NON-NLS-1$ - - public static Color DEVICE_APPLICATION_BUTTON_OUTLINE = getColor("device_application_button_outline"); //$NON-NLS-1$ - - /** device and application combo specific colors end **/ - - /*** common button colors ***/ - public static Color BUTTON_DISABLE_COLOR_START = getColor("button_disable_color_start"); //$NON-NLS-1$ - public static Color BUTTON_DISABLE_COLOR_END = getColor("button_disable_color_end"); //$NON-NLS-1$ - public static Color BUTTON_NORMAL_COLOR_START = getColor("button_normal_color_start"); //$NON-NLS-1$ - public static Color BUTTON_NORMAL_COLOR_END = getColor("button_normal_color_end"); //$NON-NLS-1$ - public static Color BUTTON_HOVER_COLOR_START = getColor("button_hover_color_start"); //$NON-NLS-1$ - public static Color BUTTON_HOVER_COLOR_END = getColor("button_hover_color_end"); //$NON-NLS-1$ - public static Color BUTTON_PUSH_COLOR_START = getColor("button_push_color_start"); //$NON-NLS-1$ - public static Color BUTTON_PUSH_COLOR_END = getColor("button_push_color_end"); //$NON-NLS-1$ - - public static Color BUTTON_OUTLINE_NORMAL_IN_COLOR = getColor("button_outline_normal_in_color"); //$NON-NLS-1$ - public static Color BUTTON_OUTLINE_PUSH_IN_COLOR = getColor("button_outline_push_in_color"); //$NON-NLS-1$ - public static Color BUTTON_OUTLINE_HOVER_IN_COLOR = getColor("button_outline_hover_in_color"); //$NON-NLS-1$ - public static Color BUTTON_OUTLINE_DISABLE_IN_COLOR = getColor("button_outline_disable_in_color"); //$NON-NLS-1$ - - public static Color BUTTON_OUTLINE_NORMAL_COLOR = getColor("button_outline_normal_color"); //$NON-NLS-1$ - public static Color BUTTON_OUTLINE_PUSH_COLOR = getColor("button_outline_push_color"); //$NON-NLS-1$ - public static Color BUTTON_OUTLINE_HOVER_COLOR = getColor("button_outline_hover_color"); //$NON-NLS-1$ - public static Color BUTTON_OUTLINE_DISABLE_COLOR = getColor("button_outline_disable_color"); //$NON-NLS-1$ - - public static Color BUTTON_NORMAL_FONT_COLOR = getColor("button_normal_font_color"); //$NON-NLS-1$ - public static Color BUTTON_PUSH_FONT_COLOR = getColor("button_push_font_color"); //$NON-NLS-1$ - public static Color BUTTON_HOVER_FONT_COLOR = getColor("button_hover_font_color"); //$NON-NLS-1$ - public static Color BUTTON_DISABLE_FONT_COLOR = getColor("button_disable_font_color"); //$NON-NLS-1$ - - /** normal view layout colors start **/ - public static Color NORMAL_VIEW_LAYOUT_OUTER = getColor("normal_view_layout_outer"); //$NON-NLS-1$ - public static Color NORMAL_VIEW_LAYOUT_MIDDLE = getColor("normal_view_layout_middle"); //$NON-NLS-1$ - public static Color NORMAL_VIEW_LAYOUT_INNER = getColor("normal_view_layout_inner"); //$NON-NLS-1$ - /** normal view layout colors end **/ - - /** view colors start **/ - public static Color SNAPSHOT_VIEW_OUTLINE = getColor("current_view_outline"); //$NON-NLS-1$ - public static Color SNAPSHOT_VIEW_TITLE_TEXT = WHITE; - public static Color SNAPSHOT_VIEW_MIDDLE = NORMAL_VIEW_LAYOUT_MIDDLE; - public static Color SNAPSHOT_VIEW_INNER = NORMAL_VIEW_LAYOUT_INNER; - - public static Color SNAPSHOT_VIEW_TABLE_TITLE_BG = getColor("current_view_table_title_bg"); //$NON-NLS-1$ - public static Color SNAPSHOT_VIEW_TABLE_TITLE_TEXT = getColor("current_view_table_title_text"); //$NON-NLS-1$ - public static Color SNAPSHOT_VIEW_TABLE_CONTENTS_BG = getColor("current_view_table_contents_bg"); //$NON-NLS-1$ - public static Color SNAPSHOT_VIEW_TABLE_CONTENTS_TEXT = getColor("current_view_table_contents_text"); //$NON-NLS-1$ - public static Color SNAPSHOT_VIEW_TABLE_LINE = getColor("current_view_table_line"); //$NON-NLS-1$ - - public static Color SNAPSHOT_VIEW_CPU_TEXT = getColor("current_view_cpu_text"); //$NON-NLS-1$ - public static Color SNAPSHOT_VIEW_PROCESS_TEXT = getColor("current_view_process_text"); //$NON-NLS-1$ - public static Color SNAPSHOT_VIEW_GRAPH_BG = getColor("current_view_graph_bg"); //$NON-NLS-1$ - public static Color SNAPSHOT_VIEW_CPU_GRAPH = SNAPSHOT_VIEW_CPU_TEXT; - public static Color SNAPSHOT_VIEW_PROCESS_GRAPH = SNAPSHOT_VIEW_PROCESS_TEXT; - public static Color SNAPSHOT_VIEW_GRAPH_OUTLINE = getColor("current_view_graph_outline"); //$NON-NLS-1$ - public static Color SNAPSHOT_VIEW_SNAPSHOT_OUTLINE = getColor("current_view_snapshot_outline"); //$NON-NLS-1$ - /** current view colors end **/ - - /** common table colors start **/ - public static Color TABLE_HEADER_BG = getColor("table_header_bg"); //$NON-NLS-1$ - public static Color TABLE_LINE = getColor("table_line"); //$NON-NLS-1$ - public static Color TABLE_CONTENTS_NORMAL = getColor("table_contents_normal"); //$NON-NLS-1$ - public static Color TABLE_CONTENTS_HOVER = getColor("table_contents_hover"); //$NON-NLS-1$ - public static Color TABLE_CONTENTS_SELECTED_START = getColor("table_contents_selected_start"); //$NON-NLS-1$ - public static Color TABLE_CONTENTS_SELECTED_END = getColor("table_contents_selected_end"); //$NON-NLS-1$ - public static Color TABLE_CONTENTS_SELECTED_FONT_COLOR = getColor("table_contents_selected_font_color"); //$NON-NLS-1$ - public static Color TABLE_HEADER_FONT_COLOR = getColor("table_title_font_color"); //$NON-NLS-1$ - public static Color TABLE_CONTENTS_FONT_COLOR = getColor("table_contents_font_color"); //$NON-NLS-1$ - /** common table colors end **/ - - /** open trace popup colors **/ - public static Color OPEN_TRACE_LABEL_COLOR = getColor("open_trace_label_color");//$NON-NLS-1$ - public static Color OPEN_TRACE_SAVE_CONTENTS_COLOR = getColor("open_trace_save_contents_color");//$NON-NLS-1$ - public static Color OPEN_TRACE_TEMP_CONTENTS_COLOR = getColor("open_trace_temp_contents_color");//$NON-NLS-1$ - public static Color OPEN_TRACE_TABLE_OUTLINE_COLOR = getColor("open_trace_table_outline_color");//$NON-NLS-1$ - - public static Color OPEN_TRACE_TABLE_CONTENT_NORMAL_COLOR1 = getColor("open_trace_table_content_normal_color1");//$NON-NLS-1$ - public static Color OPEN_TRACE_TABLE_CONTENT_HOVER_COLOR1 = getColor("open_trace_table_content_hover_color1");//$NON-NLS-1$ - public static Color OPEN_TRACE_TABLE_CONTENT_SELECTED_START_COLOR1 = getColor("open_trace_table_content_selected_start_color1");//$NON-NLS-1$ - public static Color OPEN_TRACE_TABLE_CONTENT_SELECTED_END_COLOR1 = getColor("open_trace_table_content_selected_end_color1");//$NON-NLS-1$ - - public static Color OPEN_TRACE_TABLE_CONTENT_NORMAL_COLOR2 = getColor("open_trace_table_content_normal_color2");//$NON-NLS-1$ - public static Color OPEN_TRACE_TABLE_CONTENT_HOVER_COLOR2 = getColor("open_trace_table_content_hover_color2");//$NON-NLS-1$ - public static Color OPEN_TRACE_TABLE_CONTENT_SELECTED_START_COLOR2 = getColor("open_trace_table_content_selected_start_color2");//$NON-NLS-1$ - public static Color OPEN_TRACE_TABLE_CONTENT_SELECTED_END_COLOR2 = getColor("open_trace_table_content_selected_end_color2");//$NON-NLS-1$ - - public static Color OPEN_TRACE_BUTTON_COMPOSITE_BG_COLOR = getColor("open_trace_button_composite_bg_color");//$NON-NLS-1$ - - public static Color OPEN_TRACE_POPUP_CONTENTS_BG_COLOR = getColor("open_trace_popup_contents_bg_color"); //$NON-NLS-1$ - public static Color OPEN_TRACE_POPUP_BOTTOM_BG_COLOR = getColor("open_trace_popup_bottom_bg_color"); //$NON-NLS-1$ - public static Color OPEN_TRACE_TITLE_TEXT_COLOR = TITLEBAR_TEXT_COLOR; - public static Color OPEN_TRACE_INNERTITLE_TEXT_COLOR = WHITE; - public static Color OPEN_TRACE_BUTTON_TEXT_COLOR = WHITE; - // public static Color OPEN_TRACE_TABLE_OUTLINE_COLOR = - // SNAPSHOT_VIEW_TABLE_LINE; - public static Color OPEN_TRACE_TABLE_LINE1_NORMAL = getColor("open_trace_table_line1_normal"); //$NON-NLS-1$ - public static Color OPEN_TRACE_TABLE_LINE1_HOVER = getColor("open_trace_table_line1_hover"); //$NON-NLS-1$ - public static Color OPEN_TRACE_TABLE_LINE_SELECTED_START = getColor("open_trace_table_line_selected_start"); //$NON-NLS-1$ - public static Color OPEN_TRACE_TABLE_LINE_SELECTED_END = getColor("open_trace_table_line_selected_end"); //$NON-NLS-1$ - public static Color OPEN_TRACE_TABLE_LINE2_NORMAL = getColor("open_trace_table_line2_normal"); //$NON-NLS-1$ - public static Color OPEN_TRACE_TABLE_LINE2_HOVER = getColor("open_trace_table_line2_hover"); //$NON-NLS-1$ - public static Color OPEN_TRACE_TABLE2_FONT_COLOR = getColor("open_trace_table2_font_color"); //$NON-NLS-1$ - - /** tab widget colors **/ - public static Color TAB_SELECTED_COLOR_START = getColor("tab_selected_color_start"); //$NON-NLS-1$ - public static Color TAB_SELECTED_COLOR_END = getColor("tab_selected_color_end"); //$NON-NLS-1$ - public static Color TAB_NORMAL_COLOR_START = getColor("tab_normal_color_start"); //$NON-NLS-1$ - public static Color TAB_NORMAL_COLOR_END = getColor("tab_normal_color_end"); //$NON-NLS-1$ - public static Color TAB_HOVER_COLOR_START = getColor("tab_hover_color_start"); //$NON-NLS-1$ - public static Color TAB_HOVER_COLOR_END = getColor("tab_hover_color_end"); //$NON-NLS-1$ - public static Color TAB_PUSH_COLOR_START = getColor("tab_push_color_start"); //$NON-NLS-1$ - public static Color TAB_PUSH_COLOR_END = getColor("tab_push_color_end"); //$NON-NLS-1$ - - public static Color TAB_OUTLINE_NORMAL_COLOR = getColor("tab_outline_normal_color"); //$NON-NLS-1$ - public static Color TAB_OUTLINE_PUSH_COLOR = getColor("tab_outline_push_color"); //$NON-NLS-1$ - public static Color TAB_OUTLINE_HOVER_COLOR = getColor("tab_outline_hover_color"); //$NON-NLS-1$ - public static Color TAB_OUTLINE_SELECTED_COLOR = getColor("tab_outline_selected_color"); //$NON-NLS-1$ - - public static Color TAB_SELECTED_FONT_COLOR = getColor("tab_selected_font_color"); //$NON-NLS-1$ - public static Color TAB_NORMAL_FONT_COLOR = getColor("tab_normal_font_color"); //$NON-NLS-1$ - public static Color TAB_HOVER_FONT_COLOR = getColor("tab_hover_font_color"); //$NON-NLS-1$ - public static Color TAB_PUSH_FONT_COLOR = getColor("tab_push_font_color"); //$NON-NLS-1$ - - public static Color TAB_BG_COLOR_START = getColor("tab_bg_color_start"); //$NON-NLS-1$ - public static Color TAB_BG_COLOR_END = getColor("tab_bg_color_end"); //$NON-NLS-1$ - public static Color TAB_BG_OUTLINE_COLOR = getColor("tab_bg_outline_color"); //$NON-NLS-1$ - - /** Page chart colors **/ - public static Color PAGE_CHART_HAEDER_BG = getColor("page_chart_header_bg"); //$NON-NLS-1$ - public static Color PAGE_CHART_SELECTION_BG = getColor("page_chart_selection_bg"); //$NON-NLS-1$ - public static Color PAGE_CHART_PARENT_BG = getColor("page_chart_parent_bg"); //$NON-NLS-1$ - public static Color PAGE_CHART_CHILD_BG = getColor("page_chart_child_bg"); //$NON-NLS-1$ - public static Color PAGE_OPEN_START_RUN = getColor("page_open_start_run"); //$NON-NLS-1$ - public static Color PAGE_OPEN_END_RUN = getColor("page_open_end_run"); //$NON-NLS-1$ - public static Color PAGE_OPEN_START_STOP = getColor("page_open_start_stop"); //$NON-NLS-1$ - public static Color PAGE_OPEN_END_STOP = getColor("page_open_end_stop"); //$NON-NLS-1$ - public static Color PAGE_CLOSED_START = getColor("page_closed_start"); //$NON-NLS-1$ - public static Color PAGE_CLOSED_END = getColor("page_closed_end"); //$NON-NLS-1$ - public static Color PAGE_USE_START = getColor("page_use_start"); //$NON-NLS-1$ - public static Color PAGE_USE_END = getColor("page_use_end"); //$NON-NLS-1$ - - /** Thread chart colors **/ - public static Color THREAD_OPEN_START_RUN = getColor("thread_open_start_run"); //$NON-NLS-1$ - public static Color THREAD_OPEN_END_RUN = getColor("thread_open_end_run"); //$NON-NLS-1$ - public static Color THREAD_OPEN_START_STOP = getColor("thread_open_start_stop"); //$NON-NLS-1$ - public static Color THREAD_OPEN_END_STOP = getColor("thread_open_end_stop"); //$NON-NLS-1$ - public static Color THREAD_CLOSED_START = getColor("thread_closed_start"); //$NON-NLS-1$ - public static Color THREAD_CLOSED_END = getColor("thread_closed_end"); //$NON-NLS-1$ - public static Color THREAD_SLEEP_START = getColor("thread_sleep_start"); //$NON-NLS-1$ - public static Color THREAD_SLEEP_END = getColor("thread_sleep_end"); //$NON-NLS-1$ - - /** File chart colors **/ - public static Color FILE_CLOSED_START = getColor("file_closed_start"); //$NON-NLS-1$ - public static Color FILE_CLOSED_END = getColor("file_closed_end"); //$NON-NLS-1$ - - public static Color FILE_USED_START = getColor("file_used_start"); //$NON-NLS-1$ - public static Color FILE_USED_END = getColor("file_used_end"); //$NON-NLS-1$ - - public static Color FILE_OPEN_START_RUN = getColor("file_open_start_run"); //$NON-NLS-1$ - public static Color FILE_OPEN_START_STOP = getColor("file_open_start_stop"); //$NON-NLS-1$ - - public static Color FILE_OPEN_END_RUN = getColor("file_open_end_run"); //$NON-NLS-1$ - public static Color FILE_OPEN_END_STOP = getColor("file_open_end_stop"); //$NON-NLS-1$ - - public static Color FILE_FAILED_START = getColor("file_failed_start"); //$NON-NLS-1$ - public static Color FILE_FAILED_END = getColor("file_failed_end"); //$NON-NLS-1$ - - public static Color FILE_READ_START = getColor("file_read_start"); //$NON-NLS-1$ - public static Color FILE_READ_END = getColor("file_read_end"); //$NON-NLS-1$ - - public static Color FILE_WRITE_START = getColor("file_write_start"); //$NON-NLS-1$ - public static Color FILE_WRITE_END = getColor("file_write_end"); //$NON-NLS-1$ - - public static Color FILE_OTHER_START = getColor("file_other_start"); //$NON-NLS-1$ - public static Color FILE_OTHER_END = getColor("file_other_end"); //$NON-NLS-1$ - - public static Color FILE_CHART_SELECTION_BG_START = getColor("file_chart_selection_bg_start"); //$NON-NLS-1$ - public static Color FILE_CHART_SELECTION_BG_END = getColor("file_chart_selection_bg_end"); //$NON-NLS-1$ - public static Color FILE_CHART_PARENT_BG_START = getColor("file_chart_parent_bg_start"); //$NON-NLS-1$ - public static Color FILE_CHART_PARENT_BG_END = getColor("file_chart_parent_bg_end"); //$NON-NLS-1$ - public static Color FILE_CHART_CHILD_BG_START = getColor("file_chart_child_bg_start"); //$NON-NLS-1$ - public static Color FILE_CHART_CHILD_BG_END = getColor("file_chart_child_bg_end"); //$NON-NLS-1$ - public static Color FILE_CHART_GRADATION_COLOR = getColor("file_chart_gradation_color");//$NON-NLS-1$ - public static Color FILE_CHART_SELECTED_FONT_COLOR = getColor("file_chart_selected_font_color");//$NON-NLS-1$ - public static Color FILE_CHART_NORMAL_FONT_COLOR = getColor("file_chart_normal_font_color");//$NON-NLS-1$ - - public static Color UNSELECTED_TAB_FIRST = getColor("unselected_tab_first"); //$NON-NLS-1$ - public static Color UNSELECTED_TAB_SECOND = getColor("unselected_tab_second"); //$NON-NLS-1$ - public static Color SELECTED_TAB_FIRST = getColor("selected_tab_first"); //$NON-NLS-1$ - public static Color SELECTED_TAB_SECOND = getColor("selected_tab_second"); //$NON-NLS-1$ - - public static Color TOOLTIP = getColor("tooltip"); //$NON-NLS-1$ - - public static Color BAR_GRAY1 = getColor("barGRAY1"); //$NON-NLS-1$ - public static Color BAR_GRAY2 = getColor("barGRAY2"); //$NON-NLS-1$ - public static Color BAR_GRAY3 = getColor("barGRAY3"); //$NON-NLS-1$ - - /* Timeline */ - public static Color ITEM_BLUE_BRIGHT = getColor("item blue right");//$NON-NLS-1$ - public static Color ITEM_BLUE_DARK = getColor("item blue dark");//$NON-NLS-1$ - public static Color ITEM_BG = getColor("item background");//$NON-NLS-1$ - public static Color ITEM_BG_TOP = getColor("item_bg_top");//$NON-NLS-1$ - public static Color ITEM_BG_Bottom = getColor("item_bg_bottom");//$NON-NLS-1$ - - public static Color TIMELINE_BG = getColor("timeline_bg"); //$NON-NLS-1$ - public static Color TRANS = getColor("timeline_bg"); //$NON-NLS-1$ - public static Color SNAPSHOT_CHART_FOREGROUND = BAR_GRAY1; - public static Color SNAPSHOT_CHART_BACKGROUND = getColor("snapshot_chart_bg"); //$NON-NLS-1$ - - public static Color GRAY_130 = getColor("GRAY_130"); //$NON-NLS-1$ - public static Color GRAY_170 = getColor("GRAY_170"); //$NON-NLS-1$ - public static Color GRAY_210 = getColor("GRAY_210"); //$NON-NLS-1$ - - public static Color DEFAULT_FOREGROUND = getColor("defaultForeground"); //$NON-NLS-1$ - public static Color DEFAULT_BACKGROUND = getColor("defaultBackground"); //$NON-NLS-1$ - public static Color DEFAULT_RED = getColor("defaultRed"); //$NON-NLS-1$ - - public static Color TIME_TICK_BG = getColor("time_tick_bg"); //$NON-NLS-1$ - public static Color TIME_TICK_LINE = getColor("time_tick_line"); //$NON-NLS-1$ - - public static Color LIFECYCLE_INITIALIZING_TOP = getColor("lifecycle_initializing_top"); - public static Color LIFECYCLE_INITIALIZING_BOTTOM = getColor("lifecycle_initializing_bottom"); - public static Color LIFECYCLE_RUNNING_TOP = getColor("lifecycle_running_top"); - public static Color LIFECYCLE_RUNNING_BOTTOM = getColor("lifecycle_running_bottom"); - public static Color LIFECYCLE_PAUSING_TOP = getColor("lifecycle_pausing_top"); - public static Color LIFECYCLE_PAUSING_BOTTOM = getColor("lifecycle_pausing_bottom"); - public static Color LIFECYCLE_TERMINATING_TOP = getColor("lifecycle_terminating_top"); - public static Color LIFECYCLE_TERMINATING_BOTTOM = getColor("lifecycle_terminating_bottom"); - - // circular graph - public static Color CPU_BAR_GRAPH_COLOR = getColor("cpu_bar_graph_color"); //$NON-NLS-1$ - public static Color CPU_BAR_GRAPH_GRAY_COLOR = getColor("cpu_bar_graph_gray_color"); //$NON-NLS-1$ - public static Color CPU_BAR_GRAPH_BG_COLOR = getColor("cpu_bar_graph_bg_color"); //$NON-NLS-1$ - - public static Color PROCESS_GRAPH_COLOR = getColor("process_bar_graph_color"); //$NON-NLS-1$ - public static Color PROCESS_GRAPH_CENTER_COLOR = getColor("process_bar_graph_center_color"); //$NON-NLS-1$ - public static Color PROCESS_GRAPH_BG_COLOR = getColor("process_bar_graph_bg_color"); //$NON-NLS-1$ - - public static Color PROFILING_GRAPH_COLOR_START = getColor("profiling_graph_color_start"); //$NON-NLS-1$ - public static Color PROFILING_GRAPH_COLOR_END = getColor("profiling_graph_color_end"); //$NON-NLS-1$ - - public static Color PROFILING_GRAPH_SELECTION_COLOR_START = getColor("profiling_graph_selection_color_start"); //$NON-NLS-1$ - public static Color PROFILING_GRAPH_SELECTION_COLOR_END = getColor("profiling_graph_selection_color_end"); //$NON-NLS-1$ - - // Add Chart - public static Color ADD_CHART_ENABLE_COLOR_START = getColor("add_chart_enable_color_start"); //$NON-NLS-1$ - public static Color ADD_CHART_ENABLE_COLOR_END = getColor("add_chart_enable_color_end"); //$NON-NLS-1$ - public static Color ADD_CHART_DISABLE_COLOR_START = getColor("add_chart_disable_color_start"); //$NON-NLS-1$ - public static Color ADD_CHART_DISABLE_COLOR_END = getColor("add_chart_disable_color_end"); //$NON-NLS-1$ - - /** timeline chart **/ - public static Color SERIESE_COLOR_CPU_SYSTEM = getColor("seriesColorCPUSystem"); //$NON-NLS-1$ - public static Color SERIESE_COLOR_CPU_APP = getColor("seriesColorCPUApp"); //$NON-NLS-1$ - - public static Color SERIESE_COLOR_CPUCORE_CORE0 = getColor("seriesColorCPUCoreCore0"); //$NON-NLS-1$ - public static Color SERIESE_COLOR_CPUCORE_CORE1 = getColor("seriesColorCPUCoreCore1"); //$NON-NLS-1$ - public static Color SERIESE_COLOR_CPUCORE_CORE2 = getColor("seriesColorCPUCoreCore2"); //$NON-NLS-1$ - public static Color SERIESE_COLOR_CPUCORE_CORE3 = getColor("seriesColorCPUCoreCore3"); //$NON-NLS-1$ - - public static Color SERIESE_COLOR_CPU_FREQ = getColor("seriesColorCPUFreq"); //$NON-NLS-1$ - - public static Color SERIESE_COLOR_HEAP_SYSTEM = getColor("seriesColorHeapSystem"); //$NON-NLS-1$ - public static Color SERIESE_COLOR_HEAP_USER = getColor("seriesColorHeapApp"); //$NON-NLS-1$ - - public static Color SERIESE_COLOR_PROCESS_VSS = getColor("seriesColorProcessVSS"); //$NON-NLS-1$ - public static Color SERIESE_COLOR_PROCESS_RSS = getColor("seriesColorProcessRSS"); //$NON-NLS-1$ - public static Color SERIESE_COLOR_PROCESS_PSS = getColor("seriesColorProcessPSS"); //$NON-NLS-1$ - - public static Color SERIESE_COLOR_MEMORY_SYS_MAX = getColor("seriesColorMemorySysMax"); //$NON-NLS-1$ - public static Color SERIESE_COLOR_MEMORY_SYS_USED = getColor("seriesColorMemorySysUsed"); //$NON-NLS-1$ - public static Color SERIESE_COLOR_MEMORY_APP_USED = getColor("seriesColorMemoryAppUsed"); //$NON-NLS-1$ - - public static Color SERIESE_COLOR_FILE_READ = getColor("seriesColorFileRead"); //$NON-NLS-1$ - public static Color SERIESE_COLOR_FILE_WRITE = getColor("seriesColorFileWrite"); //$NON-NLS-1$ - public static Color SERIESE_COLOR_FILE_FD = getColor("seriesColorFileFD"); //$NON-NLS-1$ - - public static Color SERIES_COLOR_UI_EVENT_KEY = getColor("seriesColorUIEventKey");//$NON-NLS-1$ - public static Color SERIES_COLOR_UI_EVENT_TOUCH = getColor("seriesColorUIEventTouch");//$NON-NLS-1$ - public static Color SERIES_COLOR_UI_EVENT_GESTURE = getColor("seriesColorUIEventGesture");//$NON-NLS-1$ - public static Color SERIES_COLOR_UI_EVENT_ORIENTATION = getColor("seriesColorUIEventOrientation");//$NON-NLS-1$ - public static Color SERIES_COLOR_UI_EVENT_FRAMEWORK = getColor("seriesColorUIEventFramework");//$NON-NLS-1$ - - public static Color SELECTION_RANGE = getColor("selectionRange"); //$NON-NLS-1$ - public static Color SELECTION_LINE = getColor("selectionLine"); //$NON-NLS-1$ - - // scale widget - public static Color SCALE_OUTLINE_COLOR = getColor("scale_outline_color"); //$NON-NLS-1$ - public static Color SCALE_BG_COLOR_START = getColor("scale_bg_color_start"); //$NON-NLS-1$ - public static Color SCALE_BG_COLOR_END = getColor("scale_bg_color_end"); //$NON-NLS-1$ - public static Color SCALE_AREA_COLOR = getColor("scale_area_color"); //$NON-NLS-1$ - public static Color SCALE_AREA_OUTLINE_COLOR = getColor("scale_area_outline_color"); //$NON-NLS-1$ - - // stop progress dialog - public static Color STOP_PROGRESS_LINE1_COLOR = getColor("stop_progress_line1_color"); //$NON-NLS-1$ - public static Color STOP_PROGRESS_LINE2_COLOR = getColor("stop_progress_line2_color"); //$NON-NLS-1$ - public static Color STOP_PROGRESS_BACKGROUND_COLOR = getColor("stop_progress_background_color"); //$NON-NLS-1$ - public static Color STOP_PROGRESS_INFO_FONT_COLOR = getColor("stop_progress_info_font_color"); //$NON-NLS-1$ - public static Color STOP_PROGRESS_BAR_START_COLOR = getColor("stop_progress_bar_start_color"); //$NON-NLS-1$ - public static Color STOP_PROGRESS_BAR_END_COLOR = getColor("stop_progress_bar_end_color"); //$NON-NLS-1$ - public static Color STOP_PROGRESS_BAR_BG_START_COLOR = getColor("stop_progress_bar_bg_start_color"); //$NON-NLS-1$ - public static Color STOP_PROGRESS_BAR_BG_END_COLOR = getColor("stop_progress_bar_bg_end_color"); //$NON-NLS-1$ - public static Color STOP_PROGRESS_BAR_OUTLINE_COLOR = getColor("stop_progress_bar_outline_color"); //$NON-NLS-1$ - - // thread graph - public static Color THREAD_GRAPH_CPU_LOAD_COLOR = getColor("thread_graph_cpu_load_color"); //$NON-NLS-1$ - public static Color THREAD_GRAPH_CALLEE_COLOR = getColor("thread_graph_callee_color"); //$NON-NLS-1$ - public static Color THREAD_GRAPH_LOCK_NEW_COLOR = getColor("thread_graph_lock_new_color"); //$NON-NLS-1$ - public static Color THREAD_GRAPH_LOCK_WAIT_COLOR = getColor("thread_graph_lock_wait_color"); //$NON-NLS-1$ - public static Color THREAD_GRAPH_LOCK_ACQUIRE_COLOR = getColor("thread_graph_lock_acquire_color"); //$NON-NLS-1$ - public static Color THREAD_GRAPH_LOCK_RELEASE_COLOR = getColor("thread_graph_lock_release_color"); //$NON-NLS-1$ - - public static Color SNAPSHOT_VIEWER_BG_COLOR = getColor("snapshot_viewer_bg_color"); //$NON-NLS-1$ - - public static void initColors() { - WINDOW_BG_COLOR = getColor("window_bg_color"); //$NON-NLS-1$ - - DIALOG_BG_UPPER = getColor("dialg_bg_upper");//$NON-NLS-1$ - DIALOG_BG_LOWER = getColor("dialg_bg_lower");//$NON-NLS-1$ - DIALOG_SUNKEN_1 = getColor("dialg_sunken_1");//$NON-NLS-1$ - DIALOG_SUNKEN_2 = getColor("dialg_sunken_2");//$NON-NLS-1$ - - EDIT_CHART_DIALOG_UPPER = getColor("edit_chart_dialog_upper");//$NON-NLS-1$ - EDIT_CHART_DIALOG_LOWER = getColor("edit_chart_dialog_lower");//$NON-NLS-1$ - - VIEW_BORDER = getColor("view_border"); //$NON-NLS-1$ - VIEW_BG_COLOR = getColor("view_bg_color"); //$NON-NLS-1$ - VIEW_TITLE_FONT_COLOR = getColor("view_title_font_color");//$NON-NLS-1$ - - /** title bar colors **/ - TITLEBAR_TEXT_COLOR = getColor("titlebar_text_color"); //$NON-NLS-1$ - TITLEBAR_BG_COLOR = getColor("titlebar_bg"); //$NON-NLS-1$ - TITLEBAR_START_COLOR = getColor("titlebar_start_color"); //$NON-NLS-1$ - TITLEBAR_END_COLOR = getColor("titlebar_end_color"); //$NON-NLS-1$ - - /** Coolbar bg color **/ - COOLBAR_BG_COLOR = getColor("coolbar_bg_color"); //$NON-NLS-1$ - DEFAULT_FONT_COLOR = getColor("default_font_color");//$NON-NLS-1$ - - /** device and application combo specific colors start **/ - DEVICE_APPLICATION_ENABLE = getColor("device_application_enable_font"); //$NON-NLS-1$ - DEVICE_APPLICATION_DISABLE = getColor("device_application_disable"); //$NON-NLS-1$ - DEVICE_APPLICATION_POPUP_OUTER_1 = getColor("device_application_popup_outer_1"); //$NON-NLS-1$ - DEVICE_APPLICATION_POPUP_OUTER_2 = getColor("device_application_popup_outer_2"); //$NON-NLS-1$ - // DEVICE_APPLICATION_POPUP_OUTER_1 = RED; - DEVICE_APPLICATION_DROPDOWN_TEXT = getColor("device_application_enable_font"); //$NON-NLS-1$ - DEVICE_APPLICATION_ITEM_NORMAL_TOP = getColor("device_application_item_normal_top"); //$NON-NLS-1$ - DEVICE_APPLICATION_ITEM_NORMAL_INNER = getColor("device_application_item_normal_inner"); //$NON-NLS-1$ - DEVICE_APPLICATION_ITEM_NORMAL_BOTTOM = getColor("device_application_item_normal_bottom"); //$NON-NLS-1$ - DEVICE_APPLICATION_ITEM_SELECT_TOP = getColor( - "device_application_item_select_top", new RGB(76, 76, 77)); //$NON-NLS-1$ - DEVICE_APPLICATION_ITEM_SELECT_INNER = getColor("device_application_item_select_inner"); //$NON-NLS-1$ - DEVICE_APPLICATION_ITEM_SELECT_BOTTOM = getColor("device_application_item_select_bottom"); //$NON-NLS-1$ - - /*** combo button color ***/ - DEVICE_APPLICATION_BUTTON_NORMAL_START = getColor("device_application_button_normal_start"); //$NON-NLS-1$ - DEVICE_APPLICATION_BUTTON_NORMAL_END = getColor("device_application_button_normal_end"); //$NON-NLS-1$ - DEVICE_APPLICATION_BUTTON_PUSH_START = getColor("device_application_button_push_start"); //$NON-NLS-1$ - DEVICE_APPLICATION_BUTTON_PUSH_END = getColor("device_application_button_push_end"); //$NON-NLS-1$ - DEVICE_APPLICATION_BUTTON_HOVER_START = getColor("device_application_button_hover_start"); //$NON-NLS-1$ - DEVICE_APPLICATION_BUTTON_HOVER_END = getColor("device_application_button_hover_end"); //$NON-NLS-1$ - DEVICE_APPLICATION_BUTTON_DISABLE_START = getColor("device_application_button_disable_start"); //$NON-NLS-1$ - DEVICE_APPLICATION_BUTTON_DISABLE_END = getColor("device_application_button_disable_end"); //$NON-NLS-1$ - - DEVICE_APPLICATION_BUTTON_OUTLINE = getColor("device_application_button_outline"); //$NON-NLS-1$ - - /** device and application combo specific colors end **/ - - /*** common button colors ***/ - BUTTON_DISABLE_COLOR_START = getColor("button_disable_color_start"); //$NON-NLS-1$ - BUTTON_DISABLE_COLOR_END = getColor("button_disable_color_end"); //$NON-NLS-1$ - BUTTON_NORMAL_COLOR_START = getColor("button_normal_color_start"); //$NON-NLS-1$ - BUTTON_NORMAL_COLOR_END = getColor("button_normal_color_end"); //$NON-NLS-1$ - BUTTON_HOVER_COLOR_START = getColor("button_hover_color_start"); //$NON-NLS-1$ - BUTTON_HOVER_COLOR_END = getColor("button_hover_color_end"); //$NON-NLS-1$ - BUTTON_PUSH_COLOR_START = getColor("button_push_color_start"); //$NON-NLS-1$ - BUTTON_PUSH_COLOR_END = getColor("button_push_color_end"); //$NON-NLS-1$ - - BUTTON_OUTLINE_NORMAL_IN_COLOR = getColor("button_outline_normal_in_color"); //$NON-NLS-1$ - BUTTON_OUTLINE_PUSH_IN_COLOR = getColor("button_outline_push_in_color"); //$NON-NLS-1$ - BUTTON_OUTLINE_HOVER_IN_COLOR = getColor("button_outline_hover_in_color"); //$NON-NLS-1$ - BUTTON_OUTLINE_DISABLE_IN_COLOR = getColor("button_outline_disable_in_color"); //$NON-NLS-1$ - - BUTTON_OUTLINE_NORMAL_COLOR = getColor("button_outline_normal_color"); //$NON-NLS-1$ - BUTTON_OUTLINE_PUSH_COLOR = getColor("button_outline_push_color"); //$NON-NLS-1$ - BUTTON_OUTLINE_HOVER_COLOR = getColor("button_outline_hover_color"); //$NON-NLS-1$ - BUTTON_OUTLINE_DISABLE_COLOR = getColor("button_outline_disable_color"); //$NON-NLS-1$ - - BUTTON_NORMAL_FONT_COLOR = getColor("button_normal_font_color"); //$NON-NLS-1$ - BUTTON_PUSH_FONT_COLOR = getColor("button_push_font_color"); //$NON-NLS-1$ - BUTTON_HOVER_FONT_COLOR = getColor("button_hover_font_color"); //$NON-NLS-1$ - BUTTON_DISABLE_FONT_COLOR = getColor("button_disable_font_color"); //$NON-NLS-1$ - - /** normal view layout colors start **/ - NORMAL_VIEW_LAYOUT_OUTER = getColor("normal_view_layout_outer"); //$NON-NLS-1$ - NORMAL_VIEW_LAYOUT_MIDDLE = getColor("normal_view_layout_middle"); //$NON-NLS-1$ - NORMAL_VIEW_LAYOUT_INNER = getColor("normal_view_layout_inner"); //$NON-NLS-1$ - /** normal view layout colors end **/ - - /** view colors start **/ - SNAPSHOT_VIEW_OUTLINE = getColor("current_view_outline"); //$NON-NLS-1$ - SNAPSHOT_VIEW_TITLE_TEXT = WHITE; - SNAPSHOT_VIEW_MIDDLE = NORMAL_VIEW_LAYOUT_MIDDLE; - SNAPSHOT_VIEW_INNER = NORMAL_VIEW_LAYOUT_INNER; - - SNAPSHOT_VIEW_TABLE_TITLE_BG = getColor("current_view_table_title_bg"); //$NON-NLS-1$ - SNAPSHOT_VIEW_TABLE_TITLE_TEXT = getColor("current_view_table_title_text"); //$NON-NLS-1$ - SNAPSHOT_VIEW_TABLE_CONTENTS_BG = getColor("current_view_table_contents_bg"); //$NON-NLS-1$ - SNAPSHOT_VIEW_TABLE_CONTENTS_TEXT = getColor("current_view_table_contents_text"); //$NON-NLS-1$ - SNAPSHOT_VIEW_TABLE_LINE = getColor("current_view_table_line"); //$NON-NLS-1$ - - SNAPSHOT_VIEW_CPU_TEXT = getColor("current_view_cpu_text"); //$NON-NLS-1$ - SNAPSHOT_VIEW_PROCESS_TEXT = getColor("current_view_process_text"); //$NON-NLS-1$ - SNAPSHOT_VIEW_GRAPH_BG = getColor("current_view_graph_bg"); //$NON-NLS-1$ - SNAPSHOT_VIEW_CPU_GRAPH = SNAPSHOT_VIEW_CPU_TEXT; - SNAPSHOT_VIEW_PROCESS_GRAPH = SNAPSHOT_VIEW_PROCESS_TEXT; - SNAPSHOT_VIEW_GRAPH_OUTLINE = getColor("current_view_graph_outline"); //$NON-NLS-1$ - SNAPSHOT_VIEW_SNAPSHOT_OUTLINE = getColor("current_view_snapshot_outline"); //$NON-NLS-1$ - /** current view colors end **/ - - /** common table colors start **/ - TABLE_HEADER_BG = getColor("table_header_bg"); //$NON-NLS-1$ - TABLE_LINE = getColor("table_line"); //$NON-NLS-1$ - TABLE_CONTENTS_NORMAL = getColor("table_contents_normal"); //$NON-NLS-1$ - TABLE_CONTENTS_HOVER = getColor("table_contents_hover"); //$NON-NLS-1$ - TABLE_CONTENTS_SELECTED_START = getColor("table_contents_selected_start"); //$NON-NLS-1$ - TABLE_CONTENTS_SELECTED_END = getColor("table_contents_selected_end"); //$NON-NLS-1$ - TABLE_CONTENTS_SELECTED_FONT_COLOR = getColor("table_contents_selected_font_color"); //$NON-NLS-1$ - TABLE_HEADER_FONT_COLOR = getColor("table_title_font_color"); //$NON-NLS-1$ - TABLE_CONTENTS_FONT_COLOR = getColor("table_contents_font_color"); //$NON-NLS-1$ - /** common table colors end **/ - - /** open trace popup colors **/ - OPEN_TRACE_LABEL_COLOR = getColor("open_trace_label_color");//$NON-NLS-1$ - OPEN_TRACE_SAVE_CONTENTS_COLOR = getColor("open_trace_save_contents_color");//$NON-NLS-1$ - OPEN_TRACE_TEMP_CONTENTS_COLOR = getColor("open_trace_temp_contents_color");//$NON-NLS-1$ - OPEN_TRACE_TABLE_OUTLINE_COLOR = getColor("open_trace_table_outline_color");//$NON-NLS-1$ - - OPEN_TRACE_TABLE_CONTENT_NORMAL_COLOR1 = getColor("open_trace_table_content_normal_color1");//$NON-NLS-1$ - OPEN_TRACE_TABLE_CONTENT_HOVER_COLOR1 = getColor("open_trace_table_content_hover_color1");//$NON-NLS-1$ - OPEN_TRACE_TABLE_CONTENT_SELECTED_START_COLOR1 = getColor("open_trace_table_content_selected_start_color1");//$NON-NLS-1$ - OPEN_TRACE_TABLE_CONTENT_SELECTED_END_COLOR1 = getColor("open_trace_table_content_selected_end_color1");//$NON-NLS-1$ - - OPEN_TRACE_TABLE_CONTENT_NORMAL_COLOR2 = getColor("open_trace_table_content_normal_color2");//$NON-NLS-1$ - OPEN_TRACE_TABLE_CONTENT_HOVER_COLOR2 = getColor("open_trace_table_content_hover_color2");//$NON-NLS-1$ - OPEN_TRACE_TABLE_CONTENT_SELECTED_START_COLOR2 = getColor("open_trace_table_content_selected_start_color2");//$NON-NLS-1$ - OPEN_TRACE_TABLE_CONTENT_SELECTED_END_COLOR2 = getColor("open_trace_table_content_selected_end_color2");//$NON-NLS-1$ - - OPEN_TRACE_BUTTON_COMPOSITE_BG_COLOR = getColor("open_trace_button_composite_bg_color");//$NON-NLS-1$ - - OPEN_TRACE_POPUP_CONTENTS_BG_COLOR = getColor("open_trace_popup_contents_bg_color"); //$NON-NLS-1$ - OPEN_TRACE_POPUP_BOTTOM_BG_COLOR = getColor("open_trace_popup_bottom_bg_color"); //$NON-NLS-1$ - OPEN_TRACE_TITLE_TEXT_COLOR = TITLEBAR_TEXT_COLOR; - OPEN_TRACE_INNERTITLE_TEXT_COLOR = WHITE; - OPEN_TRACE_BUTTON_TEXT_COLOR = WHITE; - // OPEN_TRACE_TABLE_OUTLINE_COLOR = - // SNAPSHOT_VIEW_TABLE_LINE; - OPEN_TRACE_TABLE_LINE1_NORMAL = getColor("open_trace_table_line1_normal"); //$NON-NLS-1$ - OPEN_TRACE_TABLE_LINE1_HOVER = getColor("open_trace_table_line1_hover"); //$NON-NLS-1$ - OPEN_TRACE_TABLE_LINE_SELECTED_START = getColor("open_trace_table_line_selected_start"); //$NON-NLS-1$ - OPEN_TRACE_TABLE_LINE_SELECTED_END = getColor("open_trace_table_line_selected_end"); //$NON-NLS-1$ - OPEN_TRACE_TABLE_LINE2_NORMAL = getColor("open_trace_table_line2_normal"); //$NON-NLS-1$ - OPEN_TRACE_TABLE_LINE2_HOVER = getColor("open_trace_table_line2_hover"); //$NON-NLS-1$ - OPEN_TRACE_TABLE2_FONT_COLOR = getColor("open_trace_table2_font_color"); //$NON-NLS-1$ - - /** tab widget colors **/ - TAB_SELECTED_COLOR_START = getColor("tab_selected_color_start"); //$NON-NLS-1$ - TAB_SELECTED_COLOR_END = getColor("tab_selected_color_end"); //$NON-NLS-1$ - TAB_NORMAL_COLOR_START = getColor("tab_normal_color_start"); //$NON-NLS-1$ - TAB_NORMAL_COLOR_END = getColor("tab_normal_color_end"); //$NON-NLS-1$ - TAB_HOVER_COLOR_START = getColor("tab_hover_color_start"); //$NON-NLS-1$ - TAB_HOVER_COLOR_END = getColor("tab_hover_color_end"); //$NON-NLS-1$ - TAB_PUSH_COLOR_START = getColor("tab_push_color_start"); //$NON-NLS-1$ - TAB_PUSH_COLOR_END = getColor("tab_push_color_end"); //$NON-NLS-1$ - - TAB_OUTLINE_NORMAL_COLOR = getColor("tab_outline_normal_color"); //$NON-NLS-1$ - TAB_OUTLINE_PUSH_COLOR = getColor("tab_outline_push_color"); //$NON-NLS-1$ - TAB_OUTLINE_HOVER_COLOR = getColor("tab_outline_hover_color"); //$NON-NLS-1$ - TAB_OUTLINE_SELECTED_COLOR = getColor("tab_outline_selected_color"); //$NON-NLS-1$ - - TAB_SELECTED_FONT_COLOR = getColor("tab_selected_font_color"); //$NON-NLS-1$ - TAB_NORMAL_FONT_COLOR = getColor("tab_normal_font_color"); //$NON-NLS-1$ - TAB_HOVER_FONT_COLOR = getColor("tab_hover_font_color"); //$NON-NLS-1$ - TAB_PUSH_FONT_COLOR = getColor("tab_push_font_color"); //$NON-NLS-1$ - - TAB_BG_COLOR_START = getColor("tab_bg_color_start"); //$NON-NLS-1$ - TAB_BG_COLOR_END = getColor("tab_bg_color_end"); //$NON-NLS-1$ - TAB_BG_OUTLINE_COLOR = getColor("tab_bg_outline_color"); //$NON-NLS-1$ - - /** Page chart colors **/ - PAGE_CHART_HAEDER_BG = getColor("page_chart_header_bg"); //$NON-NLS-1$ - PAGE_CHART_SELECTION_BG = getColor("page_chart_selection_bg"); //$NON-NLS-1$ - PAGE_CHART_PARENT_BG = getColor("page_chart_parent_bg"); //$NON-NLS-1$ - PAGE_CHART_CHILD_BG = getColor("page_chart_child_bg"); //$NON-NLS-1$ - PAGE_OPEN_START_RUN = getColor("page_open_start_run"); //$NON-NLS-1$ - PAGE_OPEN_END_RUN = getColor("page_open_end_run"); //$NON-NLS-1$ - PAGE_OPEN_START_STOP = getColor("page_open_start_stop"); //$NON-NLS-1$ - PAGE_OPEN_END_STOP = getColor("page_open_end_stop"); //$NON-NLS-1$ - PAGE_CLOSED_START = getColor("page_closed_start"); //$NON-NLS-1$ - PAGE_CLOSED_END = getColor("page_closed_end"); //$NON-NLS-1$ - PAGE_USE_START = getColor("page_use_start"); //$NON-NLS-1$ - PAGE_USE_END = getColor("page_use_end"); //$NON-NLS-1$ - - /** Thread chart colors **/ - THREAD_OPEN_START_RUN = getColor("thread_open_start_run"); //$NON-NLS-1$ - THREAD_OPEN_END_RUN = getColor("thread_open_end_run"); //$NON-NLS-1$ - THREAD_OPEN_START_STOP = getColor("thread_open_start_stop"); //$NON-NLS-1$ - THREAD_OPEN_END_STOP = getColor("thread_open_end_stop"); //$NON-NLS-1$ - THREAD_CLOSED_START = getColor("thread_closed_start"); //$NON-NLS-1$ - THREAD_CLOSED_END = getColor("thread_closed_end"); //$NON-NLS-1$ - THREAD_SLEEP_START = getColor("thread_sleep_start"); //$NON-NLS-1$ - THREAD_SLEEP_END = getColor("thread_sleep_end"); //$NON-NLS-1$ - - /** File chart colors **/ - FILE_CLOSED_START = getColor("file_closed_start"); //$NON-NLS-1$ - FILE_CLOSED_END = getColor("file_closed_end"); //$NON-NLS-1$ - FILE_USED_START = getColor("file_used_start"); //$NON-NLS-1$ - FILE_USED_END = getColor("file_used_end"); //$NON-NLS-1$ - FILE_OPEN_START_RUN = getColor("file_open_start_run"); //$NON-NLS-1$ - FILE_OPEN_END_RUN = getColor("file_open_end_run"); //$NON-NLS-1$ - FILE_OPEN_START_STOP = getColor("file_open_start_stop"); //$NON-NLS-1$ - FILE_OPEN_END_STOP = getColor("file_open_end_stop"); //$NON-NLS-1$ - FILE_FAILED_START = getColor("file_failed_start"); //$NON-NLS-1$ - FILE_FAILED_END = getColor("file_failed_end"); //$NON-NLS-1$ - FILE_CHART_SELECTION_BG_START = getColor("file_chart_selection_bg_start"); //$NON-NLS-1$ - FILE_CHART_SELECTION_BG_END = getColor("file_chart_selection_bg_end"); //$NON-NLS-1$ - FILE_CHART_PARENT_BG_START = getColor("file_chart_parent_bg_start"); //$NON-NLS-1$ - FILE_CHART_PARENT_BG_END = getColor("file_chart_parent_bg_end"); //$NON-NLS-1$ - FILE_CHART_CHILD_BG_START = getColor("file_chart_child_bg_start"); //$NON-NLS-1$ - FILE_CHART_CHILD_BG_END = getColor("file_chart_child_bg_end"); //$NON-NLS-1$ - - FILE_CHART_GRADATION_COLOR = getColor("file_chart_gradation_color");//$NON-NLS-1$ - - FILE_CHART_SELECTED_FONT_COLOR = getColor("file_chart_selected_font_color");//$NON-NLS-1$ - FILE_CHART_NORMAL_FONT_COLOR = getColor("file_chart_normal_font_color");//$NON-NLS-1$ - - UNSELECTED_TAB_FIRST = getColor("unselected_tab_first"); //$NON-NLS-1$ - UNSELECTED_TAB_SECOND = getColor("unselected_tab_second"); //$NON-NLS-1$ - SELECTED_TAB_FIRST = getColor("selected_tab_first"); //$NON-NLS-1$ - SELECTED_TAB_SECOND = getColor("selected_tab_second"); //$NON-NLS-1$ - - TOOLTIP = getColor("tooltip"); //$NON-NLS-1$ - - BAR_GRAY1 = getColor("barGRAY1"); //$NON-NLS-1$ - BAR_GRAY2 = getColor("barGRAY2"); //$NON-NLS-1$ - BAR_GRAY3 = getColor("barGRAY3"); //$NON-NLS-1$ - - /* Timeline */ - ITEM_BLUE_BRIGHT = getColor("item blue right");//$NON-NLS-1$ - ITEM_BLUE_DARK = getColor("item blue dark");//$NON-NLS-1$ - ITEM_BG = getColor("item background");//$NON-NLS-1$ - - TRANS = getColor("timeline_bg"); //$NON-NLS-1$ - SNAPSHOT_CHART_FOREGROUND = BAR_GRAY1; - SNAPSHOT_CHART_BACKGROUND = getColor("snapshot_chart_bg"); //$NON-NLS-1$ - - GRAY_130 = getColor("GRAY_130"); //$NON-NLS-1$ - GRAY_170 = getColor("GRAY_170"); //$NON-NLS-1$ - GRAY_210 = getColor("GRAY_210"); //$NON-NLS-1$ - - DEFAULT_FOREGROUND = getColor("defaultForeground"); //$NON-NLS-1$ - DEFAULT_BACKGROUND = getColor("defaultBackground"); //$NON-NLS-1$ - DEFAULT_RED = getColor("defaultRed"); //$NON-NLS-1$ - - // circular graph - CPU_BAR_GRAPH_COLOR = getColor("cpu_bar_graph_color"); //$NON-NLS-1$ - CPU_BAR_GRAPH_GRAY_COLOR = getColor("cpu_bar_graph_gray_color"); //$NON-NLS-1$ - CPU_BAR_GRAPH_BG_COLOR = getColor("cpu_bar_graph_bg_color"); //$NON-NLS-1$ - - PROCESS_GRAPH_COLOR = getColor("process_bar_graph_color"); //$NON-NLS-1$ - PROCESS_GRAPH_CENTER_COLOR = getColor("process_bar_graph_center_color"); //$NON-NLS-1$ - PROCESS_GRAPH_BG_COLOR = getColor("process_bar_graph_bg_color"); //$NON-NLS-1$ - - PROFILING_GRAPH_COLOR_START = getColor("profiling_graph_color_start"); //$NON-NLS-1$ - PROFILING_GRAPH_COLOR_END = getColor("profiling_graph_color_end"); //$NON-NLS-1$ - - PROFILING_GRAPH_SELECTION_COLOR_START = getColor("profiling_graph_selection_color_start"); //$NON-NLS-1$ - PROFILING_GRAPH_SELECTION_COLOR_END = getColor("profiling_graph_selection_color_end"); //$NON-NLS-1$ - - // Add Chart - ADD_CHART_ENABLE_COLOR_START = getColor("add_chart_enable_color_start"); //$NON-NLS-1$ - ADD_CHART_ENABLE_COLOR_END = getColor("add_chart_enable_color_end"); //$NON-NLS-1$ - ADD_CHART_DISABLE_COLOR_START = getColor("add_chart_disable_color_start"); //$NON-NLS-1$ - ADD_CHART_DISABLE_COLOR_END = getColor("add_chart_disable_color_end"); //$NON-NLS-1$ - - /** timeline chart **/ - SERIESE_COLOR_CPU_SYSTEM = getColor("seriesColorCPUSystem"); //$NON-NLS-1$ - SERIESE_COLOR_CPU_APP = getColor("seriesColorCPUApp"); //$NON-NLS-1$ - - SERIESE_COLOR_CPUCORE_CORE0 = getColor("seriesColorCPUCoreCore0"); //$NON-NLS-1$ - SERIESE_COLOR_CPUCORE_CORE1 = getColor("seriesColorCPUCoreCore1"); //$NON-NLS-1$ - SERIESE_COLOR_CPUCORE_CORE2 = getColor("seriesColorCPUCoreCore2"); //$NON-NLS-1$ - SERIESE_COLOR_CPUCORE_CORE3 = getColor("seriesColorCPUCoreCore3"); //$NON-NLS-1$ - - SERIESE_COLOR_CPU_FREQ = getColor("seriesColorCPUFreq"); //$NON-NLS-1$ - - SERIESE_COLOR_HEAP_SYSTEM = getColor("seriesColorHeapSystem"); //$NON-NLS-1$ - SERIESE_COLOR_HEAP_USER = getColor("seriesColorHeapApp"); //$NON-NLS-1$ - - SERIESE_COLOR_PROCESS_VSS = getColor("seriesColorProcessVSS"); //$NON-NLS-1$ - SERIESE_COLOR_PROCESS_RSS = getColor("seriesColorProcessRSS"); //$NON-NLS-1$ - SERIESE_COLOR_PROCESS_PSS = getColor("seriesColorProcessPSS"); //$NON-NLS-1$ - - SERIESE_COLOR_MEMORY_SYS_MAX = getColor("seriesColorMemorySysMax"); //$NON-NLS-1$ - SERIESE_COLOR_MEMORY_SYS_USED = getColor("seriesColorMemorySysUsed"); //$NON-NLS-1$ - SERIESE_COLOR_MEMORY_APP_USED = getColor("seriesColorMemoryAppUsed"); //$NON-NLS-1$ - - SERIESE_COLOR_FILE_READ = getColor("seriesColorFileRead"); //$NON-NLS-1$ - SERIESE_COLOR_FILE_WRITE = getColor("seriesColorFileWrite"); //$NON-NLS-1$ - SERIESE_COLOR_FILE_FD = getColor("seriesColorFileFD"); //$NON-NLS-1$ - - SELECTION_RANGE = getColor("selectionRange"); //$NON-NLS-1$ - SELECTION_LINE = getColor("selectionLine"); //$NON-NLS-1$ - - // scale widget - SCALE_OUTLINE_COLOR = getColor("scale_outline_color"); //$NON-NLS-1$ - SCALE_BG_COLOR_START = getColor("scale_bg_color_start"); //$NON-NLS-1$ - SCALE_BG_COLOR_END = getColor("scale_bg_color_end"); //$NON-NLS-1$ - SCALE_AREA_COLOR = getColor("scale_area_color"); //$NON-NLS-1$ - SCALE_AREA_OUTLINE_COLOR = getColor("scale_area_outline_color"); //$NON-NLS-1$ - - // stop progress dialog - STOP_PROGRESS_LINE1_COLOR = getColor("stop_progress_line1_color"); //$NON-NLS-1$ - STOP_PROGRESS_LINE2_COLOR = getColor("stop_progress_line2_color"); //$NON-NLS-1$ - STOP_PROGRESS_BACKGROUND_COLOR = getColor("stop_progress_background_color"); //$NON-NLS-1$ - STOP_PROGRESS_INFO_FONT_COLOR = getColor("stop_progress_info_font_color"); //$NON-NLS-1$ - - // thread graph - THREAD_GRAPH_CPU_LOAD_COLOR = getColor("thread_graph_cpu_load_color"); //$NON-NLS-1$ - THREAD_GRAPH_CALLEE_COLOR = getColor("thread_graph_callee_color"); //$NON-NLS-1$ - THREAD_GRAPH_LOCK_NEW_COLOR = getColor("thread_graph_lock_new_color"); //$NON-NLS-1$ - THREAD_GRAPH_LOCK_WAIT_COLOR = getColor("thread_graph_lock_wait_color"); //$NON-NLS-1$ - THREAD_GRAPH_LOCK_ACQUIRE_COLOR = getColor("thread_graph_lock_acquire_color"); //$NON-NLS-1$ - THREAD_GRAPH_LOCK_RELEASE_COLOR = getColor("thread_graph_lock_release_color"); //$NON-NLS-1$ - - } - - private static Color getColor(String colorName, RGB rgb) { - return AnalyzerManager.getTheme().getColor(colorName, rgb); - } - - private static Color getColor(String colorName) { - return AnalyzerManager.getTheme().getColor(colorName); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/resources/FontResources.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/resources/FontResources.java deleted file mode 100644 index 3ed8cdd..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/resources/FontResources.java +++ /dev/null @@ -1,166 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.resources; - -import org.eclipse.jface.resource.FontRegistry; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Font; -import org.eclipse.swt.graphics.FontData; -import org.eclipse.ui.PlatformUI; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; - -public class FontResources { - - private static FontRegistry fontRegistry = new FontRegistry(); - private static final Font systemFont = SetFontDesign(); - - - public static final String ARIAL = "Arial"; //$NON-NLS-1$ - - - //* Toolbal Layout - // Main Title - public static final Font TITLEBAR = getFont("titlebar", resizeSystemFont(10));//$NON-NLS-1$ - // Device Name - public static final Font COMBO = getFont("combo", resizeSystemFont(9));//$NON-NLS-1$ - // Application Name - public static final Font DROPDOWN = getFont("dropdown", resizeSystemFont(9));//$NON-NLS-1$ - // Timer - public static final Font TIMER = getFont("timer", resizeSystemFont(12));//$NON-NLS-1$ - - - //* Tab Layout - public static final Font TAB_BUTTON_FONT = getFont("tab_button_font", resizeSystemFont(8));//$NON-NLS-1$ - - - //* Time-Line Layout - // Time-line - public static final Font TIMELINE_TICK_FONT = getFont("time_tick", resizeSystemFont(6));//$NON-NLS-1$ - // Edit Chart Dlg. - public static final Font ADDITEM_BUTTON_FONT = getFont("additem_button_font", resizeSystemFont(8));//$NON-NLS-1$ - // Chart Name - public static final Font TIMELINE_FONT = getFont("table_font", resizeSystemFont(8));//$NON-NLS-1$ - - - //* Current Status Layout(Tab) - public static final Font CURRENT_TABLE_CELL_FONT = getFont("current_table_cell_font", resizeSystemFont(8));//$NON-NLS-1$ - public static final Font CURRENT_TABLE_HEADER_FONT = getFont("current_table_header_font", resizeSystemFont(8));//$NON-NLS-1$ - - - //* List Layout - public static final Font VIEW_TITLE = getFont("view_title", resizeSystemFont(10));//$NON-NLS-1$ - public static final Font TABLE_HEADER = getFont("table_header", setSystemFont(SWT.NONE, 8));//$NON-NLS-1$ - public static final Font TABLE_CONTENTS = getFont("table_contents", resizeSystemFont(8));//$NON-NLS-1$ - - //* Open Trace - // Title - public static final Font OPEN_TRACE_TITLE = getFont("open_trace_title", resizeSystemFont(9));//$NON-NLS-1$ - // Saved file - public static final Font OPEN_TRACE_INNER_TITLE = getFont("open_trace_inner_title", resizeSystemFont(9));//$NON-NLS-1$ - - - //* Edit Chart - // Title - public static final Font EDIT_CHART_DLG_TITLE = getFont("edit_chart_dlg_title", resizeSystemFont(9));//$NON-NLS-1$ - // Button - public static final Font EDIT_CHART_DLG_BUTTON = getFont("edit_chart_dlg_button", resizeSystemFont(9));//$NON-NLS-1$ - // Item Name - public static final Font EDIT_CHART_DLG_ITEM_NAME = getFont("edit_chart_item_name", resizeSystemFont(9));//$NON-NLS-1$ - // Item SubName - public static final Font EDIT_CHART_DLG_ITEM_SUB_NAME = getFont("edit_chart_item_sub_name", resizeSystemFont(9));//$NON-NLS-1$ - - - //*File Page - public static final Font TABLE_HEADER_FONT = getFont("table_header_font", resizeSystemFont(8));//$NON-NLS-1$ - public static final Font TABLE_CELL_FONT = getFont("table_cell_font", resizeSystemFont(8));//$NON-NLS-1$ - public static final Font DETAIL_INFO_FONT = getFont("detail_info_font", resizeSystemFont(8));//$NON-NLS-1$ - - - //* About Dlg. - public static final Font ABOUT_TITLE = getFont("about_title", resizeSystemFont(12));//$NON-NLS-1$ - public static final Font ABOUT_TEXT = getFont("about_text", resizeSystemFont(9));//$NON-NLS-1$ - public static final Font DIALOG_BUTTON_FONT = getFont("dialog_button_font", resizeSystemFont(9));//$NON-NLS-1$ - - //* stop progress dialog - public static final Font STOP_PROGRESS_FONT = getFont("stop_progress_font", resizeSystemFont(8));//$NON-NLS-1$ - - //* not support - public static final Font TOOLTIP = getFont("tooltip", resizeSystemFont(10));//$NON-NLS-1$ - public static final Font CIRCULAR_GRAPH_FONT = getFont("circular_graph_font", resizeSystemFont(10));//$NON-NLS-1$ - public static final Font CIRCULAR_GRAPH_MEASURE_FONT = getFont("circular_graph_measure_font", resizeSystemFont(10));//$NON-NLS-1$ - public static final Font CIRCULAR_LABEL_FONT = getFont("circular_label_font", resizeSystemFont(10));//$NON-NLS-1$ - public static final Font SCORE_TITLE_FONT = getFont("score_title_font", setSystemFont(SWT.BOLD,10));//$NON-NLS-1$ - public static final Font PAGECHART_KEY_FONT = getFont("pagechart_key_font", resizeSystemFont(8));//$NON-NLS-1$ - - - private static Font getFont(String fontName, FontData[] fontData) { - if (!fontRegistry.hasValueFor(fontName)) { - fontRegistry.put(fontName, fontData); - } - return fontRegistry.get(fontName); - } - - public static FontData[] resizeSystemFont(int size) { - FontData[] fontData = systemFont.getFontData(); - for (int i = 0; i < fontData.length; i++) { - fontData[i].setHeight(size); - } - return fontData; - } - - public static FontData[] setStyleSystemFont(int style) { - FontData[] fontData = systemFont.getFontData(); - for (int i = 0; i < fontData.length; i++) { - fontData[i].setStyle(style); - } - return fontData; - } - - public static FontData[] setSystemFont(int style, int size) { - FontData[] fontData = systemFont.getFontData(); - for (int i = 0; i < fontData.length; i++) { - fontData[i].setStyle(style); - fontData[i].setHeight(size); - } - return fontData; - } - - - public static Font SetFontDesign() - { - Font OSFont = PlatformUI.getWorkbench().getDisplay().getSystemFont(); - if (AnalyzerUtil.isLinux()) - { - OSFont = getFont("ex_font", new FontData[] { new FontData("Dejavu Sans", 9, SWT.NORMAL) }); //$NON-NLS-1$ //$NON-NLS-2$ - } - else if (AnalyzerUtil.isWin()) - { - - OSFont = getFont("ex_font", new FontData[] { new FontData("Verdana", 9, SWT.NORMAL) }); //$NON-NLS-1$ //$NON-NLS-2$ - } - return OSFont; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/resources/ImageResources.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/resources/ImageResources.java deleted file mode 100644 index 60da759..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/resources/ImageResources.java +++ /dev/null @@ -1,367 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.resources; - -import java.io.File; - -import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.jface.resource.ImageRegistry; -import org.eclipse.swt.graphics.Image; -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.CommonConstants; -import org.tizen.dynamicanalyzer.theme.DATheme; - -public class ImageResources { - - private static ImageRegistry imageRegistry = new ImageRegistry(); - - private static final String ID = "org.tizen.dynamicanalyzer"; //$NON-NLS-1$ - private static final String WORKBENCH_ID = "org.tizen.dynamicanalyzer.workbench"; //$NON-NLS-1$ - - // Titlebar - public static final Image ICON = getImageFromWorkbench("alt_window_16"); //$NON-NLS-1$ - public static final Image SEPARATOR = getPngImage("window_sunken_line"); //$NON-NLS-1$ - public static final Image CATEGORY = getPngImage("window_context_down_normal"); //$NON-NLS-1$ - public static final Image CATEGORY_PUSH = getPngImage("window_context_down_push"); //$NON-NLS-1$ - public static final Image CATEGORY_HOVER = getPngImage("window_context_down_hover"); //$NON-NLS-1$ - public static final Image CATEGORY_DISABLE = getPngImage("window_context_down_disable"); //$NON-NLS-1$ - public static final Image MIN = getPngImage("window_control_min_nor"); //$NON-NLS-1$ - public static final Image MIN_PUSH = getPngImage("window_control_min_push"); //$NON-NLS-1$ - public static final Image MIN_HOVER = getPngImage("window_control_min_hover"); //$NON-NLS-1$ - public static final Image MAX = getPngImage("window_control_max_nor"); //$NON-NLS-1$ - public static final Image MAX_PUSH = getPngImage("window_control_max_push"); //$NON-NLS-1$ - public static final Image MAX_HOVER = getPngImage("window_control_max_hover"); //$NON-NLS-1$ - public static final Image RESTORE = getPngImage("window_control_prev_nor"); //$NON-NLS-1$ - public static final Image RESTORE_PUSH = getPngImage("window_control_prev_push"); //$NON-NLS-1$ - public static final Image RESTORE_HOVER = getPngImage("window_control_prev_hover"); //$NON-NLS-1$ - public static final Image CLOSE = getPngImage("window_control_close_nor"); //$NON-NLS-1$ - public static final Image CLOSE_PUSH = getPngImage("window_control_close_push"); //$NON-NLS-1$ - public static final Image CLOSE_HOVER = getPngImage("window_control_close_hover"); //$NON-NLS-1$ - - // Toolbar - public static final Image BRACKET = getPngImage("toolbar_arrow"); //$NON-NLS-1$ - public static final Image START = getPngImage("toolbar_play_nor"); //$NON-NLS-1$ - public static final Image START_PUSH = getPngImage("toolbar_play_push"); //$NON-NLS-1$ - public static final Image START_HOVER = getPngImage("toolbar_play_hover"); //$NON-NLS-1$ - public static final Image START_DISABLE = getPngImage("toolbar_play_disable"); //$NON-NLS-1$ - public static final Image STOP = getPngImage("toolbar_stop_nor"); //$NON-NLS-1$ - public static final Image STOP_PUSH = getPngImage("toolbar_stop_push"); //$NON-NLS-1$ - public static final Image STOP_HOVER = getPngImage("toolbar_stop_hover"); //$NON-NLS-1$ - public static final Image TIMER = getPngImage("toolbar_time_bg"); //$NON-NLS-1$ - public static final Image SAVE = getPngImage("toolbar_save_nor"); //$NON-NLS-1$ - public static final Image SAVE_PUSH = getPngImage("toolbar_save_push"); //$NON-NLS-1$ - public static final Image SAVE_HOVER = getPngImage("toolbar_save_hover"); //$NON-NLS-1$ - public static final Image SAVE_DISABLE = getPngImage("toolbar_save_disable"); //$NON-NLS-1$ - public static final Image OPEN = getPngImage("toolbar_open_nor"); //$NON-NLS-1$ - public static final Image OPEN_PUSH = getPngImage("toolbar_open_push"); //$NON-NLS-1$ - public static final Image OPEN_HOVER = getPngImage("toolbar_open_hover"); //$NON-NLS-1$ - public static final Image OPEN_DISABLE = getPngImage("toolbar_open_disable"); //$NON-NLS-1$ - public static final Image REPLAY = getPngImage("toolbar_replay_nor"); //$NON-NLS-1$ - public static final Image REPLAY_PUSH = getPngImage("toolbar_replay_push"); //$NON-NLS-1$ - public static final Image REPLAY_HOVER = getPngImage("toolbar_replay_hover"); //$NON-NLS-1$ - public static final Image REPLAY_DISABLE = getPngImage("toolbar_replay_disable"); //$NON-NLS-1$ - public static final Image SETTINGS = getPngImage("toolbar_settings_nor"); //$NON-NLS-1$ - public static final Image SETTINGS_PUSH = getPngImage("toolbar_settings_push"); //$NON-NLS-1$ - public static final Image SETTINGS_HOVER = getPngImage("toolbar_settings_hover"); //$NON-NLS-1$ - public static final Image SETTINGS_DISABLE = getPngImage("toolbar_settings_disable"); //$NON-NLS-1$ - public static final Image ABOUT = getPngImage("toolbar_about_nor"); //$NON-NLS-1$ - public static final Image ABOUT_PUSH = getPngImage("toolbar_about_push"); //$NON-NLS-1$ - public static final Image ABOUT_HOVER = getPngImage("toolbar_about_hover"); //$NON-NLS-1$ - public static final Image ABOUT_DISABLE = getPngImage("toolbar_about_disable"); //$NON-NLS-1$ - public static final Image VIEW_SOURCE_NORMAL = getPngImage("toolbar_source_view_nor"); //$NON-NLS-1$ - public static final Image VIEW_SOURCE_PUSH = getPngImage("toolbar_source_view_push"); //$NON-NLS-1$ - public static final Image VIEW_SOURCE_HOVER = getPngImage("toolbar_source_view_hover"); //$NON-NLS-1$ - public static final Image VIEW_SOURCE_TOGGLE = getPngImage("toolbar_source_view_tog"); //$NON-NLS-1$ - public static final Image VIEW_SOURCE_TOGGLE_HOVER = getPngImage("toolbar_source_view_tog_hover"); //$NON-NLS-1$ - public static final Image VIEW_SOURCE_DISABLE = getPngImage("toolbar_source_view_disable"); //$NON-NLS-1$ - public static final Image VIEW_SOURCE_CURSOR = getPngImage("source_view_cursor"); //$NON-NLS-1$ - - /* screen shot */ - public static final Image SCREEN_SHOT_NORMAL = getPngImage("toolbar_screen_shot_nor"); //$NON-NLS-1$ - public static final Image SCREEN_SHOT_PUSH = getPngImage("toolbar_screen_shot_push"); //$NON-NLS-1$ - public static final Image SCREEN_SHOT_HOVER = getPngImage("toolbar_screen_shot_hover"); //$NON-NLS-1$ - public static final Image SCREEN_SHOT_TOGGLE = getPngImage("toolbar_screen_shot_tog"); //$NON-NLS-1$ - public static final Image SCREEN_SHOT_TOGGLE_HOVER = getPngImage("toolbar_screen_shot_tog_hover"); //$NON-NLS-1$ - public static final Image SCREEN_SHOT_DISABLE = getPngImage("toolbar_screen_shot_disable"); //$NON-NLS-1$ - - /* range */ - public static final Image RANGE_NORMAL = getPngImage("toolbar_range_nor"); //$NON-NLS-1$ - public static final Image RANGE_PUSH = getPngImage("toolbar_range_push"); //$NON-NLS-1$ - public static final Image RANGE_HOVER = getPngImage("toolbar_range_hover"); //$NON-NLS-1$ - public static final Image RANGE_TOGGLE = getPngImage("toolbar_range_tog"); //$NON-NLS-1$ - public static final Image RANGE_TOGGLE_HOVER = getPngImage("toolbar_range_tog_hover"); //$NON-NLS-1$ - public static final Image RANGE_DISABLE = getPngImage("toolbar_range_disable"); //$NON-NLS-1$ - - // Tab - public static final Image TAB = getPngImage("tab_unselected"); //$NON-NLS-1$ - public static final Image TAB_PUSH = getPngImage("tab_push"); //$NON-NLS-1$ - public static final Image TAB_HOVER = getPngImage("tab_hover"); //$NON-NLS-1$ - public static final Image TAB_DISABLE = getPngImage("tab_selected"); //$NON-NLS-1$ - - // Trim - public static final Image WINDOW_TOP = getPngImage("window_top_pattern_01"); //$NON-NLS-1$ - public static final Image WINDOW_TOP2 = getPngImage("window_top_pattern_02"); //$NON-NLS-1$ - public static final Image WINDOW_BOTTOM = getPngImage("window_bottom_pattern"); //$NON-NLS-1$ - public static final Image WINDOW_LEFT = getPngImage("window_left_pattern"); //$NON-NLS-1$ - public static final Image WINDOW_RIGHT = getPngImage("window_right_pattern"); //$NON-NLS-1$ - public static final Image WINDOW_TOP_LEFT = getPngImage("window_top_left_nor_01"); //$NON-NLS-1$ - public static final Image WINDOW_TOP_LEFT2 = getPngImage("window_top_left_nor_02"); //$NON-NLS-1$ - public static final Image WINDOW_TOP_LEFT_MAX = getPngImage("window_top_left_full_01"); //$NON-NLS-1$ - public static final Image WINDOW_TOP_RIGHT = getPngImage("window_top_right_nor_01"); //$NON-NLS-1$ - public static final Image WINDOW_TOP_RIGHT2 = getPngImage("window_top_right_nor_02"); //$NON-NLS-1$ - public static final Image WINDOW_TOP_RIGHT_MAX = getPngImage("window_top_right_full_01"); //$NON-NLS-1$ - public static final Image WINDOW_BOTTOM_LEFT = getPngImage("window_bottom_left_nor"); //$NON-NLS-1$ - public static final Image WINDOW_BOTTOM_LEFT_MAX = getPngImage("window_bottom_left_full"); //$NON-NLS-1$ - public static final Image WINDOW_BOTTOM_RIGHT = getPngImage("window_bottom_right_nor"); //$NON-NLS-1$ - public static final Image WINDOW_BOTTOM_RIGHT_MAX = getPngImage("window_bottom_right_full"); //$NON-NLS-1$ - public static final Image WINDOW_RIGHT_GRAY = getPngImage("window_pattern_1"); //$NON-NLS-1$ - public static final Image WINDOW_RIGHT_DARKGARY = getPngImage("window_pattern_2"); //$NON-NLS-1$ - public static final Image WINDOW_RIGHT_BLACK = getPngImage("window_pattern_3"); //$NON-NLS-1$ - - // Dialog button - public static final Image DIALOG_HOVER = getPngImage("dialog_button_hover"); //$NON-NLS-1$ - public static final Image DIALOG_NORMAL = getPngImage("dialog_button_normal"); //$NON-NLS-1$ - public static final Image DIALOG_PUSH = getPngImage("dialog_button_push"); //$NON-NLS-1$ - public static final Image DIALOG_CLOSE_HOVER = getPngImage("dialog_control_close_hover"); //$NON-NLS-1$ - public static final Image DIALOG_CLOSE_NORMAL = getPngImage("dialog_control_close_normal"); //$NON-NLS-1$ - public static final Image DIALOG_CLOSE_PUSH = getPngImage("dialog_control_close_push"); //$NON-NLS-1$ - - // Dialog icon - public static final Image DIALOG_WARNING_ICON = getPngImage("dialog_warning"); //$NON-NLS-1$ - - // Diglog trim - public static final Image DIALOG_TOP = getPngImage("dialog_top_pattern"); //$NON-NLS-1$ - public static final Image DIALOG_BOTTOM = getPngImage("dialog_bottom_pattern"); //$NON-NLS-1$ - public static final Image DIALOG_BOTTOM_LINUX = getPngImage("dialog_bottom_pattern_linux"); //$NON-NLS-1$ - public static final Image DIALOG_LEFT = getPngImage("dialog_left_pattern"); //$NON-NLS-1$ - public static final Image DIALOG_RIGHT = getPngImage("dialog_right_pattern"); //$NON-NLS-1$ - public static final Image DIALOG_TOP_LEFT = getPngImage("dialog_top_left"); //$NON-NLS-1$ - public static final Image DIALOG_TOP_RIGHT = getPngImage("dialog_top_right"); //$NON-NLS-1$ - public static final Image DIALOG_BOTTOM_LEFT = getPngImage("dialog_bottom_left"); //$NON-NLS-1$ - public static final Image DIALOG_BOTTOM_RIGHT = getPngImage("dialog_bottom_right"); //$NON-NLS-1$ - - public static final Image COMBO_DROPDOWN_UP = getPngImage("dropdown_up"); //$NON-NLS-1$ - public static final Image COMBO_DROPDOWN_DOWN = getPngImage("dropdown_down"); //$NON-NLS-1$ - - // On, Off button - public static final Image ON_HOVER = getPngImage("onoff_on_hover"); //$NON-NLS-1$ - public static final Image ON_NORMAL = getPngImage("onoff_on_unselected"); //$NON-NLS-1$ - public static final Image ON_PUSH = getPngImage("onoff_on_push"); //$NON-NLS-1$ - public static final Image ON_DISABLE = getPngImage("onoff_on_selected"); //$NON-NLS-1$ - public static final Image OFF_HOVER = getPngImage("onoff_off_hover"); //$NON-NLS-1$ - public static final Image OFF_NORMAL = getPngImage("onoff_off_unselected"); //$NON-NLS-1$ - public static final Image OFF_PUSH = getPngImage("onoff_off_push"); //$NON-NLS-1$ - public static final Image OFF_DISABLE = getPngImage("onoff_off_selected"); //$NON-NLS-1$ - - // View title background - public static final Image VIEW_TITLE = getPngImage("title_bg"); //$NON-NLS-1$ - - /* snapshot */ - public static final Image SNAPSHOT_LEFT_NORMAL = getPngImage("snapshot_arrow_left_nor"); //$NON-NLS-1$ - public static final Image SNAPSHOT_LEFT_PUSH = getPngImage("snapshot_arrow_left_push"); //$NON-NLS-1$ - public static final Image SNAPSHOT_LEFT_HOVER = getPngImage("snapshot_arrow_left_hover"); //$NON-NLS-1$ - public static final Image SNAPSHOT_LEFT_DISABLE = getPngImage("snapshot_arrow_left_disable"); //$NON-NLS-1$ - public static final Image SNAPSHOT_RIGHT_NORMAL = getPngImage("snapshot_arrow_right_nor"); //$NON-NLS-1$ - public static final Image SNAPSHOT_RIGHT_PUSH = getPngImage("snapshot_arrow_right_push"); //$NON-NLS-1$ - public static final Image SNAPSHOT_RIGHT_HOVER = getPngImage("snapshot_arrow_right_hover"); //$NON-NLS-1$ - public static final Image SNAPSHOT_RIGHT_DISABLE = getPngImage("snapshot_arrow_right_disable"); //$NON-NLS-1$ - - /* about */ - public static final Image DYNANMIC_ANALYZER_ICON = getPngImage("64_DA_icon"); //$NON-NLS-1$ - public static final Image ABOUT_TIZEN_SDK = getPngImage("about_Tizen_SDK");//$NON-NLS-1$ - public static final Image LICENSE_TIZEN_SDK = getPngImage("license_banner");//$NON-NLS-1$ - - /* Timeline */ - public static final Image CHART_CPU = getPngImage("time_line_icon_cpu"); //$NON-NLS-1$ - public static final Image CHART_CPU_CORE = getPngImage("time_line_icon_cpu_core"); //$NON-NLS-1$ - public static final Image CHART_CPU_FREQUENCY = getPngImage("time_line_icon_cpu_frequency"); //$NON-NLS-1$ - public static final Image CHART_HEAP = getPngImage("time_line_icon_memory_allocation"); //$NON-NLS-1$ - public static final Image CHART_PROCESS_MEMORY = getPngImage("time_line_icon_memory_process"); //$NON-NLS-1$ - public static final Image CHART_SYSTEM_MEMORY = getPngImage("time_line_icon_memory_system"); //$NON-NLS-1$ - public static final Image CHART_FILE = getPngImage("time_line_icon_read_write"); //$NON-NLS-1$ - public static final Image CHART_SCREENSHOT = getPngImage("time_line_icon_snapshot"); //$NON-NLS-1$ - public static final Image CHART_UI_EVENT = getPngImage("time_line_icon_UI_events"); //$NON-NLS-1$ - public static final Image FD_USAGE = getPngImage("time_line_icon_fd_usage"); //$NON-NLS-1$ - public static final Image MEMORY = getPngImage("time_line_icon_memory"); //$NON-NLS-1$ - public static final Image ADD_ITEMS_NORMAL = getPngImage("add_chart_nor"); //$NON-NLS-1$ - public static final Image ADD_ITEMS_PUSH = getPngImage("add_chart_push"); //$NON-NLS-1$ - public static final Image ADD_ITEMS_HOVER = getPngImage("add_chart_hover"); //$NON-NLS-1$ - public static final Image ADD_ITEMS_BAR = getPngImage("AddItems"); //$NON-NLS-1$ - public static final Image MIN_ITEMS = getPngImage("MinItems"); //$NON-NLS-1$ - public static final Image BG_GRADIENT = getPngImage("timeline_right_bg_normal"); //$NON-NLS-1$ - public static final Image BG_CHILD_GRADIENT = getPngImage("timeline_right_child_bg_normal"); //$NON-NLS-1$ - public static final Image TIMLINE_FULL = getPngImage("timeline_left_full_nor"); //$NON-NLS-1$ - public static final Image TIMLINE_RESTORE = getPngImage("timeline_left_restore_nor"); //$NON-NLS-1$ - public static final Image TIMLINE_SIZE_MIN_NORMAL = getPngImage("time_line_size_min_normal"); //$NON-NLS-1$ - public static final Image TIMLINE_SIZE_MIN_HOVER = getPngImage("time_line_size_min_hover"); //$NON-NLS-1$ - public static final Image TIMLINE_SIZE_MIN_PUSH = getPngImage("time_line_size_min_push"); //$NON-NLS-1$ - public static final Image ENERGY = getPngImage("time_line_icon_electric_current"); //$NON-NLS-1$ - public static final Image CHART_DEVICES = getPngImage("time_line_icon_devices"); //$NON-NLS-1$ - public static final Image UI_EVENT = getPngImage("time_line_icon_UI_events"); //$NON-NLS-1$ - public static final Image CHART_CUSTOM = getPngImage("time_line_icon_custom"); //$NON-NLS-1$ - // FIXME - public static final Image TEST_IMAGE_RED = getPngImage("test_image_red"); - public static final Image TEST_IMAGE_BLUE = getPngImage("test_image_blue"); - - /* Resource */ - public static final Image TYPE_FILE = getPngImage("resource/resource_file"); //$NON-NLS-1$ - public static final Image TYPE_SOCKET = getPngImage("resource/resource_socket"); //$NON-NLS-1$ - public static final Image TYPE_GROUP_FILE = getPngImage("resource/resource_file_group"); //$NON-NLS-1$ - public static final Image ARROW_CLOSE_NOR = getPngImage("resource/resource_group_close_nor"); //$NON-NLS-1$ - public static final Image ARROW_CLOSE_HOVER = getPngImage("resource/resource_group_close_hover"); //$NON-NLS-1$ - public static final Image ARROW_CLOSE_PUSH = getPngImage("resource/resource_group_close_push"); //$NON-NLS-1$ - public static final Image ARROW_OPEN_NOR = getPngImage("resource/resource_group_open_nor"); //$NON-NLS-1$ - public static final Image ARROW_OPEN_HOVER = getPngImage("resource/resource_group_open_hover"); //$NON-NLS-1$ - public static final Image ARROW_OPEN_PUSH = getPngImage("resource/resource_group_open_push"); //$NON-NLS-1$ - public static final Image TREE_LINE_MID = getPngImage("resource/resource_group_line_mid"); //$NON-NLS-1$ - public static final Image TREE_LINE_BOTTOM = getPngImage("resource/resource_group_line_bottom"); //$NON-NLS-1$ - public static final Image LIFECYCLE_FIRST_LAST_BALL = getPngImage("resource/resource_lifecycle_first_last_ball"); //$NON-NLS-1$ - public static final Image LIFECYCLE_OPEN_CLOSE_BALL = getPngImage("resource/resource_lifecycle_open_close_ball"); //$NON-NLS-1$ - public static final Image LIFECYCLE_ERROR_MARK = getPngImage("resource/resource_lifecycle_error_mark"); //$NON-NLS-1$ - - public static final Image COMBO_DISABLE = getPngImage("toolbar_dropdown_disable"); //$NON-NLS-1$ - public static final Image COMBO_NORMAL = getPngImage("toolbar_dropdown_normal"); //$NON-NLS-1$ - public static final Image COMBO_PUSH = getPngImage("toolbar_dropdown_push"); //$NON-NLS-1$ - public static final Image COMBO_HOVER = getPngImage("toolbar_dropdown_hover"); //$NON-NLS-1$ - - public static final Image STATUS_BATTERY_OFF = getPngImage("status_battery_off"); //$NON-NLS-1$ - public static final Image STATUS_BATTERY_ON = getPngImage("status_battery_on"); //$NON-NLS-1$ - - public static final Image STATUS_BLUETOOTH_ELSE = getPngImage("status_bluetooth_else"); //$NON-NLS-1$ - public static final Image STATUS_BLUETOOTH_OFF = getPngImage("status_bluetooth_off"); //$NON-NLS-1$ - public static final Image STATUS_BLUETOOTH_TRANSFER = getPngImage("status_bluetooth_transfer"); //$NON-NLS-1$ - - public static final Image STATUS_GPS_CONNECTED = getPngImage("status_gps_connected"); //$NON-NLS-1$ - public static final Image STATUS_GPS_OFF = getPngImage("status_gps_off"); //$NON-NLS-1$ - public static final Image STATUS_GPS_SEARCHING = getPngImage("status_gps_searching"); //$NON-NLS-1$ - - public static final Image STATUS_WIFI_CONNECTED = getPngImage("status_wifi_connected"); //$NON-NLS-1$ - public static final Image STATUS_WIFI_OFF = getPngImage("status_wifi_off"); //$NON-NLS-1$ - public static final Image STATUS_WIFI_TRANSFER = getPngImage("status_wifi_transfer"); //$NON-NLS-1$ - public static final Image STATUS_WIFI_UNCONNECTED = getPngImage("status_wifi_unconnected"); //$NON-NLS-1$ - - public static final Image TREE_OPEN = getPngImage("tree_open"); //$NON-NLS-1$ - public static final Image TREE_FOLD = getPngImage("tree_fold"); //$NON-NLS-1$ - public static final Image NO_IMAGE = getPngImage("empty_snapshot"); //$NON-NLS-1$ - - /* score */ - public static final Image SCORE_0 = getPngImage("score_0"); //$NON-NLS-1$ - public static final Image SCORE_1 = getPngImage("score_1"); //$NON-NLS-1$ - public static final Image SCORE_2 = getPngImage("score_2"); //$NON-NLS-1$ - public static final Image SCORE_3 = getPngImage("score_3"); //$NON-NLS-1$ - public static final Image SCORE_4 = getPngImage("score_4"); //$NON-NLS-1$ - public static final Image SCORE_5 = getPngImage("score_5"); //$NON-NLS-1$ - public static final Image SCORE_6 = getPngImage("score_6"); //$NON-NLS-1$ - public static final Image SCORE_7 = getPngImage("score_7"); //$NON-NLS-1$ - public static final Image SCORE_8 = getPngImage("score_8"); //$NON-NLS-1$ - public static final Image SCORE_9 = getPngImage("score_9"); //$NON-NLS-1$ - - // Edit Chart - public static final Image ADD_CHART_OFF = getPngImage("dialog_edit_chart_off"); //$NON-NLS-1$ - public static final Image ADD_CHART_ON = getPngImage("dialog_edit_chart_on"); //$NON-NLS-1$ - public static final Image ADD_CHART_CPU = getPngImage("edit_chart_icon_cpu"); //$NON-NLS-1$ - public static final Image ADD_CHART_CPU_CORE = getPngImage("edit_chart_icon_cpu_core"); //$NON-NLS-1$ - public static final Image ADD_CHART_CPU_FREQUENCY = getPngImage("edit_chart_icon_cpu_frequency"); //$NON-NLS-1$ - public static final Image ADD_CHART_HEAP = getPngImage("edit_chart_icon_memory_allocation"); //$NON-NLS-1$ - public static final Image ADD_CHART_PROCESS_MEMORY = getPngImage("edit_chart_icon_memory_process"); //$NON-NLS-1$ - public static final Image ADD_CHART_SYSTEM_MEMORY = getPngImage("edit_chart_icon_memory_system"); //$NON-NLS-1$ - public static final Image ADD_CHART_FILE = getPngImage("edit_chart_icon_read_write"); //$NON-NLS-1$ - public static final Image ADD_CHART_SCREENSHOT = getPngImage("edit_chart_icon_snapshot"); //$NON-NLS-1$ - public static final Image ADD_CHART_UI_EVENT = getPngImage("edit_chart_icon_UI_events"); //$NON-NLS-1$ - public static final Image ADD_CHART_DEVICE = getPngImage("edit_chart_icon_devices"); //$NON-NLS-1$ - public static final Image ADD_CHART_ELECTRIC_CURRENT = getPngImage("edit_chart_icon_electric_current"); //$NON-NLS-1$ - public static final Image ADD_CHART_FD_USAGE = getPngImage("edit_chart_icon_fd_usage"); //$NON-NLS-1$ - public static final Image ADD_CHART_MEMORY_APPUSAGE = getPngImage("edit_chart_icon_memory_appusage"); //$NON-NLS-1$ - public static final Image ADD_CHART_READ_WRITE_2 = getPngImage("edit_chart_icon_read_write_01"); //$NON-NLS-1$ - public static final Image ADD_CHART_SOUND = getPngImage("edit_chart_icon_sound"); //$NON-NLS-1$ - public static final Image ADD_CHART_VIBRATION = getPngImage("edit_chart_icon_vibration"); //$NON-NLS-1$ - public static final Image ADD_CHART_CUSTOM = getPngImage("edit_chart_icon_custom"); //$NON-NLS-1$ - - /*** scale ***/ - public static final Image SCALE_CONTROL_MINUS = getPngImage("scale_control_minus"); //$NON-NLS-1$ - public static final Image SCALE_CONTROL_PLUS = getPngImage("scale_control_plus"); //$NON-NLS-1$ - public static final Image SCALE_CONTROL_THUMB = getPngImage("scale_control_thumb"); //$NON-NLS-1$ - - /*** stop progress dialog ***/ - public static final Image STOP_PROGRESS_LOADING = getPngImage("loading_icon"); //$NON-NLS-1$ - public static final Image STOP_PROGRESS_LOADING_GIF = getImage( - "loading_icon", CommonConstants.EXTENSION_GIF_IMAGE); //$NON-NLS-1$ - public static final Image STOP_PROGRESS_LOADING_01 = getPngImage("loading_icon_01"); //$NON-NLS-1$ - public static final Image STOP_PROGRESS_LOADING_02 = getPngImage("loading_icon_02"); //$NON-NLS-1$ - public static final Image STOP_PROGRESS_LOADING_03 = getPngImage("loading_icon_03"); //$NON-NLS-1$ - public static final Image STOP_PROGRESS_LOADING_04 = getPngImage("loading_icon_04"); //$NON-NLS-1$ - public static final Image STOP_PROGRESS_LOADING_05 = getPngImage("loading_icon_05"); //$NON-NLS-1$ - public static final Image STOP_PROGRESS_LOADING_06 = getPngImage("loading_icon_06"); //$NON-NLS-1$ - public static final Image STOP_PROGRESS_LOADING_07 = getPngImage("loading_icon_07"); //$NON-NLS-1$ - public static final Image STOP_PROGRESS_LOADING_08 = getPngImage("loading_icon_08"); //$NON-NLS-1$ - - /*** thread page ***/ - // public static final Image TIMELINE_DROPDOWN_DISABLE = getPngImage("time_line_dropdown_disable"); //$NON-NLS-1$ - public static final Image TIMELINE_DROPDOWN_NORMAL = getPngImage("time_line_dropdown_normal"); //$NON-NLS-1$ - public static final Image TIMELINE_DROPDOWN_HOVER = getPngImage("time_line_dropdown_hover"); //$NON-NLS-1$ - public static final Image TIMELINE_DROPDOWN_PUSH = getPngImage("time_line_dropdown_push"); //$NON-NLS-1$ - - private static Image getImage(String pluginId, String folderName, - String imageName, String extension) { - if (null == imageRegistry.get(imageName) - || imageRegistry.get(imageName).isDisposed()) { - ImageDescriptor desc = AbstractUIPlugin.imageDescriptorFromPlugin( - pluginId, folderName + imageName + extension); - imageRegistry.put(imageName, desc); - } - - return imageRegistry.get(imageName); - } - - // private static Image getImage(String imageName, String extension) { - // return getImage(ID, AnalyzerConstants.IMAGES_FOLDER_NAME, imageName, - // extension); - // } - private static DATheme getTheme() { - return AnalyzerManager.getTheme(); - } - - private static Image getImage(String imageName, String extension) { - return getImage(ID, getTheme().getImagePath(), imageName, extension); - } - - private static Image getImageFromWorkbench(String imageName) { - return getImage(WORKBENCH_ID, - AnalyzerConstants.ICON_WORKBENCH_FOLDER_NAME + File.separator, - imageName, CommonConstants.EXTENSION_PNG_IMAGE); - } - - // private static Image getImageFromWorkbench(String imageName) { - // return getImage(WORKBENCH_ID, AnalyzerConstants.ICON_FOLDER_NAME, - // imageName, AnalyzerConstants.EXTENSION_PNG_IMAGE); - // } - private static Image getPngImage(String imageName) { - return getImage(imageName, CommonConstants.EXTENSION_PNG_IMAGE); - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/services/RecordStateSourceProvider.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/services/RecordStateSourceProvider.java deleted file mode 100644 index 500d965..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/services/RecordStateSourceProvider.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.services; - -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.ui.AbstractSourceProvider; -import org.eclipse.ui.ISources; - -public class RecordStateSourceProvider extends AbstractSourceProvider { - - public static final String RECORD_DEFAULT = "default"; //$NON-NLS-1$ - public static final String RECORD_READY = "ready"; //$NON-NLS-1$ - public static final String RECORD_RECORDING = "recording"; //$NON-NLS-1$ - public static final String RECORD_STATE = "org.tizen.dynamicanalyzer.record.state"; //$NON-NLS-1$ - - private String recordState = RECORD_DEFAULT; - - @Override - public void dispose() { - } - - @Override - public Map getCurrentState() { - Map currentState = new HashMap(1); - currentState.put(RECORD_STATE, recordState); - - return currentState; - } - - @Override - public String[] getProvidedSourceNames() { - return new String[] { RECORD_STATE }; - } - - public void setState(String key, String state) { - if (recordState.equals(state)) { - return; - } - - recordState = state; - - fireSourceChanged(ISources.WORKBENCH, RECORD_STATE, state); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/services/TimelineUpdateSourceProvider.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/services/TimelineUpdateSourceProvider.java deleted file mode 100644 index 084c262..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/services/TimelineUpdateSourceProvider.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.services; - -import java.util.HashMap; -import java.util.Map; - -import org.eclipse.ui.AbstractSourceProvider; -import org.eclipse.ui.ISources; - -public class TimelineUpdateSourceProvider extends AbstractSourceProvider { - - public static final String UPDATE_DATA_STATE = "com.osp.performanceanalyzer.timeline.updatedata"; //$NON-NLS-1$ - public static final String UPDATE_DATA_DIRTY = "update data dirty"; //$NON-NLS-1$ - public static final String UPDATE_DATA_CLEAN = "update data clean"; //$NON-NLS-1$ - public static final String UPDATE_DATA_TEST= "update data clean"; //$NON-NLS-1$ - String updateDataState = UPDATE_DATA_CLEAN; - - @Override - public void dispose() { - } - - @Override - public Map getCurrentState() { - Map currentState = new HashMap(1); - currentState.put(UPDATE_DATA_STATE, updateDataState); - return currentState; - } - - @Override - public String[] getProvidedSourceNames() { - return new String[] { UPDATE_DATA_STATE }; - } - - public void setState(String key, String state) { - if (updateDataState.equals(state)) { - return; - } - updateDataState = state; - fireSourceChanged(ISources.WORKBENCH, UPDATE_DATA_STATE, state); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/sql/DBTableInfo.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/sql/DBTableInfo.java deleted file mode 100644 index ef7c603..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/sql/DBTableInfo.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.sql; - -public class DBTableInfo { - protected String tableName; - protected String[] columnNames; - protected String[] columnOptions; - protected String[] columnTypes; - - public DBTableInfo(String tableName, String[] columnNames, - String[] columnOptions, String[] columnTypes) { - this.tableName = tableName; - this.columnNames = columnNames; - this.columnOptions = columnOptions; - this.columnTypes = columnTypes; - } - - protected String getColumnString(int index) { - if (columnNames.length <= index) { - return null; - } - return columnNames[index] + " " + columnTypes[index] + " " //$NON-NLS-1$ //$NON-NLS-2$ - + columnOptions[index]; - } - - public String getTableName() { - return tableName; - } - - public String createQuery() { - if (isValid()) { - StringBuffer strBuffer = new StringBuffer(); - strBuffer.append("create table "); //$NON-NLS-1$ - strBuffer.append(tableName); - strBuffer.append(" ( "); //$NON-NLS-1$ - - for (int i = 0; i < columnNames.length; i++) { - strBuffer.append(getColumnString(i)); - if (i + 1 == columnNames.length) { - strBuffer.append(")"); //$NON-NLS-1$ - } else { - strBuffer.append(", "); //$NON-NLS-1$ - } - } - return strBuffer.toString(); - } - return null; - } - - public String insertQuery() { - if (isValid()) { - StringBuffer strBuffer = new StringBuffer(); - strBuffer.append("insert into "); //$NON-NLS-1$ - strBuffer.append(tableName); - strBuffer.append(" values ( "); //$NON-NLS-1$ - - for (int i = 0; i < columnNames.length; i++) { - strBuffer.append("?"); //$NON-NLS-1$ - if (i + 1 == columnNames.length) { - strBuffer.append(");"); //$NON-NLS-1$ - break; - } else { - strBuffer.append(","); //$NON-NLS-1$ - } - } - return strBuffer.toString(); - } - return null; - } - - protected boolean isValid() { - if (null == tableName || tableName.isEmpty()) { - return false; - } - - if (null == columnNames || columnNames.length == 0) { - return false; - } - - if (null == columnOptions || columnOptions.length == 0) { - return false; - } - - if (null == columnTypes || columnTypes.length == 0) { - return false; - } - - if (columnNames.length != columnOptions.length - || columnNames.length != columnTypes.length) { - return false; - } - return true; - } - - public String[] getColumnNames() { - return columnNames; - } - - public String[] getColumnOptions() { - return columnOptions; - } - - public String[] getColumnTypes() { - return columnTypes; - } - - public void setColumnNames(String[] columnNames) { - this.columnNames = columnNames; - } - - public void setColumnOptions(String[] columnOptions) { - this.columnOptions = columnOptions; - } - - public void setColumnTypes(String[] columnTypes) { - this.columnTypes = columnTypes; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/sql/DBTableManager.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/sql/DBTableManager.java deleted file mode 100644 index cd9ab25..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/sql/DBTableManager.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.sql; - -import java.util.ArrayList; -import java.util.List; - -public class DBTableManager { - - public static DBTableManager instance = null; - - private final String TABLE_NAME_APP_INFO = "AppInfo"; - private final String TABLE_NAME_CALLSTACK_UNITS = "CallstackUnits"; - private final String TABLE_NAME_CALLSTACK_DATA = "CallstackData"; - private final String TABLE_NAME_FAILED_DATA = "FailedData"; - private final String TABLE_NAME_LEAK_DATA = "LeakData"; - private final String TABLE_NAME_PROFILING_DATA = "ProfilingData"; - private final String TABLE_NAME_PROFILING_CHILD_DATA = "ProfilingChildData"; - - private static List tableInfos; - - public static final int TABLE_INDEX_APP_INFO = 0; - public static final int TABLE_INDEX_CALLSTACK_UNITS = 1; - public static final int TABLE_INDEX_CALLSTACK_DATA = 2; - public static final int TABLE_INDEX_FAILED_DATA = 3; - public static final int TABLE_INDEX_LEAK_DATA = 4; - public static final int TABLE_INDEX_PROFILING_DATA = 5; - public static final int TABLE_INDEX_PROFILING_CHILD_DATA = 6; - - public static int TABLE_COUNT = 7; - - public static final String[] commonColumns = { "Rid", "Id", "SeqNumber", - "APINmae", "Time", "Pid", "Tid", "InputParm", "Return", "PCAddr", - "Error", "InternalCall", "CallerPCAddr", "Reserved1", "Reserved2", - "Reserved3", "Reserved4", "Reserved5", "Reserved6", "Reserved7" }; - public static final String[] commonOptions = { "", "", "", "", "", "", "", - "", "", "", "", "", "", "", "", "", "", "", "", "" }; - public static final String[] commonTypes = { "TEXT", "TEXT", "TEXT", - "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", - "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", - "TEXT" }; - - public static DBTableManager getInstance() { - if (null == instance) { - instance = new DBTableManager(); - instance.init(); - } - return instance; - } - - public List getTableInfos() { - if (null == tableInfos) { - tableInfos = new ArrayList(); - for (int i = 0; i < TABLE_COUNT; i++) { - tableInfos.add(null); - } - } - return tableInfos; - } - - private void init() { - // init tableInfo; - getTableInfos(); - - // "app info" table info block - { - String[] names = { "info" }; - String[] options = { "" }; - String[] types = { "TEXT" }; - DBTableInfo appInfoTableInfo = new DBTableInfo(TABLE_NAME_APP_INFO, - names, options, types); - tableInfos.set(TABLE_INDEX_APP_INFO, appInfoTableInfo); - } - - // "callstack units" table info block - { - String[] names = { "addr", "api" }; - String[] options = { "primary key not null", "" }; - String[] types = { "INTEGER", "TEXT" }; - DBTableInfo callstackUnitsTableInfo = new DBTableInfo( - TABLE_NAME_CALLSTACK_UNITS, names, options, types); - tableInfos - .set(TABLE_INDEX_CALLSTACK_UNITS, callstackUnitsTableInfo); - } - - // "callstack data" table info block - { - String[] names = { "seq", "callstack" }; - String[] options = { "not null", "" }; - String[] types = { "INTEGER", "TEXT" }; - DBTableInfo callstackDataTableInfo = new DBTableInfo( - TABLE_NAME_CALLSTACK_DATA, names, options, types); - tableInfos.set(TABLE_INDEX_CALLSTACK_DATA, callstackDataTableInfo); - } - - // "failed data" table info block - { - String[] names = commonColumns; - String[] options = commonOptions; - String[] types = commonTypes; - DBTableInfo failedDataTableInfo = new DBTableInfo( - TABLE_NAME_FAILED_DATA, names, options, types); - tableInfos.set(TABLE_INDEX_FAILED_DATA, failedDataTableInfo); - } - - // "leak data" table info block - { - String[] names = commonColumns; - String[] options = commonOptions; - String[] types = commonTypes; - DBTableInfo leakDataTableInfo = new DBTableInfo( - TABLE_NAME_LEAK_DATA, names, options, types); - tableInfos.set(TABLE_INDEX_LEAK_DATA, leakDataTableInfo); - } - - // "profiling data" table info block - { - String[] names = { "seq", "name", "exCount", "inCount", - "callCount", "parent", "key", "inclExeTime", "exclExeTime" }; - String[] options = { "not null", "", "", "", "", "", "", "", "" }; - String[] types = { "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", - "TEXT", "TEXT", "TEXT" }; - DBTableInfo profilingDataTableInfo = new DBTableInfo( - TABLE_NAME_PROFILING_DATA, names, options, types); - tableInfos.set(TABLE_INDEX_PROFILING_DATA, profilingDataTableInfo); - } - - // "profiling child data" table info block - { - String[] names = { "seq", "childList" }; - String[] options = { "not null", "" }; - String[] types = { "TEXT", "TEXT" }; - DBTableInfo profilingChildTableInfo = new DBTableInfo( - TABLE_NAME_PROFILING_CHILD_DATA, names, options, types); - tableInfos.set(TABLE_INDEX_PROFILING_CHILD_DATA, - profilingChildTableInfo); - } - } - - public DBTableInfo getTableInfo(int tableInfoIndex) { - return getTableInfos().get(tableInfoIndex); - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/sql/SqlManager.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/sql/SqlManager.java deleted file mode 100755 index cd5e76d..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/sql/SqlManager.java +++ /dev/null @@ -1,1013 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * SangHyun Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.sql; - -import java.io.File; -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; - -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.CommonConstants; -import org.tizen.dynamicanalyzer.model.LogCenter; -import org.tizen.dynamicanalyzer.project.Project; -import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackData; -import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackManager; -import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackUnit; -import org.tizen.dynamicanalyzer.ui.summary.failed.FailedChecker; -import org.tizen.dynamicanalyzer.ui.summary.failed.FailedData; -import org.tizen.dynamicanalyzer.ui.summary.leaks.LeakData; -import org.tizen.dynamicanalyzer.ui.summary.leaks.LeakDetector; -import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfiler; -import org.tizen.dynamicanalyzer.ui.summary.profiling.ProfileDataMaker; -import org.tizen.dynamicanalyzer.ui.summary.profiling.ProfilingChildData; -import org.tizen.dynamicanalyzer.ui.summary.profiling.ProfilingData; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; - -public class SqlManager { - private static boolean dbLock = false; - - private static Connection getConnection() { - Project project = AnalyzerManager.getProject(); - if (null != project) { - return project.getConnection(); - } - return null; - } - - private static void lockDB() { - while (true) { - if (!dbLock) { - dbLock = true; - break; - } - try { - Thread.sleep(500); - } catch (InterruptedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - } - - public static void unlockDB() { - dbLock = false; - } - - public static Connection getConnection(String path) { - Connection connection = null; - try { - Class.forName("org.sqlite.JDBC"); //$NON-NLS-1$ - connection = DriverManager.getConnection("jdbc:sqlite:" //$NON-NLS-1$ - + path + File.separator + AnalyzerConstants.DATABASE_NAME); - } catch (Exception e) { - e.printStackTrace(); - } - return connection; - } - - public synchronized static void createTable(LogCenter lcenter) { - lockDB(); - Connection conn = getConnection(); - if (null == conn) { - return; - } - - try { - Statement stat = conn.createStatement(); - stat.executeUpdate(SqlManager.createDropTableQuery(lcenter - .getName())); - stat.executeUpdate(SqlManager.createTableQuery(lcenter)); - conn.close(); - } catch (Exception e) { - e.printStackTrace(); - } - unlockDB(); - } - - public static void createProjectTable(Project project) { - lockDB(); - Connection conn = getConnection(); - if (null == conn) { - unlockDB(); - return; - } - - try { - Statement stat = conn.createStatement(); - stat.executeUpdate(SqlManager.createDropTableQuery("project")); //$NON-NLS-1$ - String query = "create table project (info TEXT not null)"; //$NON-NLS-1$ - stat.executeUpdate(query); - conn.close(); - } catch (Exception e) { - e.printStackTrace(); - } - unlockDB(); - } - - public static void insertProject() { - lockDB(); - Connection conn = getConnection(); - if (null == conn) { - return; - } - - try { - String query = "insert into project values ( ? );"; //$NON-NLS-1$ - List logcs = AnalyzerManager.getLogCenters(); - - PreparedStatement prep = conn.prepareStatement(query); - int size = logcs.size(); - Project project = AnalyzerManager.getProject(); - - /* project version index = 0 */ - prep.setString(1, project.getVersion()); - prep.addBatch(); - /* project create time index = 1 */ - prep.setString(1, project.getCreateTime()); - prep.addBatch(); - /* project application name index = 2 */ - prep.setString(1, project.getAppName()); - prep.addBatch(); - /* project device index = 3 */ - prep.setString(1, project.getDevice()); - prep.addBatch(); - /* project last log number index = 4 */ - prep.setString(1, project.getLastLogNum()); - prep.addBatch(); - /* project last recording time index = 5 */ - prep.setLong(1, project.getLastTime()); - prep.addBatch(); - /* project total sample count index = 6 */ - prep.setInt(1, project.getTotalProfilingSampleCount()); - prep.addBatch(); - /* project logcenters index = reminders */ - for (int i = 0; i < size; i++) { - try { - prep.setString(1, logcs.get(i).getName()); - prep.addBatch(); - } catch (ArrayIndexOutOfBoundsException e) { - e.printStackTrace(); - } - } - - conn.setAutoCommit(false); - prep.executeBatch(); - conn.setAutoCommit(true); - conn.close(); - } catch (Exception e) { - e.printStackTrace(); - } - unlockDB(); - } - - private static String createTableQuery(LogCenter lcenter) { - StringBuffer query = new StringBuffer(); - query.append("create table "); //$NON-NLS-1$ - query.append(lcenter.getName()); - query.append(" ("); //$NON-NLS-1$ - List columnName = lcenter.getColumnName(); - List columnType = lcenter.getType(); - int size = lcenter.getTotalColumnCount(); - for (int i = 0; i < size; i++) { - query.append(columnName.get(i) + CommonConstants.SPACE - + columnType.get(i)); - if (i + 1 == size) { - query.append(");"); //$NON-NLS-1$ - break; - } else { - query.append(","); //$NON-NLS-1$ - } - } - return query.toString(); - } - - public static String createDropTableQuery(String target) { - StringBuffer query = new StringBuffer(); - query.append("drop table if exists "); //$NON-NLS-1$ - query.append(target); - query.append(";"); //$NON-NLS-1$ - return query.toString(); - } - - public static void insert(LogCenter logc, List> input) { - lockDB(); - Connection conn = getConnection(); - if (null == conn) { - unlockDB(); - return; - } - try { - String query = logc.getInsertQuery(); - PreparedStatement prep = conn.prepareStatement(query); - int dataSize = input.size(); - for (int inputIndex = 0; inputIndex < dataSize; inputIndex++) { - List log = input.get(inputIndex); - int size = logc.getTotalColumnCount(); - prep.setInt(1, logc.getIndex()); - for (int i = 0; i < size; i++) { - try { - if (i + 2 > size) { - break; - } - prep.setString(i + 2, log.get(i)); - } catch (ArrayIndexOutOfBoundsException e) { - System.out.println("sql insert exception : index " + i); //$NON-NLS-1$ - e.printStackTrace(); - } - } - prep.addBatch(); - logc.addIndex(); - } - conn.setAutoCommit(false); - prep.executeBatch(); - conn.setAutoCommit(true); - conn.close(); - } catch (Exception e) { - e.printStackTrace(); - for (int i = 0; i < input.size(); i++) { - System.out.println("primary keys :" + input.get(i).get(1) //$NON-NLS-1$ - + " input : " + input.get(i)); //$NON-NLS-1$ - } - } - unlockDB(); - } - - public static String createInsertQuery(LogCenter logcs) { - StringBuffer query = new StringBuffer(); - query.append("insert into "); //$NON-NLS-1$ - query.append(logcs.getName()); - query.append(" values "); //$NON-NLS-1$ - query.append("("); //$NON-NLS-1$ - - int size = logcs.getTotalColumnCount(); - for (int i = 0; i < size; i++) { - query.append("?"); //$NON-NLS-1$ - if (i + 1 == size) { - query.append(");"); //$NON-NLS-1$ - break; - } else { - query.append(","); //$NON-NLS-1$ - } - } - return query.toString(); - } - - public static ResultSet selectAllFromProject(Project p) { - lockDB(); - Connection conn = getConnection(); - if (null == conn) { - unlockDB(); - return null; - } - try { - Statement stat = conn.createStatement(); - String query = "select * from project"; //$NON-NLS-1$ - ResultSet rs = stat.executeQuery(query); - unlockDB(); - return rs; - } catch (SQLException e) { - e.printStackTrace(); - } - unlockDB(); - return null; - } - - public static List> selectArea(LogCenter center, int from, - int to) { - lockDB(); - Connection conn = getConnection(); - if (null == conn) { - unlockDB(); - return null; - } - StringBuffer query = new StringBuffer(); - query.append("select * from "); //$NON-NLS-1$ - query.append(center.getName()); - query.append(" where SeqNumber >= "); //$NON-NLS-1$ - query.append(from); - query.append(" and SeqNumber <= "); //$NON-NLS-1$ - query.append(to); - query.append(";"); //$NON-NLS-1$ - - List> output = new ArrayList>(); - try { - Statement stmt = conn.createStatement(); - ResultSet rs = stmt.executeQuery(query.toString()); - if (null != rs) { - try { - while (rs.next()) { - List inner = new ArrayList(); - int size = center.getTotalColumnCount(); - for (int i = 1; i <= size; i++) { - if (i + 1 > size) { - break; - } - inner.add(rs.getString(i + 1)); - } - output.add(inner); - } - } catch (SQLException e) { - e.printStackTrace(); - } - } - if (!rs.isClosed()) { - rs.close(); - } - unlockDB(); - return output; - } catch (Exception e) { - e.printStackTrace(); - } - unlockDB(); - return null; - } - - public synchronized static List> selectRowId(LogCenter center, - int from, int to) { - lockDB(); - - Connection conn = getConnection(); - if (null == conn) { - unlockDB(); - return null; - } - - StringBuffer query = new StringBuffer(); - query.append("select * from "); //$NON-NLS-1$ - query.append(center.getName()); - query.append(" where rid >= "); //$NON-NLS-1$ - query.append(from); - query.append(" and rid < "); //$NON-NLS-1$ - query.append(to); - query.append(";"); //$NON-NLS-1$ - - List> output = new ArrayList>(); - try { - Statement stmt = conn.createStatement(); - ResultSet rs = stmt.executeQuery(query.toString()); - if (null != rs) { - try { - while (rs.next()) { - List inner = new ArrayList(); - int size = center.getTotalColumnCount(); - for (int i = 1; i <= size; i++) { - inner.add(rs.getString(i)); - } - output.add(inner); - } - } catch (SQLException e) { - e.printStackTrace(); - } - } - if (!rs.isClosed()) { - rs.close(); - } - unlockDB(); - return output; - } catch (Exception e) { - e.printStackTrace(); - } - unlockDB(); - return null; - } - - public static int selectCount(LogCenter logCenter) { - lockDB(); - Connection conn = getConnection(); - if (null == conn) { - unlockDB(); - return 0; - } - - try { - Statement stat = conn.createStatement(); - ResultSet rs = stat.executeQuery(logCenter.getSelectCountQuery()); - if (rs.next()) { - int ret = Integer.parseInt(rs.getString(1)); - if (!rs.isClosed()) { - rs.close(); - } - unlockDB(); - return ret; - } - } catch (Exception e) { - System.out.println("Error!"); //$NON-NLS-1$ - e.printStackTrace(); - } - unlockDB(); - return 0; - } - - public static int executeQueryMinMax(String query) { - lockDB(); - Connection conn = getConnection(); - if (null == conn) { - unlockDB(); - return 0; - } - - try { - Statement stat = conn.createStatement(); - ResultSet rs = stat.executeQuery(query); - - if (rs.next()) { - if (null != rs.getString(1)) { - int ret = Integer.parseInt(rs.getString(1)); - if (!rs.isClosed()) { - rs.close(); - } - unlockDB(); - return ret; - } - } - } catch (Exception e) { - System.out.println("Error!"); //$NON-NLS-1$ - e.printStackTrace(); - } - - unlockDB(); - return -1; - } - - public static int executeSelectOperation(String query) { - lockDB(); - Connection conn = getConnection(); - if (null == conn) { - unlockDB(); - return 0; - } - - try { - Statement stat = conn.createStatement(); - ResultSet rs = stat.executeQuery(query); - if (rs.next()) { - String value = AnalyzerUtil.dotCutter(rs.getString(1)); - int ret = 0; - if (null != value && !value.isEmpty()) { - ret = Integer.parseInt(value); - } - if (!rs.isClosed()) { - rs.close(); - } - unlockDB(); - return ret; - } - } catch (Exception e) { - System.out.println("Error!"); //$NON-NLS-1$ - e.printStackTrace(); - } - unlockDB(); - return 0; - } - - public static void saveLeakData() { - lockDB(); - Connection conn = getConnection(); - if (null == conn) { - unlockDB(); - return; - } - LeakDetector leakDectector = AnalyzerManager.getLeakDetector(); - - try { - DBTableInfo leakTableInfo = DBTableManager.getInstance() - .getTableInfo(DBTableManager.TABLE_INDEX_LEAK_DATA); - // DBTableInfo leakTableInfo = DBTableManager.getLeakData(); - String insertQuery = leakTableInfo.insertQuery(); - // String insertQuery = "insert into LeakData values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);"; //$NON-NLS-1$ - // int size = DBTableManager.getLeakData().getColumnNames().length; - int size = leakTableInfo.getColumnNames().length; - PreparedStatement prep = conn.prepareStatement(insertQuery); - - List leakList = leakDectector.getLeakDataList(); - for (LeakData leakData : leakList) { - for (int ii = 0; ii < size; ii++) { - prep.setString(ii + 1, leakData.getData().get(ii)); - } - prep.addBatch(); - - if (!leakData.getChildren().isEmpty()) { - List children = leakData.getChildren(); - for (LeakData child : children) { - for (int ii = 0; ii < size; ii++) { - prep.setString(ii + 1, child.getData().get(ii)); - } - prep.addBatch(); - } - } - } - - conn.setAutoCommit(false); - prep.executeBatch(); - conn.setAutoCommit(true); - - conn.close(); - } catch (Exception e) { - e.printStackTrace(); - } - unlockDB(); - } - - public static void saveFailedData() { - lockDB(); - Connection conn = getConnection(); - if (null == conn) { - unlockDB(); - return; - } - FailedChecker failedChecker = AnalyzerManager.getFailedChecker(); - - try { - List failedList = failedChecker.getFailedList(); - DBTableInfo failedTableInfo = DBTableManager.getInstance() - .getTableInfo(DBTableManager.TABLE_INDEX_FAILED_DATA); - String insertQuery = failedTableInfo.insertQuery(); - PreparedStatement prep = conn.prepareStatement(insertQuery); - String[] columns = DBTableManager.commonColumns; - - int size = columns.length; - int count = failedList.size(); - for (int i = 0; i < count; i++) { - FailedData failedData = failedList.get(i); - int dataSize = failedData.getData().size(); - for (int ii = 0; ii < size; ii++) { - if (ii >= dataSize) { - prep.setString(ii + 1, ""); //$NON-NLS-1$ - } else { - prep.setString(ii + 1, failedData.getData().get(ii)); - } - } - prep.addBatch(); - } - - conn.setAutoCommit(false); - prep.executeBatch(); - conn.setAutoCommit(true); - - conn.close(); - } catch (Exception e) { - e.printStackTrace(); - } - unlockDB(); - } - - public static void saveCallStackUnits() { - lockDB(); - Connection conn = getConnection(); - if (null == conn) { - unlockDB(); - return; - } - - try { - DBTableInfo unitTableInfo = DBTableManager.getInstance() - .getTableInfo(DBTableManager.TABLE_INDEX_CALLSTACK_UNITS); - String insertQuery = unitTableInfo.insertQuery(); - PreparedStatement prep = conn.prepareStatement(insertQuery); - - HashMap callstackMap = CallStackManager - .getInstance().getCallStackApiByAddrMap(); - List callstackUnits = new ArrayList(); - callstackUnits.addAll(callstackMap.values()); - int size = callstackUnits.size(); - for (int i = 0; i < size; i++) { - try { - CallStackUnit saveData = callstackUnits.get(i); - prep.setLong(1, saveData.getAddr()); - prep.setString(2, saveData.getSymbol()); - // FIXME : do not delete !! to catch bug - // System.out.println("addr " + saveData.getAddr() + - // " api " - // + saveData.getSymbol()); - prep.addBatch(); - } catch (ArrayIndexOutOfBoundsException e) { - e.printStackTrace(); - } - } - conn.setAutoCommit(false); - prep.executeBatch(); - conn.setAutoCommit(true); - - conn.close(); - } catch (Exception e) { - e.printStackTrace(); - } - unlockDB(); - } - - public static void saveCallStackData() { - lockDB(); - Connection conn = getConnection(); - if (null == conn) { - unlockDB(); - return; - } - - try { - DBTableInfo callstackData = DBTableManager.getInstance() - .getTableInfo(DBTableManager.TABLE_INDEX_CALLSTACK_DATA); - String insertQuery = callstackData.insertQuery(); - PreparedStatement prep = conn.prepareStatement(insertQuery); - Collection col = CallStackManager.getInstance() - .getCallStackDataBySeqMap().values(); - List callstackDataList = new ArrayList(); - callstackDataList.addAll(col); - int size = callstackDataList.size(); - for (int i = 0; i < size; i++) { - int seq = callstackDataList.get(i).getSeq(); - String addrs = AnalyzerUtil - .makeLongList2String(callstackDataList.get(i) - .getAddrs()); - try { - prep.setInt(1, seq); - prep.setString(2, addrs); - prep.addBatch(); - } catch (ArrayIndexOutOfBoundsException e) { - e.printStackTrace(); - } - } - - conn.setAutoCommit(false); - prep.executeBatch(); - conn.setAutoCommit(true); - - conn.close(); - } catch (Exception e) { - e.printStackTrace(); - } - unlockDB(); - } - - public static void saveAppInfo() { - lockDB(); - Connection conn = getConnection(); - if (null == conn) { - unlockDB(); - return; - } - - try { - DBTableInfo appInfoData = DBTableManager.getInstance() - .getTableInfo(DBTableManager.TABLE_INDEX_APP_INFO); - String insertQuery = appInfoData.insertQuery(); - PreparedStatement prep = conn.prepareStatement(insertQuery); - List info = AnalyzerManager.getProject().getAppInfo(); - int size = info.size(); - for (int i = 0; i < size; i++) { - prep.setString(1, info.get(i)); - prep.addBatch(); - } - - conn.setAutoCommit(false); - prep.executeBatch(); - conn.setAutoCommit(true); - - conn.close(); - } catch (Exception e) { - e.printStackTrace(); - } - unlockDB(); - } - - public static void createTables() { - lockDB(); - Connection conn = getConnection(); - if (null == conn) { - unlockDB(); - return; - } - - try { - DBTableManager dbManager = DBTableManager.getInstance(); - Statement stat = conn.createStatement(); - stat.executeUpdate(dbManager.getTableInfo( - DBTableManager.TABLE_INDEX_APP_INFO).createQuery()); - stat.executeUpdate(dbManager.getTableInfo( - DBTableManager.TABLE_INDEX_CALLSTACK_UNITS).createQuery()); - stat.executeUpdate(dbManager.getTableInfo( - DBTableManager.TABLE_INDEX_CALLSTACK_DATA).createQuery()); - stat.executeUpdate(dbManager.getTableInfo( - DBTableManager.TABLE_INDEX_FAILED_DATA).createQuery()); - stat.executeUpdate(dbManager.getTableInfo( - DBTableManager.TABLE_INDEX_LEAK_DATA).createQuery()); - stat.executeUpdate(dbManager.getTableInfo( - DBTableManager.TABLE_INDEX_PROFILING_DATA).createQuery()); - stat.executeUpdate(dbManager.getTableInfo( - DBTableManager.TABLE_INDEX_PROFILING_CHILD_DATA) - .createQuery()); - - // stat.executeUpdate(DBTableManager.getAppInfo().createQuery()); - // stat.executeUpdate(DBTableManager.getCallStackUnits().createQuery()); - // stat.executeUpdate(DBTableManager.getCallStackData().createQuery()); - // stat.executeUpdate(DBTableManager.getFailedData().createQuery()); - // stat.executeUpdate(DBTableManager.getLeakData().createQuery()); - // stat.executeUpdate(DBTableManager.getProfilingData().createQuery()); - // stat.executeUpdate(DBTableManager.getProfilingChildData() - // .createQuery()); - conn.close(); - } catch (Exception e) { - e.printStackTrace(); - } - unlockDB(); - } - - public static ResultSet selectAllFromTable(String tableName) { - lockDB(); - Connection conn = getConnection(); - if (null == conn) { - unlockDB(); - return null; - } - - try { - Statement stat = conn.createStatement(); - String query = "select * from " + tableName; //$NON-NLS-1$ - ResultSet rs = stat.executeQuery(query); - unlockDB(); - return rs; - } catch (SQLException e) { - e.printStackTrace(); - } - unlockDB(); - return null; - } - - public static List executeSelectQuery(String query, LogCenter logc) { - lockDB(); - Connection conn = getConnection(); - if (null == conn) { - unlockDB(); - return null; - } - - List output = null; - try { - Statement stat = conn.createStatement(); - ResultSet rs = stat.executeQuery(query); - if (rs.next()) { - output = new ArrayList(); - int size = logc.getTotalColumnCount(); - for (int i = 0; i < size; i++) { - output.add(rs.getString(i + 1)); - } - } - if (!rs.isClosed()) { - rs.close(); - } - } catch (Exception e) { - System.out.println("Error!"); //$NON-NLS-1$ - e.printStackTrace(); - } - unlockDB(); - return output; - } - - public static String executeSelectQuery(String query) { - lockDB(); - Connection conn = getConnection(); - if (null == conn) { - unlockDB(); - return null; - } - - String output = null; - try { - Statement stat = conn.createStatement(); - ResultSet rs = stat.executeQuery(query); - if (rs.next()) { - output = rs.getString(1); - } - if (!rs.isClosed()) { - rs.close(); - } - } catch (Exception e) { - System.out.println("Error!"); //$NON-NLS-1$ - e.printStackTrace(); - } - unlockDB(); - return output; - } - - public static List> executeSelectQueryFD(String query, int size) { - lockDB(); - Connection conn = getConnection(); - if (null == conn) { - unlockDB(); - return null; - } - - List output = null; - List> outputList = new ArrayList>(); - try { - Statement stat = conn.createStatement(); - ResultSet rs = stat.executeQuery(query); - while (rs.next()) { - output = new ArrayList(); - for (int i = 0; i < size; i++) { - output.add(rs.getString(i + 1)); - } - outputList.add(output); - } - if (!rs.isClosed()) { - rs.close(); - } - } catch (Exception e) { - System.out.println("Error!"); //$NON-NLS-1$ - e.printStackTrace(); - } - unlockDB(); - return outputList; - } - - - - public static List> executeDeviceInfoQuery(String query) { - lockDB(); - Connection conn = getConnection(); - if (null == conn) { - unlockDB(); - return null; - } - - List output = null; - List> outputList = new ArrayList>(); - try { - Statement stat = conn.createStatement(); - ResultSet rs = stat.executeQuery(query); - while (rs.next()) { - output = new ArrayList(); - for (int i = 0; i < 2; i++) { - output.add(rs.getString(i + 1)); - } - outputList.add(output); - } - if (!rs.isClosed()) { - rs.close(); - } - } catch (Exception e) { - System.out.println("Error!"); //$NON-NLS-1$ - e.printStackTrace(); - } - unlockDB(); - return outputList; - } - - public static List> executeSelectQueryImage(String query, - LogCenter logc) { - lockDB(); - Connection conn = getConnection(); - if (null == conn) { - unlockDB(); - return null; - } - - List output = null; - List> outputList = new ArrayList>(); - try { - Statement stat = conn.createStatement(); - ResultSet rs = stat.executeQuery(query); - int size = logc.getTotalColumnCount(); - while (rs.next()) { - output = new ArrayList(); - for (int i = 0; i < size; i++) { - output.add(rs.getString(i + 1)); - } - outputList.add(output); - } - if (!rs.isClosed()) { - rs.close(); - } - } catch (Exception e) { - System.out.println("Error!"); //$NON-NLS-1$ - e.printStackTrace(); - } - unlockDB(); - return outputList; - } - - public static void saveProfilingData() { - lockDB(); - Connection conn = getConnection(); - if (null == conn) { - unlockDB(); - return; - } - ProfileDataMaker profiler = FunctionUsageProfiler.getInstance() - .getProfileDataMaker(); - HashMap profilingDataMap = profiler - .getProfilingDataMap(); - List pDataList = new ArrayList(); - pDataList.addAll(profilingDataMap.values()); - - try { - DBTableInfo profilingData = DBTableManager.getInstance() - .getTableInfo(DBTableManager.TABLE_INDEX_PROFILING_DATA); - String insertQuery = profilingData.insertQuery(); - PreparedStatement prep = conn.prepareStatement(insertQuery); - - int size = profilingData.getColumnNames().length; - int count = pDataList.size(); - for (int i = 0; i < count; i++) { - List input = pDataList.get(i).getSaveData(); - int dataSize = input.size(); - for (int ii = 0; ii < size; ii++) { - if (ii >= dataSize) { - prep.setString(ii + 1, ""); //$NON-NLS-1$ - } else { - prep.setString(ii + 1, input.get(ii)); - } - } - prep.addBatch(); - } - - conn.setAutoCommit(false); - prep.executeBatch(); - conn.setAutoCommit(true); - - conn.close(); - } catch (Exception e) { - e.printStackTrace(); - } - unlockDB(); - } - - public static void saveProfilingChildData() { - lockDB(); - Connection conn = getConnection(); - if (null == conn) { - unlockDB(); - return; - } - // FunctionUsageProfiler profiler = AnalyzerManager - // .getFunctionUserProfiler(); - ProfileDataMaker profiler = FunctionUsageProfiler.getInstance() - .getProfileDataMaker(); - HashMap profilingDataMap = profiler - .getChildListMap(); - List pDataList = new ArrayList(); - pDataList.addAll(profilingDataMap.values()); - - try { - DBTableInfo profilingChildData = DBTableManager.getInstance() - .getTableInfo( - DBTableManager.TABLE_INDEX_PROFILING_CHILD_DATA); - String insertQuery = profilingChildData.insertQuery(); - PreparedStatement prep = conn.prepareStatement(insertQuery); - - int count = pDataList.size(); - for (int i = 0; i < count; i++) { - ProfilingChildData data = pDataList.get(i); - String seqStr = AnalyzerUtil.makeStringList2String(data - .getChildren()); - if (null == seqStr || seqStr.isEmpty()) { - continue; - } - prep.setString(1, data.getSeq()); - prep.setString(2, seqStr); - prep.addBatch(); - } - - conn.setAutoCommit(false); - prep.executeBatch(); - conn.setAutoCommit(true); - - conn.close(); - } catch (Exception e) { - e.printStackTrace(); - } - unlockDB(); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/theme/DATheme.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/theme/DATheme.java deleted file mode 100644 index 2b6ba1a..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/theme/DATheme.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.theme; - -import java.io.File; - -import org.eclipse.jface.resource.ColorRegistry; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.RGB; - -public abstract class DATheme { - protected String name = "black"; - protected static ColorRegistry colorRegistry = new ColorRegistry(); - - public DATheme() { - setColor("white", new RGB(255, 255, 255)); //$NON-NLS-1$ - setColor("black", new RGB(0, 0, 0)); //$NON-NLS-1$ - setColor("blue", new RGB(0, 0, 255)); //$NON-NLS-1$ - setColor("red", new RGB(255, 0, 0)); //$NON-NLS-1$ - setColor("purple", new RGB(226, 101, 225)); //$NON-NLS-1$ - } - - public abstract Color getColor(String colorName, RGB rgb); - - public abstract Color getColor(String colorName); - - public abstract void setColor(String colorName, RGB rgb); - - public String getThemePath() { - // TODO Auto-generated method stub - return "theme" + File.separator + name + File.separator; - } - - public String getImagePath() { - String path = getThemePath() + "img" + File.separator; - return path; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/theme/DAThemeBlack.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/theme/DAThemeBlack.java deleted file mode 100644 index 5afa87c..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/theme/DAThemeBlack.java +++ /dev/null @@ -1,413 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.theme; - -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.RGB; - -public class DAThemeBlack extends DATheme { - public static DAThemeBlack instance; - - public static DAThemeBlack getInstance() { - if (null == instance) { - instance = new DAThemeBlack(); - } - return instance; - } - - DAThemeBlack() { - super(); - name = "black"; - - // defaule - setColor("blue", new RGB(0, 102, 134)); - setColor("green", new RGB(68, 98, 12)); - setColor("yellow", new RGB(255, 210, 10)); - setColor("purple", new RGB(139, 42, 118)); - setColor("brown", new RGB(138, 83, 0)); - setColor("navy", new RGB(57, 66, 161)); - setColor("darkviolet", new RGB(105, 2, 126)); - setColor("maroon", new RGB(126, 41, 2)); - setColor("teal", new RGB(27, 110, 92)); - setColor("indigo", new RGB(80, 26, 146)); - setColor("goldenrod", new RGB(212, 150, 57)); - setColor("turquoise", new RGB(72, 194, 168)); - setColor("violet", new RGB(226, 109, 201)); - setColor("slateblue", new RGB(122, 132, 238)); - setColor("orange", new RGB(236, 107, 47)); - setColor("yellowgreen", new RGB(129, 172, 50)); - setColor("skyblue", new RGB(72, 185, 221)); - setColor("orchid", new RGB(175, 49, 200)); - setColor("sandybrown", new RGB(201, 168, 58)); - setColor("mediumpurple", new RGB(160, 108, 224)); - - // shell window background color - setColor("window_bg_color", new RGB(51, 52, 53)); //$NON-NLS-1$ - setColor("dialg_bg_upper", new RGB(51, 52, 53)); - setColor("dialg_bg_lower", new RGB(0, 0, 0)); - setColor("dialg_sunken_1", new RGB(39, 39, 40)); - setColor("dialg_sunken_2", new RGB(39, 39, 40)); - setColor("edit_chart_dialog_upper", new RGB(0, 0, 0)); - setColor("edit_chart_dialog_lower", new RGB(39, 39, 40)); - - setColor("view_border", new RGB(74, 74, 74)); //$NON-NLS-1$ - setColor("view_bg_color", new RGB(66, 66, 68)); //$NON-NLS-1$ - getColor("view_title_font_color", new RGB(255, 255, 255)); - - setColor("coolbar_bg_color", new RGB(51, 52, 53)); //$NON-NLS-1$ - setColor("default_font_color", new RGB(255, 255, 255));//$NON-NLS-1$ - - /** title bar colors **/ - setColor("titlebar_text_color", new RGB(64, 208, 255)); //$NON-NLS-1$ - setColor("titlebar_bg", new RGB(78, 79, 81)); //$NON-NLS-1$ - setColor("titlebar_start_color", new RGB(103, 103, 104)); //$NON-NLS-1$ - setColor("titlebar_end_color", new RGB(133, 133, 133)); //$NON-NLS-1$ - setColor("titlebar_bottom_stroke_1", new RGB(0, 0, 0)); - setColor("titlebar_bottom_stroke_2", new RGB(128, 128, 128)); - - /** device and application combo specific colors start **/ - setColor("device_application_enable_font", new RGB(255, 255, 255)); //$NON-NLS-1$ - setColor("device_application_disable_font", new RGB(128, 128, 128)); //$NON-NLS-1$ - setColor("device_application_popup_outer_1", new RGB(31, 31, 31)); //$NON-NLS-1$ - setColor("device_application_popup_outer_2", new RGB(31, 137, 163)); //$NON-NLS-1$ - setColor("device_application_item_normal_top", new RGB(76, 76, 77)); //$NON-NLS-1$ - setColor("device_application_item_normal_inner", new RGB(66, 66, 67)); //$NON-NLS-1$ - setColor("device_application_item_normal_bottom", new RGB(56, 56, 60)); //$NON-NLS-1$ - setColor("device_application_item_select_top", new RGB(76, 76, 77)); //$NON-NLS-1$ - setColor("device_application_item_select_inner", new RGB(0, 151, 201)); //$NON-NLS-1$ - setColor("device_application_item_select_bottom", new RGB(56, 56, 60)); //$NON-NLS-1$ - /** device and application combo specific colors end **/ - - /*** combo button gradation ***/ - setColor("device_application_button_normal_start", new RGB(72, 72, 73)); //$NON-NLS-1$ - setColor("device_application_button_normal_end", new RGB(35, 35, 36)); //$NON-NLS-1$ - setColor("device_application_button_push_start", new RGB(13, 75, 96)); //$NON-NLS-1$ - setColor("device_application_button_push_end", new RGB(13, 75, 96)); //$NON-NLS-1$ - setColor("device_application_button_hover_start", new RGB(0, 151, 201)); //$NON-NLS-1$ - setColor("device_application_button_hover_end", new RGB(0, 151, 201)); //$NON-NLS-1$ - setColor("device_application_button_disable_start", new RGB(51, 52, 53)); //$NON-NLS-1$ - setColor("device_application_button_disable_end", new RGB(0, 0, 0)); //$NON-NLS-1$ - setColor("device_application_button_outline", new RGB(0, 0, 0)); - - /*** common button colors ***/ - setColor("button_normal_color_start", new RGB(103, 103, 104)); - setColor("button_normal_color_end", new RGB(67, 67, 68)); - setColor("button_push_color_start", new RGB(67, 67, 68)); - setColor("button_push_color_end", new RGB(103, 103, 104)); - setColor("button_hover_color_start", new RGB(103, 103, 104)); - setColor("button_hover_color_end", new RGB(67, 67, 67)); - setColor("button_disable_color_start", new RGB(74, 74, 74)); - setColor("button_disable_color_end", new RGB(50, 50, 50)); - - setColor("button_outline_normal_in_color", new RGB(0, 0, 0)); - setColor("button_outline_push_in_color", new RGB(0, 0, 0)); - setColor("button_outline_hover_in_color", new RGB(0, 0, 0)); - setColor("button_outline_disable_in_color", new RGB(0, 0, 0)); - - setColor("button_outline_normal_color", new RGB(67, 67, 68)); - setColor("button_outline_push_color", new RGB(67, 67, 68)); - setColor("button_outline_hover_color", new RGB(66, 158, 190)); - setColor("button_outline_disable_color", new RGB(67, 67, 68)); - - setColor("button_normal_font_color", new RGB(255, 255, 255)); - setColor("button_push_font_color", new RGB(255, 255, 255)); - setColor("button_hover_font_color", new RGB(255, 255, 255)); - setColor("button_disable_font_color", new RGB(0, 0, 0)); - - /** normal view layout colors start **/ - setColor("normal_view_layout_outer", new RGB(160, 160, 160)); //$NON-NLS-1$ - setColor("normal_view_layout_middle", new RGB(74, 74, 74)); //$NON-NLS-1$ - setColor("normal_view_layout_inner", new RGB(66, 66, 68)); //$NON-NLS-1$ - /** normal view layout colors end **/ - - /** current view colors start **/ - setColor("current_view_outline", new RGB(160, 160, 160)); //$NON-NLS-1$ - - setColor("current_view_table_title_bg", new RGB(59, 59, 60)); //$NON-NLS-1$ - setColor("current_view_table_title_text", new RGB(151, 230, 255)); //$NON-NLS-1$ - setColor("current_view_table_contents_bg", new RGB(84, 85, 86)); //$NON-NLS-1$ - setColor("current_view_table_contents_text", new RGB(216, 216, 216)); //$NON-NLS-1$ - setColor("current_view_table_line", new RGB(136, 137, 138)); //$NON-NLS-1$ - - setColor("current_view_cpu_text", new RGB(2, 171, 208)); //$NON-NLS-1$ - setColor("current_view_process_text", new RGB(114, 203, 8)); //$NON-NLS-1$ - setColor("current_view_graph_bg", new RGB(79, 79, 81)); //$NON-NLS-1$ - setColor("current_view_graph_outline", new RGB(43, 44, 45)); //$NON-NLS-1$ - setColor("current_view_snapshot_outline", new RGB(49, 104, 127)); //$NON-NLS-1$ - /** current view colors end **/ - - /** common table colors start **/ - setColor("table_header_bg", new RGB(59, 59, 60)); //$NON-NLS-1$ - setColor("table_line", new RGB(136, 137, 138)); //$NON-NLS-1$ - setColor("table_contents_normal", new RGB(84, 85, 86)); //$NON-NLS-1$ - setColor("table_contents_hover", new RGB(72, 98, 108)); //$NON-NLS-1$ - setColor("table_contents_selected_start", new RGB(0, 146, 193)); //$NON-NLS-1$ - setColor("table_contents_selected_end", new RGB(0, 60, 79)); //$NON-NLS-1$ - setColor("table_contents_selected_font_color", new RGB(255, 255, 255)); //$NON-NLS-1$ - setColor("table_title_font_color", new RGB(151, 230, 255)); //$NON-NLS-1$ - setColor("table_contents_font_color", new RGB(216, 216, 216)); //$NON-NLS-1$ - /** common table colors end **/ - - /** open trace popup colors **/ - setColor("open_trace_label_color", new RGB(255, 255, 255)); - setColor("open_trace_save_contents_color", new RGB(216, 216, 216)); - setColor("open_trace_temp_contents_color", new RGB(255, 85, 57)); - setColor("open_trace_table_outline_color", new RGB(123, 124, 124)); - - setColor("open_trace_table_content_normal_color1", new RGB(78, 78, 79)); - setColor("open_trace_table_content_hover_color1", new RGB(72, 98, 108)); - setColor("open_trace_table_content_selected_start_color1", new RGB(0, - 146, 193)); - setColor("open_trace_table_content_selected_end_color1", new RGB(0, 60, - 79)); - - setColor("open_trace_table_content_normal_color2", new RGB(84, 85, 86)); - setColor("open_trace_table_content_hover_color2", new RGB(72, 98, 108)); - setColor("open_trace_table_content_selected_start_color2", new RGB(0, - 146, 193)); - setColor("open_trace_table_content_selected_end_color2", new RGB(0, 60, - 79)); - - setColor("open_trace_button_composite_bg_color", new RGB(39, 39, 40)); - - setColor("open_trace_popup_contents_bg_color", new RGB(51, 52, 53)); //$NON-NLS-1$ - setColor("open_trace_popup_bottom_bg_color", new RGB(39, 39, 40)); //$NON-NLS-1$ - - setColor("open_trace_table_line1_normal", new RGB(78, 78, 79)); //$NON-NLS-1$ - setColor("open_trace_table_line1_hover", new RGB(72, 98, 108)); //$NON-NLS-1$ - setColor("open_trace_table_line_selected_start", new RGB(0, 146, 193)); //$NON-NLS-1$ - setColor("open_trace_table_line_selected_end", new RGB(0, 60, 79)); //$NON-NLS-1$ - - setColor("open_trace_table_line2_normal", new RGB(84, 85, 86)); //$NON-NLS-1$ - setColor("open_trace_table_line2_hover", new RGB(72, 98, 108)); //$NON-NLS-1$ - - setColor("open_trace_table2_font_color", new RGB(255, 85, 57)); //$NON-NLS-1$ - - /** tab widget colors **/ - setColor("tab_selected_color_start", new RGB(123, 123, 123)); - setColor("tab_selected_color_end", new RGB(78, 78, 80)); - setColor("tab_normal_color_start", new RGB(74, 74, 74)); - setColor("tab_normal_color_end", new RGB(50, 50, 50)); - setColor("tab_hover_color_start", new RGB(61, 67, 72)); - setColor("tab_hover_color_end", new RGB(65, 77, 85)); - setColor("tab_push_color_start", new RGB(35, 38, 41)); - setColor("tab_push_color_end", new RGB(37, 44, 49)); - - setColor("tab_outline_normal_color", new RGB(115, 115, 115)); - setColor("tab_outline_push_color", new RGB(115, 115, 115)); - setColor("tab_outline_hover_color", new RGB(115, 115, 115)); - setColor("tab_outline_selected_color", new RGB(160, 160, 160)); - - setColor("tab_selected_font_color", new RGB(255, 255, 255)); - setColor("tab_normal_font_color", new RGB(255, 255, 255)); - setColor("tab_hover_font_color", new RGB(255, 255, 255)); - setColor("tab_push_font_color", new RGB(255, 255, 255)); - - setColor("tab_bg_color_start", new RGB(32, 32, 33)); - setColor("tab_bg_color_end", new RGB(43, 43, 44)); - setColor("tab_bg_outline_color", new RGB(81, 82, 83)); - - /** Page chart colors **/ - setColor("page_chart_header_bg", new RGB(45, 45, 46)); //$NON-NLS-1$ - setColor("page_chart_selection_bg", new RGB(0, 151, 201)); //$NON-NLS-1$ - setColor("page_chart_parent_bg", new RGB(84, 85, 86)); //$NON-NLS-1$ - setColor("page_chart_child_bg", new RGB(59, 59, 60)); //$NON-NLS-1$ - setColor("page_open_start_run", new RGB(244, 252, 82)); //$NON-NLS-1$ - setColor("page_open_end_run", new RGB(235, 231, 56)); //$NON-NLS-1$ - setColor("page_open_start_stop", new RGB(255, 135, 82)); //$NON-NLS-1$ - setColor("page_open_end_stop", new RGB(232, 73, 73)); //$NON-NLS-1$ - setColor("page_closed_start", new RGB(168, 198, 71)); //$NON-NLS-1$ - setColor("page_closed_end", new RGB(130, 152, 54)); //$NON-NLS-1$ - setColor("page_use_start", new RGB(78, 176, 255)); //$NON-NLS-1$ - setColor("page_use_end", new RGB(44, 104, 153)); //$NON-NLS-1$ - - /** Thread chart colors **/ - setColor("thread_open_start_run", new RGB(244, 252, 82)); //$NON-NLS-1$ - setColor("thread_open_end_run", new RGB(235, 231, 56)); //$NON-NLS-1$ - setColor("thread_open_start_stop", new RGB(168, 198, 71)); //$NON-NLS-1$ - setColor("thread_open_end_stop", new RGB(130, 152, 54)); //$NON-NLS-1$ - setColor("thread_closed_start", new RGB(168, 198, 71)); //$NON-NLS-1$ - setColor("thread_closed_end", new RGB(130, 152, 54)); //$NON-NLS-1$ - setColor("thread_sleep_start", new RGB(215, 215, 215)); //$NON-NLS-1$ - setColor("thread_sleep_end", new RGB(157, 166, 168)); //$NON-NLS-1$ - - /** File chart colors **/ - setColor("file_closed_start", new RGB(168, 198, 71)); //$NON-NLS-1$ - setColor("file_closed_end", new RGB(130, 152, 54)); //$NON-NLS-1$ - setColor("file_used_start", new RGB(58, 138, 203)); //$NON-NLS-1$ - setColor("file_used_end", new RGB(44, 104, 153)); //$NON-NLS-1$ - setColor("file_open_start_run", new RGB(244, 252, 82)); //$NON-NLS-1$ - setColor("file_open_end_run", new RGB(235, 231, 56)); //$NON-NLS-1$ - setColor("file_open_start_stop", new RGB(255, 135, 82)); //$NON-NLS-1$ - setColor("file_open_end_stop", new RGB(232, 73, 73)); //$NON-NLS-1$ - setColor("file_failed_start", new RGB(226, 58, 242)); //$NON-NLS-1$ - setColor("file_failed_end", new RGB(164, 40, 176)); //$NON-NLS-1$ - setColor("file_read_start", new RGB(41, 162, 118)); //$NON-NLS-1$ - setColor("file_read_end", new RGB(6, 75, 44)); //$NON-NLS-1$ - setColor("file_write_start", new RGB(84, 71, 214)); //$NON-NLS-1$ - setColor("file_write_end", new RGB(18, 17, 105)); //$NON-NLS-1$ - setColor("file_other_start", new RGB(255, 222, 125)); //$NON-NLS-1$ - setColor("file_other_end", new RGB(255, 186, 29)); //$NON-NLS-1$ - - setColor("file_chart_selection_bg_start", new RGB(0, 151, 201)); //$NON-NLS-1$ - setColor("file_chart_selection_bg_end", new RGB(0, 151, 201)); //$NON-NLS-1$ - setColor("file_chart_parent_bg_start", new RGB(84, 85, 86)); //$NON-NLS-1$ - setColor("file_chart_parent_bg_end", new RGB(84, 85, 86)); //$NON-NLS-1$ - setColor("file_chart_child_bg_start", new RGB(59, 59, 60)); //$NON-NLS-1$ - setColor("file_chart_child_bg_end", new RGB(59, 59, 60)); //$NON-NLS-1$ - - setColor("file_chart_gradation_color", new RGB(137, 137, 137)); //$NON-NLS-1$) - - setColor("file_chart_selected_font_color", new RGB(255, 255, 255)); //$NON-NLS-1$ - setColor("file_chart_normal_font_color", new RGB(255, 255, 255)); //$NON-NLS-1$ - - setColor("unselected_tab_first", new RGB(51, 51, 51)); //$NON-NLS-1$ - setColor("unselected_tab_second", new RGB(42, 42, 42)); //$NON-NLS-1$ - setColor("selected_tab_first", new RGB(74, 74, 74)); //$NON-NLS-1$ - setColor("selected_tab_second", new RGB(128, 129, 130)); //$NON-NLS-1$ - - setColor("tooltip", new RGB(255, 255, 225)); //$NON-NLS-1$ - - setColor("barGRAY1", new RGB(177, 177, 177)); //$NON-NLS-1$ - setColor("barGRAY2", new RGB(153, 153, 153)); //$NON-NLS-1$ - setColor("barGRAY3", new RGB(216, 216, 216)); //$NON-NLS-1$ - - /* Timeline */ - setColor("item blue right", new RGB(131, 196, 218));//$NON-NLS-1$ - setColor("item blue dark", new RGB(38, 104, 138));//$NON-NLS-1$ - setColor("item background", new RGB(50, 50, 50));//$NON-NLS-1$ - - setColor("timeline_bg", new RGB(50, 50, 50)); //$NON-NLS-1$ - setColor("timeline_bg", new RGB(50, 50, 50)); //$NON-NLS-1$ - - setColor("snapshot_chart_bg", new RGB(50, 50, 50)); //$NON-NLS-1$ - - setColor("GRAY_130", new RGB(130, 130, 130)); //$NON-NLS-1$ - setColor("GRAY_170", new RGB(170, 170, 170)); //$NON-NLS-1$ - setColor("GRAY_210", new RGB(210, 210, 210)); //$NON-NLS-1$ - - setColor("defaultForeground", new RGB(0, 0, 0)); //$NON-NLS-1$ - setColor("defaultBackground", new RGB(255, 255, 255)); //$NON-NLS-1$ - setColor("defaultRed", new RGB(173, 13, 1)); //$NON-NLS-1$ - - // bar graph - setColor("cpu_bar_graph_color", new RGB(2, 171, 208)); //$NON-NLS-1$ - setColor("cpu_bar_graph_gray_color", new RGB(79, 79, 81)); - setColor("cpu_bar_graph_bg_color", new RGB(43, 44, 45)); - - setColor("process_bar_graph_color", new RGB(114, 203, 8)); //$NON-NLS-1$ - setColor("process_bar_graph_center_color", new RGB(43, 44, 45)); //$NON-NLS-1$ - setColor("process_bar_graph_bg_color", new RGB(79, 79, 81)); //$NON-NLS-1$ - - setColor("profiling_graph_color_start", new RGB(145, 190, 3)); //$NON-NLS-1$ - setColor("profiling_graph_color_end", new RGB(114, 149, 1)); //$NON-NLS-1$ - - setColor("profiling_graph_selection_color_start", new RGB(255, 135, 82)); //$NON-NLS-1$ - setColor("profiling_graph_selection_color_end", new RGB(232, 73, 73)); //$NON-NLS-1$ - - // Add Chart - setColor("add_chart_enable_color_start", new RGB(131, 196, 218)); //$NON-NLS-1$ - setColor("add_chart_enable_color_end", new RGB(38, 104, 138)); //$NON-NLS-1$ - setColor("add_chart_disable_color_start", new RGB(123, 124, 124)); //$NON-NLS-1$ - setColor("add_chart_disable_color_end", new RGB(244, 244, 244)); //$NON-NLS-1$ - - /** Timeline chart **/ - setColor("seriesColorCPUSystem", new RGB(212, 150, 57)); //$NON-NLS-1$ - setColor("seriesColorCPUApp", new RGB(1, 102, 134)); //$NON-NLS-1$ - - setColor("seriesColorCPUCoreCore0", new RGB(72, 185, 221)); //$NON-NLS-1$ - setColor("seriesColorCPUCoreCore1", new RGB(129, 172, 50)); //$NON-NLS-1$ - setColor("seriesColorCPUCoreCore2", new RGB(226, 109, 201)); //$NON-NLS-1$ - setColor("seriesColorCPUCoreCore3", new RGB(72, 194, 168)); //$NON-NLS-1$ - - setColor("seriesColorCPUFreq", new RGB(72, 185, 221)); //$NON-NLS-1$ - - setColor("seriesColorHeapSystem", new RGB(1, 102, 134)); //$NON-NLS-1$ - setColor("seriesColorHeapApp", new RGB(72, 185, 221)); //$NON-NLS-1$ - - setColor("seriesColorProcessVSS", new RGB(1, 102, 134)); //$NON-NLS-1$ - setColor("seriesColorProcessRSS", new RGB(111, 148, 43)); //$NON-NLS-1$ - setColor("seriesColorProcessPSS", new RGB(201, 168, 58)); //$NON-NLS-1$ - - setColor("seriesColorMemorySysMax", new RGB(105, 2, 126)); //$NON-NLS-1$ - setColor("seriesColorMemorySysUsed", new RGB(1, 102, 134)); //$NON-NLS-1$ - setColor("seriesColorMemoryAppUsed", new RGB(111, 148, 43)); //$NON-NLS-1$ - - setColor("seriesColorFileRead", new RGB(126, 41, 2)); //$NON-NLS-1$ - setColor("seriesColorFileWrite", new RGB(27, 110, 92)); //$NON-NLS-1$ - setColor("seriesColorFileFD", new RGB(129, 172, 50)); //$NON-NLS-1$ - - setColor("seriesColorUIEventKey", new RGB(200, 0, 0)); //$NON-NLS-1$ - setColor("seriesColorUIEventTouch", new RGB(200, 0, 0)); //$NON-NLS-1$ - setColor("seriesColorUIEventGesture", new RGB(200, 0, 0)); //$NON-NLS-1$ - setColor("seriesColorUIEventOrientation", new RGB(200, 0, 0)); //$NON-NLS-1$ - setColor("seriesColorUIEventFramework", new RGB(200, 0, 0)); //$NON-NLS-1$ - - setColor("selectionRange", new RGB(193, 253, 255)); //$NON-NLS-1$ - setColor("selectionLine", new RGB(193, 253, 255)); //$NON-NLS-1$ - - setColor("UIEventChartSeperateLine", new RGB(189, 207, 213)); //$NON-NLS-1$ - - /*** scale ***/ - setColor("scale_outline_color", new RGB(31, 31, 31)); //$NON-NLS-1$ - setColor("scale_bg_color_start", new RGB(177, 177, 177)); //$NON-NLS-1$ - setColor("scale_bg_color_end", new RGB(99, 99, 99)); //$NON-NLS-1$ - setColor("scale_area_color", new RGB(46, 46, 47)); //$NON-NLS-1$ - setColor("scale_area_outline_color", new RGB(208, 208, 208)); //$NON-NLS-1$ - - /*** stop progress dialog ***/ - setColor("stop_progress_line1_color", new RGB(2, 171, 208)); //$NON-NLS-1$ - setColor("stop_progress_line2_color", new RGB(86, 86, 86)); //$NON-NLS-1$ - setColor("stop_progress_background_color", new RGB(66, 66, 68)); //$NON-NLS-1$ - setColor("stop_progress_info_font_color", new RGB(185, 185, 185)); //$NON-NLS-1$ - - /*** thread graph ***/ - setColor("thread_graph_cpu_load_color", new RGB(0, 123, 169)); //$NON-NLS-1$ - setColor("thread_graph_callee_color", new RGB(100, 21, 232)); //$NON-NLS-1$ - setColor("thread_graph_lock_new_color", new RGB(129, 169, 0)); //$NON-NLS-1$ - setColor("thread_graph_lock_wait_color", new RGB(96, 126, 131)); //$NON-NLS-1$ - setColor("thread_graph_lock_acquire_color", new RGB(227, 123, 30)); //$NON-NLS-1$ - setColor("thread_graph_lock_release_color", new RGB(255, 255, 255)); //$NON-NLS-1$ - } - - public Color getColor(String colorName, RGB rgb) { - if (!colorRegistry.hasValueFor(colorName)) { - colorRegistry.put(colorName, rgb); - } - return colorRegistry.get(colorName); - } - - public void setColor(String colorName, RGB rgb) { - colorRegistry.put(colorName, rgb); - } - - @Override - public Color getColor(String colorName) { - return colorRegistry.get(colorName); - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/theme/DAThemeWhite.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/theme/DAThemeWhite.java deleted file mode 100644 index 8b35f2d..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/theme/DAThemeWhite.java +++ /dev/null @@ -1,439 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.theme; - -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.RGB; - -public class DAThemeWhite extends DATheme { - private static DAThemeWhite instance; - - public static DAThemeWhite getInstance() { - if (instance == null) { - instance = new DAThemeWhite(); - } - return instance; - } - - DAThemeWhite() { - super(); - name = "white"; - - // defaule - setColor("blue", new RGB(0, 102, 134)); - setColor("green", new RGB(68, 98, 12)); - setColor("yellow", new RGB(255, 210, 10)); - setColor("purple", new RGB(139, 42, 118)); - setColor("brown", new RGB(138, 83, 0)); - setColor("navy", new RGB(57, 66, 161)); - setColor("darkviolet", new RGB(105, 2, 126)); - setColor("maroon", new RGB(126, 41, 2)); - setColor("teal", new RGB(27, 110, 92)); - setColor("indigo", new RGB(80, 26, 146)); - setColor("goldenrod", new RGB(212, 150, 57)); - setColor("turquoise", new RGB(72, 194, 168)); - setColor("violet", new RGB(226, 109, 201)); - setColor("slateblue", new RGB(122, 132, 238)); - setColor("orange", new RGB(236, 107, 47)); - setColor("yellowgreen", new RGB(129, 172, 50)); - setColor("skyblue", new RGB(72, 185, 221)); - setColor("orchid", new RGB(175, 49, 200)); - setColor("sandybrown", new RGB(201, 168, 58)); - setColor("mediumpurple", new RGB(160, 108, 224)); - setColor("chocolate", new RGB(151, 124, 39)); - setColor("magneta", new RGB(155, 20, 184)); - - // shell window background color - setColor("window_bg_color", new RGB(160, 160, 160)); //$NON-NLS-1$ - setColor("dialg_bg_upper", new RGB(206, 206, 206)); - setColor("dialg_bg_lower", new RGB(240, 240, 240)); - setColor("dialg_sunken_1", new RGB(160, 160, 160)); - setColor("dialg_sunken_2", new RGB(255, 255, 255)); - setColor("edit_chart_dialog_upper", new RGB(255, 255, 255)); - setColor("edit_chart_dialog_lower", new RGB(240, 240, 240)); - - setColor("view_border", new RGB(206, 206, 206)); //$NON-NLS-1$ - setColor("view_bg_color", new RGB(230, 230, 230)); //$NON-NLS-1$ - getColor("view_title_font_color", new RGB(0, 0, 0)); - - setColor("coolbar_bg_color", new RGB(228, 228, 228)); //$NON-NLS-1$ - setColor("default_font_color", new RGB(0, 0, 0));//$NON-NLS-1$ - - /** title bar colors **/ - setColor("titlebar_text_color", new RGB(64, 208, 255)); //$NON-NLS-1$ - setColor("titlebar_bg", new RGB(78, 79, 81)); //$NON-NLS-1$ - setColor("titlebar_start_color", new RGB(240, 240, 240)); //$NON-NLS-1$ - setColor("titlebar_end_color", new RGB(165, 165, 165)); //$NON-NLS-1$ - setColor("titlebar_bottom_stroke_1", new RGB(115, 115, 115)); - setColor("titlebar_bottom_stroke_2", new RGB(160, 160, 160)); - - - /** device and application combo specific colors start **/ - setColor("device_application_enable_font", new RGB(0, 0, 0)); //$NON-NLS-1$ - setColor("device_application_disable_font", new RGB(160, 160, 160)); //$NON-NLS-1$ - setColor("device_application_popup_outer_1", new RGB(120, 120, 120)); //$NON-NLS-1$ - setColor("device_application_popup_outer_2", new RGB(50, 185, 231)); //$NON-NLS-1$ - setColor("device_application_item_normal_top", new RGB(255, 255, 255)); //$NON-NLS-1$ - setColor("device_application_item_normal_inner", new RGB(230, 230, 230)); //$NON-NLS-1$ - setColor( - "device_application_item_normal_bottom", new RGB(189, 189, 189)); //$NON-NLS-1$ - setColor("device_application_item_select_top", new RGB(255, 255, 255)); //$NON-NLS-1$ - setColor("device_application_item_select_inner", new RGB(50, 185, 231)); //$NON-NLS-1$ - setColor( - "device_application_item_select_bottom", new RGB(189, 189, 189)); //$NON-NLS-1$ - /** device and application combo specific colors end **/ - - /*** combo button gradation ***/ - setColor( - "device_application_button_normal_start", new RGB(221, 221, 221)); //$NON-NLS-1$ - setColor("device_application_button_normal_end", new RGB(157, 157, 157)); //$NON-NLS-1$ - setColor("device_application_button_push_start", new RGB(24, 147, 189)); //$NON-NLS-1$ - setColor("device_application_button_push_end", new RGB(24, 147, 189)); //$NON-NLS-1$ - setColor("device_application_button_hover_start", new RGB(50, 185, 231)); //$NON-NLS-1$ - setColor("device_application_button_hover_end", new RGB(50, 185, 231)); //$NON-NLS-1$ - setColor( - "device_application_button_disable_start", new RGB(157, 157, 157)); //$NON-NLS-1$ - setColor("device_application_button_disable_end", new RGB(78, 79, 81)); //$NON-NLS-1$ - setColor("device_application_button_outline", new RGB(31, 31, 31)); - - /*** common button colors ***/ - setColor("button_normal_color_start", new RGB(240, 240, 240)); - setColor("button_normal_color_end", new RGB(163, 163, 163)); - setColor("button_push_color_start", new RGB(163, 163, 163)); - setColor("button_push_color_end", new RGB(240, 240, 240)); - setColor("button_hover_color_start", new RGB(240, 240, 240)); - setColor("button_hover_color_end", new RGB(163, 163, 163)); - setColor("button_disable_color_start", new RGB(206, 206, 206)); - setColor("button_disable_color_end", new RGB(163, 163, 163)); - - setColor("button_outline_normal_in_color", new RGB(120, 120, 120)); - setColor("button_outline_push_in_color", new RGB(120, 120, 120)); - setColor("button_outline_hover_in_color", new RGB(120, 120, 120)); - setColor("button_outline_disable_in_color", new RGB(115, 115, 115)); - - setColor("button_outline_normal_color", new RGB(203, 230, 230)); - setColor("button_outline_push_color", new RGB(203, 203, 203)); - setColor("button_outline_hover_color", new RGB(50, 185, 231)); - setColor("button_outline_disable_color", new RGB(115, 115, 115)); - - setColor("button_normal_font_color", new RGB(0, 0, 0)); - setColor("button_push_font_color", new RGB(91, 91, 91)); - setColor("button_hover_font_color", new RGB(91, 91, 91)); - setColor("button_disable_font_color", new RGB(91, 91, 91)); - - /** normal view layout colors start **/ - setColor("normal_view_layout_outer", new RGB(160, 160, 160)); //$NON-NLS-1$ - setColor("normal_view_layout_middle", new RGB(74, 74, 74)); //$NON-NLS-1$ - setColor("normal_view_layout_inner", new RGB(66, 66, 68)); //$NON-NLS-1$ - /** normal view layout colors end **/ - - /** current view colors start **/ - setColor("current_view_outline", new RGB(160, 160, 160)); //$NON-NLS-1$ - - setColor("current_view_table_title_bg", new RGB(59, 59, 60)); //$NON-NLS-1$ - setColor("current_view_table_title_text", new RGB(151, 230, 255)); //$NON-NLS-1$ - setColor("current_view_table_contents_bg", new RGB(84, 85, 86)); //$NON-NLS-1$ - setColor("current_view_table_contents_text", new RGB(216, 216, 216)); //$NON-NLS-1$ - setColor("current_view_table_line", new RGB(136, 137, 138)); //$NON-NLS-1$ - - setColor("current_view_cpu_text", new RGB(2, 171, 208)); //$NON-NLS-1$ - setColor("current_view_process_text", new RGB(114, 203, 8)); //$NON-NLS-1$ - setColor("current_view_graph_bg", new RGB(79, 79, 81)); //$NON-NLS-1$ - setColor("current_view_graph_outline", new RGB(43, 44, 45)); //$NON-NLS-1$ - setColor("current_view_snapshot_outline", new RGB(49, 104, 127)); //$NON-NLS-1$ - /** current view colors end **/ - - /** common table colors start **/ - setColor("table_header_bg", new RGB(247, 247, 247)); //$NON-NLS-1$ - setColor("table_line", new RGB(186, 186, 186)); //$NON-NLS-1$ - setColor("table_contents_normal", new RGB(255, 255, 255)); //$NON-NLS-1$ - setColor("table_contents_hover", new RGB(236, 235, 248)); //$NON-NLS-1$ - setColor("table_contents_selected_start", new RGB(0, 146, 193)); //$NON-NLS-1$ - setColor("table_contents_selected_end", new RGB(0, 60, 79)); //$NON-NLS-1$ - setColor("table_contents_selected_font_color", new RGB(216, 216, 216)); //$NON-NLS-1$ - setColor("table_title_font_color", new RGB(0, 45, 96)); //$NON-NLS-1$ - setColor("table_contents_font_color", new RGB(70, 70, 70)); //$NON-NLS-1$ - /** common table colors end **/ - - /** open trace popup colors **/ - setColor("open_trace_label_color", new RGB(0, 0, 0)); - setColor("open_trace_save_contents_color", new RGB(70, 70, 70)); - setColor("open_trace_temp_contents_color", new RGB(255, 87, 57)); - setColor("open_trace_table_outline_color", new RGB(186, 186, 186)); - - setColor("open_trace_table_content_normal_color1", new RGB(255, 255, - 255)); - setColor("open_trace_table_content_hover_color1", - new RGB(236, 235, 248)); - setColor("open_trace_table_content_selected_start_color1", new RGB(227, - 248, 255)); - setColor("open_trace_table_content_selected_end_color1", new RGB(162, - 231, 255)); - - setColor("open_trace_table_content_normal_color2", new RGB(234, 234, - 234)); - setColor("open_trace_table_content_hover_color2", - new RGB(236, 236, 236)); - setColor("open_trace_table_content_selected_start_color2", new RGB(227, - 248, 255)); - setColor("open_trace_table_content_selected_end_color2", new RGB(162, - 231, 255)); - - setColor("open_trace_button_composite_bg_color", new RGB(240, 240, 240)); - - setColor("open_trace_popup_contents_bg_color", new RGB(51, 52, 53)); //$NON-NLS-1$ - setColor("open_trace_popup_bottom_bg_color", new RGB(39, 39, 40)); //$NON-NLS-1$ - - setColor("open_trace_table_line1_normal", new RGB(78, 78, 79)); //$NON-NLS-1$ - setColor("open_trace_table_line1_hover", new RGB(72, 98, 108)); //$NON-NLS-1$ - setColor("open_trace_table_line_selected_start", new RGB(0, 146, 193)); //$NON-NLS-1$ - setColor("open_trace_table_line_selected_end", new RGB(0, 60, 79)); //$NON-NLS-1$ - - setColor("open_trace_table_line2_normal", new RGB(84, 85, 86)); //$NON-NLS-1$ - setColor("open_trace_table_line2_hover", new RGB(72, 98, 108)); //$NON-NLS-1$ - - setColor("open_trace_table2_font_color", new RGB(255, 85, 57)); //$NON-NLS-1$ - - /** tab widget colors **/ - setColor("tab_selected_color_start", new RGB(255, 255, 255)); - setColor("tab_selected_color_end", new RGB(178, 178, 178)); - setColor("tab_normal_color_start", new RGB(206, 206, 206)); - setColor("tab_normal_color_end", new RGB(163, 163, 163)); - setColor("tab_hover_color_start", new RGB(206, 206, 206)); - setColor("tab_hover_color_end", new RGB(163, 163, 163)); - setColor("tab_push_color_start", new RGB(163, 163, 163)); - setColor("tab_push_color_end", new RGB(206, 206, 206)); - - setColor("tab_outline_normal_color", new RGB(115, 115, 115)); - setColor("tab_outline_push_color", new RGB(10, 113, 178)); - setColor("tab_outline_hover_color", new RGB(10, 113, 178)); - setColor("tab_outline_selected_color", new RGB(160, 160, 160)); - - setColor("tab_selected_font_color", new RGB(0, 0, 0)); - setColor("tab_normal_font_color", new RGB(91, 91, 91)); - setColor("tab_hover_font_color", new RGB(91, 91, 91)); - setColor("tab_push_font_color", new RGB(91, 91, 91)); - - setColor("tab_bg_color_start", new RGB(205, 205, 205)); - setColor("tab_bg_color_end", new RGB(216, 216, 216)); - setColor("tab_bg_outline_color", new RGB(160, 160, 160)); - - /** Page chart colors **/ - setColor("page_chart_header_bg", new RGB(45, 45, 46)); //$NON-NLS-1$ - setColor("page_chart_selection_bg", new RGB(0, 151, 201)); //$NON-NLS-1$ - setColor("page_chart_parent_bg", new RGB(84, 85, 86)); //$NON-NLS-1$ - setColor("page_chart_child_bg", new RGB(59, 59, 60)); //$NON-NLS-1$ - setColor("page_open_start_run", new RGB(244, 252, 82)); //$NON-NLS-1$ - setColor("page_open_end_run", new RGB(235, 231, 56)); //$NON-NLS-1$ - setColor("page_open_start_stop", new RGB(255, 135, 82)); //$NON-NLS-1$ - setColor("page_open_end_stop", new RGB(232, 73, 73)); //$NON-NLS-1$ - setColor("page_closed_start", new RGB(168, 198, 71)); //$NON-NLS-1$ - setColor("page_closed_end", new RGB(130, 152, 54)); //$NON-NLS-1$ - setColor("page_use_start", new RGB(78,176,255)); //$NON-NLS-1$ - setColor("page_use_end", new RGB(44,104,153)); //$NON-NLS-1$ - - /** Thread chart colors **/ - setColor("thread_open_start_run", new RGB(244, 252, 82)); //$NON-NLS-1$ - setColor("thread_open_end_run", new RGB(235, 231, 56)); //$NON-NLS-1$ - setColor("thread_open_start_stop", new RGB(168, 198, 71)); //$NON-NLS-1$ - setColor("thread_open_end_stop", new RGB(130, 152, 54)); //$NON-NLS-1$ - setColor("thread_closed_start", new RGB(168, 198, 71)); //$NON-NLS-1$ - setColor("thread_closed_end", new RGB(130, 152, 54)); //$NON-NLS-1$ - setColor("thread_sleep_start", new RGB(215, 215, 215)); //$NON-NLS-1$ - setColor("thread_sleep_end", new RGB(157, 166, 168)); //$NON-NLS-1$ - - /** File chart colors **/ - setColor("file_closed_start", new RGB(168, 198, 71)); //$NON-NLS-1$ - setColor("file_closed_end", new RGB(130, 152, 54)); //$NON-NLS-1$ - setColor("file_used_start", new RGB(58, 138, 203)); //$NON-NLS-1$ - setColor("file_used_end", new RGB(44, 104, 153)); //$NON-NLS-1$ - setColor("file_open_start_run", new RGB(244, 252, 82)); //$NON-NLS-1$ - setColor("file_open_end_run", new RGB(235, 231, 56)); //$NON-NLS-1$ - setColor("file_open_start_stop", new RGB(255, 135, 82)); //$NON-NLS-1$ - setColor("file_open_end_stop", new RGB(232, 73, 73)); //$NON-NLS-1$ - setColor("file_failed_start", new RGB(226, 58, 242)); //$NON-NLS-1$ - setColor("file_failed_end", new RGB(164, 40, 176)); //$NON-NLS-1$ - setColor("file_read_start", new RGB(41,162,118)); //$NON-NLS-1$ - setColor("file_read_end", new RGB(6,75,44)); //$NON-NLS-1$ - setColor("file_write_start", new RGB(84,71,214)); //$NON-NLS-1$ - setColor("file_write_end", new RGB(18,17,105)); //$NON-NLS-1$ - setColor("file_other_start", new RGB(255,222,125)); //$NON-NLS-1$ - setColor("file_other_end", new RGB(255,186,29)); //$NON-NLS-1$ - setColor("file_chart_selection_bg_start", new RGB(227, 248, 255)); //$NON-NLS-1$ - setColor("file_chart_selection_bg_end", new RGB(162, 231, 255)); //$NON-NLS-1$ - setColor("file_chart_parent_bg_start", new RGB(255, 255, 255)); //$NON-NLS-1$ - setColor("file_chart_parent_bg_end", new RGB(236, 235, 248)); //$NON-NLS-1$ - setColor("file_chart_child_bg_start", new RGB(234, 234, 234)); //$NON-NLS-1$ - setColor("file_chart_child_bg_end", new RGB(236, 235, 248)); //$NON-NLS-1$ - - setColor("file_chart_gradation_color", new RGB(159, 159, 159)); //$NON-NLS-1$) - - setColor("file_chart_selected_font_color", new RGB(70, 70, 70)); //$NON-NLS-1$ - setColor("file_chart_normal_font_color", new RGB(70, 70, 70)); //$NON-NLS-1$ - - setColor("unselected_tab_first", new RGB(51, 51, 51)); //$NON-NLS-1$ - setColor("unselected_tab_second", new RGB(42, 42, 42)); //$NON-NLS-1$ - setColor("selected_tab_first", new RGB(74, 74, 74)); //$NON-NLS-1$ - setColor("selected_tab_second", new RGB(128, 129, 130)); //$NON-NLS-1$ - - setColor("tooltip", new RGB(255, 255, 225)); //$NON-NLS-1$ - - setColor("barGRAY1", new RGB(177, 177, 177)); //$NON-NLS-1$ - setColor("barGRAY2", new RGB(153, 153, 153)); //$NON-NLS-1$ - setColor("barGRAY3", new RGB(216, 216, 216)); //$NON-NLS-1$ - - /* Timeline */ - setColor("item blue right", new RGB(131, 196, 218));//$NON-NLS-1$ - setColor("item blue dark", new RGB(38, 104, 138));//$NON-NLS-1$ - setColor("item background", new RGB(50, 50, 50));//$NON-NLS-1$ - setColor("item_bg_top", new RGB(215, 215, 215)); //$NON-NLS-1$ - setColor("item_bg_bottom", new RGB(157, 166, 168)); //$NON-NLS-1$ - - setColor("snapshot_chart_bg", new RGB(50, 50, 50)); //$NON-NLS-1$ - - setColor("GRAY_130", new RGB(130, 130, 130)); //$NON-NLS-1$ - setColor("GRAY_170", new RGB(170, 170, 170)); //$NON-NLS-1$ - setColor("GRAY_210", new RGB(210, 210, 210)); //$NON-NLS-1$ - - setColor("defaultForeground", new RGB(0, 0, 0)); //$NON-NLS-1$ - setColor("defaultBackground", new RGB(255, 255, 255)); //$NON-NLS-1$ - setColor("defaultRed", new RGB(173, 13, 1)); //$NON-NLS-1$ - setColor("time_tick_bg", new RGB(247, 247, 247)); //$NON-NLS-1$ - setColor("time_tick_line", new RGB(159, 159, 159)); //$NON-NLS-1$ - - setColor("lifecycle_initializing_top", new RGB(123, 182, 240)); //$NON-NLS-1$ - setColor("lifecycle_initializing_bottom", new RGB(65, 141, 218)); //$NON-NLS-1$ - setColor("lifecycle_running_top", new RGB(194, 238, 131)); //$NON-NLS-1$ - setColor("lifecycle_running_bottom", new RGB(143, 198, 63)); //$NON-NLS-1$ - setColor("lifecycle_pausing_top", new RGB(170, 170, 170)); //$NON-NLS-1$ - setColor("lifecycle_pausing_bottom", new RGB(113, 113, 113)); //$NON-NLS-1$ - setColor("lifecycle_terminating_top", new RGB(223, 143, 140)); //$NON-NLS-1$ - setColor("lifecycle_terminating_bottom", new RGB(198, 82, 77)); //$NON-NLS-1$ - - // bar graph - setColor("cpu_bar_graph_color", new RGB(0, 122, 167)); //$NON-NLS-1$ - setColor("cpu_bar_graph_gray_color", new RGB(222, 222, 222)); - setColor("cpu_bar_graph_bg_color", new RGB(255, 255, 255)); - - setColor("process_bar_graph_color", new RGB(119, 163, 0)); //$NON-NLS-1$ - setColor("process_bar_graph_center_color", new RGB(255, 255, 255)); //$NON-NLS-1$ - setColor("process_bar_graph_bg_color", new RGB(193, 193, 193)); //$NON-NLS-1$ - - setColor("profiling_graph_color_start", new RGB(145, 190, 3)); //$NON-NLS-1$ - setColor("profiling_graph_color_end", new RGB(114, 149, 1)); //$NON-NLS-1$ - - setColor("profiling_graph_selection_color_start", new RGB(255, 135, 82)); //$NON-NLS-1$ - setColor("profiling_graph_selection_color_end", new RGB(232, 73, 73)); //$NON-NLS-1$ - - // Add Chart - setColor("add_chart_enable_color_start", new RGB(166, 232, 255)); //$NON-NLS-1$ - setColor("add_chart_enable_color_end", new RGB(50, 185, 231)); //$NON-NLS-1$ - setColor("add_chart_disable_color_start", new RGB(225, 225, 225)); //$NON-NLS-1$ - setColor("add_chart_disable_color_end", new RGB(225, 225, 225)); //$NON-NLS-1$ - - /** Timeline chart **/ - setColor("seriesColorCPUSystem", new RGB(111, 151, 39)); //$NON-NLS-1$ - setColor("seriesColorCPUApp", new RGB(72, 185, 221)); //$NON-NLS-1$ - - setColor("seriesColorCPUCoreCore0", new RGB(17, 105, 192)); //$NON-NLS-1$ - setColor("seriesColorCPUCoreCore1", new RGB(111, 151, 39)); //$NON-NLS-1$ - setColor("seriesColorCPUCoreCore2", new RGB(187, 60, 159)); //$NON-NLS-1$ - setColor("seriesColorCPUCoreCore3", new RGB(51, 160, 137)); //$NON-NLS-1$ - - setColor("seriesColorCPUFreq", new RGB(197, 124, 15)); //$NON-NLS-1$ - - setColor("seriesColorHeapSystem", new RGB(72, 185, 221)); //$NON-NLS-1$ - setColor("seriesColorHeapApp", new RGB(70, 82, 207)); //$NON-NLS-1$ - - setColor("seriesColorProcessVSS", new RGB(72, 185, 221)); //$NON-NLS-1$ - setColor("seriesColorProcessRSS", new RGB(111, 151, 39)); //$NON-NLS-1$ - setColor("seriesColorProcessPSS", new RGB(201, 168, 58)); //$NON-NLS-1$ - - setColor("seriesColorMemorySysMax", new RGB(72, 185, 221)); //$NON-NLS-1$ - setColor("seriesColorMemorySysUsed", new RGB(155, 20, 184)); //$NON-NLS-1$ - setColor("seriesColorMemoryAppUsed", new RGB(111, 151, 39)); //$NON-NLS-1$ - - setColor("seriesColorFileRead", new RGB(226, 109, 201)); //$NON-NLS-1$ - setColor("seriesColorFileWrite", new RGB(72, 185, 221)); //$NON-NLS-1$ - setColor("seriesColorFileFD", new RGB(111, 151, 39)); //$NON-NLS-1$ - - setColor("seriesColorUIEventKey", new RGB(122, 132, 238)); //$NON-NLS-1$ - setColor("seriesColorUIEventTouch", new RGB(129, 172, 50)); //$NON-NLS-1$ - setColor("seriesColorUIEventGesture", new RGB(236, 107, 47)); //$NON-NLS-1$ - setColor("seriesColorUIEventOrientation", new RGB(177, 202, 229)); //$NON-NLS-1$ - setColor("seriesColorUIEventFramework", new RGB(212, 150, 57)); //$NON-NLS-1$ - - setColor("selectionRange", new RGB(23, 98, 132)); //$NON-NLS-1$ - setColor("selectionLine", new RGB(23, 98, 132)); //$NON-NLS-1$ - - /*** scale ***/ - setColor("scale_outline_color", new RGB(150, 150, 150)); //$NON-NLS-1$ - setColor("scale_bg_color_start", new RGB(253, 253, 253)); //$NON-NLS-1$ - setColor("scale_bg_color_end", new RGB(186, 186, 186)); //$NON-NLS-1$ - setColor("scale_area_color", new RGB(103, 103, 103)); //$NON-NLS-1$ - setColor("scale_area_outline_color", new RGB(250, 250, 250)); //$NON-NLS-1$ - - /*** stop progress dialog ***/ - setColor("stop_progress_line1_color", new RGB(2, 171, 208)); //$NON-NLS-1$ - setColor("stop_progress_line2_color", new RGB(86, 86, 86)); //$NON-NLS-1$ - setColor("stop_progress_background_color", new RGB(230, 230, 230)); //$NON-NLS-1$ - setColor("stop_progress_info_font_color", new RGB(70, 70, 70)); //$NON-NLS-1$ - setColor("stop_progress_bar_start_color", new RGB(0, 181, 222)); //$NON-NLS-1$ - setColor("stop_progress_bar_end_color", new RGB(4, 108, 143)); //$NON-NLS-1$ - setColor("stop_progress_bar_bg_start_color", new RGB(204, 204, 204)); //$NON-NLS-1$ - setColor("stop_progress_bar_bg_end_color", new RGB(212, 212, 212)); //$NON-NLS-1$ - setColor("stop_progress_bar_outline_color", new RGB(150, 150, 150)); //$NON-NLS-1$ - - /*** thread graph ***/ - setColor("thread_graph_cpu_load_color", new RGB(0, 123, 169)); //$NON-NLS-1$ - setColor("thread_graph_callee_color", new RGB(100, 21, 232)); //$NON-NLS-1$ - setColor("thread_graph_lock_new_color", new RGB(129, 169, 0)); //$NON-NLS-1$ - setColor("thread_graph_lock_wait_color", new RGB(96, 126, 131)); //$NON-NLS-1$ - setColor("thread_graph_lock_acquire_color", new RGB(227, 123, 30)); //$NON-NLS-1$ - setColor("thread_graph_lock_release_color", new RGB(255, 255, 255)); //$NON-NLS-1$ - - setColor("snapshot_viewer_bg_color", new RGB(255, 255, 255)); //$NON-NLS-1$ - } - - public Color getColor(String colorName, RGB rgb) { - if (!colorRegistry.hasValueFor(colorName)) { - colorRegistry.put(colorName, rgb); - } - return colorRegistry.get(colorName); - } - - public void setColor(String colorName, RGB rgb) { - colorRegistry.put(colorName, rgb); - } - - @Override - public Color getColor(String colorName) { - return colorRegistry.get(colorName); - } - -} - diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/PageChartGraphEventSeriesInfo.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/PageChartGraphEventSeriesInfo.java deleted file mode 100644 index dcc583a..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/PageChartGraphEventSeriesInfo.java +++ /dev/null @@ -1,148 +0,0 @@ -package org.tizen.dynamicanalyzer.ui.basechart; - -import org.eclipse.swt.graphics.Color; -import org.tizen.dynamicanalyzer.resources.ColorResources; - -public class PageChartGraphEventSeriesInfo { - public static final int PAGECHART_GRAPHITEM_STYLE_NONE = 0; - public static final int PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_START = 1; - public static final int PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_USE = 2; - public static final int PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_END = 3; - public static final int PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_INTERNAL_START = 4; - public static final int PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_INTERNAL_END = 5; - public static final int PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_INTERNAL_USE = 6; - - private Color openRunForegroundColor; - private Color openRunBackgroundColor; - private Color openFinishForegroundColor; - private Color openFinishBackgroundColor; - private Color closeForegroundColor; - private Color closeBackgroundColor; - private Color useForegroundColor; - private Color useBackgroundColor; - private Color unknownColor = ColorResources.RED; - - public PageChartGraphEventSeriesInfo(Color startRunForeground, - Color startRunBackground, Color startFinishForeground, - Color startFinishBackground, Color useForeground, - Color useBackground, Color closeForeground, - Color closeBackground) { - openRunForegroundColor = startRunForeground; - openRunBackgroundColor = startRunBackground; - openFinishForegroundColor = startFinishForeground; - openFinishBackgroundColor = startFinishBackground; - closeForegroundColor = closeForeground; - closeBackgroundColor = closeBackground; - useForegroundColor = useForeground; - useBackgroundColor = useBackground; - } - - public PageChartGraphEventSeriesInfo() { - } - - public Color getOpenRunForegroundColor() { - if(null == openRunForegroundColor){ - openRunForegroundColor = ColorResources.PAGE_OPEN_START_RUN; - } - return openRunForegroundColor; - } - - public Color getOpenRunBackgroundColor() { - if(null == openRunBackgroundColor){ - openRunBackgroundColor = ColorResources.PAGE_OPEN_END_RUN; - } - return openRunBackgroundColor; - } - - public Color getOpenFinishForegroundColor() { - if(null == openFinishForegroundColor){ - openFinishForegroundColor = ColorResources.PAGE_OPEN_START_STOP; - } - return openFinishForegroundColor; - } - - public Color getOpenFinishBackgroundColor() { - if(null == openFinishBackgroundColor){ - openFinishBackgroundColor = ColorResources.PAGE_OPEN_END_STOP; - } - return openFinishBackgroundColor; - } - - public Color getCloseForegroundColor() { - if(null == closeForegroundColor){ - closeForegroundColor = ColorResources.PAGE_CLOSED_START; - } - return closeForegroundColor; - } - - public Color getCloseBackgroundColor() { - if(null == closeBackgroundColor){ - closeBackgroundColor = ColorResources.PAGE_CLOSED_END; - } - return closeBackgroundColor; - } - - public Color getUseForegroundColor() { - if(null == useForegroundColor){ - useForegroundColor = ColorResources.PAGE_USE_START; - } - return useForegroundColor; - } - - public Color getUseBackgroundColor() { - if(null == useBackgroundColor){ - useBackgroundColor = ColorResources.PAGE_USE_END; - } - return useBackgroundColor; - } - - public Color getForegroundColor(int style, boolean isClosed, boolean isFinished) { - Color ret; - switch (style) { - case PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_START: - if (true == isClosed){ - ret = getCloseForegroundColor(); - } - else{ - if (true == isFinished) { - ret = getOpenFinishForegroundColor(); - } else { - ret = getOpenRunForegroundColor(); - } - } - break; - case PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_USE: - ret = getUseForegroundColor(); - break; - default: - ret = unknownColor; - break; - } - return ret; - } - - public Color getBackgroundColor(int style, boolean isClosed, boolean isFinished) { - Color ret; - switch (style) { - case PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_START: - if (true == isClosed){ - ret = getCloseBackgroundColor(); - } - else{ - if (true == isFinished) { - ret = getOpenFinishBackgroundColor(); - } else { - ret = getOpenRunBackgroundColor(); - } - } - break; - case PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_USE: - ret = getUseBackgroundColor(); - break; - default: - ret = unknownColor; - break; - } - return ret; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/PageChartGraphSeries.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/PageChartGraphSeries.java deleted file mode 100644 index 50388db..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/PageChartGraphSeries.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.basechart; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.graphics.Color; -import org.tizen.dynamicanalyzer.resources.ColorResources; - -public class PageChartGraphSeries { - public static final int PAGECHART_GRAPHITEM_STATUS_NONE = 0; - public static final int PAGECHART_GRAPHITEM_STATUS_EVENT = 1; - public static final int PAGECHART_GRAPHITEM_STATUS_BAR = 2; - public static final int PAGECHART_GRAPHITEM_STATUS_LINE = 3; - public static final int PAGECHART_GRAPHITEM_STATUS_AREA = 4; - public static final int PAGECHART_GRAPHITEM_DEFAULT_BAR_WIDTH_TIME = 1000000; - // evnet added option - - private String name; - private int style; - private List seriesItems = new ArrayList(); - private Color eventColor = ColorResources.BLUE; // default - private long barWidthTime = PAGECHART_GRAPHITEM_DEFAULT_BAR_WIDTH_TIME; - private long seriesHeight = 0; - private PageChartGraphEventSeriesInfo eventSeriesInfo; - - public PageChartGraphSeries(int chartStyle, Color eventColor) { - this.eventColor = eventColor; - this.style = chartStyle; - } - - public PageChartGraphSeries(int chartStyle) { - this.setStyle(chartStyle); - } - - public Color getEventColor() { - return eventColor; - } - - public void setEventColor(Color eventColor) { - this.eventColor = eventColor; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getStyle() { - return style; - } - - public void setStyle(int style) { - this.style = style; - } - - public PageChartGraphSeriesItem get(int itemIndex) { - if (null != seriesItems && seriesItems.size() > itemIndex) { - return seriesItems.get(itemIndex); - } else { - return null; - } - } - - public int getSize() { - return seriesItems.size(); - } - - public int getInternalItemSize() { - int ret = 0; - for (int i = 0; i < seriesItems.size(); i++) { - if (seriesItems.get(i).getEvenItemStyle() == PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_INTERNAL_START - || seriesItems.get(i).getEvenItemStyle() == PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_INTERNAL_END - || seriesItems.get(i).getEvenItemStyle() == PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_INTERNAL_USE) { - ret++; - } - } - return ret; - } - - public List gets() { - return seriesItems; - } - - private void updateSeriesHeight(long height) { - if (seriesHeight < height) { - seriesHeight = height; - - } - } - - public void add(PageChartGraphSeriesItem item) { - seriesItems.add(item); - updateSeriesHeight(item.getY()); - } - - public void add(long x, long y) { - seriesItems.add(new PageChartGraphSeriesItem(x, y)); - } - - public void add(long x, long y, Color color) { - seriesItems.add(new PageChartGraphSeriesItem(x, y, color)); - } - - public void add(long x, long y, int itemStyle) { - seriesItems.add(new PageChartGraphSeriesItem(x, y, itemStyle)); - } - - public void add(long x, long y, Color color, int itemStyle) { - seriesItems.add(new PageChartGraphSeriesItem(x, y, color, itemStyle)); - } - - public void clear() { - seriesItems.clear(); - } - - public long getBarWidthTime() { - return barWidthTime; - } - - public void setDefaultBarWidthTime(long barWidthTime) { - this.barWidthTime = barWidthTime; - } - - public long getMinimumHeight() { - return seriesHeight; - } - - public void setMinimumHeight(long seriesHeight) { - updateSeriesHeight(seriesHeight); - } - - public PageChartGraphEventSeriesInfo getEventSeriesInfo() { - if (null == eventSeriesInfo) { - eventSeriesInfo = new PageChartGraphEventSeriesInfo(); - } - return eventSeriesInfo; - } - - public void setEventSeriesInfo(PageChartGraphEventSeriesInfo eventSeriesInfo) { - this.eventSeriesInfo = eventSeriesInfo; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/PageChartGraphSeriesItem.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/PageChartGraphSeriesItem.java deleted file mode 100644 index 227f9d9..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/PageChartGraphSeriesItem.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.basechart; - -import org.eclipse.swt.graphics.Color; - -public class PageChartGraphSeriesItem { - private long x = 0; - private long y = 0; - private long barWidthTime = -1; - private Color eventColor = null; - private int eventItemStyle = PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_NONE; - - public PageChartGraphSeriesItem(long x, long y) { - this.x = x; - this.y = y; - } - - public PageChartGraphSeriesItem(long x, long y, Color eventColor) { - this.x = x; - this.y = y; - this.eventColor = eventColor; - } - - // itemStyle : event series only - public PageChartGraphSeriesItem(long x, long y, int eventItemStyle) { - this(x, y); - this.eventItemStyle = eventItemStyle; - } - - public PageChartGraphSeriesItem(long x, long y, Color eventColor, - int itemStyle) { - this(x, y, eventColor); - this.eventItemStyle = itemStyle; - } - - public long getX() { - return x; - } - - public void setX(long x) { - this.x = x; - } - - public long getY() { - return y; - } - - public void setY(long y) { - this.y = y; - } - - public Color getEventColor() { - return eventColor; - } - - public void setEventColor(Color eventColor) { - this.eventColor = eventColor; - } - - public int getEvenItemStyle() { - return eventItemStyle; - } - - public void setEventItemStyle(int eventItemStyle) { - this.eventItemStyle = eventItemStyle; - } - - public long getBarWidthTime() { - return barWidthTime; - } - - public void setBarWidthTime(long barWidthTime) { - this.barWidthTime = barWidthTime; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/PageChartItem.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/PageChartItem.java deleted file mode 100644 index 3b169b9..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/PageChartItem.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.basechart; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.nebula.widgets.grid.GridItem; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Display; -import org.tizen.dynamicanalyzer.nl.DAPageChartLabels; -import org.tizen.dynamicanalyzer.ui.basechart.chart.DAPageChart; - -public class PageChartItem { - private String title; - private String key; - private DAPageChart chart = null; - private PageChartItem parent = null; - private GridItem gridItem = null; - - private List children = new ArrayList(); - private List seriesList = new ArrayList(); - - public PageChartItem(final DAPageChart chart, final String title) { - // super(chart, SWT.NONE); - // TODO Auto-generated constructor stub - this.chart = chart; - this.title = title; - this.key = title; - this.chart.addItem(this); - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - gridItem = new GridItem(chart.getInnerChart(), SWT.NONE); - gridItem.setText(title); - gridItem.setData(DAPageChartLabels.KEY_SERIES_SERIES_LIST, seriesList); - gridItem.setData(DAPageChartLabels.KEY_SERIES_CHILDREN, children); - } - }); - } - - public PageChartItem(DAPageChart chart, String title, - PageChartGraphSeries graphItem) { - this(chart, title); - // TODO Auto-generated constructor stub - seriesList.add(graphItem); - } - - public PageChartItem(final PageChartItem parent, final String title) { - // super(chart, SWT.NONE); - // TODO Auto-generated constructor stub - this.chart = parent.getChart(); - this.parent = parent; - parent.addChild(this); - this.title = title; - this.key = title; - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - gridItem = new GridItem(parent.getGridItem(), SWT.NONE); - gridItem.setText(title); - gridItem.setData(this); - } - }); - } - - public PageChartItem(PageChartItem parent, String title, - PageChartGraphSeries graphItem) { - this(parent, title); - - // TODO Auto-generated constructor stub - seriesList.add(graphItem); - } - - public String getTitle() { - return title; - } - - public void setTitle(final String title) { - this.title = title; - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - gridItem.setText(title); - } - }); - } - - public DAPageChart getChart() { - return chart; - } - - public void setChart(DAPageChart chart){ - this.chart = chart; - - for(int i=0; i < children.size(); i++){ - children.get(i).setChart(this.chart); - } - } - - public PageChartItem getParent() { - return parent; - } - - public void setParent(PageChartItem parent) { - this.parent = parent; - } - - public PageChartItem addChild(PageChartItem child) { - children.add(child); - child.setParent(this); - child.setChart(this.chart); - -// while (null != parent) { -// parent.addSeriesList(child.getSeriesList()); -// parent = parent.parent; -// } - // FIXME : redraw - // chart.printItems(); - chart.redraw(); - return this; - } - - public List getChildren() { - return children; - } - - public List getSeriesList() { - return seriesList; - } - - public void addSeries(PageChartGraphSeries series) { -// int i; -// for (i = seriesList.size(); i > 0; i--) { -// if (seriesList.get(i - 1).getX() <= item.getX()) -// break; -// } - seriesList.add(series); - -// PageChartItem parent = this.parent; -// while (null != parent) { -// parent.addSeries(item); -// parent = parent.parent; -// } - - // FIXME : redraw - // chart.printItems(); - chart.redraw(); - } - - public void addSeriesList(List items) { - for (int i = 0; i < items.size(); i++) { - addSeries(items.get(i)); - } - // FIXME : redraw - // chart.printItems(); - chart.redraw(); - } - - public GridItem getGridItem() { - return gridItem; - } - - public void setMinimumHeight(long minimumHeight){ - for(int i=0; i - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.basechart; - -import java.util.ArrayList; -import java.util.List; - -public class PageDataColumn { - public final static int COLUMN_ATTRIBUTE_NONE = 0; - public final static int COLUMN_ATTRIBUTE_STRING = 1; - public final static int COLUMN_ATTRIBUTE_INT = 2; - public final static int COLUMN_ATTRIBUTE_LONG = 3; - public final static int COLUMN_ATTRIBUTE_DOUBLE = 4; - public final static int COLUMN_ATTRIBUTE_TIME = 5; - private List Column = null; - private List ColumnAttribute = null; - private int ColumnCount = 0; - - public PageDataColumn(int ColumnCount, String Column[], Integer ColumnAttribute[]){ - if(null == this.Column) - this.Column = new ArrayList(); - - if(null == this.ColumnAttribute) - this.ColumnAttribute = new ArrayList(); - - this.ColumnCount = ColumnCount; - for(int i=0; i < this.ColumnCount; i++){ - if(Column.length > i) - SetColumnText(i,Column[i]); - else - SetColumnText(i,"Column"+i); //$NON-NLS-1$ - if(Column.length > i) - SetColumnAttribute(i,ColumnAttribute[i]); - else - SetColumnAttribute(i,COLUMN_ATTRIBUTE_NONE); - } - } - - public List GetColumnTexts(){ - return Column; - } - - public String GetColumnText(int Index){ - if(null != Column) - return Column.get(Index); - else - return null; - } - - public List GetColumnAttributes(){ - return ColumnAttribute; - } - - public int GetColumnAttribute(int Index){ - if(null != ColumnAttribute) - return ColumnAttribute.get(Index); - else - return COLUMN_ATTRIBUTE_NONE; - } - - public int GetColumnCount(){ - return ColumnCount; - } - - public void SetColumnText(int Index, String Text){ - if (Text == null) - return; - - Column.add(Index,Text); - } - - public void SetColumnAttribute(int Index, int Attribute){ - if (Attribute < COLUMN_ATTRIBUTE_NONE || Attribute > COLUMN_ATTRIBUTE_TIME) - return; - - ColumnAttribute.add(Index,Attribute); - } - - public void clear(){ - if(null != Column){ - Column.clear(); - Column = null; - } - if(null != ColumnAttribute){ - ColumnAttribute.clear(); - ColumnAttribute = null; - } - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/PageDataItem.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/PageDataItem.java deleted file mode 100644 index 2c69226..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/PageDataItem.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.basechart; - -import java.util.ArrayList; -import java.util.List; - -public class PageDataItem { - private List Item = null; - private PageDataColumn column = null; - private List log = null; - - public PageDataItem(){ - if(null == this.Item){ - this.Item = new ArrayList(); - } - } - - public PageDataItem(PageDataColumn column, List input){ - this(); - this.setLog(input); - this.column = column; - } - - public PageDataItem(PageDataColumn column, List input, String Item[]){ - this(column, input); - - for(int i=0; i < Item.length; i++){ - setText(i,Item[i]); - } - } - - public String getText(int Index){ - if(null != Item) - return Item.get(Index); - else - return null; - } - - public void setText(int Index, String Text){ -// if (Text == null) -// return; - - Item.add(Index,Text); - } - - public int getSize(){ - return Item.size(); - } - - public PageDataColumn getColumn(){ - return column; - } - - public List getLog() { - return log; - } - - public void setLog(List log) { - this.log = log; - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/PageDataManager.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/PageDataManager.java deleted file mode 100644 index 8b64aa3..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/PageDataManager.java +++ /dev/null @@ -1,368 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.basechart; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.graphics.Color; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.logparser.LogPackage; -import org.tizen.dynamicanalyzer.nl.CommonPageLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.ui.basechart.chart.DAPageChart; -import org.tizen.dynamicanalyzer.ui.summary.failed.FailedData; - -public abstract class PageDataManager { - protected List rows = new ArrayList(); - protected PageDataColumn column = registePageDataColumn(); - - // private List warning = null; - protected List failed = null; - protected DAPageChart pageChart = null; - - protected boolean useSecondKey = false; - protected int secondKeyIndex = 0; - - public static int PAGE_COLUMN_KEY = 0; - public static int PAGE_COLUMN_NUMBER = 1; - public static int PAGE_COLUMN_TIME = 2; - public static int PAGE_COLUMN_NAME = 3; - protected static int PAGE_COLUMN_PARAMETER = 4; - public static int PAGE_COLUMN_THREADID = 5; - public static int PAGE_COLUMN_RETURN = 6; - public static int PAGE_COLUMN_ERRNO = 7; - public static int PAGE_COLUMN_APITYPE = 8; - - public static final String SERIES_NAME_PAGE_DATA = CommonPageLabels.PAGE_CHART_SERIES_NAME; - private static Color DEFAULT_COLOR_OPEN = ColorResources.BLUE; - private static Color DEFAULT_COLOR_CLOSE = ColorResources.BLUE; - private static Color DEFAULT_COLOR_OTHER = ColorResources.BLUE; - - protected Color openEventColor = DEFAULT_COLOR_OPEN; - protected Color closeEventColor = DEFAULT_COLOR_CLOSE; - protected Color otherEventColor = DEFAULT_COLOR_OTHER; - - public void setOpenEventColor(Color color) { - openEventColor = color; - } - - public Color getOpenEventColor() { - return openEventColor; - } - - public void setCloseEventColor(Color color) { - closeEventColor = color; - } - - public Color getCloseEventColor() { - return closeEventColor; - } - - public void setOtherEventColor(Color color) { - otherEventColor = color; - } - - public Color getOtherEventColor() { - return otherEventColor; - } - - public void setPageChart(DAPageChart pageChart) { - this.pageChart = pageChart; - } - - public void SetPageChart(DAPageChart pageChart, int secondKeyIndex) { - this.pageChart = pageChart; - this.useSecondKey = true; - this.secondKeyIndex = secondKeyIndex; - } - - private void addErrorData(FailedData data) { - if (null == failed) - failed = new ArrayList(); - failed.add(data); - } - - // private void AddWarningData(WarningData data){ - // if(null == warning) - // warning = new ArrayList(); - // warning.add(data); - // } - - protected int addPageDataItem(PageDataItem data) { - rows.add(data); - return rows.size() - 1; - } - - private int findInsertIndex(PageDataItem data, int Index) { - int ret = rows.size() - 1; - switch (column.GetColumnAttribute(Index)) { - case PageDataColumn.COLUMN_ATTRIBUTE_INT: - int intVal = Integer.valueOf(data.getText(Index)); - for (int i = ret; i >= 0; i--) { - if (Integer.valueOf(rows.get(i).getText(Index)) < intVal) { - return i; - } - } - break; - case PageDataColumn.COLUMN_ATTRIBUTE_STRING: - String stringVal = data.getText(Index); - for (int i = ret; i >= 0; i--) { - if (rows.get(i).getText(Index).compareTo(stringVal) < 0) { - return i; - } - } - break; - case PageDataColumn.COLUMN_ATTRIBUTE_DOUBLE: - double doubleVal = Double.valueOf(data.getText(Index)); - for (int i = ret; i >= 0; i--) { - if (Double.valueOf(rows.get(i).getText(Index)) < doubleVal) { - return i; - } - } - break; - default: - break; - } - return ret; - } - - protected void addPageDataItemBySortIndex(PageDataItem data, int Index) { - int insertIndex; - if (null == rows) - rows = new ArrayList(); - for (int i = rows.size() - 1; i >= 0; i--) { - insertIndex = findInsertIndex(data, Index); - if (insertIndex >= 0 && insertIndex <= rows.size()) - rows.add(insertIndex, data); - } - } - - public void SetPageDataColumn(PageDataColumn column) { - this.column = column; - } - - protected int findChartItem(List items, String key) { // FIXME - if (null == items) - return -1; - int itemSize = items.size(); - for (int i = 0; i < itemSize; i++) { - PageChartItem item = items.get(i); - if (item.getKey().compareTo(key) == 0) - return i; - } - return -1; - } - - public void addPageChartItem(PageDataItem dataItem, int itemIndex) { - List items = pageChart.getItems(); - - int graphSeriesItemStyle = PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_NONE; - Color eventColor; - - if (dataItem.getText(PAGE_COLUMN_APITYPE).matches( - LogCenterConstants.FD_API_TYPE_OPEN)) { - graphSeriesItemStyle = PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_START; - eventColor = openEventColor; - } else if (dataItem.getText(PAGE_COLUMN_APITYPE).matches( - LogCenterConstants.FD_API_TYPE_CLOSE)) { - graphSeriesItemStyle = PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_END; - eventColor = closeEventColor; - } else { - graphSeriesItemStyle = PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_USE; - eventColor = otherEventColor; - } - - PageChartGraphSeriesItem seriesItem = new PageChartGraphSeriesItem( - Long.parseLong(dataItem.getText(PAGE_COLUMN_TIME)), itemIndex, - eventColor, graphSeriesItemStyle); - String itemName = dataItem.getText(PAGE_COLUMN_KEY); - int chartItemIndex = findChartItem(items, itemName); - PageChartItem findItem = null; - if (0 <= chartItemIndex) { - findItem = items.get(chartItemIndex); - } - PageChartGraphSeries firstItemSeries; - if (null != findItem) { - if (true == useSecondKey) { - String childItemName = dataItem.getText(secondKeyIndex); - List children = findItem.getChildren(); - int secondChartItemIndex = findChartItem(children, - childItemName); - PageChartItem secondFindItem = null; - if (0 <= secondChartItemIndex) { - secondFindItem = children.get(secondChartItemIndex); - } - PageChartGraphSeries secondItemseries = null; - if (secondFindItem != null) { - secondItemseries = secondFindItem.getSeriesList().get(0); - secondItemseries.add(seriesItem); - // return; - } else { - // FIXME : - // create new child item - secondItemseries = new PageChartGraphSeries( - PageChartGraphSeries.PAGECHART_GRAPHITEM_STATUS_EVENT); - secondItemseries.add(seriesItem); - // children.add(new PageChartItem(findItem, childItemName, - // secondItemseries)); - new PageChartItem(findItem, childItemName, secondItemseries); - // add series item to paret - } - } - firstItemSeries = findItem.getSeriesList().get(0); - firstItemSeries.add(seriesItem); - } else { - firstItemSeries = new PageChartGraphSeries( - PageChartGraphSeries.PAGECHART_GRAPHITEM_STATUS_EVENT); - firstItemSeries.add(seriesItem); - PageChartItem firstItem = new PageChartItem(pageChart, itemName, - firstItemSeries); - // pageChart.addItem(firstItem); - if (true == useSecondKey) { - String childItemName = dataItem.getText(secondKeyIndex); - PageChartGraphSeries secondItemseries = new PageChartGraphSeries( - PageChartGraphSeries.PAGECHART_GRAPHITEM_STATUS_EVENT); - secondItemseries.add(seriesItem); - new PageChartItem(firstItem, childItemName, secondItemseries); - } - } - - return; - } - - public void parsePageData(LogPackage logPack) { - List> inputs = getLogsFromLogPackage(logPack); - int size; - if (null == inputs || 0 == (size = inputs.size())) { - return; - } - - for (int i = 0; i < size; i++) { - List input = inputs.get(i); - - // error check - if (true == errorCheck(input)) { - FailedData ffd = new FailedData(input); - addErrorData(ffd); - continue; - } - - // add page data - PageDataItem item = makePageData(input); - int itemIndex = addPageDataItem(item); - - // add page chart data - if (null != pageChart) { - addPageChartItem(item, itemIndex); - } - } - } - - public void clear() { - if (null != rows) { - rows.clear(); - } - if (null != column) { - column.clear(); - } - // if(null != warning){ - // warning.clear(); - // } - if (null != failed) { - failed.clear(); - } - } - - // public void AddPageChartItem(PageDataItem item, int itemIndex){ - // //find key - // for(int i=0; i getColumnNames() { - if (null == column) { - return null; - } - List nameList = column.GetColumnTexts(); - nameList.remove(PAGE_COLUMN_KEY); - return nameList; - } - - public String[] getColumnNamesToArray() { - if (null == column) { - return null; - } - List nameList = column.GetColumnTexts(); - nameList.remove(PAGE_COLUMN_APITYPE); - nameList.remove(PAGE_COLUMN_KEY); - String[] names = nameList.toArray(new String[nameList.size()]); - - return names; - } - - public List getColumnTypes() { - if (null == column) { - return null; - } - List typeList = column.GetColumnAttributes(); - return typeList; - } - - public Integer[] getColumnTypesToArray() { - if (null == column) { - return null; - } - List typeList = column.GetColumnAttributes(); - Integer[] types = typeList.toArray(new Integer[typeList.size()]); - - return types; - } - - public PageDataItem getPageDataItem(int index) { - if (index < rows.size()) { - return rows.get(index); - } - return null; - } - - public abstract PageDataColumn registePageDataColumn(); - - public abstract List> getLogsFromLogPackage(LogPackage logPack); - - public abstract PageDataItem makePageData(List input); - - // public abstract PageChartDataItem MakePageChartData(PageDataItem); - // //FIXME - public abstract boolean errorCheck(List input); - // public abstract boolean WarningCheck(List input); -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/chart/DAPageChart.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/chart/DAPageChart.java deleted file mode 100644 index fd05f89..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/chart/DAPageChart.java +++ /dev/null @@ -1,426 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.basechart.chart; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.nebula.widgets.grid.Grid; -import org.eclipse.nebula.widgets.grid.GridColumn; -import org.eclipse.nebula.widgets.grid.internal.DefaultEmptyCellRenderer; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.ControlEvent; -import org.eclipse.swt.events.ControlListener; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.layout.FormAttachment; -import org.eclipse.swt.layout.FormData; -import org.eclipse.swt.layout.FormLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.ScrollBar; -import org.tizen.dynamicanalyzer.nl.DAPageChartLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.FontResources; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.ui.basechart.PageChartGraphSeries; -import org.tizen.dynamicanalyzer.ui.basechart.PageChartGraphSeriesItem; -import org.tizen.dynamicanalyzer.ui.basechart.PageChartItem; -import org.tizen.dynamicanalyzer.ui.widgets.DAScaleRenderer; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableEmptyColumnHeaderRenderer; -import org.tizen.dynamicanalyzer.widgets.scale.DAScale; -import org.tizen.dynamicanalyzer.widgets.scale.DAScaleSelectionListener; - -public class DAPageChart extends Composite { - - private List items = new ArrayList(); - protected Grid chart; -// protected Scale scale; - protected DAScale scale; - protected Composite scrollComp; - protected ScrollBar scroll; - public final static int DEFAULT_CHART_ZOOMOUT_HEIGHT = 60; - public final static int DEFAULT_CHART_ZOOMIN_HEIGHT = 120; - public final static int DEFAULT_CHART_FIRST_COLUMN_WIDTH = 125; - private final static int SCALE_100 = 1; - private final static int SCALE_400 = 4; - private final static int SCALE_800 = 8; - private int chartZoomOutHeight = DEFAULT_CHART_ZOOMOUT_HEIGHT; - private int chartZoomInHeight = DEFAULT_CHART_ZOOMIN_HEIGHT; - private int chartFirstColumnWidth = DEFAULT_CHART_FIRST_COLUMN_WIDTH; - private long startWindowingTime = 0; - private long lastTraceTime = 0; - private long thumbWindowingTime = 0; - private int scaleVal = SCALE_100; - - private GridColumn columnName; - private GridColumn columnTime; - - public DAPageChart(Composite parent, int style, String ColumnHeaderText) { - super(parent, SWT.NONE); - this.setLayout(new FormLayout()); - this.setBackground(ColorResources.TABLE_CONTENTS_NORMAL); - - chart = new Grid(this, style); - chart.setHeaderVisible(true); - chart.setLinesVisible(true); - chart.setLineColor(ColorResources.TABLE_LINE); - chart.setBackground(ColorResources.TABLE_CONTENTS_NORMAL); - chart.setForeground(ColorResources.WHITE); - chart.setFont(FontResources.TABLE_HEADER_FONT); - - chart.setEmptyColumnHeaderRenderer(new DATableEmptyColumnHeaderRenderer()); - chart.setEmptyCellRenderer(new DefaultEmptyCellRenderer()); - chart.setItemHeight(chartZoomOutHeight); - - chart.addControlListener(new ControlListener() { - - @Override - public void controlResized(ControlEvent e) { - // TODO Auto-generated method stub - columnTime.setWidth(chart.getBounds().width - chartFirstColumnWidth); - } - - @Override - public void controlMoved(ControlEvent e) { - // TODO Auto-generated method stub - - } - }); - - scale = new DAScale(this, SWT.NONE); - scale.addSelectionListener(scaleSelectionListener); - scale.setMinimum(0); - scale.setMaximum(2); - scale.setLeftImage(ImageResources.SCALE_CONTROL_MINUS); - scale.setRightImage(ImageResources.SCALE_CONTROL_PLUS); - scale.setThumbImage(ImageResources.SCALE_CONTROL_THUMB); - scale.setRenderer(new DAScaleRenderer()); - - // lastTraceTime = - // DAPageChartTimelineRendererHelper.computeEndTime(scaleVal,startWindowingTime, - // chart.getBounds()); - - scrollComp = new Composite(this, SWT.H_SCROLL); - scrollComp.setBackground(ColorResources.TABLE_CONTENTS_NORMAL); - scrollComp.setLayout(new FillLayout()); - - scroll = scrollComp.getHorizontalBar(); - scroll.setMinimum(0); - scroll.setMaximum(1); - scroll.setSelection(0); - scroll.setVisible(true); - scroll.addSelectionListener(scrollbarSelectionListener); - - thumbWindowingTime = computeTumbTime(); - - FormData data = new FormData(); - data.left = new FormAttachment(0, 0); - data.right = new FormAttachment(100, 0); - data.top = new FormAttachment(0, 0); - data.bottom = new FormAttachment(100, -20); - chart.setLayoutData(data); - - data = new FormData(); - data.left = new FormAttachment(0, 0); - data.right = new FormAttachment(0, DEFAULT_CHART_FIRST_COLUMN_WIDTH); - data.top = new FormAttachment(chart, 0); - data.bottom = new FormAttachment(100, 0); - scale.setLayoutData(data); - - data = new FormData(); - data.left = new FormAttachment(scale, 0); - data.right = new FormAttachment(100, 0); - data.top = new FormAttachment(chart, 0); - data.bottom = new FormAttachment(100, 0); - scrollComp.setLayoutData(data); - - setColumns(parent, ColumnHeaderText); - } - - public void addItem(PageChartItem item) { - items.add(item); -// item.setParent(null); -// item.setChart(this); - // printItem(items, 0); - redraw(); - // FIXME : redraw - } - - public List getItems() { - return items; - } - - public void printItem(List items, int depth) { - PageChartItem item; - PageChartGraphSeries series; - List seriesList; - - List seriesItems; - if (items != null && items.size() != 0) { - for (int i = 0; i < items.size(); i++) { - for (int j = 0; j < depth; j++) { - System.out.print(" -"); //$NON-NLS-1$ - } - item = items.get(i); - System.out.print(item.getTitle() + " : <"); //$NON-NLS-1$ - seriesList = item.getSeriesList(); - if (seriesList != null && seriesList.size() != 0) { - for (int k = 0; k < seriesList.size(); k++) { - series = seriesList.get(k); - seriesItems = series.gets(); - System.out.print("["+series.getName()+" : "); - for(int l = 0; l"); //$NON-NLS-1$ - if (item.getChildren() != null - && item.getChildren().size() != 0) { - printItem(item.getChildren(), depth + 1); - } - } - } else { - if (depth == 0) { - System.out.println("no item!!!"); //$NON-NLS-1$ - } - } - System.out.println("\n"); //$NON-NLS-1$ - } - - public void printItems() { - printItem(items, 0); - } - - private void setColumns(Composite parent, String name) { - columnName = new GridColumn(chart, SWT.NONE); - columnName.setText(name); - columnName.setResizeable(false); - columnName.setWidth(chartFirstColumnWidth); - columnName.setHeaderRenderer(new DAPageChartNameHeaderRenderer()); - columnName.setCellRenderer(new DAPageChartNameCellRenderer()); - - columnTime = new GridColumn(chart, SWT.NONE); - columnTime.setResizeable(false); - columnTime.setHeaderRenderer(new DAPageChartTimelineHeaderRenderer()); - columnTime.setCellRenderer(new DAPageChartTimelineCellRenderer()); - - // set data - setChartDataScale(scaleVal); - setChartDataStartTime(startWindowingTime); - setChartDataLastTime(lastTraceTime); - setChartZoomInHeight(chartZoomInHeight); - setChartZoomOutHeight(chartZoomOutHeight); - } - - public Grid getInnerChart() { - return chart; - } - - public void setColumnHeaderImage(Image image) { - columnName.setImage(image); - } - - public void setColumnHeaderText(String columnText) { - columnName.setText(columnText); - } - - public void setColumnHeaderImageMargin(int left, int top) { - columnName.setData( - DAPageChartLabels.KEY_COLUMN_HEADER_IMAGE_LEFT_MARGIN, left); - columnName.setData( - DAPageChartLabels.KEY_COLUMN_HEADER_IMAGE_TOP_MARGIN, top); - } - - public void setChartZoomOutHeight(int zoomOutHeight) { - chartZoomOutHeight = zoomOutHeight; - chart.setItemHeight(chartZoomOutHeight); - chart.setData(DAPageChartLabels.KEY_CHART_ZOOMOUT_HEIGHT, - this.chartZoomOutHeight); - } - - public void setChartZoomInHeight(int zoomInHeight) { - chartZoomInHeight = zoomInHeight; - chart.setData(DAPageChartLabels.KEY_CHART_ZOOMIN_HEIGHT, - this.chartZoomInHeight); - } - - public void setColumnHeaderTextMargin(int left, int top) { - columnName.setData( - DAPageChartLabels.KEY_COLUMN_HEADER_TEXT_LEFT_MARGIN, left); - columnName.setData(DAPageChartLabels.KEY_COLUMN_HEADER_TEXT_TOP_MARGIN, - top); - } - - public int getChartScale() { - return scaleVal; - } - - public long getChartStartTime() { - return startWindowingTime; - } - - private void setLocateScrollCheck() { - if (startWindowingTime == 0) { - return; - } - - long start = lastTraceTime - thumbWindowingTime; - - if (start < startWindowingTime) { - start = lastTraceTime - thumbWindowingTime; - if (start < 0) { - start = 0; - } - setChartDataStartTime(start); - scroll.setSelection((int) (start / 1000000)); - } - - // if(startWindowingTime != 0 && lastTraceTime - thumbWindowingTime > 0 && lastTraceTime - thumbWindowingTime < - // startWindowingTime){ - // } - } - - private void setChartDataScale(int scaleVal) { - this.scaleVal = scaleVal; - chart.setData(DAPageChartLabels.KEY_CHART_SCALE, this.scaleVal); - } - - private void setChartDataStartTime(long time) { - startWindowingTime = time; - chart.setData(DAPageChartLabels.KEY_CHART_START_TIME, this.startWindowingTime); - } - - private void setChartDataLastTime(long time) { - lastTraceTime = time; - chart.setData(DAPageChartLabels.KEY_CHART_LAST_TIME, this.lastTraceTime); - } - - public void setChartLastTime(long time) { - // boolean isScrollEnd = false; - - if (time > 0 && time > lastTraceTime) { - scroll.setMaximum((int) (time / 1000000)); - thumbWindowingTime = computeTumbTime(); - scroll.setThumb((int) (thumbWindowingTime / 1000000)); - } - - if (scroll.getSelection() == (int) ((lastTraceTime - thumbWindowingTime) / 1000000)) { - setChartDataLastTime(time); - setChartDataStartTime(lastTraceTime - thumbWindowingTime); - scroll.setSelection((int) ((lastTraceTime - thumbWindowingTime) / 1000000)); - } else { - setChartDataLastTime(time); - } - redraw(); - } - - public void redraw() { - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - if (null != chart) { - chart.redraw(); - } - } - }); - } - - private DAScaleSelectionListener scaleSelectionListener = new DAScaleSelectionListener() { - - @Override - public void widgetSelected() { - // updateTree(); - int sel = scale.getSelection(); - - if (sel == 0 && scaleVal != SCALE_100) { - setChartDataScale(SCALE_100); - } else if (sel == 1 && scaleVal != SCALE_400) { - setChartDataScale(SCALE_400); - } else if (sel == 2 && scaleVal != SCALE_800) { - setChartDataScale(SCALE_800); - } else { - return; - } - thumbWindowingTime = computeTumbTime(); - scroll.setThumb((int) (thumbWindowingTime / 1000000)); - setLocateScrollCheck(); - // SetScrollThumb(); - - redraw(); - } - }; - - private SelectionListener scrollbarSelectionListener = new SelectionListener() { - - @Override - public void widgetSelected(SelectionEvent e) { - int sel = scroll.getSelection(); - setChartDataStartTime(sel * 1000000); - redraw(); - } - - @Override - public void widgetDefaultSelected(SelectionEvent e) { - // TODO Auto-generated method stub - - } - }; - - public void addSelectionListener(SelectionListener chartSelectionListener) { - chart.addSelectionListener(chartSelectionListener); - } - - public void clear() { - chart.removeAll(); - items.clear(); - } - - private long computeTumbTime() { - Rectangle r = chart.getBounds(); - if (r.x == 0 && r.y == 0 && r.width == 0 && r.height == 0) { - return 0; - } - r.x += DEFAULT_CHART_FIRST_COLUMN_WIDTH; - r.width -= DEFAULT_CHART_FIRST_COLUMN_WIDTH; - return DAPageChartTimelineRendererHelper.computeEndTime(scaleVal, 0, r); - } - - public int getChartZoomInHeight() { - return chartZoomInHeight; - } - - public int getChartZoomOutHeight() { - return chartZoomOutHeight; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/chart/DAPageChartNameCellRenderer.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/chart/DAPageChartNameCellRenderer.java deleted file mode 100644 index b6c6396..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/chart/DAPageChartNameCellRenderer.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.basechart.chart; - -import org.eclipse.nebula.widgets.grid.GridItem; -import org.eclipse.nebula.widgets.grid.IInternalWidget; -import org.eclipse.nebula.widgets.grid.internal.DefaultCellRenderer; -import org.eclipse.nebula.widgets.grid.internal.TextUtils; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.tizen.dynamicanalyzer.nl.DAPageChartLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.FontResources; -import org.tizen.dynamicanalyzer.resources.ImageResources; - -public class DAPageChartNameCellRenderer extends DefaultCellRenderer { - public final static int DEFAULT_IMAGE_TOP_MARGIN = 2; - public final static int DEFAULT_IMAGE_LEFT_MARGIN = 2; - public final static int DEFAULT_TEXT_TOP_MARGIN = 20; - public final static int DEFAULT_TEXT_LEFT_MARGIN = 5; - public final static int DEFAULT_ZOOM_SIZE = 20; - private int imageTopMargin = DEFAULT_IMAGE_TOP_MARGIN; - private int imageLeftMargin = DEFAULT_IMAGE_LEFT_MARGIN; - private int textTopMargin = DEFAULT_TEXT_TOP_MARGIN; - private int textLeftMargin = DEFAULT_TEXT_LEFT_MARGIN; - - // private DAPageChartZoomRenderer zoomRenderer; - - @Override - public void paint(GC gc, Object value) { - GridItem item = (GridItem) value; - - if (true == isSelected()) { - gc.setForeground(ColorResources.FILE_CHART_SELECTION_BG_START); - gc.setBackground(ColorResources.FILE_CHART_SELECTION_BG_END); - } else { - gc.setBackground(ColorResources.TABLE_HEADER_BG); - gc.setForeground(ColorResources.TABLE_LINE); - } - Rectangle r = getBounds(); - - gc.fillGradientRectangle(r.x, r.y, r.width, r.height, true); - gc.drawRectangle(r); - - // draw image - int x = 0; - int y = 0; - if (item.getImage() != null) { - if (item.getData(DAPageChartLabels.KEY_COLUMN_HEADER_IMAGE_LEFT_MARGIN) != null) { - imageLeftMargin = (Integer) item - .getData(DAPageChartLabels.KEY_COLUMN_HEADER_IMAGE_LEFT_MARGIN); - } - if (item.getData(DAPageChartLabels.KEY_COLUMN_HEADER_IMAGE_TOP_MARGIN) != null) { - imageTopMargin = (Integer) item - .getData(DAPageChartLabels.KEY_COLUMN_HEADER_IMAGE_TOP_MARGIN); - } - x = r.x + imageLeftMargin; - y = r.y + imageTopMargin; - gc.drawImage(item.getImage(), x, y); - x += item.getImage().getBounds().width; - y += item.getImage().getBounds().height; - } - // draw text - if (item.getText() != null) { - if (item.getData(DAPageChartLabels.KEY_COLUMN_HEADER_TEXT_LEFT_MARGIN) != null) { - textLeftMargin = (Integer) item - .getData(DAPageChartLabels.KEY_COLUMN_HEADER_TEXT_LEFT_MARGIN); - } - if (item.getData(DAPageChartLabels.KEY_COLUMN_HEADER_TEXT_TOP_MARGIN) != null) { - textTopMargin = (Integer) item - .getData(DAPageChartLabels.KEY_COLUMN_HEADER_TEXT_TOP_MARGIN); - } - x += r.x + textLeftMargin; - y += r.y + textTopMargin; - - gc.setForeground(ColorResources.BLACK); - gc.setFont(FontResources.PAGECHART_KEY_FONT); - gc.drawText( - TextUtils.getShortString(gc, item.getText(), r.width - x - - 1), x, y, true); - // gc.drawString( - // TextUtils.getShortString(gc, item.getText(), r.width - x - // - 1), x, y); - } - // PageChartItem chartItem = (PageChartItem) item.getData(); - // draw zoom - if(true == item.getChecked()){ - gc.drawImage(ImageResources.TIMLINE_RESTORE, r.x + r.width - - DEFAULT_ZOOM_SIZE, r.y); - } - else{ - gc.drawImage(ImageResources.TIMLINE_FULL, r.x + r.width - - DEFAULT_ZOOM_SIZE, r.y); - } - } - - private boolean zoomOverCheck(GridItem item, Point point) { - Rectangle nameCellRect = item.getBounds(0); - Rectangle zoomRect = new Rectangle(nameCellRect.x + nameCellRect.width - - DEFAULT_ZOOM_SIZE, nameCellRect.y, DEFAULT_ZOOM_SIZE, - DEFAULT_ZOOM_SIZE); - if (zoomRect.x < point.x && (zoomRect.x + zoomRect.width > point.x) - && zoomRect.y < point.y - && (zoomRect.y + zoomRect.height > point.y)) { - return true; - } - return false; - } - - public boolean notify(int event, Point point, Object value) { - GridItem item = (GridItem) value; - if (event == IInternalWidget.LeftMouseButtonDown) { - if (zoomOverCheck(item, point) == false) { - return false; - } - if (item.getChecked()) { - item.setChecked(false); - // setHoverDetail("zoom out"); //$NON-NLS-1$ - item.setHeight((Integer) (item.getParent() - .getData(DAPageChartLabels.KEY_CHART_ZOOMOUT_HEIGHT))); - return true; - } else { - item.setChecked(true); - // setHoverDetail("zoom in"); //$NON-NLS-1$ - item.setHeight((Integer) (item.getParent() - .getData(DAPageChartLabels.KEY_CHART_ZOOMIN_HEIGHT))); - return true; - } - } - - return false; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/chart/DAPageChartNameHeaderRenderer.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/chart/DAPageChartNameHeaderRenderer.java deleted file mode 100644 index e5b5647..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/chart/DAPageChartNameHeaderRenderer.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.basechart.chart; - -import org.eclipse.nebula.widgets.grid.GridColumn; -import org.eclipse.nebula.widgets.grid.internal.DefaultColumnHeaderRenderer; -import org.eclipse.nebula.widgets.grid.internal.TextUtils; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Rectangle; -import org.tizen.dynamicanalyzer.nl.DAPageChartLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; - -public class DAPageChartNameHeaderRenderer extends DefaultColumnHeaderRenderer { - public final static int DEFAULT_IMAGE_TOP_MARGIN = 2; - public final static int DEFAULT_IMAGE_LEFT_MARGIN = 2; - public final static int DEFAULT_TEXT_TOP_MARGIN = 5; - public final static int DEFAULT_TEXT_LEFT_MARGIN = 5; - private int imageTopMargin = DEFAULT_IMAGE_TOP_MARGIN; - private int imageLeftMargin = DEFAULT_IMAGE_LEFT_MARGIN; - private int textTopMargin = DEFAULT_TEXT_TOP_MARGIN; - private int textLeftMargin = DEFAULT_TEXT_LEFT_MARGIN; - - public void paint(GC gc, Object value) { - GridColumn column = (GridColumn) value; - gc.setBackground(ColorResources.TABLE_HEADER_BG); - gc.setForeground(ColorResources.TABLE_LINE); - Rectangle r = getBounds(); - // draw bg colcumn box - gc.fillRectangle(r); -// gc.fillGradientRectangle(r.x, r.y, r.width, r.height, true); - gc.drawRectangle(r); - // draw image - int x = 0; - int y = 0; - if (column.getImage() != null) { - if (column - .getData(DAPageChartLabels.KEY_COLUMN_HEADER_IMAGE_LEFT_MARGIN) != null) { - imageLeftMargin = (Integer) column - .getData(DAPageChartLabels.KEY_COLUMN_HEADER_IMAGE_LEFT_MARGIN); - } - if (column - .getData(DAPageChartLabels.KEY_COLUMN_HEADER_IMAGE_TOP_MARGIN) != null) { - imageTopMargin = (Integer) column - .getData(DAPageChartLabels.KEY_COLUMN_HEADER_IMAGE_TOP_MARGIN); - } - x = r.x + imageLeftMargin; - y = r.y + imageTopMargin; - gc.drawImage(column.getImage(), x, y); - x += column.getImage().getBounds().width; - y += column.getImage().getBounds().height; - } - // draw text - if (column.getText() != null) { - if (column - .getData(DAPageChartLabels.KEY_COLUMN_HEADER_TEXT_LEFT_MARGIN) != null) { - textLeftMargin = (Integer) column - .getData(DAPageChartLabels.KEY_COLUMN_HEADER_TEXT_LEFT_MARGIN); - } - if (column - .getData(DAPageChartLabels.KEY_COLUMN_HEADER_TEXT_TOP_MARGIN) != null) { - textTopMargin = (Integer) column - .getData(DAPageChartLabels.KEY_COLUMN_HEADER_TEXT_TOP_MARGIN); - } - x += r.x + textLeftMargin; - y += r.y + textTopMargin; - gc.setForeground(ColorResources.TABLE_HEADER_FONT_COLOR); - gc.drawText( - TextUtils.getShortString(gc, column.getText(), r.width - x - - 1), x, y, true); - } - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/chart/DAPageChartTimelineCellRenderer.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/chart/DAPageChartTimelineCellRenderer.java deleted file mode 100644 index 022b623..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/chart/DAPageChartTimelineCellRenderer.java +++ /dev/null @@ -1,470 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.basechart.chart; - -import java.util.List; - -import org.eclipse.nebula.widgets.grid.GridItem; -import org.eclipse.nebula.widgets.grid.internal.DefaultCellRenderer; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Rectangle; -import org.tizen.dynamicanalyzer.nl.DAPageChartLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.services.RecordStateSourceProvider; -import org.tizen.dynamicanalyzer.ui.basechart.PageChartGraphEventSeriesInfo; -import org.tizen.dynamicanalyzer.ui.basechart.PageChartGraphSeries; -import org.tizen.dynamicanalyzer.ui.basechart.PageChartGraphSeriesItem; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; - -public class DAPageChartTimelineCellRenderer extends DefaultCellRenderer { - long startTime; - long lastTime; - long endTime; - int scale; - long height; - Rectangle r = null; - public final static int DEFAULT_EVENT_HEIGHT_MARGIN = 10; - - @Override - public void paint(GC gc, Object value) { - GridItem item = (GridItem) value; - - if(true == isSelected()){ - gc.setForeground(ColorResources.FILE_CHART_SELECTION_BG_START); - gc.setBackground(ColorResources.FILE_CHART_SELECTION_BG_END); - } - else{ - gc.setBackground(ColorResources.TABLE_HEADER_BG); - gc.setForeground(ColorResources.TABLE_LINE); - } - r = getBounds(); - - gc.fillGradientRectangle(r.x, r.y, r.width, r.height, true); - gc.drawRectangle(r); - - startTime = (Long) (item.getParent() - .getData(DAPageChartLabels.KEY_CHART_START_TIME)); - lastTime = (Long) (item.getParent() - .getData(DAPageChartLabels.KEY_CHART_LAST_TIME)); - scale = (Integer) (item.getParent() - .getData(DAPageChartLabels.KEY_CHART_SCALE)); - endTime = DAPageChartTimelineRendererHelper.computeEndTime(scale, - startTime, r); - - @SuppressWarnings("unchecked") - List seriesList = (List) item - .getData(DAPageChartLabels.KEY_SERIES_SERIES_LIST); - - PageChartGraphSeries series; - - if (null == seriesList) { - return; - } - int seriesSize = seriesList.size(); - - // get chart height - for (int i = 0; i < seriesSize; i++) { - long seriesHeight = seriesList.get(i).getMinimumHeight(); - if (height < seriesHeight) { - height = seriesHeight; - } - } - - // draw - for (int i = 0; i < seriesSize; i++) { - series = seriesList.get(i); - int seriesStyle = series.getStyle(); - switch (seriesStyle) { - case PageChartGraphSeries.PAGECHART_GRAPHITEM_STATUS_EVENT: - drawEventSeries(gc, series); - break; - case PageChartGraphSeries.PAGECHART_GRAPHITEM_STATUS_BAR: - drawBarSeries(gc, series); - break; - case PageChartGraphSeries.PAGECHART_GRAPHITEM_STATUS_LINE: - drawLineSeries(gc, series); - break; - case PageChartGraphSeries.PAGECHART_GRAPHITEM_STATUS_AREA: - drawAreaSeries(gc, series); - break; - default: - break; - } - } - } - - public void drawEvent(GC gc, PageChartGraphSeriesItem seriesItem) { - if (null == r) { - r = getBounds(); - } - int pixcelX = DAPageChartTimelineRendererHelper.getPixcelXFromTime( - seriesItem.getX(), startTime, scale, r); - gc.setBackground(seriesItem.getEventColor()); - gc.fillRectangle(pixcelX, r.y + DEFAULT_EVENT_HEIGHT_MARGIN, 2, r.height - DEFAULT_EVENT_HEIGHT_MARGIN*2); - } - - public void drawPeriod(GC gc, long start, long end, boolean isFinished) { - if (null == r) { - r = getBounds(); - } - int startPixcelX = DAPageChartTimelineRendererHelper - .getPixcelXFromTime(start, startTime, scale, r); - int endPixcelX = DAPageChartTimelineRendererHelper.getPixcelXFromTime( - end, startTime, scale, r); - if (true == isFinished) { - gc.setForeground(ColorResources.PAGE_CLOSED_START); - gc.setBackground(ColorResources.PAGE_CLOSED_END); - } else { - String state = AnalyzerUtil.getRecordState(); - if (state.equals(RecordStateSourceProvider.RECORD_RECORDING)) { - gc.setForeground(ColorResources.PAGE_OPEN_START_RUN); - gc.setBackground(ColorResources.PAGE_OPEN_END_RUN); - } else { - gc.setForeground(ColorResources.PAGE_OPEN_START_STOP); - gc.setBackground(ColorResources.PAGE_OPEN_END_STOP); - } - } - - gc.fillGradientRectangle(startPixcelX, r.y + 2, endPixcelX - - startPixcelX, r.height - 4, true); - } - - public void drawPeriodBox(GC gc, long start, long end, - Color foregroundColor, Color backgroundColor) { - if (null == r) { - r = getBounds(); - } - int startPixcelX = DAPageChartTimelineRendererHelper - .getPixcelXFromTime(start, startTime, scale, r); - int endPixcelX = DAPageChartTimelineRendererHelper.getPixcelXFromTime( - end, startTime, scale, r); - - if (endPixcelX < r.x || startPixcelX > r.x + r.width) { - return; - } - gc.setForeground(foregroundColor); - gc.setBackground(backgroundColor); - - gc.fillGradientRectangle(startPixcelX, r.y + DEFAULT_EVENT_HEIGHT_MARGIN, endPixcelX - - startPixcelX, r.height - DEFAULT_EVENT_HEIGHT_MARGIN*2, true); - } - - public void drawPeriod(GC gc, int oldStyle, long oldTime, int newStyle, - long newTime, PageChartGraphEventSeriesInfo seriesInfo) { - - if (oldStyle == PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_INTERNAL_START - || oldStyle == PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_START) { - String state = AnalyzerUtil.getRecordState(); - if (newStyle == PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_END - || newStyle == PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_INTERNAL_END) { - drawPeriodBox(gc, oldTime, newTime, - seriesInfo.getCloseForegroundColor(), - seriesInfo.getCloseBackgroundColor()); - } else { - if (state.equals(RecordStateSourceProvider.RECORD_RECORDING)) { - drawPeriodBox(gc, oldTime, newTime, - seriesInfo.getOpenRunForegroundColor(), - seriesInfo.getOpenRunBackgroundColor()); - } else { - drawPeriodBox(gc, oldTime, newTime, - seriesInfo.getOpenFinishForegroundColor(), - seriesInfo.getOpenFinishBackgroundColor()); - } - } - } else if (oldStyle == PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_USE) { - if (newStyle == PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_END - || newStyle == PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_INTERNAL_END) { - drawPeriodBox(gc, oldTime, newTime, - seriesInfo.getCloseForegroundColor(), - seriesInfo.getCloseBackgroundColor()); - } else if (newStyle == PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_USE) { - drawPeriodBox(gc, oldTime, newTime, - seriesInfo.getUseForegroundColor(), - seriesInfo.getUseBackgroundColor()); - } - else{ - String state = AnalyzerUtil.getRecordState(); - if (state.equals(RecordStateSourceProvider.RECORD_RECORDING)) { - drawPeriodBox(gc, oldTime, newTime, - seriesInfo.getOpenRunForegroundColor(), - seriesInfo.getOpenRunBackgroundColor()); - } else { - drawPeriodBox(gc, oldTime, newTime, - seriesInfo.getOpenFinishForegroundColor(), - seriesInfo.getOpenFinishBackgroundColor()); - } - } - } else if (oldStyle == PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_INTERNAL_USE) { - if (newStyle == PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_END - || newStyle == PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_INTERNAL_END) { - drawPeriodBox(gc, oldTime, newTime, - seriesInfo.getCloseForegroundColor(), - seriesInfo.getCloseBackgroundColor()); - } else if (newStyle == PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_USE - || newStyle == PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_INTERNAL_USE) { - drawPeriodBox(gc, oldTime, newTime, - seriesInfo.getUseForegroundColor(), - seriesInfo.getUseBackgroundColor()); - } - else{ - String state = AnalyzerUtil.getRecordState(); - if (state.equals(RecordStateSourceProvider.RECORD_RECORDING)) { - drawPeriodBox(gc, oldTime, newTime, - seriesInfo.getOpenRunForegroundColor(), - seriesInfo.getOpenRunBackgroundColor()); - } else { - drawPeriodBox(gc, oldTime, newTime, - seriesInfo.getOpenFinishForegroundColor(), - seriesInfo.getOpenFinishBackgroundColor()); - } - } - } else if (oldStyle == PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_END - || oldStyle == PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_INTERNAL_END) { - if (newStyle == PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_END - || newStyle == PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_INTERNAL_END) { - drawPeriodBox(gc, oldTime, newTime, - seriesInfo.getCloseForegroundColor(), - seriesInfo.getCloseBackgroundColor()); - } - } else { - return; - } - } - - public void drawEventSeries(GC gc, PageChartGraphSeries series) { - List seriesItems = series.gets(); - if (null == seriesItems) { - return; - } - - int seriesItemSize = seriesItems.size(); - PageChartGraphSeriesItem seriesItem; - - int newStyle = PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_NONE; - int oldStyle = PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_NONE; - long oldPeriodTime = 0; - long newPeriodTime = 0; - for (int i = 0; i < seriesItemSize; i++) { - seriesItem = seriesItems.get(i); - newStyle = seriesItem.getEvenItemStyle(); - if (newStyle != PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_NONE) { - newPeriodTime = seriesItem.getX(); - drawPeriod(gc, oldStyle, oldPeriodTime, newStyle, - newPeriodTime, series.getEventSeriesInfo()); - oldStyle = newStyle; - oldPeriodTime = newPeriodTime; - } - } - if (oldStyle != PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_NONE) { - drawPeriod( - gc, - oldStyle, - oldPeriodTime, - PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_NONE, - lastTime, series.getEventSeriesInfo()); - } - - // draw event - for (int i = 0; i < seriesItemSize; i++) { - seriesItem = seriesItems.get(i); - long eventTime = seriesItem.getX(); - - if (eventTime > startTime) { - int style = seriesItem.getEvenItemStyle(); - if( style == PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_INTERNAL_END ||style == PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_INTERNAL_START || style == PageChartGraphEventSeriesInfo.PAGECHART_GRAPHITEM_STYLE_EVENT_PERIOD_INTERNAL_USE){ - continue; - } - else{ - drawEvent(gc, seriesItem); - } - } - } - } - - public void drawBarSeries(GC gc, PageChartGraphSeries series) { - List seriesItems = series.gets(); - if (null == seriesItems) { - return; - } - if (null == r) { - r = getBounds(); - } - int seriesItemSize = seriesItems.size(); - PageChartGraphSeriesItem seriesItem; - - for (int i = 0; i < seriesItemSize; i++) { - seriesItem = seriesItems.get(i); - - long barWidthTime = 0; - if (seriesItem.getBarWidthTime() == -1) { - barWidthTime = series.getBarWidthTime(); - } else { - barWidthTime = seriesItem.getBarWidthTime(); - } - long currentTime = seriesItem.getX(); - if (currentTime + barWidthTime < startTime) { - continue; - } else if (currentTime > endTime) { - break; - } - int pixcelStartX = DAPageChartTimelineRendererHelper - .getPixcelXFromTime(currentTime, startTime, scale, r); - int pixcelStartY = DAPageChartTimelineRendererHelper - .getPixcelYFromHeight(seriesItem.getY(), height, r); - - int barWidth = DAPageChartTimelineRendererHelper - .getPixcelXFromTime(currentTime + barWidthTime, startTime, - scale, r) - - pixcelStartX; - if (barWidth < 1) { - barWidth = 1; - } - gc.setBackground(seriesItem.getEventColor()); - gc.fillRectangle(pixcelStartX, pixcelStartY, barWidth, r.y - + r.height - pixcelStartY); - } - } - - public void drawLineSeries(GC gc, PageChartGraphSeries series) { - List seriesItems = series.gets(); - if (null == seriesItems) { - return; - } - if (null == r) { - r = getBounds(); - } - int seriesItemSize = seriesItems.size(); - if (seriesItemSize < 1) { - return; - } - - PageChartGraphSeriesItem seriesItem = seriesItems.get(0); - int oldPixcelX = DAPageChartTimelineRendererHelper.getPixcelXFromTime( - seriesItem.getX(), startTime, scale, r); - int oldPixcelY = DAPageChartTimelineRendererHelper - .getPixcelYFromHeight(seriesItem.getY(), height, r); - - if (seriesItemSize == 1) { - if (oldPixcelX < r.x) { - return; - } - gc.setForeground(seriesItem.getEventColor()); - gc.drawPoint(oldPixcelX, oldPixcelY); - return; - } - int newPixcelX = 0; - int newPixcelY = 0; - - for (int i = 1; i < seriesItemSize; i++) { - seriesItem = seriesItems.get(i); - long currentTime = seriesItem.getX(); - if (currentTime < startTime) { - continue; - } else if (currentTime > endTime) { - break; - } else if (newPixcelX == 0 && newPixcelY == 0) { - oldPixcelX = DAPageChartTimelineRendererHelper - .getPixcelXFromTime(seriesItems.get(i - 1).getX(), - startTime, scale, r); - oldPixcelY = DAPageChartTimelineRendererHelper - .getPixcelYFromHeight(seriesItems.get(i - 1).getY(), - height, r); - } else { - oldPixcelX = newPixcelX; - oldPixcelY = newPixcelY; - } - newPixcelX = DAPageChartTimelineRendererHelper.getPixcelXFromTime( - seriesItem.getX(), startTime, scale, r); - newPixcelY = DAPageChartTimelineRendererHelper - .getPixcelYFromHeight(seriesItem.getY(), height, r); - - gc.setForeground(seriesItem.getEventColor()); - gc.drawLine(oldPixcelX, oldPixcelY, newPixcelX, newPixcelY); - } - } - - public void drawAreaSeries(GC gc, PageChartGraphSeries series) { - List seriesItems = series.gets(); - if (null == seriesItems) { - return; - } - if (null == r) { - r = getBounds(); - } - int seriesItemSize = seriesItems.size(); - if (seriesItemSize < 1) { - return; - } - - PageChartGraphSeriesItem seriesItem = seriesItems.get(0); - int oldPixcelX = DAPageChartTimelineRendererHelper.getPixcelXFromTime( - seriesItem.getX(), startTime, scale, r); - int oldPixcelY = DAPageChartTimelineRendererHelper - .getPixcelYFromHeight(seriesItem.getY(), height, r); - int baseY = r.y + r.height; - - if (seriesItemSize == 1) { - if (oldPixcelX < r.x) { - return; - } - gc.setForeground(seriesItem.getEventColor()); - gc.drawLine(oldPixcelX, baseY, oldPixcelX, oldPixcelY); - return; - } - int newPixcelX = 0; - int newPixcelY = 0; - - for (int i = 1; i < seriesItemSize; i++) { - seriesItem = seriesItems.get(i); - long currentTime = seriesItem.getX(); - if (currentTime < startTime) { - continue; - } else if (currentTime > endTime) { - break; - } else if (newPixcelX == 0 && newPixcelY == 0) { - oldPixcelX = DAPageChartTimelineRendererHelper - .getPixcelXFromTime(seriesItems.get(i - 1).getX(), - startTime, scale, r); - oldPixcelY = DAPageChartTimelineRendererHelper - .getPixcelYFromHeight(seriesItems.get(i - 1).getY(), - height, r); - } else { - oldPixcelX = newPixcelX; - oldPixcelY = newPixcelY; - } - newPixcelX = DAPageChartTimelineRendererHelper.getPixcelXFromTime( - seriesItem.getX(), startTime, scale, r); - newPixcelY = DAPageChartTimelineRendererHelper - .getPixcelYFromHeight(seriesItem.getY(), height, r); - int[] polygon = { oldPixcelX, baseY, oldPixcelX, oldPixcelY, - newPixcelX, newPixcelY, newPixcelX, baseY }; - - gc.setBackground(seriesItem.getEventColor()); - gc.fillPolygon(polygon); - } - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/chart/DAPageChartTimelineHeaderRenderer.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/chart/DAPageChartTimelineHeaderRenderer.java deleted file mode 100644 index 74510fb..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/chart/DAPageChartTimelineHeaderRenderer.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.basechart.chart; - -import org.eclipse.nebula.widgets.grid.GridColumn; -import org.eclipse.nebula.widgets.grid.internal.DefaultColumnHeaderRenderer; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.tizen.dynamicanalyzer.nl.DAPageChartLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.FontResources; -import org.tizen.dynamicanalyzer.utils.Formatter; - -public class DAPageChartTimelineHeaderRenderer extends - DefaultColumnHeaderRenderer { - // public final static int INTERVAL = 5; - long startTime; - long endTime; - int scale; - - public void paint(GC gc, Object value) { - GridColumn column = (GridColumn) value; - gc.setBackground(ColorResources.TABLE_HEADER_BG); - gc.setForeground(ColorResources.TABLE_LINE); - Rectangle r = getBounds(); - - // draw bg colcumn box - gc.fillRectangle(r); -// gc.fillGradientRectangle(r.x, r.y, r.width, r.height, true); - gc.drawRectangle(r); - - // draw gradation - startTime = (Long) (column.getParent() - .getData(DAPageChartLabels.KEY_CHART_START_TIME)); - scale = (Integer) (column.getParent() - .getData(DAPageChartLabels.KEY_CHART_SCALE)); - endTime = DAPageChartTimelineRendererHelper.computeEndTime(scale, - startTime, r); - drawTimeTick(gc, r); - } - - public void drawTimeString(GC gc, long time, int pixcelX, int pixcelY) { - Point p; - String timeString; - timeString = Formatter.toTimeFormat3(String.valueOf(time)); - p = gc.textExtent(timeString, SWT.DRAW_MNEMONIC); - gc.drawText(timeString, pixcelX - p.x / 2, pixcelY, true); - } - - public void drawTimeTick(GC gc, Rectangle r) { - gc.setForeground(ColorResources.TABLE_HEADER_FONT_COLOR); - gc.setFont(FontResources.TIMELINE_TICK_FONT); - // draw underLine - gc.drawLine(r.x + DAPageChartTimelineRendererHelper.INTERVAL, r.y - + r.height - 1, r.x + r.width, r.y + r.height - 1); - - int pixcelX; - - for (long x = (startTime / 1000000); x <= (endTime / 1000000); x++) { - pixcelX = DAPageChartTimelineRendererHelper.getPixcelXFromTime( - x * 1000000, startTime, scale, r); - // draw time tick & string - DAPageChartTimelineRendererHelper.getPixcelXFromTime(x * 1000000, - startTime, scale, r); - if (x % 10 == 0) { - drawTimeString(gc, x * 1000000, pixcelX, r.y); - gc.drawLine(pixcelX, r.y + r.height - 7, pixcelX, r.y - + r.height - 1); - } else if (x % 5 == 0) { - if (scale >= 2) { - drawTimeString(gc, x * 1000000, pixcelX, r.y); - } - gc.drawLine(pixcelX, r.y + r.height - 5, pixcelX, r.y - + r.height - 1); - } else { - if (scale >= 8) { - drawTimeString(gc, x * 1000000, pixcelX, r.y); - } - gc.drawLine(pixcelX, r.y + r.height - 3, pixcelX, r.y - + r.height - 1); - } - } - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/chart/DAPageChartTimelineRendererHelper.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/chart/DAPageChartTimelineRendererHelper.java deleted file mode 100644 index 97eb4d1..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/chart/DAPageChartTimelineRendererHelper.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.basechart.chart; - -import org.eclipse.swt.graphics.Rectangle; - -public class DAPageChartTimelineRendererHelper { - public final static int INTERVAL = 5; - - public static int getPixcelXFromTime(long time, long startTime, int scale, - Rectangle r) { - - double pixcelX = (double) (time - startTime) / (double) 1000000; - pixcelX *= (double) (INTERVAL * scale); - return r.x + INTERVAL + (int) pixcelX; - } - - public static long getTimeFromPixcelX(int pixcelX, long startTime, - int scale, Rectangle r) { - double time; - if (0 == scale) - return -1; - time = (pixcelX - INTERVAL - r.x) / (INTERVAL * scale); - time *= 1000000; - return (long) time + startTime; - } - - public static int getPixcelYFromHeight(long height, long seriesHeight, - Rectangle r) { - int maxPixcelHeight = r.height - (INTERVAL * 2); - double pixcelHeight = (double) maxPixcelHeight - * ((double) height / (double) seriesHeight); - return r.y + r.height - (int) pixcelHeight; - } - - public static long computeEndTime(int scale, long startTime, Rectangle r) { - long endTime = getTimeFromPixcelX(r.x + r.width, startTime, scale, r); - return endTime; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/chart/DAPageChartZoomRenderer.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/chart/DAPageChartZoomRenderer.java deleted file mode 100644 index 8de2289..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/chart/DAPageChartZoomRenderer.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.basechart.chart; - -import org.eclipse.nebula.widgets.grid.internal.CheckBoxRenderer; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Rectangle; -import org.tizen.dynamicanalyzer.resources.ImageResources; - -public class DAPageChartZoomRenderer extends CheckBoxRenderer { - public void paint(GC gc, Object value) { - Rectangle r = getBounds(); - gc.drawImage(ImageResources.TIMLINE_FULL, r.x, r.y); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/table/ThreadAPIListTable.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/table/ThreadAPIListTable.java deleted file mode 100644 index 9ab14cd..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/basechart/table/ThreadAPIListTable.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.basechart.table; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.nebula.widgets.grid.GridItem; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.error.ErrorCodeManager; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.model.TableInput; -import org.tizen.dynamicanalyzer.ui.thread.ThreadAPIListView; -import org.tizen.dynamicanalyzer.ui.thread.ThreadPageData; -import org.tizen.dynamicanalyzer.ui.thread.ThreadPageDataEvent; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; -import org.tizen.dynamicanalyzer.utils.Formatter; - -public class ThreadAPIListTable extends DATableComposite { - public ThreadAPIListTable(Composite parent, int compStyle, int tableStyle) { - super(parent, compStyle, tableStyle); - table.addSelectionListener(new SelectionListener() { - - @Override - public void widgetSelected(SelectionEvent e) { - GridItem[] items = table.getSelection(); - DASelectionData selData = new DASelectionData( - ThreadAPIListView.ID, 0, 0, items, table); - AnalyzerManager.getCurrentPage().updatePage(selData); - } - - @Override - public void widgetDefaultSelected(SelectionEvent e) { - // TODO Auto-generated method stub - - } - }); - } - - @Override - protected List makeTableInput() { - ThreadAPIListView view = (ThreadAPIListView) AnalyzerManager - .getCurrentPage().getViewMap().get(ThreadAPIListView.ID); - - if (!(view instanceof ThreadAPIListView)) { - return null; - } - ThreadPageData data = view.getPageData(); - - if (null == data) { - return null; - } - - List input = new ArrayList(); - - List contents = data.getContents(); - - ThreadPageDataEvent content; - for (int i = 0; i < contents.size(); i++) { - content = contents.get(i); - List contentTemp = content.getContents(); - List contentText = new ArrayList(); - - String seq = contentTemp - .get(LogCenterConstants.SEQUENCE_NUMBER_INDEX); - contentText.add(0, seq); - contentText.add(Formatter.toTimeFormat(contentTemp - .get(LogCenterConstants.TIME_INDEX))); - contentText.add(contentTemp.get(LogCenterConstants.APINAME_INDEX)); - contentText - .add(contentTemp.get(LogCenterConstants.INPUTPARM_INDEX)); - contentText - .add(contentTemp.get(LogCenterConstants.THREAD_ID_INDEX)); - contentText.add(contentTemp.get(LogCenterConstants.RETURN_INDEX)); - String errMsg = ErrorCodeManager.getInatance().getErrorCode( - contentTemp.get(LogCenterConstants.ERROR_INDEX)); - if (null == errMsg) { - errMsg = "undefined error code"; - } - contentText.add(errMsg); - contentText.add(contentTemp - .get(LogCenterConstants.RESOURCE_FILE_SIZE_INDEX)); - - DATableDataFormat tableData = new DATableDataFormat( - contentTemp.get(LogCenterConstants.SEQUENCE_NUMBER_INDEX)); - tableData.getData().addAll(contentTemp); - TableInput tableInput = new TableInput(); - tableInput.setText(contentText); - tableInput.setData(tableData); - input.add(tableInput); - } - - return input; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileApiListTable.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileApiListTable.java deleted file mode 100644 index 3b451de..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileApiListTable.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.file; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.nebula.widgets.grid.Grid; -import org.eclipse.nebula.widgets.grid.GridItem; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.error.ErrorCodeManager; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.model.LogCenter; -import org.tizen.dynamicanalyzer.model.TableInput; -import org.tizen.dynamicanalyzer.sql.SqlManager; -import org.tizen.dynamicanalyzer.ui.file.chart.DAFileChart; -import org.tizen.dynamicanalyzer.ui.page.ViewAction; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; -import org.tizen.dynamicanalyzer.utils.Formatter; - -public class FileApiListTable extends DATableComposite { - private static final int SQL_QUERY_MAX_SIZE = 999; - - public FileApiListTable(Composite parent, int compStyle, int tableStyle) { - super(parent, compStyle, tableStyle); - table.addSelectionListener(new SelectionListener() { - - @Override - public void widgetSelected(SelectionEvent e) { - GridItem[] items = table.getSelection(); - DATableDataFormat dataFormat = (DATableDataFormat) items[0].getData(); - String time = dataFormat.getData().get(LogCenterConstants.TIME_INDEX); - DASelectionData selData = new DASelectionData( - FileApiListView.ID, Long.parseLong(time), 0, items, table); - AnalyzerManager.getCurrentPage().updatePage(selData); - } - - @Override - public void widgetDefaultSelected(SelectionEvent e) { - // TODO Auto-generated method stub - - } - }); - } - - private List getOutput(GridItem ti) { - DATableDataFormat tableData = (DATableDataFormat) ti.getData(); - FileChartItemData item = (FileChartItemData) tableData.getObject(); - List output = new ArrayList(); - // parent - if (item.getChildern().isEmpty()) { - int size = item.getData().size(); - for (int i = 0; i < size; i++) { - output.addAll(item.getData().get(i).getRelations()); - } - } else { - int childCount = item.getChildern().size(); - for (int childIndex = 0; childIndex < childCount; childIndex++) { - FileChartItemData child = item.getChildern().get(childIndex); - int size = child.getData().size(); - for (int i = 0; i < size; i++) { - output.addAll(child.getData().get(i).getRelations()); - } - } - } - - if (!item.getFailedData().isEmpty()) { - output.addAll(item.getFailedRelations()); - } - return output; - } - - @Override - protected List makeTableInput() { - List input = new ArrayList(); - ViewAction va = AnalyzerManager.getCurrentPage().getViewMap() - .get(FileChartView.ID); - Grid fileChart = ((DAFileChart) va.getControl()).getTree(); - GridItem[] selectedItem = fileChart.getSelection(); - if (selectedItem.length < 1) { - return input; - } - GridItem item = selectedItem[0]; - List output = getOutput(item); - if (null == output || output.isEmpty()) { - return input; - } - - LogCenter logc = AnalyzerManager - .getLogCenterById(LogCenterConstants.LOG_RESOURCE); - List> apiList = null; - int size = output.size(); - int querySize = size; - int outputIndex = 0; - while (size > 0) { - querySize = ((size - SQL_QUERY_MAX_SIZE) > 0) ? SQL_QUERY_MAX_SIZE - : size; - size -= querySize; - - String query = "select * from resource where "; //$NON-NLS-1$ - - for (int i = 0; i < querySize; i++) { - query += " seqnumber = " + output.get(outputIndex + i); //$NON-NLS-1$ - if (i + 1 != querySize) { - query += " or "; //$NON-NLS-1$ - } else { - query += ";"; //$NON-NLS-1$ - } - } - outputIndex += querySize; - - apiList = SqlManager.executeSelectQueryFD(query, logc - .getColumnName().size()); - - } - - int apiListSize = apiList.size(); - for (int i = 0; i < apiListSize; i++) { - List data = apiList.get(i); - int dataSize = data.size(); - List temp = new ArrayList(); - - for (int ii = 1; ii < dataSize; ii++) { - temp.add(data.get(ii)); - } - - List text = new ArrayList(); - /** input data is database result -> index + 1 **/ - String seq = temp.get(LogCenterConstants.SEQUENCE_NUMBER_INDEX); - text.add(0, seq); - text.add(Formatter.toTimeFormat(temp - .get(LogCenterConstants.TIME_INDEX))); - text.add(temp.get(LogCenterConstants.APINAME_INDEX)); - text.add(temp.get(LogCenterConstants.INPUTPARM_INDEX)); - text.add(temp.get(LogCenterConstants.THREAD_ID_INDEX)); - text.add(temp.get(LogCenterConstants.RETURN_INDEX)); - String errMsg = ErrorCodeManager.getInatance().getErrorCode( - temp.get(LogCenterConstants.ERROR_INDEX)); - if (null == errMsg) { - errMsg = "undefined error code"; - } - text.add(errMsg); - text.add(temp.get(LogCenterConstants.RESOURCE_FILE_SIZE_INDEX)); - - DATableDataFormat tableData = new DATableDataFormat( - temp.get(LogCenterConstants.SEQUENCE_NUMBER_INDEX)); - tableData.getData().addAll(temp); - - TableInput tableInput = new TableInput(); - tableInput.setText(text); - tableInput.setData(tableData); - input.add(tableInput); - } - - return input; - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileApiListView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileApiListView.java deleted file mode 100644 index f0c7eb3..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileApiListView.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.file; - -import java.util.List; - -import org.eclipse.nebula.widgets.grid.Grid; -import org.eclipse.nebula.widgets.grid.GridItem; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.model.DAView; -import org.tizen.dynamicanalyzer.nl.FilePageLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.ui.widgets.DATabComposite; -import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; -import org.tizen.dynamicanalyzer.ui.widgets.table.TableComparator; - -public class FileApiListView extends DAView { - - public static final String ID = FileApiListView.class.getName(); - private String lastSelectionKey = null; - private boolean selected = false; - int[] innerMaxWeight = { 0, 100 }; - int[] outerMaxWeight = { 100, 0 }; - - private String[] columnNames = { FilePageLabels.FILE_API_LIST_VIEW_INDEX, - FilePageLabels.FILE_API_LIST_VIEW_TIME, - FilePageLabels.FILE_API_LIST_VIEW_API, - FilePageLabels.FILE_API_LIST_VIEW_PARAMETER, - FilePageLabels.FILE_API_LIST_VIEW_THREAD_ID, - FilePageLabels.FILE_API_LIST_VIEW_RETURN, - FilePageLabels.FILE_API_LIST_VIEW_ERRNO }; - private int[] columnSizes = { 35, 70, 80, 250, 0, 100, 100 }; - - int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_STRING, - AnalyzerConstants.SORT_TYPE_STRING, - AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_STRING, - AnalyzerConstants.SORT_TYPE_STRING }; - - int[] sourceColumns = { LogCenterConstants.SEQUENCE_NUMBER_INDEX, - LogCenterConstants.TIME_INDEX, LogCenterConstants.APINAME_INDEX, - LogCenterConstants.INPUTPARM_INDEX, - LogCenterConstants.THREAD_ID_INDEX, - LogCenterConstants.RETURN_INDEX, LogCenterConstants.ERROR_INDEX }; - - DATableComposite tableComp = null; - - public FileApiListView(Composite parent, int style) { - super(parent, style); - this.setLayout(new FillLayout()); - - ViewContainer viewContainer = new ViewContainer(this, true); - viewContainer.setTitleText(FilePageLabels.FILE_API_LIST_VIEW_TITLE); - setMaxWeight(innerMaxWeight, outerMaxWeight); - - Composite contents = viewContainer.getContentArea(); - contents.setBackground(ColorResources.WINDOW_BG_COLOR); - contents.setLayout(new FillLayout()); - tableComp = new FileApiListTable(contents, SWT.NONE, SWT.SINGLE - | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL); - tableComp.setComparator(new TableComparator()); - tableComp.setSortTypes(sortTypes); - tableComp.setSourceColumns(sourceColumns); - tableComp.setColumns(columnNames); - tableComp.setColumnSize(columnSizes); - tableComp.setTableName(FilePageLabels.FILE_API_LIST_VIEW_TITLE); - } - - @Override - public void updateView(DASelectionData data) { - if (data.getViewId().equals(DATabComposite.ID)) { - return; - } - Grid fileChart = (Grid) data.getControl(); - GridItem[] items = fileChart.getSelection(); - GridItem item = items[0]; - - DATableDataFormat tableData = (DATableDataFormat) item.getData(); - String key = tableData.getSelectionKey(); - - if (null != lastSelectionKey && !key.equals(lastSelectionKey) - && !selected) { - tableComp.clear(); - lastSelectionKey = key; - } else { - lastSelectionKey = key; - selected = false; - } - - tableComp.updateTable(); - } - - @Override - public Control getControl() { - return tableComp; - } - - @Override - public void clear() { - tableComp.getTable().removeAll(); - } - - @Override - public void setSelection(List data) { - if (null == data || data.isEmpty()) { - return; - } - - String seq = data.get(LogCenterConstants.SEQUENCE_NUMBER_INDEX); - - tableComp.updateTable(); - - Grid table = tableComp.getTable(); - GridItem[] items = table.getItems(); - - int size = items.length; - for (int i = 0; i < size; i++) { - DATableDataFormat tableData = (DATableDataFormat) items[i] - .getData(); - String tableKey = tableData.getSelectionKey(); - if (tableKey.equals(seq)) { - table.setSelection(i); - table.getVerticalBar().setSelection( - getScrollSelectionIndex(table, i)); - } - } - // TODO: why?? - tableComp.updateTable(); - selected = true; - } - - private int getScrollSelectionIndex(Grid table, int selection) { - int size = table.getVerticalBar().getThumb() / 2; - int output = selection - size; - - output = (output < 0) ? 0 : output; - return output; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileChartData.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileChartData.java deleted file mode 100644 index e640397..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileChartData.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.file; - -import java.util.ArrayList; -import java.util.List; - -public class FileChartData { - private long openTime = -1; - private long closeTime = -1; - private long firstTime = -1; - private long lastTime = -1; - private List relationSeqs; - private List input = null; - - public List getInput() { - if (null == input) { - input = new ArrayList(); - } - return input; - } - - public long getOpenTime() { - return openTime; - } - - public void setOpenTime(long openTime) { - this.openTime = openTime; - } - - public long getCloseTime() { - return closeTime; - } - - public void setCloseTime(long closeTime) { - this.closeTime = closeTime; - } - - public long getFirstTime() { - return firstTime; - } - - public void setFirstTime(long firstTime) { - this.firstTime = firstTime; - } - - public long getLastTime() { - return lastTime; - } - - public void setLastTime(long lastTime) { - this.lastTime = lastTime; - } - - public List getRelations() { - if (null == relationSeqs) { - relationSeqs = new ArrayList(); - } - return relationSeqs; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileChartItemData.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileChartItemData.java deleted file mode 100644 index 913fce6..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileChartItemData.java +++ /dev/null @@ -1,251 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.file; - -import java.util.ArrayList; -import java.util.List; - -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.ui.summary.failed.FailedData; - -public class FileChartItemData { - private int seq = -1; - private String key = null; - private List children = null; - private List data = null; - private List failedData = null; - private List calledFunctionData = null; - - private boolean closed = false; - private String parentKey = null; - private boolean repeatCheck = false; - private boolean p = false; - - private String name = null; - private String path = null; - private String mode = null; - private long readSize = 0; - private long writeSize = 0; - private long totalSize = 0; - private long totalFileUseTime = 0; - - public long getTotalFileUseTime() { - return totalFileUseTime; - } - - public void setTotalFileUseTime(long totalFileUseTime) { - this.totalFileUseTime = totalFileUseTime; - } - - public String getFileName() { - return name; - } - - public void setFileName(String name) { - this.name = name; - } - - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public String getMode() { - return mode; - } - - public void setMode(String mode) { - this.mode = mode; - } - - public long getReadSize() { - return readSize; - } - - public void setReadSize(long readSize) { - this.readSize = readSize; - } - - public long getWriteSize() { - return writeSize; - } - - public void setWriteSize(long writeSize) { - this.writeSize = writeSize; - } - - public long getTotalSize() { - return totalSize; - } - - public void setTotalSize(long totalSize) { - this.totalSize = totalSize; - } - - - public FileChartItemData(String key, int seq) { - this.key = key; - this.seq = seq; - } - - public FileChartItemData getFindChild(String fd) { - int size = getChildern().size(); - FileChartItemData child = null; - for (int i = 0; i < size; i++) { - child = getChildern().get(i); - if (fd.equals(child.getKey())) { - return child; - } - } - return null; - } - - public List getCalledFunctionData() { - if (null == calledFunctionData) { - calledFunctionData = new ArrayList(); - } - return calledFunctionData; - } - - public List getFailedData() { - if (null == failedData) { - failedData = new ArrayList(); - } - return failedData; - } - - public void setParentKey(String src) { - parentKey = src; - } - - public String getParentKey() { - return parentKey; - } - - public int getSeq() { - return seq; - } - - public void setSeq(int num) { - seq = num; - } - - public String getKey() { - return key; - } - - public List getChildern() { - if (null == children) { - children = new ArrayList(); - } - return children; - } - - public boolean hasChild() { - return !getChildern().isEmpty(); - } - - public List getData() { - if (null == data) { - data = new ArrayList(); - } - return data; - } - - public boolean isClosed() { - return closed; - } - - public void setColsed(boolean state) { - closed = state; - } - - public FileChartData getLastData() { - if (getData().isEmpty()) { - return null; - } else { - return getData().get(getData().size() - 1); - } - } - - // FIXME : interface?? - public void setRepeatCheck() { - repeatCheck = true; - } - - public boolean isRepeatCehcked() { - return repeatCheck; - } - - public void setParent() { - this.p = true; - } - - public boolean isParent() { - return this.p; - } - - public List getFailedRelations() { - List output = new ArrayList(); - int size = getFailedData().size(); - for (int i = 0; i < size; i++) { - FailedData ffd = failedData.get(i); - String seq = ffd - .getLogData(LogCenterConstants.SEQUENCE_NUMBER_INDEX); - output.add(seq); - } - return output; - } - - public List getCalledFunctionRelations() { - List output = new ArrayList(); - int size = getCalledFunctionData().size(); - for (int i = 0; i < size; i++) { - FailedData ffd = calledFunctionData.get(i); - String seq = ffd.getLogData(LogCenterConstants.SEQUENCE_NUMBER_INDEX); - output.add(seq); - } - return output; - } - - public boolean isAllChildrenClosed() { - if (!hasChild()) { - return false; - } - int size = getChildern().size(); - for (int i = 0; i < size; i++) { - FileChartItemData child = children.get(i); - if (!child.isClosed()) { - return false; - } - } - return true; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileChartView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileChartView.java deleted file mode 100644 index 30d009c..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileChartView.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.file; - -import java.util.List; - -import org.eclipse.nebula.widgets.grid.Grid; -import org.eclipse.nebula.widgets.grid.GridItem; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.logparser.LogPackage; -import org.tizen.dynamicanalyzer.logparser.Logs; -import org.tizen.dynamicanalyzer.model.DAView; -import org.tizen.dynamicanalyzer.nl.FilePageLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.ui.file.chart.DAFileChart; -import org.tizen.dynamicanalyzer.ui.file.chart.FileChartManager; -import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; - -public class FileChartView extends DAView { - - public static final String ID = FileChartView.class.getName(); - - private String[] columnNames = { FilePageLabels.FILE_CHART_FILE, - FilePageLabels.FILE_CHART_CHART }; - private int[] columnSizes = { - FileChartManager.FILE_CHART_FIRST_COLUMN_WIDTH, - FileChartManager.FILE_CHART_SECOND_COLUMN_WIDTH }; - - DAFileChart treeComp = null; - - public FileChartView(Composite parent, int style) { - super(parent, style); - this.setLayout(new FillLayout()); - - ViewContainer viewContainer = new ViewContainer(this, false); - viewContainer.setTitleText(FilePageLabels.FILE_CHART_TITLE); - - Composite contents = viewContainer.getContentArea(); - contents.setBackground(ColorResources.WINDOW_BG_COLOR); - contents.setLayout(new FillLayout()); - treeComp = new DAFileChart(contents, SWT.NONE, SWT.SINGLE | SWT.BORDER - | SWT.FULL_SELECTION | SWT.V_SCROLL); - treeComp.setTree(true); - treeComp.setColumns(columnNames); - treeComp.setColumnSize(columnSizes); - } - - @Override - public void updateView() { - treeComp.updateFileChart(); - treeComp.updateOtherView(FilePage.FILE_API_LIST_INDEX); - } - - @Override - public void updateLog(LogPackage logPack) { - Logs logs = logPack.getLogs(LogCenterConstants.LOG_RESOURCE); - if (null == logs || logs.getLogs().size() == 0) { - return; - } - List> inputs = logs.getCloneLogs(); - FileChartManager.getInstance().getLogListQueue().putLog(inputs); - } - - @Override - public void clear() { - treeComp.clear(); - } - - @Override - public Control getControl() { - return treeComp; - } - - @Override - public void setSelection(List data) { - if (null == data || data.isEmpty()) { - return; - } - - String filePath = data.get(LogCenterConstants.RESOURCE_FILE_PATH_INDEX); - Grid tree = ((DAFileChart) getControl()).getTree(); - GridItem[] items = tree.getItems(); - - int size = items.length; - for (int i = 0; i < size; i++) { - DATableDataFormat tableData = (DATableDataFormat) items[i] - .getData(); - FileChartItemData chartItem = (FileChartItemData) tableData - .getObject(); - String itemPath = chartItem.getPath(); - - if (filePath.equals(itemPath)) { - tree.setSelection(i); - break; - } - } - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileDataMaker.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileDataMaker.java deleted file mode 100644 index effa96f..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileDataMaker.java +++ /dev/null @@ -1,409 +0,0 @@ -package org.tizen.dynamicanalyzer.ui.file; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.ui.file.chart.FileTimelineData; -import org.tizen.dynamicanalyzer.ui.summary.failed.FailedChecker; -import org.tizen.dynamicanalyzer.ui.summary.failed.FailedData; -import org.tizen.dynamicanalyzer.ui.summary.leaks.LeakDetector; -import org.tizen.dynamicanalyzer.ui.summary.warning.WarningCase; -import org.tizen.dynamicanalyzer.ui.summary.warning.WarningChecker; -import org.tizen.dynamicanalyzer.ui.summary.warning.WarningData; -import org.tizen.dynamicanalyzer.ui.timeline.chart.FileChart; -import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; - -public class FileDataMaker { - private List fileList = null; - private HashMap fileRegister = null; - private HashMap fdRegister = null; - private List fileTimelineDataList = null; - - private final int TYPE_OPEN = 1; - private final int TYPE_CLOSE = 2; - - private int openApiCount = 0; - private int closeApiCount = 0; - private int openCount = 0; - - private int seq = 0; - - private FailedChecker failedChecker = null; - @SuppressWarnings("unused") - private LeakDetector leakDetector = null; // for leak check upgrade - private WarningChecker warningChecker = null; - - public FileDataMaker(FailedChecker failedChecker, - LeakDetector leakDetector, WarningChecker warningChecker) { - - this.failedChecker = failedChecker; - this.leakDetector = leakDetector; - this.warningChecker = warningChecker; - - fileList = new ArrayList(); - fileRegister = new HashMap(); - fdRegister = new HashMap(); - fileTimelineDataList = new ArrayList(); - - openApiCount = 0; - closeApiCount = 0; - openCount = 0; - seq = 0; - } - - public void clear() { - fileList.clear(); - fileRegister.clear(); - fdRegister.clear(); - fileTimelineDataList.clear(); - } - - public List getFileTimelineDataList() { - if (null == fileTimelineDataList) { - fileTimelineDataList = new ArrayList(); - } - return fileTimelineDataList; - } - - public List getFileList() { - if (null == fileList) { - fileList = new ArrayList(); - } - return fileList; - } - - public HashMap getFileRegister() { - if (null == fileRegister) { - fileRegister = new HashMap(); - } - return fileRegister; - } - - private HashMap getFDRegister() { - if (null == fdRegister) { - fdRegister = new HashMap(); - } - return fdRegister; - } - - public void makeData(List> inputs) { - int size = inputs.size(); - for (int i = 0; i < size; i++) { - List input = inputs.get(i); - if (AnalyzerUtil.isInternal(input, false)) { - continue; - } - String fdType = input.get(LogCenterConstants.RESOURCE_FDTYPE_INDEX); - String seqNum = input.get(LogCenterConstants.SEQUENCE_NUMBER_INDEX); - // socket - int type = Integer.parseInt(fdType); - if (type == 1 || type == 2) { - continue; - } - - String fdApiType = input - .get(LogCenterConstants.RESOURCE_FDAPITYPE_INDEX); - String path = input - .get(LogCenterConstants.RESOURCE_FILE_PATH_INDEX); - String fd = input.get(LogCenterConstants.RESOURCE_FDVALUE_INDEX); - String err = input.get(LogCenterConstants.ERROR_INDEX); - long errno = Long.parseLong(err); - String name = input.get(LogCenterConstants.APINAME_INDEX); - - // error check - if (errno != 0) { - FailedData ffd = new FailedData(input); - if (fdApiType.equals(LogCenterConstants.FD_API_TYPE_READ) - || fdApiType - .equals(LogCenterConstants.FD_API_TYPE_WRITE)) { - FileChartItemData fcid = getFDRegister().get(fd); - if (null == fcid) { - ffd = null; - continue; - } - path = fcid.getParentKey(); - if (path.isEmpty()) { - // FIXME : why? - System.out.println(); - } - fcid.getFailedData().add(ffd); - } - FileChartItemData parent = getFileRegister().get(path); - if (null == parent) { - parent = createNewFileData(path); - } - parent.getFailedData().add(ffd); - failedChecker.getFailedList().add(ffd); - continue; - } else if (name.equals("fdopen")) { //$NON-NLS-1$ - continue; - } - - // open, fopen - if (fdApiType.equals(LogCenterConstants.FD_API_TYPE_OPEN)) { - FileChartItemData fciData = getFileRegister().get(path); - if (null != fciData) { - try { - warningCheck(fciData, input, TYPE_OPEN); - } catch (Exception e) { - e.printStackTrace(); - } - } - - if (null == fciData) { - // parent = file ItemData - fciData = createNewFileData(path); - // create Data - FileChartData innerData = new FileChartData(); - long openTime = Long.parseLong(input - .get(LogCenterConstants.TIME_INDEX)); - innerData.setOpenTime(openTime); - fciData.getData().add(innerData); - innerData.getInput().addAll(input); - - // child = fd - FileChartItemData child = new FileChartItemData(fd, seq++); - FileChartData childInnerData = new FileChartData(); - childInnerData.setOpenTime(openTime); - childInnerData.getRelations().add(seqNum); - child.getData().add(childInnerData); - fciData.getChildern().add(child); - child.setParentKey(fciData.getKey()); - getFDRegister().put(fd, child); - child.setColsed(false); - } else { - if (fciData.isClosed() || fciData.getData().isEmpty()) { - // create Data - FileChartData fcData = new FileChartData(); - long openTime = Long.parseLong(input - .get(LogCenterConstants.TIME_INDEX)); - fcData.setOpenTime(openTime); - fciData.getData().add(fcData); - fciData.setColsed(false); - // FIXME DEBUG - fcData.getInput().addAll(input); - } - - // child = fd - FileChartItemData child = fciData.getFindChild(fd); - if (null == child) { - child = new FileChartItemData(fd, seq++); - child.setParentKey(fciData.getKey()); - fciData.getChildern().add(child); - } - long openTime = Long.parseLong(input - .get(LogCenterConstants.TIME_INDEX)); - FileChartData childInnerData = new FileChartData(); - childInnerData.setOpenTime(openTime); - childInnerData.getRelations().add(seqNum); - child.getData().add(childInnerData); - getFDRegister().put(fd, child); - child.setColsed(false); - } - // file timeline data create - openApiCount++; - openCount++; - FileTimelineData ftd = new FileTimelineData( - input.get(LogCenterConstants.TIME_INDEX), openApiCount, - closeApiCount, openCount); - getFileTimelineDataList().add(ftd); - FileChart.getInstance().setFDCount(ftd.getOpenCount()); - // close - } else if (fdApiType.equals(LogCenterConstants.FD_API_TYPE_CLOSE)) { - - FileChartItemData child = getFDRegister().get(fd); - if (null == child) { - continue; - } - long closeTime = Long.parseLong(input - .get(LogCenterConstants.TIME_INDEX)); - child.getLastData().setCloseTime(closeTime); - child.getLastData().getRelations().add(seqNum); - child.setColsed(true); - getFDRegister().remove(fd); - long useTime = child.getTotalFileUseTime(); - child.setTotalFileUseTime(closeTime - - child.getLastData().getOpenTime() + useTime); - - String parentKey = child.getParentKey(); - FileChartItemData fileData = getFileRegister().get(parentKey); - long pUseTime = fileData.getTotalFileUseTime(); - fileData.setTotalFileUseTime(pUseTime + closeTime - - child.getLastData().getOpenTime()); - - // warning check - warningCheck(fileData, input, TYPE_CLOSE); - - if (fileData.isAllChildrenClosed()) { - fileData.getLastData().setCloseTime(closeTime); - fileData.setColsed(true); - } - - // file timeline data create - closeApiCount++; - openCount--; - FileTimelineData ftd = new FileTimelineData( - input.get(LogCenterConstants.TIME_INDEX), openApiCount, - closeApiCount, openCount); - getFileTimelineDataList().add(ftd); - FileChart.getInstance().setFDCount(ftd.getOpenCount()); - - // read / write - } else if (fdApiType.equals(LogCenterConstants.FD_API_TYPE_READ) - || fdApiType.equals(LogCenterConstants.FD_API_TYPE_WRITE)) { - if (printCalledFunctionChart(input) == false) { - continue; - } - - // calculate read/write size - FileChartItemData child = getFDRegister().get(fd); - FileChartItemData parent = getFileRegister().get( - child.getParentKey()); - - String rwSizeStr1 = input - .get(LogCenterConstants.RESOURCE_SIZE_INDEX); - long rwSize = Long.parseLong(rwSizeStr1); - if (fdApiType.equals(LogCenterConstants.FD_API_TYPE_READ)) { - long rSize = child.getReadSize(); - child.setReadSize(rSize + rwSize); - long prSize = parent.getReadSize(); - parent.setReadSize(child.getReadSize() + prSize); - } else if (fdApiType - .equals(LogCenterConstants.FD_API_TYPE_WRITE)) { - String strTotalSize = input - .get(LogCenterConstants.RESOURCE_FILE_SIZE_INDEX); - if (strTotalSize.equals("?") == false) { - long totalSize = Long.parseLong(strTotalSize); - child.setTotalSize(totalSize); - } - - long wSize = child.getWriteSize(); - child.setWriteSize(wSize + rwSize); - long pwSize = parent.getWriteSize(); - parent.setWriteSize(child.getWriteSize() + pwSize); - } - } else // / Other - { - if (printCalledFunctionChart(input) == false) { - continue; - } - } - } - } - - private boolean printCalledFunctionChart(List input) { - - String seqNum = input.get(LogCenterConstants.SEQUENCE_NUMBER_INDEX); - String path = input.get(LogCenterConstants.RESOURCE_FILE_PATH_INDEX); - String fd = input.get(LogCenterConstants.RESOURCE_FDVALUE_INDEX); - - // Print Called Function - File Chart Except( Open, close, Error ) - FailedData ffd = new FailedData(input); - - FileChartItemData fcid = getFDRegister().get(fd); - if (null == fcid) { - ffd = null; - return false; - } - path = fcid.getParentKey(); - if (path.isEmpty()) { - System.out.println(); - } - fcid.getCalledFunctionData().add(ffd); - - FileChartItemData parentCalled = getFileRegister().get(path); - if (null == parentCalled) { - parentCalled = createNewFileData(path); - } - parentCalled.getCalledFunctionData().add(ffd); - AnalyzerManager.getCalledFunctionChecker().getFailedList().add(ffd); - - // Insert File API List - Table - FileChartItemData child = getFDRegister().get(fd); - if (null == child) { - return false; - } - child.getLastData().getRelations().add(seqNum); - - // Print API Range - FileChartItemData parent = getFileRegister().get(child.getParentKey()); - try { - long time = Long - .parseLong(input.get(LogCenterConstants.TIME_INDEX)); - if (child.getLastData().getFirstTime() < 0) { - child.getLastData().setFirstTime(time); - child.getLastData().setLastTime(time); - } else { - child.getLastData().setLastTime(time); - } - - if (parent.getLastData().getFirstTime() < 0) { - parent.getLastData().setFirstTime(time); - parent.getLastData().setLastTime(time); - } else { - parent.getLastData().setLastTime(time); - } - - } catch (NullPointerException e) { - System.out.println("PrintCalledFunctionChart Exception"); //$NON-NLS-1$ - e.printStackTrace(); - } - - return true; - } - - private void warningCheck(FileChartItemData file, List input, - int type) { - if (type == TYPE_CLOSE) { - long firstTime = file.getLastData().getFirstTime(); - if (firstTime < 0) { - if (!warningChecker.isChecked(file.getKey(), - WarningCase.WITHOUT_USING.getType())) { - WarningData wData = new WarningData( - LogCenterConstants.LOG_RESOURCE, - WarningCase.WITHOUT_USING.getType(), input, - file.getKey()); - warningChecker.getWarningData().add(wData); - } - } - - } else if (type == TYPE_OPEN) { - if (!file.isClosed()) { - if (!warningChecker.isChecked(file.getKey(), - WarningCase.DUPLICATE_OPEN.getType())) { - WarningData wData = new WarningData( - LogCenterConstants.LOG_RESOURCE, - WarningCase.DUPLICATE_OPEN.getType(), input, - file.getKey()); - warningChecker.getWarningData().add(wData); - } - } - } - - long closedTime = 0; - if (null != file.getLastData()) { - closedTime = file.getLastData().getCloseTime(); - } - - if (closedTime < 0) { - closedTime = ToolbarArea.getInstance().getTime(); - } - - } - - private FileChartItemData createNewFileData(String path) { - String[] splitPath = path.split("\\/"); //$NON-NLS-1$ - String fileName = new String(splitPath[splitPath.length - 1]); - FileChartItemData newFileData = new FileChartItemData(path, seq++); - newFileData.setFileName(fileName); - newFileData.setPath(path); - getFileList().add(newFileData); - getFileRegister().put(path, newFileData); - newFileData.setParent(); - return newFileData; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileDetailInfoView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileDetailInfoView.java deleted file mode 100644 index bba51ac..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileDetailInfoView.java +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.file; - -import org.eclipse.nebula.widgets.grid.GridItem; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Canvas; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.model.DAView; -import org.tizen.dynamicanalyzer.nl.AnalyzerLabels; -import org.tizen.dynamicanalyzer.nl.FilePageLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.FontResources; -import org.tizen.dynamicanalyzer.ui.file.chart.FileChartManager; -import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; -import org.tizen.dynamicanalyzer.utils.Formatter; - -public class FileDetailInfoView extends DAView { - - public static final String ID = FileDetailInfoView.class.getName(); - - private Canvas canvas = null; - private String fileName = AnalyzerLabels.EMPTY_STRING; - private String filePath = AnalyzerLabels.EMPTY_STRING; - // private String fileMode = ""; - private int totalSize = 0; - private int readSize = 0; - private int writeSize = 0; - private long totalUseTime = 0; - private int apiCount = 0; - private int failedApiCount = 0; - - int[] innerMaxWeight = { 0, 100 }; - int[] outerMaxWeight = { 0, 100 }; - - private void init() { - fileName = AnalyzerLabels.EMPTY_STRING; - filePath = AnalyzerLabels.EMPTY_STRING; - // fileMode = ""; - totalSize = 0; - readSize = 0; - writeSize = 0; - totalUseTime = 0; - apiCount = 0; - failedApiCount = 0; - } - - public FileDetailInfoView(Composite parent, int style) { - super(parent, style); - this.setLayout(new FillLayout()); - - ViewContainer viewContainer = new ViewContainer(this, true); - viewContainer.setTitleText(FilePageLabels.FILE_DETAILS_TITLE); - setMaxWeight(innerMaxWeight, outerMaxWeight); - - Composite contents = viewContainer.getContentArea(); - contents.setBackground(ColorResources.VIEW_BG_COLOR); - contents.setLayout(new FillLayout()); - canvas = new Canvas(contents, SWT.TRANSPARENT); - canvas.addPaintListener(new PaintListener() { - - @Override - public void paintControl(PaintEvent e) { - int x = 0; - int y = 0; - Rectangle rect = canvas.getBounds(); - e.gc.setBackground(ColorResources.VIEW_BG_COLOR); - e.gc.fillRectangle(rect.x, rect.y, rect.width, rect.height); - e.gc.setForeground(ColorResources.TABLE_CONTENTS_FONT_COLOR); - e.gc.setFont(FontResources.DETAIL_INFO_FONT); - - String fName = FilePageLabels.FILE_DETAILS_FILE_NAME + fileName; - Point textSize = e.gc.textExtent(fName, SWT.DRAW_MNEMONIC); - if (textSize.x > rect.width) { - fName = FilePageLabels.FILE_DETAILS_FILE_NAME_NEWLINE - + fileName; - } - int fontHeight = textSize.y + 5; - e.gc.drawString(fName, x += 10, y += fontHeight); - - // file path bolck - { - String pathLabel = FilePageLabels.FILE_DETAILS_FILE_PATH; - e.gc.drawString(pathLabel, x, y + fontHeight); - Point pathSize = e.gc.textExtent(pathLabel, - SWT.DRAW_MNEMONIC); - int xPos = x + pathSize.x; - int width = rect.width - xPos; - String text = filePath; - if (text.length() > 0) { - while (text.length() > 0) { - Point tSize = e.gc.textExtent(text, - SWT.DRAW_MNEMONIC); - String inputText = AnalyzerLabels.EMPTY_STRING; - if (tSize.x > width) { - int strLen = (width * text.length()) / tSize.x; - inputText += text.substring(0, strLen - 1); - text = text.substring(strLen - 1, text.length()); - } else { - inputText += text; - text = AnalyzerLabels.EMPTY_STRING; - } - e.gc.drawString(inputText, xPos, y += fontHeight); - } - } else { - y += fontHeight; - } - } - - e.gc.drawString(FilePageLabels.FILE_DETAILS_TOTAL_SIZE - + Integer.toString(totalSize), x, y += fontHeight); - e.gc.drawString( - FilePageLabels.FILE_DETAILS_READ_SIZE - + Integer.toString(readSize), x, - y += fontHeight); - e.gc.drawString(FilePageLabels.FILE_DETAILS_WRITE_SIZE - + Integer.toString(writeSize), x, y += fontHeight); - e.gc.drawString(FilePageLabels.FILE_DETAILS_TOTAL_USE_TIME - + Formatter.toTimeFormat(Long.toString(totalUseTime)), - x, y += fontHeight); - e.gc.drawString( - FilePageLabels.FILE_DETAILS_API_COUNT - + Integer.toString(apiCount), x, - y += fontHeight); - e.gc.drawString(FilePageLabels.FILE_DETAILS_FAILED_API_COUNT - + Integer.toString(failedApiCount), x, y += fontHeight); - - } - }); - } - - @Override - public void updateView(DASelectionData data) { - Object obj = data.getData(); - if (!(obj instanceof GridItem)) { - return; - } - GridItem ti = (GridItem) obj; - DATableDataFormat tableData = (DATableDataFormat) ti.getData(); - FileChartItemData item = (FileChartItemData) tableData.getObject(); - // FileChartItemData item = (FileChartItemData) ti.getData(); - // fileMode = ""; - totalSize = 0; - readSize = 0; - writeSize = 0; - apiCount = 0; - failedApiCount = 0; - if (!item.isParent()) { - item = FileChartManager.getInstance().getFileRegister() - .get(item.getParentKey()); - } - fileName = item.getFileName(); - filePath = item.getPath(); - int readSize = 0; - int writeSize = 0; - int totalSize = 0; - int size = item.getChildern().size(); - for (int i = 0; i < size; i++) { - FileChartItemData child = item.getChildern().get(i); - readSize += child.getReadSize(); - writeSize += child.getWriteSize(); - totalSize += child.getTotalSize(); - - for (int ii = 0; ii < child.getData().size(); ii++) { - apiCount += child.getData().get(ii).getRelations().size(); - } - } - failedApiCount = item.getFailedData().size(); - apiCount += failedApiCount; - this.readSize = readSize; - this.writeSize = writeSize; - this.totalSize = totalSize; - - totalUseTime = item.getTotalFileUseTime(); - canvas.redraw(); - } - - @Override - public Control getControl() { - return canvas; - } - - @Override - public void clear() { - init(); - canvas.redraw(); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FilePage.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FilePage.java deleted file mode 100644 index 7edb267..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FilePage.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.file; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.SashForm; -import org.eclipse.swt.events.ControlEvent; -import org.eclipse.swt.events.ControlListener; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.common.CommonConstants; -import org.tizen.dynamicanalyzer.common.DesignConstants; -import org.tizen.dynamicanalyzer.nl.AnalyzerLabels; -import org.tizen.dynamicanalyzer.ui.info.callstack.CallstackView; -import org.tizen.dynamicanalyzer.ui.info.snapshot.SnapshotView; -import org.tizen.dynamicanalyzer.ui.page.DAPageComposite; -import org.tizen.dynamicanalyzer.ui.widgets.DATabComposite; - -public class FilePage extends DAPageComposite { - public static final String ID = FilePage.class.getName(); - public static final String TAB_ID = ID + CommonConstants.UNDERBAR + "tab"; - - public final static int FILECHART_INDEX = 0; - public final static int FILE_API_LIST_INDEX = 1; - public final static int INFO_VIEW_INDEX = 2; - public final static int FILE_DETAIL = 3; - - // 10 : offset - private final double DEFAULT_WIDTH = DesignConstants.SNAPSHOT_VIEW_WIDTH + 10; - private final double DEFAULT_HEIGHT = DesignConstants.SNAPSHOT_VIEW_HEIGHT - + 10 + DesignConstants.VIEW_TITLEBAR_HEIGHT; - - SashForm baseForm; - SashForm leftForm; - SashForm rightForm; - - public FilePage(Composite parent, int style) { - super(parent, style); - name = AnalyzerLabels.COOLBAR_AREA_FILE; - this.setLayout(new FillLayout()); - - baseForm = new SashForm(this, SWT.HORIZONTAL); - baseForm.setLayout(new FillLayout()); - - leftForm = new SashForm(baseForm, SWT.VERTICAL); - FileChartView fileChartView = new FileChartView(leftForm, SWT.NONE); - addView(fileChartView); - FileApiListView fileApiListView = new FileApiListView(leftForm, - SWT.NONE); - addView(fileApiListView); - - leftForm.setWeights(new int[] { 60, 40 }); - - rightForm = new SashForm(baseForm, SWT.VERTICAL); - DATabComposite tabView = new DATabComposite(rightForm, SWT.NONE); - addView(tabView); - { - SnapshotView snapshotView = new SnapshotView( - tabView.getContentComposite(), SWT.NONE, false); - snapshotView.setObservingViews(new String[] { FileApiListView.ID }); - tabView.addView(snapshotView); - - CallstackView callstack = new CallstackView( - tabView.getContentComposite(), SWT.NONE); - callstack.setObservingViews(new String[] { FileApiListView.ID }); - tabView.addView(callstack); - } - - // FILE_DETAIL = 3; - FileDetailInfoView detailInfo = new FileDetailInfoView(rightForm, - SWT.NONE); - addView(detailInfo); - - rightForm.setWeights(new int[] { 50, 50 }); - - baseForm.setWeights(new int[] { 75, 25 }); - - this.addControlListener(new ControlListener() { - - @Override - public void controlResized(ControlEvent e) { - Composite composite = (Composite) e.widget; - Rectangle rect = composite.getBounds(); - int pageWidth = rect.width; - int pageHeight = rect.height; - - int wRate = (int) (DEFAULT_WIDTH * 100 / pageWidth); - int hRate = (int) (DEFAULT_HEIGHT * 100 / pageHeight); - wRate = (wRate >= 100) ? 100 : wRate; - hRate = (hRate >= 100) ? 100 : hRate; - - baseForm.setWeights(new int[] { 100 - wRate, wRate }); - rightForm.setWeights(new int[] { hRate, 100 - hRate }); - } - - @Override - public void controlMoved(ControlEvent e) { - } - }); - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/chart/DAFileChart.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/chart/DAFileChart.java deleted file mode 100644 index 9e62b8f..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/chart/DAFileChart.java +++ /dev/null @@ -1,557 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.file.chart; - -import java.util.ArrayList; -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.SWT; -import org.eclipse.swt.events.ControlEvent; -import org.eclipse.swt.events.ControlListener; -import org.eclipse.swt.events.MouseEvent; -import org.eclipse.swt.events.MouseListener; -import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.layout.FormAttachment; -import org.eclipse.swt.layout.FormData; -import org.eclipse.swt.layout.FormLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.ScrollBar; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.model.LogCenter; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.FontResources; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.ui.file.FileApiListView; -import org.tizen.dynamicanalyzer.ui.file.FileChartItemData; -import org.tizen.dynamicanalyzer.ui.file.FileChartView; -import org.tizen.dynamicanalyzer.ui.file.FileDetailInfoView; -import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea; -import org.tizen.dynamicanalyzer.ui.widgets.DAScaleRenderer; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableEmptyCellRenderer; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableEmptyColumnHeaderRenderer; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; -import org.tizen.dynamicanalyzer.widgets.scale.DAScale; -import org.tizen.dynamicanalyzer.widgets.scale.DAScaleSelectionListener; - -public class DAFileChart extends Composite { - - protected Grid tree; - protected Composite hScrollComp; - protected ScrollBar hScroll; - protected DAScale scale; - protected int fileColumnWidth = 0; - private int itemCount = 0; - protected int id = -1; - protected LogCenter logc; - private boolean treeTable = false; - private int[] colSize = null; - protected boolean columnResizing = true; - protected int hScrollMax = 0; - protected List selectionIndex; - protected HashMap selection; - private HashMap expandMap = null; - - private int[] selections = null; - - public DAFileChart(Composite parent, int style, int tableStyle) { - super(parent, style); - this.setLayout(new FormLayout()); - this.setBackground(ColorResources.TABLE_CONTENTS_NORMAL); - - hScrollComp = new Composite(this, SWT.H_SCROLL); - hScrollComp.setBackground(ColorResources.TABLE_CONTENTS_NORMAL); - hScrollComp.setLayout(new FillLayout()); - - scale = new DAScale(this, SWT.NONE); - scale.addSelectionListener(scaleSelectionListener); - scale.setMinimum(0); - scale.setMaximum(2); - scale.setLeftImage(ImageResources.SCALE_CONTROL_MINUS); - scale.setRightImage(ImageResources.SCALE_CONTROL_PLUS); - scale.setThumbImage(ImageResources.SCALE_CONTROL_THUMB); - scale.setRenderer(new DAScaleRenderer()); - - hScroll = hScrollComp.getHorizontalBar(); - hScroll.setMaximum(hScrollMax); - hScroll.setMinimum(0); - hScroll.setSelection(0); - hScroll.setVisible(true); - hScroll.addSelectionListener(scrollbarSelectionListener); - - tree = new Grid(this, tableStyle); - tree.setHeaderVisible(true); - tree.setLinesVisible(true); - tree.setLineColor(ColorResources.TABLE_LINE); - tree.setBackground(ColorResources.TABLE_CONTENTS_NORMAL); - tree.setForeground(ColorResources.RED); - tree.setFont(FontResources.TABLE_HEADER_FONT); - - tree.setEmptyColumnHeaderRenderer(new DATableEmptyColumnHeaderRenderer()); - tree.setEmptyCellRenderer(new DATableEmptyCellRenderer()); - - tree.setItemHeight(FileChartManager.FILE_CHART_HEIGHT); - - tree.addControlListener(new ControlListener() { - - @Override - public void controlResized(ControlEvent e) { - columnResizing = true; - } - - @Override - public void controlMoved(ControlEvent e) { - // TODO Auto-generated method stub - } - }); - tree.addPaintListener(new PaintListener() { - - @Override - public void paintControl(PaintEvent e) { - if (columnResizing) { - Rectangle rect = tree.getClientArea(); - fileColumnWidth = rect.width - - FileChartManager.FILE_CHART_FIRST_COLUMN_WIDTH - - 2; - setColumnSize(new int[] { - FileChartManager.FILE_CHART_FIRST_COLUMN_WIDTH, - fileColumnWidth }); - columnResizing = false; - hScroll.setThumb(fileColumnWidth); - } - } - }); - - tree.addSelectionListener(new SelectionListener() { - - @Override - public void widgetSelected(SelectionEvent e) { - updateDetailsView(); - GridItem[] ti = tree.getSelection(); - if (ti == null || ti.length == 0) { - return; - } - selections = tree.getSelectionIndices(); - DATableDataFormat tableData = (DATableDataFormat) ti[0] - .getData(); - if (!(tableData.getObject() instanceof FileChartItemData)) { - return; - } - DASelectionData data = new DASelectionData(FileChartView.ID, 0, - 0, ti[0], tree); - AnalyzerManager.getCurrentPage().updatePage(data); - } - - @Override - public void widgetDefaultSelected(SelectionEvent e) { - - } - }); - - tree.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 - updateDetailsView(); - - } - - @Override - public void mouseDoubleClick(MouseEvent e) { - GridItem[] items = (GridItem[]) tree.getSelection(); - if (null == items || items.length == 0) { - return; - } - GridItem item = items[0]; - if (item.isExpanded()) { - setExpand(item, false); - } else { - setExpand(item, true); - } - updateTree(); - } - }); - - tree.addListener(SWT.Expand, new Listener() { - - @Override - public void handleEvent(Event event) { - GridItem item = (GridItem) event.item; - setExpand(item, true); - } - }); - tree.addListener(SWT.Collapse, new Listener() { - @Override - public void handleEvent(Event event) { - GridItem item = (GridItem) event.item; - setExpand(item, false); - } - }); - - FormData data = new FormData(); - data.left = new FormAttachment(0, 0); - data.right = new FormAttachment(100, 0); - data.top = new FormAttachment(0, 0); - data.bottom = new FormAttachment(100, -20); - tree.setLayoutData(data); - - data = new FormData(); - data.left = new FormAttachment(0, 0); - data.width = FileChartManager.FILE_CHART_FIRST_COLUMN_WIDTH; - data.top = new FormAttachment(tree, 0); - data.bottom = new FormAttachment(100, 0); - scale.setLayoutData(data); - - data = new FormData(); - data.left = new FormAttachment(scale, 0); - data.right = new FormAttachment(100, 0); - data.top = new FormAttachment(tree, 0); - data.bottom = new FormAttachment(100, 0); - hScrollComp.setLayoutData(data); - } - - public void setColumns(String[] columnNames) { - int size = columnNames.length; - for (int i = 0; i < size; i++) { - GridColumn column = new GridColumn(tree, SWT.NONE); - column.setText(columnNames[i]); - column.setCellRenderer(new DAFileChartCellRenderer()); - column.setHeaderRenderer(new DAFileChartHeaderRenderer()); - if (treeTable && i == 0) { - column.setTree(true); - column.setResizeable(false); - } else if (i == 1) { - column.setData("chart"); //$NON-NLS-1$ - } - column.pack(); - if (i == 1) { - column.addControlListener(new ControlListener() { - - @Override - public void controlResized(ControlEvent e) { - GridColumn column = (GridColumn) e.widget; - int width = column.getWidth(); - colSize[1] = width; - } - - @Override - public void controlMoved(ControlEvent e) { - // TODO Auto-generated method stub - - } - }); - } - } - } - - public void setColumnSize(int[] columnSizes) { - if (null == tree || null == columnSizes) { - return; - } - colSize = columnSizes; - int size = columnSizes.length; - GridColumn[] columns = tree.getColumns(); - if (size != columns.length) { - return; - } - - for (int i = 0; i < size; i++) { - if (columnSizes[i] == 0) { - columns[i].pack(); - } else { - columns[i].setWidth(columnSizes[i]); - } - } - } - - public void setId(int id) { - this.id = id; - } - - public void setTree(boolean tree) { - treeTable = tree; - } - - public void updateFileChart() { - if (tree.getItemCount() > 0) { - int max = hScroll.getMaximum(); - hScroll.setSelection(max); - } - - updateTree(); - } - - private void updateTree() { - selections = tree.getSelectionIndices(); - - if (fileColumnWidth == 0) { - Rectangle rect = tree.getClientArea(); - fileColumnWidth = rect.width - - FileChartManager.FILE_CHART_FIRST_COLUMN_WIDTH - 2; - } - long currentTime = ToolbarArea.getInstance().getTime(); - int currentWidth = AnalyzerUtil.getWidth(currentTime); - int maxWidth = currentWidth; - if (fileColumnWidth > maxWidth) { - maxWidth = fileColumnWidth; - } - hScroll.setMaximum(maxWidth); - hScroll.setThumb(fileColumnWidth); - int selection = hScroll.getSelection(); - long start = AnalyzerUtil.getWidthToTime(selection); - long thumb = AnalyzerUtil.getWidthToTime(fileColumnWidth); - - // FIXME : margin offset needed - long end = 0; - if (currentTime < thumb) { - end = currentTime; - } else { - end = start + thumb + 100000000; - } - - FileChartManager.getInstance().setStartTime(start); - FileChartManager.getInstance().setEndTime(end); - - List output = FileChartManager.getInstance() - .getFileList(); - if (null == output || output.isEmpty()) { - return; - } - tree.removeAll(); - int size = output.size(); - - for (int i = 0; i < size; i++) { - GridItem treeItem = new GridItem(tree, SWT.NONE); - FileChartItemData parent = output.get(i); - int seq = output.get(i).getSeq(); - - DATableDataFormat tableData = new DATableDataFormat( - Integer.toString(seq)); - tableData.setObject(parent); - treeItem.setData(tableData); - treeItem.setToolTipText(1, parent.getKey()); - - Object expand = getExpandMap().get(seq); - if (null == expand) { - expandMap.put(seq, treeItem.isExpanded()); - } else { - treeItem.setExpanded((Boolean) expand); - } - - List fdList = output.get(i).getChildern(); - int childSize = fdList.size(); - if (childSize < 2) { - continue; - } - try { - for (int ci = 0; ci < childSize; ci++) { - FileChartItemData child = fdList.get(ci); - GridItem childTi = new GridItem(treeItem, SWT.NONE); - childTi.setToolTipText(1, child.getKey()); - DATableDataFormat childData = new DATableDataFormat( - Integer.toString(child.getSeq())); - childData.setObject(child); - childTi.setData(childData); - } - } catch (IndexOutOfBoundsException e) { - System.out.println("oops!!"); //$NON-NLS-1$ - e.printStackTrace(); - } - } - - if (null != selections) { - tree.setSelection(selections); - } - - updateDetailsView(); - } - - public void updateDetailsView() { - GridItem[] ti = tree.getSelection(); - if (ti == null || ti.length == 0) { - return; - } - - selections = tree.getSelectionIndices(); - DATableDataFormat tableData = (DATableDataFormat) ti[0].getData(); - if (!(tableData.getObject() instanceof FileChartItemData)) { - return; - } - - DASelectionData data = new DASelectionData(FileChartView.ID, 0, 0, - ti[0], tree); - List views = new ArrayList(); - views.add(FileDetailInfoView.ID); - AnalyzerManager.getCurrentPage().updateSelectedViews(data, views); - - } - - private HashMap getExpandMap() { - if (null == expandMap) { - expandMap = new HashMap(); - } - return expandMap; - } - - public HashMap getSelections() { - if (null == selection) { - selection = new HashMap(); - } - return selection; - } - - private void setExpand(GridItem item, boolean expand) { - DATableDataFormat tableData = (DATableDataFormat) item.getData(); - FileChartItemData data = (FileChartItemData) tableData.getObject(); - int seqNum = data.getSeq(); // leak sequence index - getExpandMap().remove(seqNum); - getExpandMap().put(seqNum, expand); - } - - public List getSelectionIndex() { - if (null == selectionIndex) { - selectionIndex = new ArrayList(); - } - return selectionIndex; - } - - public int getItemCount() { - if (0 == itemCount) { - Rectangle rect = tree.getClientArea(); - int itemHeight = tree.getItemHeight(); - itemCount = (rect.height - tree.getHeaderHeight()) / itemHeight - 1; - } - return itemCount; - } - - public void clear() { - tree.removeAll(); - getSelectionIndex().clear(); - getExpandMap().clear(); - getSelections().clear(); - FileChartManager.getInstance().clear(); - scale.setSelection(0); - } - - public void updateOtherView(int viewId) { - // FIXME : overhead check - GridItem[] sels = tree.getSelection(); - DASelectionData selData = new DASelectionData(FileChartView.ID, 0, 0, - sels, tree); - List views = new ArrayList(); - views.add(FileApiListView.ID); - if (sels.length > 0) { - AnalyzerManager.getCurrentPage() - .updateSelectedViews(selData, views); - } - } - - public Grid getTree() { - return tree; - } - - private SelectionListener scrollbarSelectionListener = new SelectionListener() { - - @Override - public void widgetSelected(SelectionEvent e) { - updateTree(); - if (tree.getItems().length == 0) { - tree.redraw(); - } - } - - @Override - public void widgetDefaultSelected(SelectionEvent e) { - // TODO Auto-generated method stub - - } - }; - - // private SelectionListener scaleSelectionListener = new - // SelectionListener() { - private DAScaleSelectionListener scaleSelectionListener = new DAScaleSelectionListener() { - - @Override - public void widgetSelected() { - int sel = scale.getSelection(); - if (sel == 0) { - FileChartManager.setScale(1); - } else if (sel == 1) { - FileChartManager.setScale(5); - } else if (sel == 2) { - FileChartManager.setScale(10); - } - - updateTree(); - if (tree.getItems().length == 0) { - tree.redraw(); - } - } - }; - - // @Override - // public void widgetSelected(SelectionEvent e) { - // int sel = scale.getSelection(); - // if (sel == 0) { - // FileChartManager.setScale(1); - // } else if (sel == 1) { - // FileChartManager.setScale(5); - // } else if (sel == 2) { - // FileChartManager.setScale(10); - // } - // - // updateTree(); - // if (tree.getItems().length == 0) { - // tree.redraw(); - // } - // } - // - // @Override - // public void widgetDefaultSelected(SelectionEvent e) { - // System.out.print("15\n"); - // } - // }; -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/chart/DAFileChartCellRenderer.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/chart/DAFileChartCellRenderer.java deleted file mode 100644 index 615fca6..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/chart/DAFileChartCellRenderer.java +++ /dev/null @@ -1,581 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.file.chart; - -import java.util.List; - -import org.eclipse.nebula.widgets.grid.AbstractRenderer; -import org.eclipse.nebula.widgets.grid.GridItem; -import org.eclipse.nebula.widgets.grid.IInternalWidget; -import org.eclipse.nebula.widgets.grid.internal.CheckBoxRenderer; -import org.eclipse.nebula.widgets.grid.internal.DefaultCellRenderer; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.ui.file.FileChartData; -import org.tizen.dynamicanalyzer.ui.file.FileChartItemData; -import org.tizen.dynamicanalyzer.ui.summary.failed.FailedData; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; - - -public class DAFileChartCellRenderer extends DefaultCellRenderer { - int leftMargin = 4; - int rightMargin = 4; - int topMargin = 0; - int bottomMargin = 0; - int textTopMargin = 5; - int textBottomMargin = 2; - int insideMargin = 3; - int treeIndent = 20; - - long start = 0; - long end = 0; - - private AbstractRenderer toggleRenderer; - private CheckBoxRenderer checkRenderer; - - @Override - public void paint(GC gc, Object value) { - start = FileChartManager.getInstance().getStartTime(); - end = FileChartManager.getInstance().getEndTime(); - - GridItem item = (GridItem) value; - DATableDataFormat tableData = (DATableDataFormat) item.getData(); - FileChartItemData data = (FileChartItemData) tableData.getObject(); - - gc.setFont(item.getFont(getColumn())); - - boolean drawAsSelected = isSelected(); - - boolean drawBackground = true; - - if (isCellSelected()) { - drawAsSelected = true;// (!isCellFocus()); - } - - if (drawAsSelected) { - gc.setBackground(ColorResources.FILE_CHART_SELECTION_BG_END); - gc.setForeground(ColorResources.FILE_CHART_SELECTION_BG_START); - } else { - if (item.getParent().isEnabled()) { - Color bg = item.getBackground(); - if (bg != null) { - if (data.isParent()) { - gc.setForeground(ColorResources.FILE_CHART_PARENT_BG_START); - gc.setBackground(ColorResources.FILE_CHART_PARENT_BG_END); - } else { - gc.setForeground(ColorResources.FILE_CHART_CHILD_BG_START); - gc.setBackground(ColorResources.FILE_CHART_CHILD_BG_END); - } - } else { - drawBackground = false; - } - } else { - gc.setBackground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); - } - } - - if (drawBackground) { - gc.fillRectangle(getBounds().x, getBounds().y, getBounds().width, getBounds().height); - } - - int x = leftMargin; - - if (isTree()) { - x += getToggleIndent(item); - if (drawAsSelected) { - toggleRenderer.setSelected(true); - } else { - toggleRenderer.setSelected(false); - } - toggleRenderer.setExpanded(item.isExpanded()); - - toggleRenderer.setHover(getHoverDetail().equals("toggle")); //$NON-NLS-1$ - - toggleRenderer.setLocation(getBounds().x + x, - (getBounds().height - toggleRenderer.getBounds().height) / 2 - + getBounds().y); - toggleRenderer.paint(gc, value); - - x += toggleRenderer.getBounds().width + insideMargin; - - } - - if (isCheck()) { - - checkRenderer.setChecked(item.getChecked(getColumn())); - checkRenderer.setGrayed(item.getGrayed(getColumn())); - if (!item.getParent().isEnabled()) { - checkRenderer.setGrayed(true); - } - checkRenderer.setHover(getHoverDetail().equals("check")); //$NON-NLS-1$ - - checkRenderer.setBounds(getBounds().x + x, - (getBounds().height - checkRenderer.getBounds().height) / 2 - + getBounds().y, checkRenderer.getBounds().width, - checkRenderer.getBounds().height); - checkRenderer.paint(gc, null); - - x += checkRenderer.getBounds().width + insideMargin; - } - - Image image = item.getImage(getColumn()); - if (image != null) { - int y = getBounds().y; - - y += (getBounds().height - image.getBounds().height) / 2; - - gc.drawImage(image, getBounds().x + x, y); - - x += image.getBounds().width + insideMargin; - } - - if (drawAsSelected) { - gc.setForeground(ColorResources.BLACK); - } else { - Color fg = item.getForeground(getColumn()); - if (null == fg || fg.equals(ColorResources.BLACK)) { - gc.setForeground(ColorResources.WHITE); - } else { - gc.setForeground(fg); - } - } - - if (getColumn() == 1) { - drawRects(gc, data, getBounds()); - } - - if (item.getParent().getLinesVisible()) { - if (isCellSelected()) { - gc.setForeground(ColorResources.TABLE_LINE); - } else { - gc.setForeground(ColorResources.TABLE_LINE); - } - gc.drawLine(getBounds().x, getBounds().y + getBounds().height, getBounds().x - + getBounds().width - 1, getBounds().y + getBounds().height); - gc.drawLine(getBounds().x + getBounds().width - 1, getBounds().y, getBounds().x - + getBounds().width - 1, getBounds().y + getBounds().height); - } - - if (isCellFocus()) { - Rectangle focusRect = - new Rectangle(getBounds().x - 1, getBounds().y - 1, getBounds().width, - getBounds().height + 1); - - gc.setForeground(ColorResources.RED); - gc.drawRectangle(focusRect); - - if (isFocus()) { - focusRect.x++; - focusRect.width -= 2; - focusRect.y++; - focusRect.height -= 2; - - gc.drawRectangle(focusRect); - } - } - } - - private void drawRects(GC gc, FileChartItemData data, Rectangle rect) { - - - List fcData = data.getData(); - int size = fcData.size(); - - - - int x = rect.x + FileChartManager.FILE_CHART_START_MARGIN; - int y = (rect.y + 7); - long startTime = start; - Color pStartColor = null; - Color pEndColor = null; - - - - for (int i = 0; i < size; i++) - { - long openTime = fcData.get(i).getOpenTime(); - long closeTime = fcData.get(i).getCloseTime(); - long firstTime = fcData.get(i).getFirstTime(); - long lastTime = fcData.get(i).getLastTime(); - - - int px = x; - int py = y; - int pWidth = 0; - int height = rect.height - 14; - - if (openTime > startTime) { - px += AnalyzerUtil.getWidth(openTime - startTime); - } - - // not closed - if (closeTime < 0) { - if (startTime > openTime) { - pWidth = AnalyzerUtil.getWidth(end - startTime); - } else { - pWidth = AnalyzerUtil.getWidth(end - openTime); - } - pStartColor = FileChartManager.getFileOpenStartColor(); - pEndColor = FileChartManager.getFileOpenEndColor(); - } else if (startTime > closeTime) { - continue; - } else if (end - closeTime >= 0) { - if (startTime > openTime) { - pWidth = AnalyzerUtil.getWidth(closeTime - startTime); - } else { - pWidth = AnalyzerUtil.getWidth(closeTime - openTime); - } - pStartColor = ColorResources.FILE_CLOSED_START; - pEndColor = ColorResources.FILE_CLOSED_END; - } else { - if (startTime > openTime) { - pWidth = AnalyzerUtil.getWidth(end - startTime); - } else { - pWidth = AnalyzerUtil.getWidth(end - openTime); - } - pStartColor = ColorResources.FILE_CLOSED_START; - pEndColor = ColorResources.FILE_CLOSED_END; - } - - int cx = x; - int cy = y; - int cWidth = 0; - if (firstTime >= 0) { - if (startTime - firstTime < 0) { - cx += AnalyzerUtil.getWidth(firstTime - startTime); - } - - if (lastTime < 0) { - if (startTime > firstTime) { - cWidth = AnalyzerUtil.getWidth(end - startTime); - } else { - cWidth = AnalyzerUtil.getWidth(end - firstTime); - } - } else if (end - lastTime >= 0) { - // if (startTime > openTime) { - if (startTime > firstTime) { - cWidth = AnalyzerUtil.getWidth(lastTime - startTime); - } else { - cWidth = AnalyzerUtil.getWidth(lastTime - firstTime); - } - } else { - if (startTime > firstTime) { - cWidth = AnalyzerUtil.getWidth(end - startTime); - } else { - cWidth = AnalyzerUtil.getWidth(end - firstTime); - } - } - } - - Rectangle parentRect = new Rectangle(px, py, pWidth, height); - gc.setForeground(pStartColor); - gc.setBackground(pEndColor); - gc.fillGradientRectangle(parentRect.x, parentRect.y, parentRect.width, parentRect.height, true); - - Rectangle childRect = new Rectangle(cx, cy, cWidth, height); - gc.setForeground(ColorResources.FILE_USED_START); - gc.setBackground(ColorResources.FILE_USED_END); - gc.fillGradientRectangle(childRect.x, childRect.y, childRect.width, childRect.height, true); - - if (closeTime > 0) { - startTime = closeTime; - x = px + pWidth; - } - } // draw fileData - - - - - List fileFailedList = data.getFailedData(); - size = fileFailedList.size(); - startTime = start; - x = rect.x + FileChartManager.FILE_CHART_START_MARGIN; - y = (rect.y + 7); - for (int i = 0; i < size; i++) { - int fx = x; - int fy = y; - int fWidth = 1; - int height = rect.height - 14; - - FailedData ffd = fileFailedList.get(i); - long time = Long.parseLong(ffd.getLogData(LogCenterConstants.TIME_INDEX)); - - if (startTime < time && time < end) { - fx += AnalyzerUtil.getWidth(time - startTime); - - Rectangle failedRect = new Rectangle(fx, fy, fWidth, height); - gc.setForeground(ColorResources.FILE_FAILED_START); - gc.setBackground(ColorResources.FILE_FAILED_END); - gc.fillGradientRectangle(failedRect.x, failedRect.y, failedRect.width,failedRect.height, true); - } - } - - - - List fileCalledFunctionList = data.getCalledFunctionData(); - size = fileCalledFunctionList.size(); - startTime = start; - x = rect.x + FileChartManager.FILE_CHART_START_MARGIN; - y = (rect.y + 7); - - for (int i = 0; i < size; i++) { - int fx = x; - int fy = y; - int fWidth = 1; - int height = rect.height - 14; - - FailedData ffd = fileCalledFunctionList.get(i); - - long time = Long.parseLong(ffd.getLogData(LogCenterConstants.TIME_INDEX)); - - if (startTime < time && time < end) - { - fx += AnalyzerUtil.getWidth(time - startTime); - Rectangle failedRect = new Rectangle(fx-1, fy, fWidth+1, height); - - String strApiName = ffd.getData().get(LogCenterConstants.RESOURCE_FDAPITYPE_INDEX); - Color[] pAPiColor = getFileAPiColorBright( strApiName ); - gc.setForeground( pAPiColor[0] ); - gc.setBackground( pAPiColor[1] ); - - - gc.fillGradientRectangle(failedRect.x, failedRect.y, failedRect.width,failedRect.height, true); - } - } - - } - - - - public static Color[] getFileAPiColorBright( String strApiName ) - { - Color[] pApiColor = new Color[2]; - if ( strApiName.endsWith(LogCenterConstants.FD_API_TYPE_READ) ){ - pApiColor[0] = ColorResources.FILE_READ_START; - pApiColor[1] = ColorResources.FILE_READ_END; - } - else if ( strApiName.endsWith(LogCenterConstants.FD_API_TYPE_WRITE) ){ - pApiColor[0] = ColorResources.FILE_WRITE_START; - pApiColor[1] = ColorResources.FILE_WRITE_END; - } - else{ - pApiColor[0] = ColorResources.FILE_OTHER_START; - pApiColor[1] = ColorResources.FILE_OTHER_END; - } - - return pApiColor; - } - - - - private int getToggleIndent(GridItem item) { - return item.getLevel() * 20; - } - - public void setTree(boolean tree) { - super.setTree(tree); - - if (tree) { - toggleRenderer = new DAFileChartToggleRenderer(); - toggleRenderer.setDisplay(getDisplay()); - } - } - - public Point computeSize(GC gc, int wHint, int hHint, Object value) { - GridItem item = (GridItem) value; - gc.setFont(item.getFont(getColumn())); - int x = 0; - - x += leftMargin; - - if (isTree()) { - x += getToggleIndent(item); - x += toggleRenderer.getBounds().width + insideMargin; - } - - if (isCheck()) { - x += checkRenderer.getBounds().width + insideMargin; - } - - int y = 0; - Image image = item.getImage(getColumn()); - if (image != null) { - y = topMargin + image.getBounds().height + bottomMargin; - - x += image.getBounds().width + insideMargin; - } - - x += gc.stringExtent(item.getText(getColumn())).x + rightMargin; - y = Math.max(y, topMargin + gc.getFontMetrics().getHeight() + bottomMargin); - - return new Point(x, y); - } - - public boolean notify(int event, Point point, Object value) { - GridItem item = (GridItem) value; - if (isCheck()) { - if (event == IInternalWidget.MouseMove) { - if (overCheck(item, point)) { - setHoverDetail("check"); //$NON-NLS-1$ - return true; - } - } - - if (event == IInternalWidget.LeftMouseButtonDown) { - if (overCheck(item, point)) { - item.setChecked(getColumn(), !item.getChecked(getColumn())); - item.getParent().redraw(); - item.fireCheckEvent(getColumn()); - - return true; - } - } - } - - if (isTree() && item.hasChildren()) { - if (event == IInternalWidget.MouseMove) { - if (overToggle(item, point)) { - setHoverDetail("toggle"); //$NON-NLS-1$ - return true; - } - } - - if (event == IInternalWidget.LeftMouseButtonDown) { - if (overToggle(item, point)) { - item.setExpanded(!item.isExpanded()); - item.getParent().redraw(); - - if (item.isExpanded()) { - item.fireEvent(SWT.Expand); - } else { - item.fireEvent(SWT.Collapse); - } - - return true; - } - } - } - - return false; - } - - private boolean overCheck(GridItem item, Point point) { - point = new Point(point.x, point.y); - point.x -= getBounds().x - 1; - point.y -= getBounds().y - 1; - - int x = leftMargin; - if (isTree()) { - x += getToggleIndent(item); - x += toggleRenderer.getSize().x + insideMargin; - } - - if (point.x >= x && point.x < (x + checkRenderer.getSize().x)) { - int yStart = ((getBounds().height - checkRenderer.getBounds().height) / 2); - if (point.y >= yStart && point.y < yStart + checkRenderer.getSize().y) { - return true; - } - } - - return false; - } - - private boolean overToggle(GridItem item, Point point) { - point = new Point(point.x, point.y); - point.x -= getBounds().x - 1; - point.y -= getBounds().y - 1; - - int x = leftMargin; - x += getToggleIndent(item); - - if (point.x >= x && point.x < (x + toggleRenderer.getSize().x)) { - // return true; - int yStart = ((getBounds().height - toggleRenderer.getBounds().height) / 2); - if (point.y >= yStart && point.y < yStart + toggleRenderer.getSize().y) { - return true; - } - } - - return false; - } - - public void setCheck(boolean check) { - super.setCheck(check); - - if (check) { - checkRenderer = new CheckBoxRenderer(); - checkRenderer.setDisplay(getDisplay()); - } else { - checkRenderer = null; - } - } - - public Rectangle getTextBounds(GridItem item, boolean preferred) { - int x = leftMargin; - - if (isTree()) { - x += getToggleIndent(item); - - x += toggleRenderer.getBounds().width + insideMargin; - - } - - if (isCheck()) { - x += checkRenderer.getBounds().width + insideMargin; - } - - Image image = item.getImage(getColumn()); - if (image != null) { - x += image.getBounds().width + insideMargin; - } - - Rectangle bounds = new Rectangle(x, topMargin, 0, 0); - - GC gc = new GC(item.getParent()); - gc.setFont(item.getFont(getColumn())); - Point size = gc.stringExtent(item.getText(getColumn())); - - bounds.height = size.y; - - if (preferred) { - bounds.width = size.x; - } else { - bounds.width = getBounds().width - x - rightMargin; - } - - gc.dispose(); - - return bounds; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/chart/DAFileChartHeaderRenderer.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/chart/DAFileChartHeaderRenderer.java deleted file mode 100644 index 77e9294..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/chart/DAFileChartHeaderRenderer.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.file.chart; - -import org.eclipse.nebula.widgets.grid.GridColumn; -import org.eclipse.nebula.widgets.grid.internal.DefaultColumnHeaderRenderer; -import org.eclipse.nebula.widgets.grid.internal.SortArrowRenderer; -import org.eclipse.nebula.widgets.grid.internal.TextUtils; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.widgets.Display; -import org.tizen.dynamicanalyzer.common.CommonConstants; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.FontResources; -import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; - -public class DAFileChartHeaderRenderer extends DefaultColumnHeaderRenderer { - - int leftMargin = 6; - - int rightMargin = 6; - - int topMargin = 3; - - int bottomMargin = 3; - - int arrowMargin = 6; - - int imageSpacing = 3; - - private SortArrowRenderer arrowRenderer = new SortArrowRenderer(); - - public void setDisplay(Display display) { - super.setDisplay(display); - arrowRenderer.setDisplay(display); - } - - @Override - public void paint(GC gc, Object value) { - paint(gc, (GridColumn) value); - } - - public void paint(GC gc, GridColumn column) { - - boolean flat = (column.getParent().getCellSelectionEnabled() && !column - .getMoveable()); - - boolean drawSelected = ((isMouseDown() && isHover())); - - // column bg color - gc.setBackground(ColorResources.TABLE_HEADER_BG); - - if (flat && isSelected()) { - gc.setBackground(column.getParent() - .getCellHeaderSelectionBackground()); - } - - Rectangle r = getBounds(); - gc.fillRectangle(r.x, r.y, r.width, r.height); - gc.setForeground(ColorResources.TABLE_LINE); - gc.drawLine(r.x - 1, r.y, r.x - 1, r.y + r.height); - gc.drawLine(r.x - 1, r.y + r.height, r.x + r.width, r.y + r.height); - - int pushedDrawingOffset = 0; - if (drawSelected) { - pushedDrawingOffset = 1; - } - - int x = leftMargin; - - if (column.getImage() != null) { - gc.drawImage(column.getImage(), getBounds().x + x - + pushedDrawingOffset, getBounds().y + topMargin - + pushedDrawingOffset); - x += column.getImage().getBounds().width + imageSpacing; - } - - int width = getBounds().width - x; - - if (column.getSort() == SWT.NONE) { - width -= rightMargin; - } else { - width -= arrowMargin + arrowRenderer.getSize().x + arrowMargin; - } - - String data = (String) column.getData(); - if (null != data && !data.isEmpty()) { - drawGradation(gc); - } else { - // font color - gc.setForeground(ColorResources.TABLE_HEADER_FONT_COLOR); - - int y = getBounds().y + getBounds().height - bottomMargin - - gc.getFontMetrics().getHeight(); - - gc.drawString( - TextUtils.getShortString(gc, column.getText(), width), - getBounds().x + x + pushedDrawingOffset, y - + pushedDrawingOffset, true); - } - - if (column.getSort() != SWT.NONE) { - arrowRenderer.setSelected(column.getSort() == SWT.UP); - if (drawSelected) { - arrowRenderer.setLocation( - getBounds().x + getBounds().width - arrowMargin - - arrowRenderer.getBounds().width + 1, - getBounds().y - + ((getBounds().height - arrowRenderer - .getBounds().height) / 2) + 1); - } else { - arrowRenderer.setLocation( - getBounds().x + getBounds().width - arrowMargin - - arrowRenderer.getBounds().width, - getBounds().y - + ((getBounds().height - arrowRenderer - .getBounds().height) / 2)); - } - arrowRenderer.paint(gc, null); - } - } - - private void drawGradation(GC gc) { - long time = ToolbarArea.getInstance().getTime(); - int totalWidth = AnalyzerUtil.getWidth(time); - String stringTime = null; - long tickTime = FileChartManager.getInstance().getStartTime(); - - int pixelSize = (int) FileChartManager.getChartPixel(); - Rectangle rect = getBounds(); - int chartStartPosX = rect.x + FileChartManager.FILE_CHART_START_MARGIN; - gc.setForeground(ColorResources.FILE_CHART_GRADATION_COLOR); - gc.drawLine(chartStartPosX, rect.y + rect.height - 1, rect.x - + rect.width, rect.y + rect.height - 1); - totalWidth = (totalWidth > rect.width) ? totalWidth : rect.width; - - // FIXME : 10 means margin - int x = chartStartPosX; - int y = rect.y; - int h = rect.height; - - int size = totalWidth / pixelSize + 1; - - gc.setFont(FontResources.TIMELINE_TICK_FONT); - int offset = offsetTime(tickTime); - int start = offset; - size += offset; - long underSecond = tickTime - % (long) FileChartManager.DEFAULT_BLOCK_TIME; - int margin = getXmargin(underSecond); - x -= margin; - - for (int i = start; i < size; i++) { - stringTime = makeTickTime(tickTime); - Point p = gc.textExtent(stringTime, SWT.DRAW_MNEMONIC); - if (x >= chartStartPosX) { - if (0 == i % 10) { - gc.setForeground(ColorResources.FILE_CHART_GRADATION_COLOR); - gc.drawLine(x, h - 7, x, h - 1); - gc.setForeground(ColorResources.TABLE_HEADER_FONT_COLOR); - gc.drawText(stringTime, x - p.x / 2, y); - } else if (0 == i % 5) { - gc.setForeground(ColorResources.FILE_CHART_GRADATION_COLOR); - gc.drawLine(x, h - 5, x, h - 1); - if (FileChartManager.getScale() != 1) { - gc.setForeground(ColorResources.TABLE_HEADER_FONT_COLOR); - gc.drawText(stringTime, x - p.x / 2, y); - } - } else { - gc.setForeground(ColorResources.FILE_CHART_GRADATION_COLOR); - gc.drawLine(x, h - 3, x, h - 1); - if (FileChartManager.getScale() == 10) { - gc.setForeground(ColorResources.TABLE_HEADER_FONT_COLOR); - gc.drawText(stringTime, x - p.x / 2, y); - } - } - } - - x += pixelSize; - tickTime += FileChartManager.DEFAULT_BLOCK_TIME; - } - } - - private String makeTickTime(long time) { - String ret = null; - long frontTime = time / (60 * 1000 * 1000); - long nextTime = (time - frontTime * 60 * 1000 * 1000) / (1000 * 1000); - - ret = digitMapping(frontTime) + CommonConstants.COLON - + digitMapping(nextTime); - return ret; - } - - private int getXmargin(long time) { - double pixel = FileChartManager.getChartPixel(); - int ret = (int) (pixel * time / FileChartManager.DEFAULT_BLOCK_TIME); - return ret; - } - - private int offsetTime(long time) { - long frontTime = time / (60 * 1000 * 1000); - long nextTime = (time - frontTime * 60 * 1000 * 1000) / (1000 * 1000); - return (int) (nextTime % 10); - - } - - private String digitMapping(long time) { - String stringTime = Long.toString(time); - if (stringTime.length() >= 2) { - return stringTime; - } - return CommonConstants.EMPTY + 0 + stringTime; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/chart/DAFileChartToggleRenderer.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/chart/DAFileChartToggleRenderer.java deleted file mode 100644 index e279ced..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/chart/DAFileChartToggleRenderer.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.file.chart; - -import org.eclipse.nebula.widgets.grid.AbstractRenderer; -import org.eclipse.nebula.widgets.grid.GridItem; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Font; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.tizen.dynamicanalyzer.nl.FilePageLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.FontResources; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.ui.file.FileChartItemData; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; - - -public class DAFileChartToggleRenderer extends AbstractRenderer { - - public DAFileChartToggleRenderer() { - super(); - setSize(11, 9); - } - - public void paint(GC gc, Object value) { - GridItem item = (GridItem) value; - DATableDataFormat tableData = (DATableDataFormat) item.getData(); - Object obj = tableData.getObject(); - int childCount = 0; - String childCountStr = ""; //$NON-NLS-1$ - int childCountOffset = 0; - - String text = ""; //$NON-NLS-1$ - Font font = item.getFont(0); - if (null == font) { - gc.setFont(FontResources.TABLE_CELL_FONT); - } else { - gc.setFont(font); - } - - if (obj instanceof FileChartItemData) { - // file chart - FileChartItemData fuData = (FileChartItemData) obj; - String[] pathStr = fuData.getKey().split("\\/"); //$NON-NLS-1$ - text = pathStr[pathStr.length - 1]; - if (null != fuData.getParentKey()) { - if (false == text.contains(FilePageLabels.FILE_CHART_TOGGLE_RENDERER_OBJ)) - text = FilePageLabels.FILE_CHART_TOGGLE_RENDERER_FD + text; - else - text = FilePageLabels.FILE_CHART_TOGGLE_RENDERER_OBJECT; - } else { - childCount = fuData.getChildern().size(); - if (childCount > 1) { - childCountStr = " " + "(" + Integer.toString(childCount) //$NON-NLS-1$ //$NON-NLS-2$ - + ")"; //$NON-NLS-1$ - Point p = gc.textExtent(childCountStr, SWT.DRAW_MNEMONIC); - childCountOffset = p.x; - } - } - } - - if (item.hasChildren()) { - if (isExpanded()) { - Rectangle r = ImageResources.TREE_OPEN.getBounds(); - int offset = (getBounds().width - r.width) / 2; - int x = getBounds().x + offset; - gc.drawImage(ImageResources.TREE_OPEN, x, getBounds().y); - x += r.width + 5; - if (isSelected()) { - gc.setForeground(ColorResources.FILE_CHART_SELECTED_FONT_COLOR); - } else { - gc.setForeground(ColorResources.FILE_CHART_NORMAL_FONT_COLOR); - } - text = checkRange(gc, text, x + childCountOffset) + childCountStr; - gc.drawText(text, x, getBounds().y, true); - } else { - Rectangle r = ImageResources.TREE_FOLD.getBounds(); - int offset = (getBounds().width - r.width) / 2; - int x = getBounds().x + offset; - gc.drawImage(ImageResources.TREE_FOLD, getBounds().x + offset, getBounds().y); - x += r.width + 5; - if (isSelected()) { - gc.setForeground(ColorResources.FILE_CHART_SELECTED_FONT_COLOR); - } else { - gc.setForeground(ColorResources.FILE_CHART_NORMAL_FONT_COLOR); - } - text = checkRange(gc, text, x + childCountOffset) + childCountStr; - gc.drawText(text, x, getBounds().y, true); - } - } else { - Rectangle r = ImageResources.TREE_OPEN.getBounds(); - int offset = (getBounds().width - r.width) / 2; - int x = getBounds().x + offset; - x += r.width; - if (isSelected()) { - gc.setForeground(ColorResources.FILE_CHART_SELECTED_FONT_COLOR); - } else { - gc.setForeground(ColorResources.FILE_CHART_NORMAL_FONT_COLOR); - } - text = checkRange(gc, text, x); - gc.drawText(text, x, getBounds().y, true); - } - } - - private String checkRange(GC gc, String text, int offset) { - Point tSize = gc.textExtent(text, SWT.DRAW_MNEMONIC); - int width = FileChartManager.FILE_CHART_FIRST_COLUMN_WIDTH - offset - 10; - String inputText = ""; //$NON-NLS-1$ - if (tSize.x > width) { - int len = (width * text.length()) / tSize.x; - inputText += text.substring(0, len - 1); - text = inputText + FilePageLabels.FILE_CHART_TOGGLE_RENDERER_OMIT; - } - return text; - } - - /** - * {@inheritDoc} - */ - public Point computeSize(GC gc, int wHint, int hHint, Object value) { - return new Point(11, 9); - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/chart/FileChartManager.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/chart/FileChartManager.java deleted file mode 100644 index 5c27cd1..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/chart/FileChartManager.java +++ /dev/null @@ -1,518 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.file.chart; - -import java.util.HashMap; -import java.util.List; - -import org.eclipse.swt.graphics.Color; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.communicator.ResourceCommunicator; -import org.tizen.dynamicanalyzer.logparser.LogListQueue; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.ui.file.FileChartItemData; -import org.tizen.dynamicanalyzer.ui.file.FileDataMaker; - -public class FileChartManager implements Runnable { - - public final static int FILE_CHART_HEIGHT = 40; - public final static int FILE_CHART_FIRST_COLUMN_WIDTH = 125; - public final static int FILE_CHART_SECOND_COLUMN_WIDTH = 700; - public final static double DEFAULT_BLOCK = 1.; - public final static double DEFAULT_BLOCK_TIME = 1000000.; - private final static double DEFAULT_PIXEL = 5.0; - - public final static int FILE_CHART_START_MARGIN = 5; - - public static double chartPixel = DEFAULT_PIXEL; - private static int scale = 1; - private LogListQueue logListQueue = null; - private Thread updateLogThread = null; - - private FileDataMaker fileDataMaker = null; - private long start = 0; - private long end = 0; - - private static FileChartManager instance = null; - - public FileChartManager() { - fileDataMaker = new FileDataMaker(AnalyzerManager.getFailedChecker(), - AnalyzerManager.getLeakDetector(), - AnalyzerManager.getWarningChecker()); - } - - public static FileChartManager getInstance() { - if (null == instance) { - instance = new FileChartManager(); - } - return instance; - } - - public LogListQueue getLogListQueue() { - if (null == logListQueue) { - logListQueue = new LogListQueue(); - } - return logListQueue; - } - - public void startUpdateLogThread() { - if (null == updateLogThread || !updateLogThread.isAlive()) { - updateLogThread = new Thread(null, getInstance(), - AnalyzerConstants.FILE_CHART_MANAGER_THREAD); - updateLogThread.start(); - } - } - - public void stopUpdateLogThread() { - if (null != updateLogThread && updateLogThread.isAlive()) { - updateLogThread.interrupt(); - } - } - - public boolean isThreadAlive() { - if (null == updateLogThread || !updateLogThread.isAlive()) { - return false; - } - return true; - } - - public FileDataMaker getFileDataMaker() { - return fileDataMaker; - } - - /*** make file data thread ***/ - @Override - public void run() { - LogListQueue logListQueue = getInstance().getLogListQueue(); - while (true) { - try { - if (!logListQueue.isEmpty()) { - List> logs = logListQueue.getFirst(); - getInstance().getFileDataMaker().makeData(logs); - } else if (AnalyzerManager.isLogParsingComplete()) { - break; - } else { - Thread.sleep(AnalyzerConstants.LOG_CHECK_INTERVAL); - } - } catch (InterruptedException e) { - /** thread stop by interrupt */ - break; - } - } - - /* log for debug */ - System.out.println("file manager thread end!!"); //$NON-NLS-1$ - } - - public static Color getFileOpenStartColor() { - if (ResourceCommunicator.isRunning()) { - return ColorResources.FILE_OPEN_START_RUN; - } - return ColorResources.FILE_OPEN_START_STOP; - } - - public static Color getFileOpenEndColor() { - if (ResourceCommunicator.isRunning()) { - return ColorResources.FILE_OPEN_END_RUN; - } - return ColorResources.FILE_OPEN_END_STOP; - } - - public void clear() { - instance = null; - chartPixel = DEFAULT_PIXEL; - scale = 1; - fileDataMaker.clear(); - } - - public static void setScale(int sc) { - scale = sc; - } - - public static int getScale() { - return scale; - } - - public static double getChartPixel() { - return DEFAULT_PIXEL * scale; - } - - public static double getDefaultTime() { - return DEFAULT_BLOCK_TIME / (DEFAULT_BLOCK * getChartPixel()); - } - - public List getFileTimelineDataList() { - return fileDataMaker.getFileTimelineDataList(); - } - - public List getFileList() { - return fileDataMaker.getFileList(); - } - - public long getStartTime() { - return start; - } - - public void setStartTime(long start) { - this.start = start; - } - - public long getEndTime() { - return end; - } - - public void setEndTime(long end) { - this.end = end; - } - - public HashMap getFileRegister() { - return fileDataMaker.getFileRegister(); - } - - // private void makeData(List> inputs) { - // int size = inputs.size(); - // for (int i = 0; i < size; i++) { - // List input = inputs.get(i); - // if (AnalyzerUtil.isInternal(input, false)) { - // continue; - // } - // String fdType = input.get(LogCenterConstants.RESOURCE_FDTYPE_INDEX); - // String seqNum = input.get(LogCenterConstants.SEQUENCE_NUMBER_INDEX); - // // socket - // int type = Integer.parseInt(fdType); - // if (type == 1 || type == 2) { - // continue; - // } - // - // String fdApiType = input - // .get(LogCenterConstants.RESOURCE_FDAPITYPE_INDEX); - // String path = input - // .get(LogCenterConstants.RESOURCE_FILE_PATH_INDEX); - // String fd = input.get(LogCenterConstants.RESOURCE_FDVALUE_INDEX); - // String err = input.get(LogCenterConstants.ERROR_INDEX); - // long errno = Long.parseLong(err); - // String name = input.get(LogCenterConstants.APINAME_INDEX); - // - // // error check - // if (errno != 0) { - // FailedData ffd = new FailedData(input); - // if (fdApiType.equals(LogCenterConstants.FD_API_TYPE_READ) - // || fdApiType - // .equals(LogCenterConstants.FD_API_TYPE_WRITE)) { - // FileChartItemData fcid = getFDRegister().get(fd); - // if (null == fcid) { - // ffd = null; - // continue; - // } - // path = fcid.getParentKey(); - // if (path.isEmpty()) { - // // FIXME : why? - // System.out.println(); - // } - // fcid.getFailedData().add(ffd); - // } - // FileChartItemData parent = getFileRegister().get(path); - // if (null == parent) { - // parent = createNewFileData(path); - // } - // parent.getFailedData().add(ffd); - // AnalyzerManager.getFailedChecker().getFailedList().add(ffd); - // continue; - // } else if (name.equals("fdopen")) { //$NON-NLS-1$ - // continue; - // } - // - // // open, fopen - // if (fdApiType.equals(LogCenterConstants.FD_API_TYPE_OPEN)) { - // FileChartItemData fciData = getFileRegister().get(path); - // if (null != fciData) { - // try { - // warningCheck(fciData, input, TYPE_OPEN); - // } catch (Exception e) { - // e.printStackTrace(); - // } - // } - // - // if (null == fciData) { - // // parent = file ItemData - // fciData = createNewFileData(path); - // // create Data - // FileChartData innerData = new FileChartData(); - // long openTime = Long.parseLong(input - // .get(LogCenterConstants.TIME_INDEX)); - // innerData.setOpenTime(openTime); - // fciData.getData().add(innerData); - // innerData.getInput().addAll(input); - // - // // child = fd - // FileChartItemData child = new FileChartItemData(fd, seq++); - // FileChartData childInnerData = new FileChartData(); - // childInnerData.setOpenTime(openTime); - // childInnerData.getRelations().add(seqNum); - // child.getData().add(childInnerData); - // fciData.getChildern().add(child); - // child.setParentKey(fciData.getKey()); - // getFDRegister().put(fd, child); - // child.setColsed(false); - // } else { - // if (fciData.isClosed() || fciData.getData().isEmpty()) { - // // create Data - // FileChartData fcData = new FileChartData(); - // long openTime = Long.parseLong(input - // .get(LogCenterConstants.TIME_INDEX)); - // fcData.setOpenTime(openTime); - // fciData.getData().add(fcData); - // fciData.setColsed(false); - // // FIXME DEBUG - // fcData.getInput().addAll(input); - // } - // - // // child = fd - // FileChartItemData child = fciData.getFindChild(fd); - // if (null == child) { - // child = new FileChartItemData(fd, seq++); - // child.setParentKey(fciData.getKey()); - // fciData.getChildern().add(child); - // } - // long openTime = Long.parseLong(input - // .get(LogCenterConstants.TIME_INDEX)); - // FileChartData childInnerData = new FileChartData(); - // childInnerData.setOpenTime(openTime); - // childInnerData.getRelations().add(seqNum); - // child.getData().add(childInnerData); - // getFDRegister().put(fd, child); - // child.setColsed(false); - // } - // // file timeline data create - // openApiCount++; - // openCount++; - // FileTimelineData ftd = new FileTimelineData( - // input.get(LogCenterConstants.TIME_INDEX), openApiCount, - // closeApiCount, openCount); - // getFileTimelineDataList().add(ftd); - // FileChart.getInstance().setFDCount(ftd.getOpenCount()); - // // close - // } else if (fdApiType.equals(LogCenterConstants.FD_API_TYPE_CLOSE)) { - // - // FileChartItemData child = getFDRegister().get(fd); - // if (null == child) { - // continue; - // } - // long closeTime = Long.parseLong(input - // .get(LogCenterConstants.TIME_INDEX)); - // child.getLastData().setCloseTime(closeTime); - // child.getLastData().getRelations().add(seqNum); - // child.setColsed(true); - // getFDRegister().remove(fd); - // long useTime = child.getTotalFileUseTime(); - // child.setTotalFileUseTime(closeTime - // - child.getLastData().getOpenTime() + useTime); - // - // String parentKey = child.getParentKey(); - // FileChartItemData fileData = getFileRegister().get(parentKey); - // long pUseTime = fileData.getTotalFileUseTime(); - // fileData.setTotalFileUseTime(pUseTime + closeTime - // - child.getLastData().getOpenTime()); - // - // // warning check - // warningCheck(fileData, input, TYPE_CLOSE); - // - // if (fileData.isAllChildrenClosed()) { - // fileData.getLastData().setCloseTime(closeTime); - // fileData.setColsed(true); - // } - // - // // file timeline data create - // closeApiCount++; - // openCount--; - // FileTimelineData ftd = new FileTimelineData( - // input.get(LogCenterConstants.TIME_INDEX), openApiCount, - // closeApiCount, openCount); - // getFileTimelineDataList().add(ftd); - // FileChart.getInstance().setFDCount(ftd.getOpenCount()); - // - // // read / write - // } else if (fdApiType.equals(LogCenterConstants.FD_API_TYPE_READ) - // || fdApiType.equals(LogCenterConstants.FD_API_TYPE_WRITE)) { - // - // System.out.print("Read Write " + input + "\n"); - // - // if (PrintCalledFunctionChart(input) == false) { - // continue; - // } - // - // // calculate read/write size - // FileChartItemData child = getFDRegister().get(fd); - // FileChartItemData parent = getFileRegister().get( - // child.getParentKey()); - // - // String rwSizeStr1 = input - // .get(LogCenterConstants.RESOURCE_SIZE_INDEX); - // long rwSize = Long.parseLong(rwSizeStr1); - // if (fdApiType.equals(LogCenterConstants.FD_API_TYPE_READ)) { - // long rSize = child.getReadSize(); - // child.setReadSize(rSize + rwSize); - // long prSize = parent.getReadSize(); - // parent.setReadSize(child.getReadSize() + prSize); - // } else if (fdApiType - // .equals(LogCenterConstants.FD_API_TYPE_WRITE)) { - // String strTotalSize = input - // .get(LogCenterConstants.RESOURCE_FILE_SIZE_INDEX); - // if (strTotalSize.equals("?") == false) { - // long totalSize = Long.parseLong(strTotalSize); - // child.setTotalSize(totalSize); - // } - // - // long wSize = child.getWriteSize(); - // child.setWriteSize(wSize + rwSize); - // long pwSize = parent.getWriteSize(); - // parent.setWriteSize(child.getWriteSize() + pwSize); - // } - // } else // / Other - // { - // // System.out.print(" Other "+input+"\n"); - // if (PrintCalledFunctionChart(input) == false) { - // continue; - // } - // } - // } - // } - // - // private boolean PrintCalledFunctionChart(List input) { - // - // String seqNum = input.get(LogCenterConstants.SEQUENCE_NUMBER_INDEX); - // String path = input.get(LogCenterConstants.RESOURCE_FILE_PATH_INDEX); - // String fd = input.get(LogCenterConstants.RESOURCE_FDVALUE_INDEX); - // - // // Print Called Function - File Chart Except( Open, close, Error ) - // FailedData ffd = new FailedData(input); - // - // FileChartItemData fcid = getFDRegister().get(fd); - // if (null == fcid) { - // ffd = null; - // return false; - // } - // path = fcid.getParentKey(); - // if (path.isEmpty()) { - // System.out.println(); - // } - // fcid.getCalledFunctionData().add(ffd); - // - // FileChartItemData parentCalled = getFileRegister().get(path); - // if (null == parentCalled) { - // parentCalled = createNewFileData(path); - // } - // parentCalled.getCalledFunctionData().add(ffd); - // AnalyzerManager.getCalledFunctionChecker().getFailedList().add(ffd); - // - // // Insert File API List - Table - // FileChartItemData child = getFDRegister().get(fd); - // if (null == child) { - // return false; - // } - // child.getLastData().getRelations().add(seqNum); - // - // // Print API Range - // FileChartItemData parent = getFileRegister().get(child.getParentKey()); - // try { - // long time = Long - // .parseLong(input.get(LogCenterConstants.TIME_INDEX)); - // if (child.getLastData().getFirstTime() < 0) { - // child.getLastData().setFirstTime(time); - // child.getLastData().setLastTime(time); - // } else { - // child.getLastData().setLastTime(time); - // } - // - // if (parent.getLastData().getFirstTime() < 0) { - // parent.getLastData().setFirstTime(time); - // parent.getLastData().setLastTime(time); - // } else { - // parent.getLastData().setLastTime(time); - // } - // - // } catch (NullPointerException e) { - // System.out.println("PrintCalledFunctionChart Exception"); //$NON-NLS-1$ - // e.printStackTrace(); - // } - // - // return true; - // } - - // private void warningCheck(FileChartItemData file, List input, - // int type) { - // WarningChecker warningChecker = AnalyzerManager.getWarningChecker(); - // if (type == TYPE_CLOSE) { - // long firstTime = file.getLastData().getFirstTime(); - // if (firstTime < 0) { - // if (!warningChecker.isChecked(file.getKey(), - // WarningCase.WITHOUT_USING.getType())) { - // WarningData wData = new WarningData( - // LogCenterConstants.LOG_RESOURCE, - // WarningCase.WITHOUT_USING.getType(), input, - // file.getKey()); - // warningChecker.getWarningData().add(wData); - // } - // } - // - // } else if (type == TYPE_OPEN) { - // if (!file.isClosed()) { - // if (!warningChecker.isChecked(file.getKey(), - // WarningCase.DUPLICATE_OPEN.getType())) { - // WarningData wData = new WarningData( - // LogCenterConstants.LOG_RESOURCE, - // WarningCase.DUPLICATE_OPEN.getType(), input, - // file.getKey()); - // warningChecker.getWarningData().add(wData); - // } - // } - // } - // - // long closedTime = 0; - // if (null != file.getLastData()) { - // closedTime = file.getLastData().getCloseTime(); - // } - // - // if (closedTime < 0) { - // closedTime = ToolbarArea.getInstance().getTime(); - // } - // - // } - // - // private FileChartItemData createNewFileData(String path) { - // String[] splitPath = path.split("\\/"); //$NON-NLS-1$ - // String fileName = new String(splitPath[splitPath.length - 1]); - // FileChartItemData newFileData = new FileChartItemData(path, seq++); - // newFileData.setFileName(fileName); - // newFileData.setPath(path); - // getFileList().add(newFileData); - // getFileRegister().put(path, newFileData); - // newFileData.setParent(); - // return newFileData; - // } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/chart/FileTimelineData.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/chart/FileTimelineData.java deleted file mode 100644 index 427c48c..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/chart/FileTimelineData.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.file.chart; - -import org.tizen.dynamicanalyzer.nl.FilePageLabels; - -public class FileTimelineData { - private String time = null; - - private int openApiCount = 0; - private int closeApiCount = 0; - // open fd count - private int openCount = 0; - - public FileTimelineData(String time, int open, int close, int fdCount) { - this.time = time; - openApiCount = open; - closeApiCount = close; - openCount = fdCount; - } - - public String getTime() { - return time; - } - - public void setTime(String time) { - this.time = time; - } - - public int getOpenApiCount() { - return openApiCount; - } - - public void setOpenApiCount(int openApiCount) { - this.openApiCount = openApiCount; - } - - public int getCloseApiCount() { - return closeApiCount; - } - - public void setCloseApiCount(int closeApiCount) { - this.closeApiCount = closeApiCount; - } - - public int getOpenCount() { - return openCount; - } - - public void setOpenCount(int openCount) { - this.openCount = openCount; - } - - @Override - public String toString() { - return FilePageLabels.FILE_TIMELINE_DATA_STR1 + time + FilePageLabels.FILE_TIMELINE_DATA_STR2 + openApiCount - + FilePageLabels.FILE_TIMELINE_DATA_STR3 + closeApiCount - + FilePageLabels.FILE_TIMELINE_DATA_STR4 + openCount; - }; -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/callstack/CallStackData.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/callstack/CallStackData.java deleted file mode 100644 index 2a34e20..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/callstack/CallStackData.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.info.callstack; - -import java.util.ArrayList; -import java.util.List; - -public class CallStackData { - protected int seq; - protected List addrs; - - public CallStackData(int seqNum) { - seq = seqNum; - } - - public int getSeq() { - return seq; - } - - public List getAddrs() { - if (null == addrs) { - addrs = new ArrayList(); - } - return addrs; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/callstack/CallStackManager.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/callstack/CallStackManager.java deleted file mode 100644 index 11482d7..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/callstack/CallStackManager.java +++ /dev/null @@ -1,527 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * WooJin Jung - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.info.callstack; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.SymbolManager; -import org.tizen.dynamicanalyzer.communicator.DACommunicator; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.logparser.LogParser; -import org.tizen.dynamicanalyzer.nl.InformationViewLabels; -import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfiler; -import org.tizen.dynamicanalyzer.ui.summary.profiling.ProfileDataMaker; - -public class CallStackManager { - class DuplicateUserCall { - private CallStackUnit dupCallstackUnit = null; - private int dupCallcount = 0; - - public DuplicateUserCall(CallStackUnit callStackUnit) { - dupCallstackUnit = callStackUnit; - dupCallcount = 1; - } - - public CallStackUnit getDupCallstackUnit() { - return dupCallstackUnit; - } - - public int getDupCallCount() { - return dupCallcount; - } - - public void increaseDupCallCount() { - dupCallcount++; - } - - public void decreaseDupCallCount() { - dupCallcount--; - } - } - - private static CallStackManager instance; - private HashMap callstackApiByAddrMap; - private HashMap callstackDataBySeqMap; - private String userFunctionBin = null; - private HashMap> userCallstackByTidMap; - private HashMap dupUserCallByTidMap; - - public static CallStackManager getInstance() { - if (null == instance) { - instance = new CallStackManager(); - } - return instance; - } - - public void makeUserCallstack(String[] input) { - HashMap addrMap = getCallStackApiByAddrMap(); - boolean isPieBuild = AnalyzerManager.getProject().isPieBuild(); - String baseAddr = AnalyzerManager.getProject().getBaseAddress(); - String binPath = AnalyzerManager.getProject().getBinaryPath(); - if (null == binPath || binPath.isEmpty()) { - return; - } - String strSelfAddr = input[LogCenterConstants.PCADDR_INDEX]; - String strCallerAddr = input[LogCenterConstants.CALLER_PCADDR_INDEX]; - String strSeq = input[LogCenterConstants.SEQUENCE_NUMBER_INDEX]; - String strTid = input[LogCenterConstants.THREAD_ID_INDEX]; - - int seq = Integer.parseInt(strSeq); - int tid = Integer.parseInt(strTid); - - long selfAddr = Long.parseLong(strSelfAddr); - long callerAddr = Long.parseLong(strCallerAddr); - - // if (!AnalyzerManager.isInBinaryRange(callerAddr)) { - // return; - // } - CallStackData callstackData = new CallStackData(seq); - CallStackUnit selfCallstackUnit = addrMap.get(selfAddr); - - if (null == selfCallstackUnit) { - String strSelfFuncName = SymbolManager.addr2func(binPath, - strSelfAddr, isPieBuild, baseAddr); - String strSelfSymbol = getUserFunctionPosition() - + AnalyzerConstants.CALLSTACK_API_TOKEN_STRING - + strSelfFuncName; - selfCallstackUnit = new CallStackUnit(selfAddr, strSelfSymbol); - addrMap.put(selfAddr, selfCallstackUnit); - } - - // insert call count - // FunctionUsageProfiler profiler = AnalyzerManager - // .getFunctionUserProfiler(); - ProfileDataMaker profiler = FunctionUsageProfiler.getInstance() - .getProfileDataMaker(); - profiler.makeFupDataForCallTrace(selfCallstackUnit, input); - - List userCallstack = getUserCallstack(tid); - int size = userCallstack.size(); - - CallStackUnit callerCallstackUnit = addrMap.get(callerAddr); - if (null == callerCallstackUnit) { - String strCallerFuncName = SymbolManager.addr2func(binPath, - strCallerAddr, isPieBuild, baseAddr); - String strCallerSymbol = getUserFunctionPosition() - + AnalyzerConstants.CALLSTACK_API_TOKEN_STRING - + strCallerFuncName; - callerCallstackUnit = new CallStackUnit(callerAddr, strCallerSymbol); - addrMap.put(callerAddr, callerCallstackUnit); - } - - String strEventType = input[LogCenterConstants.USER_FUNCTION_TYPE_INDEX]; - int eventType = Integer.parseInt(strEventType); - - if (eventType == LogCenterConstants.USER_FUNCTION_EVENT_TYPE_ENTER) { - if (size == 0) { - userCallstack.add(selfCallstackUnit); - } else { - if (!AnalyzerManager.isInBinaryRange(strCallerAddr)) { - CallStackUnit callbackApi = new CallStackUnit( - LogCenterConstants.USER_FUNCTION_CALLBACK_FUNC_ADDR, - LogCenterConstants.USER_FUNCTION_CALLBACK_FUNC_SYMBOL); - userCallstack.add(callbackApi); - if (addrMap - .get(LogCenterConstants.USER_FUNCTION_CALLBACK_FUNC_ADDR) == null) { - CallStackUnit defaultCallstackUnit = new CallStackUnit( - LogCenterConstants.USER_FUNCTION_CALLBACK_FUNC_ADDR, - LogCenterConstants.USER_FUNCTION_CALLBACK_FUNC_SYMBOL); - addrMap.put( - LogCenterConstants.USER_FUNCTION_CALLBACK_FUNC_ADDR, - defaultCallstackUnit); - } - } else { - CallStackUnit callerCsa = addrMap.get(callerAddr); - if (null == callerCsa) { - callerCsa = userCallstack.get(size - 1); - callerCsa.setFunctionStartAddr(callerCsa.getAddr()); - callerCsa.setAddr(callerAddr); - } else { - callerCsa.setFunctionStartAddr(userCallstack.get( - size - 1).getAddr()); - userCallstack.set(size - 1, callerCsa); - } - } - userCallstack.add(selfCallstackUnit); - } - size = userCallstack.size(); - for (int i = size - 1; i >= 0; i--) { - callstackData.getAddrs().add(userCallstack.get(i).getAddr()); - } - getCallStackDataBySeqMap().put(seq, callstackData); - } else if (eventType == LogCenterConstants.USER_FUNCTION_EVENT_TYPE_EXIT) { - CallStackUnit removeCallStackUnit = userCallstack.get(size - 1); - if (selfCallstackUnit.getFunctionName().equals( - removeCallStackUnit.getFunctionName())) { - // if(selfCallstackUnit.getAddr() == - // removeCallStackUnit.getAddr()) { - userCallstack.remove(size - 1); - if (size - 2 > 0) { - CallStackUnit checkCallStackUnit = userCallstack - .get(size - 2); - if (checkCallStackUnit.getFunctionName().equals( - LogCenterConstants.USER_FUNCTION_CALLBACK_FUNC)) { - userCallstack.remove(size - 2); - } - } - size = userCallstack.size(); - if (size > 0) { - CallStackUnit prevCallstackUnit = userCallstack - .get(size - 1); - long prevSelfAddr = prevCallstackUnit - .getFunctionStartAddr(); - CallStackUnit callerCsa = addrMap.get(prevSelfAddr); - if (null == callerCsa) { - prevCallstackUnit.setAddr(prevSelfAddr); - } else { - userCallstack.set(size - 1, callerCsa); - } - } - } - if (AnalyzerManager.isOsp()) { - String apiName = input[LogCenterConstants.APINAME_INDEX]; - if (apiName.equals("OspMain")) { - LogParser.setDropCallTraceLog(true); - } - } - } - } - - public void pushCallStack(String[] slicedLog, String lastLogSeqNumber) { - if (slicedLog.length < 3) { - return; - } - - List callstackLog = new ArrayList(); - for (String str : slicedLog) { - callstackLog.add(new String(str)); - } - - int lastNum = 0; - try { - lastNum = Integer.parseInt(lastLogSeqNumber); - } catch (NumberFormatException e) { - e.printStackTrace(); - } - CallStackData callstackData = new CallStackData(lastNum); - HashMap addrMap = getCallStackApiByAddrMap(); - - String prevPath = ""; //$NON-NLS-1$ - String currentPath; - int size = callstackLog.size(); - for (int i = 1; i + 1 < size; i += 2) { - currentPath = null; - if (callstackLog.get(i).equals(AnalyzerConstants.CALLSTACK_END) - || callstackLog.get(i + 1).equals( - AnalyzerConstants.CALLSTACK_END)) { - break; - } - String strAddr = callstackLog.get(i); - if (strAddr.isEmpty()) { - return; - } - long addr = 0; - try { - addr = Long.parseLong(strAddr); - } catch (NumberFormatException e) { - e.printStackTrace(); - } - CallStackUnit callstackUnit = addrMap.get(addr); - - if (null == callstackUnit) { - String strSymbol = callstackLog.get(i + 1); - if (strSymbol.isEmpty()) { - continue; - } - callstackUnit = new CallStackUnit(addr, strSymbol); - } - - if (callstackUnit.getFunctionName().equals( - InformationViewLabels.CALLSTACK_TABLE_UNKNOWN_FUNCTION)) { - currentPath = callstackUnit.getPath(); - if (prevPath.equals(currentPath)) { - continue; - } - prevPath = currentPath; - } - - if (null == addrMap.get(addr)) { - addrMap.put(addr, callstackUnit); - } - - callstackData.getAddrs().add(addr); - }// end of callstack start-end - getCallStackDataBySeqMap().put(lastNum, callstackData); - } - - public void makeCallstackWithoutBacktrace(String[] input) { - HashMap addrMap = getCallStackApiByAddrMap(); - boolean isPieBuild = AnalyzerManager.getProject().isPieBuild(); - String baseAddr = AnalyzerManager.getProject().getBaseAddress(); - String binPath = AnalyzerManager.getProject().getBinaryPath(); - if (null == binPath || binPath.isEmpty()) { - return; - } - String strSeq = input[LogCenterConstants.SEQUENCE_NUMBER_INDEX]; - String strTid = input[LogCenterConstants.THREAD_ID_INDEX]; - String strCallerAddr = input[LogCenterConstants.CALLER_PCADDR_INDEX]; - - int seq = Integer.parseInt(strSeq); - int tid = Integer.parseInt(strTid); - long callerAddr = 0; - if (!strCallerAddr.isEmpty()) { - callerAddr = Long.parseLong(strCallerAddr); - } else { - CallStackData callstackData = new CallStackData(seq); - getCallStackDataBySeqMap().put(seq, callstackData); - return; - } - - // long callerAddr = 0; - // try - // { - // callerAddr = Long.parseLong(strCallerAddr); - // }catch (Exception e) { - // System.out.println(); - // } - - List probeCallstack = new ArrayList( - getUserCallstack(tid)); - int size = probeCallstack.size(); - - CallStackData callstackData = new CallStackData(seq); - - if ((size == 0) || (!AnalyzerManager.isInBinaryRange(strCallerAddr))) { - CallStackUnit callbackApi = new CallStackUnit( - LogCenterConstants.USER_FUNCTION_CALLBACK_FUNC_ADDR, - LogCenterConstants.USER_FUNCTION_CALLBACK_FUNC_SYMBOL); - probeCallstack.add(callbackApi); - if (addrMap - .get(LogCenterConstants.USER_FUNCTION_CALLBACK_FUNC_ADDR) == null) { - CallStackUnit defaultCallstackUnit = new CallStackUnit( - LogCenterConstants.USER_FUNCTION_CALLBACK_FUNC_ADDR, - LogCenterConstants.USER_FUNCTION_CALLBACK_FUNC_SYMBOL); - addrMap.put( - LogCenterConstants.USER_FUNCTION_CALLBACK_FUNC_ADDR, - defaultCallstackUnit); - } - } else { - CallStackUnit callerCallstackUnit = addrMap.get(callerAddr); - if (null == callerCallstackUnit) { - String strCallerFuncName = SymbolManager.addr2func(binPath, - strCallerAddr, isPieBuild, baseAddr); - String strCallerSymbol = getUserFunctionPosition() - + AnalyzerConstants.CALLSTACK_API_TOKEN_STRING - + strCallerFuncName; - callerCallstackUnit = new CallStackUnit(callerAddr, - strCallerSymbol); - addrMap.put(callerAddr, callerCallstackUnit); - } - - CallStackUnit topUserCallstack = probeCallstack.get(size - 1); - if (callerCallstackUnit.getFunctionName().equals( - topUserCallstack.getFunctionName())) { - probeCallstack.set(size - 1, callerCallstackUnit); - } else { - System.out - .println("bug : probe caller is not the same as top of user callstack"); - } - } - - size = probeCallstack.size(); - for (int i = size - 1; i >= 0; i--) { - callstackData.getAddrs().add(probeCallstack.get(i).getAddr()); - } - getCallStackDataBySeqMap().put(seq, callstackData); - - } - - // check irregular enter/exit log (multiple logs from 1 function call) - public boolean isIrregularUserCall(String[] input) { - HashMap addrMap = getCallStackApiByAddrMap(); - HashMap dupUserCallMap = getDupUserCallByTidMap(); - - boolean isPieBuild = AnalyzerManager.getProject().isPieBuild(); - String baseAddr = AnalyzerManager.getProject().getBaseAddress(); - String binPath = AnalyzerManager.getProject().getBinaryPath(); - if (null == binPath || binPath.isEmpty()) { - return false; - } - - String strSelfAddr = input[LogCenterConstants.PCADDR_INDEX]; - String strTid = input[LogCenterConstants.THREAD_ID_INDEX]; - - int tid = Integer.parseInt(strTid); - long selfAddr = Long.parseLong(strSelfAddr); - - CallStackUnit selfCallstackUnit = addrMap.get(selfAddr); - - if (null == selfCallstackUnit) { - String strSelfFuncName = SymbolManager.addr2func(binPath, - strSelfAddr, isPieBuild, baseAddr); - String strSelfSymbol = getUserFunctionPosition() - + AnalyzerConstants.CALLSTACK_API_TOKEN_STRING - + strSelfFuncName; - selfCallstackUnit = new CallStackUnit(selfAddr, strSelfSymbol); - addrMap.put(selfAddr, selfCallstackUnit); - } - - List userCallstack = getUserCallstack(tid); - int size = userCallstack.size(); - - String strEventType = input[LogCenterConstants.USER_FUNCTION_TYPE_INDEX]; - int eventType = Integer.parseInt(strEventType); - - if (size > 0) { - if (eventType == LogCenterConstants.USER_FUNCTION_EVENT_TYPE_ENTER) { - CallStackUnit topCallstackUnit = userCallstack.get(size - 1); - if (topCallstackUnit.equals(selfCallstackUnit)) { - DuplicateUserCall dupUserCall = dupUserCallMap.get(tid); - if (null == dupUserCall) { - dupUserCall = new DuplicateUserCall(selfCallstackUnit); - dupUserCallMap.put(tid, dupUserCall); - } else { - if (dupUserCall.getDupCallstackUnit().equals( - selfCallstackUnit)) { - dupUserCall.increaseDupCallCount(); - } else { - System.out - .println("makeUserCallstack : dup callstack check error"); - } - } - return true; - } - } else if (eventType == LogCenterConstants.USER_FUNCTION_EVENT_TYPE_EXIT) { - DuplicateUserCall dupUserCall = dupUserCallMap.get(tid); - if (null != dupUserCall) { - if (dupUserCall.getDupCallstackUnit().equals( - selfCallstackUnit)) { - dupUserCall.decreaseDupCallCount(); - if (0 == dupUserCall.getDupCallCount()) { - dupUserCallMap.remove(tid); - } - } else { - System.out - .println("makeUserCallstack : dup callstack check error"); - } - return true; - } - } - } - return false; - } - - public HashMap getCallStackApiByAddrMap() { - if (null == callstackApiByAddrMap) { - callstackApiByAddrMap = new HashMap(); - } - return callstackApiByAddrMap; - } - - public HashMap getCallStackDataBySeqMap() { - if (null == callstackDataBySeqMap) { - callstackDataBySeqMap = new HashMap(); - } - return callstackDataBySeqMap; - } - - public HashMap getDupUserCallByTidMap() { - if (null == dupUserCallByTidMap) { - dupUserCallByTidMap = new HashMap(); - } - return dupUserCallByTidMap; - } - - public String getUserFunctionPosition() { - if (userFunctionBin == null || userFunctionBin.isEmpty()) { - if (AnalyzerManager.isOsp()) { - userFunctionBin = new String(DACommunicator.getSelectedApp() - .getExecPath() + ".exe"); //$NON-NLS-1$ - } else { - userFunctionBin = new String(DACommunicator.getSelectedApp() - .getExecPath()); - } - } - return userFunctionBin; - } - - public List getUserCallstack(int tid) { - if (null == userCallstackByTidMap) { - userCallstackByTidMap = new HashMap>(); - } - List userCallstack = userCallstackByTidMap.get(tid); - if (null == userCallstack) { - userCallstack = new ArrayList(); - userCallstackByTidMap.put(tid, userCallstack); - } - return userCallstack; - } - - public CallStackData getCallStack(String seqNum) { - int seq = Integer.parseInt(seqNum); - return getCallStackDataBySeqMap().get(seq); - } - - public boolean checkUserCall(String input) { - if (input.contains(AnalyzerConstants.USER_BIN_POS)) { - return true; - } - return false; - } - - public boolean isUserCall(String input) { - if (!input.contains(LogCenterConstants.USER_FUNCTION_CALLBACK_FUNC)) { - return true; - } - return false; - } - - public String getPCAddrBySeq(int seq) { - HashMap cdMap = getCallStackDataBySeqMap(); - if (null == cdMap) { - return null; - } - CallStackData csd = cdMap.get(seq); - if (null == csd) { - return null; - } - List addrs = csd.getAddrs(); - if (null == addrs || addrs.isEmpty()) { - return null; - } - return Long.toString(addrs.get(0)); - } - - public static void clear() { - instance = null; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/callstack/CallStackUnit.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/callstack/CallStackUnit.java deleted file mode 100644 index a67748e..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/callstack/CallStackUnit.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * WooJin Jung - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.info.callstack; - -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.CommonConstants; -import org.tizen.dynamicanalyzer.common.SymbolManager; -import org.tizen.dynamicanalyzer.communicator.DACommunicator; -import org.tizen.dynamicanalyzer.nl.InformationViewLabels; -import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfiler; - -public class CallStackUnit { - private final String UNKNOWN_LIBRARY = InformationViewLabels.CALLSTACK_TABLE_UNKNOWN_LIBRARY; - private final String UNKNOWN_FUNCTION = InformationViewLabels.CALLSTACK_TABLE_UNKNOWN_FUNCTION; - private long address; - private long functionStartAddress; - private String originSymbol; - private String path; - private String functionName; - private String offset; - private String etc; - - public CallStackUnit(long addr, String symbol) { - address = addr; - functionStartAddress = addr; - this.originSymbol = symbol; - - functionName = ""; //$NON-NLS-1$ - offset = ""; //$NON-NLS-1$ - etc = ""; //$NON-NLS-1$ - makeCallstackData(); - } - - private void makeCallstackData() { - - String[] splitPath = originSymbol.split("\\("); //$NON-NLS-1$ - path = splitPath[0]; - if (!path.startsWith("/") && !path.contains(FunctionUsageProfiler.APPLICATION) //$NON-NLS-1$ - && !path.contains(FunctionUsageProfiler.DEPENDENT_LIB)) { - path = UNKNOWN_LIBRARY; - } - - if (splitPath.length < 2) { - boolean isPieBuild = AnalyzerManager.getProject().isPieBuild(); - String baseAddr = AnalyzerManager.getProject().getBaseAddress(); - String binPath = AnalyzerManager.getProject().getBinaryPath(); - - functionName = SymbolManager.addr2func(binPath, - Long.toString(address), isPieBuild, baseAddr); - // FIXME: hard coding - if (null == functionName || functionName.isEmpty() - || functionName.equals("_end")) { //$NON-NLS-1$ - functionName = UNKNOWN_FUNCTION; - } else { - String prevFunctionName = functionName; - functionName = SymbolManager - .demanglingFunctionName(prevFunctionName); - } - } else { - if (DACommunicator.isDeviceConnected() - && path.equals(DACommunicator.getSelectedApp() - .getExecPath()) && AnalyzerManager.isOsp()) { - path += ".exe"; - } - - String[] splitFunc = splitPath[1].split("\\+"); //$NON-NLS-1$ - if (splitFunc.length != 0) { - functionName = splitFunc[0]; - if (functionName.isEmpty()) { - boolean isPieBuild = AnalyzerManager.getProject() - .isPieBuild(); - String baseAddr = AnalyzerManager.getProject() - .getBaseAddress(); - String binPath = AnalyzerManager.getProject() - .getBinaryPath(); - - functionName = SymbolManager.addr2func(binPath, - Long.toString(address), isPieBuild, baseAddr); - } - if (null == functionName || functionName.isEmpty() - || functionName.equals("_end")) { //$NON-NLS-1$ - functionName = UNKNOWN_FUNCTION; - } else { - String prevFunctionName = functionName; - functionName = SymbolManager - .demanglingFunctionName(prevFunctionName); - } - } - } - } - - public long getAddr() { - return address; - } - - public long getFunctionStartAddr() { - return functionStartAddress; - } - - public String getOriginSymbol() { - return originSymbol; - } - - public String getSymbol() { - // if - // (functionName.equals(InformationViewLabels.CALLSTACK_TABLE_UNKNOWN)) - // { - // return path; - // } - return path + CommonConstants.OPEN_BRACKET + functionName; - } - - public void setAddr(long addr) { - address = addr; - } - - public void setFunctionStartAddr(long addr) { - functionStartAddress = addr; - } - - public String getFunctionName() { - return functionName; - } - - public String getOffset() { - return offset; - } - - public String getEtc() { - return etc; - } - - public String getPath() { - return path; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/callstack/CallstackTable.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/callstack/CallstackTable.java deleted file mode 100644 index a3e8065..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/callstack/CallstackTable.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.info.callstack; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import org.eclipse.nebula.widgets.grid.GridItem; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.model.TableInput; -import org.tizen.dynamicanalyzer.ui.file.FileChartView; -import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfilingView; -import org.tizen.dynamicanalyzer.ui.widgets.DATabComposite; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; -import org.tizen.dynamicanalyzer.utils.Formatter; - -public class CallstackTable extends DATableComposite { - - public CallstackTable(Composite parent, int compStyle, int tableStyle) { - super(parent, compStyle, tableStyle); - setSelValueIndex(-1); - table.setSelectionEnabled(false); - - table.addSelectionListener(new SelectionListener() { - - @Override - public void widgetSelected(SelectionEvent e) { - AnalyzerManager.getCurrentPage().controlSelection( - DATabComposite.ID); - GridItem[] sels = table.getSelection(); - if (sels.length < 0) { - return; - } - table.setFocusItem(sels[0]); - } - - @Override - public void widgetDefaultSelected(SelectionEvent e) { - // TODO Auto-generated method stub - - } - }); - } - - @Override - public void updateTable() { - // TODO Auto-generated method stub - - } - - public void updateCallstackTable(DASelectionData selData) { - table.removeAll(); - if (null == selData) { - return; - } - String viewId = selData.getViewId(); - if (null == viewId || viewId.isEmpty() - || viewId.equals(FileChartView.ID) - || viewId.equals(FunctionUsageProfilingView.ID)) { - return; - } - Object obj = selData.getData(); - if (obj instanceof GridItem[]) { - GridItem[] items = (GridItem[]) obj; - if (items.length <= 0) { - return; - } - DATableDataFormat tableData = (DATableDataFormat) items[0] - .getData(); - List logData = tableData.getData(); - if (logData.size() <= LogCenterConstants.SEQUENCE_NUMBER_INDEX) { - return; - } - String seq = logData.get(LogCenterConstants.SEQUENCE_NUMBER_INDEX); - if (null != seq && !seq.isEmpty()) { - int seqNum = Integer.parseInt(seq); - HashMap cdMap = CallStackManager.getInstance() - .getCallStackDataBySeqMap(); - HashMap addrMap = CallStackManager.getInstance() - .getCallStackApiByAddrMap(); - if (null == cdMap || null == addrMap) { - return; - } - CallStackData csd = cdMap.get(seqNum); - if (null == csd) { - return; - } - - List addrs = csd.getAddrs(); - int size = addrs.size(); - for (int i = 0; i < size; i++) { - CallStackUnit api = addrMap.get(addrs.get(i)); - - String addr = Formatter - .toHexString(addrs.get(i).toString()); - String path = api.getPath(); - // if path has "da_probe.so" then reject - if (path.contains(AnalyzerConstants.PROBE_LIB_TIZEN) - || path.contains(AnalyzerConstants.PROBE_LIB_OSP)) { - return; - } - GridItem gridItem = new GridItem(table, SWT.NONE); - - // setData block - { - String addrStr = Long.toString(addrs.get(i)); - DATableDataFormat callstackTableData = new DATableDataFormat( - addrStr); - List data = new ArrayList(); - // 99 means "table type callstack" - data.add("99"); //$NON-NLS-1$ - callstackTableData.getData().addAll(data); - callstackTableData.setObject(addrStr); - gridItem.setData(callstackTableData); - } - - String addrInput = (addrs.get(i) == 0) ? "" : addr; //$NON-NLS-1$ - gridItem.setText(1, addrInput); - -// String fName = InformationViewLables.CALLSTACK_TABLE_UNKNOWN; - String fName = api.getFunctionName(); -// if (apiData.length > 1) { -// fName = new String(apiData[1]); -// } else { -// String binPath = AnalyzerManager.getProject() -// .getBinaryPath(); -// boolean isPieBuild = AnalyzerManager.getProject() -// .isPieBuild(); -// String baseAddr = AnalyzerManager.getProject() -// .getBaseAddress(); -// String addrStr = Long.toString(addrs.get(i)); -// if (AnalyzerManager.isInBinaryRange(addrStr)) { -// fName = SymbolManager.addr2func(binPath, addrStr, -// isPieBuild, baseAddr); -// fName = SymbolNameDemangler.nameDemangle(fName); -// } -// } - -// if (CallStackManager.getInstance().checkUserCall(path)) { -// gridItem.setForeground(ColorResources.TITLEBAR_TEXT_COLOR); -// } - - gridItem.setText(0, fName); - gridItem.setText(2, path); -// apiData = null; - } - } - } - - } - - @Override - protected List makeTableInput() { - // TODO Auto-generated method stub - return null; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/callstack/CallstackView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/callstack/CallstackView.java deleted file mode 100644 index 591b2d0..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/callstack/CallstackView.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.info.callstack; - -import java.util.List; - -import org.eclipse.nebula.widgets.grid.Grid; -import org.eclipse.nebula.widgets.grid.GridItem; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.model.DAView; -import org.tizen.dynamicanalyzer.nl.InformationViewLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.ui.page.ViewAction; -import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATreeComposite; - -public class CallstackView extends DAView { - public static final String ID = CallstackView.class.getName(); - - private DATableComposite callstackTableComp = null; - private String[] columnNames = { - InformationViewLabels.CALLSTACK_VIEW_FUNCTION, - InformationViewLabels.CALLSTACK_VIEW_ADDRESS, - InformationViewLabels.CALLSTACK_VIEW_BINARY_PATH }; - private int[] columnSizes = { 120, 70, 400 }; - private boolean[] columnVisibility = { true, true, true }; - private String[] observingViews = null; - Composite contents = null; - - public CallstackView(Composite parent, int style) { - super(parent, style); - name = InformationViewLabels.CALLSTACK_VIEW_TITLE; - this.setLayout(new FillLayout()); - ViewContainer viewContainer = new ViewContainer(this, false); - viewContainer.setTitleText(InformationViewLabels.CALLSTACK_VIEW_TITLE); - - contents = viewContainer.getContentArea(); - contents.setBackground(ColorResources.WINDOW_BG_COLOR); - contents.setLayout(new FillLayout()); - callstackTableComp = new CallstackTable(contents, SWT.NONE, SWT.SINGLE - | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); - callstackTableComp.setTableName("Callstack"); - callstackTableComp.setColumns(columnNames); - callstackTableComp.setColumnSize(columnSizes); - callstackTableComp.setColumnVisibility(columnVisibility); - } - - public void setObservingViews(String[] viewIds) { - observingViews = viewIds; - } - - public String[] getObservingViews() { - return observingViews; - } - - @Override - public void updateView() { - if (null == observingViews) { - return; - } - int size = observingViews.length; - for (int i = 0; i < size; i++) { - ViewAction view = AnalyzerManager.getCurrentPage().getView( - observingViews[i]); - Control control = view.getControl(); - Grid table = null; - if (control instanceof DATableComposite) { - table = ((DATableComposite) control).getTable(); - } else if (control instanceof DATreeComposite) { - table = ((DATreeComposite) control).getTable(); - } else { - continue; - } - if (table.getSelectionCount() > 0) { - GridItem[] selection = table.getSelection(); - List startData = ((DATableDataFormat) selection[0] - .getData()).getData(); - List endData = ((DATableDataFormat) selection[selection.length - 1] - .getData()).getData(); - long startTime = Long.parseLong(startData - .get(LogCenterConstants.TIME_INDEX)); - long endTime = Long.parseLong(endData - .get(LogCenterConstants.TIME_INDEX)); - DASelectionData data = new DASelectionData(observingViews[i], - startTime, endTime, selection, table); - updateView(data); - return; - } - } - clear(); - } - - @Override - public void updateView(DASelectionData data) { - ((CallstackTable) callstackTableComp).updateCallstackTable(data); - } - - @Override - public void clear() { - callstackTableComp.clear(); - } - - @Override - public Control getControl() { - return callstackTableComp; - } - - @Override - public void setSelection(List data) { - updateView(); - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/range/RangeView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/range/RangeView.java deleted file mode 100644 index 59cf56c..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/range/RangeView.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.info.range; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.model.DAView; -import org.tizen.dynamicanalyzer.nl.InformationViewLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite; - -public class RangeView extends DAView { - - public static final String ID = RangeView.class.getName(); - - private DATableComposite tableComp = null; - private String[] columnNames = { InformationViewLabels.RANGE_VIEW_NAME, - InformationViewLabels.RANGE_VIEW_START, - InformationViewLabels.RANGE_VIEW_END, - InformationViewLabels.RANGE_VIEW_AVERAGE, - InformationViewLabels.RANGE_VIEW_MINIMUM, - InformationViewLabels.RANGE_VIEW_MAXIMUM }; - private int[] columnSizes = { 85, 60, 60, 60, 60, 60 }; - private boolean[] columnVisibility = { true, true, true, true, true, true }; - - public static final int STATE_INIT = 0; - public static final int STATE_RANGE = 1; - public static final int STATE_NO_RANGE = 2; - private int state = STATE_INIT; - private long lastTime = 0; - - public RangeView(Composite parent, int style) { - super(parent, style); - name = InformationViewLabels.RANGE_VIEW_TITLE; - this.setLayout(new FillLayout()); - - ViewContainer viewContainer = new ViewContainer(this, false); - viewContainer.setTitleText(InformationViewLabels.RANGE_VIEW_STATISTICS); - - Composite contents = viewContainer.getContentArea(); - contents.setBackground(ColorResources.WINDOW_BG_COLOR); - contents.setLayout(new FillLayout()); - tableComp = new StatsTable(contents, SWT.NONE, SWT.SINGLE | SWT.BORDER - | SWT.H_SCROLL | SWT.V_SCROLL); - tableComp.setColumns(columnNames); - tableComp.setSelValueIndex(-1); - tableComp.setColumnSize(columnSizes); - tableComp.setColumnVisibility(columnVisibility); - tableComp.setTableToolTipEnable(false); - } - - @Override - public void updateView() { - // TODO Auto-generated method stub - if (state != STATE_RANGE) { - ((StatsTable) tableComp).setTimeStartEnd(0, lastTime); - } - tableComp.updateTable(); - } - - @Override - public void clear() { - lastTime = 0; - tableComp.clear(); - } - - @Override - public Control getControl() { - return null; - } - - @Override - public void updateView(DASelectionData data) { - tableComp.updateTable(); - } - - private void setState(int state) { - this.state = state; - } - - public void setTimeStartEnd(long start, long end) { - if (end - start >= 1000000) { - setState(STATE_RANGE); - ((StatsTable) tableComp).setTimeStartEnd(start, end); - } else { - setState(STATE_NO_RANGE); - ((StatsTable) tableComp).setTimeStartEnd(0, lastTime); - } - } - - public void setTimeLast(long last) { - lastTime = last; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/range/StatComparator.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/range/StatComparator.java deleted file mode 100644 index c849d90..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/range/StatComparator.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.info.range; - -import org.tizen.dynamicanalyzer.ui.widgets.table.DefaultTableComparator; - -public class StatComparator extends DefaultTableComparator { - - @Override - public int userCompare(Object obj1, Object obj2) { - // TODO Auto-generated method stub - return 0; - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/range/StatsTable.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/range/StatsTable.java deleted file mode 100644 index e2de8bd..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/range/StatsTable.java +++ /dev/null @@ -1,394 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.info.range; - -import java.util.List; - -import org.eclipse.nebula.widgets.grid.GridItem; -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.model.TableInput; -import org.tizen.dynamicanalyzer.nl.InformationViewLabels; -import org.tizen.dynamicanalyzer.nl.TimelineChartLabels; -import org.tizen.dynamicanalyzer.ui.timeline.chart.TimelineChart; -import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineChartManager; -import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite; -import org.tizen.dynamicanalyzer.utils.Formatter; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeries; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeriesItem; - -public class StatsTable extends DATableComposite { - public static final long SELECTIONMARGINTIME = 500000; - private Boolean isTimelineSelectedChange = true; - private TimelineChartManager chartManager = TimelineChartManager - .getInstance(); - long startTime = 0; - long endTime = 0; - - public StatsTable(Composite parent, int style) { - super(parent, style); - } - - public StatsTable(Composite parent, int style, int tableStyle) { - super(parent, style, tableStyle); - setComparator(new StatComparator()); - int[] sortTypes = { AnalyzerConstants.SORT_TYPE_STRING, - AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_NUM }; - setSortTypes(sortTypes); - setSelValueIndex(0); - } - - public void insertRangeItem(String name, String start, String end, - String avg, String min, String max) { - - GridItem gi = new GridItem(table, SWT.NONE); - - if (null != name) - gi.setText(0, name); - if (null != start) - gi.setText(1, start); - if (null != end) - gi.setText(2, end); - if (null != avg) - gi.setText(3, avg); - if (null != min) - gi.setText(4, min); - if (null != max) - gi.setText(5, max); - } - - private GridItem findTotalCpuLoadItem() { - int count = table.getItemCount(); - GridItem ret = null; - for (int i = 0; i < count; i++) { - ret = table.getItem(i); - if (ret.getText(0).compareTo( - InformationViewLabels.STATS_TABLE_CPU_TOTAL) == 0) { - return ret; - } - } - return null; - } - - public void insertRangeChildItem(GridItem parent, String name, - String start, String end, String avg, String min, String max) { - GridItem gi = new GridItem(parent, SWT.NONE); - - if (null != name) - gi.setText(0, InformationViewLabels.STATS_TABLE_CHILD + name); - if (null != start) - gi.setText(1, start); - if (null != end) - gi.setText(2, end); - if (null != avg) - gi.setText(3, avg); - if (null != min) - gi.setText(4, min); - if (null != max) - gi.setText(5, max); - parent.setExpanded(true); - } - - public void insertStartEndTime() { - insertRangeItem(InformationViewLabels.STATS_TABLE_TIME, - Formatter.toTimeFormat(String.valueOf(startTime)), - Formatter.toTimeFormat(String.valueOf(endTime)), null, null, - null); - } - - private boolean isIncludeDefaultRangeSet(int id) { - if (id == TimelineConstants.CHART_TYPE_CPU - || id == TimelineConstants.CHART_TYPE_CPU_CORE - || id == TimelineConstants.CHART_TYPE_CPU_FREQUENCY - || id == TimelineConstants.CHART_TYPE_HEAP - || id == TimelineConstants.CHART_TYPE_PROCESS_MEMORY - || id == TimelineConstants.CHART_TYPE_SYSTEM_MEMORY - || id == TimelineConstants.CHART_TYPE_FILE) { - return true; - } - else{ - return false; - } - } - - private String getTitleName(int id, DACustomChartSeries series) { - String ret = null; - switch (id) { - case TimelineConstants.CHART_TYPE_CPU: - if (series.getName().equals( - TimelineChartLabels.CPU_CHART_SERIES_NAME_APP_LOAD)) - ret = InformationViewLabels.STATS_TABLE_CPU_APP; - else if (series.getName().equals( - TimelineChartLabels.CPU_CHART_SERIES_NAME_TOTAL_LOAD)) - ret = InformationViewLabels.STATS_TABLE_CPU_TOTAL; - break; - case TimelineConstants.CHART_TYPE_CPU_CORE: - if (series.getName().equals( - TimelineChartLabels.CPU_CORE_CHART_SERIES_NAME_CORE0)) - ret = InformationViewLabels.STATS_TABLE_CPU_CORE0; - else if (series.getName().equals( - TimelineChartLabels.CPU_CORE_CHART_SERIES_NAME_CORE1)) - ret = InformationViewLabels.STATS_TABLE_CPU_CORE1; - else if (series.getName().equals( - TimelineChartLabels.CPU_CORE_CHART_SERIES_NAME_CORE2)) - ret = InformationViewLabels.STATS_TABLE_CPU_CORE2; - else if (series.getName().equals( - TimelineChartLabels.CPU_CORE_CHART_SERIES_NAME_CORE3)) - ret = InformationViewLabels.STATS_TABLE_CPU_CORE3; - break; - case TimelineConstants.CHART_TYPE_CPU_FREQUENCY: - if (series.getName().equals( - TimelineChartLabels.CPU_FREQUENCY_CHART_FREQUENCY)) - ret = InformationViewLabels.STATS_TABLE_CPU_FREQUENCY; - break; - case TimelineConstants.CHART_TYPE_HEAP: - if (series.getName().equals( - TimelineChartLabels.HEAP_CHART_SERIES_NAME_USER_ALLOCATION)) - ret = InformationViewLabels.STATS_TABLE_HEAP_USER; - break; - case TimelineConstants.CHART_TYPE_PROCESS_MEMORY: - if (series.getName().equals( - TimelineChartLabels.PROCESS_MEMORY_CHART_VSS)) - ret = InformationViewLabels.STATS_TABLE_PROCESS_VSS; - else if (series.getName().equals( - TimelineChartLabels.PROCESS_MEMORY_CHART_RSS)) - ret = InformationViewLabels.STATS_TABLE_PROCESS_RSS; - else if (series.getName().equals( - TimelineChartLabels.PROCESS_MEMORY_CHART_PSS)) - ret = InformationViewLabels.STATS_TABLE_PROCESS_PSS; - break; - case TimelineConstants.CHART_TYPE_SYSTEM_MEMORY: - if (series - .getName() - .equals(TimelineChartLabels.SYSTEM_MEMORY_CHART_SERIES_NAME_PROC_RESIDENT)) - ret = InformationViewLabels.STATS_TABLE_MEMORY_PROCESS; - else if (series.getName().equals( - TimelineChartLabels.SYSTEM_MEMORY_CHART_SERIES_NAME_SYSTEM)) - ret = InformationViewLabels.STATS_TABLE_MEMORY_SYSTEM; - else if (series.getName().equals( - TimelineChartLabels.SYSTEM_MEMORY_CHART_SERIES_NAME_TOTAL)) - ret = InformationViewLabels.STATS_TABLE_MEMORY_TOTAL; - break; - case TimelineConstants.CHART_TYPE_FILE: - if (series.getName().equals( - TimelineChartLabels.FILE_CHART_SERIES_NAME_FD_COUNT)) - ret = InformationViewLabels.STATS_TABLE_FILE_COUNT; - else if (series.getName().equals( - TimelineChartLabels.FILE_CHART_SERIES_NAME_READ)) - ret = InformationViewLabels.STATS_TABLE_READ_SIZE; - else if (series.getName().equals( - TimelineChartLabels.FILE_CHART_SERIES_NAME_WRITE)) - ret = InformationViewLabels.STATS_TABLE_WRITE_SIZE; - else - break; - default: - ret = series.getName(); - break; - } - return ret; - } - - private void insertRange(int itemID, DACustomChartSeries series, - double start, double end, double sum, double avr, double min, - double max) { - String title = getTitleName(itemID, series); - - if (null == title) { - return; - } - switch (itemID) { - case TimelineConstants.CHART_TYPE_CPU: - insertRangeItem(title, Formatter.toPercentageFormat(start), - Formatter.toPercentageFormat(end), - Formatter.toPercentageFormat(avr), - Formatter.toPercentageFormat(min), - Formatter.toPercentageFormat(max)); - break; - case TimelineConstants.CHART_TYPE_CPU_CORE: - GridItem parent = findTotalCpuLoadItem(); - if (null != parent) { - insertRangeChildItem(parent, title, - Formatter.toPercentageFormat(start), - Formatter.toPercentageFormat(end), - Formatter.toPercentageFormat(avr), - Formatter.toPercentageFormat(min), - Formatter.toPercentageFormat(max)); - } else { - insertRangeItem(title, Formatter.toPercentageFormat(start), - Formatter.toPercentageFormat(end), - Formatter.toPercentageFormat(avr), - Formatter.toPercentageFormat(min), - Formatter.toPercentageFormat(max)); - } - break; - case TimelineConstants.CHART_TYPE_CPU_FREQUENCY: - insertRangeItem(title, Formatter.toHzFormat(start), - Formatter.toHzFormat(end), Formatter.toHzFormat(avr), - Formatter.toHzFormat(min), Formatter.toHzFormat(max)); - break; - case TimelineConstants.CHART_TYPE_HEAP: - insertRangeItem(title, Formatter.toByteFormat(start), - Formatter.toByteFormat(end), Formatter.toByteFormat(avr), - Formatter.toByteFormat(min), Formatter.toByteFormat(max)); - break; - case TimelineConstants.CHART_TYPE_PROCESS_MEMORY: - insertRangeItem(title, Formatter.toByteFormat(start), - Formatter.toByteFormat(end), Formatter.toByteFormat((avr)), - Formatter.toByteFormat(min), Formatter.toByteFormat(max)); - break; - case TimelineConstants.CHART_TYPE_SYSTEM_MEMORY: - insertRangeItem(title, Formatter.toByteFormat(start), - Formatter.toByteFormat(end), Formatter.toByteFormat(avr), - Formatter.toByteFormat(min), Formatter.toByteFormat(max)); - break; - case TimelineConstants.CHART_TYPE_FILE: - // File Count - if (series.getName().equals( - TimelineChartLabels.FILE_CHART_SERIES_NAME_FD_COUNT)) { - insertRangeItem(title, Formatter.toNumberFormat(start), - Formatter.toNumberFormat(end), - Formatter.toDoubleFormat(avr), - Formatter.toNumberFormat(min), - Formatter.toNumberFormat(max)); - } - // File read, write - else { - insertRangeItem(title, Formatter.toByteFormat(start), - Formatter.toByteFormat(end), - Formatter.toBpsFormat(sum, startTime, endTime), - Formatter.toByteFormat(min), - Formatter.toByteFormat(max)); - } - break; - default: - insertRangeItem(title, Formatter.toDoubleFormat(start), - Formatter.toDoubleFormat(end), - Formatter.toDoubleFormat(avr), - Formatter.toDoubleFormat(min), - Formatter.toDoubleFormat(max)); - break; - } - } - - // FIXME - @Override - public void updateTable() { - // TODO Auto-generated method stub - if (false == isTimelineSelectedChange) - return; - - table.removeAll(); - - insertStartEndTime(); - - List pItem = chartManager.getSelectedChartList(); - int itemID; - List seriesList = null; - List seriesItems = null; - double min, max, sum, avr, count, start, end, val; - min = max = sum = avr = count = start = end = val = 0; - - for (int i = 0; i < pItem.size(); i++) { - itemID = pItem.get(i).getChartType(); - - seriesList = chartManager.getDAChartSeriesList(itemID); - if (null == seriesList) { - continue; - } - for (int seriesCount = 0; seriesCount < seriesList.size(); seriesCount++) { - DACustomChartSeries series = seriesList.get(seriesCount); - if (null == series) { - continue; - } - seriesItems = series.getSeriesItemList(); - if (null == seriesItems) { - continue; - } - int index = series.getNextIndexByXvalue((double) startTime - / (double) 1000000); - if (index == -1) { - if (false == isIncludeDefaultRangeSet(itemID)) { - insertRange(itemID, series, start, end, sum, avr, min, max); - } - continue; - } - - if (seriesItems.get(index).getX() * (double) 1000000 < endTime){ - val = seriesItems.get(index).getY(); - start = min = max = sum = end = val; - count = 1; - int itemSize = seriesItems.size(); - - for (int itemCount = index; itemCount < itemSize; itemCount++) { - if (seriesItems.get(itemCount).getX() * (double) 1000000 > endTime) { - break; - } - val = seriesItems.get(itemCount).getY(); - if (val < min) { - min = val; - } - if (val > max) { - max = val; - } - sum += val; - count++; - } - end = val; - if (count != 0) { - avr = sum / count; - } - } - - insertRange(itemID, series, start, end, sum, avr, min, max); - min = max = sum = avr = count = start = end = val = 0; - } - } - - isTimelineSelectedChange = false; - } - - public void setTimelineSelected() { - isTimelineSelectedChange = true; - } - - public void setTimeStartEnd(long start, long end) { - startTime = start; - endTime = end; - setTimelineSelected(); - } - - @Override - protected List makeTableInput() { - // TODO Auto-generated method stub - return null; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/range/StopProcessManager.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/range/StopProcessManager.java deleted file mode 100644 index 19642e0..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/range/StopProcessManager.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.info.range; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Shell; -import org.tizen.dynamicanalyzer.nl.AnalyzerLabels; -import org.tizen.dynamicanalyzer.services.RecordStateSourceProvider; -import org.tizen.dynamicanalyzer.ui.summary.SummaryPage; -import org.tizen.dynamicanalyzer.ui.widgets.ProgressDialog; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; - -public class StopProcessManager { - public static final int INIT = 0; - public static final int STOP_PROCESS_START = 1; - public static final int STOP_PROCESS_END = 2; - private int state = INIT; - private ProgressDialog dialog = null; - - private static StopProcessManager instance = new StopProcessManager(); - - private StopProcessManager() { - - } - - public static StopProcessManager getInstance() { - return instance; - } - - public void stopProcessStart(String EndMessage) { - if (state == STOP_PROCESS_START) { - return; - } - state = STOP_PROCESS_START; - AnalyzerUtil.setRecordState(RecordStateSourceProvider.RECORD_READY); - Shell shell = AnalyzerUtil.getWorkbenchWindow().getShell(); - dialog = new ProgressDialog(shell, SWT.APPLICATION_MODAL); - if (null != dialog) { - dialog.open(); - dialog.setProgressMessage(EndMessage); - dialog.setProgressInfo(AnalyzerLabels.STOP_PROCESS_DLG_PLEASE_WAIT); - } - } - - public void waitForLogParsing(int nSelect) { - - if (null != dialog) { - dialog.setValue(nSelect); - } - } - - public void saveProjectAndOthers() { - if (null != dialog) { - dialog.setValue(60); - } - } - - public void logParsingThreadEnd() { - if (null != dialog) { - dialog.setValue(70); - } - } - - public void updateTimerStop() { - if (null != dialog) { - dialog.setValue(80); - } - } - - public void insertToDBComplete() { - if (null != dialog) { - dialog.setValue(90); - } - } - - public void stopTrace() { - if (null != dialog) { - dialog.setValue(100); - AnalyzerUtil.changePage(SummaryPage.ID); - dialog.close(); - state = STOP_PROCESS_END; - } - } - - public int getState() { - return state; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/score/ScoreView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/score/ScoreView.java deleted file mode 100644 index 1448f0c..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/score/ScoreView.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.info.score; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.layout.FormAttachment; -import org.eclipse.swt.layout.FormData; -import org.eclipse.swt.layout.FormLayout; -import org.eclipse.swt.widgets.Canvas; -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.model.DAView; -import org.tizen.dynamicanalyzer.nl.InformationViewLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.FontResources; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer; - -public class ScoreView extends DAView { - - public static final String ID = ScoreView.class.getName(); - - private Canvas scoreBoard = null; - private Canvas scoreInfo = null; - - private int failCount = 0; - private int leakSize = 0; - private int warningSize = 0; - @SuppressWarnings("unused") - private int electricEnergy = 0; - private int score = 99; - // Score Image - private List scoreImage = null; - private List columnString = null; - private List columnValue = null; - - public ScoreView(Composite parent, int style) { - super(parent, style); - this.setLayout(new FillLayout()); - - if (null == scoreImage) { - scoreImage = new ArrayList(); - scoreImage.add(ImageResources.SCORE_0); - scoreImage.add(ImageResources.SCORE_1); - scoreImage.add(ImageResources.SCORE_2); - scoreImage.add(ImageResources.SCORE_3); - scoreImage.add(ImageResources.SCORE_4); - scoreImage.add(ImageResources.SCORE_5); - scoreImage.add(ImageResources.SCORE_6); - scoreImage.add(ImageResources.SCORE_7); - scoreImage.add(ImageResources.SCORE_8); - scoreImage.add(ImageResources.SCORE_9); - } - if (null == columnString) { - columnString = new ArrayList(); - columnString.add(InformationViewLabels.SCORE_VIEW_FAIL_COUNT); - columnString.add(InformationViewLabels.SCORE_VIEW_LEAK_SIZE); - columnString.add(InformationViewLabels.SCORE_VIEW_WARNING_COUNT); - columnString.add(InformationViewLabels.SCORE_VIEW_ELECTRIC_ENERGY); - } - if (null == columnValue) { - columnValue = new ArrayList(); - columnValue.add(0); - columnValue.add(0); - columnValue.add(0); - columnValue.add(0); - } - - ViewContainer viewContainer = new ViewContainer(this, false); - viewContainer.setTitleText(InformationViewLabels.SCORE_VIEW_SCORE); - Composite contents = viewContainer.getContentArea(); - contents.setBackground(ColorResources.TABLE_CONTENTS_NORMAL); - contents.setLayout(new FormLayout()); - scoreBoard = new Canvas(contents, SWT.TRANSPARENT); - scoreBoard.addPaintListener(new PaintListener() { - - @Override - public void paintControl(PaintEvent e) { - int x = 0; - int y = 0; - Rectangle rect = scoreBoard.getBounds(); - e.gc.setBackground(ColorResources.BLACK); - e.gc.fillRectangle(rect.x, rect.y, rect.width, rect.height); - e.gc.setForeground(ColorResources.TITLEBAR_TEXT_COLOR); - e.gc.setFont(FontResources.SCORE_TITLE_FONT); - - Point textSize = e.gc.textExtent( - InformationViewLabels.SCORE_VIEW_SCORE, - SWT.DRAW_MNEMONIC); - x = (rect.width - textSize.x) / 2; - - e.gc.drawString(InformationViewLabels.SCORE_VIEW_SCORE, x, - y += 5); - e.gc.drawLine(x = 1, y += 25, rect.width - 2, y); - - // draw score - e.gc.drawImage(scoreImage.get(score / 100), x = 12, y += 18); - e.gc.drawImage(scoreImage.get((score / 10) % 10), x += 57, y); - e.gc.drawImage(scoreImage.get(score % 10), x += 57, y); - } - }); - - scoreInfo = new Canvas(contents, SWT.TRANSPARENT); - scoreInfo.addPaintListener(new PaintListener() { - @Override - public void paintControl(PaintEvent e) { - Rectangle colRect = new Rectangle(0, 0, 0, 30); - Point textSize; - int x, y; - for (int i = 0; i < 4; i++) { - colRect.width = 110; - e.gc.setBackground(ColorResources.SNAPSHOT_VIEW_TABLE_TITLE_BG); - e.gc.fillRectangle(colRect); - e.gc.setForeground(ColorResources.SNAPSHOT_VIEW_TABLE_LINE); - e.gc.drawRectangle(colRect); - e.gc.setForeground(ColorResources.SNAPSHOT_VIEW_TABLE_TITLE_TEXT); - e.gc.setFont(FontResources.TABLE_CELL_FONT); - textSize = e.gc.textExtent(columnString.get(i), - SWT.DRAW_MNEMONIC); - x = (colRect.width - textSize.x) / 2; - y = colRect.y + (colRect.height - textSize.y) / 2; - e.gc.drawString(columnString.get(i), x, y); - - colRect.x += 110; - colRect.width = 84; - e.gc.setBackground(ColorResources.SNAPSHOT_VIEW_TABLE_CONTENTS_BG); - e.gc.fillRectangle(colRect); - e.gc.setForeground(ColorResources.SNAPSHOT_VIEW_TABLE_LINE); - e.gc.drawRectangle(colRect); - e.gc.setForeground(ColorResources.SNAPSHOT_VIEW_TABLE_CONTENTS_TEXT); - e.gc.setFont(FontResources.TABLE_CELL_FONT); - textSize = e.gc.textExtent(columnValue.get(i).toString(), - SWT.DRAW_MNEMONIC); - x = colRect.x + (colRect.width - textSize.x) / 2; - y = colRect.y + (colRect.height - textSize.y) / 2; - e.gc.drawString(columnValue.get(i).toString(), x, y); - colRect.y += 30; - colRect.x = 0; - } - // Rectangle colRect = - // height=30; - // y=0; - // for(int i=0; i<4; i++){ - // x=0; - // width=110; - // for(int j=0; j<2; j++){ - // e.gc.setBackground(ColorResources.SNAPSHOT_VIEW_TABLE_TITLE_BG); - // e.gc.fillRectangle(x, y, width, height); - // e.gc.setForeground(ColorResources.SNAPSHOT_VIEW_TABLE_LINE); - // e.gc.drawRectangle(x, y, width, height); - // x+=width; - // width=84; - // } - // y+=height; - // } - // e.gc.setForeground(ColorResources.SNAPSHOT_VIEW_TABLE_LINE); - // e.gc.setBackground(ColorResources.SNAPSHOT_VIEW_TABLE_TITLE_BG); - // e.gc.drawRectangle(rect.x, y=0, rect.width-2, 30); - // e.gc.drawRectangle(rect.x, y+=30, rect.width-2, 30); - // e.gc.drawRectangle(rect.x, y+=30, rect.width-2, 30); - // e.gc.drawRectangle(rect.x, y+=30, rect.width-2, 30); - // e.gc.setForeground(ColorResources.SNAPSHOT_VIEW_TABLE_TITLE_TEXT); - // e.gc.fillRectangle(x, y, x+=110, rect.height); - // e.gc.setBackground(ColorResources.SNAPSHOT_VIEW_TABLE_CONTENTS_BG); - // e.gc.setForeground(ColorResources.SNAPSHOT_VIEW_TABLE_CONTENTS_TEXT); - // e.gc.fillRectangle(x, y, 84, rect.height); - // - // - // - // e.gc.setFont(FontResources.SCORE_TITLE_FONT); - // - // Point textSize = e.gc.textExtent("Score", SWT.DRAW_MNEMONIC); - // x = (rect.width - textSize.x)/2; - // - // e.gc.drawString("Score", x, y += 5); - // - // - // //draw score - } - }); - - FormData data = new FormData(); - data.top = new FormAttachment(0, 0); - data.left = new FormAttachment(0, 1); - data.right = new FormAttachment(100, -1); - - data.height = 132; - scoreBoard.setLayoutData(data); - - data = new FormData(); - data.top = new FormAttachment(scoreBoard, 13); - data.left = new FormAttachment(0, 1); - data.right = new FormAttachment(100, -1); - data.height = 122; - - scoreInfo.setLayoutData(data); - } - - @Override - public void updateView() { - failCount = AnalyzerManager.getFailedChecker().getFailedList().size(); - leakSize = AnalyzerManager.getLeakDetector().getLeakDataList().size(); - warningSize = AnalyzerManager.getWarningChecker().getWarningData().size(); - columnValue.set(0, failCount); - columnValue.set(1, leakSize); - columnValue.set(2, warningSize); - scoreInfo.redraw(); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/snapshot/IconView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/snapshot/IconView.java deleted file mode 100644 index bb344ad..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/snapshot/IconView.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.info.snapshot; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FormAttachment; -import org.eclipse.swt.layout.FormData; -import org.eclipse.swt.layout.FormLayout; -import org.eclipse.swt.widgets.Canvas; -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.resources.ColorResources; - -public class IconView extends Composite { - - protected Canvas canvas = null; - protected List images = null; - protected String[] tooltips = null; - protected int imageCount = 0; - protected Image selectedImage = null; - protected Color bg = ColorResources.RED; - - public IconView(Composite parent, int style) { - super(parent, style); - this.setLayout(new FormLayout()); - canvas = new Canvas(this, SWT.TRANSPARENT | SWT.DOUBLE_BUFFERED); - canvas.addPaintListener(paintListener); - FormData data = new FormData(); - data.top = new FormAttachment(0, 0); - data.bottom = new FormAttachment(100, 0); - data.left = new FormAttachment(0, 0); - data.right = new FormAttachment(100, 0); - canvas.setLayoutData(data); - } - - public List getImages() { - if (null == images) { - images = new ArrayList(); - } - return images; - } - - public void setTooltips(String[] strings) { - if (strings != null) { - tooltips = strings; - } - } - - public void setImages(List input) { - getImages().addAll(input); - imageCount = input.size(); - } - - private PaintListener paintListener = new PaintListener() { - @Override - public void paintControl(PaintEvent e) { - Rectangle rect = canvas.getBounds(); - if (selectedImage != null && !selectedImage.isDisposed()) { - e.gc.drawImage(selectedImage, rect.x, rect.y); - } else { - e.gc.setBackground(bg); - e.gc.fillRectangle(rect); - } - } - }; - - public void setSelection(int sel) { - if (imageCount > 0 && sel < imageCount) { - selectedImage = getImages().get(sel); - } else { - selectedImage = null; - } - - if (null != tooltips && tooltips.length > sel) { - canvas.setToolTipText(tooltips[sel]); - } else { - canvas.setToolTipText(null); - } - } - - public void clear() { - getImages().clear(); - tooltips = null; - imageCount = getImages().size(); - selectedImage = null; - canvas.redraw(); - } - - public void setBackgroundColor(Color color) { - bg = color; - } - - public void update() { - canvas.redraw(); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/snapshot/ImageSelectionListener.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/snapshot/ImageSelectionListener.java deleted file mode 100644 index aa52e94..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/snapshot/ImageSelectionListener.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.info.snapshot; - -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.widgets.Display; - -public class ImageSelectionListener implements SelectionListener { - - @Override - public void widgetSelected(final SelectionEvent e) { - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - -// String[] data = null; -// if (e.widget instanceof Grid) { -// final Grid table = (Grid) e.widget; -// GridItem[] ti = table.getSelection(); -// // get center id -// if (null == ti || 0 == ti.length) { -// return; -// } -// data = (String[]) ti[0].getData(); -// } - - //TODO:implements action - } - }); - } - - @Override - public void widgetDefaultSelected(SelectionEvent e) { - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/snapshot/ImageViewer.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/snapshot/ImageViewer.java deleted file mode 100644 index 257d283..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/snapshot/ImageViewer.java +++ /dev/null @@ -1,613 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.info.snapshot; - -import java.io.File; -import java.util.HashMap; -import java.util.List; -import java.util.Timer; -import java.util.TimerTask; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.SWTError; -import org.eclipse.swt.SWTException; -import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Canvas; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Shell; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.CommonConstants; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.common.SnapshotConstants; -import org.tizen.dynamicanalyzer.model.ImageInfo; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.services.RecordStateSourceProvider; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; - -public class ImageViewer extends Composite { - - class ImageData { - public GC gc; - public int imgWidth; - public int imgHeight; - public int marginX; - public int marginY; - public int maxImageWidth; - public int maxImageHeight; - public int minImageWidth; - public int minImageHeight; - public double imgWidthRate; - public double imgHeightRate; - - public ImageData(int type) { - gc = null; - - if (type == SnapshotConstants.IMAGE_TYPE_WIDE) { - imgWidth = SnapshotConstants.DEFAULT_W_IMAGE_WIDTH; - imgHeight = SnapshotConstants.DEFAULT_W_IMAGE_HEIGHT; - marginX = SnapshotConstants.DEFAULT_IMAGE_MARGIN_X; - marginY = SnapshotConstants.DEFAULT_IMAGE_MARGIN_Y; - maxImageWidth = SnapshotConstants.MAX_W_IMAGE_WIDTH; - maxImageHeight = SnapshotConstants.MAX_W_IMAGE_HEIGHT; - minImageWidth = SnapshotConstants.MIN_W_IMAGE_WIDTH; - minImageHeight = SnapshotConstants.MIN_W_IMAGE_HEIGHT; - imgWidthRate = SnapshotConstants.W_IMAGE_WIDTH_RATE; - imgHeightRate = SnapshotConstants.W_IMAGE_HEIGHT_RATE; - } else { - imgWidth = SnapshotConstants.DEFAULT_IMAGE_WIDTH; - imgHeight = SnapshotConstants.DEFAULT_IMAGE_HEIGHT; - marginX = SnapshotConstants.DEFAULT_IMAGE_MARGIN_X; - marginY = SnapshotConstants.DEFAULT_IMAGE_MARGIN_Y; - maxImageWidth = SnapshotConstants.MAX_IMAGE_WIDTH; - maxImageHeight = SnapshotConstants.MAX_IMAGE_HEIGHT; - minImageWidth = SnapshotConstants.MIN_IMAGE_WIDTH; - minImageHeight = SnapshotConstants.MIN_IMAGE_HEIGHT; - imgWidthRate = SnapshotConstants.IMAGE_WIDTH_RATE; - imgHeightRate = SnapshotConstants.IMAGE_HEIGHT_RATE; - } - } - } - - private final int MOUSE_EXIT = 0; - private final int MOUSE_HOVER = 1; - private final int MOUSE_LEFT = 2; - private final int MOUSE_RIGHT = 3; - private final int MOUSE_DOWN_LEFT = 4; - private final int MOUSE_DOWN_RIGHT = 5; - - private Image image; - private Canvas canvas; - private Canvas popup; - private HashMap listeners; - private Shell childShell; - private Composite parent; - int childShellWidth = 0; - int childShellHeight = 0; - private int state = MOUSE_EXIT; - private int imageState = SnapshotConstants.IMAGE_TYPE_NORMAL; - private boolean mouseDown = false; - private int currentImageIndex = 0; - private boolean leftEnable = false; - private boolean rightEnable = false; - - // +2 means outer offset - private final int defaultShellMaxWidth = 480 / 2 + 2; - private final int defaultShellMaxHeight = 800 / 2 + 2; - private final int defaultChildWidth = 69; - private final int defaultChildHeight = 108; - - private int shellMaxWidth = 0; - private int shellMaxHeight = 0; - private int childWidth = 0; - private int childHeight = 0; - - private Timer timer = null; - - public ImageViewer(Composite parent, int style) { - super(parent, style); - this.parent = parent; - this.setLayout(new FillLayout()); - - canvas = new Canvas(this, SWT.NONE); - setImage(ImageResources.NO_IMAGE); - canvas.addListener(SWT.MouseEnter, mouseListener); - canvas.addListener(SWT.MouseExit, mouseListener); - canvas.addListener(SWT.MouseUp, mouseListener); - canvas.addListener(SWT.MouseMove, mouseListener); - canvas.addListener(SWT.MouseDown, mouseListener); - canvas.addPaintListener(new PaintListener() { - @Override - public void paintControl(PaintEvent e) { - if (null == image || null == e.gc) { - return; - } - Canvas canvas = (Canvas) e.widget; - Rectangle rect = canvas.getBounds(); - e.gc.setBackground(ColorResources.SNAPSHOT_VIEWER_BG_COLOR); - e.gc.fillRectangle(rect); - try { - Rectangle bounds = image.getBounds(); - int iw = bounds.width; - int ih = bounds.height; - - int imageType = iw > ih ? SnapshotConstants.IMAGE_TYPE_WIDE - : SnapshotConstants.IMAGE_TYPE_NORMAL; - ImageData imageData = new ImageData(imageType); - - imageData.gc = e.gc; - imageData.imgWidth = iw; - imageData.imgHeight = ih; - drawThumbnail(imageData); - imageData.gc.dispose(); - } catch (SWTException se) { - se.printStackTrace(); - } - } - }); - - } - - public void setEnable(boolean enabled) { - canvas.setEnabled(enabled); - } - - public HashMap getSelectionListeners() { - if (null == listeners) { - listeners = new HashMap(); - } - return listeners; - } - - private void setImage(Image input) { - if (input == null) { - image = null; - return; - } - - if (null != image && !image.isDisposed() - && !image.equals(ImageResources.NO_IMAGE)) { - image.dispose(); - } - image = input; - } - - public void clear() { - setImage(ImageResources.NO_IMAGE); - canvas.redraw(); - currentImageIndex = 0; - } - - private void drawThumbnail(ImageData imgData) { - Rectangle bounds = canvas.getClientArea(); - - int ix = 1, iy = 1; - int width = SnapshotConstants.MIN_IMAGE_WIDTH; - int height = SnapshotConstants.MIN_IMAGE_HEIGHT; - - if (imgData.imgHeight > imgData.imgWidth) { - ix = (bounds.width - defaultChildWidth * 2) / 2; - - } else { - width = SnapshotConstants.MIN_IMAGE_HEIGHT; - height = SnapshotConstants.MIN_IMAGE_WIDTH; - iy = (bounds.height - defaultChildWidth * 2) / 2; - } - - imgData.gc.drawImage(image, 0, 0, imgData.imgWidth, imgData.imgHeight, - ix, iy, width, height); - if (state == MOUSE_LEFT && leftEnable) { - imgData.gc.drawImage(ImageResources.SNAPSHOT_LEFT_HOVER, 0, 0); - } else if (state == MOUSE_RIGHT && rightEnable) { - Rectangle rect = ImageResources.SNAPSHOT_RIGHT_HOVER.getBounds(); - imgData.gc.drawImage(ImageResources.SNAPSHOT_RIGHT_HOVER, - bounds.width - rect.width, 0); - } else if (state == MOUSE_DOWN_LEFT && leftEnable) { - imgData.gc.drawImage(ImageResources.SNAPSHOT_LEFT_PUSH, 0, 0); - } else if (state == MOUSE_DOWN_RIGHT && rightEnable) { - Rectangle rect = ImageResources.SNAPSHOT_RIGHT_HOVER.getBounds(); - imgData.gc.drawImage(ImageResources.SNAPSHOT_RIGHT_PUSH, - bounds.width - rect.width, 0); - } - } - - public void drawSnapshot(String time) { - if (null != time && !time.isEmpty()) { - int index = AnalyzerManager.getImageIndexByTime(time); - ImageInfo imageInfo = AnalyzerManager.getImageInfoByTime(time); - if (null == imageInfo) { - return; - } - String path = null; - if (imageInfo.getSeq().equals("-1") || index < 0) { //$NON-NLS-1$ - path = AnalyzerConstants.DEFAULT_IMAGE_NAME; - } else { - path = AnalyzerManager.getProject().getSavePath() - + File.separator + AnalyzerConstants.IMAGE_FOLDER_NAME - + File.separator + imageInfo.getSeq() - + CommonConstants.EXTENSION_PNG_IMAGE; - } - Image img = null; - if (path.equals(AnalyzerConstants.DEFAULT_IMAGE_NAME)) { - img = ImageResources.NO_IMAGE; - } else { - try { - img = new Image(Display.getDefault(), path); - } catch (SWTError err) { - err.printStackTrace(); - img = ImageResources.NO_IMAGE; - } catch (Exception e) { - System.out.println("Wait for receiving image : " + path); - img = ImageResources.NO_IMAGE; - } - if (img.isDisposed()) { - System.out.println("before set image : disposed"); //$NON-NLS-1$ - } - } - setImage(img); - currentImageIndex = index; - canvas.redraw(); - Rectangle rect = img.getBounds(); - int imgType = SnapshotConstants.IMAGE_TYPE_NORMAL; - if (rect.width > rect.height) { - imgType = SnapshotConstants.IMAGE_TYPE_WIDE; - } else { - imgType = SnapshotConstants.IMAGE_TYPE_NORMAL; - } - if (childShell != null) { - if (imageState != imgType) { - childShell.close(); - childShell = null; - if (imgType == SnapshotConstants.IMAGE_TYPE_WIDE) { - childShellWidth = defaultShellMaxHeight; - childShellHeight = defaultShellMaxWidth; - } else { - childShellWidth = defaultShellMaxWidth; - childShellHeight = defaultShellMaxHeight; - } - openChildShell(false); - imageState = imgType; - } else { - popup.redraw(); - } - } - } - } - - private Listener mouseListener = new Listener() { - - @Override - public void handleEvent(Event event) { - if (event.type == SWT.MouseEnter) { - setButtonCondition(); - - if (childShell == null) { - openChildShell(true); - } - } else if (event.type == SWT.MouseExit) { - if (childShell != null) { - if (timer != null) { - timer.cancel(); - timer = null; - } - childShell.close(); - childShell = null; - } - state = MOUSE_EXIT; - canvas.redraw(); - } else if (event.type == SWT.MouseMove) { - String runState = AnalyzerUtil.getRecordState(); - if (runState.equals(RecordStateSourceProvider.RECORD_RECORDING)) { - return; - } - if (!mouseDown) { - Rectangle rect = canvas.getBounds(); - Rectangle leftImageBounds = ImageResources.SNAPSHOT_LEFT_HOVER - .getBounds(); - Rectangle rightImageBounds = ImageResources.SNAPSHOT_RIGHT_HOVER - .getBounds(); - int prevState = state; - if (event.x < rect.x + leftImageBounds.width) { - state = MOUSE_LEFT; - } else if (event.x > rect.x - + (rect.width - rightImageBounds.width)) { - state = MOUSE_RIGHT; - } else if (event.x > rect.x - && event.x < event.x + rect.width) { - state = MOUSE_HOVER; - } else { - state = MOUSE_EXIT; - } - - if (prevState != state) { - canvas.redraw(); - } - } - } else if (event.type == SWT.MouseDown) { - String runState = AnalyzerUtil.getRecordState(); - if (runState.equals(RecordStateSourceProvider.RECORD_RECORDING)) { - return; - } - mouseDown = true; - Rectangle rect = canvas.getBounds(); - Rectangle leftImageBounds = ImageResources.SNAPSHOT_LEFT_HOVER - .getBounds(); - Rectangle rightImageBounds = ImageResources.SNAPSHOT_RIGHT_HOVER - .getBounds(); - int prevState = state; - if (event.x < rect.x + leftImageBounds.width) { - state = MOUSE_DOWN_LEFT; - } else if (event.x > rect.x - + (rect.width - rightImageBounds.width)) { - state = MOUSE_DOWN_RIGHT; - } else if (event.x > rect.x && event.x < event.x + rect.width) { - state = MOUSE_HOVER; - } else { - state = MOUSE_EXIT; - } - - if (prevState != state) { - canvas.redraw(); - } - } else if (event.type == SWT.MouseUp) { - String runState = AnalyzerUtil.getRecordState(); - if (runState.equals(RecordStateSourceProvider.RECORD_RECORDING)) { - return; - } - mouseDown = false; - Rectangle rect = canvas.getBounds(); - Rectangle leftImageBounds = ImageResources.SNAPSHOT_LEFT_HOVER - .getBounds(); - Rectangle rightImageBounds = ImageResources.SNAPSHOT_RIGHT_HOVER - .getBounds(); - int prevState = state; - if (event.x < rect.x + leftImageBounds.width) { - if (state == MOUSE_DOWN_LEFT && leftEnable) { - leftArrowAction(); - setButtonCondition(); - } - state = MOUSE_LEFT; - } else if (event.x > rect.x - + (rect.width - rightImageBounds.width)) { - if (state == MOUSE_DOWN_RIGHT && rightEnable) { - rightArrowAction(); - setButtonCondition(); - } - state = MOUSE_RIGHT; - } else if (event.x > rect.x && event.x < event.x + rect.width) { - state = MOUSE_HOVER; - } else { - state = MOUSE_EXIT; - } - if (prevState != state) { - canvas.redraw(); - } - } - } - }; - - private void setButtonCondition() { - List imageList = AnalyzerManager.getImageList(); - ImageInfo imgInfo = imageList.get(currentImageIndex); - drawSnapshot(imgInfo.getTime()); - if (imageList.size() < 2) { - leftEnable = false; - rightEnable = false; - } else { - if (currentImageIndex == 0) { - leftEnable = false; - if (imageList.size() > 1) { - rightEnable = true; - } else { - rightEnable = false; - } - } else { - leftEnable = true; - if (imageList.size() - 1 == currentImageIndex) { - rightEnable = false; - } else { - rightEnable = true; - } - } - } - } - - private void widgetSelected(String timeStr) { - long time = Long.parseLong(timeStr); - AnalyzerManager.getCurrentPage().updatePage( - new DASelectionData(SnapshotView.ID, time, time, null, null)); - } - - private void leftArrowAction() { - List imageList = AnalyzerManager.getImageList(); - ImageInfo imgInfo = imageList.get(--currentImageIndex); - drawSnapshot(imgInfo.getTime()); - widgetSelected(imgInfo.getTime()); - } - - private void rightArrowAction() { - List imageList = AnalyzerManager.getImageList(); - if (imageList.size() <= currentImageIndex + 1) { - return; - } - ImageInfo imgInfo = imageList.get(++currentImageIndex); - drawSnapshot(imgInfo.getTime()); - widgetSelected(imgInfo.getTime()); - } - - private void setShellSizes(int type) { - imageState = type; - if (type == SnapshotConstants.IMAGE_TYPE_WIDE) { - shellMaxHeight = defaultShellMaxWidth; - shellMaxWidth = defaultShellMaxHeight; - childWidth = defaultChildHeight; - childHeight = defaultChildWidth; - childShellWidth = defaultChildHeight; - childShellHeight = defaultChildWidth; - } else { - shellMaxHeight = defaultShellMaxHeight; - shellMaxWidth = defaultShellMaxWidth; - childWidth = defaultChildWidth; - childHeight = defaultChildHeight; - childShellWidth = defaultChildWidth; - childShellHeight = defaultChildHeight; - } - } - - private void setChildShellSizes(int type) { - if (type == SnapshotConstants.IMAGE_TYPE_WIDE) { - shellMaxHeight = defaultShellMaxWidth; - shellMaxWidth = defaultShellMaxHeight; - childWidth = defaultChildHeight; - childHeight = defaultChildWidth; - } else { - shellMaxHeight = defaultShellMaxHeight; - shellMaxWidth = defaultShellMaxWidth; - childWidth = defaultChildWidth; - childHeight = defaultChildHeight; - } - } - - private void openChildShell(boolean enableAnimation) { - if (null == image) { - return; - } else if (enableAnimation) { - Rectangle rect = image.getBounds(); - if (rect.width > rect.height) { - setShellSizes(SnapshotConstants.IMAGE_TYPE_WIDE); - } else { - setShellSizes(SnapshotConstants.IMAGE_TYPE_NORMAL); - } - } - childShell = new Shell(parent.getShell(), SWT.ON_TOP); - childShell.setLayout(new FillLayout()); - Point p = canvas.toDisplay(0, 0); - - childShell.setSize(childShellWidth, childShellHeight); - childShell.setLocation(p.x - childShellWidth, p.y); - - popup = new Canvas(childShell, SWT.DOUBLE_BUFFERED - | SWT.TRANSPARENCY_ALPHA); - - popup.addPaintListener(new PaintListener() { - @Override - public void paintControl(PaintEvent e) { - if (null == image || null == e.gc) { - return; - } - try { - Rectangle bounds = image.getBounds(); - int iw = bounds.width; - int ih = bounds.height; - int imageType = iw > ih ? SnapshotConstants.IMAGE_TYPE_WIDE - : SnapshotConstants.IMAGE_TYPE_NORMAL; - ImageData imageData = new ImageData(imageType); - - imageData.gc = e.gc; - imageData.imgWidth = iw; - imageData.imgHeight = ih; - - if (iw > ih) { - setChildShellSizes(SnapshotConstants.IMAGE_TYPE_WIDE); - } else { - setChildShellSizes(SnapshotConstants.IMAGE_TYPE_NORMAL); - } - Rectangle rects = popup.getBounds(); - int cw = rects.width - 2; - int ch = rects.height - 2; - - e.gc.setForeground(ColorResources.BLACK); - imageData.gc.drawRectangle(rects.x, rects.y, - rects.width - 1, rects.height - 1); - - imageData.gc.drawImage(image, 0, 0, imageData.imgWidth, - imageData.imgHeight, 1, 1, cw, ch); - - imageData.gc.dispose(); - } catch (SWTException se) { - se.printStackTrace(); - } - } - }); - childShell.open(); - - if (enableAnimation) { - if (timer != null) { - timer.cancel(); - timer = null; - } - timer = new Timer(); - timer.schedule(new TimerTask() { - @Override - public void run() { - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - if (null == childShell - || childShellWidth >= shellMaxWidth) { - if (timer != null) { - timer.cancel(); - timer = null; - } - if (null != childShell - && !childShell.isDisposed()) { - childShell.redraw(); - } - return; - } - int x = (shellMaxWidth - childWidth) / 3; - int y = (shellMaxHeight - childHeight) / 3; - childShellWidth += x; - childShellHeight += y; - - childShellWidth = (childShellWidth > shellMaxWidth) ? shellMaxWidth - : childShellWidth; - childShellHeight = (childShellHeight > shellMaxHeight) ? shellMaxHeight - : childShellHeight; - - childShell.setSize(childShellWidth, - childShellHeight); - Point p = canvas.toDisplay(0, 0); - childShell.setLocation(p.x - childShellWidth, p.y); - childShell.redraw(); - } - }); - } - }, 10, 10); - } - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/snapshot/SnapshotView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/snapshot/SnapshotView.java deleted file mode 100644 index ac07797..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/snapshot/SnapshotView.java +++ /dev/null @@ -1,309 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.info.snapshot; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.nebula.widgets.grid.Grid; -import org.eclipse.nebula.widgets.grid.GridItem; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.layout.FormAttachment; -import org.eclipse.swt.layout.FormData; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Display; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.logparser.LogPackage; -import org.tizen.dynamicanalyzer.logparser.Logs; -import org.tizen.dynamicanalyzer.model.DAView; -import org.tizen.dynamicanalyzer.nl.InformationViewLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.services.RecordStateSourceProvider; -import org.tizen.dynamicanalyzer.sql.SqlManager; -import org.tizen.dynamicanalyzer.ui.page.ViewAction; -import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATreeComposite; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; -import org.tizen.dynamicanalyzer.widgets.graph.bar.FourBarGraph; -import org.tizen.dynamicanalyzer.widgets.graph.circular.CircularGraph; - -public class SnapshotView extends DAView { - - public static final String ID = SnapshotView.class.getName(); - - ImageViewer snapshot; - CircularGraph processGraph; - FourBarGraph cpuGrp; - private static String rss = "0"; //$NON-NLS-1$ - private String[] observingViews = null; - - private static List cpuUsage; - private static long maxCpuUsage = 100; - private static long maxMem = 100; - private static long processMem = 0; - private long startTime = 0; - - public SnapshotView(Composite parent, int style, boolean title) { - super(parent, style); - name = InformationViewLabels.SNAPSHOT_VIEW_TITLE; - this.setLayout(new FillLayout()); - - ViewContainer viewContainer = new ViewContainer(this, title); - viewContainer - .setTitleText(InformationViewLabels.SNAPSHOT_VIEW_CURRENT_VIEW); - Composite contents = viewContainer.getContentArea(); - contents.setBackground(ColorResources.VIEW_BG_COLOR); - - snapshot = new ImageViewer(contents, SWT.NONE); - FormData data = new FormData(); - data.top = new FormAttachment(0, 1); - data.left = new FormAttachment(0, 0); - data.width = 218; - data.height = 218; - snapshot.setLayoutData(data); - snapshot.setEnable(true); - - // process graph - Composite processComp = new Composite(contents, SWT.NONE); - data = new FormData(); - data.top = new FormAttachment(snapshot, 3); - // data.left = new FormAttachment(50, 0); - data.right = new FormAttachment(100, 0); - data.width = 90; - data.height = 90; - processComp.setLayoutData(data); - processComp.setBackground(ColorResources.WHITE); - processComp.setLayout(new FillLayout()); - - processGraph = new CircularGraph(processComp, SWT.NONE, - CircularGraph.TYPE_CUSTOM); - processGraph.setGraphBgColor(ColorResources.PROCESS_GRAPH_BG_COLOR); - processGraph.setGraphColor(ColorResources.PROCESS_GRAPH_COLOR); - processGraph.setCenterColor(ColorResources.PROCESS_GRAPH_CENTER_COLOR); - processGraph.setMeasure(InformationViewLabels.SNAPSHOT_VIEW_BYTE); - processGraph.setGraphColor(ColorResources.PROCESS_GRAPH_COLOR); - processGraph.update(maxMem, processMem); - processGraph.setTextColor(ColorResources.PROCESS_GRAPH_COLOR); - processGraph.setText(InformationViewLabels.SNAPSHOT_VIEW_PROCESS); - processGraph.setLabelBg(ColorResources.VIEW_BG_COLOR); - - cpuGrp = new FourBarGraph(contents, SWT.NONE, FourBarGraph.TYPE_PERCENT); - data = new FormData(); - data.top = new FormAttachment(snapshot, 3); - data.right = new FormAttachment(processComp, -3); - data.width = 90; - data.height = 90; - cpuGrp.setLayoutData(data); - cpuGrp.setBgColor(ColorResources.CPU_BAR_GRAPH_BG_COLOR); - cpuGrp.setTextBgColor(ColorResources.VIEW_BG_COLOR); - cpuGrp.setGraphColor(ColorResources.CPU_BAR_GRAPH_COLOR, - ColorResources.CPU_BAR_GRAPH_GRAY_COLOR, - ColorResources.CPU_BAR_GRAPH_COLOR); - cpuGrp.setTextColor(ColorResources.CPU_BAR_GRAPH_COLOR); - cpuGrp.setText(InformationViewLabels.SNAPSHOT_VIEW_CPU); - cpuUsage = new ArrayList(); - - Composite emptyComp = new Composite(contents, SWT.NONE); - emptyComp.setBackground(ColorResources.WHITE); - data = new FormData(); - data.top = new FormAttachment(snapshot, 3); - data.right = new FormAttachment(cpuGrp, -3); - data.left = new FormAttachment(0, 0); - data.height = 75; - emptyComp.setLayoutData(data); - } - - public void setObservingViews(String[] viewIds) { - observingViews = viewIds; - } - - public String[] getObservingViews() { - return observingViews; - } - - private void computeData() { - String query = "select * from system where time = (select max(time) from system where time <= " //$NON-NLS-1$ - + startTime + ");"; //$NON-NLS-1$ - if (null == AnalyzerManager - .getLogCenterById(LogCenterConstants.LOG_DEVICE)) { - return; - } - List input = SqlManager - .executeSelectQuery(query, AnalyzerManager - .getLogCenterById(LogCenterConstants.LOG_DEVICE)); - - if (null == input) { - query = "select * from system where time = (select max(time) from system);"; //$NON-NLS-1$ - input = SqlManager.executeSelectQuery(query, AnalyzerManager - .getLogCenterById(LogCenterConstants.LOG_DEVICE)); - if (null == input) { - return; - } - } - String[] cpuRates = input.get( - LogCenterConstants.DEVICE_SYSTEM_CPU_USAGE_INDEX + 1) - .split(","); //$NON-NLS-1$ - cpuUsage.clear(); - for (int i = 0; i < cpuRates.length - 1; i++) { - String cpu = cpuRates[i].trim(); - long value = (long) Float.parseFloat(cpu); - cpuUsage.add(value); - } - - rss = input.get(LogCenterConstants.DEVICE_RSS_MEMORY_INDEX + 1); - - long totalMem = AnalyzerManager.getProject().getSystemMemorySize(); - maxMem = totalMem; - processMem = Long.parseLong(rss); - } - - @Override - public void updateView(DASelectionData selData) { - String runState = AnalyzerUtil.getRecordState(); - if (runState.equals(RecordStateSourceProvider.RECORD_RECORDING)) { - return; - } - setStartTime(selData.getStartTime()); - if (selData.getViewId().equals(SnapshotView.ID)) { - updateView(false); - } else { - updateView(true); - } - } - - private void updateView(final boolean isSnapshot) { - computeData(); - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - processGraph.update(maxMem, processMem); - cpuGrp.setMaxSize(maxCpuUsage); - cpuGrp.setCurrentValue(cpuUsage); - if (isSnapshot) { - snapshot.drawSnapshot(Long.toString(startTime)); - } - } - }); - } - - @Override - public void updateView() { - - String runState = AnalyzerUtil.getRecordState(); - if (!runState.equals(RecordStateSourceProvider.RECORD_RECORDING)) { - setStartTimeFromObservingView(); - } - - computeData(); - - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - processGraph.update(maxMem, processMem); - cpuGrp.setMaxSize(maxCpuUsage); - cpuGrp.setCurrentValue(cpuUsage); - snapshot.drawSnapshot(Long.toString(startTime)); - } - }); - } - - private void setStartTimeFromObservingView() { - if (null == observingViews) { - return; - } - int size = observingViews.length; - for (int i = 0; i < size; i++) { - ViewAction view = AnalyzerManager.getCurrentPage().getView( - observingViews[i]); - Control control = view.getControl(); - Grid table = null; - if (control instanceof DATableComposite) { - table = ((DATableComposite) control).getTable(); - } else if (control instanceof DATreeComposite) { - table = ((DATreeComposite) control).getTable(); - } else { - continue; - } - if (table.getSelectionCount() > 0) { - GridItem[] selection = table.getSelection(); - List startData = ((DATableDataFormat) selection[0] - .getData()).getData(); - long startTime = Long.parseLong(startData - .get(LogCenterConstants.TIME_INDEX)); - setStartTime(startTime); - } - } - } - - @Override - public void updateLog(LogPackage logPack) { - Logs logs = logPack.getLogs(LogCenterConstants.LOG_DEVICE); - if (null == logs || logs.getLogs().size() == 0) { - return; - } - List> inputs = logs.getLogs(); - int lastIndex = inputs.size() - 1; - List input = inputs.get(lastIndex); - - String[] cpuRates = input.get( - LogCenterConstants.DEVICE_SYSTEM_CPU_USAGE_INDEX).split(","); //$NON-NLS-1$ - cpuUsage.clear(); - for (int i = 0; i < cpuRates.length - 1; i++) { - String cpu = cpuRates[i].trim(); - long value = (long) Float.parseFloat(cpu); - cpuUsage.add(value); - } - - rss = input.get(LogCenterConstants.DEVICE_RSS_MEMORY_INDEX); - long totalMem = AnalyzerManager.getProject().getSystemMemorySize(); - maxMem = totalMem; - processMem = Long.parseLong(rss); - String time = input.get(LogCenterConstants.TIME_INDEX); - long start = Long.parseLong(time); - setStartTime(start); - } - - @Override - public void clear() { - // time = "0"; //$NON-NLS-1$ - cpuUsage.clear(); - maxMem = 100; - processMem = 0; - cpuGrp.clear(); - updateView(true); - } - - public void setStartTime(long start) { - startTime = start; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/AbstractEffectFrame.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/AbstractEffectFrame.java deleted file mode 100644 index 26d1434..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/AbstractEffectFrame.java +++ /dev/null @@ -1,301 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.page; - -import java.util.HashMap; -import java.util.List; - -import org.eclipse.nebula.effects.stw.Transition; -import org.eclipse.nebula.effects.stw.TransitionListener; -import org.eclipse.nebula.effects.stw.TransitionManager; -import org.eclipse.nebula.effects.stw.Transitionable; -import org.eclipse.nebula.effects.stw.transitions.CubicRotationTransition; -import org.eclipse.nebula.effects.stw.transitions.FadeTransition; -import org.eclipse.nebula.effects.stw.transitions.SlideTransition; -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.StackLayout; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.tizen.dynamicanalyzer.ui.timeline.TimelinePage; - -public abstract class AbstractEffectFrame { - - public static final int DIR_LEFT = 0; - public static final int DIR_RIGHT = 1; - public static final int DIR_UP = 2; - public static final int DIR_DOWN = 3; - public static final int DIR_RIGHT_LEFT = 4; - public static final int DIR_DOWN_UP = 5; - public static final int DIR_RANDOM_RIGHT_AND_LEFT = 6; - public static final int DIR_RANDOM_UP_AND_DOWN = 7; - public static final int DIR_RANDOM = 8; - -// private boolean effectLock = false; // temporary block variable - - public static final String[] DIRECTIONS_NAMES = { "Left", "Right", "Up", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - "Down", "Right/Left", "Down/Up", "Random right and left", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ - "Random up and down", "Random" }; //$NON-NLS-1$ //$NON-NLS-2$ - protected Transition[] transitions = null; - - private HashMap pages = null; - List images = null; - - @SuppressWarnings("unused") - private int selectedDirection = DIR_RANDOM; - - protected Composite containerComposite = null; - private StackLayout containerLayout = null; - protected TransitionManager tm = null; - - public static final int TRANSITION_FADE = 1; - public static final int TRANSITION_SLIDE = 0; - public static final int TRANSITION_CUBIC_ROTATION = 2; - - public AbstractEffectFrame(Composite parent) { - parent.setLayout(new FillLayout()); - containerComposite = new Composite(parent, SWT.NONE); - containerLayout = new StackLayout(); - containerComposite.setLayout(containerLayout); - pages = new HashMap(); - - initTransitions(); - - init(); - containerLayout.topControl = getPage(TimelinePage.ID); - containerComposite.layout(); - } - - private void initTransitions() { - tm = new TransitionManager(new Transitionable() { - - @Override - public void setSelection(int index) { - } - - @Override - public int getSelection() { - return 0; - } - - @Override - public double getDirection(int toIndex, int fromIndex) { - if (toIndex > fromIndex) { - return Transition.DIR_LEFT; - } else if (toIndex < fromIndex) { - return Transition.DIR_RIGHT; - } - return Transition.DIR_UP; - } - - @Override - public Control getControl(int index) { -// return comps.get(index); - return null; - } - - @Override - public Composite getComposite() { - return containerComposite; - } - - @Override - public void addSelectionListener(SelectionListener listener) { - } - }); - tm.setTransition(transitions[TRANSITION_CUBIC_ROTATION]); - tm.addTransitionListener(new TransitionListener() { - @Override - public void transitionFinished(TransitionManager transition) { - System.out.println("transition finish"); //$NON-NLS-1$ - } - }); - - transitions = new Transition[] { new SlideTransition(tm), - new FadeTransition(tm), new CubicRotationTransition(tm) }; - transitions[0].setFPS(60); - transitions[0].setTotalTransitionTime(1000); - } - - protected abstract void init(); - - public Composite getContainerComposite() { - return containerComposite; - } - - public TransitionManager getTransitionManager() { - return tm; - } - - public Transition getTransitionEffect(int transition) { - return transitions[transition]; - } - - public void selectDirection(int direction) { - if (direction >= 0 && direction < DIRECTIONS_NAMES.length) { - selectedDirection = direction; - } - } - - // protected double getSelectedDirection(int toIndex, int fromIndex) { - // switch (selectedDirection) { - // case DIR_RIGHT: - // return Transition.DIR_RIGHT; - // case DIR_LEFT: - // return Transition.DIR_LEFT; - // case DIR_UP: - // return Transition.DIR_UP; - // case DIR_DOWN: - // return Transition.DIR_DOWN; - // case DIR_RIGHT_LEFT: - // return toIndex > fromIndex ? Transition.DIR_RIGHT - // : Transition.DIR_LEFT; - // case DIR_DOWN_UP: - // return toIndex > fromIndex ? Transition.DIR_DOWN - // : Transition.DIR_UP; - // case DIR_RANDOM_RIGHT_AND_LEFT: - // return Math.random() > 0.5 ? Transition.DIR_RIGHT - // : Transition.DIR_LEFT; - // case DIR_RANDOM_UP_AND_DOWN: - // return Math.random() > 0.5 ? Transition.DIR_DOWN - // : Transition.DIR_UP; - // default: - // case DIR_RANDOM: - // if (Math.random() > 0.5) - // return Math.random() > 0.5 ? Transition.DIR_RIGHT - // : Transition.DIR_LEFT; - // else - // return Math.random() > 0.5 ? Transition.DIR_DOWN - // : Transition.DIR_UP; - // } - // } - - public void setTransition(int index) { - tm.setTransition(transitions[index]); - } - - public void setTransitionTime(long time) { - tm.getTransition().setTotalTransitionTime(time); - } - - public void setTransitionFPS(long fps) { - tm.getTransition().setFPS(fps); - } - - public HashMap getDAPages() { - return pages; - } - - public void addPage(String ID, DAPageComposite page) - { - pages.put(ID, page); - } - - public DAPageComposite getPage(String ID) - { - return pages.get(ID); - } - - -// public void effect(int fromIndex, int toIndex) { -// effectLock = true; -// ToolbarArea.getInstance().getMainButton().setEnabled(false); -// ToolbarArea.getInstance().getAnalysisButton().setEnabled(false); -// try { -// Control from = containerLayout.topControl; -// Rectangle rect = from.getBounds(); -// Image imgFrom = new Image(from.getDisplay(), rect.width, -// rect.height); -// Image prevImage = images.get(fromIndex); -// images.set(fromIndex, imgFrom); -// prevImage.dispose(); -// -// GC gcfrom = new GC(from); -// from.update(); -// gcfrom.copyArea(imgFrom, 0, 0); -// gcfrom.dispose(); -// -// Canvas canvas = new Canvas(containerComposite, SWT.DOUBLE_BUFFERED); -// canvas.moveAbove(null); -// canvas.setBounds(rect); -// -// GC gcOn = new GC(canvas); -// tm.getTransition().start( -// imgFrom, -// images.get(toIndex), -// gcOn, -// tm.getTransitionable().getDirection(selectedStack, -// currentStack)); -// containerLayout.topControl = comps.get(selectedStack); -// containerComposite.layout(); -// currentStack = selectedStack; -// } catch (Exception e) { -// System.out.println(" application exit..."); //$NON-NLS-1$ -// } -// -// effectLock = false; -// ToolbarArea.getInstance().getMainButton().setEnabled(true); -// ToolbarArea.getInstance().getAnalysisButton().setEnabled(true); -// } -// -// public void createCaptures(int initial) { -// images = new ArrayList(); -// Rectangle rect = containerLayout.topControl.getBounds(); -// for (int i = 0; i < comps.size(); i++) { -// containerLayout.topControl = comps.get(i); -// containerComposite.layout(); -// Image img = ImageCapture.getImage(containerLayout.topControl, -// rect.width, rect.height, true); -// images.add(img); -// } -// -// containerLayout.topControl = comps.get(initial); -// containerComposite.layout(); -// } -// -// public void excuteEffect(int select) { -// selectedStack = select; -// effect(currentStack, selectedStack); -// } -// -// public void setTopComposite(int select) { -// selectedStack = select; -// // if (AnalyzerUtil.isWin()) { -// // effect(currentStack, selectedStack); -// // } else { -// containerLayout.topControl = comps.get(selectedStack); -// containerComposite.layout(); -// currentStack = selectedStack; -// ((DAPageComposite) containerLayout.topControl).updatePage(); -// ((DAPageComposite) containerLayout.topControl) -// .setSourceView(ToolbarArea.getInstance() -// .getSourceViewToggleState()); -// // } -// } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/BaseView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/BaseView.java deleted file mode 100644 index 1ec7246..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/BaseView.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.page; - -import java.util.HashMap; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.part.ViewPart; -import org.tizen.dynamicanalyzer.model.DAView; -import org.tizen.dynamicanalyzer.ui.file.FilePage; -import org.tizen.dynamicanalyzer.ui.summary.SummaryPage; -import org.tizen.dynamicanalyzer.ui.thread.ThreadPage; -import org.tizen.dynamicanalyzer.ui.timeline.TimelinePage; -import org.tizen.dynamicanalyzer.ui.userinterface.UIPage; -import org.tizen.dynamicanalyzer.ui.widgets.DATabComposite; - -public class BaseView extends ViewPart { - - public static final String ID = BaseView.class.getName(); - DAPageComposite topComposite = null; - DATabComposite tabView = null; - - private HashMap views = null; - - @Override - public void createPartControl(Composite parent) { - tabView = new DATabComposite(parent, SWT.DOUBLE_BUFFERED); - tabView.setTabWidth(120); - { - Composite timelinePage = new TimelinePage( - tabView.getContentComposite(), SWT.NONE); - tabView.addView(timelinePage); - Composite summaryPage = new SummaryPage( - tabView.getContentComposite(), SWT.NONE); - tabView.addView(summaryPage); - Composite filePage = new FilePage(tabView.getContentComposite(), - SWT.NONE); - tabView.addView(filePage); - - Composite threadPage = new ThreadPage( - tabView.getContentComposite(), SWT.NONE); - tabView.addView(threadPage); - - Composite uiPage = new UIPage(tabView.getContentComposite(), - SWT.NONE); - tabView.addView(uiPage); - -// Composite rangePage = new RangePage(tabView.getContentComposite(), -// SWT.NONE); -// tabView.addView(rangePage); - } - } - - @Override - public void setFocus() { - // TODO Auto-generated method stub - } - - public DATabComposite getMainTab() { - return tabView; - } - - public DAPageComposite getTopComposite() { - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - topComposite = (DAPageComposite) tabView.getTopComposite(); - } - }); - return topComposite; - } - - public void clear() { - tabView.clear(); - } - - public HashMap getAllViewHash() { - return views; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/DAEffectFrame.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/DAEffectFrame.java deleted file mode 100644 index 9001d08..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/DAEffectFrame.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.page; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.nebula.effects.stw.ImageCapture; -import org.eclipse.nebula.effects.stw.Transition; -import org.eclipse.nebula.effects.stw.TransitionManager; -import org.eclipse.nebula.effects.stw.Transitionable; -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.StackLayout; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Canvas; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.tizen.dynamicanalyzer.ui.file.FilePage; -import org.tizen.dynamicanalyzer.ui.summary.SummaryPage; -import org.tizen.dynamicanalyzer.ui.thread.ThreadPage; -import org.tizen.dynamicanalyzer.ui.userinterface.UIPage; - -import org.tizen.dynamicanalyzer.ui.timeline.TimelinePage; -import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea; -import org.tizen.dynamicanalyzer.widgets.button.DACustomButton; -import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener; - -public class DAEffectFrame extends AbstractEffectFrame { - - public DAEffectFrame(Composite parent) { - super(parent); - // TODO Auto-generated constructor stub - } - - final int MAIN_INDEX = 0; - final int ANALYSIS_INDEX = 1; - final int FILE_INDEX = 2; - final int THREAD_INDEX = 3; // FIXME - final int UI_INDEX = 4; // FIXME - - List comps; - private int currentStack = MAIN_INDEX; - private int selectedStack = -1; - List images = null; - private StackLayout containerLayout = null; - private boolean effectLock = false; - - @Override - protected void init() { - containerComposite.setLayout(new FillLayout()); - - containerLayout = new StackLayout(); - containerComposite.setLayout(containerLayout); - comps = new ArrayList(); - DAPageComposite mainComp = new TimelinePage(containerComposite, - SWT.NONE); - comps.add(mainComp); - DAPageComposite analysisComp = new SummaryPage(containerComposite, - SWT.NONE); - comps.add(analysisComp); - DAPageComposite fileComp = new FilePage(containerComposite, SWT.NONE); - comps.add(fileComp); - - DAPageComposite threadComp = new ThreadPage(containerComposite, - SWT.NONE); - comps.add(threadComp); - - DAPageComposite userInterfaceComp = new UIPage(containerComposite, - SWT.NONE); - comps.add(userInterfaceComp); - - containerLayout.topControl = comps.get(MAIN_INDEX); - containerComposite.layout(); - // createCaptures(MAIN_INDEX); - - tm = new TransitionManager(new Transitionable() { - - @Override - public void setSelection(int index) { - } - - @Override - public int getSelection() { - return 0; - } - - @Override - public double getDirection(int toIndex, int fromIndex) { - if (toIndex > fromIndex) { - return Transition.DIR_LEFT; - } else if (toIndex < fromIndex) { - return Transition.DIR_RIGHT; - } - return Transition.DIR_UP; - } - - @Override - public Control getControl(int index) { - return comps.get(index); - } - - @Override - public Composite getComposite() { - return containerComposite; - } - - @Override - public void addSelectionListener(SelectionListener listener) { - ToolbarArea - .getInstance() - .getMainButton() - .addClickListener( - new DACustomButtonClickEventListener() { - - @Override - public void handleClickEvent( - DACustomButton button) { - if (currentStack == MAIN_INDEX - || effectLock) { - return; - } - setTopComposite(MAIN_INDEX); - ToolbarArea.getInstance() - .setSelectionTab(0); - } - }); - - ToolbarArea - .getInstance() - .getAnalysisButton() - .addClickListener( - new DACustomButtonClickEventListener() { - @Override - public void handleClickEvent( - DACustomButton button) { - if (currentStack == ANALYSIS_INDEX - || effectLock) { - return; - } - // selectedStack = ANALYSIS_INDEX; - setTopComposite(ANALYSIS_INDEX); - ToolbarArea.getInstance() - .setSelectionTab(1); - - } - }); - ToolbarArea - .getInstance() - .getFileButton() - .addClickListener( - new DACustomButtonClickEventListener() { - - @Override - public void handleClickEvent( - DACustomButton button) { - if (currentStack == FILE_INDEX - || effectLock) { - return; - } - setTopComposite(FILE_INDEX); - ToolbarArea.getInstance() - .setSelectionTab(2); - } - }); - - ToolbarArea - .getInstance() - .getThreadButton() - .addClickListener( - new DACustomButtonClickEventListener() { - @Override - public void handleClickEvent( - DACustomButton button) { - if (currentStack == THREAD_INDEX - || effectLock) { - return; - } - setTopComposite(THREAD_INDEX); - ToolbarArea.getInstance() - .setSelectionTab(3); - } - }); - - ToolbarArea - .getInstance() - .getUIButton() - .addClickListener( - new DACustomButtonClickEventListener() { - @Override - public void handleClickEvent( - DACustomButton button) { - if (currentStack == UI_INDEX - || effectLock) { - return; - } - setTopComposite(UI_INDEX); - ToolbarArea.getInstance() - .setSelectionTab(UI_INDEX); - } - }); - } - }); - } - - public void effect(int fromIndex, int toIndex) { - effectLock = true; - ToolbarArea.getInstance().getMainButton().setEnabled(false); - ToolbarArea.getInstance().getAnalysisButton().setEnabled(false); - try { - Control from = containerLayout.topControl; - Rectangle rect = from.getBounds(); - Image imgFrom = new Image(from.getDisplay(), rect.width, - rect.height); - Image prevImage = images.get(fromIndex); - images.set(fromIndex, imgFrom); - prevImage.dispose(); - - GC gcfrom = new GC(from); - from.update(); - gcfrom.copyArea(imgFrom, 0, 0); - gcfrom.dispose(); - - Canvas canvas = new Canvas(containerComposite, SWT.DOUBLE_BUFFERED); - canvas.moveAbove(null); - canvas.setBounds(rect); - - GC gcOn = new GC(canvas); - tm.getTransition().start( - imgFrom, - images.get(toIndex), - gcOn, - tm.getTransitionable().getDirection(selectedStack, - currentStack)); - containerLayout.topControl = comps.get(selectedStack); - containerComposite.layout(); - currentStack = selectedStack; - } catch (Exception e) { - System.out.println(" application exit..."); //$NON-NLS-1$ - } - - effectLock = false; - ToolbarArea.getInstance().getMainButton().setEnabled(true); - ToolbarArea.getInstance().getAnalysisButton().setEnabled(true); - } - - public void createCaptures(int initial) { - images = new ArrayList(); - Rectangle rect = containerLayout.topControl.getBounds(); - for (int i = 0; i < comps.size(); i++) { - containerLayout.topControl = comps.get(i); - containerComposite.layout(); - Image img = ImageCapture.getImage(containerLayout.topControl, - rect.width, rect.height, true); - images.add(img); - } - - containerLayout.topControl = comps.get(initial); - containerComposite.layout(); - } - - public void excuteEffect(int select) { - selectedStack = select; - effect(currentStack, selectedStack); - } - - public void setTopComposite(int select) { - selectedStack = select; - // if (AnalyzerUtil.isWin()) { - // effect(currentStack, selectedStack); - // } else { - containerLayout.topControl = comps.get(selectedStack); - containerComposite.layout(); - currentStack = selectedStack; - ((DAPageComposite) containerLayout.topControl).updatePage(); - // } - } - - public List getComposites() { - if (null == comps) { - comps = new ArrayList(); - } - return comps; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/DAPageComposite.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/DAPageComposite.java deleted file mode 100644 index 72d9751..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/DAPageComposite.java +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.page; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.logparser.LogPackage; - -public class DAPageComposite extends Composite implements ViewAction { - - private HashMap viewMap = null; - private List views = null; - protected String name = null; - - public DAPageComposite(Composite parent, int style) { - super(parent, style); - viewMap = new HashMap(); - views = new ArrayList(); - } - - public List getViews() { - return views; - } - - public HashMap getViewMap() { - return viewMap; - } - - public void updatePage() { - int size = views.size(); - for (int i = 0; i < size; i++) { - if (null != views.get(i)) { - views.get(i).updateView(); - } - } - } - - public void updateLog(LogPackage logPack) { - int size = views.size(); - for (int i = 0; i < size; i++) { - if (null != views.get(i)) { - views.get(i).updateLog(logPack); - } - } - } - - public void clear() { - int size = views.size(); - for (int i = 0; i < size; i++) { - if (null != views.get(i)) { - views.get(i).clear(); - } - } - } - - public void updatePage(final DASelectionData data) { - String viewId = data.getViewId(); - int size = views.size(); - for (int i = 0; i < size; i++) { - String key = views.get(i).getClass().getName(); - if (key != null && !key.equals(viewId)) { - final ViewAction view = viewMap.get(key); - if (null != view) { - view.updateView(data); - } - } - } - } - - public void updateSelectedViews(DASelectionData data, List viewNames) { - int size = viewNames.size(); - for (int i = 0; i < size; i++) { - viewMap.get(viewNames.get(i)).updateView(data); - } - } - - public void addView(ViewAction view) { - viewMap.put(view.getClass().getName(), view); - views.add(view); - } - - public void controlSelection(String viewId) { - int size = views.size(); - for (int i = 0; i < size; i++) { - String key = views.get(i).getClass().getName(); - if (key != null && !key.equals(viewId)) { - ViewAction view = viewMap.get(key); - if (null != view) { - view.otherViewSelectionOccured(); - } - } - } - } - - public ViewAction getView(String viewId) { - return viewMap.get(viewId); - } - - @Override - public void updateView() { - updatePage(); - } - - @Override - public Control getControl() { - // TODO Auto-generated method stub - return null; - } - - @Override - public void updateView(DASelectionData data) { - updatePage(data); - } - - @Override - public void otherViewSelectionOccured() { - // TODO Auto-generated method stub - - } - - @Override - public String getViewName() { - return name; - } - - @Override - public void setSelection(List data) { - int size = views.size(); - for (int i = 0; i < size; i++) { - if (null != views.get(i)) { - views.get(i).setSelection(data); - } - } - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/ViewAction.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/ViewAction.java deleted file mode 100644 index e7f5c04..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/page/ViewAction.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.page; - -import java.util.List; - -import org.eclipse.swt.widgets.Control; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.logparser.LogPackage; - - -public interface ViewAction { - - public void updateView(); - - public void updateLog(LogPackage logPack); - - public void clear(); - - public Control getControl(); - - public void updateView(DASelectionData data); - - public void otherViewSelectionOccured(); - - public String getViewName(); - - public void setSelection(List data); -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/FunctionUsageProfilingTableCellRenderer.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/FunctionUsageProfilingTableCellRenderer.java deleted file mode 100644 index 2761a32..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/FunctionUsageProfilingTableCellRenderer.java +++ /dev/null @@ -1,436 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.range; - -import org.eclipse.nebula.widgets.grid.GridItem; -import org.eclipse.nebula.widgets.grid.IInternalWidget; -import org.eclipse.nebula.widgets.grid.internal.CheckBoxRenderer; -import org.eclipse.nebula.widgets.grid.internal.DefaultCellRenderer; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.FontResources; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableToggleRenderer; - -public class FunctionUsageProfilingTableCellRenderer extends - DefaultCellRenderer { - int leftMargin = 4; - int rightMargin = 4; - int topMargin = 0; - int bottomMargin = 0; - int textTopMargin = 1; - int textBottomMargin = 2; - int insideMargin = 3; - int treeIndent = 20; - - private DATableToggleRenderer toggleRenderer; - private CheckBoxRenderer checkRenderer; - - @Override - public void paint(GC gc, Object value) { - GridItem item = (GridItem) value; - - gc.setFont(item.getFont(getColumn())); - - boolean drawAsSelected = isSelected(); - - boolean drawBackground = true; - - if (isCellSelected()) { - drawAsSelected = true;// (!isCellFocus()); - } - - // if (isHover()) - // { - // System.out.println("hover!!"); - // } - - if (drawAsSelected) { - gc.setForeground(ColorResources.TABLE_CONTENTS_SELECTED_START); - gc.setBackground(ColorResources.TABLE_CONTENTS_SELECTED_END); - } else { - - if (item.getParent().isEnabled()) { - Color bg = item.getBackground(); - if (bg != null) { - gc.setBackground(bg); - } else { - drawBackground = false; - } - } else { - gc.setBackground(getDisplay().getSystemColor( - SWT.COLOR_WIDGET_BACKGROUND)); - } - } - - if (drawBackground && drawAsSelected) { - gc.fillGradientRectangle(getBounds().x, getBounds().y, - getBounds().width, getBounds().height, true); - } else if (drawBackground) { - gc.fillRectangle(getBounds().x, getBounds().y + 1, - getBounds().width, getBounds().height); - } - - int x = leftMargin; - - if (isTree()) { - x += getToggleIndent(item); - if (drawAsSelected) { - toggleRenderer.setSelected(true); - } else { - toggleRenderer.setSelected(false); - } - toggleRenderer.setExpanded(item.isExpanded()); - - toggleRenderer.setHover(getHoverDetail().equals("toggle")); //$NON-NLS-1$ - - toggleRenderer.setLocation(getBounds().x + x, - (getBounds().height - toggleRenderer.getBounds().height) - / 2 + getBounds().y); - toggleRenderer.paint(gc, item); - - x += toggleRenderer.getBounds().width + insideMargin; - - } - - if (isCheck()) { - - checkRenderer.setChecked(item.getChecked(getColumn())); - checkRenderer.setGrayed(item.getGrayed(getColumn())); - if (!item.getParent().isEnabled()) { - checkRenderer.setGrayed(true); - } - checkRenderer.setHover(getHoverDetail().equals("check")); //$NON-NLS-1$ - - checkRenderer.setBounds(getBounds().x + x, - (getBounds().height - checkRenderer.getBounds().height) / 2 - + getBounds().y, checkRenderer.getBounds().width, - checkRenderer.getBounds().height); - checkRenderer.paint(gc, null); - - x += checkRenderer.getBounds().width + insideMargin; - } - - Image image = item.getImage(getColumn()); - if (image != null) { - int y = getBounds().y; - - y += (getBounds().height - image.getBounds().height) / 2; - - gc.drawImage(image, getBounds().x + x, y); - - x += image.getBounds().width + insideMargin; - } - - int width = getBounds().width - x - rightMargin; - - String text = item.getText(getColumn()); - - if (getAlignment() == SWT.RIGHT) { - int len = gc.stringExtent(text).x; - if (len < width) { - x += width - len; - } - } else if (getAlignment() == SWT.CENTER) { - int len = gc.stringExtent(text).x; - if (len < width) { - x += (width - len) / 2; - } - } - - if (getColumn() == 2 || getColumn() == 4) { - if (drawAsSelected) { - gc.setForeground(ColorResources.PROFILING_GRAPH_SELECTION_COLOR_START); - gc.setBackground(ColorResources.PROFILING_GRAPH_SELECTION_COLOR_END); - } else { - gc.setForeground(ColorResources.PROFILING_GRAPH_COLOR_START); - gc.setBackground(ColorResources.PROFILING_GRAPH_COLOR_END); - } - String rateStr = item.getText(getColumn()); - String[] splitRateStr = rateStr.split("%"); //$NON-NLS-1$ - rateStr = new String(splitRateStr[0].trim()); - if ( !rateStr.equals("-")) { - double rate = Double.parseDouble(rateStr); - Rectangle bounds = getBounds(); - int rectWidth = (int) (bounds.width * (rate / 100)); - gc.fillGradientRectangle(bounds.x + 1, bounds.y, rectWidth, - bounds.height, true); - } - } - - if (drawAsSelected) { - gc.setForeground(ColorResources.TABLE_CONTENTS_SELECTED_FONT_COLOR); - } else { - Color fontColor = item.getForeground(); - if (null != fontColor) { - gc.setForeground(item.getForeground()); - } else { - gc.setForeground(ColorResources.TABLE_CONTENTS_FONT_COLOR); - } - - // Color fg = item.getForeground(getColumn()); - // if (null == fg || fg.equals(ColorResources.BLACK)) { - // gc.setForeground(ColorResources.WHITE); - // } else { - // gc.setForeground(fg); - // } - } - - // Font font = item.getFont(getColumn()); - // if (null == font) { - // if (getColumn() == 2 || getColumn() == 4) { - // gc.setForeground(ColorResources.TABLE_CONTENTS_FONT_COLOR); - // } - gc.setFont(FontResources.TABLE_CELL_FONT); - // } else { - // gc.setFont(font); - // } - if (getColumn() != 0) { - gc.drawText(text, getBounds().x + x, getBounds().y + textTopMargin, - true); - } - - if (item.getParent().getLinesVisible()) { - if (isCellSelected()) { - gc.setForeground(ColorResources.TABLE_LINE); - } else { - gc.setForeground(ColorResources.TABLE_LINE); - } - gc.drawLine(getBounds().x, getBounds().y + getBounds().height, - getBounds().x + getBounds().width - 1, getBounds().y - + getBounds().height); - gc.drawLine(getBounds().x + getBounds().width - 1, getBounds().y, - getBounds().x + getBounds().width - 1, getBounds().y - + getBounds().height); - } - - if (isCellFocus()) { - Rectangle focusRect = new Rectangle(getBounds().x - 1, - getBounds().y - 1, getBounds().width, - getBounds().height + 1); - - gc.setForeground(ColorResources.RED); - gc.drawRectangle(focusRect); - - if (isFocus()) { - focusRect.x++; - focusRect.width -= 2; - focusRect.y++; - focusRect.height -= 2; - - gc.drawRectangle(focusRect); - } - } - } - - private int getToggleIndent(GridItem item) { - return item.getLevel() * 20; - } - - public void setTree(boolean tree) { - super.setTree(tree); - - if (tree) { - toggleRenderer = new DATableToggleRenderer(); - toggleRenderer.setDisplay(getDisplay()); - } - } - - public Point computeSize(GC gc, int wHint, int hHint, Object value) { - GridItem item = (GridItem) value; - gc.setFont(item.getFont(getColumn())); - int x = 0; - - x += leftMargin; - - if (isTree()) { - x += getToggleIndent(item); - x += toggleRenderer.getBounds().width + insideMargin; - } - - if (isCheck()) { - x += checkRenderer.getBounds().width + insideMargin; - } - - int y = 0; - Image image = item.getImage(getColumn()); - if (image != null) { - y = topMargin + image.getBounds().height + bottomMargin; - - x += image.getBounds().width + insideMargin; - } - - x += gc.stringExtent(item.getText(getColumn())).x + rightMargin; - y = Math.max(y, topMargin + gc.getFontMetrics().getHeight() - + bottomMargin); - - return new Point(x, y); - } - - public boolean notify(int event, Point point, Object value) { - GridItem item = (GridItem) value; - if (isCheck()) { - if (event == IInternalWidget.MouseMove) { - if (overCheck(item, point)) { - setHoverDetail("check"); //$NON-NLS-1$ - return true; - } - } - - if (event == IInternalWidget.LeftMouseButtonDown) { - if (overCheck(item, point)) { - item.setChecked(getColumn(), !item.getChecked(getColumn())); - item.getParent().redraw(); - item.fireCheckEvent(getColumn()); - - return true; - } - } - } - - if (isTree() && item.hasChildren()) { - if (event == IInternalWidget.MouseMove) { - if (overToggle(item, point)) { - setHoverDetail("toggle"); //$NON-NLS-1$ - return true; - } - } - - if (event == IInternalWidget.LeftMouseButtonDown) { - if (overToggle(item, point)) { - item.setExpanded(!item.isExpanded()); - item.getParent().redraw(); - - if (item.isExpanded()) { - item.fireEvent(SWT.Expand); - } else { - item.fireEvent(SWT.Collapse); - } - - return true; - } - } - } - - return false; - } - - private boolean overCheck(GridItem item, Point point) { - point = new Point(point.x, point.y); - point.x -= getBounds().x - 1; - point.y -= getBounds().y - 1; - - int x = leftMargin; - if (isTree()) { - x += getToggleIndent(item); - x += toggleRenderer.getSize().x + insideMargin; - } - - if (point.x >= x && point.x < (x + checkRenderer.getSize().x)) { - int yStart = ((getBounds().height - checkRenderer.getBounds().height) / 2); - if (point.y >= yStart - && point.y < yStart + checkRenderer.getSize().y) { - return true; - } - } - - return false; - } - - private boolean overToggle(GridItem item, Point point) { - point = new Point(point.x, point.y); - point.x -= getBounds().x - 1; - point.y -= getBounds().y - 1; - - int x = leftMargin; - x += getToggleIndent(item); - - if (point.x >= x && point.x < (x + toggleRenderer.getSize().x)) { - // return true; - int yStart = ((getBounds().height - toggleRenderer.getBounds().height) / 2); - if (point.y >= yStart - && point.y < yStart + toggleRenderer.getSize().y) { - return true; - } - } - - return false; - } - - public void setCheck(boolean check) { - super.setCheck(check); - - if (check) { - checkRenderer = new CheckBoxRenderer(); - checkRenderer.setDisplay(getDisplay()); - } else { - checkRenderer = null; - } - } - - public Rectangle getTextBounds(GridItem item, boolean preferred) { - int x = leftMargin; - - if (isTree()) { - x += getToggleIndent(item); - - x += toggleRenderer.getBounds().width + insideMargin; - - } - - if (isCheck()) { - x += checkRenderer.getBounds().width + insideMargin; - } - - Image image = item.getImage(getColumn()); - if (image != null) { - x += image.getBounds().width + insideMargin; - } - - Rectangle bounds = new Rectangle(x, topMargin, 0, 0); - - GC gc = new GC(item.getParent()); - gc.setFont(item.getFont(getColumn())); - Point size = gc.stringExtent(item.getText(getColumn())); - - bounds.height = size.y; - - if (preferred) { - bounds.width = size.x; - } else { - bounds.width = getBounds().width - x - rightMargin; - } - - gc.dispose(); - - return bounds; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/FunctionUsageProfilingView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/FunctionUsageProfilingView.java deleted file mode 100644 index 40150fb..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/FunctionUsageProfilingView.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.range; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.model.DAView; -import org.tizen.dynamicanalyzer.nl.SummaryLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.ui.summary.profiling.ProfilingData; -import org.tizen.dynamicanalyzer.ui.summary.profiling.ProfilingTable; -import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer; - -public class FunctionUsageProfilingView extends DAView { - - public static final String ID = FunctionUsageProfilingView.class.getName(); - private ProfilingTable treeComp = null; - int[] innerMaxWeight = { 100, 0 }; - int[] outerMaxWeight = { 0, 100 }; - - private String[] columnNames = { - SummaryLabels.FUNCTION_USER_PROFILING_VIEW_NAME, - SummaryLabels.FUNCTION_USER_PROFILING_VIEW_CPU_TIME, - SummaryLabels.FUNCTION_USER_PROFILING_VIEW_CPU_RATE, - SummaryLabels.FUNCTION_USER_PROFILING_VIEW_CPU_TIME, - SummaryLabels.FUNCTION_USER_PROFILING_VIEW_CPU_RATE, - SummaryLabels.FUNCTION_USER_PROFILING_VIEW_CALL_COUNT, - SummaryLabels.FUNCTION_USER_PROFILING_VIEW_ELASPED_TIME, - SummaryLabels.FUNCTION_USER_PROFILING_VIEW_ELASPED_TIME }; -// private int[] columnSizes = { 200, 0, 0, 0, 0, 0, 0, 0 }; - private boolean[] columnVisibility = { true, true, true, true, true, true, - true, true }; - int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NONE, - AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_NUM }; - int[] sourceColumns = { ProfilingData.NAME_INDEX, - ProfilingData.EXCOUNT_INDEX, ProfilingData.EXCOUNT_INDEX, - ProfilingData.INCOUNT_INDEX, ProfilingData.INCOUNT_INDEX, - ProfilingData.CALLCOUNT_INDEX, - ProfilingData.INCL_ELAPSED_TIME_INDEX, - ProfilingData.EXCL_ELAPSED_TIME_INDEX }; - - public FunctionUsageProfilingView(Composite parent, int style) { - super(parent, style); - this.setLayout(new FillLayout()); - - ViewContainer viewContainer = new ViewContainer(this, true); - viewContainer - .setTitleText(SummaryLabels.FUNCTION_USER_PROFILING_VIEW_TITLE); - setMaxWeight(innerMaxWeight, outerMaxWeight); - Composite contents = viewContainer.getContentArea(); - contents.setBackground(ColorResources.WINDOW_BG_COLOR); - contents.setLayout(new FillLayout()); - treeComp = new ProfilingTable(contents, SWT.NONE, SWT.SINGLE - | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); - /*** setTree set first!!! ***/ - treeComp.setTree(true); - treeComp.setSortTypes(sortTypes); - treeComp.setSourceColumns(sourceColumns); - treeComp.setColumns(columnNames); - // treeComp.setColumnSize(columnSizes); - treeComp.setColumnVisibility(columnVisibility); - treeComp.setTableToolTipEnable(false); - treeComp.setTableName("R_Function Usage"); - } - - @Override - public void updateView() { - treeComp.updateTree(); - } - - @Override - public void clear() { - treeComp.clear(); - } - - @Override - public Control getControl() { - return treeComp; - } - - @Override - public void otherViewSelectionOccured() { - treeComp.deselectAll(); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/RangeDataManager.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/RangeDataManager.java deleted file mode 100644 index 31b0887..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/RangeDataManager.java +++ /dev/null @@ -1,197 +0,0 @@ -package org.tizen.dynamicanalyzer.ui.range; - -import java.util.List; - -import org.eclipse.swt.widgets.Display; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.logparser.LogPackage; -import org.tizen.dynamicanalyzer.logparser.Logs; -import org.tizen.dynamicanalyzer.model.LogCenter; -import org.tizen.dynamicanalyzer.sql.SqlManager; -import org.tizen.dynamicanalyzer.ui.file.FileDataMaker; -import org.tizen.dynamicanalyzer.ui.page.DAPageComposite; -import org.tizen.dynamicanalyzer.ui.summary.failed.FailedChecker; -import org.tizen.dynamicanalyzer.ui.summary.leaks.LeakDetector; -import org.tizen.dynamicanalyzer.ui.summary.warning.WarningChecker; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; - -public class RangeDataManager implements Runnable { - private static RangeDataManager instance = null; - private Thread rangeThread = null; - private FailedChecker failedChecker = null; - private LeakDetector leakDetector = null; - private WarningChecker warningChecker = null; - - private FileDataMaker fileDataMaker = null; - private String startTime = null; - private String endTime = null; - - public RangeDataManager() { - failedChecker = new FailedChecker(); - leakDetector = new LeakDetector(); - warningChecker = new WarningChecker(); - - fileDataMaker = new FileDataMaker(failedChecker, leakDetector, - warningChecker); - } - - public void clear() { - failedChecker.clear(); - leakDetector.clear(); - warningChecker.clear(); - } - - public void startRangeThread() { - if (null == rangeThread || !rangeThread.isAlive()) { - rangeThread = new Thread(null, getInstance(), - AnalyzerConstants.FILE_CHART_MANAGER_THREAD); - rangeThread.start(); - } - } - - public void stopUpdateLogThread() { - if (null != rangeThread && rangeThread.isAlive()) { - rangeThread.interrupt(); - } - } - - public static RangeDataManager getInstance() { - if (null == instance) { - instance = new RangeDataManager(); - } - return instance; - } - - public FailedChecker getFailedChecker() { - return failedChecker; - } - - public void setFailedChecker(FailedChecker failedChecker) { - this.failedChecker = failedChecker; - } - - public LeakDetector getLeakDetector() { - return leakDetector; - } - - public void setLeakDetector(LeakDetector leakDetector) { - this.leakDetector = leakDetector; - } - - public WarningChecker getWarningChecker() { - return warningChecker; - } - - public void setWarningChecker(WarningChecker warningChecker) { - this.warningChecker = warningChecker; - } - - public void setTimes(String startTime, String endTime) { - this.startTime = startTime; - this.endTime = endTime; - } - - @Override - public void run() { - List logCenters = AnalyzerManager.getLogCenters(); - List> input = null; - LogPackage logPackage = new LogPackage(); - int size = logCenters.size(); - String query = null; - int from = -1; - int last = -1; - for (int i = 0; i < size; i++) { - /* !! sample db table is null.. */ - if (logCenters.get(i).getId() != LogCenterConstants.LOG_DEVICE - && logCenters.get(i).getId() != LogCenterConstants.LOG_SAMPLE) { - query = "select min(seqnumber) from " - + logCenters.get(i).getName() + " where time >= " - + startTime; - int ret = SqlManager.executeQueryMinMax(query); - if (ret >= 0) { - from = (from > 0 && from < ret) ? from : ret; - } - - query = "select max(seqnumber) from " - + logCenters.get(i).getName() + " where time <= " - + endTime; - ret = SqlManager.executeQueryMinMax(query); - if (ret >= 0) { - last = (last > 0 && last > ret) ? last : ret; - } - } - } - - System.out.println(from + " ~ " + last); - int to = AnalyzerConstants.DATABASE_READ_SIZE; - - while (!Thread.interrupted()) { - if (to >= last) { - to = last; - } - - for (int i = 0; i < size; i++) { - if (logCenters.get(i).getId() != LogCenterConstants.LOG_DEVICE - && logCenters.get(i).getId() != LogCenterConstants.LOG_SAMPLE) { - Logs logs = new Logs(logCenters.get(i).getId()); - input = SqlManager.selectArea(logCenters.get(i), from, to); - logs.setLogs(input); - logPackage.setLogs(logCenters.get(i).getId(), logs); - } - } // for - // updateLog(logPackage); - makeRangeData(logPackage); - if (to == last) { - break; - } - from += AnalyzerConstants.DATABASE_READ_SIZE; - to = from + AnalyzerConstants.DATABASE_READ_SIZE; - } - System.out.println("range input reader complete"); - // end - AnalyzerUtil.changePage(RangePage.ID); - final DAPageComposite page = AnalyzerManager.getCurrentPage(); - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - page.updatePage(); - } - }); - } - - private void makeRangeData(LogPackage logPack) { - Logs logs = logPack.getLogs(LogCenterConstants.LOG_RESOURCE); - List> resourceInputs = logs.getLogs(); - - logs = logPack.getLogs(LogCenterConstants.LOG_MEMORY); - List> memoryInputs = logs.getLogs(); - - // logs = logPack.getLogs(LogCenterConstants.LOG_THREAD); - // List> threadInputs = logs.getLogs(); - - /* make file failed data and warning data */ - fileDataMaker.makeData(resourceInputs); - - /* resource leak check */ - int size = resourceInputs.size(); - for (int i = 0; i < size; i++) { - List input = resourceInputs.get(i); - String[] inputArray = new String[input.size()]; - input.toArray(inputArray); - leakDetector.runLeakDectect(inputArray); - } - - /* memory leak check */ - size = memoryInputs.size(); - for (int i = 0; i < size; i++) { - List input = memoryInputs.get(i); - String[] inputArray = new String[input.size()]; - input.toArray(inputArray); - leakDetector.runLeakDectect(inputArray); - } - - /* created failed and warning/leak data */ - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/RangeFailedApiListView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/RangeFailedApiListView.java deleted file mode 100644 index 79b8c7b..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/RangeFailedApiListView.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.range; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.model.DAView; -import org.tizen.dynamicanalyzer.nl.SummaryLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.ui.summary.failed.FailedApiTable; -import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite; -import org.tizen.dynamicanalyzer.ui.widgets.table.TableComparator; - -public class RangeFailedApiListView extends DAView { - public static final String ID = RangeFailedApiListView.class.getName(); - private DATableComposite tableComp = null; - - int[] innerMaxWeight = { 100, 0, 0 }; - int[] outerMaxWeight = { 100, 0 }; - - private String[] columnNames = { SummaryLabels.FAILED_API_LIST_VIEW_INDEX, - SummaryLabels.FAILED_API_LIST_VIEW_TIME, - SummaryLabels.FAILED_API_LIST_VIEW_NAME, - SummaryLabels.FAILED_API_LIST_VIEW_PARAMETER, - SummaryLabels.FAILED_API_LIST_VIEW_RETURN, - SummaryLabels.FAILED_API_LIST_VIEW_ERROR_CODE, - SummaryLabels.FAILED_API_LIST_VIEW_ERROR_DESCRIPTION }; - private int[] columnSizes = { 25, 60, 45, 125, 0, 70, 400 }; - private boolean[] columnVisibility = { false, true, true, true, true, true, - true }; - int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_STRING, - AnalyzerConstants.SORT_TYPE_STRING, - AnalyzerConstants.SORT_TYPE_STRING, - AnalyzerConstants.SORT_TYPE_GRID, AnalyzerConstants.SORT_TYPE_GRID }; - int[] sourceColumns = { LogCenterConstants.SEQUENCE_NUMBER_INDEX, - LogCenterConstants.TIME_INDEX, LogCenterConstants.APINAME_INDEX, - LogCenterConstants.INPUTPARM_INDEX, - LogCenterConstants.RETURN_INDEX, LogCenterConstants.ERROR_INDEX, - LogCenterConstants.ERROR_INDEX }; - - public RangeFailedApiListView(Composite parent, int style) { - super(parent, style); - this.setLayout(new FillLayout()); - - ViewContainer viewContainer = new ViewContainer(this, true); - viewContainer - .setTitleText(SummaryLabels.FAILED_API_LIST_VIEW_TITLE); - setMaxWeight(innerMaxWeight, outerMaxWeight); - Composite contents = viewContainer.getContentArea(); - contents.setBackground(ColorResources.WINDOW_BG_COLOR); - contents.setLayout(new FillLayout()); - tableComp = new FailedApiTable(contents, SWT.NONE, SWT.SINGLE - | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL); - ((FailedApiTable)tableComp).setRangeTable(true); - tableComp.setTableName("R_Failed APIs"); - tableComp.setComparator(new TableComparator()); - tableComp.setSortTypes(sortTypes); - tableComp.setSourceColumns(sourceColumns); - tableComp.setColumns(columnNames); - tableComp.setColumnSize(columnSizes); - tableComp.setColumnVisibility(columnVisibility); - } - - @Override - public void updateView() { - tableComp.updateTable(); - } - - @Override - public void clear() { - // TODO Auto-generated method stub - tableComp.clear(); - } - - @Override - public Control getControl() { - return tableComp; - } - - @Override - public void otherViewSelectionOccured() { - tableComp.deselectAll(); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/RangeLeakView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/RangeLeakView.java deleted file mode 100644 index 3a13682..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/RangeLeakView.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.range; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.model.DAView; -import org.tizen.dynamicanalyzer.nl.SummaryLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.ui.summary.leaks.LeakData; -import org.tizen.dynamicanalyzer.ui.summary.leaks.LeakTable; -import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATreeComposite; -import org.tizen.dynamicanalyzer.ui.widgets.table.TreeDataComparator; - -public class RangeLeakView extends DAView { - - public static final String ID = RangeLeakView.class.getName(); - - int[] innerMaxWeight = { 0, 100, 0 }; - int[] outerMaxWeight = { 100, 0 }; - - private String[] columnNames = { SummaryLabels.LEAK_VIEW_NAME, - SummaryLabels.LEAK_VIEW_INDEX, SummaryLabels.LEAK_VIEW_TYPE, - SummaryLabels.LEAK_VIEW_TIME, - SummaryLabels.LEAK_VIEW_FILE_PARAMETER, - SummaryLabels.LEAK_VIEW_RETURN }; - private int[] columnSizes = { 60, 25, 60, 50, 100, 100 }; - private boolean[] columnVisibility = { true, false, true, true, true, true }; - int[] sortTypes = { AnalyzerConstants.SORT_TYPE_GRID, - AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_GRID, - AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_STRING, - AnalyzerConstants.SORT_TYPE_STRING }; - int[] sourceColumns = { LeakData.SEQUENCE_INDEX, LeakData.SEQUENCE_INDEX, - LeakData.ID_INDEX, LeakData.TIME_INDEX, LeakData.NAME_INDEX, - LeakData.PARAM_INDEX, LeakData.RETURN_INDEX }; - - private DATreeComposite treeComp = null; - - public RangeLeakView(Composite parent, int style) { - super(parent, style); - this.setLayout(new FillLayout()); - - ViewContainer viewContainer = new ViewContainer(this, true); - viewContainer.setTitleText(SummaryLabels.LEAK_VIEW_TITLE); - setMaxWeight(innerMaxWeight, outerMaxWeight); - - Composite contents = viewContainer.getContentArea(); - contents.setBackground(ColorResources.WINDOW_BG_COLOR); - contents.setLayout(new FillLayout()); - treeComp = new LeakTable(contents, SWT.NONE, SWT.SINGLE | SWT.BORDER - | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL); - ((LeakTable) treeComp).setRangeTable(true); - /*** setTree set first!!! ***/ - treeComp.setTree(true); - treeComp.setSortTypes(sortTypes); - treeComp.setSourceColumns(sourceColumns); - treeComp.setComparator(new TreeDataComparator()); - treeComp.setColumns(columnNames); - treeComp.setColumnSize(columnSizes); - treeComp.setColumnVisibility(columnVisibility); - treeComp.setTableName("R_LEAK table"); - } - - @Override - public void updateView() { - treeComp.updateTree(); - } - - @Override - public void clear() { - treeComp.clear(); - } - - @Override - public Control getControl() { - return treeComp; - } - - @Override - public void otherViewSelectionOccured() { - treeComp.deselectAll(); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/RangePage.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/RangePage.java deleted file mode 100644 index e303629..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/RangePage.java +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.range; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.SashForm; -import org.eclipse.swt.events.ControlEvent; -import org.eclipse.swt.events.ControlListener; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.common.CommonConstants; -import org.tizen.dynamicanalyzer.common.DesignConstants; -import org.tizen.dynamicanalyzer.nl.AnalyzerLabels; -import org.tizen.dynamicanalyzer.ui.info.callstack.CallstackView; -import org.tizen.dynamicanalyzer.ui.info.snapshot.SnapshotView; -import org.tizen.dynamicanalyzer.ui.page.DAPageComposite; -import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfilingView; -import org.tizen.dynamicanalyzer.ui.summary.warning.WarningDetailView; -import org.tizen.dynamicanalyzer.ui.widgets.DATabComposite; - -public class RangePage extends DAPageComposite { - public static final String ID = RangePage.class.getName(); - public static final String TAB_ID = ID + CommonConstants.UNDERBAR + "tab"; - public final static int FAILED_APILIST_VIEW_INDEX = 0; - public final static int LEAK_VIEW_INDEX = 1; - public final static int INFO_VIEW_INDEX = 2; - public final static int FUNCTION_PROFILING_VIEW_INDEX = 3; - public final static int WARNING_VIEW_INDEX = 4; - public final static int WARNING_VIEW_DETAIL_INDEX = 5; - - SashForm upperForm; - SashForm bottomForm; - SashForm baseForm; - SashForm warningForm; - - // 10 : offset - private final double DEFAULT_WIDTH = DesignConstants.SNAPSHOT_VIEW_WIDTH + 10; - private final double DEFAULT_HEIGHT = DesignConstants.SNAPSHOT_VIEW_HEIGHT - + 10 + DesignConstants.VIEW_TITLEBAR_HEIGHT; - - public RangePage(Composite parent, int style) { - super(parent, style); - name = AnalyzerLabels.COOLBAR_AREA_RANGE; - this.setLayout(new FillLayout()); - - baseForm = new SashForm(this, SWT.VERTICAL); - baseForm.setLayout(new FillLayout()); - - upperForm = new SashForm(baseForm, SWT.HORIZONTAL); - - // FAILED_APILIST_VIEW_INDEX = 0; - RangeFailedApiListView failedApiListView = new RangeFailedApiListView(upperForm, - SWT.NONE); - addView(failedApiListView); - - // LEAK_VIEW_INDEX = 1; - RangeLeakView leakView = new RangeLeakView(upperForm, SWT.NONE); - addView(leakView); - - // INFO_VIEW_INDEX = 2; - DATabComposite tabView = new DATabComposite(upperForm, SWT.NONE); - addView(tabView); - { - SnapshotView currentView = new SnapshotView( - tabView.getContentComposite(), SWT.NONE, false); - tabView.addView(currentView); - - CallstackView callstack = new CallstackView( - tabView.getContentComposite(), SWT.NONE); - callstack.setObservingViews(new String[] { RangeFailedApiListView.ID, - RangeLeakView.ID, RangeWarningListView.ID }); - tabView.addView(callstack); - } - upperForm.setWeights(new int[] { 37, 40, 23 }); - - bottomForm = new SashForm(baseForm, SWT.HORIZONTAL); - // FUNCTION_PROFILING_VIEW_INDEX = 3; - FunctionUsageProfilingView userFunctionProfilingView = new FunctionUsageProfilingView( - bottomForm, SWT.NONE); - addView(userFunctionProfilingView); - - warningForm = new SashForm(bottomForm, SWT.VERTICAL); - bottomForm.setWeights(new int[] { 70, 30 }); - - // WARNING_VIEW_INDEX = 4; - RangeWarningListView warningListView = new RangeWarningListView(warningForm, - SWT.NONE); - addView(warningListView); - - // WARNING_VIEW_DETAIL_INDEX = 5; - WarningDetailView warningDetailView = new WarningDetailView( - warningForm, SWT.NONE); - addView(warningDetailView); - warningForm.setWeights(new int[] { 70, 30 }); - - this.addControlListener(new ControlListener() { - - @Override - public void controlResized(ControlEvent e) { - - Composite composite = (Composite) e.widget; - Rectangle rect = composite.getBounds(); - int pageWidth = rect.width; - int pageHeight = rect.height; - - int wRate = (int) (DEFAULT_WIDTH * 100 / pageWidth); - int hRate = (int) (DEFAULT_HEIGHT * 100 / pageHeight); - wRate = (wRate >= 100) ? 100 : wRate; - hRate = (hRate >= 100) ? 100 : hRate; - - if ((wRate >= (100 - 37)) || hRate >= 100) { - return; - } - upperForm.setWeights(new int[] { 37, 100 - 37 - wRate, wRate }); - baseForm.setWeights(new int[] { hRate, 100 - hRate }); - } - - @Override - public void controlMoved(ControlEvent e) { - - } - }); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/RangeWarningDetailView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/RangeWarningDetailView.java deleted file mode 100644 index 963c42e..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/RangeWarningDetailView.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.range; - -import org.eclipse.nebula.widgets.grid.GridItem; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Canvas; -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.model.DAView; -import org.tizen.dynamicanalyzer.nl.SummaryLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.FontResources; -import org.tizen.dynamicanalyzer.ui.summary.warning.WarningChecker; -import org.tizen.dynamicanalyzer.ui.summary.warning.WarningData; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; - -public class RangeWarningDetailView extends DAView { - - public static final String ID = RangeWarningDetailView.class.getName(); - - private Canvas canvas = null; - private String warningMessage = ""; //$NON-NLS-1$ - private final String titleText = SummaryLabels.FILE_DETAILS_TITLE; - - public RangeWarningDetailView(Composite parent, int style) { - super(parent, style); - this.setLayout(new FillLayout()); - canvas = new Canvas(this, SWT.NONE); - canvas.addPaintListener(detailPaintListener); - canvas.setBackground(ColorResources.DIALOG_BG_UPPER); - } - - private PaintListener detailPaintListener = new PaintListener() { - - @Override - public void paintControl(PaintEvent e) { - Rectangle rect = canvas.getBounds(); - int width = rect.width - 20; - e.gc.setFont(FontResources.TABLE_CELL_FONT); - e.gc.setForeground(ColorResources.DEFAULT_FONT_COLOR); - String text = warningMessage; - Point titleSize = e.gc.textExtent(titleText, SWT.DRAW_MNEMONIC); - int fontHeight = titleSize.y + 5; - e.gc.drawText(titleText, 5, 0); - - for (int i = 1; text.length() > 0; i++) { - Point textSize = e.gc.textExtent(text, SWT.DRAW_MNEMONIC); - String inputText = ""; //$NON-NLS-1$ - if (textSize.x > width) { - int strLen = (width * text.length()) / textSize.x; - inputText += text.substring(0, strLen - 1); - text = text.substring(strLen - 1, text.length()); - } else { - inputText += text; - text = ""; //$NON-NLS-1$ - } - e.gc.drawText(inputText, 10, fontHeight * i); - } - } - }; - - @Override - public void updateView(DASelectionData data) { - if (data.getViewId().equals(RangeWarningListView.ID)) { - GridItem[] items = (GridItem[]) data.getData(); - if (items.length <= 0) { - return; - } - GridItem item = items[0]; - DATableDataFormat tableData = (DATableDataFormat) item.getData(); - String seq = tableData.getData().get( - LogCenterConstants.SEQUENCE_NUMBER_INDEX); - WarningData warning = AnalyzerManager.getWarningChecker() - .getWarningDataByLogSeq(seq); - if (null == warning) { - warningMessage = ""; //$NON-NLS-1$ - } else { - warningMessage = WarningChecker - .messageMaker(warning, false); - } - canvas.redraw(); - } - } - - @Override - public void clear() { - warningMessage = ""; //$NON-NLS-1$ - canvas.redraw(); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/RangeWarningListView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/RangeWarningListView.java deleted file mode 100644 index 81f8da0..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/RangeWarningListView.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.range; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.SashForm; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.model.DAView; -import org.tizen.dynamicanalyzer.nl.SummaryLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.ui.summary.warning.WarningTable; -import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite; -import org.tizen.dynamicanalyzer.ui.widgets.table.TableComparator; - -public class RangeWarningListView extends DAView { - - public static final String ID = RangeWarningListView.class.getName(); - - int[] innerMaxWeight = { 0, 100 }; - int[] outerMaxWeight = { 0, 100 }; - - private DATableComposite tableComp = null; - private String[] columnNames = { SummaryLabels.WARNING_LIST_VIEW_INDEX, - SummaryLabels.WARNING_LIST_VIEW_CATEGORY, - SummaryLabels.WARNING_LIST_VIEW_WARNING_MESSAGE }; - private int[] columnSizes = { 25, 0, 200 }; - int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_GRID, AnalyzerConstants.SORT_TYPE_GRID }; - int[] sourceColumns = { LogCenterConstants.SEQUENCE_NUMBER_INDEX, - LogCenterConstants.ID_INDEX, LogCenterConstants.APINAME_INDEX }; - - public RangeWarningListView(Composite parent, int style) { - super(parent, style); - this.setLayout(new FillLayout()); - - ViewContainer viewContainer = new ViewContainer(this, true); - viewContainer.setTitleText(SummaryLabels.WARNING_LIST_VIEW_TITLE); - setMaxWeight(innerMaxWeight, outerMaxWeight); - - Composite contents = viewContainer.getContentArea(); - contents.setBackground(ColorResources.VIEW_BG_COLOR); - contents.setLayout(new FillLayout()); - tableComp = new WarningTable(contents, SWT.NONE, SWT.SINGLE - | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL); - ((WarningTable) tableComp).setRangeTable(true); - tableComp.setComparator(new TableComparator()); - tableComp.setSortTypes(sortTypes); - tableComp.setSourceColumns(sourceColumns); - tableComp.setColumns(columnNames); - tableComp.setColumnSize(columnSizes); - tableComp.setTableName("R_Warning table"); - } - - @Override - public void updateView() { - tableComp.updateTable(); - } - - @Override - public void clear() { - tableComp.clear(); - } - - @Override - public Control getControl() { - return tableComp; - } - - @Override - public void otherViewSelectionOccured() { - tableComp.deselectAll(); - } - - @Override - public void setMaxSize(boolean maximized) { - - if (null == innerMaxWeight || null == outerMaxWeight) { - return; - } - - Composite parent = getParent(); - if (parent instanceof SashForm) { - parent = parent.getParent(); - if (!(parent instanceof SashForm)) { - return; - } - } - - Composite pParent = parent.getParent(); - if (!(pParent instanceof SashForm)) { - return; - } - - SashForm innerForm = (SashForm) parent; - SashForm outerForm = (SashForm) pParent; - - if (maximized) { - oldInnerLayout = innerForm.getWeights(); - oldOuterLayout = outerForm.getWeights(); - innerForm.setWeights(innerMaxWeight); - outerForm.setWeights(outerMaxWeight); - } else { - innerForm.setWeights(oldInnerLayout); - outerForm.setWeights(oldOuterLayout); - } - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/SummaryPage.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/SummaryPage.java deleted file mode 100644 index b05e80d..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/SummaryPage.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.summary; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.SashForm; -import org.eclipse.swt.events.ControlEvent; -import org.eclipse.swt.events.ControlListener; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.common.CommonConstants; -import org.tizen.dynamicanalyzer.common.DesignConstants; -import org.tizen.dynamicanalyzer.nl.AnalyzerLabels; -import org.tizen.dynamicanalyzer.ui.info.callstack.CallstackView; -import org.tizen.dynamicanalyzer.ui.info.snapshot.SnapshotView; -import org.tizen.dynamicanalyzer.ui.page.DAPageComposite; -import org.tizen.dynamicanalyzer.ui.summary.failed.FailedApiListView; -import org.tizen.dynamicanalyzer.ui.summary.leaks.LeakView; -import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfilingView; -import org.tizen.dynamicanalyzer.ui.summary.warning.WarningDetailView; -import org.tizen.dynamicanalyzer.ui.summary.warning.WarningListView; -import org.tizen.dynamicanalyzer.ui.widgets.DATabComposite; - -public class SummaryPage extends DAPageComposite { - public static final String ID = SummaryPage.class.getName(); - public static final String TAB_ID = ID + CommonConstants.UNDERBAR + "tab"; - public final static int FAILED_APILIST_VIEW_INDEX = 0; - public final static int LEAK_VIEW_INDEX = 1; - public final static int INFO_VIEW_INDEX = 2; - public final static int FUNCTION_PROFILING_VIEW_INDEX = 3; - public final static int WARNING_VIEW_INDEX = 4; - public final static int WARNING_VIEW_DETAIL_INDEX = 5; - - SashForm upperForm; - SashForm bottomForm; - SashForm baseForm; - SashForm warningForm; - - // 10 : offset - private final double DEFAULT_WIDTH = DesignConstants.SNAPSHOT_VIEW_WIDTH + 10; - private final double DEFAULT_HEIGHT = DesignConstants.SNAPSHOT_VIEW_HEIGHT - + 10 + DesignConstants.VIEW_TITLEBAR_HEIGHT; - - public SummaryPage(Composite parent, int style) { - super(parent, style); - name = AnalyzerLabels.COOLBAR_AREA_SUMMARY; - this.setLayout(new FillLayout()); - - baseForm = new SashForm(this, SWT.VERTICAL); - baseForm.setLayout(new FillLayout()); - - upperForm = new SashForm(baseForm, SWT.HORIZONTAL); - - // FAILED_APILIST_VIEW_INDEX = 0; - FailedApiListView failedApiListView = new FailedApiListView(upperForm, - SWT.NONE); - addView(failedApiListView); - - // LEAK_VIEW_INDEX = 1; - LeakView leakView = new LeakView(upperForm, SWT.NONE); - addView(leakView); - - // INFO_VIEW_INDEX = 2; - DATabComposite tabView = new DATabComposite(upperForm, SWT.NONE); - addView(tabView); - { - SnapshotView snapshotView = new SnapshotView( - tabView.getContentComposite(), SWT.NONE, false); - tabView.addView(snapshotView); - snapshotView.setObservingViews(new String[] { FailedApiListView.ID, - LeakView.ID, WarningListView.ID }); - - CallstackView callstack = new CallstackView( - tabView.getContentComposite(), SWT.NONE); - callstack.setObservingViews(new String[] { FailedApiListView.ID, - LeakView.ID, WarningListView.ID }); - tabView.addView(callstack); - } - upperForm.setWeights(new int[] { 37, 40, 23 }); - - bottomForm = new SashForm(baseForm, SWT.HORIZONTAL); - // FUNCTION_PROFILING_VIEW_INDEX = 3; - FunctionUsageProfilingView userFunctionProfilingView = new FunctionUsageProfilingView( - bottomForm, SWT.NONE); - addView(userFunctionProfilingView); - - warningForm = new SashForm(bottomForm, SWT.VERTICAL); - bottomForm.setWeights(new int[] { 70, 30 }); - - // WARNING_VIEW_INDEX = 4; - WarningListView warningListView = new WarningListView(warningForm, - SWT.NONE); - addView(warningListView); - - // WARNING_VIEW_DETAIL_INDEX = 5; - WarningDetailView warningDetailView = new WarningDetailView( - warningForm, SWT.NONE); - addView(warningDetailView); - warningForm.setWeights(new int[] { 70, 30 }); - - this.addControlListener(new ControlListener() { - - @Override - public void controlResized(ControlEvent e) { - - Composite composite = (Composite) e.widget; - Rectangle rect = composite.getBounds(); - int pageWidth = rect.width; - int pageHeight = rect.height; - - int wRate = (int) (DEFAULT_WIDTH * 100 / pageWidth); - int hRate = (int) (DEFAULT_HEIGHT * 100 / pageHeight); - wRate = (wRate >= 100) ? 100 : wRate; - hRate = (hRate >= 100) ? 100 : hRate; - - if ((wRate >= (100 - 37)) || hRate >= 100) { - return; - } - upperForm.setWeights(new int[] { 37, 100 - 37 - wRate, wRate }); - baseForm.setWeights(new int[] { hRate, 100 - hRate }); - } - - @Override - public void controlMoved(ControlEvent e) { - - } - }); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/failed/FailedApiListView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/failed/FailedApiListView.java deleted file mode 100644 index b02a583..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/failed/FailedApiListView.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.summary.failed; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.model.DAView; -import org.tizen.dynamicanalyzer.nl.SummaryLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite; -import org.tizen.dynamicanalyzer.ui.widgets.table.TableComparator; - -public class FailedApiListView extends DAView { - public static final String ID = FailedApiListView.class.getName(); - private DATableComposite tableComp = null; - - int[] innerMaxWeight = { 100, 0, 0 }; - int[] outerMaxWeight = { 100, 0 }; - - private String[] columnNames = { SummaryLabels.FAILED_API_LIST_VIEW_INDEX, - SummaryLabels.FAILED_API_LIST_VIEW_TIME, - SummaryLabels.FAILED_API_LIST_VIEW_NAME, - SummaryLabels.FAILED_API_LIST_VIEW_PARAMETER, - SummaryLabels.FAILED_API_LIST_VIEW_RETURN, - SummaryLabels.FAILED_API_LIST_VIEW_ERROR_CODE, - SummaryLabels.FAILED_API_LIST_VIEW_ERROR_DESCRIPTION }; - private int[] columnSizes = { 25, 60, 45, 125, 0, 70, 400 }; - private boolean[] columnVisibility = { false, true, true, true, true, true, - true }; - int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_STRING, - AnalyzerConstants.SORT_TYPE_STRING, - AnalyzerConstants.SORT_TYPE_STRING, - AnalyzerConstants.SORT_TYPE_GRID, AnalyzerConstants.SORT_TYPE_GRID }; - int[] sourceColumns = { LogCenterConstants.SEQUENCE_NUMBER_INDEX, - LogCenterConstants.TIME_INDEX, LogCenterConstants.APINAME_INDEX, - LogCenterConstants.INPUTPARM_INDEX, - LogCenterConstants.RETURN_INDEX, LogCenterConstants.ERROR_INDEX, - LogCenterConstants.ERROR_INDEX }; - - public FailedApiListView(Composite parent, int style) { - super(parent, style); - this.setLayout(new FillLayout()); - - ViewContainer viewContainer = new ViewContainer(this, true); - viewContainer - .setTitleText(SummaryLabels.FAILED_API_LIST_VIEW_TITLE); - setMaxWeight(innerMaxWeight, outerMaxWeight); - Composite contents = viewContainer.getContentArea(); - contents.setBackground(ColorResources.WINDOW_BG_COLOR); - contents.setLayout(new FillLayout()); - tableComp = new FailedApiTable(contents, SWT.NONE, SWT.SINGLE - | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL); - tableComp.setTableName("Failed APIs"); - tableComp.setComparator(new TableComparator()); - tableComp.setSortTypes(sortTypes); - tableComp.setSourceColumns(sourceColumns); - tableComp.setColumns(columnNames); - tableComp.setColumnSize(columnSizes); - tableComp.setColumnVisibility(columnVisibility); - } - - @Override - public void updateView() { - tableComp.updateTable(); - } - - @Override - public void clear() { - // TODO Auto-generated method stub - tableComp.clear(); - } - - @Override - public Control getControl() { - return tableComp; - } - - @Override - public void otherViewSelectionOccured() { - tableComp.deselectAll(); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/failed/FailedApiTable.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/failed/FailedApiTable.java deleted file mode 100644 index 4279c3f..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/failed/FailedApiTable.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.summary.failed; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.nebula.widgets.grid.Grid; -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.graphics.Point; -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.error.ErrorCodeManager; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.model.TableInput; -import org.tizen.dynamicanalyzer.ui.file.FilePage; -import org.tizen.dynamicanalyzer.ui.page.DAPageComposite; -import org.tizen.dynamicanalyzer.ui.range.RangeDataManager; -import org.tizen.dynamicanalyzer.ui.thread.ThreadPage; -import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea; -import org.tizen.dynamicanalyzer.ui.userinterface.UIPage; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; -import org.tizen.dynamicanalyzer.utils.Formatter; - -public class FailedApiTable extends DATableComposite { - - private boolean isRange = false; - - public FailedApiTable(Composite parent, int style, int tableStyle) { - super(parent, style, tableStyle); - table.addSelectionListener(new SelectionListener() { - - @Override - public void widgetSelected(SelectionEvent e) { - GridItem[] items = table.getSelection(); - DATableDataFormat dataFormat = (DATableDataFormat) items[0].getData(); - String time = dataFormat.getData().get(LogCenterConstants.TIME_INDEX); - DASelectionData selData = new DASelectionData( - FailedApiListView.ID, Long.parseLong(time), 0, items, table); - AnalyzerManager.getCurrentPage().updatePage(selData); - AnalyzerManager.getCurrentPage().controlSelection( - FailedApiListView.ID); - } - - @Override - 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) { - if (ToolbarArea.getInstance().getSourceViewToggleState() - || !(e.widget instanceof Grid)) { - return; - } - Grid grid = (Grid) e.widget; - GridItem item = grid.getItem(new Point(e.x, e.y)); - if (null == item) { - return; - } - DATableDataFormat tableData = (DATableDataFormat) item - .getData(); - List failedData = tableData.getData(); - String logId = failedData.get(LogCenterConstants.ID_INDEX); - int id = Integer.parseInt(logId); - String pageId = null; - if (id == LogCenterConstants.LOG_RESOURCE) { - String fdType = failedData - .get(LogCenterConstants.RESOURCE_FDTYPE_INDEX); - int type = Integer.parseInt(fdType); - if (type == LogCenterConstants.FD_TYPE_FILE) { - pageId = FilePage.ID; - } else { - // TODO: pageId = NetworkPage.ID; - } - } else if (id == LogCenterConstants.LOG_THREAD) { - pageId = ThreadPage.ID; - } else if (id == LogCenterConstants.LOG_CONTROL) { - pageId = UIPage.ID; - } else { - return; - } - - AnalyzerUtil.changePage(pageId); - DAPageComposite page = (DAPageComposite) AnalyzerUtil - .getTabPage(pageId); - page.setSelection(failedData); - } - }); - } - - public void setRangeTable(boolean isRange) { - this.isRange = isRange; - } - - protected List makeTableInput() { - List failedList = null; - if (isRange) { - failedList = RangeDataManager.getInstance().getFailedChecker() - .getFailedList(); - } else { - failedList = AnalyzerManager.getFailedChecker().getFailedList(); - } - - List input = new ArrayList(); - int size = failedList.size(); - for (int i = 0; i < size; i++) { - // create text - List text = new ArrayList(); - List failedData = failedList.get(i).getData(); - - text.add(failedData.get(LogCenterConstants.SEQUENCE_NUMBER_INDEX)); - String time = Formatter.toTimeFormat(failedData - .get(LogCenterConstants.TIME_INDEX)); - text.add(time); - text.add(failedData.get(LogCenterConstants.APINAME_INDEX)); - text.add(failedData.get(LogCenterConstants.INPUTPARM_INDEX)); - text.add(failedData.get(LogCenterConstants.RETURN_INDEX)); - String errCode = ErrorCodeManager.getInatance().getErrorCode( - failedData.get(LogCenterConstants.ERROR_INDEX)); - if (null == errCode) { - // FIXME : for debug - errCode = "undefined error number"; - } - text.add(errCode); - - String errMsg = ErrorCodeManager.getInatance().getErrorDescription( - failedData.get(LogCenterConstants.ERROR_INDEX)); - if (null == errMsg) { - // FIXME : for debug - errMsg = "undefined error number"; - } - text.add(errMsg); - - // create images - - // create DATableDataFormat - DATableDataFormat tableData = new DATableDataFormat( - failedData.get(LogCenterConstants.SEQUENCE_NUMBER_INDEX)); - tableData.getData().addAll(failedData); - - TableInput tableInput = new TableInput(); - tableInput.setText(text); - tableInput.setData(tableData); - input.add(tableInput); - } - return input; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/failed/FailedChecker.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/failed/FailedChecker.java deleted file mode 100644 index 9415947..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/failed/FailedChecker.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.summary.failed; - -import java.util.ArrayList; -import java.util.List; - -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; - -public class FailedChecker { - - List failedList; - - public void check(String[] log) { - String logcId = log[LogCenterConstants.ID_INDEX]; - int cid = Integer.parseInt(logcId); - if (cid == LogCenterConstants.LOG_MEMORY) { - if (AnalyzerUtil.isInternal(log)) { - return; - } - String addr = log[LogCenterConstants.MEMORY_ADDR_INDEX]; - if (!addr.equals("0") && !addr.equals("0x0")) { //$NON-NLS-1$ //$NON-NLS-2$ - return; - } - checkUserDefinedFunc(log); - } - if (cid == LogCenterConstants.LOG_RESOURCE) { - if (AnalyzerUtil.isInternal(log)) { - return; - } - String fdTypeStr = log[LogCenterConstants.RESOURCE_FDTYPE_INDEX]; - String errnoStr = log[LogCenterConstants.ERROR_INDEX]; - int fdType = Integer.parseInt(fdTypeStr); - long errno = Long.parseLong(errnoStr); - // file or (not error) - file error check file page - if (fdType == 0 || errno == 0) { - return; - } - checkUserDefinedFunc(log); - } - if (cid == LogCenterConstants.LOG_USER_FUNCTION) { - // TODO : check user function error??? - return; - } - } - - private void checkUserDefinedFunc(String[] input) { - if (AnalyzerConstants.USER_CALL == AnalyzerUtil.checkUserCall(input)) { - FailedData fd = new FailedData(input); - getFailedList().add(fd); - } - } - - public List getFailedList() { - if (null == failedList) { - failedList = new ArrayList(); - } - return failedList; - } - - public void clear() { - getFailedList().clear(); - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/failed/FailedData.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/failed/FailedData.java deleted file mode 100644 index 0035d5f..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/failed/FailedData.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.summary.failed; - -import java.util.ArrayList; -import java.util.List; - -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; - -public class FailedData { - public static final int KEY_INDEX = LogCenterConstants.SEQUENCE_NUMBER_INDEX; - - private List data; - - public FailedData(String[] input) { - List data = getData(); - for (int i = 0; i < input.length; i++) { - data.add(input[i]); - } - } - - public FailedData(List input) { - if (null != input && !input.isEmpty()) { - getData().addAll(input); - } - } - - public List getData() { - if (null == data) { - data = new ArrayList(); - } - return data; - } - - public String getLogData(int logIndex) { - if (!getData().isEmpty()) { - return data.get(logIndex); - } - return null; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/leaks/LeakData.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/leaks/LeakData.java deleted file mode 100644 index 2691b41..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/leaks/LeakData.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.summary.leaks; - -import java.util.ArrayList; -import java.util.List; - -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.nl.SummaryLabels; -import org.tizen.dynamicanalyzer.sql.DBTableManager; - -public class LeakData { - public static final int KEY_INDEX = 18; - public static final int ADDR_INDEX = 14; - public static final int SEQUENCE_INDEX = LogCenterConstants.SEQUENCE_NUMBER_INDEX; - public static final int ID_INDEX = LogCenterConstants.ID_INDEX; - public static final int TIME_INDEX = LogCenterConstants.TIME_INDEX; - public static final int NAME_INDEX = LogCenterConstants.APINAME_INDEX; - public static final int PARAM_INDEX = LogCenterConstants.INPUTPARM_INDEX; - public static final int RETURN_INDEX = LogCenterConstants.RETURN_INDEX; - public static final int LEAK_SEQ_INDEX = 19; - - private static final int PARENT_KEY_INDEX = 15; - - protected List data; - private List children; - - public LeakData(String key, String[] log, LeakDetector leakDetector) { - List data = getData(); - for (int i = 0; i < log.length; i++) { - data.set(i, log[i]); - } - data.set(KEY_INDEX, key); - - // LeakDetector ld = AnalyzerManager.getLeakDetector(); - data.set(LEAK_SEQ_INDEX, Integer.toString(leakDetector.getLeakSeq())); - leakDetector.increaseLeakSeq(); - setParentKey(""); - } - - // parent data - public LeakData(String key, String name, String id) { - List data = getData(); - data.set(KEY_INDEX, key); - data.set(ID_INDEX, id); - data.set(TIME_INDEX, SummaryLabels.LEAK_DATA_DEFAULT_FORMAT); - String[] splitName = name.split("\\("); //$NON-NLS-1$ - if (splitName.length > 0) { - data.set(PARAM_INDEX, new String(splitName[0])); - if (splitName.length > 1) { - String[] funcName = splitName[1].split("\\+"); //$NON-NLS-1$ - data.set(NAME_INDEX, new String(funcName[0])); - } - } - LeakDetector ld = AnalyzerManager.getLeakDetector(); - data.set(LEAK_SEQ_INDEX, Integer.toString(ld.getLeakSeq())); - ld.increaseLeakSeq(); - } - - public LeakData(List loadData) { - List data = getData(); - data.set(KEY_INDEX, loadData.get(KEY_INDEX)); - data.set(SEQUENCE_INDEX, loadData.get(SEQUENCE_INDEX)); - data.set(ID_INDEX, loadData.get(ID_INDEX)); - data.set(TIME_INDEX, loadData.get(TIME_INDEX)); - data.set(NAME_INDEX, loadData.get(NAME_INDEX)); - data.set(PARAM_INDEX, loadData.get(PARAM_INDEX)); - data.set(RETURN_INDEX, loadData.get(RETURN_INDEX)); - data.set(LEAK_SEQ_INDEX, loadData.get(LEAK_SEQ_INDEX)); - data.set(PARENT_KEY_INDEX, loadData.get(PARENT_KEY_INDEX)); - } - - public List getData() { - if (null == data) { - data = new ArrayList(); - int size = DBTableManager.commonColumns.length; - for (int i = 0; i < size; i++) { - data.add(""); //$NON-NLS-1$ - } - } - return data; - } - - public String getAddr() { - return getData().get(ADDR_INDEX); - } - - public String getKey() { - return getData().get(KEY_INDEX); - } - - public String getSeq() { - return getData().get(SEQUENCE_INDEX); - } - - public String getId() { - return getData().get(ID_INDEX); - } - - public String getTime() { - return getData().get(TIME_INDEX); - } - - public String getName() { - return getData().get(NAME_INDEX); - } - - public String getParam() { - return getData().get(PARAM_INDEX); - } - - public String getRet() { - return getData().get(RETURN_INDEX); - } - - public List getChildren() { - if (null == children) { - children = new ArrayList(); - } - return children; - } - - public void addChild(LeakData child) { - getChildren().add(child); - } - - public void removeChild(String key) { - int size = children.size(); - for (int i = 0; i < size; i++) { - if (key.equals(children.get(i).getKey())) { - children.remove(i); - break; - } - } - } - - public String getLeakSeq() { - return getData().get(LEAK_SEQ_INDEX); - } - - public void setParentKey(String key) { - getData().set(PARENT_KEY_INDEX, key); - } - - public String getParentKey() { - return getData().get(PARENT_KEY_INDEX); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/leaks/LeakDetector.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/leaks/LeakDetector.java deleted file mode 100644 index 26f69c8..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/leaks/LeakDetector.java +++ /dev/null @@ -1,260 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.summary.leaks; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.model.Check; -import org.tizen.dynamicanalyzer.model.LeakCheckList; -import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackData; -import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackManager; -import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackUnit; - -public class LeakDetector { - public final static int API_TYPE_OPEN = 0; - public final static int API_TYPE_CLOSE = 1; - public final static int API_TYPE_REALLOC = 2; - - HashMap leakCheckHash; - HashMap leakHash; - HashMap childHash; - private int leakSeq = 0; - - public LeakDetector() { - LeakCheckList leakCheckList = AnalyzerManager.getLeakCheckList(); - if (leakCheckList != null) { - leakCheckHash = new HashMap(); - - List checks = leakCheckList.getChecks(); - int size = checks.size(); - for (int i = 0; i < size; i++) { - leakCheckHash.put(checks.get(i).getName(), checks.get(i)); - } - } - } - - public List getLeakDataList() { - List leakList = new ArrayList(); - leakList.addAll(getLeakHash().values()); - return leakList; - } - - public HashMap getLeakHash() { - if (null == leakHash) { - leakHash = new HashMap(); - } - return leakHash; - } - - public HashMap getChildHash() { - if (null == childHash) { - childHash = new HashMap(); - } - return childHash; - } - - public HashMap getLeakCheckHash() { - if (null == leakCheckHash) { - LeakCheckList leakCheckList = AnalyzerManager.getLeakCheckList(); - leakCheckHash = new HashMap(); - List checks = leakCheckList.getChecks(); - int size = checks.size(); - for (int i = 0; i < size; i++) { - leakCheckHash.put(checks.get(i).getName(), checks.get(i)); - } - } - return leakCheckHash; - } - - public void runLeakDectect(String[] input) { - if (null == input || 0 == input.length) { - return; - } - - String apiName = input[LogCenterConstants.APINAME_INDEX]; - String errorStr = input[LogCenterConstants.ERROR_INDEX]; - long errno = Long.parseLong(errorStr); - if (0 != errno) { - return; - } - // step 1 : check "open" or "close" - Check chk; // 0: open , 1: close - if (null == getLeakCheckHash().get(apiName)) { - return; - } else { - chk = getLeakCheckHash().get(apiName); - } - - HashMap leaks = getLeakHash(); - if (chk.getType() == API_TYPE_OPEN) { - if (chk.isCheckUserCall()) { - checkUserFuncLeakData(input, chk); - } else { - LeakData newLeak = new LeakData(input[chk.getKeyIndex()], - input, this); - leaks.put(newLeak.getKey(), newLeak); - } - } else if (chk.getType() == API_TYPE_CLOSE) { - String key = null; - try { - key = input[chk.getKeyIndex()]; - } catch (ArrayIndexOutOfBoundsException e) { - e.printStackTrace(); - return; - } - if (null == key) { - System.out.println(input); - return; - } - LeakData freeData = getChildHash().get(key); - if (null != freeData) { - LeakData parent = leaks.get(freeData.getParentKey()); - parent.removeChild(key); - getChildHash().remove(key); - if (parent.getChildren().isEmpty()) { - leaks.remove(parent.getKey()); - } - } else { - // List leakDatas = new ArrayList(); - // leakDatas.addAll(leaks.values()); - // for (int i = 0; i < leakDatas.size(); i++) { - // System.out.println(leakDatas.get(i).getData()); - // } - // freeData = leaks.get(key); - leaks.remove(key); - } - - } else if (chk.getType() == API_TYPE_REALLOC) { - // System.out.println("realloc!! " + input); - - // free index = input param 1st - String inputParam = input[LogCenterConstants.INPUTPARM_INDEX]; - String[] splitInputParam = inputParam.split("\\,"); - String rmKey = splitInputParam[0]; - leaks.remove(rmKey); - - // internal check - if (chk.isCheckUserCall()) { - checkUserFuncLeakData(input, chk); - } else { - String key = input[chk.getKeyIndex()]; - leaks.put(key, new LeakData(key, input, this)); - } - } - } - - private void checkUserFuncLeakData(String[] input, Check chk) { - HashMap cdMap = CallStackManager.getInstance() - .getCallStackDataBySeqMap(); - // HashMap apiMap = LogSpliter.getCallStackApiByAddrMap(); - HashMap addrMap = CallStackManager.getInstance() - .getCallStackApiByAddrMap(); - - if (null == cdMap || null == addrMap) { - return; - } - - int seqNum = Integer - .parseInt(input[LogCenterConstants.SEQUENCE_NUMBER_INDEX]); - CallStackData csd = cdMap.get(seqNum); - List addrs = null; - try { - addrs = csd.getAddrs(); - } catch (Exception e) { - System.out.println("no callstack : "); - for (int i = 0; i < input.length; i++) - System.out.print(input[i] + " "); - System.out.println(); - // e.printStackTrace(); - return; - } - if (addrs.isEmpty()) { - System.out.println("BUG: Callstack is empty!"); - return; - } - - CallStackUnit callerFunc = addrMap.get(addrs.get(0)); - - // user call - if (CallStackManager.getInstance().isUserCall( - callerFunc.getFunctionName())) { - HashMap leaks = getLeakHash(); - LeakData newLeak = new LeakData(input[chk.getKeyIndex()], input, - this); - leaks.put(newLeak.getKey(), newLeak); - } else { - // undefined internal call - // int size = addrs.size(); - // for (int i = 1; i < size; i++) { - // callerFunc = addrMap.get(addrs.get(i)); - // if (callerFunc.getFunctionName().contains("__dlog_print")) { //$NON-NLS-1$ - // return; - // } - // if (CallStackManager.getInstance().isUserCall( - // callerFunc.getFunctionName())) { - // LeakData childData = new LeakData(input[chk.getKeyIndex()], - // input); - // String addr = Long.toString(addrs.get(i - 1)); - // callerFunc = addrMap.get(addrs.get(i - 1)); - // LeakData parentLeakData = getLeakHash().get(addr); - // if (null == parentLeakData) { - // parentLeakData = new LeakData(addr, - // callerFunc.getSymbol(), - // input[LogCenterConstants.ID_INDEX]); - // getLeakHash().put(addr, parentLeakData); - // } - // parentLeakData.addChild(childData); - // childData.setParentKey(parentLeakData.getKey()); - // getChildHash().put(childData.getKey(), childData); - // break; - // } - // } - } - } - - public int getLeakSeq() { - return leakSeq; - } - - public void increaseLeakSeq() { - leakSeq++; - } - - public void resetLeakSeq() { - leakSeq = 0; - } - - public void clear() { - getLeakHash().clear(); - getChildHash().clear(); - leakSeq = 0; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/leaks/LeakTable.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/leaks/LeakTable.java deleted file mode 100644 index 7f4b766..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/leaks/LeakTable.java +++ /dev/null @@ -1,276 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.summary.leaks; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import org.eclipse.nebula.widgets.grid.Grid; -import org.eclipse.nebula.widgets.grid.GridItem; -import org.eclipse.swt.SWT; -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.graphics.Point; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.model.LogCenter; -import org.tizen.dynamicanalyzer.model.TreeInput; -import org.tizen.dynamicanalyzer.nl.SummaryLabels; -import org.tizen.dynamicanalyzer.sql.SqlManager; -import org.tizen.dynamicanalyzer.ui.file.FilePage; -import org.tizen.dynamicanalyzer.ui.page.DAPageComposite; -import org.tizen.dynamicanalyzer.ui.range.RangeDataManager; -import org.tizen.dynamicanalyzer.ui.thread.ThreadPage; -import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea; -import org.tizen.dynamicanalyzer.ui.userinterface.UIPage; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATreeComposite; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; -import org.tizen.dynamicanalyzer.utils.Formatter; - -public class LeakTable extends DATreeComposite { - - private boolean isRange = false; - - public LeakTable(Composite parent, int compStyle, int tableStyle) { - super(parent, compStyle, tableStyle); - - tree.addListener(SWT.Expand, new Listener() { - - @Override - public void handleEvent(Event event) { - GridItem item = (GridItem) event.item; - setExpand(item, true); - } - }); - tree.addListener(SWT.Collapse, new Listener() { - @Override - public void handleEvent(Event event) { - GridItem item = (GridItem) event.item; - setExpand(item, false); - } - }); - - tree.addSelectionListener(new SelectionListener() { - - @Override - public void widgetSelected(SelectionEvent e) { - GridItem[] items = tree.getSelection(); - - DATableDataFormat dataFormat = (DATableDataFormat) items[0] - .getData(); - String time = dataFormat.getData().get( - LogCenterConstants.TIME_INDEX); - - DASelectionData selData = new DASelectionData(LeakView.ID, Long - .parseLong(time), 0, items, tree); - AnalyzerManager.getCurrentPage().updatePage(selData); - AnalyzerManager.getCurrentPage().controlSelection(LeakView.ID); - } - - @Override - public void widgetDefaultSelected(SelectionEvent e) { - // TODO Auto-generated method stub - - } - }); - - tree.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) { - - if (ToolbarArea.getInstance().getSourceViewToggleState() - || !(e.widget instanceof Grid)) { - return; - } - Grid grid = (Grid) e.widget; - GridItem item = grid.getItem(new Point(e.x, e.y)); - if (null == item) { - return; - } - DATableDataFormat tableData = (DATableDataFormat) item - .getData(); - List data = tableData.getData(); - String logId = data.get(LeakData.ID_INDEX); - String seq = data.get(LeakData.SEQUENCE_INDEX); - int id = Integer.parseInt(logId); - - List logData = getLogData(id, seq); - if (null == logData || logData.isEmpty()) { - return; - } else { - logData.remove(0); - } - - String pageId = null; - if (id == LogCenterConstants.LOG_RESOURCE) { - String fdType = logData - .get(LogCenterConstants.RESOURCE_FDTYPE_INDEX); - int type = Integer.parseInt(fdType); - if (type == LogCenterConstants.FD_TYPE_FILE) { - pageId = FilePage.ID; - } else { - // TODO: pageId = NetworkPage.ID; - } - } else if (id == LogCenterConstants.LOG_THREAD) { - pageId = ThreadPage.ID; - } else if (id == LogCenterConstants.LOG_CONTROL) { - pageId = UIPage.ID; - } else { - return; - } - - AnalyzerUtil.changePage(pageId); - DAPageComposite page = (DAPageComposite) AnalyzerUtil - .getTabPage(pageId); - page.setSelection(logData); - - /* for double click extension */ - // GridItem[] items = (GridItem[]) tree.getSelection(); - // if (null == items || items.length == 0) { - // return; - // } - // GridItem item = items[0]; - // if (item.isExpanded()) { - // setExpand(item, false); - // } else { - // setExpand(item, true); - // } - // updateTree(); - } - }); - } - - public void setRangeTable(boolean isRange) { - this.isRange = isRange; - } - - private List getLogData(int logCenterId, String seq) { - LogCenter logc = AnalyzerManager.getLogCenterById(logCenterId); - String dbName = logc.getName(); - - String query = "select * from " + dbName + " where seqnumber =" + seq - + " ;"; - return SqlManager.executeSelectQuery(query, logc); - } - - // !! recursive!! - public void makeChildTree(List children, TreeInput parent, - String parentName) { - if (!children.isEmpty()) { - int size = children.size(); - for (int i = 0; i < size; i++) { - LeakData data = children.get(i); - TreeInput input = makeInput(data); - parent.getChildren().add(input); - input.setParent(parentName); - } - } - } - - @Override - public List makeTreeInput() { - List output = new ArrayList(); - HashMap leaks = null; - if (isRange) { - leaks = RangeDataManager.getInstance().getLeakDetector() - .getLeakHash(); - } else { - leaks = AnalyzerManager.getLeakDetector().getLeakHash(); - } - ArrayList leakList = new ArrayList(); - leakList.addAll(leaks.values()); - - int size = leakList.size(); - for (int i = 0; i < size; i++) { - LeakData leakData = leakList.get(i); - TreeInput leakInput = makeInput(leakData); - makeChildTree(leakData.getChildren(), leakInput, - leakData.getParentKey()); - output.add(leakInput); - } - return output; - } - - private TreeInput makeInput(LeakData leakData) { - List data = leakData.getData(); - DATableDataFormat tableData = new DATableDataFormat( - data.get(LeakData.LEAK_SEQ_INDEX)); - tableData.getData().addAll(data); - - List text = new ArrayList(); - text.add(leakData.getName()); // 0 column empty value for tree - text.add(leakData.getSeq()); // 1 - - int type = Integer.parseInt(leakData.getId()); - if (type == LogCenterConstants.LOG_MEMORY) { - text.add(SummaryLabels.LEAK_TABLE_MEMORY); - } else if (type == LogCenterConstants.LOG_RESOURCE) { - text.add(SummaryLabels.LEAK_TABLE_RESOURCE); - } else { - text.add(SummaryLabels.LEAK_TABLE_ETC); - } // 2 - - String time = leakData.getTime(); - try { - text.add(Formatter.toTimeFormat(time)); - } catch (NumberFormatException e) { - e.printStackTrace(); - text.add(time); - } // 3 - tableData.setObject(leakData.getName()); // 4 - text.add(leakData.getParam()); // 5 - text.add(leakData.getRet()); // 6 - - TreeInput output = new TreeInput(); - output.setText(text); - output.setData(tableData); - output.setParent(leakData.getParentKey()); - return output; - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/leaks/LeakView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/leaks/LeakView.java deleted file mode 100644 index 13d9c1a..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/leaks/LeakView.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.summary.leaks; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.model.DAView; -import org.tizen.dynamicanalyzer.nl.SummaryLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATreeComposite; -import org.tizen.dynamicanalyzer.ui.widgets.table.TreeDataComparator; - -public class LeakView extends DAView { - - public static final String ID = LeakView.class.getName(); - - int[] innerMaxWeight = { 0, 100, 0 }; - int[] outerMaxWeight = { 100, 0 }; - - private String[] columnNames = { SummaryLabels.LEAK_VIEW_NAME, - SummaryLabels.LEAK_VIEW_INDEX, SummaryLabels.LEAK_VIEW_TYPE, - SummaryLabels.LEAK_VIEW_TIME, - SummaryLabels.LEAK_VIEW_FILE_PARAMETER, - SummaryLabels.LEAK_VIEW_RETURN }; - private int[] columnSizes = { 60, 25, 60, 50, 100, 100 }; - private boolean[] columnVisibility = { true, false, true, true, true, true }; - int[] sortTypes = { AnalyzerConstants.SORT_TYPE_GRID, - AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_GRID, - AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_STRING, - AnalyzerConstants.SORT_TYPE_STRING }; - int[] sourceColumns = { LeakData.SEQUENCE_INDEX, LeakData.SEQUENCE_INDEX, - LeakData.ID_INDEX, LeakData.TIME_INDEX, LeakData.NAME_INDEX, - LeakData.PARAM_INDEX, LeakData.RETURN_INDEX }; - - private DATreeComposite treeComp = null; - - public LeakView(Composite parent, int style) { - super(parent, style); - this.setLayout(new FillLayout()); - - ViewContainer viewContainer = new ViewContainer(this, true); - viewContainer.setTitleText(SummaryLabels.LEAK_VIEW_TITLE); - setMaxWeight(innerMaxWeight, outerMaxWeight); - - Composite contents = viewContainer.getContentArea(); - contents.setBackground(ColorResources.WINDOW_BG_COLOR); - contents.setLayout(new FillLayout()); - treeComp = new LeakTable(contents, SWT.NONE, SWT.SINGLE | SWT.BORDER - | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL); - - /*** setTree set first!!! ***/ - treeComp.setTree(true); - treeComp.setSortTypes(sortTypes); - treeComp.setSourceColumns(sourceColumns); - treeComp.setComparator(new TreeDataComparator()); - treeComp.setColumns(columnNames); - treeComp.setColumnSize(columnSizes); - treeComp.setColumnVisibility(columnVisibility); - treeComp.setTableName(SummaryLabels.LEAK_VIEW_TITLE); - } - - @Override - public void updateView() { - treeComp.updateTree(); - } - - @Override - public void clear() { - treeComp.clear(); - } - - @Override - public Control getControl() { - return treeComp; - } - - @Override - public void otherViewSelectionOccured() { - treeComp.deselectAll(); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/ColumnGroupRenderer.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/ColumnGroupRenderer.java deleted file mode 100644 index ea61ffe..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/ColumnGroupRenderer.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.tizen.dynamicanalyzer.ui.summary.profiling; - -import org.eclipse.nebula.widgets.grid.GridColumnGroup; -import org.eclipse.nebula.widgets.grid.internal.DefaultColumnGroupHeaderRenderer; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.FontResources; - -public class ColumnGroupRenderer extends DefaultColumnGroupHeaderRenderer { - - int leftMargin = 6; - - int rightMargin = 6; - - int topMargin = 3; - - int bottomMargin = 3; - - int arrowMargin = 6; - - int imageSpacing = 3; - - @Override - public boolean notify(int arg0, Point arg1, Object arg2) { - // TODO Auto-generated method stub - return false; - } - - @Override - public void paint(GC gc, Object arg1) { - GridColumnGroup column = (GridColumnGroup) arg1; - gc.setBackground(ColorResources.TABLE_HEADER_BG); - Rectangle rect = getBounds(); - gc.fillRectangle(rect.x, rect.y, rect.width, rect.height); - gc.setForeground(ColorResources.TABLE_LINE); - gc.drawLine(rect.x - 1, rect.y, rect.x - 1, rect.y + rect.height); - gc.drawLine(rect.x - 1, rect.y - 1 + rect.height, rect.x + rect.width, - rect.y - 1 + rect.height); - - gc.setForeground(ColorResources.TABLE_HEADER_FONT_COLOR); - gc.setFont(FontResources.TABLE_HEADER); - String inputText = column.getText(); - Point textSize = gc.textExtent(inputText, SWT.DRAW_MNEMONIC); - int textWidth = textSize.x; - - int y = getBounds().y + getBounds().height - bottomMargin - - gc.getFontMetrics().getHeight(); - - int x = rect.x + (rect.width - textWidth) / 2; - gc.drawString(inputText, x, y, true); - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/FunctionUsageProfiler.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/FunctionUsageProfiler.java deleted file mode 100644 index 71676ed..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/FunctionUsageProfiler.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * WooJin Jung - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.summary.profiling; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.communicator.DACommunicator; -import org.tizen.dynamicanalyzer.nl.SummaryLabels; - -public class FunctionUsageProfiler implements Runnable { - - // 0.01 second = 10 ms - public static final long SAMPLE_TIME = 10; - public static final String APPLICATION = SummaryLabels.FUNCTION_USAGE_PROFILER_APPLICATION; - public static final String DEPENDENT_LIB = SummaryLabels.FUNCTION_USAGE_PROFILER_DEPENDENT_LIB; - public static final String APPLICATION_KEY = "profiling_app_bin_key";//$NON-NLS-1$ - public static final String DEPENDENT_LIB_KEY = "profiling_dependent_lib_key";//$NON-NLS-1$ - public static final String UNKNOWN = "";//$NON-NLS-1$ - - private static FunctionUsageProfiler instance = null; - - private ProfileDataMaker profileDataMaker = null; - /** - * key: symbol(child) or file path (parent) - value : sequence num of - * profiling data. all parent and child data is in - */ - private static HashMap symbolSeqHash = null; - private List sampleInputs = null; - private static Thread profiler = null; - - public FunctionUsageProfiler() { - profileDataMaker = new ProfileDataMaker(); - } - - public ProfileDataMaker getProfileDataMaker() { - return profileDataMaker; - } - - public static FunctionUsageProfiler getInstance() { - if (null == instance) { - instance = new FunctionUsageProfiler(); - } - return instance; - } - - public static HashMap getSymbolSeqHash() { - if (null == symbolSeqHash) { - symbolSeqHash = new HashMap(); - } - return symbolSeqHash; - } - - private List getSampleInputs() { - if (null == sampleInputs) { - sampleInputs = new ArrayList(); - } - return sampleInputs; - } - - private String getFirstSample() { - String first = new String(getSampleInputs().get(0)); - getSampleInputs().remove(0); - return first; - } - - public void pushSample(String sample) { - getSampleInputs().add(sample); - } - - public static void startProfiler() { - if (null == profiler || !profiler.isAlive()) { - profiler = new Thread(null, getInstance(), - AnalyzerConstants.LOG_QUEUE_OBSERVING_THREAD); - profiler.start(); - } - } - - public static void stopProfiler() { - if (null != profiler && profiler.isAlive()) { - profiler.interrupt(); - } - } - - /*** profiling thread ***/ - @Override - public void run() { - System.out.println("start profiling thread"); - while (true) { - try { - if (!getInstance().getSampleInputs().isEmpty()) { - String sample = getInstance().getFirstSample(); - getInstance().getProfileDataMaker() - .makeFunctionUsageProfileData(sample); - } else if (DACommunicator.isRunning()) { - Thread.sleep(AnalyzerConstants.LOG_CHECK_INTERVAL); - } else { - break; - } - } catch (InterruptedException e) { - /** thread stop by interrupt */ - break; - } - } - - /* log for debug */ - System.out.println("profiling thread end!!"); //$NON-NLS-1$ - } - - public static void clear() { - instance = null; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/FunctionUsageProfilingTableCellRenderer.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/FunctionUsageProfilingTableCellRenderer.java deleted file mode 100644 index 6753d3f..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/FunctionUsageProfilingTableCellRenderer.java +++ /dev/null @@ -1,436 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.summary.profiling; - -import org.eclipse.nebula.widgets.grid.GridItem; -import org.eclipse.nebula.widgets.grid.IInternalWidget; -import org.eclipse.nebula.widgets.grid.internal.CheckBoxRenderer; -import org.eclipse.nebula.widgets.grid.internal.DefaultCellRenderer; -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.FontResources; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableToggleRenderer; - -public class FunctionUsageProfilingTableCellRenderer extends - DefaultCellRenderer { - int leftMargin = 4; - int rightMargin = 4; - int topMargin = 0; - int bottomMargin = 0; - int textTopMargin = 1; - int textBottomMargin = 2; - int insideMargin = 3; - int treeIndent = 20; - - private DATableToggleRenderer toggleRenderer; - private CheckBoxRenderer checkRenderer; - - @Override - public void paint(GC gc, Object value) { - GridItem item = (GridItem) value; - - gc.setFont(item.getFont(getColumn())); - - boolean drawAsSelected = isSelected(); - - boolean drawBackground = true; - - if (isCellSelected()) { - drawAsSelected = true;// (!isCellFocus()); - } - - // if (isHover()) - // { - // System.out.println("hover!!"); - // } - - if (drawAsSelected) { - gc.setForeground(ColorResources.TABLE_CONTENTS_SELECTED_START); - gc.setBackground(ColorResources.TABLE_CONTENTS_SELECTED_END); - } else { - - if (item.getParent().isEnabled()) { - Color bg = item.getBackground(); - if (bg != null) { - gc.setBackground(bg); - } else { - drawBackground = false; - } - } else { - gc.setBackground(getDisplay().getSystemColor( - SWT.COLOR_WIDGET_BACKGROUND)); - } - } - - if (drawBackground && drawAsSelected) { - gc.fillGradientRectangle(getBounds().x, getBounds().y, - getBounds().width, getBounds().height, true); - } else if (drawBackground) { - gc.fillRectangle(getBounds().x, getBounds().y + 1, - getBounds().width, getBounds().height); - } - - int x = leftMargin; - - if (isTree()) { - x += getToggleIndent(item); - if (drawAsSelected) { - toggleRenderer.setSelected(true); - } else { - toggleRenderer.setSelected(false); - } - toggleRenderer.setExpanded(item.isExpanded()); - - toggleRenderer.setHover(getHoverDetail().equals("toggle")); //$NON-NLS-1$ - - toggleRenderer.setLocation(getBounds().x + x, - (getBounds().height - toggleRenderer.getBounds().height) - / 2 + getBounds().y); - toggleRenderer.paint(gc, item); - - x += toggleRenderer.getBounds().width + insideMargin; - - } - - if (isCheck()) { - - checkRenderer.setChecked(item.getChecked(getColumn())); - checkRenderer.setGrayed(item.getGrayed(getColumn())); - if (!item.getParent().isEnabled()) { - checkRenderer.setGrayed(true); - } - checkRenderer.setHover(getHoverDetail().equals("check")); //$NON-NLS-1$ - - checkRenderer.setBounds(getBounds().x + x, - (getBounds().height - checkRenderer.getBounds().height) / 2 - + getBounds().y, checkRenderer.getBounds().width, - checkRenderer.getBounds().height); - checkRenderer.paint(gc, null); - - x += checkRenderer.getBounds().width + insideMargin; - } - - Image image = item.getImage(getColumn()); - if (image != null) { - int y = getBounds().y; - - y += (getBounds().height - image.getBounds().height) / 2; - - gc.drawImage(image, getBounds().x + x, y); - - x += image.getBounds().width + insideMargin; - } - - int width = getBounds().width - x - rightMargin; - - String text = item.getText(getColumn()); - - if (getAlignment() == SWT.RIGHT) { - int len = gc.stringExtent(text).x; - if (len < width) { - x += width - len; - } - } else if (getAlignment() == SWT.CENTER) { - int len = gc.stringExtent(text).x; - if (len < width) { - x += (width - len) / 2; - } - } - - if (getColumn() == 2 || getColumn() == 5) { - if (drawAsSelected) { - gc.setForeground(ColorResources.PROFILING_GRAPH_SELECTION_COLOR_START); - gc.setBackground(ColorResources.PROFILING_GRAPH_SELECTION_COLOR_END); - } else { - gc.setForeground(ColorResources.PROFILING_GRAPH_COLOR_START); - gc.setBackground(ColorResources.PROFILING_GRAPH_COLOR_END); - } - String rateStr = item.getText(getColumn()); - String[] splitRateStr = rateStr.split("%"); //$NON-NLS-1$ - rateStr = new String(splitRateStr[0].trim()); - if ( !rateStr.equals("-")) { - double rate = Double.parseDouble(rateStr); - Rectangle bounds = getBounds(); - int rectWidth = (int) (bounds.width * (rate / 100)); - gc.fillGradientRectangle(bounds.x + 1, bounds.y, rectWidth, - bounds.height, true); - } - } - - if (drawAsSelected) { - gc.setForeground(ColorResources.TABLE_CONTENTS_SELECTED_FONT_COLOR); - } else { - Color fontColor = item.getForeground(); - if (null != fontColor) { - gc.setForeground(item.getForeground()); - } else { - gc.setForeground(ColorResources.TABLE_CONTENTS_FONT_COLOR); - } - - // Color fg = item.getForeground(getColumn()); - // if (null == fg || fg.equals(ColorResources.BLACK)) { - // gc.setForeground(ColorResources.WHITE); - // } else { - // gc.setForeground(fg); - // } - } - - // Font font = item.getFont(getColumn()); - // if (null == font) { - // if (getColumn() == 2 || getColumn() == 4) { - // gc.setForeground(ColorResources.TABLE_CONTENTS_FONT_COLOR); - // } - gc.setFont(FontResources.TABLE_CELL_FONT); - // } else { - // gc.setFont(font); - // } - if (getColumn() != 0) { - gc.drawText(text, getBounds().x + x, getBounds().y + textTopMargin, - true); - } - - if (item.getParent().getLinesVisible()) { - if (isCellSelected()) { - gc.setForeground(ColorResources.TABLE_LINE); - } else { - gc.setForeground(ColorResources.TABLE_LINE); - } - gc.drawLine(getBounds().x, getBounds().y + getBounds().height, - getBounds().x + getBounds().width - 1, getBounds().y - + getBounds().height); - gc.drawLine(getBounds().x + getBounds().width - 1, getBounds().y, - getBounds().x + getBounds().width - 1, getBounds().y - + getBounds().height); - } - - if (isCellFocus()) { - Rectangle focusRect = new Rectangle(getBounds().x - 1, - getBounds().y - 1, getBounds().width, - getBounds().height + 1); - - gc.setForeground(ColorResources.RED); - gc.drawRectangle(focusRect); - - if (isFocus()) { - focusRect.x++; - focusRect.width -= 2; - focusRect.y++; - focusRect.height -= 2; - - gc.drawRectangle(focusRect); - } - } - } - - private int getToggleIndent(GridItem item) { - return item.getLevel() * 20; - } - - public void setTree(boolean tree) { - super.setTree(tree); - - if (tree) { - toggleRenderer = new DATableToggleRenderer(); - toggleRenderer.setDisplay(getDisplay()); - } - } - - public Point computeSize(GC gc, int wHint, int hHint, Object value) { - GridItem item = (GridItem) value; - gc.setFont(item.getFont(getColumn())); - int x = 0; - - x += leftMargin; - - if (isTree()) { - x += getToggleIndent(item); - x += toggleRenderer.getBounds().width + insideMargin; - } - - if (isCheck()) { - x += checkRenderer.getBounds().width + insideMargin; - } - - int y = 0; - Image image = item.getImage(getColumn()); - if (image != null) { - y = topMargin + image.getBounds().height + bottomMargin; - - x += image.getBounds().width + insideMargin; - } - - x += gc.stringExtent(item.getText(getColumn())).x + rightMargin; - y = Math.max(y, topMargin + gc.getFontMetrics().getHeight() - + bottomMargin); - - return new Point(x, y); - } - - public boolean notify(int event, Point point, Object value) { - GridItem item = (GridItem) value; - if (isCheck()) { - if (event == IInternalWidget.MouseMove) { - if (overCheck(item, point)) { - setHoverDetail("check"); //$NON-NLS-1$ - return true; - } - } - - if (event == IInternalWidget.LeftMouseButtonDown) { - if (overCheck(item, point)) { - item.setChecked(getColumn(), !item.getChecked(getColumn())); - item.getParent().redraw(); - item.fireCheckEvent(getColumn()); - - return true; - } - } - } - - if (isTree() && item.hasChildren()) { - if (event == IInternalWidget.MouseMove) { - if (overToggle(item, point)) { - setHoverDetail("toggle"); //$NON-NLS-1$ - return true; - } - } - - if (event == IInternalWidget.LeftMouseButtonDown) { - if (overToggle(item, point)) { - item.setExpanded(!item.isExpanded()); - item.getParent().redraw(); - - if (item.isExpanded()) { - item.fireEvent(SWT.Expand); - } else { - item.fireEvent(SWT.Collapse); - } - - return true; - } - } - } - - return false; - } - - private boolean overCheck(GridItem item, Point point) { - point = new Point(point.x, point.y); - point.x -= getBounds().x - 1; - point.y -= getBounds().y - 1; - - int x = leftMargin; - if (isTree()) { - x += getToggleIndent(item); - x += toggleRenderer.getSize().x + insideMargin; - } - - if (point.x >= x && point.x < (x + checkRenderer.getSize().x)) { - int yStart = ((getBounds().height - checkRenderer.getBounds().height) / 2); - if (point.y >= yStart - && point.y < yStart + checkRenderer.getSize().y) { - return true; - } - } - - return false; - } - - private boolean overToggle(GridItem item, Point point) { - point = new Point(point.x, point.y); - point.x -= getBounds().x - 1; - point.y -= getBounds().y - 1; - - int x = leftMargin; - x += getToggleIndent(item); - - if (point.x >= x && point.x < (x + toggleRenderer.getSize().x)) { - // return true; - int yStart = ((getBounds().height - toggleRenderer.getBounds().height) / 2); - if (point.y >= yStart - && point.y < yStart + toggleRenderer.getSize().y) { - return true; - } - } - - return false; - } - - public void setCheck(boolean check) { - super.setCheck(check); - - if (check) { - checkRenderer = new CheckBoxRenderer(); - checkRenderer.setDisplay(getDisplay()); - } else { - checkRenderer = null; - } - } - - public Rectangle getTextBounds(GridItem item, boolean preferred) { - int x = leftMargin; - - if (isTree()) { - x += getToggleIndent(item); - - x += toggleRenderer.getBounds().width + insideMargin; - - } - - if (isCheck()) { - x += checkRenderer.getBounds().width + insideMargin; - } - - Image image = item.getImage(getColumn()); - if (image != null) { - x += image.getBounds().width + insideMargin; - } - - Rectangle bounds = new Rectangle(x, topMargin, 0, 0); - - GC gc = new GC(item.getParent()); - gc.setFont(item.getFont(getColumn())); - Point size = gc.stringExtent(item.getText(getColumn())); - - bounds.height = size.y; - - if (preferred) { - bounds.width = size.x; - } else { - bounds.width = getBounds().width - x - rightMargin; - } - - gc.dispose(); - - return bounds; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/FunctionUsageProfilingView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/FunctionUsageProfilingView.java deleted file mode 100644 index a537b0d..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/FunctionUsageProfilingView.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.summary.profiling; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.model.ColumnData; -import org.tizen.dynamicanalyzer.model.DAView; -import org.tizen.dynamicanalyzer.nl.SummaryLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer; - -public class FunctionUsageProfilingView extends DAView { - - public static final String ID = FunctionUsageProfilingView.class.getName(); - private ProfilingTable treeComp = null; - int[] innerMaxWeight = { 100, 0 }; - int[] outerMaxWeight = { 0, 100 }; - List columnData = null; - - private String[] columnNames = { - SummaryLabels.FUNCTION_USER_PROFILING_VIEW_NAME, - SummaryLabels.FUNCTION_USER_PROFILING_VIEW_CPU_TIME, - SummaryLabels.FUNCTION_USER_PROFILING_VIEW_CPU_RATE, - SummaryLabels.FUNCTION_USER_PROFILING_VIEW_ELASPED_TIME, - SummaryLabels.FUNCTION_USER_PROFILING_VIEW_CPU_TIME, - SummaryLabels.FUNCTION_USER_PROFILING_VIEW_CPU_RATE, - SummaryLabels.FUNCTION_USER_PROFILING_VIEW_ELASPED_TIME, - SummaryLabels.FUNCTION_USER_PROFILING_VIEW_CALL_COUNT }; - private int[] columnSizes = { 260, 0, 0, 0, 0, 0, 0, 0 }; - private boolean[] columnVisibility = { true, true, true, true, true, true, - true, true }; - int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NONE, - AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_NUM }; - int[] sourceColumns = { ProfilingData.NAME_INDEX, - ProfilingData.EXCOUNT_INDEX, ProfilingData.EXCOUNT_INDEX, - ProfilingData.INCOUNT_INDEX, ProfilingData.INCOUNT_INDEX, - ProfilingData.CALLCOUNT_INDEX, - ProfilingData.INCL_ELAPSED_TIME_INDEX, - ProfilingData.EXCL_ELAPSED_TIME_INDEX }; - - public FunctionUsageProfilingView(Composite parent, int style) { - super(parent, style); - this.setLayout(new FillLayout()); - - ViewContainer viewContainer = new ViewContainer(this, true); - viewContainer - .setTitleText(SummaryLabels.FUNCTION_USER_PROFILING_VIEW_TITLE); - setMaxWeight(innerMaxWeight, outerMaxWeight); - Composite contents = viewContainer.getContentArea(); - contents.setBackground(ColorResources.WINDOW_BG_COLOR); - contents.setLayout(new FillLayout()); - treeComp = new ProfilingTable(contents, SWT.NONE, SWT.SINGLE - | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); - /*** setTree set first!!! ***/ - treeComp.setTree(true); - treeComp.setSortTypes(sortTypes); - treeComp.setSourceColumns(sourceColumns); - createColumnData(); - treeComp.setColumns(columnData); - // treeComp.setColumns(columnNames); - treeComp.setColumnSize(columnSizes); - treeComp.setColumnVisibility(columnVisibility); - treeComp.setTableToolTipEnable(false); - treeComp.setTableName(SummaryLabels.FUNCTION_USER_PROFILING_VIEW_TITLE); - } - - private void createColumnData() { - int columnIndex = 0; - columnData = new ArrayList(); - ColumnData data0 = new ColumnData(columnNames[columnIndex++]); - columnData.add(data0); - - ColumnData data1 = new ColumnData("Exclusive"); - ColumnData data1Child1 = new ColumnData(columnNames[columnIndex++]); - ColumnData data1Child2 = new ColumnData(columnNames[columnIndex++]); - ColumnData data1Child3 = new ColumnData(columnNames[columnIndex++]); - data1.getChildren().add(data1Child1); - data1.getChildren().add(data1Child2); - data1.getChildren().add(data1Child3); - columnData.add(data1); - - ColumnData data2 = new ColumnData("Inclusive"); - ColumnData data2Child1 = new ColumnData(columnNames[columnIndex++]); - ColumnData data2Child2 = new ColumnData(columnNames[columnIndex++]); - ColumnData data2Child3 = new ColumnData(columnNames[columnIndex++]); - data2.getChildren().add(data2Child1); - data2.getChildren().add(data2Child2); - data2.getChildren().add(data2Child3); - columnData.add(data2); - - ColumnData data3 = new ColumnData(columnNames[columnIndex++]); - columnData.add(data3); - } - - @Override - public void updateView() { - treeComp.updateTree(); - } - - @Override - public void clear() { - treeComp.clear(); - } - - @Override - public Control getControl() { - return treeComp; - } - - @Override - public void otherViewSelectionOccured() { - treeComp.deselectAll(); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/ProfileDataMaker.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/ProfileDataMaker.java deleted file mode 100644 index 907a2ea..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/ProfileDataMaker.java +++ /dev/null @@ -1,414 +0,0 @@ -package org.tizen.dynamicanalyzer.ui.summary.profiling; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.AnalyzerPaths; -import org.tizen.dynamicanalyzer.common.CommonConstants; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackManager; -import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackUnit; -import org.tizen.dynamicanalyzer.ui.userinterface.UIDataManager; -import org.tizen.dynamicanalyzer.utils.Formatter; - -public class ProfileDataMaker { - - class CallstackTree { - ProfilingData me; - CallstackTree parent; - List children = null; - int childExeTime = 0; - - public CallstackTree(ProfilingData me, CallstackTree parent) { - this.me = me; - this.parent = parent; - children = new ArrayList(); - } - - public void addChild(CallstackTree child) { - children.add(child); - } - - public void addChildExeTime(int time) { - childExeTime += time; - } - - public int getInclusiveExeTime() { - return me.getLastElapsedTime() - childExeTime; - } - - public ProfilingData getThis() { - return me; - } - - public CallstackTree getParent() { - return parent; - } - } - - private CallstackTree current = null; - private int totalSampleCount = 0; - - /** - * key: seq - value : function usage profiling data hash map all function - * usage profiling data are in this hash map - **/ - private HashMap profilingDataMap = null; - - /** - * key : seq - value : child seq list // all child lists are in this hash - */ - private HashMap childListMap = null; - - private ProfilingData appBin = null; - private ProfilingData dependentLib = null; - private String appBinName = null; - - public String getAppBinName() { - return appBinName; - } - - public ProfilingData getAppBin() { - return appBin; - } - - public ProfilingData getDependentLib() { - return dependentLib; - } - - public void setAppBin(ProfilingData appBin) { - this.appBin = appBin; - } - - public void setDependentLib(ProfilingData dependentLib) { - this.dependentLib = dependentLib; - } - - public void setTotalSampleCount(int count) { - totalSampleCount = count; - } - - public int getTotalSampleCount() { - return totalSampleCount; - } - - public ProfilingData getProfilingDataByKey(String key) { - String seq = FunctionUsageProfiler.getSymbolSeqHash().get(key); - if (null == seq) { - return null; - } - - return getProfilingDataMap().get(seq); - } - - public HashMap getProfilingDataMap() { - if (null == profilingDataMap) { - profilingDataMap = new HashMap(); - } - return profilingDataMap; - } - - public HashMap getChildListMap() { - if (null == childListMap) { - childListMap = new HashMap(); - } - return childListMap; - } - - public String getCpuRate(ProfilingData data, boolean exclusive) { - int count = 0; - double rate = 0.; - if (exclusive) { - count = data.getExCount(); - rate = count / (double) totalSampleCount * 100; - } else { - count = data.getInCount(); - rate = count / (double) totalSampleCount * 100; - } - - return Formatter.toDoubleFormat2(Double.toString(rate)); - } - - public String getCpuTime(ProfilingData data, boolean exclusive) { - int count = 0; - if (exclusive) { - count = data.getExCount(); - } else { - count = data.getInCount(); - } - - return Long.toString(count * FunctionUsageProfiler.SAMPLE_TIME); - } - - private void checkUserCall(CallStackUnit csa, ProfilingData parent, - ProfilingData pp) { - if (CallStackManager.getInstance().checkUserCall(csa.getPath())) { - if (null == appBin) { - CallStackUnit appBinCsa = new CallStackUnit(-1, - FunctionUsageProfiler.APPLICATION); - appBin = makeNewProfilingData(appBinCsa, true); - appBin.setKey(FunctionUsageProfiler.APPLICATION_KEY); - appBinName = csa.getPath(); - } - parent.setParent(appBin.getName()); - appBin.addChild(parent); - if (null != pp) { - pp = appBin; - } - } else { - if (null == dependentLib) { - CallStackUnit dependentLibBinCsa = new CallStackUnit(-2, - FunctionUsageProfiler.DEPENDENT_LIB); - dependentLib = makeNewProfilingData(dependentLibBinCsa, true); - dependentLib.setKey(FunctionUsageProfiler.DEPENDENT_LIB_KEY); - } - parent.setParent(dependentLib.getName()); - dependentLib.addChild(parent); - if (null != pp) { - pp = dependentLib; - } - } - } - - public void makeFunctionUsageProfileData(String sampleLog) { - totalSampleCount++; - String[] splitSampleLog = sampleLog.split(CommonConstants.NEW_LINE); - String[] selfAddrLog = splitSampleLog[0] - .split(AnalyzerConstants.DATA_PARSING_TOKEN); - String[] splitCallstack = splitSampleLog[1] - .split(AnalyzerConstants.DATA_PARSING_TOKEN); - List sampleCallstack = new ArrayList(); - - for (int i = 0; i < splitCallstack.length; i++) { - sampleCallstack.add(new String(splitCallstack[i])); - } - - List addrs = makeCallstackHashAndList(sampleCallstack); - HashMap addrMap = CallStackManager.getInstance() - .getCallStackApiByAddrMap(); - String selfAddrStr = selfAddrLog[0]; - long selfAddr = Long.parseLong(selfAddrStr); - CallStackUnit inputData = addrMap.get(selfAddr); - if (null == inputData) { - return; - } - - // drop samples of probe library - if (inputData.getPath().startsWith(AnalyzerPaths.DA_REMOTE_PROBE_PATH)) { - return; - } - - String inputPath = inputData.getPath(); - String inputFuncName = inputData.getFunctionName(); - - ProfilingData parent = getProfilingDataByKey(inputPath); - // exclusive cpu time - if (null == parent) { - parent = makeNewProfilingData(inputData, true); - checkUserCall(inputData, parent, null); - if (inputFuncName.equals(FunctionUsageProfiler.UNKNOWN)) { - parent.addExCount(); - } else { - ProfilingData child = makeNewProfilingData(inputData, false); - parent.addChild(child); - child.addExCount(); - child.setParent(parent.getName()); - } - } else { - if (inputFuncName.isEmpty()) { - parent.addExCount(); - } else { - ProfilingData child = getProfilingDataByKey(inputData - .getSymbol()); - if (null == child) { - child = makeNewProfilingData(inputData, false); - parent.addChild(child); - child.setParent(parent.getName()); - } - child.addExCount(); - } - } - - // inclusive cpu time - for (int i = 0; i < addrs.size(); i++) { - CallStackUnit callstackCsa = addrMap.get(addrs.get(i)); - // disable inclusive cpu time of dependent library - if (!CallStackManager.getInstance().checkUserCall( - callstackCsa.getPath())) { - continue; - } - - if (callstackCsa.getFunctionName().equals( - FunctionUsageProfiler.UNKNOWN)) { - ProfilingData inParent = getProfilingDataByKey(callstackCsa - .getPath()); - ProfilingData pp = null; - if (null == inParent) { - inParent = makeNewProfilingData(callstackCsa, true); - checkUserCall(callstackCsa, inParent, pp); - } - inParent.addInCount(totalSampleCount); - - if (null != inParent.getParent()) { - String pInParentName = inParent.getParent(); - pp = getProfilingDataByKey(pInParentName); - pp.addInCount(totalSampleCount); - } - } else { - ProfilingData fupData = getProfilingDataByKey(callstackCsa - .getSymbol()); - if (null == fupData) { - ProfilingData inParent = getProfilingDataByKey(callstackCsa - .getPath()); - if (null == inParent) { - inParent = makeNewProfilingData(callstackCsa, true); - checkUserCall(callstackCsa, inParent, null); - } - fupData = makeNewProfilingData(callstackCsa, false); - fupData.setParent(inParent.getName()); - - inParent.addChild(fupData); - inParent.addInCount(totalSampleCount); - if (null != inParent.getParent()) { - String pInParentName = inParent.getParent(); - ProfilingData pp = getProfilingDataByKey(pInParentName); - pp.addInCount(totalSampleCount); - } - } else { - String pName = fupData.getParent(); - ProfilingData inParent = getProfilingDataByKey(pName); - inParent.addInCount(totalSampleCount); - - if (null != inParent.getParent()) { - String pInParentName = inParent.getParent(); - ProfilingData ppData = getProfilingDataByKey(pInParentName); - ppData.addInCount(totalSampleCount); - } - } - fupData.addInCount(totalSampleCount); - } - } - } - - private List makeCallstackHashAndList(List callstackLog) { - HashMap addrMap = CallStackManager.getInstance() - .getCallStackApiByAddrMap(); - List addrs = new ArrayList(); - int size = callstackLog.size(); - for (int i = 1; i + 1 < size; i += 2) { - if (callstackLog.get(i).equals(AnalyzerConstants.CALLSTACK_END) - || callstackLog.get(i + 1).equals( - AnalyzerConstants.CALLSTACK_END)) { - break; - } - String addrStr = callstackLog.get(i); - if (addrStr.isEmpty()) { - return null; - } - long addr = 0; - try { - addr = Long.parseLong(addrStr); - } catch (NumberFormatException e) { - e.printStackTrace(); - } - addrs.add(addr); - - CallStackUnit funcName = addrMap.get(addr); - if (null == funcName) { - String funcSymbol = callstackLog.get(i + 1); - CallStackUnit cas = new CallStackUnit(addr, funcSymbol); - if (null == addrMap.get(addr)) { - addrMap.put(addr, cas); - } - } - } - return addrs; - } - - private ProfilingData makeNewProfilingData(CallStackUnit inputData, - boolean isParent) { - ProfilingData newProfilingData = new ProfilingData(inputData, isParent); - getProfilingDataMap().put(newProfilingData.getSequence(), - newProfilingData); - if (isParent) { - FunctionUsageProfiler.getSymbolSeqHash().put(inputData.getPath(), - newProfilingData.getSequence()); - } else { - FunctionUsageProfiler.getSymbolSeqHash().put(inputData.getSymbol(), - newProfilingData.getSequence()); - } - return newProfilingData; - } - - public void makeFupDataForCallTrace(CallStackUnit inputCallstackApiData, - String[] inputLog) { - int exeTime = 0; - String strType = inputLog[LogCenterConstants.USER_FUNCTION_TYPE_INDEX]; - int type = Integer.parseInt(strType); - if (type == LogCenterConstants.USER_FUNCTION_EVENT_TYPE_EXIT) { - String strExeTime = inputLog[LogCenterConstants.USER_FUNCTION_ELAPSED_TIME_INDEX]; - exeTime += Integer.parseInt(strExeTime); - } - - ProfilingData parent = getProfilingDataByKey(inputCallstackApiData - .getPath()); - if (null == parent) { - parent = makeNewProfilingData(inputCallstackApiData, true); - checkUserCall(inputCallstackApiData, parent, null); - - ProfilingData child = makeNewProfilingData(inputCallstackApiData, - false); - parent.addChild(child); - child.addExCount(); - child.addElpasedTime(exeTime); - child.setParent(parent.getName()); - - if (type != LogCenterConstants.USER_FUNCTION_EVENT_TYPE_EXIT) { - child.addCallCount(); - } - } else { - ProfilingData child = getProfilingDataByKey(inputCallstackApiData - .getSymbol()); - if (null == child) { - child = makeNewProfilingData(inputCallstackApiData, false); - parent.addChild(child); - child.setParent(parent.getName()); - } - child.addElpasedTime(exeTime); - if (type != LogCenterConstants.USER_FUNCTION_EVENT_TYPE_EXIT) { - child.addCallCount(); - } - - // calculate internal time - if (type == LogCenterConstants.USER_FUNCTION_EVENT_TYPE_EXIT) { - if (null == current) { - // bug - System.out - .println("bug found!!" + inputCallstackApiData.getFunctionName()); //$NON-NLS-1$ - } else { - CallstackTree parentCt = current.getParent(); - if (null != parentCt) { - parentCt.addChildExeTime(current.getThis() - .getLastElapsedTime()); - } - child.addExclusiveElapsedTime(current.getInclusiveExeTime()); - current = current.getParent(); - UIDataManager.getInstance() - .getfunctionProfilingDataChecker() - .addProfilingData(child); - } - } else { - if (null == current) { - CallstackTree ct = new CallstackTree(child, null); - current = ct; - } else { - CallstackTree ct = new CallstackTree(child, current); - current.addChild(ct); - current = ct; - } - } - } - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/ProfilingChildData.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/ProfilingChildData.java deleted file mode 100644 index a45c9e7..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/ProfilingChildData.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.summary.profiling; - -import java.util.ArrayList; -import java.util.List; - -public class ProfilingChildData { - private String seq; - private List children; - - public ProfilingChildData(String seq) { - this.seq = seq; - } - - public String getSeq() { - return seq; - } - - public List getChildren() { - if (null == children) { - children = new ArrayList(); - } - return children; - } - - public boolean equals(ProfilingChildData input) { - if (!input.getSeq().equals(seq)) { - return false; - } - - if (!children.containsAll(input.getChildren()) - || !input.getChildren().containsAll(children)) { - return false; - } - return true; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/ProfilingData.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/ProfilingData.java deleted file mode 100644 index 2b7301e..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/ProfilingData.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * WooJin Jung - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.summary.profiling; - -import java.util.ArrayList; -import java.util.List; - -import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackUnit; - -public class ProfilingData { - public static final int DATA_FIELD_SIZE = 9; - public static final int SEQUENCE_INDEX = 0; - public static final int NAME_INDEX = 1; - public static final int EXCOUNT_INDEX = 2; - public static final int INCOUNT_INDEX = 3; - public static final int CALLCOUNT_INDEX = 4; - public static final int PARENT_INDEX = 5; - public static final int KEY_INDEX = 6; - public static final int INCL_ELAPSED_TIME_INDEX = 7; - public static final int EXCL_ELAPSED_TIME_INDEX = 8; - - private static int internalSeq = 0; - private int seq = -1; - private String name = null; - private int exCount = 0; - private int inCount = 0; - private int callCount = 0; - private String parent = null; - private String key = null; - private ProfilingChildData children = null; - private int inElapsedTime = 0; - private int lastExeTime = 0; - private int exElapsedTime = 0; - private int lastLogSeq = -1; - - public ProfilingData(CallStackUnit inputData, boolean isParent) { - if (isParent) { - this.name = inputData.getPath(); - } else { - this.name = inputData.getFunctionName(); - } - - seq = internalSeq++; - this.key = inputData.getSymbol(); - } - - public ProfilingChildData getChildData() { - if (null == children) { - children = new ProfilingChildData(Integer.toString(seq)); - // AnalyzerManager.getFunctionUserProfiler().getChildListMap() - // .put(Integer.toString(seq), children); - FunctionUsageProfiler.getInstance().getProfileDataMaker().getChildListMap() - .put(Integer.toString(seq), children); - } - return children; - } - - /** using open trace **/ - public ProfilingData(List input) { - if (input.size() < DATA_FIELD_SIZE) { - return; - } - seq = Integer.parseInt(input.get(SEQUENCE_INDEX)); - name = input.get(NAME_INDEX); - exCount = Integer.parseInt(input.get(EXCOUNT_INDEX)); - inCount = Integer.parseInt(input.get(INCOUNT_INDEX)); - callCount = Integer.parseInt(input.get(CALLCOUNT_INDEX)); - parent = input.get(PARENT_INDEX); - key = input.get(KEY_INDEX); - if (!input.get(INCL_ELAPSED_TIME_INDEX).isEmpty()) { - inElapsedTime = Integer - .parseInt(input.get(INCL_ELAPSED_TIME_INDEX)); - } - if (!input.get(EXCL_ELAPSED_TIME_INDEX).isEmpty()) { - exElapsedTime = Integer - .parseInt(input.get(EXCL_ELAPSED_TIME_INDEX)); - } - } - - /** using save trace **/ - public List getSaveData() { - List output = new ArrayList(); - for (int i = 0; i < DATA_FIELD_SIZE; i++) { - output.add(""); //$NON-NLS-1$ - } - output.set(SEQUENCE_INDEX, Integer.toString(seq)); - output.set(NAME_INDEX, name); - output.set(EXCOUNT_INDEX, Integer.toString(exCount)); - output.set(INCOUNT_INDEX, Integer.toString(inCount)); - output.set(CALLCOUNT_INDEX, Integer.toString(callCount)); - output.set(PARENT_INDEX, parent); - output.set(KEY_INDEX, key); - output.set(INCL_ELAPSED_TIME_INDEX, Integer.toString(inElapsedTime)); - output.set(EXCL_ELAPSED_TIME_INDEX, Integer.toString(exElapsedTime)); - return output; - } - - public void addChild(ProfilingData child) { - String seq = child.getSequence(); - getChildData().getChildren().add(seq); - } - - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - public String getParent() { - return parent; - } - - public void setParent(String parentKey) { - this.parent = parentKey; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public int getExCount() { - List seqs = getChildData().getChildren(); - if (seqs.isEmpty()) { - return exCount; - } - - ProfileDataMaker profiler = FunctionUsageProfiler.getInstance().getProfileDataMaker(); - int size = seqs.size(); - int count = 0; - for (int i = 0; i < size; i++) { - ProfilingData data = profiler.getProfilingDataMap() - .get(seqs.get(i)); - if (null != data) { - count += data.getExCount(); - } - } - return exCount + count; - } - - public void addExCount() { - exCount++; - } - - public int getInCount() { - return inCount; - } - - public void addInCount(int seq) { - if (seq == lastLogSeq) { - return; - } else { - inCount++; - lastLogSeq = seq; - return; - } - } - - public int getCallCount() { - return callCount; - } - - public void addCallCount() { - callCount++; - } - - public void addElpasedTime(int time) { - lastExeTime = time; - inElapsedTime += time; - } - - public int getElapsedTime() { - return inElapsedTime; - } - - public int getLastElapsedTime() { - return lastExeTime; - } - - public void addExclusiveElapsedTime(int time) { - exElapsedTime += time; - } - - public int getExclusiveElapsedTime() { - return exElapsedTime; - } - - public boolean isParent() { - if (getChildData().getChildren().isEmpty()) { - return false; - } - return true; - } - - public String getSequence() { - return Integer.toString(seq); - } - - // use only opentrace - public void setSequence(String seq) { - this.seq = Integer.parseInt(seq); - } - - public static void clear() { - internalSeq = 0; - } - - public List getChildList() { - FunctionUsageProfiler profiler = FunctionUsageProfiler.getInstance(); - List output = new ArrayList(); - List seqs = getChildData().getChildren(); - - for (int i = 0; i < seqs.size(); i++) { - ProfilingData child = profiler.getProfileDataMaker().getProfilingDataMap().get( - seqs.get(i)); - if (null != child) { - output.add(child); - } - } - return output; - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/ProfilingTable.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/ProfilingTable.java deleted file mode 100644 index 742f8be..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/ProfilingTable.java +++ /dev/null @@ -1,337 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.summary.profiling; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.nebula.widgets.grid.Grid; -import org.eclipse.nebula.widgets.grid.GridColumn; -import org.eclipse.nebula.widgets.grid.GridColumnGroup; -import org.eclipse.nebula.widgets.grid.GridItem; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.MouseEvent; -import org.eclipse.swt.events.MouseListener; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.CommonConstants; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.model.ColumnData; -import org.tizen.dynamicanalyzer.model.TreeInput; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableHeaderRenderer; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATreeComposite; -import org.tizen.dynamicanalyzer.ui.widgets.table.TreeDataComparator; -import org.tizen.dynamicanalyzer.utils.Formatter; - -public class ProfilingTable extends DATreeComposite { - public static final String ID = ProfilingTable.class.getName(); - - public ProfilingTable(Composite parent, int compStyle, int tableStyle) { - super(parent, compStyle, tableStyle); - setComparator(new TreeDataComparator()); -// createColumnData(); - - comparator.setType(AnalyzerConstants.SORT_TYPE_NUM); - comparator.setColumn(2); - comparator.reverseDirection(); - - tree.addListener(SWT.Expand, new Listener() { - - @Override - public void handleEvent(Event event) { - GridItem item = (GridItem) event.item; - setExpand(item, true); - } - }); - - tree.addListener(SWT.Collapse, new Listener() { - @Override - public void handleEvent(Event event) { - GridItem item = (GridItem) event.item; - setExpand(item, false); - } - }); - - tree.addSelectionListener(new SelectionListener() { - - @Override - public void widgetSelected(SelectionEvent e) { - GridItem[] items = tree.getSelection(); - DASelectionData selData = new DASelectionData( - FunctionUsageProfilingView.ID, 0, 0, items, tree); - AnalyzerManager.getCurrentPage().updatePage(selData); - AnalyzerManager.getCurrentPage().controlSelection( - FunctionUsageProfilingView.ID); - } - - @Override - public void widgetDefaultSelected(SelectionEvent e) { - // TODO Auto-generated method stub - - } - }); - - tree.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[] items = (GridItem[]) tree.getSelection(); - if (null == items || items.length == 0) { - return; - } - GridItem item = items[0]; - if (item.isExpanded()) { - setExpand(item, false); - } else { - setExpand(item, true); - } - updateTree(); - } - }); - } - - public void setColumns(List columnData) { - int size = columnData.size(); - int index = 0; - for (int i = 0; i < size; i++) { - if (columnData.get(i).isParent()) { - GridColumnGroup columnGroup = new GridColumnGroup(tree, - SWT.NONE); - columnGroup.setHeaderRenderer(new ColumnGroupRenderer()); - columnGroup.setText(columnData.get(i).getText()); - List children = columnData.get(i).getChildren(); - int childSize = children.size(); - for (int ii = 0; ii < childSize; ii++) { - createColumn(columnGroup, children.get(ii), index++); - } - } else { - createColumn(tree, columnData.get(i), index++); - } - } - } - - private void createColumn(Object parent, ColumnData data, int index) { - GridColumn column = null; - if (parent instanceof GridColumnGroup) { - GridColumnGroup group = (GridColumnGroup) parent; - column = new GridColumn(group, SWT.NONE); - } else { - Grid table = (Grid) parent; - column = new GridColumn(table, SWT.NONE); - } - - column.setCellRenderer(new FunctionUsageProfilingTableCellRenderer()); - column.setHeaderRenderer(new DATableHeaderRenderer()); - column.setText(data.getText()); - if (data.getWidth() == 0) { - column.pack(); - } else { - column.setWidth(data.getWidth()); - } - if (treeTable && index == 0) { - column.setTree(true); - } - - if (null != comparator && null != sourceColumns && null != sortTypes) { - final int type = sortTypes[index]; - final int sourceColumn = sourceColumns[index]; - final int columnIndex = index; - column.addSelectionListener(new SelectionAdapter() { - public void widgetSelected(SelectionEvent event) { - comparator.setType(type); - comparator.setColumn(columnIndex); - comparator.setSourceColumn(sourceColumn); - comparator.reverseDirection(); - updateTree(); - } - }); - } - } - - public List difference(ArrayList base, - ArrayList target) { - @SuppressWarnings("unchecked") - ArrayList result = (ArrayList) base - .clone(); - result.removeAll(target); - return result; - } - - private TreeInput makeInput(ProfilingData input, int inputType) { - // table data - DATableDataFormat tableData = new DATableDataFormat(input.getSequence()); - - // make input data - { - // text - List inputData = new ArrayList(); - for (int i = 0; i < ProfilingData.DATA_FIELD_SIZE; i++) { - inputData.add(""); //$NON-NLS-1$ - } - inputData.set(ProfilingData.SEQUENCE_INDEX, input.getSequence()); - inputData.set(ProfilingData.NAME_INDEX, input.getName()); - inputData.set(ProfilingData.EXCOUNT_INDEX, - Integer.toString(input.getExCount())); - inputData.set(ProfilingData.INCOUNT_INDEX, - Integer.toString(input.getInCount())); - inputData.set(ProfilingData.CALLCOUNT_INDEX, - Integer.toString(input.getCallCount())); - inputData.set(ProfilingData.PARENT_INDEX, input.getParent()); - inputData.set(ProfilingData.KEY_INDEX, input.getKey()); - inputData.set(ProfilingData.INCL_ELAPSED_TIME_INDEX, - Integer.toString(input.getElapsedTime())); - inputData.set(ProfilingData.EXCL_ELAPSED_TIME_INDEX, - Integer.toString(input.getElapsedTime())); - tableData.getData().addAll(inputData); - } - - tableData.setObject(input.getName()); - ProfileDataMaker profiler = FunctionUsageProfiler.getInstance() - .getProfileDataMaker(); - String exTime = "0", exRate = "0.00", inTime = "0", inRate = "0.00", callCount = "0", exeTime = "0", inExeTime = "0"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ - - try { - exTime = profiler.getCpuTime(input, true); - exTime = Formatter.toTimeFormat2(exTime); - exRate = profiler.getCpuRate(input, true); - inTime = profiler.getCpuTime(input, false); - inTime = Formatter.toTimeFormat2(inTime); - inRate = profiler.getCpuRate(input, false); - if (0 == input.getCallCount()) { - callCount = "-"; //$NON-NLS-1$ - } else { - callCount = Integer.toString(input.getCallCount()); - } - if (0 == input.getElapsedTime()) { - exeTime = "-"; //$NON-NLS-1$ - } else { - exeTime = Integer.toString(input.getElapsedTime()); - exeTime = Formatter.toTimeFormat(exeTime); - } - - if (0 == input.getExclusiveElapsedTime()) { - inExeTime = "-"; //$NON-NLS-1$ - } else { - inExeTime = Integer.toString(input.getExclusiveElapsedTime()); - inExeTime = Formatter.toTimeFormat(inExeTime); - } - } catch (NumberFormatException e) { - // FIXME - e.printStackTrace(); - } - - List text = new ArrayList(); - text.add(input.getName()); // must add 0 column data empty - text.add(exTime); - text.add(exRate + " " + CommonConstants.PERCENT); //$NON-NLS-1$ - text.add(exeTime); - if (inputType == AnalyzerConstants.FUPD_DEPENDENT_LIB) { - text.add("-"); - text.add("-"); - } else { - text.add(inTime); - text.add(inRate + " " + CommonConstants.PERCENT); //$NON-NLS-1$ - } - text.add(inExeTime); - text.add(callCount); - - TreeInput output = new TreeInput(); - output.setText(text); - output.setData(tableData); - output.setParent(input.getParent()); - return output; - } - - // !! recursive!! - public void makeChildTree(List children, TreeInput parent, - String parentName, int type) { - if (!children.isEmpty()) { - int size = children.size(); - for (int i = 0; i < size; i++) { - ProfilingData data = children.get(i); - TreeInput input = makeInput(data, type); - if (!data.getChildList().isEmpty()) { - makeChildTree(data.getChildList(), input, data.getName(), - type); - } - parent.getChildren().add(input); - input.setParent(parentName); - } - } - } - - @Override - public List makeTreeInput() { - List output = new ArrayList(); - ProfileDataMaker profiler = FunctionUsageProfiler.getInstance() - .getProfileDataMaker(); - ProfilingData appBin = profiler.getAppBin(); - if (null != appBin) { - TreeInput appBinInput = makeInput(appBin, - AnalyzerConstants.FUPD_APPLICATION); - { - List children = appBin.getChildList(); - makeChildTree(children, appBinInput, appBin.getName(), - AnalyzerConstants.FUPD_APPLICATION); - } - output.add(appBinInput); - } - - ProfilingData depLib = profiler.getDependentLib(); - if (null != depLib) { - TreeInput depLibInput = makeInput(depLib, - AnalyzerConstants.FUPD_DEPENDENT_LIB); - { - List children = depLib.getChildList(); - makeChildTree(children, depLibInput, depLib.getName(), - AnalyzerConstants.FUPD_DEPENDENT_LIB); - } - output.add(depLibInput); - } - - return output; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningCase.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningCase.java deleted file mode 100644 index 9d904da..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningCase.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.summary.warning; - -import org.tizen.dynamicanalyzer.nl.SummaryLabels; - -public enum WarningCase { - DUPLICATE_OPEN(1, SummaryLabels.WARNING_CASE_PRE_FIX, - SummaryLabels.WARNING_CASE_POST_FIX_DUPLICATE, - SummaryLabels.WARNING_CASE_BRIEF_DUPLICATE), WITHOUT_USING(2, - SummaryLabels.WARNING_CASE_PRE_FIX, - SummaryLabels.WARNING_CASE_POST_FIX_NO_OPERATION, - SummaryLabels.WARNING_CASE_BRIEF_NO_OPERATION - // ) - // , - // REPEATEDLY_OPEN_CLOSE( - // 3, - // SummaryLabels.WARNING_CASE_PRE_FIX, - // SummaryLabels.WARNING_CASE_POST_FIX_REPEAT, - // SummaryLabels.WARNING_CASE_BRIEF_REPEAT), - // LONG_TIME_USED( - // 4, - // SummaryLabels.WARNING_CASE_PRE_FIX, - // SummaryLabels.WARNING_CASE_POST_FIX_UNUSED, - // SummaryLabels.WARNING_CASE_BRIEF_UNUSED); - ); - private final int type; - private final String prefix; - private final String postfix; - private final String shortMsg; - - private WarningCase(int type, String msgPrefix, String msgPostfix, - String shortMsg) { - this.type = type; - prefix = msgPrefix; - postfix = msgPostfix; - this.shortMsg = shortMsg; - } - - public int getType() { - return type; - } - - public String getMessage(String path) { - return prefix + path + postfix; - } - - public String getShortMessage() { - return shortMsg; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningChecker.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningChecker.java deleted file mode 100644 index 30f3b58..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningChecker.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.summary.warning; - -import java.util.ArrayList; -import java.util.List; - -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; - -public class WarningChecker { - private List warningData = null; - - public void clear() { - getWarningData().clear(); - WarningData.resetSeq(); - } - - public List getWarningData() { - if (null == warningData) { - warningData = new ArrayList(); - } - return warningData; - } - - public WarningData getWarningDataByLogSeq(String seq) { - int size = getWarningData().size(); - for (int i = 0; i < size; i++) { - WarningData data = getWarningData().get(i); - String logSeq = data.getData().get( - LogCenterConstants.SEQUENCE_NUMBER_INDEX); - if (null != logSeq && seq.equals(logSeq)) { - return data; - } - } - return null; - } - - public boolean isChecked(String key, int type) { - int size = getWarningData().size(); - for (int i = 0; i < size; i++) { - String fileKey = warningData.get(i).getKey(); - int warningType = warningData.get(i).getWarningCase(); - if (key.equals(fileKey) && warningType == type) { - return true; - } - } - return false; - } - - public static String messageMaker(WarningData warning, boolean isShort) { - int warningCase = warning.getWarningCase(); - if (warningCase == WarningCase.DUPLICATE_OPEN.getType()) { - if (isShort) { - return WarningCase.DUPLICATE_OPEN.getShortMessage(); - } - return WarningCase.DUPLICATE_OPEN.getMessage(warning.getKey()); - } else if (warningCase == WarningCase.WITHOUT_USING.getType()) { - if (isShort) { - return WarningCase.WITHOUT_USING.getShortMessage(); - } - return WarningCase.WITHOUT_USING.getMessage(warning.getKey()); - } - - // FIXME: error??? - return ""; //$NON-NLS-1$ - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningData.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningData.java deleted file mode 100644 index 6de8bee..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningData.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.summary.warning; - -import java.util.ArrayList; -import java.util.List; - -public class WarningData { - private static int uNum = 1; - private int seq = 0; - private int category; - private int warningCase; - private List data = null; - private String key = null; - - public WarningData(int logId, int wCase, List data, String key) { - seq = uNum++; - category = logId; - warningCase = wCase; - this.data = data; - this.key = key; - } - - public List getData() { - if (null == data) { - data = new ArrayList(); - } - return data; - } - - public int getSeq() { - return seq; - } - - public int getCategory() { - return category; - } - - public int getWarningCase() { - return warningCase; - } - - public String getKey() { - return key; - } - - public static void resetSeq() { - uNum = 1; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningDetailView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningDetailView.java deleted file mode 100644 index 7368c5a..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningDetailView.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.summary.warning; - -import org.eclipse.nebula.widgets.grid.GridItem; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Canvas; -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.model.DAView; -import org.tizen.dynamicanalyzer.nl.SummaryLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.FontResources; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; - -public class WarningDetailView extends DAView { - - public static final String ID = WarningDetailView.class.getName(); - - private Canvas canvas = null; - private String warningMessage = ""; //$NON-NLS-1$ - private final String titleText = SummaryLabels.FILE_DETAILS_TITLE; - - public WarningDetailView(Composite parent, int style) { - super(parent, style); - this.setLayout(new FillLayout()); - canvas = new Canvas(this, SWT.NONE); - canvas.addPaintListener(detailPaintListener); - canvas.setBackground(ColorResources.DIALOG_BG_UPPER); - } - - private PaintListener detailPaintListener = new PaintListener() { - - @Override - public void paintControl(PaintEvent e) { - Rectangle rect = canvas.getBounds(); - int width = rect.width - 20; - e.gc.setFont(FontResources.TABLE_CELL_FONT); - e.gc.setForeground(ColorResources.DEFAULT_FONT_COLOR); - String text = warningMessage; - Point titleSize = e.gc.textExtent(titleText, SWT.DRAW_MNEMONIC); - int fontHeight = titleSize.y + 5; - e.gc.drawText(titleText, 5, 0); - - for (int i = 1; text.length() > 0; i++) { - Point textSize = e.gc.textExtent(text, SWT.DRAW_MNEMONIC); - String inputText = ""; //$NON-NLS-1$ - if (textSize.x > width) { - int strLen = (width * text.length()) / textSize.x; - inputText += text.substring(0, strLen - 1); - text = text.substring(strLen - 1, text.length()); - } else { - inputText += text; - text = ""; //$NON-NLS-1$ - } - e.gc.drawText(inputText, 10, fontHeight * i); - } - } - }; - - @Override - public void updateView(DASelectionData data) { - if (data.getViewId().equals(WarningListView.ID)) { - GridItem[] items = (GridItem[]) data.getData(); - if (items.length <= 0) { - return; - } - GridItem item = items[0]; - DATableDataFormat tableData = (DATableDataFormat) item.getData(); - String seq = tableData.getData().get( - LogCenterConstants.SEQUENCE_NUMBER_INDEX); - WarningData warning = AnalyzerManager.getWarningChecker() - .getWarningDataByLogSeq(seq); - if (null == warning) { - warningMessage = ""; //$NON-NLS-1$ - } else { - warningMessage = WarningChecker - .messageMaker(warning, false); - } - canvas.redraw(); - } - } - - @Override - public void clear() { - warningMessage = ""; //$NON-NLS-1$ - canvas.redraw(); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningListView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningListView.java deleted file mode 100644 index a8a2a8f..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningListView.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.summary.warning; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.SashForm; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.model.DAView; -import org.tizen.dynamicanalyzer.nl.SummaryLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite; -import org.tizen.dynamicanalyzer.ui.widgets.table.TableComparator; - -public class WarningListView extends DAView { - - public static final String ID = WarningListView.class.getName(); - - int[] innerMaxWeight = { 0, 100 }; - int[] outerMaxWeight = { 0, 100 }; - - private DATableComposite tableComp = null; - private String[] columnNames = { SummaryLabels.WARNING_LIST_VIEW_INDEX, - SummaryLabels.WARNING_LIST_VIEW_CATEGORY, - SummaryLabels.WARNING_LIST_VIEW_WARNING_MESSAGE }; - private int[] columnSizes = { 25, 0, 200 }; - int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_GRID, AnalyzerConstants.SORT_TYPE_GRID }; - int[] sourceColumns = { LogCenterConstants.SEQUENCE_NUMBER_INDEX, - LogCenterConstants.ID_INDEX, LogCenterConstants.APINAME_INDEX }; - - public WarningListView(Composite parent, int style) { - super(parent, style); - this.setLayout(new FillLayout()); - - ViewContainer viewContainer = new ViewContainer(this, true); - viewContainer - .setTitleText(SummaryLabels.WARNING_LIST_VIEW_TITLE); - setMaxWeight(innerMaxWeight, outerMaxWeight); - - Composite contents = viewContainer.getContentArea(); - contents.setBackground(ColorResources.VIEW_BG_COLOR); - contents.setLayout(new FillLayout()); - tableComp = new WarningTable(contents, SWT.NONE, SWT.SINGLE - | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL); - tableComp.setComparator(new TableComparator()); - tableComp.setSortTypes(sortTypes); - tableComp.setSourceColumns(sourceColumns); - tableComp.setColumns(columnNames); - tableComp.setColumnSize(columnSizes); - tableComp.setTableName(SummaryLabels.WARNING_LIST_VIEW_TITLE); - } - - @Override - public void updateView() { - tableComp.updateTable(); - } - - @Override - public void clear() { - tableComp.clear(); - } - - @Override - public Control getControl() { - return tableComp; - } - - @Override - public void otherViewSelectionOccured() { - tableComp.deselectAll(); - } - - @Override - public void setMaxSize(boolean maximized) { - - if (null == innerMaxWeight || null == outerMaxWeight) { - return; - } - - Composite parent = getParent(); - if (parent instanceof SashForm) { - parent = parent.getParent(); - if (!(parent instanceof SashForm)) { - return; - } - } - - Composite pParent = parent.getParent(); - if (!(pParent instanceof SashForm)) { - return; - } - - SashForm innerForm = (SashForm) parent; - SashForm outerForm = (SashForm) pParent; - - if (maximized) { - oldInnerLayout = innerForm.getWeights(); - oldOuterLayout = outerForm.getWeights(); - innerForm.setWeights(innerMaxWeight); - outerForm.setWeights(outerMaxWeight); - } else { - innerForm.setWeights(oldInnerLayout); - outerForm.setWeights(oldOuterLayout); - } - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningTable.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningTable.java deleted file mode 100644 index 3aa6601..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningTable.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.summary.warning; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.nebula.widgets.grid.Grid; -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.graphics.Point; -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.model.TableInput; -import org.tizen.dynamicanalyzer.nl.SummaryLabels; -import org.tizen.dynamicanalyzer.ui.file.FilePage; -import org.tizen.dynamicanalyzer.ui.page.DAPageComposite; -import org.tizen.dynamicanalyzer.ui.range.RangeDataManager; -import org.tizen.dynamicanalyzer.ui.thread.ThreadPage; -import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea; -import org.tizen.dynamicanalyzer.ui.userinterface.UIPage; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; - -public class WarningTable extends DATableComposite { - private boolean isRange = false; - - public WarningTable(Composite parent, int compStyle, int tableStyle) { - super(parent, compStyle, tableStyle); - table.addSelectionListener(new SelectionListener() { - - @Override - public void widgetSelected(SelectionEvent e) { - GridItem[] items = table.getSelection(); - - DATableDataFormat dataFormat = (DATableDataFormat) items[0].getData(); - String time = dataFormat.getData().get(LogCenterConstants.TIME_INDEX); - - DASelectionData selData = new DASelectionData( - WarningListView.ID, Long.parseLong(time), 0, items, table); - AnalyzerManager.getCurrentPage().updatePage(selData); - AnalyzerManager.getCurrentPage().controlSelection( - WarningListView.ID); - } - - @Override - public void widgetDefaultSelected(SelectionEvent e) { - // TODO Auto-generated method stub - - } - }); - - 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) { - if (ToolbarArea.getInstance().getSourceViewToggleState() - || !(e.widget instanceof Grid)) { - return; - } - Grid grid = (Grid) e.widget; - GridItem item = grid.getItem(new Point(e.x, e.y)); - if (null == item) { - return; - } - DATableDataFormat tableData = (DATableDataFormat) item - .getData(); - List data = tableData.getData(); - String logId = data.get(LogCenterConstants.ID_INDEX); - int id = Integer.parseInt(logId); - String pageId = null; - if (id == LogCenterConstants.LOG_RESOURCE) { - String fdType = data - .get(LogCenterConstants.RESOURCE_FDTYPE_INDEX); - int type = Integer.parseInt(fdType); - if (type == LogCenterConstants.FD_TYPE_FILE) { - pageId = FilePage.ID; - } else { - // TODO: pageId = NetworkPage.ID; - } - } else if (id == LogCenterConstants.LOG_THREAD) { - pageId = ThreadPage.ID; - } else if (id == LogCenterConstants.LOG_CONTROL) { - pageId = UIPage.ID; - } else { - return; - } - - AnalyzerUtil.changePage(pageId); - DAPageComposite page = (DAPageComposite) AnalyzerUtil - .getTabPage(pageId); - page.setSelection(data); - } - }); - } - - public void setRangeTable(boolean isRange) { - this.isRange = isRange; - } - - protected List makeTableInput() { - List warningList = null; - if (isRange) { - warningList = RangeDataManager.getInstance().getWarningChecker() - .getWarningData(); - } else { - warningList = AnalyzerManager.getWarningChecker().getWarningData(); - } - List input = new ArrayList(); - int size = warningList.size(); - for (int i = 0; i < size; i++) { - // create text - List text = new ArrayList(); - WarningData warningData = warningList.get(i); - List warningInput = warningData.getData(); - - text.add(warningInput.get(LogCenterConstants.SEQUENCE_NUMBER_INDEX)); - { - if (LogCenterConstants.LOG_RESOURCE == warningData - .getCategory()) { - String fdType = warningInput - .get(LogCenterConstants.RESOURCE_FDTYPE_INDEX); - int type = Integer.parseInt(fdType); - if (type == LogCenterConstants.FD_TYPE_FILE) { - text.add(SummaryLabels.WARNING_TABLE_FILE); - } else { - text.add(SummaryLabels.WARNING_TABLE_SOCKET); - } - } else { - text.add(LogCenterConstants - .getLogCenterNameFromId(warningData.getCategory())); - } - } - String message = WarningChecker.messageMaker(warningData, true); - text.add(message); - // create images - - // create DATableDataFormat - DATableDataFormat tableData = new DATableDataFormat( - warningInput.get(LogCenterConstants.SEQUENCE_NUMBER_INDEX)); - tableData.getData().addAll(warningData.getData()); - - TableInput tableInput = new TableInput(); - tableInput.setText(text); - tableInput.setData(tableData); - input.add(tableInput); - } - return input; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadAPIListView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadAPIListView.java deleted file mode 100644 index d71a437..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadAPIListView.java +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.thread; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.model.DAView; -import org.tizen.dynamicanalyzer.nl.ThreadPageLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.ui.basechart.table.ThreadAPIListTable; -import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer; -import org.tizen.dynamicanalyzer.ui.widgets.table.TableComparator; - -public class ThreadAPIListView extends DAView { - - public static final String ID = ThreadAPIListView.class.getName(); - private ThreadPageData data; - int[] innerMaxWeight = { 0, 100 }; - int[] outerMaxWeight = { 100, 0 }; - - private String[] columnNames = { - ThreadPageLabels.THREAD_API_LIST_VIEW_INDEX, - ThreadPageLabels.THREAD_API_LIST_VIEW_TIME, - ThreadPageLabels.THREAD_API_LIST_VIEW_NAME, - ThreadPageLabels.THREAD_API_LIST_VIEW_PARAMETER, - ThreadPageLabels.THREAD_API_LIST_VIEW_THREAD_ID, - ThreadPageLabels.THREAD_API_LIST_VIEW_RETURN, - ThreadPageLabels.THREAD_API_LIST_VIEW_ERRNO }; - - private int[] columnSizes = { 35, 70, 80, 250, 0, 100, 100 }; - - int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_STRING, - AnalyzerConstants.SORT_TYPE_STRING, - AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_STRING, - AnalyzerConstants.SORT_TYPE_STRING }; - - int[] sourceColumns = { LogCenterConstants.SEQUENCE_NUMBER_INDEX, - LogCenterConstants.TIME_INDEX, LogCenterConstants.APINAME_INDEX, - LogCenterConstants.INPUTPARM_INDEX, - LogCenterConstants.THREAD_ID_INDEX, - LogCenterConstants.RETURN_INDEX, LogCenterConstants.ERROR_INDEX }; - - ThreadAPIListTable tableComp = null; - - public ThreadAPIListView(Composite parent, int style) { - super(parent, style); - this.setLayout(new FillLayout()); - - ViewContainer viewContainer = new ViewContainer(this, true); - viewContainer.setTitleText(ThreadPageLabels.THREAD_API_LIST_VEIW_TITLE); - setMaxWeight(innerMaxWeight, outerMaxWeight); - - Composite contents = viewContainer.getContentArea(); - contents.setBackground(ColorResources.WINDOW_BG_COLOR); - contents.setLayout(new FillLayout()); - tableComp = new ThreadAPIListTable(contents, SWT.NONE, SWT.SINGLE - | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL); - tableComp.setTableName("Thread API List"); - tableComp.setComparator(new TableComparator()); - tableComp.setSortTypes(sortTypes); - tableComp.setSourceColumns(sourceColumns); - tableComp.setColumns(columnNames); - tableComp.setColumnSize(columnSizes); - } - - @Override - public void updateView() { - if (null == data) { - return; - } - - if (data.getContents().size() != tableComp.getTable().getItemCount()) { - tableComp.updateTable(); - } - } - - @Override - public void updateView(DASelectionData data) { - this.data = (ThreadPageData) data.getData(); - if (!(this.data instanceof ThreadPageData)) { - return; - } - tableComp.getTable().removeAll(); - tableComp.updateTable(); - } - - @Override - public Control getControl() { - return tableComp; - } - - @Override - public void clear() { - tableComp.getTable().removeAll(); - data = null; - } - - public ThreadPageData getPageData() { - return data; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadChartView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadChartView.java deleted file mode 100644 index 274f494..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadChartView.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.thread; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.StackLayout; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.logparser.LogPackage; -import org.tizen.dynamicanalyzer.model.DAView; -import org.tizen.dynamicanalyzer.nl.ThreadPageLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea; -import org.tizen.dynamicanalyzer.ui.widgets.ComboButtonRenderer; -import org.tizen.dynamicanalyzer.ui.widgets.TitleComboPopupRenderer; -import org.tizen.dynamicanalyzer.ui.widgets.TitleComboRenderer; -import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer; -import org.tizen.dynamicanalyzer.widgets.chartBoard.DACustomChartBoard; -import org.tizen.dynamicanalyzer.widgets.chartBoard.DACustomChartBoardItem; -import org.tizen.dynamicanalyzer.widgets.chartBoard.DACustomChartBoardSelectionListener; -import org.tizen.dynamicanalyzer.widgets.combo.DACustomCombo; -import org.tizen.dynamicanalyzer.widgets.combo.DACustomComboSelectionListener; - -public class ThreadChartView extends DAView { - public static final String ID = ThreadChartView.class.getName(); - public final static int THREAD_CHART_HEIGHT = 40; - public final static int THREAD_COMBO_ITEM_HEIGHT = 24; - - private final Composite contents; - private DACustomChartBoard threadChart; - private DACustomChartBoard syncChart; - private DACustomCombo threadCombo; - private DACustomCombo syncCombo; - private final StackLayout stackLayout; - - ThreadPageThreadDataManager tManager; - ThreadPageSyncDataManager sManager; - - public ThreadChartView(Composite parent, int style) { - super(parent, style); - this.setLayout(new FillLayout()); - - // TODO Auto-generated constructor stub - ViewContainer viewContainer = new ViewContainer(this, false); - viewContainer.setTitleText(ThreadPageLabels.THREAD_CHART_TITLE); - - contents = viewContainer.getContentArea(); - contents.setBackground(ColorResources.WINDOW_BG_COLOR); -// contents.setLayout(new FillLayout()); - stackLayout = new StackLayout(); - contents.setLayout(stackLayout); - threadChart = new DACustomChartBoard(contents, - ThreadPageLabels.THREAD_CHART_TITLE); - - threadChart - .addSelectionListener(new DACustomChartBoardSelectionListener() { - - @Override - public void handleSelectionEvent(DACustomChartBoardItem item) { - // TODO Auto-generated method stub - AnalyzerManager.getCurrentPage().updatePage( - new DASelectionData(ThreadChartView.ID, 0, 0, - item.getData(), null)); - } - }); - syncChart = new DACustomChartBoard(contents, - ThreadPageLabels.SYNC_CHART_TITLE); - - syncChart - .addSelectionListener(new DACustomChartBoardSelectionListener() { - - @Override - public void handleSelectionEvent(DACustomChartBoardItem item) { - // TODO Auto-generated method stub - AnalyzerManager.getCurrentPage().updatePage( - new DASelectionData(ThreadChartView.ID, 0, 0, - item.getData(), null)); - } - }); - stackLayout.topControl = threadChart; - - - threadCombo = new DACustomCombo(threadChart.getTitleComp(), SWT.NONE); - - threadCombo.setImages(ImageResources.TIMELINE_DROPDOWN_NORMAL, - ImageResources.TIMELINE_DROPDOWN_HOVER, - ImageResources.TIMELINE_DROPDOWN_PUSH, - ImageResources.TIMELINE_DROPDOWN_NORMAL); - threadCombo.add("Thread"); - threadCombo.add("Synchronization"); //FIXME - threadCombo.select(0); - threadCombo.setComboButtonGradation( - ColorResources.DEVICE_APPLICATION_BUTTON_NORMAL_START, - ColorResources.DEVICE_APPLICATION_BUTTON_NORMAL_END, - ColorResources.DEVICE_APPLICATION_BUTTON_PUSH_START, - ColorResources.DEVICE_APPLICATION_BUTTON_PUSH_END, - ColorResources.DEVICE_APPLICATION_BUTTON_HOVER_START, - ColorResources.DEVICE_APPLICATION_BUTTON_HOVER_END, - ColorResources.DEVICE_APPLICATION_BUTTON_DISABLE_START, - ColorResources.DEVICE_APPLICATION_BUTTON_DISABLE_END); - threadCombo.setButtonImages(ImageResources.COMBO_DROPDOWN_UP, - ImageResources.COMBO_DROPDOWN_DOWN); - threadCombo.setEnabled(true); - threadCombo.setItemHeight(THREAD_COMBO_ITEM_HEIGHT); - threadCombo.setComboRender(new TitleComboRenderer()); - threadCombo.setComboPopupRender(new TitleComboPopupRenderer()); - threadCombo.setButtonRenderer(new ComboButtonRenderer()); - threadCombo.addSelectionListener(new DACustomComboSelectionListener() { - - @Override - public void selectionEvent(DACustomCombo combo) { - // TODO Auto-generated method stub - String selected = combo.getText(); - if (null == selected || selected.isEmpty()){ - return; - } - if(selected.equals("Thread")){ - - } - else if (selected.equals("Synchronization")){ - stackLayout.topControl = syncChart; - contents.layout(); - syncCombo.setText("Synchronization"); - } - else{ - return; - } - } - }); - - syncCombo = new DACustomCombo(syncChart.getTitleComp(), SWT.NONE); - - syncCombo.setImages(ImageResources.TIMELINE_DROPDOWN_NORMAL, - ImageResources.TIMELINE_DROPDOWN_HOVER, - ImageResources.TIMELINE_DROPDOWN_PUSH, - ImageResources.TIMELINE_DROPDOWN_NORMAL); - syncCombo.add("Thread"); - syncCombo.add("Synchronization"); //FIXME - syncCombo.select(1); - syncCombo.setComboButtonGradation( - ColorResources.DEVICE_APPLICATION_BUTTON_NORMAL_START, - ColorResources.DEVICE_APPLICATION_BUTTON_NORMAL_END, - ColorResources.DEVICE_APPLICATION_BUTTON_PUSH_START, - ColorResources.DEVICE_APPLICATION_BUTTON_PUSH_END, - ColorResources.DEVICE_APPLICATION_BUTTON_HOVER_START, - ColorResources.DEVICE_APPLICATION_BUTTON_HOVER_END, - ColorResources.DEVICE_APPLICATION_BUTTON_DISABLE_START, - ColorResources.DEVICE_APPLICATION_BUTTON_DISABLE_END); - syncCombo.setButtonImages(ImageResources.COMBO_DROPDOWN_UP, - ImageResources.COMBO_DROPDOWN_DOWN); - syncCombo.setEnabled(true); - syncCombo.setItemHeight(THREAD_COMBO_ITEM_HEIGHT); - syncCombo.setComboRender(new TitleComboRenderer()); - syncCombo.setComboPopupRender(new TitleComboPopupRenderer()); - syncCombo.setButtonRenderer(new ComboButtonRenderer()); - syncCombo.addSelectionListener(new DACustomComboSelectionListener() { - - @Override - public void selectionEvent(DACustomCombo combo) { - // TODO Auto-generated method stub - String selected = combo.getText(); - if (null == selected || selected.isEmpty()){ - return; - } - if(selected.equals("Synchronization")){ - - } - else if (selected.equals("Thread")){ - stackLayout.topControl = threadChart; - contents.layout(); - threadCombo.setText("Thread"); - } - else{ - return; - } - } - }); - - tManager = new ThreadPageThreadDataManager(threadChart); - sManager = new ThreadPageSyncDataManager(syncChart); - } - - @Override - public void updateView() { - threadChart.setTotalEndTime(ToolbarArea.getInstance().getTime()); - syncChart.setTotalEndTime(ToolbarArea.getInstance().getTime()); - tManager.checkUpdate(); - sManager.checkUpdate(); - } - - @Override - public void updateView(DASelectionData data) { // FIXME - - } - - @Override - public void updateLog(LogPackage logPack) { - tManager.parsePageData(logPack); - sManager.parsePageData(logPack); - } - - @Override - public void clear() { - threadChart.clear(); - syncChart.clear(); - tManager.clear(); - sManager.clear(); - } - - @Override - public Control getControl() { - return threadChart; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadDetailInfoView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadDetailInfoView.java deleted file mode 100644 index e3b78f4..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadDetailInfoView.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.thread; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Canvas; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.model.DAView; -import org.tizen.dynamicanalyzer.nl.AnalyzerLabels; -import org.tizen.dynamicanalyzer.nl.ThreadPageLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.FontResources; -import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer; - -public class ThreadDetailInfoView extends DAView { - public static final String ID = ThreadDetailInfoView.class.getName(); - public static final int LEFT_MARGIN = 10; - public static final int HEIGHT_MARGIN = 20; - - private Canvas canvas = null; - private int tid = 0; - private String type = AnalyzerLabels.EMPTY_STRING; - private boolean select = false; - - int[] innerMaxWeight = { 0, 100 }; - int[] outerMaxWeight = { 0, 100 }; - - private void init() { - tid = 0; - type = AnalyzerLabels.EMPTY_STRING; - select = false; - } - - public ThreadDetailInfoView(Composite parent, int style) { - super(parent, style); - this.setLayout(new FillLayout()); - - ViewContainer viewContainer = new ViewContainer(this, true); - viewContainer.setTitleText(ThreadPageLabels.THREAD_DETAILS_TITLE); - setMaxWeight(innerMaxWeight, outerMaxWeight); - - Composite contents = viewContainer.getContentArea(); - contents.setBackground(ColorResources.VIEW_BG_COLOR); - contents.setLayout(new FillLayout()); - canvas = new Canvas(contents, SWT.TRANSPARENT); - canvas.addPaintListener(new PaintListener() { - - @Override - public void paintControl(PaintEvent e) { - Rectangle rect = canvas.getBounds(); - e.gc.setBackground(ColorResources.VIEW_BG_COLOR); - e.gc.fillRectangle(rect.x, rect.y, rect.width, rect.height); - e.gc.setForeground(ColorResources.TABLE_CONTENTS_FONT_COLOR); - e.gc.setFont(FontResources.DETAIL_INFO_FONT); - - String threadID; - String threhadType; - - if (true == select) { - threadID = ThreadPageLabels.THREAD_DETAILS_TID - + String.valueOf(tid); - threhadType = ThreadPageLabels.THREAD_DETAILS_TTYPE + type; - } else { - threadID = ThreadPageLabels.THREAD_DETAILS_TID; - threhadType = ThreadPageLabels.THREAD_DETAILS_TTYPE; - } - - int y = HEIGHT_MARGIN; - e.gc.drawText(threadID, LEFT_MARGIN, y); - Point p = e.gc.textExtent(threadID, SWT.DRAW_DELIMITER); - y = y + p.y + HEIGHT_MARGIN; - - e.gc.drawText(threhadType, LEFT_MARGIN, y); - } - }); - } - - @Override - public void updateView(DASelectionData data) { - String id = data.getViewId(); - if (!(id.equals(ThreadChartView.ID))) { - return; - } - ThreadPageData item = (ThreadPageData) data.getData(); - if (!(item instanceof ThreadPageData)) { - return; - } - select = true; - tid = item.getTid(); - type = item.getType(); - canvas.redraw(); - } - - @Override - public Control getControl() { - return canvas; - } - - @Override - public void clear() { - init(); - canvas.redraw(); - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPage.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPage.java deleted file mode 100644 index 1491e98..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPage.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.thread; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.SashForm; -import org.eclipse.swt.events.ControlEvent; -import org.eclipse.swt.events.ControlListener; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.common.CommonConstants; -import org.tizen.dynamicanalyzer.common.DesignConstants; -import org.tizen.dynamicanalyzer.nl.AnalyzerLabels; -import org.tizen.dynamicanalyzer.ui.info.callstack.CallstackView; -import org.tizen.dynamicanalyzer.ui.info.snapshot.SnapshotView; -import org.tizen.dynamicanalyzer.ui.page.DAPageComposite; -import org.tizen.dynamicanalyzer.ui.widgets.DATabComposite; - -public class ThreadPage extends DAPageComposite { - public static final String ID = ThreadPage.class.getName(); - public static final String TAB_ID = ID + CommonConstants.UNDERBAR + "tab"; - - private final double DEFAULT_WIDTH = DesignConstants.SNAPSHOT_VIEW_WIDTH + 10; - private final double DEFAULT_HEIGHT = DesignConstants.SNAPSHOT_VIEW_HEIGHT - + 10 + DesignConstants.VIEW_TITLEBAR_HEIGHT; - SashForm baseForm; - SashForm leftForm; - SashForm rightForm; - - public ThreadPage(Composite parent, int style) { - super(parent, style); - name = AnalyzerLabels.COOLBAR_AREA_THREAD; - this.setLayout(new FillLayout()); - - baseForm = new SashForm(this, SWT.HORIZONTAL); - baseForm.setLayout(new FillLayout()); - - leftForm = new SashForm(baseForm, SWT.VERTICAL); - ThreadChartView threadChartView = new ThreadChartView(leftForm, - SWT.NONE); - addView(threadChartView); - - ThreadAPIListView threadAPIListView = new ThreadAPIListView(leftForm, - SWT.NONE); - addView(threadAPIListView); - - leftForm.setWeights(new int[] { 60, 40 }); - - rightForm = new SashForm(baseForm, SWT.VERTICAL); - // INFO_VIEW_INDEX = 2; - DATabComposite tabView = new DATabComposite(rightForm, SWT.NONE); - addView(tabView); - { - SnapshotView snapshotView = new SnapshotView( - tabView.getContentComposite(), SWT.NONE, false); - snapshotView - .setObservingViews(new String[] { ThreadAPIListView.ID }); - tabView.addView(snapshotView); - - CallstackView callstack = new CallstackView( - tabView.getContentComposite(), SWT.NONE); - callstack.setObservingViews(new String[] { ThreadAPIListView.ID }); - tabView.addView(callstack); - } - - // FILE_DETAIL = 3; - ThreadDetailInfoView detailInfo = new ThreadDetailInfoView(rightForm, - SWT.NONE); - addView(detailInfo); - - rightForm.setWeights(new int[] { 50, 50 }); - - baseForm.setWeights(new int[] { 75, 25 }); - - this.addControlListener(new ControlListener() { - - @Override - public void controlResized(ControlEvent e) { - Composite composite = (Composite) e.widget; - Rectangle rect = composite.getBounds(); - int pageWidth = rect.width; - int pageHeight = rect.height; - - int wRate = (int) (DEFAULT_WIDTH * 100 / pageWidth); - int hRate = (int) (DEFAULT_HEIGHT * 100 / pageHeight); - wRate = (wRate >= 100) ? 100 : wRate; - hRate = (hRate >= 100) ? 100 : hRate; - - baseForm.setWeights(new int[] { 100 - wRate, wRate }); - rightForm.setWeights(new int[] { hRate, 100 - hRate }); - } - - @Override - public void controlMoved(ControlEvent e) { - } - }); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageData.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageData.java deleted file mode 100644 index 4ab0073..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageData.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.thread; - -import java.util.ArrayList; -import java.util.List; - -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChart; -import org.tizen.dynamicanalyzer.widgets.chartBoard.DACustomChartBoardItem; - -public abstract class ThreadPageData { - private int tid; - private String type; - private String name; - protected DACustomChartBoardItem item; - protected List contents = new ArrayList(); - protected List contentsQueue = new ArrayList(); - protected DACustomChart chart; - protected boolean hasUpdate = false; - - public ThreadPageData(String type, String name, int tid) { - setType(type); - setName(name); - setTid(tid); - } - - public int getTid() { - return tid; - } - - public void setTid(int tid) { - this.tid = tid; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public DACustomChartBoardItem getItem() { - return item; - } - - public DACustomChart getChart() { - return chart; - } - - public void setChart(DACustomChart chart) { - this.chart = chart; - } - - protected void pushEvent(ThreadPageDataEvent event) { - contentsQueue.add(event); - hasUpdate = true; - } - - public void setHasUpdate() { - hasUpdate = true; - } - - - - public List getContents() { - return contents; - } - protected abstract void checkUpdate(); - public abstract void setItem(DACustomChartBoardItem item); - - protected abstract int createChartItem(ThreadPageDataEvent event); -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageDataEvent.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageDataEvent.java deleted file mode 100644 index 9c30bd1..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageDataEvent.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.thread; - -import java.util.ArrayList; -import java.util.List; - -public abstract class ThreadPageDataEvent { - private List contents; - - public ThreadPageDataEvent(List contents) { - setContents(contents); - } - - public List getContents() { - if (null == contents) { - contents = new ArrayList(); - } - return contents; - } - - public void setContents(List contents) { - this.contents = contents; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageSyncData.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageSyncData.java deleted file mode 100644 index 140cfcb..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageSyncData.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.thread; - -import java.util.ArrayList; -import java.util.List; - -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.nl.ThreadPageLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeries; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeriesItem; -import org.tizen.dynamicanalyzer.widgets.chartBoard.DACustomChartBoardItem; - -public class ThreadPageSyncData extends ThreadPageData { - private List children = new ArrayList(); - private DACustomChartSeries stateSeries; - - public ThreadPageSyncData(String type, String name, int tid) { - super(type, name, tid); - } - - protected void pushSync(ThreadPageSyncData sync) { - children.add(sync); - hasUpdate = true; - } - - protected ThreadPageSyncData findChildData(int tId){ - int size = children.size(); - ThreadPageSyncData ret; - for(int i =0; i< size; i++){ - ret = children.get(i); - if(ret.getTid() == tId){ - return ret; - } - } - return null; - } - - public void setItem(DACustomChartBoardItem item) { - this.item = item; - setChart(item.getChart()); - stateSeries = chart - .getSeries(ThreadPageLabels.THREAD_SYNC_CHART_SERIES_STATE); - } - - private boolean isSyncApi(int apiType) { - switch (apiType) { - case LogCenterConstants.SYNC_API_TYPE_NEW: - case LogCenterConstants.SYNC_API_TYPE_ACQUIRE_WAIT_START: - case LogCenterConstants.SYNC_API_TYPE_RELEASE: - case LogCenterConstants.SYNC_API_TYPE_TRY_ACQUIRE: - case LogCenterConstants.SYNC_API_TYPE_COND_WAIT_START: - case LogCenterConstants.SYNC_API_TYPE_NOTIFY: - case LogCenterConstants.SYNC_API_TYPE_NOTIFY_ALL: - case LogCenterConstants.SYNC_API_TYPE_OTHER: - return true; - case LogCenterConstants.SYNC_API_TYPE_ACQUIRE_WAIT_END: - case LogCenterConstants.SYNC_API_TYPE_COND_WAIT_END: - return false; - default: - return false; - } - } - - protected void checkUpdate() { - if (false == hasUpdate) { - return; - } else { - hasUpdate = false; - } - int size = contentsQueue.size(); - if (size > 0) { - ThreadPageDataEvent event; - for (int i = 0; i < size; i++) { - event = contentsQueue.get(0); - if (true == (isSyncApi(createChartItem(event)))) { - contents.add(event); - } - - contentsQueue.remove(0); - } - chart.redraw(); - } - - size = children.size(); - if (size > 0) { - ThreadPageSyncData sync; - for (int i = 0; i < size; i++) { - sync = children.get(i); - sync.checkUpdate(); - } - } - } - - protected int createChartItem(ThreadPageDataEvent event) { - DACustomChartSeriesItem seriesItem = null; - ThreadPageSyncDataEvent syncEvent = (ThreadPageSyncDataEvent) event; - if (!(syncEvent instanceof ThreadPageSyncDataEvent)) { - System.out.println("error : createChartItem"); - return -1; - } - int apiType = syncEvent.getApiType(); - - switch (apiType) { - case LogCenterConstants.SYNC_API_TYPE_NEW: - case LogCenterConstants.SYNC_API_TYPE_NOTIFY: - case LogCenterConstants.SYNC_API_TYPE_NOTIFY_ALL: - case LogCenterConstants.SYNC_API_TYPE_OTHER: - seriesItem = new DACustomChartSeriesItem(syncEvent.getTime(), - DACustomChartSeriesItem.SERIES_STATE_BAR, - ColorResources.YELLOW); - break; - case LogCenterConstants.SYNC_API_TYPE_ACQUIRE_WAIT_START: - case LogCenterConstants.SYNC_API_TYPE_COND_WAIT_START: - seriesItem = new DACustomChartSeriesItem(syncEvent.getTime(), - DACustomChartSeriesItem.SERIES_STATE_CONTINUE, - ColorResources.THREAD_GRAPH_LOCK_WAIT_COLOR); - break; - case LogCenterConstants.SYNC_API_TYPE_RELEASE: - seriesItem = new DACustomChartSeriesItem(syncEvent.getTime(), - DACustomChartSeriesItem.SERIES_STATE_CONNECTION, - ColorResources.THREAD_GRAPH_LOCK_RELEASE_COLOR); - break; - case LogCenterConstants.SYNC_API_TYPE_ACQUIRE_WAIT_END: - case LogCenterConstants.SYNC_API_TYPE_COND_WAIT_END: - case LogCenterConstants.SYNC_API_TYPE_TRY_ACQUIRE: - int errorNum = Integer.parseInt(event.getContents().get( - LogCenterConstants.ERROR_INDEX)); - if (0 != errorNum) { - seriesItem = new DACustomChartSeriesItem(syncEvent.getTime(), - DACustomChartSeriesItem.SERIES_STATE_BAR, - ColorResources.RED); - } else { - seriesItem = new DACustomChartSeriesItem(syncEvent.getTime(), - DACustomChartSeriesItem.SERIES_STATE_CONTINUE, - ColorResources.THREAD_GRAPH_LOCK_ACQUIRE_COLOR); - } - break; - default: - return -1; - } - stateSeries.addSeriesItem(seriesItem); - return apiType; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageSyncDataEvent.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageSyncDataEvent.java deleted file mode 100644 index 5f55a2b..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageSyncDataEvent.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.thread; - -import java.util.List; - -public class ThreadPageSyncDataEvent extends ThreadPageDataEvent { - private String syncVal; - private int tid = -1; - private int type = -1; - private int apiType = -1; - private double time = -1; - - public ThreadPageSyncDataEvent(String syncVal, int type, int apiType, - double time, int tid, List contents) { - super(contents); - setSyncVal(syncVal); - setType(type); - setApiType(apiType); - setTime(time); - setTid(tid); - setContents(contents); - } - - public int getTid() { - return tid; - } - - public void setTid(int tid) { - this.tid = tid; - } - - public int getApiType() { - return apiType; - } - - public void setApiType(int apiType) { - this.apiType = apiType; - } - - public double getTime() { - return time; - } - - public void setTime(double time) { - this.time = time; - } - - public String getSyncVal() { - return syncVal; - } - - public void setSyncVal(String syncVal) { - this.syncVal = syncVal; - } - - public int getType() { - return type; - } - - public void setType(int type) { - this.type = type; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageSyncDataManager.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageSyncDataManager.java deleted file mode 100644 index 8f550e7..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageSyncDataManager.java +++ /dev/null @@ -1,248 +0,0 @@ -package org.tizen.dynamicanalyzer.ui.thread; - -import java.util.ArrayList; -import java.util.List; - -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.logparser.LogPackage; -import org.tizen.dynamicanalyzer.logparser.Logs; -import org.tizen.dynamicanalyzer.nl.ThreadPageLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChart; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartPlot; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeries; -import org.tizen.dynamicanalyzer.widgets.chartBoard.DACustomChartBoard; -import org.tizen.dynamicanalyzer.widgets.chartBoard.DACustomChartBoardItem; - -public class ThreadPageSyncDataManager { - private DACustomChartBoard board; - private List rows = new ArrayList(); - private List syncEventQueue = new ArrayList(); - - protected ThreadPageSyncDataManager(DACustomChartBoard board) { - this.setBoard(board); - } - - protected DACustomChartBoard getBoard() { - return board; - } - - private void setBoard(DACustomChartBoard board) { - this.board = board; - } - - private void pushEvent(ThreadPageSyncDataEvent event) { - syncEventQueue.add(event); - } - - private ThreadPageSyncData findParentData(String name) { - int size = rows.size(); - ThreadPageSyncData ret; - for (int i = 0; i < size; i++) { - ret = rows.get(i); - if (ret.getName().equals(name)) { - return ret; - } - } - return null; - } - - private void parseSync(List> inputs) { - int size; - if (null == inputs || 0 == (size = inputs.size())) { - return; - } - - List input; - - for (int i = 0; i < size; i++) { - input = inputs.get(i); -// System.out.println("input : " + input); - double time = Double.parseDouble(input - .get(LogCenterConstants.TIME_INDEX)) - / TimelineConstants.MEGA; - int tid = Integer.parseInt(input - .get(LogCenterConstants.THREAD_ID_INDEX)); - - int type = Integer.parseInt(input - .get(LogCenterConstants.SYNC_TYPE_INDEX)); - int apiType = Integer.parseInt(input - .get(LogCenterConstants.SYNC_API_TYPE_INDEX)); - - String name = input.get(LogCenterConstants.SYNC_VAL_INDEX); - ThreadPageSyncDataEvent event; - switch (type) { - case LogCenterConstants.SYNC_TYPE_OSP_MUTEX: - case LogCenterConstants.SYNC_TYPE_OSP_MONITOR: - case LogCenterConstants.SYNC_TYPE_OSP_SEMAPHORE: - event = new ThreadPageSyncDataEvent(name, type, apiType, time, - tid, input); - pushEvent(event); - // parseOSPSync(input, type); - break; - case LogCenterConstants.SYNC_TYPE_PTHREAD_MUTEX: - case LogCenterConstants.SYNC_TYPE_PTHREAD_COND_VARIABLE: - event = new ThreadPageSyncDataEvent(name, type, apiType, time, - tid, input); - pushEvent(event); - break; - case LogCenterConstants.SYNC_TYPE_PTHREAD_RWLOCK: - case LogCenterConstants.SYNC_TYPE_PTHREAD_SPINLOCK: - case LogCenterConstants.SYNC_TYPE_PTHREAD_BARRIER: - event = new ThreadPageSyncDataEvent(name, type, apiType, time, - tid, input); - pushEvent(event); - System.out.println("error : sync parse - type = " + type); - break; - default: - System.out.println("error : sync parse unknown - type = " - + type); - } - } - } - - public List> getLogsFromLogPackage(LogPackage logPack, - int logCenterConstants) { - Logs logs = logPack.getLogs(logCenterConstants); - if (null == logs || logs.getLogs().size() == 0) { - return null; - } - List> ret = logs.getLogs(); - return ret; - } - - public void parsePageData(LogPackage logPack) { - List> inputs = getLogsFromLogPackage(logPack, - LogCenterConstants.LOG_SYNC); - parseSync(inputs); - } - - private String getSyncTypeString(int syncType) { - switch (syncType) { - case LogCenterConstants.SYNC_TYPE_OSP_MUTEX: - return ThreadPageLabels.SYNC_TYPE_OSP_MUTEX; - case LogCenterConstants.SYNC_TYPE_OSP_MONITOR: - return ThreadPageLabels.SYNC_TYPE_OSP_MONITOR; - case LogCenterConstants.SYNC_TYPE_OSP_SEMAPHORE: - return ThreadPageLabels.SYNC_TYPE_OSP_SEMAPHORE; - case LogCenterConstants.SYNC_TYPE_PTHREAD_MUTEX: - return ThreadPageLabels.SYNC_TYPE_PTHREAD_MUTEX; - case LogCenterConstants.SYNC_TYPE_PTHREAD_COND_VARIABLE: - return ThreadPageLabels.SYNC_TYPE_PTHREAD_COND_VARIABLE; - case LogCenterConstants.SYNC_TYPE_PTHREAD_RWLOCK: - return ThreadPageLabels.SYNC_TYPE_PTHREAD_RWLOCK; - case LogCenterConstants.SYNC_TYPE_PTHREAD_SPINLOCK: - return ThreadPageLabels.SYNC_TYPE_PTHREAD_SPINLOCK; - case LogCenterConstants.SYNC_TYPE_PTHREAD_BARRIER: - return ThreadPageLabels.SYNC_TYPE_PTHREAD_BARRIER; - default: - return AnalyzerConstants.EMPTY; - } - } - - private void initSyncChart(DACustomChart chart, boolean isParent) { - if (null == chart) { - return; - } - - DACustomChartSeries stateSeries = new DACustomChartSeries( - ThreadPageLabels.THREAD_SYNC_CHART_SERIES_STATE, - DACustomChartSeries.SERIES_STYLE_STATE, ColorResources.YELLOW); - - chart.addSeries(stateSeries); - - DACustomChartPlot plot = chart.getPlot(); - if (null == plot) { - return; - } - if (true == isParent) { - plot.setBackgroundImage(ImageResources.BG_GRADIENT); - } else { - plot.setBackgroundImage(ImageResources.BG_CHILD_GRADIENT); - } - plot.setAutoHeightRange(false); - plot.setAxisRangeY(0, 101); - plot.setAxisRangeX(board.getVisibleStartTime(), - board.getVisibleEndTime()); - } - - private boolean createSyncBoardItem(ThreadPageSyncData parent, - ThreadPageSyncData sync) { - DACustomChartBoardItem item; - DACustomChart chart; - - if (null == parent) { - item = new DACustomChartBoardItem(board, sync.getType() - + ThreadPageLabels.THREAD_CHART_NAME_PREFIX - + ThreadPageLabels.THREAD_CHART_NAME_OBJ + sync.getName() - + ThreadPageLabels.THREAD_CHART_NAME_POSTFIX); - chart = item.getChart(); - initSyncChart(chart, true); - } else { - DACustomChartBoardItem parentItem = parent.getItem(); - item = new DACustomChartBoardItem(parentItem, - ThreadPageLabels.THREAD_CHART_NAME_TID - + sync.getTid()); - chart = item.getChart(); - initSyncChart(chart, false); - } - - sync.setItem(item); - item.setData(sync); - chart.setData(sync); - chart.redraw(); - return true; - } - - protected void checkUpdate() { - int size = syncEventQueue.size(); - if (size > 0) { - ThreadPageSyncData parent; - ThreadPageSyncData data; - ThreadPageSyncDataEvent event; - for (int i = 0; i < size; i++) { - event = syncEventQueue.get(0); - parent = findParentData(event.getSyncVal()); - // parent - if (null == parent) { - parent = new ThreadPageSyncData( - getSyncTypeString(event.getType()), - event.getSyncVal(), event.getTid()); - rows.add(parent); - createSyncBoardItem(null, parent); - } - parent.pushEvent(event); - // child - data = parent.findChildData(event.getTid()); - if (null == data) { - data = new ThreadPageSyncData( - getSyncTypeString(event.getType()), - event.getSyncVal(), event.getTid()); - parent.pushSync(data); - createSyncBoardItem(parent, data); - } - data.pushEvent(event); - syncEventQueue.remove(0); - } - } - size = rows.size(); - if (size > 0) { - ThreadPageSyncData data; - for(int i=0;i - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.thread; - -import java.util.ArrayList; -import java.util.List; - -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.nl.ThreadPageLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeries; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeriesItem; -import org.tizen.dynamicanalyzer.widgets.chartBoard.DACustomChartBoardItem; - -public class ThreadPageThreadData extends ThreadPageData { - private List syncs = new ArrayList(); - private DACustomChartSeries loadSeries; - private DACustomChartSeries eventSeries; - private DACustomChartSeries apiSeries; - - public ThreadPageThreadData(String type, int tid) { - super(type, String.valueOf(tid), tid); - } - - public void addDataEvent(ThreadPageThreadDataEvent dataEvent) { - contentsQueue.add(dataEvent); - } - - public void setItem(DACustomChartBoardItem item) { - this.item = item; - chart = item.getChart(); - loadSeries = chart.getSeries(ThreadPageLabels.THREAD_CHART_SERIES_LOAD); - eventSeries = chart - .getSeries(ThreadPageLabels.THREAD_CHART_SERIES_EVENT); - apiSeries = chart.getSeries(ThreadPageLabels.THREAD_CHART_SERIES_API); - } - - protected int createChartItem(ThreadPageDataEvent event) { - int ret = -1; - ThreadPageThreadDataEvent threadEvent = (ThreadPageThreadDataEvent) event; - if (!(threadEvent instanceof ThreadPageThreadDataEvent)) { - System.out.println("error : createChartItem"); - return ret; - } - DACustomChartSeriesItem seriesItem; - switch (threadEvent.getEventType()) { - case ThreadPageThreadDataEvent.TYPE_LOAD: - ret = ThreadPageThreadDataEvent.TYPE_LOAD; - if (null == loadSeries) { - return ret; - } - - seriesItem = new DACustomChartSeriesItem(threadEvent.getTime(), - (double) threadEvent.getThreadType()); - - loadSeries.addSeriesItem(seriesItem); - break; - case ThreadPageThreadDataEvent.TYPE_EVENT: - ret = ThreadPageThreadDataEvent.TYPE_EVENT; - if (null == eventSeries) { - return ret; - } - - int eventApiType = threadEvent.getApiType(); - if (eventApiType == LogCenterConstants.THREAD_API_TYPE_INTERNAL_START) { - seriesItem = new DACustomChartSeriesItem(threadEvent.getTime(), - DACustomChartSeriesItem.SERIES_ARROW_LEFT); - seriesItem.setBarWidth(threadEvent.getCallerTid()); - } else if (eventApiType == LogCenterConstants.THREAD_API_TYPE_WAIT_END) { - if (threadEvent.getContents() - .get(LogCenterConstants.APINAME_INDEX) - .equals(ThreadPageLabels.THREAD_API_JOIN)) { - seriesItem = new DACustomChartSeriesItem( - threadEvent.getTime(), - DACustomChartSeriesItem.SERIES_ARROW_LEFT); - seriesItem.setBarWidth(threadEvent.getCallerTid()); - } else { - seriesItem = new DACustomChartSeriesItem( - threadEvent.getTime(), - DACustomChartSeriesItem.SERIES_ARROW_NONE); - } - } else if (eventApiType == LogCenterConstants.THREAD_API_TYPE_INTERNAL_STOP) { - if (-1 != threadEvent.getCallerTid()) { - seriesItem = new DACustomChartSeriesItem( - threadEvent.getTime(), - DACustomChartSeriesItem.SERIES_ARROW_RIGHT); - seriesItem.setBarWidth(threadEvent.getCallerTid()); - } else { - seriesItem = new DACustomChartSeriesItem( - threadEvent.getTime(), - DACustomChartSeriesItem.SERIES_ARROW_NONE); - } - } else { - seriesItem = new DACustomChartSeriesItem(threadEvent.getTime(), - DACustomChartSeriesItem.SERIES_ARROW_NONE); - } - - eventSeries.addSeriesItem(seriesItem); - break; - case ThreadPageThreadDataEvent.TYPE_API: - ret = ThreadPageThreadDataEvent.TYPE_API; - if (null == apiSeries) { - return ret; - } - List input = threadEvent.getContents(); - long errno = Long.parseLong(input - .get(LogCenterConstants.ERROR_INDEX)); - if (0 == errno) { - seriesItem = new DACustomChartSeriesItem(threadEvent.getTime(), - 0); - } else { - seriesItem = new DACustomChartSeriesItem(threadEvent.getTime(), - 0, ColorResources.RED); - } - - apiSeries.addSeriesItem(seriesItem); - break; - default: - return ret; - } - threadEvent.setChartItem(seriesItem); - return ret; - } - - protected void checkUpdate() { - if (false == hasUpdate) { - return; - } else { - hasUpdate = false; - } - - int size = contentsQueue.size(); - if (size > 0) { - ThreadPageThreadDataEvent event; - for (int i = 0; i < size; i++) { - event = (ThreadPageThreadDataEvent) contentsQueue.get(0); - if ((event instanceof ThreadPageThreadDataEvent)) { - if (ThreadPageThreadDataEvent.TYPE_API == createChartItem(event)) { - contents.add(event); - } else { - // do nothing - } - } - contentsQueue.remove(0); - } - chart.redraw(); - } - - size = syncs.size(); - if (size > 0) { - ThreadPageSyncData sync; - for (int i = 0; i < size; i++) { - sync = syncs.get(i); - sync.checkUpdate(); - } - } - } - - protected void pushSync(ThreadPageSyncData sync) { - syncs.add(sync); - hasUpdate = true; - } - - protected ThreadPageSyncData findSyncData(String syncVal) { - int size = syncs.size(); - ThreadPageSyncData sync; - for (int i = 0; i < size; i++) { - sync = syncs.get(i); - if (sync.getName().equals(syncVal)) { - return sync; - } - } - return null; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageThreadDataEvent.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageThreadDataEvent.java deleted file mode 100644 index 923b650..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageThreadDataEvent.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.thread; - -import java.util.List; - -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeriesItem; - -public class ThreadPageThreadDataEvent extends ThreadPageDataEvent { - public static final int TYPE_API = 0; - public static final int TYPE_EVENT = 1; - public static final int TYPE_LOAD = 2; - private ThreadPageThreadData data; - private int eventType = -1; - private int threadType = -1; - private int apiType = -1; - private DACustomChartSeriesItem chartItem; - private double time = -1; // FIXME - private int tid = -1; - private String callID = null; - private int callerTid = -1; - - public ThreadPageThreadDataEvent(int eventType, int threadType, - int apiType, double time, int tid, List contents) { - super(contents); - setEventType(eventType); - setThreadType(threadType); - setApiType(apiType); - setTime(time); - setTid(tid); - } - - public int getEventType() { - return eventType; - } - - public void setEventType(int eventType) { - this.eventType = eventType; - } - - public DACustomChartSeriesItem getChartItem() { - return chartItem; - } - - public void setChartItem(DACustomChartSeriesItem chartItem) { - this.chartItem = chartItem; - } - - public double getTime() { - return time; - } - - public void setTime(double time) { - this.time = time; - } - - public ThreadPageThreadData getData() { - return data; - } - - public int getTid() { - return tid; - } - - public void setTid(int tid) { - this.tid = tid; - } - - public int getApiType() { - return apiType; - } - - public void setApiType(int apiType) { - this.apiType = apiType; - } - - public int getThreadType() { - return threadType; - } - - public void setThreadType(int threadType) { - this.threadType = threadType; - } - - public String getCallID() { - return callID; - } - - public void setCallID(String callID) { - this.callID = callID; - } - - public int getCallerTid() { - return callerTid; - } - - public void setCallerTid(int callerTid) { - this.callerTid = callerTid; - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageThreadDataManager.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageThreadDataManager.java deleted file mode 100644 index a67d1ce..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageThreadDataManager.java +++ /dev/null @@ -1,761 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * yeongtaik byeon - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.thread; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.logparser.LogPackage; -import org.tizen.dynamicanalyzer.logparser.Logs; -import org.tizen.dynamicanalyzer.nl.ThreadPageLabels; -import org.tizen.dynamicanalyzer.project.Project; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChart; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartPlot; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeries; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeriesItem; -import org.tizen.dynamicanalyzer.widgets.chartBoard.DACustomChartBoard; -import org.tizen.dynamicanalyzer.widgets.chartBoard.DACustomChartBoardItem; - -public class ThreadPageThreadDataManager { - private DACustomChartBoard board; -// ThreadChartView view; - private boolean isStart = false; - private boolean hasUpdate = false; - private List rows = new ArrayList(); - private List rowsQueue = new ArrayList(); - private List syncEventQueue = new ArrayList(); - private List eventQueue = new ArrayList(); - private List callEventQueue = new ArrayList(); - - protected ThreadPageThreadDataManager(DACustomChartBoard board) { - this.setBoard(board); - } - - private void pushRow(ThreadPageThreadData data) { - rowsQueue.add(data); - hasUpdate = true; - } - - private void pushEvent(ThreadPageThreadDataEvent event) { - eventQueue.add(event); - hasUpdate = true; - } - - private void pushCallEvent(ThreadPageThreadDataEvent event) { - callEventQueue.add(event); - } - - private void pushSyncEvent(ThreadPageSyncDataEvent syncEvent) { - syncEventQueue.add(syncEvent); - hasUpdate = true; - } - - - private void createBoardItem(ThreadPageThreadData data) { - // DACustomChartBoardItem item = new DACustomChartBoardItem(board, - // data.getName()); - - DACustomChartBoardItem item = new DACustomChartBoardItem(board, - data.getType() + ThreadPageLabels.THREAD_CHART_NAME_PREFIX - + ThreadPageLabels.THREAD_CHART_NAME_TID - + data.getName() - + ThreadPageLabels.THREAD_CHART_NAME_POSTFIX); - DACustomChart chart = item.getChart(); - setChartSeries(chart); - setChartStyle(chart); - data.setItem(item); - item.setData(data); - chart.setData(data); - chart.redraw(); - } - - private void initSyncChart(DACustomChart chart) { - if (null == chart) { - return; - } - - DACustomChartSeries stateSeries = new DACustomChartSeries( - ThreadPageLabels.THREAD_SYNC_CHART_SERIES_STATE, - DACustomChartSeries.SERIES_STYLE_STATE, ColorResources.YELLOW); - - chart.addSeries(stateSeries); - - DACustomChartPlot plot = chart.getPlot(); - if (null == plot) { - return; - } - plot.setBackgroundImage(ImageResources.BG_CHILD_GRADIENT); - plot.setAutoHeightRange(false); - plot.setAxisRangeY(0, 101); - plot.setAxisRangeX(board.getVisibleStartTime(), - board.getVisibleEndTime()); - } - - private boolean createSyncBoardItem(ThreadPageThreadData data, - ThreadPageSyncData sync) { - DACustomChartBoardItem parent = data.getItem(); - if (null == parent) { - return false; - } - // DACustomChartBoardItem item = new DACustomChartBoardItem(parent, - // sync.getName() + ThreadPageLabels.THREAD_CHART_NAME_PREFIX - // + sync.getType() - // + ThreadPageLabels.THREAD_CHART_NAME_POSTFIX); - DACustomChartBoardItem item = new DACustomChartBoardItem(parent, - sync.getType() + ThreadPageLabels.THREAD_CHART_NAME_PREFIX - + ThreadPageLabels.THREAD_CHART_NAME_OBJ - + sync.getName() - + ThreadPageLabels.THREAD_CHART_NAME_POSTFIX); - DACustomChart chart = item.getChart(); - initSyncChart(chart); - - sync.setItem(item); - item.setData(sync); - chart.setData(sync); - chart.redraw(); - return true; - } - - private void sendSelectionTimes(DACustomChart chart, double start, - double end) { - long startTime = (long) (start * TimelineConstants.MEGA); - long endTime = (long) (end * TimelineConstants.MEGA); - if (endTime < startTime) { - long temp = startTime; - startTime = endTime; - endTime = temp; - } - if (startTime < 0) { - startTime = 0; - } - AnalyzerManager.getCurrentPage().updatePage( - new DASelectionData(ThreadChartView.ID, startTime, endTime, - chart.getData(), chart)); - } - - // FIXME : chart range selection - change private - public Listener chartMouseListener = new Listener() { - - @Override - public void handleEvent(Event event) { - DACustomChart chart = (DACustomChart) event.widget; - DACustomChartPlot plot = chart.getPlot(); - - switch (event.type) { - case SWT.MouseMove: - if ((event.stateMask & SWT.BUTTON1) != 0) { - board.getIntervalMarker().setEndVal( - plot.getXFromXPixcel(event.x)); - } - break; - case SWT.MouseDown: - board.getIntervalMarker().setInterval( - plot.getXFromXPixcel(event.x), - plot.getXFromXPixcel(event.x)); - break; - case SWT.MouseUp: - double endVal = plot.getXFromXPixcel(event.x); - if (endVal <= plot.getVisibleEndX()) { - board.getIntervalMarker().setEndVal(endVal); - } else { - board.getIntervalMarker().setEndVal(plot.getVisibleEndX()); - } - sendSelectionTimes(chart, board.getIntervalMarker() - .getStartVal(), board.getIntervalMarker().getEndVal()); - break; - case SWT.MouseEnter: - break; - case SWT.MouseExit: - break; - default: - break; - } - } - }; - - protected void setChartStyle(DACustomChart chart) { - if (null == chart) { - return; - } - - DACustomChartPlot plot = chart.getPlot(); - if (null == plot) { - return; - } - plot.setBackgroundImage(ImageResources.BG_GRADIENT); - plot.setAutoHeightRange(false); - // plot.setTooltip(new DACustomChartPlotTooltip(-1)); - plot.setAxisRangeY(0, 101); - plot.setAxisRangeX(board.getVisibleStartTime(), - board.getVisibleEndTime()); - // plot.setIntervalMarker(board.getIntervalMarker()); - // chart.addListener(SWT.MouseMove, chartMouseListener); - // chart.addListener(SWT.MouseDown, chartMouseListener); - // chart.addListener(SWT.MouseUp, chartMouseListener); - // chart.addListener(SWT.MouseEnter, chartMouseListener); - // chart.addListener(SWT.MouseExit, chartMouseListener); - } - - private void setChartSeries(DACustomChart chart) { - DACustomChartSeries loadSeries = new DACustomChartSeries( - ThreadPageLabels.THREAD_CHART_SERIES_LOAD, - DACustomChartSeries.SERIES_STYLE_LOAD, - ColorResources.THREAD_GRAPH_CPU_LOAD_COLOR); - loadSeries.setBarWidth(1); - - DACustomChartSeries apiSeries = new DACustomChartSeries( - ThreadPageLabels.THREAD_CHART_SERIES_API, - DACustomChartSeries.SERIES_STYLE_EVENT, ColorResources.YELLOW); - - DACustomChartSeries eventSeries = new DACustomChartSeries( - ThreadPageLabels.THREAD_CHART_SERIES_EVENT, - DACustomChartSeries.SERIES_STYLE_ARROW, - ColorResources.THREAD_GRAPH_CALLEE_COLOR); - - chart.addSeries(loadSeries); - chart.addSeries(apiSeries); - chart.addSeries(eventSeries); - - chart.redraw(); - } - - private void createMainThreadItem() { - isStart = true; - Project project = AnalyzerManager.getProject(); - int tid = project.getPID(); - - if (0 == tid) { - isStart = false; - return; - } - - ThreadPageThreadData mainData = new ThreadPageThreadData( - ThreadPageLabels.THREAD_ITEM_TYPE_MAIN, tid); - pushRow(mainData); - } - - public List> getLogsFromLogPackage(LogPackage logPack, - int logCenterConstants) { - if (false == isStart) { - createMainThreadItem(); - } - - Logs logs = logPack.getLogs(logCenterConstants); - if (null == logs || logs.getLogs().size() == 0) { - return null; - } - List> ret = logs.getLogs(); - return ret; - } - - private void parseLoad(LogPackage logPack) { - List> inputs = getLogsFromLogPackage(logPack, - LogCenterConstants.LOG_DEVICE); - int size; - if (null == inputs || 0 == (size = inputs.size())) { - return; - } - List input; - - String loads; - int tid; - int load; - for (int i = 0; i < size; i++) { - input = inputs.get(i); - loads = input.get(LogCenterConstants.DEVICE_THREAD_LOAD_INDEX); - String[] temp = loads.split(","); - int tempSize = temp.length; - double time; - for (int j = 0; j + 1 < tempSize; j += 2) { - try { - tid = Integer.parseInt(temp[j]); - } catch (NumberFormatException nfe) { - System.out.println("error : parseLoad - tid parsing"); - break; - } - // if (null == findParentData(tid)) { - // continue; - // } - - load = (int) (Double.parseDouble(temp[j + 1]) * 2.55); - time = Double.parseDouble(input - .get(LogCenterConstants.DEVICE_TIME_INDEX)) - / TimelineConstants.MEGA; - ThreadPageThreadDataEvent event = new ThreadPageThreadDataEvent( - ThreadPageThreadDataEvent.TYPE_LOAD, load, -1, time, - tid, null); - pushEvent(event); - } - } - } - - private void parsePthread(List input) { - double time = Double.parseDouble(input - .get(LogCenterConstants.TIME_INDEX)) / TimelineConstants.MEGA; - int tid = Integer.parseInt(input - .get(LogCenterConstants.THREAD_ID_INDEX)); - int apiType = Integer.parseInt(input - .get(LogCenterConstants.THREAD_API_TYPE_INDEX)); - ThreadPageThreadDataEvent event; - switch (apiType) { - case LogCenterConstants.THREAD_API_TYPE_NEW: - case LogCenterConstants.THREAD_API_TYPE_STOP: - case LogCenterConstants.THREAD_API_TYPE_EXIT: - case LogCenterConstants.THREAD_API_TYPE_WAIT_START: - case LogCenterConstants.THREAD_API_TYPE_OTHER: - event = new ThreadPageThreadDataEvent( - ThreadPageThreadDataEvent.TYPE_API, - LogCenterConstants.THREAD_TYPE_PTHREAD, apiType, time, tid, - input); - pushEvent(event); - break; - case LogCenterConstants.THREAD_API_TYPE_START: - event = new ThreadPageThreadDataEvent( - ThreadPageThreadDataEvent.TYPE_API, - LogCenterConstants.THREAD_TYPE_PTHREAD, apiType, time, tid, - input); - event.setCallID(input - .get(LogCenterConstants.THREAD_PTHREAD_ID_INDEX)); - pushEvent(event); - pushCallEvent(event); - break; - case LogCenterConstants.THREAD_API_TYPE_WAIT_END: - event = new ThreadPageThreadDataEvent( - ThreadPageThreadDataEvent.TYPE_EVENT, - LogCenterConstants.THREAD_TYPE_PTHREAD, apiType, time, tid, - input); - pushEvent(event); - break; - case LogCenterConstants.THREAD_API_TYPE_INTERNAL_STOP: - event = new ThreadPageThreadDataEvent( - ThreadPageThreadDataEvent.TYPE_EVENT, - LogCenterConstants.THREAD_TYPE_PTHREAD, apiType, time, tid, - input); - event.setCallID(input - .get(LogCenterConstants.THREAD_PTHREAD_ID_INDEX)); - pushEvent(event); - pushCallEvent(event); - break; - case LogCenterConstants.THREAD_API_TYPE_INTERNAL_START: - ThreadPageThreadData data = new ThreadPageThreadData( - ThreadPageLabels.THREAD_ITEM_TYPE_PTHREAD, tid); - pushRow(data); - event = new ThreadPageThreadDataEvent( - ThreadPageThreadDataEvent.TYPE_EVENT, - LogCenterConstants.THREAD_TYPE_PTHREAD, apiType, time, tid, - input); - pushEvent(event); - break; - default: - System.out.println("thread page err: unknown thread api type"); - } - } - - private void parseOSP(List input) { - double time = Double.parseDouble(input - .get(LogCenterConstants.TIME_INDEX)) / TimelineConstants.MEGA; - int tid = Integer.parseInt(input - .get(LogCenterConstants.THREAD_ID_INDEX)); - int apiType = Integer.parseInt(input - .get(LogCenterConstants.THREAD_API_TYPE_INDEX)); - ThreadPageThreadDataEvent event; - switch (apiType) { - case LogCenterConstants.THREAD_API_TYPE_NEW: - case LogCenterConstants.THREAD_API_TYPE_STOP: - case LogCenterConstants.THREAD_API_TYPE_EXIT: - case LogCenterConstants.THREAD_API_TYPE_WAIT_START: - case LogCenterConstants.THREAD_API_TYPE_OTHER: - event = new ThreadPageThreadDataEvent( - ThreadPageThreadDataEvent.TYPE_API, - LogCenterConstants.THREAD_TYPE_OSP, apiType, time, tid, - input); - pushEvent(event); - break; - case LogCenterConstants.THREAD_API_TYPE_START: - event = new ThreadPageThreadDataEvent( - ThreadPageThreadDataEvent.TYPE_API, - LogCenterConstants.THREAD_TYPE_OSP, apiType, time, tid, - input); - event.setCallID(input - .get(LogCenterConstants.THREAD_OSPTHREAD_ID_INDEX)); - pushEvent(event); - pushCallEvent(event); - break; - case LogCenterConstants.THREAD_API_TYPE_WAIT_END: - if (input.get(LogCenterConstants.APINAME_INDEX).equals( - ThreadPageLabels.THREAD_API_JOIN)) { - event = new ThreadPageThreadDataEvent( - ThreadPageThreadDataEvent.TYPE_EVENT, - LogCenterConstants.THREAD_TYPE_OSP, apiType, time, tid, - input); - pushEvent(event); - } else { // FIXME : do not shows sleep's wait end - } - break; - case LogCenterConstants.THREAD_API_TYPE_INTERNAL_STOP: - event = new ThreadPageThreadDataEvent( - ThreadPageThreadDataEvent.TYPE_EVENT, - LogCenterConstants.THREAD_TYPE_OSP, apiType, time, tid, - input); - event.setCallID(input - .get(LogCenterConstants.THREAD_OSPTHREAD_ID_INDEX)); - pushEvent(event); - pushCallEvent(event); - break; - case LogCenterConstants.THREAD_API_TYPE_INTERNAL_START: - ThreadPageThreadData data = new ThreadPageThreadData( - ThreadPageLabels.THREAD_ITEM_TYPE_OSP, tid); - pushRow(data); - event = new ThreadPageThreadDataEvent( - ThreadPageThreadDataEvent.TYPE_EVENT, - LogCenterConstants.THREAD_TYPE_OSP, apiType, time, tid, - input); - pushEvent(event); - break; - default: - System.out.println("thread page err: unknown thread api type"); - } - } - - private void parseAPI(LogPackage logPack) { - List> inputs = getLogsFromLogPackage(logPack, - LogCenterConstants.LOG_THREAD); - int size; - if (null == inputs || 0 == (size = inputs.size())) { - return; - } - List input; - for (int i = 0; i < size; i++) { - input = inputs.get(i); - // System.out.println("input : " + input); - int threadType = Integer.parseInt(input - .get(LogCenterConstants.THREAD_TYPE_INDEX)); - - switch (threadType) { - case LogCenterConstants.THREAD_TYPE_PTHREAD: - parsePthread(input); - break; - case LogCenterConstants.THREAD_TYPE_OSP: - parseOSP(input); - break; - default: - System.out.println("thread page err: unknown thread type"); - } - } - } - - private void parseSync(LogPackage logPack) { - List> inputs = getLogsFromLogPackage(logPack, - LogCenterConstants.LOG_SYNC); - int size; - if (null == inputs || 0 == (size = inputs.size())) { - return; - } - List input; - for (int i = 0; i < size; i++) { - input = inputs.get(i); - // System.out.println("input : " + input); - double time = Double.parseDouble(input - .get(LogCenterConstants.TIME_INDEX)) - / TimelineConstants.MEGA; - int tid = Integer.parseInt(input - .get(LogCenterConstants.THREAD_ID_INDEX)); - - // FIXME - int type = Integer.parseInt(input - .get(LogCenterConstants.SYNC_TYPE_INDEX)); - int apiType = Integer.parseInt(input - .get(LogCenterConstants.SYNC_API_TYPE_INDEX)); - - String name = input.get(LogCenterConstants.SYNC_VAL_INDEX); - ThreadPageSyncDataEvent event; - switch (type) { - case LogCenterConstants.SYNC_TYPE_OSP_MUTEX: - case LogCenterConstants.SYNC_TYPE_OSP_MONITOR: - case LogCenterConstants.SYNC_TYPE_OSP_SEMAPHORE: - event = new ThreadPageSyncDataEvent(name, type, apiType, time, - tid, input); - pushSyncEvent(event); - // parseOSPSync(input, type); - break; - case LogCenterConstants.SYNC_TYPE_PTHREAD_MUTEX: - case LogCenterConstants.SYNC_TYPE_PTHREAD_COND_VARIABLE: - event = new ThreadPageSyncDataEvent(name, type, apiType, time, - tid, input); - pushSyncEvent(event); - break; - case LogCenterConstants.SYNC_TYPE_PTHREAD_RWLOCK: - case LogCenterConstants.SYNC_TYPE_PTHREAD_SPINLOCK: - case LogCenterConstants.SYNC_TYPE_PTHREAD_BARRIER: - event = new ThreadPageSyncDataEvent(name, type, apiType, time, - tid, input); - pushSyncEvent(event); - System.out.println("error : sync parse - type = " + type); - break; - default: - System.out.println("error : sync parse unknown - type = " - + type); - } - } - } - - public void parsePageData(LogPackage logPack) { - parseLoad(logPack); - parseAPI(logPack); - parseSync(logPack); - hasUpdate = true; - } - - protected DACustomChartBoard getBoard() { - return board; - } - - private void setBoard(DACustomChartBoard board) { - this.board = board; - } - - private boolean checkPairEvent(ThreadPageThreadDataEvent event) { - if (event.getEventType() != ThreadPageThreadDataEvent.TYPE_EVENT) { - return true; - } - int apiType = event.getApiType(); - int threadType = event.getThreadType(); - if (LogCenterConstants.THREAD_API_TYPE_INTERNAL_START == apiType) { - int callEventQueueSize = callEventQueue.size(); - ThreadPageThreadDataEvent callEvent; - for (int i = 0; i < callEventQueueSize; i++) { - callEvent = callEventQueue.get(i); - if (callEvent.getApiType() != LogCenterConstants.THREAD_API_TYPE_START) { - continue; - } else if (callEvent.getThreadType() != threadType) { - continue; - } else { - if (threadType == LogCenterConstants.THREAD_TYPE_OSP) { - String callerOspID = callEvent.getCallID(); - String eventOspID = event.getContents().get( - LogCenterConstants.THREAD_OSPTHREAD_ID_INDEX); - if (eventOspID.equals(callerOspID)) { - event.setCallerTid(callEvent.getTid()); - callEventQueue.remove(i); - return true; - } - } else { - String callerPthreadID = callEvent.getCallID(); - String eventPthreadID = event.getContents().get( - LogCenterConstants.THREAD_PTHREAD_ID_INDEX); - if (eventPthreadID.equals(callerPthreadID)) { - event.setCallerTid(callEvent.getTid()); - callEventQueue.remove(i); - return true; - } - } - } - } - return false; - } else if (LogCenterConstants.THREAD_API_TYPE_WAIT_END == apiType) { - if (!event.getContents().get(LogCenterConstants.APINAME_INDEX) - .equals(ThreadPageLabels.THREAD_API_JOIN)) { - return true; - } - - int callEventQueueSize = callEventQueue.size(); - ThreadPageThreadDataEvent callEvent; - for (int i = 0; i < callEventQueueSize; i++) { - callEvent = callEventQueue.get(i); - if (callEvent.getApiType() != LogCenterConstants.THREAD_API_TYPE_INTERNAL_STOP) { - continue; - } else if (callEvent.getThreadType() != threadType) { - continue; - } else { - if (threadType == LogCenterConstants.THREAD_TYPE_OSP) { - String callerOspID = callEvent.getCallID(); - String eventOspID = event.getContents().get( - LogCenterConstants.THREAD_OSPTHREAD_ID_INDEX); - if (eventOspID.equals(callerOspID)) { - event.setCallerTid(callEvent.getTid()); - if (null == callEvent.getChartItem()) { - callEvent.setCallerTid(event.getTid()); - } else { - callEvent - .getChartItem() - .setY(DACustomChartSeriesItem.SERIES_ARROW_RIGHT); - callEvent.getChartItem().setBarWidth( - event.getTid()); - } - callEventQueue.remove(i); - return true; - } - } else { - String callerPthreadID = callEvent.getCallID(); - String eventPthreadID = event.getContents().get( - LogCenterConstants.THREAD_PTHREAD_ID_INDEX); - if (eventPthreadID.equals(callerPthreadID)) { - event.setCallerTid(callEvent.getTid()); - if (null == callEvent.getChartItem()) { - callEvent.setCallerTid(event.getTid()); - } else { - callEvent - .getChartItem() - .setY(DACustomChartSeriesItem.SERIES_ARROW_RIGHT); - callEvent.getChartItem().setBarWidth( - event.getTid()); - } - callEventQueue.remove(i); - return true; - } - } - } - } - return false; - } else { - return true; - } - } - - private ThreadPageThreadData findParentData(int tid) { - int size = rows.size(); - ThreadPageThreadData ret; - for (int i = 0; i < size; i++) { - ret = rows.get(i); - if (ret.getTid() == tid) { - return ret; - } - } - return null; - } - - private String getSyncTypeString(int syncType) { - switch (syncType) { - case LogCenterConstants.SYNC_TYPE_OSP_MUTEX: - return ThreadPageLabels.SYNC_TYPE_OSP_MUTEX; - case LogCenterConstants.SYNC_TYPE_OSP_MONITOR: - return ThreadPageLabels.SYNC_TYPE_OSP_MONITOR; - case LogCenterConstants.SYNC_TYPE_OSP_SEMAPHORE: - return ThreadPageLabels.SYNC_TYPE_OSP_SEMAPHORE; - case LogCenterConstants.SYNC_TYPE_PTHREAD_MUTEX: - return ThreadPageLabels.SYNC_TYPE_PTHREAD_MUTEX; - case LogCenterConstants.SYNC_TYPE_PTHREAD_COND_VARIABLE: - return ThreadPageLabels.SYNC_TYPE_PTHREAD_COND_VARIABLE; - case LogCenterConstants.SYNC_TYPE_PTHREAD_RWLOCK: - return ThreadPageLabels.SYNC_TYPE_PTHREAD_RWLOCK; - case LogCenterConstants.SYNC_TYPE_PTHREAD_SPINLOCK: - return ThreadPageLabels.SYNC_TYPE_PTHREAD_SPINLOCK; - case LogCenterConstants.SYNC_TYPE_PTHREAD_BARRIER: - return ThreadPageLabels.SYNC_TYPE_PTHREAD_BARRIER; - default: - return AnalyzerConstants.EMPTY; - } - } - - protected void checkUpdate() { - if (false == hasUpdate) { - return; - } else { - hasUpdate = false; - } - int size = rowsQueue.size(); - if (size > 0) { - ThreadPageThreadData data; - for (int i = 0; i < size; i++) { - data = rowsQueue.get(0); - createBoardItem(data); - rows.add(data); - rowsQueue.remove(0); - } - } - size = eventQueue.size(); - if (size > 0) { - ThreadPageThreadData data; - ThreadPageThreadDataEvent event; - int remainCalleeEventCount = 0; - for (int i = 0; i < size; i++) { - event = eventQueue.get(remainCalleeEventCount); - if (false == checkPairEvent(event)) { - remainCalleeEventCount++; - } else { - data = findParentData(event.getTid()); - if (null != data) { - data.pushEvent(event); - } - eventQueue.remove(remainCalleeEventCount); - } - } - } - - size = syncEventQueue.size(); - if (size > 0) { - ThreadPageThreadData data; - ThreadPageSyncDataEvent event; - ThreadPageSyncData sync; - for (int i = 0; i < size; i++) { - event = syncEventQueue.get(0); - data = findParentData(event.getTid()); - if (null != data) { - sync = data.findSyncData(event.getSyncVal()); - if (null == sync) { - sync = new ThreadPageSyncData( - getSyncTypeString(event.getType()), - event.getSyncVal(), event.getTid()); - createSyncBoardItem(data, sync); - data.pushSync(sync); - } - sync.pushEvent(event); - data.setHasUpdate(); - } - syncEventQueue.remove(0); - } - } - - size = rows.size(); - if (size > 0) { - ThreadPageThreadData data; - for (int i = 0; i < size; i++) { - data = rows.get(i); - data.checkUpdate(); - } - } - } - - public void clear() { - isStart = false; - rows.clear(); // FIXME : clear chart - rowsQueue.clear(); - eventQueue.clear(); - callEventQueue.clear(); - isStart = false; - hasUpdate = false; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/DATimelineTabComposite.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/DATimelineTabComposite.java deleted file mode 100644 index 6ef6446..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/DATimelineTabComposite.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.timeline; - -import java.util.List; - -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.logparser.LogPackage; -import org.tizen.dynamicanalyzer.logparser.Logs; -import org.tizen.dynamicanalyzer.nl.ConfigureLabels; -import org.tizen.dynamicanalyzer.ui.info.range.RangeView; -import org.tizen.dynamicanalyzer.ui.info.snapshot.SnapshotView; -import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineView; -import org.tizen.dynamicanalyzer.ui.toolbar.ConfigureManager; -import org.tizen.dynamicanalyzer.ui.widgets.DATabComposite; - -public class DATimelineTabComposite extends DATabComposite { - public static final String ID = DATimelineTabComposite.class.getName(); - - public DATimelineTabComposite(Composite parent, int style) { - super(parent, style); - } - - public void updateLog(LogPackage logPack) { - Logs logs = logPack.getLogs(LogCenterConstants.LOG_DEVICE); - if (null == logs || logs.getLogs().size() == 0) { - return; - } - List> inputs = logs.getLogs(); - int lastIndex = inputs.size() - 1; - List input = inputs.get(lastIndex); - - RangeView rangeView = (RangeView) getTab(RangeView.ID); - rangeView.setTimeLast(Long.valueOf(input - .get(LogCenterConstants.DEVICE_TIME_INDEX))); - super.updateLog(logPack); - } - - public void updateView(DASelectionData data) { - if (data.getViewId().equals(SnapshotView.ID)) { - return; - } - RangeView rangeView = (RangeView) getTab(RangeView.ID); - SnapshotView snapshotView = (SnapshotView) getTab(SnapshotView.ID); - - if (ConfigureManager.getInstance() - .getValue(ConfigureLabels.RANGEAUTOSELECT) - .equals(ConfigureLabels.ON)) { - if (TimelineView.ID == data.getViewId()) { - if (data.getEndTime() - data.getStartTime() >= 1000000) { - setSelectTab(RangeView.ID); - } - } - } - rangeView.setTimeStartEnd(data.getStartTime(), data.getEndTime()); - snapshotView.setStartTime(data.getStartTime()); - super.updateView(data); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/TimelinePage.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/TimelinePage.java deleted file mode 100644 index dd235b0..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/TimelinePage.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.timeline; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.SashForm; -import org.eclipse.swt.events.ControlEvent; -import org.eclipse.swt.events.ControlListener; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.common.DesignConstants; -import org.tizen.dynamicanalyzer.nl.AnalyzerLabels; -import org.tizen.dynamicanalyzer.ui.info.callstack.CallstackView; -import org.tizen.dynamicanalyzer.ui.info.snapshot.SnapshotView; -import org.tizen.dynamicanalyzer.ui.page.DAPageComposite; -import org.tizen.dynamicanalyzer.ui.timeline.calltrace.CallTraceView; -import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineView; -import org.tizen.dynamicanalyzer.ui.widgets.DATabComposite; - -public class TimelinePage extends DAPageComposite { - public static final String ID = TimelinePage.class.getName(); - - public final static int TIMELINE_INDEX = 0; - public final static int INFO_INDEX = 1; - public final static int APILIST_INDEX = 2; - - // 10 : offset - private final double DEFAULT_WIDTH = DesignConstants.SNAPSHOT_VIEW_WIDTH + 10; - private final double DEFAULT_HEIGHT = DesignConstants.SNAPSHOT_VIEW_HEIGHT - + 10 + DesignConstants.VIEW_TITLEBAR_HEIGHT; - - SashForm leftForm; - SashForm rightForm; - - public TimelinePage(Composite parent, int style) { - super(parent, style); - name = AnalyzerLabels.COOLBAR_AREA_TIMELINE; - this.setLayout(new FillLayout()); - - leftForm = new SashForm(this, SWT.HORIZONTAL); - // index 0 : TIMELINE_INDEX - TimelineView timelineComp = new TimelineView(leftForm, SWT.NONE); - addView(timelineComp); - - rightForm = new SashForm(leftForm, SWT.VERTICAL); - - // index 1 : INFO_INDEX - DATabComposite tabView = new DATabComposite(rightForm, SWT.NONE); - addView(tabView); - { - SnapshotView snapshotView = new SnapshotView( - tabView.getContentComposite(), SWT.NONE, false); - snapshotView.setObservingViews(new String[] { CallTraceView.ID }); - tabView.addView(snapshotView); - - CallstackView callstack = new CallstackView( - tabView.getContentComposite(), SWT.NONE); - callstack.setObservingViews(new String[] { CallTraceView.ID }); - tabView.addView(callstack); - -// RangeView rangeView = new RangeView(tabView.getContentComposite(), -// SWT.NONE); -// tabView.addView(rangeView); - } - - // index 2 : APILIST_INDEX - CallTraceView apiListView = new CallTraceView(rightForm, SWT.NONE); - addView(apiListView); - - leftForm.setWeights(new int[] { 75, 25 }); - rightForm.setWeights(new int[] { 50, 50 }); - this.addControlListener(new ControlListener() { - - @Override - public void controlResized(ControlEvent e) { - // TODO Auto-generated method stub - Composite composite = (Composite) e.widget; - Rectangle rect = composite.getBounds(); - int pageWidth = rect.width; - int pageHeight = rect.height; - - int wRate = (int) (DEFAULT_WIDTH * 100 / pageWidth); - int hRate = (int) (DEFAULT_HEIGHT * 100 / pageHeight); - wRate = (wRate >= 100) ? 100 : wRate; - hRate = (hRate >= 100) ? 100 : hRate; - leftForm.setWeights(new int[] { 100 - wRate, wRate }); - rightForm.setWeights(new int[] { hRate, 100 - hRate }); - } - - @Override - public void controlMoved(ControlEvent e) { - } - }); - } - - public void changeLayout() { - - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/calltrace/CallTraceTable.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/calltrace/CallTraceTable.java deleted file mode 100644 index 0fca686..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/calltrace/CallTraceTable.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.timeline.calltrace; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.nebula.widgets.grid.Grid; -import org.eclipse.nebula.widgets.grid.GridItem; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.model.TableInput; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; -import org.tizen.dynamicanalyzer.utils.Formatter; - -public class CallTraceTable extends DATableComposite { - - public CallTraceTable(Composite parent, int compStyle, int tableStyle) { - super(parent, compStyle, tableStyle); - - table.addSelectionListener(new SelectionListener() { - - @Override - public void widgetSelected(SelectionEvent e) { - GridItem[] ti = ((Grid) e.widget).getSelection(); - if (null == ti || ti.length == 0) { - return; - } - int size = ti.length; - List startData = ((DATableDataFormat) ti[0].getData()) - .getData(); - List endData = ((DATableDataFormat) ti[size - 1] - .getData()).getData(); - long startTime = Long.parseLong(startData - .get(LogCenterConstants.TIME_INDEX)); - long endTime = Long.parseLong(endData - .get(LogCenterConstants.TIME_INDEX)); - - DASelectionData data = new DASelectionData(CallTraceView.ID, - startTime, endTime, ti, table); - AnalyzerManager.getCurrentPage().updatePage(data); - } - - @Override - public void widgetDefaultSelected(SelectionEvent e) { - } - }); - - } - - protected List makeTableInput() { - List> userLog = UserFunctionManager.getInstance().getLog(); - List input = new ArrayList(); - int size = userLog.size(); - for (int i = 0; i < size; i++) { - // create text - List text = new ArrayList(); - String time = Formatter.toTimeFormat(userLog.get(i).get( - LogCenterConstants.TIME_INDEX)); - text.add(time); - text.add(new String(userLog.get(i).get( - LogCenterConstants.APINAME_INDEX))); - - // create images - - // create DATableDataFormat - DATableDataFormat tableData = new DATableDataFormat(userLog.get(i) - .get(LogCenterConstants.SEQUENCE_NUMBER_INDEX)); - tableData.getData().addAll(userLog.get(i)); - - TableInput tableInput = new TableInput(); - tableInput.setText(text); - tableInput.setData(tableData); - input.add(tableInput); - } - return input; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/calltrace/CallTraceView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/calltrace/CallTraceView.java deleted file mode 100644 index 55fedc8..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/calltrace/CallTraceView.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.timeline.calltrace; - -import java.util.HashMap; -import java.util.List; - -import org.eclipse.nebula.widgets.grid.Grid; -import org.eclipse.nebula.widgets.grid.GridItem; -import org.eclipse.swt.SWT; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.logparser.LogPackage; -import org.tizen.dynamicanalyzer.logparser.Logs; -import org.tizen.dynamicanalyzer.model.DAView; -import org.tizen.dynamicanalyzer.nl.TimelinePageLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.sql.SqlManager; -import org.tizen.dynamicanalyzer.ui.info.callstack.CallstackView; -import org.tizen.dynamicanalyzer.ui.timeline.TimelinePage; -import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineView; -import org.tizen.dynamicanalyzer.ui.widgets.DATabComposite; -import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite; -import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; -import org.tizen.dynamicanalyzer.ui.widgets.table.TableComparator; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; - -public class CallTraceView extends DAView { - public static final String ID = CallTraceView.class.getName(); - private DATableComposite tableComp; - - private String[] columnNames = { TimelinePageLabels.CALL_TRACE_VIEW_TIME, - TimelinePageLabels.CALL_TRACE_VIEW_NAME }; - private int[] columnSizes = { 60, 150 }; - private boolean[] columnVisibility = { true, true }; - int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NUM, - AnalyzerConstants.SORT_TYPE_STRING }; - int[] sourceColumns = { LogCenterConstants.TIME_INDEX, - LogCenterConstants.APINAME_INDEX }; - int[] innerMaxWeight = { 0, 100 }; - int[] outerMaxWeight = { 0, 100 }; - - public CallTraceView(Composite parent, int style) { - super(parent, style); - this.setLayout(new FillLayout()); - - ViewContainer viewContainer = new ViewContainer(this, true); - viewContainer.setTitleText(TimelinePageLabels.CALL_TRACE_VIEW_TITLE); - - Composite contents = viewContainer.getContentArea(); - contents.setBackground(ColorResources.WINDOW_BG_COLOR); - contents.setLayout(new FillLayout()); - tableComp = new CallTraceTable(contents, SWT.NONE, SWT.MULTI - | SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL); - tableComp.setTableName("Calltrace"); // test - tableComp.setComparator(new TableComparator()); - tableComp.setSortTypes(sortTypes); - tableComp.setSourceColumns(sourceColumns); - tableComp.setColumns(columnNames); - tableComp.setColumnSize(columnSizes); - tableComp.setColumnVisibility(columnVisibility); - - setMaxWeight(innerMaxWeight, outerMaxWeight); - } - - @Override - public void updateView(DASelectionData selData) { - long start = selData.getStartTime(); - long end = selData.getEndTime(); - - String query = "select count(time) from user_function where time < " //$NON-NLS-1$ - + start - + " and type = " + LogCenterConstants.USER_FUNCTION_EVENT_TYPE_ENTER + ";"; //$NON-NLS-1$ //$NON-NLS-2$ - int selectionIndex = SqlManager.executeSelectOperation(query); - - String countQuery = "select count(time) from user_function where time >" //$NON-NLS-1$ - + start - + " and time <= " + end + " and type = " + LogCenterConstants.USER_FUNCTION_EVENT_TYPE_ENTER + ";"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - int selectionCount = SqlManager.executeSelectOperation(countQuery); - - selectionIndex = ((selectionIndex < 0) && (selectionCount > 0)) ? 0 - : selectionIndex; - tableComp.getTable().getVerticalBar().setSelection(selectionIndex); - updateView(); - - Grid table = tableComp.getTable(); - if (selectionIndex >= 0) { - if (selectionCount > 0) { - int selections[] = new int[selectionCount]; - for (int i = 0; i < selectionCount; i++) { - selections[i] = selectionIndex + i; - } - table.setSelection(selections); - } else { - int selections[] = new int[0]; - table.setSelection(selections); - table.setSelection(selectionIndex); - } - } - - GridItem[] selections = table.getSelection(); - HashMap sel = tableComp.getSelections(); - sel.clear(); - int size = selections.length; - for (int i = 0; i < size; i++) { - String seq = ((DATableDataFormat) selections[i].getData()) - .getSelectionKey(); - if (null != seq && !seq.isEmpty()) { - sel.put(seq, seq); - } - } - - /* only callstack update */ - // timeline view and tabcomp top view : callstack - if (selData.getViewId().equals(TimelineView.ID)) { - DATabComposite tabView = (DATabComposite) AnalyzerUtil.getView( - TimelinePage.ID, DATabComposite.ID); - Composite comp = tabView.getTopComposite(); - if (comp instanceof CallstackView) { - ((CallstackView) comp).updateView(); - } - } - } - - @Override - public void updateView() { - tableComp.updateTable(); - } - - @Override - public void clear() { - tableComp.getTable().removeAll(); - } - - @Override - public Control getControl() { - return tableComp; - } - - @Override - public void updateLog(LogPackage logPack) { - Logs logs = logPack.getLogs(LogCenterConstants.LOG_USER_FUNCTION); - if (null == logs || logs.getLogs().size() == 0) { - return; - } - List> inputs = logs.getLogs(); - - List> userLog = UserFunctionManager.getInstance().getLog(); - - int size = inputs.size(); - for (int i = 0; i < size; i++) { - List input = inputs.get(i); - int type = Integer.parseInt(input - .get(LogCenterConstants.USER_FUNCTION_TYPE_INDEX)); - if (type == LogCenterConstants.USER_FUNCTION_EVENT_TYPE_ENTER) { - userLog.add(input); - } - } - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/calltrace/UserFunctionManager.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/calltrace/UserFunctionManager.java deleted file mode 100644 index 4fbaafa..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/calltrace/UserFunctionManager.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * WooJin Jung - * Jooyoul Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.timeline.calltrace; - -import java.util.ArrayList; -import java.util.List; - -public class UserFunctionManager { - private List> log = null; - private static UserFunctionManager instance = null; - - public static UserFunctionManager getInstance() { - if (null == instance) { - instance = new UserFunctionManager(); - } - return instance; - } - - public void clear() { - instance = null; - } - - public UserFunctionManager() { - log = new ArrayList>(); - } - - public List> getLog() { - if (null == log) { - log = new ArrayList>(); - } - return log; - } - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/CPUChart.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/CPUChart.java deleted file mode 100644 index 61d749a..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/CPUChart.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Sanghyun Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.timeline.chart; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.logparser.LogPackage; -import org.tizen.dynamicanalyzer.logparser.Logs; -import org.tizen.dynamicanalyzer.nl.TimelineChartLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants; -import org.tizen.dynamicanalyzer.utils.Formatter; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChart; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeries; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeriesItem; - -public class CPUChart extends TimelineChart { - private static CPUChart instance = null; - - private DACustomChartSeries appLoadSeries; - private DACustomChartSeries totalLoadSeries; - - public static CPUChart getInstance() { - if (instance == null) { - instance = new CPUChart(); - } - - return instance; - } - - private CPUChart() { - chartType = TimelineConstants.CHART_TYPE_CPU; - probeType = LogCenterConstants.LOG_DEVICE; - chartName = TimelineChartLabels.CPU_CHART_TITLE; - chartIcon = ImageResources.CHART_CPU; - addIcon = ImageResources.ADD_CHART_CPU; - - appLoadSeries = new DACustomChartSeries(TimelineChartLabels.CPU_CHART_SERIES_NAME_APP_LOAD, DACustomChartSeries.SERIES_STYLE_AREA, - ColorResources.SERIESE_COLOR_CPU_SYSTEM); - totalLoadSeries = new DACustomChartSeries(TimelineChartLabels.CPU_CHART_SERIES_NAME_TOTAL_LOAD, DACustomChartSeries.SERIES_STYLE_AREA, - ColorResources.SERIESE_COLOR_CPU_APP); - } - - @Override - public DACustomChart createDAChart(Composite parent) { - chart = new DACustomChart(parent, chartName); - - chart.addSeries(totalLoadSeries); - chart.addSeries(appLoadSeries); - - setChartStyle(); - chart.getPlot().setAutoHeightRange(false); - chart.getPlot().setAxisRangeY(0, 101); - - return chart; - } - - @Override - public void clear() { - appLoadSeries.clear(); - totalLoadSeries.clear(); - } - - @Override - public void parsingLogPackage(LogPackage logPack) { - if (!isAbleToParse(logPack, probeType)) { - return; - } - - Logs logs = logPack.getLogs(probeType); - List> logList = logs.getLogs(); - for (int i = 0; i < logList.size(); i++) { - parsingLog(logList.get(i)); - } - } - - private void parsingLog(List log) { - if (null == log || 0 > log.size()) { - return; - } - - /* app load */ - if (!log.get(LogCenterConstants.DEVICE_APP_CPU_USAGE_INDEX).isEmpty()) { - double time = 0; - double appCpuRate = 0; - - try { - time = Double.parseDouble(log.get(LogCenterConstants.DEVICE_TIME_INDEX)) / TimelineConstants.MEGA; - appCpuRate = Double.parseDouble(log.get(LogCenterConstants.DEVICE_APP_CPU_USAGE_INDEX)); - } catch (NumberFormatException ne) { - ne.printStackTrace(); - } catch (NullPointerException ne) { - ne.printStackTrace(); - } catch (Exception e) { - e.printStackTrace(); - } - - appLoadSeries.addSeriesItem(new DACustomChartSeriesItem(time, appCpuRate, Formatter.toPercentageFormat(appCpuRate))); - } - - /* total load */ - if (!log.get(LogCenterConstants.DEVICE_SYSTEM_CPU_USAGE_INDEX).isEmpty()) { - double time = 0; - double systemAvgLoad = 0; - - try { - time = Double.parseDouble(log.get(LogCenterConstants.DEVICE_TIME_INDEX)) / TimelineConstants.MEGA; - String[] cpuRates = log.get(LogCenterConstants.DEVICE_SYSTEM_CPU_USAGE_INDEX).split(","); //$NON-NLS-1$ - systemAvgLoad = Double.parseDouble(cpuRates[cpuRates.length - 1]); - } catch (NumberFormatException ne) { - ne.printStackTrace(); - } catch (NullPointerException ne) { - ne.printStackTrace(); - } catch (Exception e) { - e.printStackTrace(); - } - - totalLoadSeries.addSeriesItem(new DACustomChartSeriesItem(time, systemAvgLoad, Formatter.toPercentageFormat(systemAvgLoad))); - FileChart.getInstance().updateRW(time); - } - } - - @Override - public List getBaseDASeriesList() { - ArrayList seriesList = new ArrayList(); - seriesList.add(appLoadSeries); - seriesList.add(totalLoadSeries); - - return seriesList; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/CPUCoreChart.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/CPUCoreChart.java deleted file mode 100644 index fd9d2b3..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/CPUCoreChart.java +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Sanghyun Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.timeline.chart; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.logparser.LogPackage; -import org.tizen.dynamicanalyzer.logparser.Logs; -import org.tizen.dynamicanalyzer.nl.TimelineChartLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants; -import org.tizen.dynamicanalyzer.utils.Formatter; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChart; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeries; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeriesItem; - -public class CPUCoreChart extends TimelineChart { - private static CPUCoreChart instance = null; - private static int DEFAULT_CORE_SIZE = 4; - private int coreSize = TimelineConstants.NOT_INITED; - - private List coreChartSeriesList = new ArrayList(); - - public static CPUCoreChart getInstance() { - if (null == instance) { - instance = new CPUCoreChart(); - } - return instance; - } - - public CPUCoreChart() { - chartType = TimelineConstants.CHART_TYPE_CPU_CORE; - probeType = LogCenterConstants.LOG_DEVICE; - chartName = TimelineChartLabels.CPU_CORE_CHART_TITLE; - chartIcon = ImageResources.CHART_CPU_CORE; - addIcon = ImageResources.ADD_CHART_CPU_CORE; - - /*core 0*/ - coreChartSeriesList.add(new DACustomChartSeries( - TimelineChartLabels.CPU_CORE_CHART_SERIES_NAME_CORE0, - DACustomChartSeries.SERIES_STYLE_LINE, - ColorResources.SERIESE_COLOR_CPUCORE_CORE0)); - /* core 1 */ - coreChartSeriesList.add(new DACustomChartSeries( - TimelineChartLabels.CPU_CORE_CHART_SERIES_NAME_CORE1, - DACustomChartSeries.SERIES_STYLE_LINE, - ColorResources.SERIESE_COLOR_CPUCORE_CORE1)); - /* core 2 */ - coreChartSeriesList.add(new DACustomChartSeries( - TimelineChartLabels.CPU_CORE_CHART_SERIES_NAME_CORE2, - DACustomChartSeries.SERIES_STYLE_LINE, - ColorResources.SERIESE_COLOR_CPUCORE_CORE2)); - /* core 3 */ - coreChartSeriesList.add(new DACustomChartSeries( - TimelineChartLabels.CPU_CORE_CHART_SERIES_NAME_CORE3, - DACustomChartSeries.SERIES_STYLE_LINE, - ColorResources.SERIESE_COLOR_CPUCORE_CORE3)); - } - - @Override - public DACustomChart createDAChart(Composite parent) { - chart = new DACustomChart(parent, chartName); - - if (null == coreChartSeriesList - || coreChartSeriesList.size() != DEFAULT_CORE_SIZE) { - return null; - } - - for (int i = 0; i < DEFAULT_CORE_SIZE; i++) { - chart.addSeries(coreChartSeriesList.get(i)); - } - - setChartStyle(); - chart.getPlot().setAutoHeightRange(false); - chart.getPlot().setAxisRangeY(0, 101); - - return chart; - } - - @Override - public void clear() { - if (null == coreChartSeriesList) { - return; - } - - for (int i = 0; i < coreChartSeriesList.size(); i++) { - coreChartSeriesList.get(i).clear(); - } - } - - private void parsingLog(List log) { - if (null == log || 0 > log.size()) { - return; - } - - if (!log.get(LogCenterConstants.DEVICE_SYSTEM_CPU_USAGE_INDEX) - .isEmpty()) { - double time = 0; - - try { - time = Double.parseDouble(log.get(LogCenterConstants.DEVICE_TIME_INDEX)) - / TimelineConstants.MEGA; - String[] cpuRates = log.get( - LogCenterConstants.DEVICE_SYSTEM_CPU_USAGE_INDEX) - .split(","); //$NON-NLS-1$ - double value = 0; - if (coreSize == TimelineConstants.NOT_INITED) { - coreSize = cpuRates.length - 1; - } - - for (int i = 0; i < coreSize; i++) { - value = Double.parseDouble(cpuRates[i]); - coreChartSeriesList.get(i).addSeriesItem( - new DACustomChartSeriesItem(time, value, Formatter.toPercentageFormat(value))); - } - } catch (NumberFormatException ne) { - ne.printStackTrace(); - } catch (NullPointerException ne) { - ne.printStackTrace(); - } catch (Exception e) { - e.printStackTrace(); - } - } - } - - @Override - public void parsingLogPackage(LogPackage logPack) { - if (!isAbleToParse(logPack, probeType)) { - return; - } - - Logs logs = logPack.getLogs(probeType); - List> logList = logs.getLogs(); - - for(List log : logList) { - parsingLog(log); - } - } - - public int getCoreSize() { - return coreSize; - } - - @Override - public List getBaseDASeriesList() { - return coreChartSeriesList; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/CPUFrequencyChart.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/CPUFrequencyChart.java deleted file mode 100644 index da6ae92..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/CPUFrequencyChart.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Sanghyun Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.timeline.chart; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.logparser.LogPackage; -import org.tizen.dynamicanalyzer.logparser.Logs; -import org.tizen.dynamicanalyzer.nl.TimelineChartLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants; -import org.tizen.dynamicanalyzer.utils.Formatter; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChart; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeries; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeriesItem; - -public class CPUFrequencyChart extends TimelineChart { - private static CPUFrequencyChart instance = null; - private DACustomChartSeries frequencySeries; - - public static CPUFrequencyChart getInstance() { - if (instance == null) { - instance = new CPUFrequencyChart(); - } - - return instance; - } - - private CPUFrequencyChart() { - chartType = TimelineConstants.CHART_TYPE_CPU_FREQUENCY; - probeType = LogCenterConstants.LOG_DEVICE; - chartName = TimelineChartLabels.CPU_FREQUENCY_CHART_TITLE; - chartIcon = ImageResources.CHART_CPU_FREQUENCY; - addIcon = ImageResources.ADD_CHART_CPU_FREQUENCY; - - frequencySeries = new DACustomChartSeries( - TimelineChartLabels.CPU_FREQUENCY_CHART_FREQUENCY, - DACustomChartSeries.SERIES_STYLE_LINE, - ColorResources.SERIESE_COLOR_CPU_FREQ); - } - - @Override - public DACustomChart createDAChart(Composite parent) { - chart = new DACustomChart(parent, chartName); - - chart.addSeries(frequencySeries); - - setChartStyle(); - - return chart; - } - - @Override - public void clear() { - frequencySeries.clear(); - } - - @Override - public void parsingLogPackage(LogPackage logPack) { - if (!isAbleToParse(logPack, probeType)) { - return; - } - - Logs logs = logPack.getLogs(probeType); - List> logList = logs.getLogs(); - - for(List log : logList) { - parsingLog(log); - } - } - - private void parsingLog(List log) { - if (null == log || 0 > log.size()) { - return; - } - - if (!log.get(LogCenterConstants.DEVICE_CPU_FREQUENCY_INDEX).isEmpty()) { - double time = 0; - double freq0 = 0; - - try { - time = Double.parseDouble(log - .get(LogCenterConstants.DEVICE_TIME_INDEX)) - / TimelineConstants.MEGA; - String[] cpuFreqs = log.get( - LogCenterConstants.DEVICE_CPU_FREQUENCY_INDEX).split( - ","); //$NON-NLS-1$ - - freq0 = Double.parseDouble(cpuFreqs[0])*(double)1000; - } catch (NumberFormatException ne) { - ne.printStackTrace(); - } catch (NullPointerException ne) { - ne.printStackTrace(); - } catch (Exception e) { - e.printStackTrace(); - } - - frequencySeries - .addSeriesItem(new DACustomChartSeriesItem(time, freq0, - Formatter.toHzFormat(freq0))); - - } - } - - @Override - public List getBaseDASeriesList() { - ArrayList seriesList = new ArrayList(); - seriesList.add(frequencySeries); - - return seriesList; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/FileChart.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/FileChart.java deleted file mode 100644 index 8ae6145..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/FileChart.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Sanghyun Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.timeline.chart; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.logparser.LogPackage; -import org.tizen.dynamicanalyzer.logparser.Logs; -import org.tizen.dynamicanalyzer.nl.TimelineChartLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants; -import org.tizen.dynamicanalyzer.utils.Formatter; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChart; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeries; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeriesItem; - -public class FileChart extends TimelineChart { - private final int FD_API_TYPE_READ = 2; - private final int FD_API_TYPE_WRITE = 3; - - private static FileChart instance = null; - - private final int MIN_FDCOUNT = 5; - private final int MIN_READ_WRITE_BYTE = 5; - private long readByte = 0; - private long writeByte = 0; - private long maxFDCount = MIN_FDCOUNT; - private long maxReadWrite = MIN_READ_WRITE_BYTE; - private int fdCount = 0; - - private DACustomChartSeries readSeries; - private DACustomChartSeries writeSeries; - private DACustomChartSeries fdCountSeries; - - public static FileChart getInstance() { - if (instance == null) { - instance = new FileChart(); - } - - return instance; - } - - private FileChart() { - chartType = TimelineConstants.CHART_TYPE_FILE; - probeType = LogCenterConstants.LOG_RESOURCE; - chartName = TimelineChartLabels.FILE_CHART_TITLE; - chartIcon = ImageResources.CHART_FILE; - addIcon = ImageResources.ADD_CHART_FILE; - - readSeries = new DACustomChartSeries( - TimelineChartLabels.FILE_CHART_SERIES_NAME_READ, - DACustomChartSeries.SERIES_STYLE_BAR, - ColorResources.SERIESE_COLOR_FILE_READ); - writeSeries = new DACustomChartSeries( - TimelineChartLabels.FILE_CHART_SERIES_NAME_WRITE, - DACustomChartSeries.SERIES_STYLE_BAR, - ColorResources.SERIESE_COLOR_FILE_WRITE); - fdCountSeries = new DACustomChartSeries( - TimelineChartLabels.FILE_CHART_SERIES_NAME_FD_COUNT, - DACustomChartSeries.SERIES_STYLE_LINE, - ColorResources.SERIESE_COLOR_FILE_FD); - - } - - @Override - public DACustomChart createDAChart(Composite parent) { - chart = new DACustomChart(parent, chartName); - - chart.addSeries(readSeries); - chart.addSeries(writeSeries); - chart.addSeries(fdCountSeries); - - setChartStyle(); - chart.getPlot().setAutoHeightRange(false); - chart.getPlot().setSeriesHeightRange(true); - fdCountSeries.setEndY(maxFDCount); - readSeries.setEndY(maxFDCount); - writeSeries.setEndY(maxReadWrite); - - return chart; - } - - @Override - public void clear() { - readSeries.clear(); - writeSeries.clear(); - fdCountSeries.clear(); - readByte = 0; - writeByte = 0; - fdCount = 0; - } - - @Override - public void parsingLogPackage(LogPackage logPack) { - if(!isAbleToParse(logPack, probeType)) { - return; - } - - Logs logs = logPack.getLogs(probeType); - List> logList = logs.getLogs(); - - for(List log : logList) { - parsingLog(log); - } - } - - private void parsingLog(List log) { - if (null == log || 0 > log.size()) { - return; - } - - /* API check */ - int fdApiType = 0; - - try { - //FIXME trim - fdApiType = Integer.parseInt(log.get(LogCenterConstants.RESOURCE_FDAPITYPE_INDEX).trim()); - } catch (NumberFormatException ne) { - ne.printStackTrace(); - } - - long size = 0; - - if (fdApiType == FD_API_TYPE_READ || fdApiType == FD_API_TYPE_WRITE) { - if (log.get(LogCenterConstants.RESOURCE_SIZE_INDEX).isEmpty() || !log.get(LogCenterConstants.ERROR_INDEX).equals("0")) { //$NON-NLS-1$ - return; - } - - try { - String resourceSizeIndexStr = log.get(LogCenterConstants.RESOURCE_SIZE_INDEX).trim(); - size = Long.parseLong(resourceSizeIndexStr); - } catch (NumberFormatException ne) { - ne.printStackTrace(); - } catch (NullPointerException ne) { - ne.printStackTrace(); - } catch (Exception e) { - e.printStackTrace(); - } - - switch(fdApiType) { - case FD_API_TYPE_READ: - readByte += size; - break; - case FD_API_TYPE_WRITE: - writeByte += size; - break; - } - } else { - return; - } - } - - public void updateRW(double time) { - if(fdCount > maxFDCount){ - maxFDCount = fdCount; - fdCountSeries.setEndY(maxFDCount*1.1 + 1); - } - fdCountSeries.addSeriesItem(new DACustomChartSeriesItem(time, fdCount,String.valueOf(fdCount))); - - if(readByte > maxReadWrite){ - maxReadWrite = readByte; - readSeries.setEndY(maxReadWrite*1.1); - } - readSeries.addSeriesItem(new DACustomChartSeriesItem(time, readByte, Formatter.toByteFormat(readByte))); - readByte = 0; - - if(writeByte > maxReadWrite){ - maxReadWrite = writeByte; - readSeries.setEndY(maxReadWrite*1.1); - } - writeSeries.addSeriesItem(new DACustomChartSeriesItem(time, writeByte, Formatter.toByteFormat(writeByte))); - writeByte = 0; - } - - @Override - public List getBaseDASeriesList() { - ArrayList seriesList = new ArrayList(); - seriesList.add(readSeries); - seriesList.add(writeSeries); - seriesList.add(fdCountSeries); - - return seriesList; - } - - public void setFDCount(int count){ - fdCount = count; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/HeapChart.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/HeapChart.java deleted file mode 100644 index b29733b..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/HeapChart.java +++ /dev/null @@ -1,261 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Sanghyun Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.timeline.chart; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.logparser.LogPackage; -import org.tizen.dynamicanalyzer.logparser.Logs; -import org.tizen.dynamicanalyzer.nl.TimelineChartLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants; -import org.tizen.dynamicanalyzer.utils.Formatter; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChart; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeries; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeriesItem; - -public class HeapChart extends TimelineChart { - private final int MEM_API_TYPE_ALLOC = 0; - private final int MEM_API_TYPE_FREE = 1; - private final int MEM_API_TYPE_MANAGE = 2; - private final int MEM_USER = 2; - - private static HeapChart instance = null; - private final String NIL = "(nil)"; //$NON-NLS-1$ - - private DACustomChartSeries totalAllocationSeries; - private DACustomChartSeries userAllocationSeries; - private double allocByte = 0; - private HashMap allocationSeriesDataSetMap = new HashMap(); - - public static HeapChart getInstance() { - if (instance == null) { - instance = new HeapChart(); - } - - return instance; - } - - private HeapChart() { - chartType = TimelineConstants.CHART_TYPE_HEAP; - probeType = LogCenterConstants.LOG_DEVICE; - chartName = TimelineChartLabels.HEAP_CHART_TITLE; - chartIcon = ImageResources.CHART_HEAP; - addIcon = ImageResources.ADD_CHART_HEAP; - - totalAllocationSeries = new DACustomChartSeries( - TimelineChartLabels.HEAP_CHART_SERIES_NAME_PLATFORM_ALLOCATION, - DACustomChartSeries.SERIES_STYLE_AREA, - ColorResources.SERIESE_COLOR_HEAP_SYSTEM); - userAllocationSeries = new DACustomChartSeries( - TimelineChartLabels.HEAP_CHART_SERIES_NAME_USER_ALLOCATION, - DACustomChartSeries.SERIES_STYLE_AREA, - ColorResources.SERIESE_COLOR_HEAP_USER); - } - - @Override - public DACustomChart createDAChart(Composite parent) { - chart = new DACustomChart(parent, chartName); - - chart.addSeries(totalAllocationSeries); - chart.addSeries(userAllocationSeries); - - setChartStyle(); - return chart; - } - - @Override - public void clear() { - totalAllocationSeries.clear(); - userAllocationSeries.clear(); - } - - @Override - public void parsingLogPackage(LogPackage logPack) { - if (!isAbleToParse(logPack, probeType)) { - return; - } - - Logs memoryLogs = logPack.getLogs(LogCenterConstants.LOG_MEMORY); - Logs deviceLogs = logPack.getLogs(LogCenterConstants.LOG_DEVICE); - - List> memoryLogList = memoryLogs == null ? null - : memoryLogs.getLogs(); - List> deviceLogList = deviceLogs == null ? null - : deviceLogs.getLogs(); - - parsingLog(memoryLogList, deviceLogList); - } - - private void parsingLog(List> memoryLogList, - List> deviceLogList) { - boolean isUserAllocUpdated = false; - - /* user alloc */ - if (memoryLogList != null) { - int size = memoryLogList.size(); - for (int i = 0; i < size; i++) { - List log = memoryLogList.get(i); - if (log != null && log.size() > 0) { - int memApiType = 0; - int internalFlag = 0; - int errorNo = 0; - - try { - memApiType = Integer.parseInt(log - .get(LogCenterConstants.MEMORY_APITYPE_INDEX)); - internalFlag = Integer.parseInt(log - .get(LogCenterConstants.INTERNAL_FLAG_INDEX)); - errorNo = Integer.parseInt(log - .get(LogCenterConstants.ERROR_INDEX)); - } catch (NumberFormatException ne) { - ne.printStackTrace(); - } - - if (errorNo == 0 - && MEM_USER == internalFlag) { - if (MEM_API_TYPE_ALLOC == memApiType - || MEM_API_TYPE_FREE == memApiType - || MEM_API_TYPE_MANAGE == memApiType) { - double time = 0; - try { - time = Double.parseDouble(log.get(LogCenterConstants.TIME_INDEX)) - / TimelineConstants.MEGA; - } catch (NumberFormatException ne) { - ne.printStackTrace(); - } catch (NullPointerException ne) { - ne.printStackTrace(); - } catch (Exception e) { - e.printStackTrace(); - } - - isUserAllocUpdated = addNewSeriesUserAllocData( - memApiType, time, log); - } - } - } - } - } - - /* total alloc */ - if (deviceLogList != null) { - int size = deviceLogList.size(); - for (int i = 0; i < size; i++) { - List log = deviceLogList.get(i); - if (log != null && log.size() > 0) { - if (!log.get( - LogCenterConstants.DEVICE_ALLOCATION_SIZE_INDEX) - .isEmpty()) { - double time = 0; - double value = 0; - - try { - time = Double.parseDouble(log.get(LogCenterConstants.TIME_INDEX)) - / TimelineConstants.MEGA; - value = Double.parseDouble(log - .get(LogCenterConstants.DEVICE_ALLOCATION_SIZE_INDEX)) - allocByte; - } catch (NumberFormatException ne) { - ne.printStackTrace(); - } catch (NullPointerException ne) { - ne.printStackTrace(); - } catch (Exception e) { - e.printStackTrace(); - } - totalAllocationSeries - .addSeriesItem(new DACustomChartSeriesItem( - time, value, Formatter.toByteFormat(value))); - // totalAllocationSeriesDataSet.newXYDataItems.add(new - // XYDataItem(time, value)); - - if (!isUserAllocUpdated) { - // userAllocationSeriesDataSet.newXYDataItems.add(new - // XYDataItem(time, allocByte)); - userAllocationSeries - .addSeriesItem(new DACustomChartSeriesItem( - time, - allocByte, - Formatter.toByteFormat(allocByte))); - } - } - } - } - } - } - - private boolean addNewSeriesUserAllocData(int fdApiType, double time, - List log) { - double size = 0; - - String addressString = log.get(LogCenterConstants.MEMORY_ADDR_INDEX); - if (addressString.equals(NIL)) { - return false; - } - - if (MEM_API_TYPE_ALLOC == fdApiType) { - if (log.get(LogCenterConstants.MEMORY_SIZE_INDEX).isEmpty()) { - return false; - } - - try { - size = Double.parseDouble(log - .get(LogCenterConstants.MEMORY_SIZE_INDEX)); - } catch (NumberFormatException ne) { - ne.printStackTrace(); - } - - allocByte += size; - allocationSeriesDataSetMap.put(addressString, size); - } else if (MEM_API_TYPE_FREE == fdApiType) { - if (!allocationSeriesDataSetMap.containsKey(addressString)) { - return false; - } - size = allocationSeriesDataSetMap.get(addressString); - - allocByte -= size; - } - userAllocationSeries.addSeriesItem(new DACustomChartSeriesItem(time, - allocByte, Formatter.toByteFormat(allocByte))); - // userAllocationSeriesDataSet.newXYDataItems.add(new XYDataItem(time, - // allocByte)); - - return true; - } - - @Override - public List getBaseDASeriesList() { - ArrayList seriesList = new ArrayList(); - seriesList.add(totalAllocationSeries); - seriesList.add(userAllocationSeries); - - return seriesList; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/ProcessMemoryChart.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/ProcessMemoryChart.java deleted file mode 100644 index bb04438..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/ProcessMemoryChart.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Sanghyun Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.timeline.chart; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.logparser.LogPackage; -import org.tizen.dynamicanalyzer.logparser.Logs; -import org.tizen.dynamicanalyzer.nl.TimelineChartLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants; -import org.tizen.dynamicanalyzer.utils.Formatter; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChart; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeries; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeriesItem; - -public class ProcessMemoryChart extends TimelineChart { - private static ProcessMemoryChart instance = null; - - private DACustomChartSeries VSSMemorySeries; - private DACustomChartSeries RSSMemorySeries; - private DACustomChartSeries PSSMemorySeries; - - public static ProcessMemoryChart getInstance() { - if (instance == null) { - instance = new ProcessMemoryChart(); - } - - return instance; - } - - private ProcessMemoryChart() { - chartType = TimelineConstants.CHART_TYPE_PROCESS_MEMORY; - probeType = LogCenterConstants.LOG_DEVICE; - chartName = TimelineChartLabels.PROCESS_MEMORY_CHART_TITLE; - chartIcon = ImageResources.CHART_PROCESS_MEMORY; - addIcon = ImageResources.ADD_CHART_PROCESS_MEMORY; - - VSSMemorySeries = new DACustomChartSeries( - TimelineChartLabels.PROCESS_MEMORY_CHART_VSS, - DACustomChartSeries.SERIES_STYLE_AREA, - ColorResources.SERIESE_COLOR_PROCESS_VSS); - RSSMemorySeries = new DACustomChartSeries( - TimelineChartLabels.PROCESS_MEMORY_CHART_RSS, - DACustomChartSeries.SERIES_STYLE_AREA, - ColorResources.SERIESE_COLOR_PROCESS_RSS); - PSSMemorySeries = new DACustomChartSeries( - TimelineChartLabels.PROCESS_MEMORY_CHART_PSS, - DACustomChartSeries.SERIES_STYLE_AREA, - ColorResources.SERIESE_COLOR_PROCESS_PSS); - } - - @Override - public DACustomChart createDAChart(Composite parent) { - chart = new DACustomChart(parent, chartName); - - chart.addSeries(VSSMemorySeries); - chart.addSeries(RSSMemorySeries); - chart.addSeries(PSSMemorySeries); - - setChartStyle(); - return chart; - } - - @Override - public void clear() { - VSSMemorySeries.clear(); - RSSMemorySeries.clear(); - PSSMemorySeries.clear(); - } - - @Override - public void parsingLogPackage(LogPackage logPack) { - if (!isAbleToParse(logPack, probeType)) { - return; - } - - Logs logs = logPack.getLogs(probeType); - List> logList = logs.getLogs(); - - for(List log : logList) { - parsingLog(log); - } - } - - private void parsingLog(List log) { - if (null == log || 0 > log.size()) { - return; - } - - /* VSS */ - if (!log.get(LogCenterConstants.DEVICE_VSS_MEMORY_INDEX).isEmpty()) { - double time = 0; - double value = 0; - - try { - time = Double.parseDouble(log.get(LogCenterConstants.DEVICE_TIME_INDEX)) - / TimelineConstants.MEGA; - value = Double.parseDouble(log - .get(LogCenterConstants.DEVICE_VSS_MEMORY_INDEX)); - } catch (NumberFormatException ne) { - ne.printStackTrace(); - } catch (NullPointerException ne) { - ne.printStackTrace(); - } catch (Exception e) { - e.printStackTrace(); - } - - VSSMemorySeries - .addSeriesItem(new DACustomChartSeriesItem(time, value, - Formatter.toByteFormat(value))); - - } - - /* RSS */ - if (!log.get(LogCenterConstants.DEVICE_RSS_MEMORY_INDEX).isEmpty()) { - double time = 0; - double value = 0; - - try { - time = Double.parseDouble(log.get(LogCenterConstants.DEVICE_TIME_INDEX)) - / TimelineConstants.MEGA; - value = Double.parseDouble(log - .get(LogCenterConstants.DEVICE_RSS_MEMORY_INDEX)); - } catch (NumberFormatException ne) { - ne.printStackTrace(); - } catch (NullPointerException ne) { - ne.printStackTrace(); - } catch (Exception e) { - e.printStackTrace(); - } - - RSSMemorySeries - .addSeriesItem(new DACustomChartSeriesItem(time, value, - Formatter.toByteFormat(value))); - } - - /* PSS */ - if (!log.get(LogCenterConstants.DEVICE_PSS_MEMORY_INDEX).isEmpty()) { - double time = 0; - double value = 0; - - try { - time = Double.parseDouble(log.get(LogCenterConstants.DEVICE_TIME_INDEX)) - / TimelineConstants.MEGA; - value = Double.parseDouble(log - .get(LogCenterConstants.DEVICE_PSS_MEMORY_INDEX)); - } catch (NumberFormatException ne) { - ne.printStackTrace(); - } catch (NullPointerException ne) { - ne.printStackTrace(); - } catch (Exception e) { - e.printStackTrace(); - } - - PSSMemorySeries - .addSeriesItem(new DACustomChartSeriesItem(time, value, - Formatter.toByteFormat(value))); - } - } - - @Override - public List getBaseDASeriesList() { - ArrayList seriesList = new ArrayList(); - seriesList.add(VSSMemorySeries); - seriesList.add(RSSMemorySeries); - seriesList.add(PSSMemorySeries); - - return seriesList; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/ScreenshotChart.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/ScreenshotChart.java deleted file mode 100644 index 764e516..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/ScreenshotChart.java +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Sanghyun Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.timeline.chart; - -import java.io.File; -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.SWTException; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Display; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.logparser.LogPackage; -import org.tizen.dynamicanalyzer.logparser.Logs; -import org.tizen.dynamicanalyzer.nl.TimelineChartLabels; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChart; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeries; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeriesItem; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomScreenshotChartPlot; - -public class ScreenshotChart extends TimelineChart { - public static ScreenshotChart instance = null; - - private DACustomChartSeries screenshotSeries; - - public static ScreenshotChart getInstance() { - if (instance == null) { - instance = new ScreenshotChart(); - } - - return instance; - } - - private ScreenshotChart() { - chartType = TimelineConstants.CHART_TYPE_SCREENSHOT; - probeType = LogCenterConstants.LOG_SCREENSHOT; - chartName = TimelineChartLabels.SCREENSHOT_CHART_TITLE; - chartIcon = ImageResources.CHART_SCREENSHOT; - addIcon = ImageResources.ADD_CHART_SCREENSHOT; - - screenshotSeries = new DACustomChartSeries(TimelineChartLabels.SCREENSHOT_CHART_TITLE, DACustomChartSeries.SERIES_STYLE_IMAGE); - } - - @Override - public DACustomChart createDAChart(Composite parent) { - chart = new DACustomChart(parent, chartName); - chart.replacePlot(new DACustomScreenshotChartPlot(chart)); - - setChartStyle(); - - chart.addSeries(screenshotSeries); - - return chart; - } - - public DACustomChart getChart() { - return chart; - } - - @Override - public void clear() { - screenshotSeries.clear(); - } - - @Override - public void parsingLogPackage(LogPackage logPack) { - if (!isAbleToParse(logPack, probeType)) { - return; - } - - Logs logs = logPack.getLogs(probeType); - List> logList = logs.getLogs(); - - for(List log : logList) { - parsingLog(log); - } - } - - private void parsingLog(List log) { - double time = Double.parseDouble(log.get(LogCenterConstants.TIME_INDEX)) / TimelineConstants.MEGA; - - String imagePath = AnalyzerManager.getProject().getSavePath() + File.separator - + AnalyzerConstants.IMAGE_FOLDER_NAME + File.separator - + AnalyzerConstants.SMALL_IMAGE_FOLDER_NAME; - String imagePathLog = log.get(LogCenterConstants.SNAPSHOT_IMAGE_PATH_INDEX); - String[] splitedImagePathLog = imagePathLog.split("/"); - String fileName = splitedImagePathLog[splitedImagePathLog.length - 1]; - imagePath += File.separator + fileName; - - String orientation = log.get(LogCenterConstants.SNAPSHOT_ROTATE_INDEX); - int yPostion; - if(orientation.equals("0") || orientation.equals("180")) { - yPostion = 10; - } else { - yPostion = 23; - } - - new CreateImageThread(imagePath, time, yPostion).run(); - } - - @Override - public List getBaseDASeriesList() { - ArrayList serieslist = new ArrayList(); - serieslist.add(screenshotSeries); - - return serieslist; - } - - private class CreateImageThread extends Thread{ - private String imagePath; - private double time; - private int yPosition; - - private CreateImageThread(String imagePath, double time, int yPostion) { - this.imagePath = imagePath; - this.time = time; - this.yPosition = yPostion; - } - - public void run() { - Image image = null; - - while(true) { - try { - image = new Image(Display.getDefault(), imagePath); - } catch (SWTException se) { - try{ - Thread.sleep(1000); - continue; - } catch (InterruptedException ie) { - continue; - } - } - - break; - } - - screenshotSeries.addSeriesItem(new DACustomChartSeriesItem(time, yPosition, image)); - } - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/SystemMemoryChart.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/SystemMemoryChart.java deleted file mode 100644 index 801c787..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/SystemMemoryChart.java +++ /dev/null @@ -1,181 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Sanghyun Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.timeline.chart; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.logparser.LogPackage; -import org.tizen.dynamicanalyzer.logparser.Logs; -import org.tizen.dynamicanalyzer.nl.TimelineChartLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants; -import org.tizen.dynamicanalyzer.utils.Formatter; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChart; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeries; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeriesItem; - -public class SystemMemoryChart extends TimelineChart { - private static SystemMemoryChart instance = null; - - private DACustomChartSeries processSeries; - private DACustomChartSeries systemSeries; - private DACustomChartSeries totalSeries; - - public static SystemMemoryChart getInstance() { - if (instance == null) { - instance = new SystemMemoryChart(); - } - - return instance; - } - - private SystemMemoryChart() { - chartType = TimelineConstants.CHART_TYPE_SYSTEM_MEMORY; - probeType = LogCenterConstants.LOG_DEVICE; - chartName = TimelineChartLabels.SYSTEM_MEMORY_CHART_TITLE; - chartIcon = ImageResources.CHART_SYSTEM_MEMORY; - addIcon = ImageResources.ADD_CHART_SYSTEM_MEMORY; - - processSeries = new DACustomChartSeries( - TimelineChartLabels.SYSTEM_MEMORY_CHART_SERIES_NAME_PROC_RESIDENT, - DACustomChartSeries.SERIES_STYLE_AREA, - ColorResources.SERIESE_COLOR_MEMORY_APP_USED); - systemSeries = new DACustomChartSeries( - TimelineChartLabels.SYSTEM_MEMORY_CHART_SERIES_NAME_SYSTEM, - DACustomChartSeries.SERIES_STYLE_AREA, - ColorResources.SERIESE_COLOR_MEMORY_SYS_USED); - totalSeries = new DACustomChartSeries( - TimelineChartLabels.SYSTEM_MEMORY_CHART_SERIES_NAME_TOTAL, - DACustomChartSeries.SERIES_STYLE_AREA, - ColorResources.SERIESE_COLOR_MEMORY_SYS_MAX); - } - - @Override - public DACustomChart createDAChart(Composite parent) { - chart = new DACustomChart(parent, chartName); - - chart.addSeries(totalSeries); - chart.addSeries(systemSeries); - chart.addSeries(processSeries); - - setChartStyle(); - - return chart; - } - - @Override - public void clear() { - processSeries.clear(); - systemSeries.clear(); - totalSeries.clear(); - } - - @Override - public void parsingLogPackage(LogPackage logPack) { - if (!isAbleToParse(logPack, probeType)) { - return; - } - - Logs logs = logPack.getLogs(probeType); - List> logList = logs.getLogs(); - - for(List log : logList) { - parsingLog(log); - } - } - - private void parsingLog(List log) { - if (null == log || 0 > log.size()) { - return; - } - - /* process */ - if (!log.get(LogCenterConstants.DEVICE_RSS_MEMORY_INDEX).isEmpty()) { - double time = 0; - double usage = 0; - - try { - time = Double.parseDouble(log - .get(LogCenterConstants.DEVICE_TIME_INDEX)) - / TimelineConstants.MEGA; - usage = Double.parseDouble(log - .get(LogCenterConstants.DEVICE_RSS_MEMORY_INDEX)); - } catch (NumberFormatException ne) { - ne.printStackTrace(); - } catch (NullPointerException ne) { - ne.printStackTrace(); - } catch (Exception e) { - e.printStackTrace(); - } - processSeries - .addSeriesItem(new DACustomChartSeriesItem(time, usage, - Formatter.toByteFormat(usage))); - } - - /* system & total */ - if (!log.get(LogCenterConstants.DEVICE_SYSTEM_USED_MEMORY_INDEX) - .isEmpty()) { - double time = 0; - double usage = 0; - double total = 0; - try { - time = Double.parseDouble(log.get(LogCenterConstants.DEVICE_TIME_INDEX)) - / TimelineConstants.MEGA; - - usage = Double.parseDouble(log - .get(LogCenterConstants.DEVICE_SYSTEM_USED_MEMORY_INDEX)); - total = (double) AnalyzerManager.getProject().getSystemMemorySize(); - - } catch (NumberFormatException ne) { - ne.printStackTrace(); - } catch (NullPointerException ne) { - ne.printStackTrace(); - } catch (Exception e) { - e.printStackTrace(); - } - systemSeries.addSeriesItem(new DACustomChartSeriesItem(time, usage, - Formatter.toByteFormat(usage))); - totalSeries.addSeriesItem(new DACustomChartSeriesItem(time, total, - Formatter.toByteFormat(total))); - } - } - - @Override - public List getBaseDASeriesList() { - ArrayList seriesList = new ArrayList(); - seriesList.add(processSeries); - seriesList.add(systemSeries); - seriesList.add(totalSeries); - - return seriesList; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/TimelineChart.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/TimelineChart.java deleted file mode 100644 index eeeb17b..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/TimelineChart.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Sanghyun Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.timeline.chart; - -import java.util.List; - -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.logparser.LogPackage; -import org.tizen.dynamicanalyzer.logparser.Logs; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChart; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartPlot; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartPlotTooltip; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeries; - -public abstract class TimelineChart { - protected DACustomChart chart; - protected DACustomChartPlot plot; - - protected int chartType; - protected int probeType; - protected String chartName; - protected Image chartIcon; - protected Image addIcon; - protected int size = TimelineConstants.ITEM_HEIGHT_DEF; - - public abstract void parsingLogPackage(LogPackage logPack); - public abstract void clear(); - public abstract DACustomChart createDAChart(Composite parent); - public abstract List getBaseDASeriesList(); - - public void setDomainAxisRange(double start, double end) { - if(plot != null) { - plot.setAxisRangeX(start, end); - } - - if(chart != null &&!chart.isDisposed()) { - chart.redraw(); - } - } - - protected void setChartStyle() { - if (null == chart) { - return; - } - - plot = chart.getPlot(); - if (null == plot) { - return; - } - plot.setBackgroundImage(ImageResources.BG_GRADIENT); - plot.setAutoHeightRange(true); - plot.setTooltip(new DACustomChartPlotTooltip(-1)); - } - - public void update() { - if(chart != null && !chart.isDisposed()) { - chart.redraw(); - } - } - - public int getChartType() { - return chartType; - } - - public String getChartName() { - return chartName; - } - - public Image getChartIcon() { - return chartIcon; - } - - public Image getAddIcon() { - return addIcon; - } - - public int getSize() { - return size; - } - public void setSize(int size) { - this.size = size; - } - - public int getProbeType() { - return probeType; - } - - protected boolean isAbleToParse(LogPackage logPack, int probeType) { - Logs logList = logPack.getLogs(probeType); - - if (null == logList) { - return false; - } - - if (null == logList.getLogs()) { - return false; - } - - if (0 > logList.getLogs().size()) { - return false; - } - - return true; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/UIEventChart.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/UIEventChart.java deleted file mode 100644 index 1557fc3..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/UIEventChart.java +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Sanghyun Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.timeline.chart; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.logparser.LogCenterConstants; -import org.tizen.dynamicanalyzer.logparser.LogPackage; -import org.tizen.dynamicanalyzer.logparser.Logs; -import org.tizen.dynamicanalyzer.nl.TimelineChartLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChart; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeries; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeriesItem; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomUIEventChartPlot; - -public class UIEventChart extends TimelineChart { - private static UIEventChart instance = null; - - private DACustomChartSeries keyEventSeries; - private DACustomChartSeries touchEventSeries; - private DACustomChartSeries gestureEventSeries; - private DACustomChartSeries orientationEventSeries; -// private DACustomChartSeries frameworkEventSeries; - - private final int TYPE_KEY = 1; - private final int TYPE_TOUCH = 2; - private final int TYPE_GESTURE = 3; - private final int TYPE_ORIENTATION = 4; - private final int TYPE_FRAMEWORK = 5; - - private final int GESTURE_TYPE_FLICK = 0; - private final int GESTURE_TYPE_LONG_PRESS = 1; - private final int GESTURE_TYPE_PANNING = 2; - private final int GESTURE_TYPE_PINCH = 3; - private final int GESTURE_TYPE_ROTATION = 4; - private final int GESTURE_TYPE_TAP= 5; - - private final String SPACE = " "; // $NON_NLS-1$ - private final String NEW_LINE = "\n"; // $NON_NLS-1$ - private final String KEY_UP = "up"; // $NON_NLS-1$ - private final String KEY_DOWN = "down"; // $NON_NLS-1$ - - public static UIEventChart getInstance() { - if (instance == null) { - instance = new UIEventChart(); - } - - return instance; - } - - private UIEventChart() { - chartType = TimelineConstants.CHART_TYPE_UIEVENT; - probeType = LogCenterConstants.LOG_RECODER; - chartName = TimelineChartLabels.UI_EVENT_CHART_TITLE; - chartIcon = ImageResources.CHART_UI_EVENT; - addIcon = ImageResources.ADD_CHART_UI_EVENT; - - keyEventSeries = new DACustomChartSeries(TimelineChartLabels.UI_EVENT_CHART_SERIES_NAME_KEY, - DACustomChartSeries.SERIES_STYLE_MULTY_CHECK_BAR, ColorResources.SERIES_COLOR_UI_EVENT_KEY); - touchEventSeries = new DACustomChartSeries(TimelineChartLabels.UI_EVENT_CHART_SERIES_NAME_TOUCH, - DACustomChartSeries.SERIES_STYLE_MULTY_CHECK_BAR, ColorResources.SERIES_COLOR_UI_EVENT_TOUCH); - gestureEventSeries = new DACustomChartSeries(TimelineChartLabels.UI_EVENT_CHART_SERIES_NAME_GESTURE, - DACustomChartSeries.SERIES_STYLE_MULTY_CHECK_BAR, ColorResources.SERIES_COLOR_UI_EVENT_GESTURE); - orientationEventSeries = new DACustomChartSeries(TimelineChartLabels.UI_EVENT_CHART_SERIES_NAME_ORIENTATION, - DACustomChartSeries.SERIES_STYLE_MULTY_CHECK_BAR, ColorResources.SERIES_COLOR_UI_EVENT_ORIENTATION); -// frameworkEventSeries = new DACustomChartSeries(TimelineChartLabels.UI_EVENT_CHART_SERIES_NAME_FRAMEWORK, -// DACustomChartSeries.SERIES_STYLE_MULTY_CHECK_BAR, ColorResources.SERIES_COLOR_UI_EVENT_FRAMEWORK); - } - - @Override - public DACustomChart createDAChart(Composite parent) { - chart = new DACustomChart(parent, chartName); - chart.replacePlot(new DACustomUIEventChartPlot(chart)); - - setChartStyle(); - - chart.addSeries(keyEventSeries); - chart.addSeries(touchEventSeries); - chart.addSeries(gestureEventSeries); - chart.addSeries(orientationEventSeries); -// chart.addSeries(frameworkEventSeries); - - return chart; - } - - @Override - public void clear() { - keyEventSeries.clear(); - touchEventSeries.clear(); - gestureEventSeries.clear(); - orientationEventSeries.clear(); -// frameworkEventSeries.clear(); - } - - @Override - public void parsingLogPackage(LogPackage logPack) { - if (!isAbleToParse(logPack, probeType)) { - return; - } - - Logs logs = logPack.getLogs(probeType); - List> logList = logs.getLogs(); - - for (List log : logList) { - parsingLog(log); - } - } - - private void parsingLog(List log) { - double time = Double.parseDouble(log.get(LogCenterConstants.TIME_INDEX)) / TimelineConstants.MEGA; - int detailType; - int type = Integer.parseInt(log.get(LogCenterConstants.UI_EVENT_EVENT_TYPE)); - String info; - switch (type) { - case TYPE_KEY: - String keyStatus; - String keyName = log.get(LogCenterConstants.UI_EVENT_INFO1); - detailType = Integer.parseInt(log.get(LogCenterConstants.UI_EVENT_DETAIL_TYPE)); - if(detailType == 0) { - keyStatus = KEY_DOWN; - } else { - keyStatus = KEY_UP; - } - keyEventSeries.addSeriesItem(new DACustomChartSeriesItem(time, 0, keyName + SPACE + keyStatus)); - break; - case TYPE_TOUCH: - detailType = Integer.parseInt(log.get(LogCenterConstants.UI_EVENT_DETAIL_TYPE)); - info = EnumTouchStatus.values()[detailType].getStatus() + NEW_LINE - + "X : " + log.get(LogCenterConstants.UI_EVENT_X) + " Y : " + log.get(LogCenterConstants.UI_EVENT_Y); - touchEventSeries.addSeriesItem(new DACustomChartSeriesItem(time, 0, info)); - break; - case TYPE_GESTURE: - detailType = Integer.parseInt(log.get(LogCenterConstants.UI_EVENT_DETAIL_TYPE)); - gestureEventSeries.addSeriesItem(new DACustomChartSeriesItem(time, 0, getGestureInfo(detailType, log))); - System.out.println("" + time); - break; - case TYPE_ORIENTATION: - int status = Integer.parseInt(log.get(LogCenterConstants.UI_EVENT_INFO1)); - System.out.println("status : " + status); - orientationEventSeries.addSeriesItem(new DACustomChartSeriesItem(time, 0, "Orientation " + EnumOrientationStatus.values()[status].getStatus())); - break; -// case TYPE_FRAMEWORK: -// // FIXME argument -// frameworkEventSeries.addSeriesItem(new DACustomChartSeriesItem(time, 0, log.get(LogCenterConstants.APINAME_INDEX))); -// break; - default: - System.out.println("UIEventChart.java : event type errro");// $NON_NLS-1$ - return; - } - } - - @Override - public List getBaseDASeriesList() { - ArrayList seriesList = new ArrayList(); - seriesList.add(keyEventSeries); - seriesList.add(touchEventSeries); - seriesList.add(gestureEventSeries); - seriesList.add(orientationEventSeries); -// seriesList.add(frameworkEventSeries); - - return seriesList; - } - - private enum EnumTouchStatus { - PRESSED("Pressed"), - LONG_PRESSED("Long pressed"), - RELEASED("Released"), - MOVED("Moved"), - DOUBLE_PRESSED("Double pressed"), - FOCUS_IN("Focus in"), - FOCUS_OUT("Focus out"), - CANCELED("Canceled"); - - private String status; - - private EnumTouchStatus(String status) { - this.status = status; - } - - private String getStatus() { - return status; - } - } - - private enum EnumOrientationStatus { - NONE("None"), - PORTRAIT("Portrait"), - LANDSCAPE_REVERSE("Revers landscape"), - PORTRAIT_REVERSE("Reverse portrait"), - LANDSCAPE("Landscape"); - - private String status; - - private EnumOrientationStatus(String status) { - this.status = status; - } - - private String getStatus() { - return status; - } - } - - private String getGestureInfo(int detailType, List log) { - String info = ""; - switch(detailType) { - case GESTURE_TYPE_FLICK: - info = "Flick " + getFlickDirection(Integer.parseInt(log.get(LogCenterConstants.UI_EVENT_INFO2))) + NEW_LINE - + "Distance X : " + log.get(LogCenterConstants.UI_EVENT_X) + NEW_LINE - + "Distance Y : " + log.get(LogCenterConstants.UI_EVENT_Y) + NEW_LINE - + "Duration : " + log.get(LogCenterConstants.UI_EVENT_INFO1); - break; - case GESTURE_TYPE_LONG_PRESS: - info = "Long press " + NEW_LINE - + "Move allowance : " + log.get(LogCenterConstants.UI_EVENT_X) + NEW_LINE - + "Touch count : " + log.get(LogCenterConstants.UI_EVENT_INFO2) + NEW_LINE - + "Duration : " + log.get(LogCenterConstants.UI_EVENT_INFO1); - break; - case GESTURE_TYPE_PANNING: - info = "Panning" + NEW_LINE - + "Touch count : " + log.get(LogCenterConstants.UI_EVENT_INFO2); - break; - case GESTURE_TYPE_PINCH: - info = "Pinch" + NEW_LINE - + "Center x : " + log.get(LogCenterConstants.UI_EVENT_X) + NEW_LINE - + "Center y : " + log.get(LogCenterConstants.UI_EVENT_Y) + NEW_LINE - + "Distance : " + log.get(LogCenterConstants.UI_EVENT_INFO1); - break; - case GESTURE_TYPE_ROTATION: - info = "Rotation" + NEW_LINE - + "Distance : " + log.get(LogCenterConstants.UI_EVENT_INFO1) - + "Angle : " + log.get(LogCenterConstants.UI_EVENT_INFO2); - break; - case GESTURE_TYPE_TAP: - info = "Tap " + "Count : " + log.get(LogCenterConstants.UI_EVENT_Y) + NEW_LINE - + "Move allowance : " + log.get(LogCenterConstants.UI_EVENT_X) + NEW_LINE - + "Tap interval : " + log.get(LogCenterConstants.UI_EVENT_INFO1) + NEW_LINE - + "Touch count : " + log.get(LogCenterConstants.UI_EVENT_INFO2); - break; - } - - return info; - } - - private String getFlickDirection(int num) { - String info2; - switch(num) { - case 0: - info2 = "Right"; - break; - case 1: - info2 = "Up"; - break; - case 2: - info2 = "Left"; - break; - case 3: - info2 = "Down"; - break; - default: - info2 = ""; - } - - return info2; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimeBar.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimeBar.java deleted file mode 100644 index 55a7755..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimeBar.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Sanghyun Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.timeline.common; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.widgets.Canvas; -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.FontResources; - -public class TimeBar extends Canvas { - private final int TICK_LINE_SHORT = 2; - private final int TICK_LINE_MIDDLE = 4; - private final int TICK_LINE_LONG = 5; - - private final TimelineMaster timelineMaster = TimelineMaster.getInstance(); - - private final int MS = 1000; - private final int US = 1000; - private final int MIN = 60; - private final int SEC = 60; - - public TimeBar(Composite parent) { - super(parent, SWT.DOUBLE_BUFFERED | SWT.TRANSPARENT); - - addPaintListener(new PaintListener() { - @Override - public void paintControl(PaintEvent e) { - GC gc = e.gc; - final int x, y, w, h; - Rectangle timelineRect = getClientArea(); - x = timelineRect.x; - y = timelineRect.y; - TimelineGlobalVariable.timetickWidthPx = w = timelineRect.width; - h = timelineRect.height; - - gc.setForeground(ColorResources.TIME_TICK_LINE); - - gc.fillRectangle(x, y, w, h); - gc.setFont(FontResources.TIMELINE_TICK_FONT); - - int timeStringWidthPx = (gc.getCharWidth('0') * 4 + gc.getCharWidth(':') + 1); - int halfStringWidth = (int) Math.round(timeStringWidthPx / 2.0); - - gc.drawLine(x, y + h - 1, x + w, y + h - 1); - - int roundWidth = w - timeStringWidthPx; - - if (w < timeStringWidthPx * 2) { - return; - } - int round = (roundWidth / timeStringWidthPx * 2); - - if (round <= 0) { - return; - } - - int oneTickPx = TimelineConstants.ONE_TICK_PIXEL; - int currentScaleSec = TimelineGlobalVariable.EnumScaleSec.values()[TimelineGlobalVariable.currentScaleValue].getScaleSec(); - - int originalScaleSec = TimelineGlobalVariable.EnumScaleSec.values()[TimelineGlobalVariable.oriScaleValue].getScaleSec(); - int chartRunningPx = timelineMaster.getPxBySec(TimelineGlobalVariable.chartRunningSec); - - TimelineGlobalVariable.oriScaleValue = TimelineGlobalVariable.currentScaleValue; - TimelineGlobalVariable.originalEndPx = (int) Math.round((double) TimelineGlobalVariable.originalEndPx * originalScaleSec / currentScaleSec); - - int maxPx = chartRunningPx > TimelineGlobalVariable.originalEndPx ? chartRunningPx : TimelineGlobalVariable.originalEndPx; - if (TimelineGlobalVariable.scaleChanged) { - TimelineGlobalVariable.scaleChanged = false; - - if(TimelineGlobalVariable.startPx == 0) { - timelineMaster.setRangeScrollBarStuckState(false); - } else if (timelineMaster.isRangeScrollBarStuck()){ - TimelineGlobalVariable.startPx = maxPx - w; - } else { - timelineMaster.setRangeScrollBarStuckState(false); - int tempMidPx = (int) Math.round((double) (TimelineGlobalVariable.endPx + TimelineGlobalVariable.startPx ) / 2 * originalScaleSec / currentScaleSec); - TimelineGlobalVariable.startPx = tempMidPx - w / 2; - - if (TimelineGlobalVariable.startPx < 0) { - TimelineGlobalVariable.startPx = 0; - } - } - } else { - TimelineGlobalVariable.startPx = (int) Math.round((double) TimelineGlobalVariable.startPx * originalScaleSec / currentScaleSec); - } - - if (TimelineGlobalVariable.originalEndPx == TimelineConstants.NOT_INITED) { - TimelineGlobalVariable.originalEndPx = w; - timelineMaster.setRangeScrollBarMax(w); - timelineMaster.setRangeScrollBarSelection(0); - timelineMaster.setRangeScrollBarThumb(w); - } - - TimelineGlobalVariable.endPx = TimelineGlobalVariable.startPx + w; - if(TimelineGlobalVariable.endPx > maxPx) { - TimelineGlobalVariable.endPx = maxPx; - TimelineGlobalVariable.startPx = maxPx - w; - if(TimelineGlobalVariable.startPx < 0) { - TimelineGlobalVariable.originalEndPx = TimelineGlobalVariable.endPx = maxPx -= TimelineGlobalVariable.startPx; - TimelineGlobalVariable.startPx = 0; - } - timelineMaster.setRangeScrollBarStuckState(true); - } - - if (timelineMaster.isRangeScrollBarStuck() && chartRunningPx > TimelineGlobalVariable.endPx) { - TimelineGlobalVariable.startPx = chartRunningPx - w; - } - - int tempQuotient = TimelineGlobalVariable.startPx / (10 * oneTickPx); - int tempRemainder = TimelineGlobalVariable.startPx % (10 * oneTickPx); - int tickOrder = tempRemainder / oneTickPx + (tempRemainder % oneTickPx == 0 ? 0 : 1); - int posXPx = oneTickPx - (tempRemainder % oneTickPx == 0 ? oneTickPx : tempRemainder % oneTickPx); - - long tickLabelValue = currentScaleSec * tempQuotient + (tempRemainder == 0 ? 0 : currentScaleSec); - tickLabelValue -= currentScaleSec; - while (posXPx < w) { - tickOrder = tickOrder % 10; - int tickLineHeight = TICK_LINE_SHORT; - if (tickOrder == 0) { - tickLineHeight = TICK_LINE_LONG; - tickLabelValue += currentScaleSec; - gc.setForeground(ColorResources.TABLE_HEADER_FONT_COLOR); - gc.drawText(timeFormat(tickLabelValue * MS * US), (int) Math.round(posXPx) - halfStringWidth + 1, 1); - } else if (tickOrder == 5) { - tickLineHeight = TICK_LINE_MIDDLE; - } - gc.setForeground(ColorResources.TIME_TICK_LINE); - gc.drawLine((int) Math.round(posXPx), y + h - (1 + tickLineHeight), (int) Math.round(posXPx), y + h - 1); - - posXPx += oneTickPx; - tickOrder = tickOrder + 1; - } - - timelineMaster.setRangeScrollBarMax(maxPx); - timelineMaster.setRangeScrollBarSelection(TimelineGlobalVariable.startPx); - timelineMaster.setRangeScrollBarThumb(w); - if (maxPx == TimelineGlobalVariable.startPx + w) { - timelineMaster.setRangeScrollBarStuckState(true); - } - - TimelineChartManager.getInstance().setAllChartDoaminAxisRange(TimelineGlobalVariable.startPx * currentScaleSec / oneTickPx / 10.0, - TimelineGlobalVariable.endPx * currentScaleSec / oneTickPx / 10.0); - TimelineGlobalVariable.allowRedrawTimeTickCanvas = true; - - } - }); - } - - public void clear() { - TimelineGlobalVariable.startPx = 0; - redraw(); - } - - private String timeFormat(long time) { - String format = null; - long secTime = time / (US * MS); - long frontTime = 0; - long nextTime = 0; - - if ((secTime / (MIN * SEC)) <= 0) { - frontTime = secTime / SEC; - nextTime = secTime % SEC; - } else { - long minTime = secTime / SEC; - frontTime = minTime / MIN; - nextTime = minTime % MIN; - } - - format = digitMapping(frontTime) + AnalyzerConstants.COLON + digitMapping(nextTime); - return format; - } - - private String digitMapping(long time) { - String stringTime = Long.toString(time); - if (stringTime.length() == 2) { - return stringTime; - } - return AnalyzerConstants.EMPTY + 0 + stringTime; - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimelineAndMenuComposite.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimelineAndMenuComposite.java deleted file mode 100644 index 2da2e67..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimelineAndMenuComposite.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Sanghyun Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.timeline.common; - -import org.eclipse.jface.window.DefaultToolTip; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.MouseEvent; -import org.eclipse.swt.events.MouseTrackAdapter; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.layout.FormAttachment; -import org.eclipse.swt.layout.FormData; -import org.eclipse.swt.layout.FormLayout; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Shell; -import org.tizen.dynamicanalyzer.nl.TimelineChartLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.FontResources; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.ui.timeline.lifecycle.LifecycleBar; -import org.tizen.dynamicanalyzer.ui.timeline.lifecycle.LifecycleLogParser; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; -import org.tizen.dynamicanalyzer.widgets.button.DACustomButton; -import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener; - -public class TimelineAndMenuComposite extends Composite { - private final int TIMELINE_ITEM_MINIMIZE_WIDTH = 21; - - private TimeBar timeBar; - private DACustomButton addItems; - private DACustomButton minimizeItems; - private LifecycleBar lifecycleBar; - private DefaultToolTip lifecycleBarTooltip; - private DefaultToolTip timeBarTooltip; - - public TimelineAndMenuComposite(Composite parent) { - super(parent, SWT.NONE); - - createTimetickAndMenuComp(); - } - - private DACustomButtonClickEventListener addItemListButtonListener = new DACustomButtonClickEventListener() { - @Override - public void handleClickEvent(DACustomButton button) { - Shell shell = AnalyzerUtil.getWorkbenchWindow().getShell(); - TimelineEditItemsDialog dialog = new TimelineEditItemsDialog(shell, SWT.None); - if ( dialog.isRunningDialog() == false ){ - dialog.open(); - } - } - }; - - private DACustomButtonClickEventListener minItemListButtonListener = new DACustomButtonClickEventListener() { - @Override - public void handleClickEvent(DACustomButton button) { - TimelineView timelineComposite = AnalyzerUtil.getTimelineComposite(); - if (null != timelineComposite) { - TimelineItemSettingProvider.getInstance().setItemSettingMinimizeAll(); - timelineComposite.resizeItemArea(); - } - } - }; - - private MouseTrackAdapter mouseTrackAdapter = new MouseTrackAdapter() { - public void mouseHover(MouseEvent e) { - String tooltipMessage = lifecycleBar.getTooltipMessage(e.x); - if(tooltipMessage == null) { - timeBarTooltip.deactivate(); - lifecycleBarTooltip.deactivate(); - } else { - timeBarTooltip.setText(tooltipMessage); - timeBarTooltip.activate(); - lifecycleBarTooltip.setText(tooltipMessage); - lifecycleBarTooltip.activate(); - } - } - - public void mouseExit(MouseEvent e) { - } - }; - - private void createTimetickAndMenuComp() { - setBackground(ColorResources.VIEW_BG_COLOR); - - GridLayout gLayout = new GridLayout(3, false); - gLayout.marginWidth = 0; - gLayout.marginHeight = 0; - gLayout.horizontalSpacing = 0; - gLayout.verticalSpacing = 0; - setLayout(gLayout); - - /* Add Chart Button */ - createAddButton(); - - /* Timeline Area */ - Composite timelineArea = new Composite(this, SWT.NONE); - - GridData gDataChart = new GridData(); - gDataChart.horizontalAlignment = GridData.FILL; - gDataChart.grabExcessHorizontalSpace = true; - gDataChart.verticalAlignment = GridData.FILL; - gDataChart.grabExcessVerticalSpace = true; - timelineArea.setLayoutData(gDataChart); - - FormLayout fLayout = new FormLayout(); - fLayout.marginWidth = 0; - fLayout.marginHeight = 0; - timelineArea.setLayout(fLayout); - - /* Time Bar */ - timeBar = new TimeBar(timelineArea); - timeBarTooltip = new DefaultToolTip(timeBar); - timeBarTooltip.deactivate(); - timeBar.addMouseTrackListener(mouseTrackAdapter); - TimelineMaster.getInstance().setTimeBar(timeBar); - FormData fData = new FormData(); - fData.left = new FormAttachment(0); - fData.right = new FormAttachment(100); - fData.top = new FormAttachment(0); - fData.bottom = new FormAttachment(80); - timeBar.setLayoutData(fData); - - /* Lifecycle Bar */ - lifecycleBar = new LifecycleBar(timelineArea); - lifecycleBarTooltip = new DefaultToolTip(lifecycleBar); - lifecycleBarTooltip.deactivate(); - lifecycleBar.addMouseTrackListener(mouseTrackAdapter); - TimelineMaster.getInstance().setLifecycleBarCanvas(lifecycleBar); - LifecycleLogParser.getInstance().addLifecycleBar(lifecycleBar); - fData = new FormData(); - fData.left = new FormAttachment(0); - fData.right = new FormAttachment(100); - fData.top = new FormAttachment(80); - fData.bottom = new FormAttachment(100); - lifecycleBar.setLayoutData(fData); - - /* empty area */ - Label empty = new Label(this, SWT.NONE); - GridData gDataBtn = new GridData(); - gDataBtn.widthHint = TimelineConstants.ITEM_LIST_EDITOR_BTN_WIDTH; - gDataBtn.verticalAlignment = GridData.FILL; - gDataBtn.grabExcessVerticalSpace = true; - empty.setLayoutData(gDataBtn); - } - - private void createAddButton() { - Composite addItemComp = new Composite(this, SWT.None); - GridLayout gLayout = new GridLayout(2, false); - gLayout.marginWidth = 0; - gLayout.marginHeight = 0; - gLayout.horizontalSpacing = 0; - gLayout.verticalSpacing = 0; - addItemComp.setLayout(gLayout); - addItemComp.setBackground(ColorResources.VIEW_BG_COLOR); - - addItems = new DACustomButton(addItemComp, ImageResources.ADD_ITEMS_NORMAL, ImageResources.ADD_ITEMS_PUSH, ImageResources.ADD_ITEMS_HOVER, - null); - addItems.setTitle(TimelineChartLabels.TIMELINE_TICK_ADD); - addItems.setFontPoint(new Point(45, 4)); - addItems.setFontColors(ColorResources.DEFAULT_FONT_COLOR, ColorResources.DEFAULT_FONT_COLOR, ColorResources.DEFAULT_FONT_COLOR, - ColorResources.DEFAULT_FONT_COLOR); - addItems.setFont(FontResources.ADDITEM_BUTTON_FONT); - - GridData gDataAddBtn = new GridData(); - gDataAddBtn.horizontalAlignment = GridData.FILL; - gDataAddBtn.grabExcessHorizontalSpace = true; - gDataAddBtn.verticalAlignment = GridData.FILL; - gDataAddBtn.grabExcessVerticalSpace = true; - addItems.setLayoutData(gDataAddBtn); - addItems.addClickListener(addItemListButtonListener); - - minimizeItems = new DACustomButton(addItemComp, ImageResources.TIMLINE_SIZE_MIN_NORMAL, ImageResources.TIMLINE_SIZE_MIN_PUSH, - ImageResources.TIMLINE_SIZE_MIN_HOVER, null); - GridData gDataMinBtn = new GridData(); - gDataMinBtn.widthHint = TIMELINE_ITEM_MINIMIZE_WIDTH; - gDataMinBtn.verticalAlignment = GridData.FILL; - gDataMinBtn.grabExcessVerticalSpace = true; - minimizeItems.setLayoutData(gDataMinBtn); - minimizeItems.addClickListener(minItemListButtonListener); - - GridData gDataInfo = new GridData(); - gDataInfo.widthHint = TimelineConstants.TIMELINE_ITEM_INFO_WIDTH; - gDataInfo.verticalAlignment = GridData.FILL; - gDataInfo.grabExcessVerticalSpace = true; - addItemComp.setLayoutData(gDataInfo); - } - - public void clear() { - timeBar.clear(); - lifecycleBar.clear(); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimelineChartManager.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimelineChartManager.java deleted file mode 100644 index b0f159e..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimelineChartManager.java +++ /dev/null @@ -1,298 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Sanghyun Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.timeline.common; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import org.eclipse.swt.widgets.Composite; -import org.tizen.dynamicanalyzer.nl.ConfigureLabels; -import org.tizen.dynamicanalyzer.ui.timeline.chart.CPUChart; -import org.tizen.dynamicanalyzer.ui.timeline.chart.CPUCoreChart; -import org.tizen.dynamicanalyzer.ui.timeline.chart.CPUFrequencyChart; -import org.tizen.dynamicanalyzer.ui.timeline.chart.FileChart; -import org.tizen.dynamicanalyzer.ui.timeline.chart.HeapChart; -import org.tizen.dynamicanalyzer.ui.timeline.chart.ProcessMemoryChart; -import org.tizen.dynamicanalyzer.ui.timeline.chart.ScreenshotChart; -import org.tizen.dynamicanalyzer.ui.timeline.chart.SystemMemoryChart; -import org.tizen.dynamicanalyzer.ui.timeline.chart.TimelineChart; -import org.tizen.dynamicanalyzer.ui.timeline.chart.UIEventChart; -import org.tizen.dynamicanalyzer.ui.timeline.custom.UserCustomChart; -import org.tizen.dynamicanalyzer.ui.toolbar.ConfigureManager; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChart; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeries; - - -public class TimelineChartManager { - private boolean newCustomChart = false; - private static TimelineChartManager instance = null; - private List chartList; - private ArrayList newChartList; - private List selectedChartList; - private HashMap customChartMap; - - - public static TimelineChartManager getInstance() { - if(instance == null) { - instance = new TimelineChartManager(); - } - return instance; - } - - private TimelineChartManager() { - chartList = new ArrayList(); - newChartList = new ArrayList(); - selectedChartList = new ArrayList(); - customChartMap = new HashMap(); - - loadSavedChartList(); - loadSelectedChartList(); - } - - private void loadSavedChartList() { - String savedChartNameList = ConfigureManager.getInstance().getValue(ConfigureLabels.CONFIGUREMANAGER_CHART_AVAILABLE_ITEM_LIST); - String[] chartNameList = savedChartNameList.split(","); //$NON-NLS-1$ - int size = chartNameList.length; - - if (size > 1) { - for (int i = 0; i < size; i++) { - TimelineChart chart = getChartInstance(chartNameList[i]); - if(chart != null) { - chartList.add(chart); - } - } - } else { - chartList.add(CPUChart.getInstance()); - chartList.add(CPUCoreChart.getInstance()); - chartList.add(CPUFrequencyChart.getInstance()); - chartList.add(HeapChart.getInstance()); - chartList.add(ProcessMemoryChart.getInstance()); - chartList.add(SystemMemoryChart.getInstance()); - chartList.add(FileChart.getInstance()); - chartList.add(ScreenshotChart.getInstance()); - chartList.add(UIEventChart.getInstance()); - } - } - - private void loadSelectedChartList() { - String strSaveSelectedItems = ConfigureManager.getInstance().getValue(ConfigureLabels.CONFIGUREMANAGER_CHART_SELECTED_ITEM_LIST); - if (strSaveSelectedItems.equalsIgnoreCase("")) {//$NON-NLS-1$ - selectedChartList.addAll(chartList); - } else { - String[] savedSelectedChartNameList = strSaveSelectedItems.split(","); //$NON-NLS-1$ - int size = savedSelectedChartNameList.length; - if (size != 0) { - for (int i = 0; i < size; i++) { - TimelineChart chart = getChartInstance(savedSelectedChartNameList[i]); - if(chart != null) { - selectedChartList.add(chart); - } - } - } - } - } - - public void setChartList(List chartList) { - this.chartList.clear(); - this.chartList.addAll(chartList); - } - - public void setSelectedChartList(List chartList) { - this.selectedChartList.clear(); - this.selectedChartList.addAll(chartList); - } - - public List getChartList() { - return chartList; - } - - public List getSelectedChartList() { - return selectedChartList; - } - - public DACustomChart createDATimelineChart(Composite parent, int chartType) { - DACustomChart chart = null; - TimelineChart timelineChart = getChartInstance(chartType); - - if(timelineChart != null) { - chart = timelineChart.createDAChart(parent); - } - - return chart; - } - - private int getChartType(String string) { - if (string.equals(getChartName(TimelineConstants.CHART_TYPE_CPU))) { - return TimelineConstants.CHART_TYPE_CPU; - } else if (string.equals(getChartName(TimelineConstants.CHART_TYPE_CPU_CORE))) { - return TimelineConstants.CHART_TYPE_CPU_CORE; - } else if (string.equals(getChartName(TimelineConstants.CHART_TYPE_CPU_FREQUENCY))) { - return TimelineConstants.CHART_TYPE_CPU_FREQUENCY; - } else if (string.equals(getChartName(TimelineConstants.CHART_TYPE_HEAP))) { - return TimelineConstants.CHART_TYPE_HEAP; - } else if (string.equals(getChartName(TimelineConstants.CHART_TYPE_PROCESS_MEMORY))) { - return TimelineConstants.CHART_TYPE_PROCESS_MEMORY; - } else if (string.equals(getChartName(TimelineConstants.CHART_TYPE_SYSTEM_MEMORY))) { - return TimelineConstants.CHART_TYPE_SYSTEM_MEMORY; - } else if (string.equals(getChartName(TimelineConstants.CHART_TYPE_FILE))) { - return TimelineConstants.CHART_TYPE_FILE; - } else if (string.equals(getChartName(TimelineConstants.CHART_TYPE_SCREENSHOT))) { - return TimelineConstants.CHART_TYPE_SCREENSHOT; - } else if (string.equals(getChartName(TimelineConstants.CHART_TYPE_UIEVENT))) { - return TimelineConstants.CHART_TYPE_UIEVENT; - } else { - return TimelineConstants.NOT_DEFAULT_CHART; - } - } - - public String getChartName(int chartType) { - return getChartInstance(chartType).getChartName(); - } - - public TimelineChart getChartInstance(String chartName) { - return getChartInstance(getChartType(chartName)); - } - - public TimelineChart getChartInstance(int chartType) { - switch(chartType) { - case TimelineConstants.NOT_DEFAULT_CHART: - return null; - case TimelineConstants.CHART_TYPE_CPU: - return CPUChart.getInstance(); - case TimelineConstants.CHART_TYPE_CPU_CORE: - return CPUCoreChart.getInstance(); - case TimelineConstants.CHART_TYPE_CPU_FREQUENCY: - return CPUFrequencyChart.getInstance(); - case TimelineConstants.CHART_TYPE_HEAP: - return HeapChart.getInstance(); - case TimelineConstants.CHART_TYPE_PROCESS_MEMORY: - return ProcessMemoryChart.getInstance(); - case TimelineConstants.CHART_TYPE_SYSTEM_MEMORY: - return SystemMemoryChart.getInstance(); - case TimelineConstants.CHART_TYPE_FILE: - return FileChart.getInstance(); - case TimelineConstants.CHART_TYPE_SCREENSHOT: - return ScreenshotChart.getInstance(); - case TimelineConstants.CHART_TYPE_UIEVENT: - return UIEventChart.getInstance(); - default: - return customChartMap.get(chartType); - } - } - - public void addCustomChart(UserCustomChart customChart) { - int chartType = customChart.getChartType(); - if(!customChartMap.containsKey(chartType)) { - customChartMap.put(chartType, customChart); - chartList.add(customChart); - if(!newCustomChart) { - newChartList.clear(); - } - newChartList.add(customChart); - newCustomChart = true; - - StringBuffer strSaveChartNameList = new StringBuffer(""); //$NON-NLS-1$ - - for (int i = 0; i < chartList.size(); i++) { - strSaveChartNameList.append(chartList.get(i).getChartName()); - strSaveChartNameList.append(","); //$NON-NLS-1$ - } - - ConfigureManager.getInstance().setValue(ConfigureLabels.CONFIGUREMANAGER_CHART_AVAILABLE_ITEM_LIST, strSaveChartNameList.toString()); - } - } - - public List getDAChartSeriesList(int chartType) { - return getChartInstance(chartType).getBaseDASeriesList(); - } - - @SuppressWarnings("unchecked") - public void updateChart() { - //TODO custom - if(newCustomChart) { - List newChartList = (List) this.newChartList.clone(); - this.newChartList.clear(); - newCustomChart = false; - for(TimelineChart chart : newChartList) { - selectedChartList.add(chart); - } - - StringBuffer strSaveSelectedChartNameList = new StringBuffer(""); //$NON-NLS-1$ - for(int i = 0; i < selectedChartList.size(); i++) { - strSaveSelectedChartNameList.append(selectedChartList.get(i).getChartName()); - strSaveSelectedChartNameList.append(","); //$NON-NLS-1$ - } - ConfigureManager.getInstance().setValue(ConfigureLabels.CONFIGUREMANAGER_CHART_SELECTED_ITEM_LIST, strSaveSelectedChartNameList.toString()); - - AnalyzerUtil.getTimelineComposite().resetItems(); - TimelineMaster.getInstance().redrawTimeline(); - } - - int chartListSize = chartList.size(); - - - for (int i = 0; i < chartListSize; i++) { - TimelineChart timelineChart = chartList.get(i); - if(timelineChart instanceof UserCustomChart) { - UserCustomChart customChart = (UserCustomChart)timelineChart; - ArrayList tempSeriesList = (ArrayList) customChart.getTempSeries().clone(); - ((UserCustomChart) timelineChart).getTempSeries().clear(); - for(DACustomChartSeries series : tempSeriesList) { - customChart.addSeries(series); - } - } - - timelineChart.update(); - } - } - - public void setAllChartDoaminAxisRange(double start, double end) { - int chartListSize = chartList.size(); - for (int i = 0; i < chartListSize; i++) { - chartList.get(i).setDomainAxisRange(start, end); - } - } - - public void clear() { - if (null == chartList || 0 == chartList.size()) { - return; - } - - int listSize = chartList.size(); - for (int i = 0; i < listSize; i++) { - chartList.get(i).clear(); - } - - chartList.clear(); - selectedChartList.clear(); - loadSavedChartList(); - loadSelectedChartList(); - customChartMap.clear(); - } -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimelineConstants.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimelineConstants.java deleted file mode 100644 index 18219d7..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimelineConstants.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Sanghyun Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.timeline.common; - -public class TimelineConstants { - /* timeline Item type */ - public static final int NOT_DEFAULT_CHART = -100; - public static final int CHART_TYPE_CPU = -101; - public static final int CHART_TYPE_CPU_CORE = -102; - public static final int CHART_TYPE_CPU_FREQUENCY = -103; - public static final int CHART_TYPE_HEAP = -104; - public static final int CHART_TYPE_PROCESS_MEMORY = -105; - public static final int CHART_TYPE_SYSTEM_MEMORY = -106; - public static final int CHART_TYPE_FILE = -107; - public static final int CHART_TYPE_SCREENSHOT = -108; - public static final int CHART_TYPE_UIEVENT = -109; - - /* range selector */ - public static final int TIMELINE_ITEM_INFO_WIDTH = 99; - - /* item list editor */ - public static final int ITEM_LIST_EDITOR_BTN_WIDTH = 18; - - /* item size mode */ - public static final int ITEM_HEIGHT_MIN = 41; - public static final int ITEM_HEIGHT_DEF = 82;// 71, 58 - public static final int ITEM_HEIGHT_MAX = 243; - public static final int ITEM_SIZE_ICON_VISIBLE = 57; - - - - public static final long KILO = 1000; - public static final long MEGA = 1000000; - - public static final int NOT_INITED = -1; - - public static final int ONE_TICK_PIXEL = 5; - -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimelineEditItemsDialog.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimelineEditItemsDialog.java deleted file mode 100755 index 9babc3e..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimelineEditItemsDialog.java +++ /dev/null @@ -1,523 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Hyunjong Park - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.timeline.common; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.jface.dialogs.Dialog; -import org.eclipse.jface.viewers.TableViewer; -import org.eclipse.swt.SWT; -import org.eclipse.swt.dnd.DND; -import org.eclipse.swt.dnd.DragSource; -import org.eclipse.swt.dnd.DragSourceAdapter; -import org.eclipse.swt.dnd.DragSourceEvent; -import org.eclipse.swt.dnd.DropTarget; -import org.eclipse.swt.dnd.DropTargetAdapter; -import org.eclipse.swt.dnd.DropTargetEvent; -import org.eclipse.swt.dnd.TextTransfer; -import org.eclipse.swt.dnd.Transfer; -import org.eclipse.swt.events.MouseAdapter; -import org.eclipse.swt.events.MouseEvent; -import org.eclipse.swt.events.MouseListener; -import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; -import org.eclipse.swt.events.ShellEvent; -import org.eclipse.swt.events.ShellListener; -import org.eclipse.swt.graphics.Color; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FormAttachment; -import org.eclipse.swt.layout.FormData; -import org.eclipse.swt.layout.FormLayout; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Table; -import org.eclipse.swt.widgets.TableColumn; -import org.eclipse.swt.widgets.TableItem; -import org.tizen.dynamicanalyzer.common.DesignConstants; -import org.tizen.dynamicanalyzer.nl.AnalyzerLabels; -import org.tizen.dynamicanalyzer.nl.ConfigureLabels; -import org.tizen.dynamicanalyzer.nl.TimelineChartLabels; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.FontResources; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.ui.timeline.chart.TimelineChart; -import org.tizen.dynamicanalyzer.ui.toolbar.ConfigureManager; -import org.tizen.dynamicanalyzer.ui.widgets.DAButton; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; -import org.tizen.dynamicanalyzer.widgets.button.DACustomButton; -import org.tizen.dynamicanalyzer.widgets.button.DACustomButtonClickEventListener; - -public class TimelineEditItemsDialog extends Dialog { - - private Shell parent = null; - private Shell shell = null; - private TableViewer chartTableViewer; - private boolean chartChangeSatus = true; - - private TimelineChartManager chartManager = TimelineChartManager - .getInstance(); - - private boolean DragItemStartPlg = true; - private int SwapItemIndexA = 0; - private int SwapItemIndexB = 0; - private int ChangeDragItemIndex = 0; - - private final String strEnableChart = "selected enable"; //$NON-NLS-1$ - private final String strDisableChart = "selected disable"; //$NON-NLS-1$ - - private static boolean RunningDialog = false; - - public TimelineEditItemsDialog(Shell parent, int style) { - super(parent); - this.parent = parent; - setShellStyle(getShellStyle() | SWT.MAX | SWT.RESIZE); - } - public boolean isRunningDialog(){ - return RunningDialog; - } - - private DACustomButtonClickEventListener okButtonListener = new DACustomButtonClickEventListener() { - @Override - public void handleClickEvent(DACustomButton button) { - TableItem[] tableitems = chartTableViewer.getTable().getItems(); - - List chartList = new ArrayList(); - List selectedChartList = new ArrayList(); - - StringBuffer strSaveChartNameList = new StringBuffer(""); //$NON-NLS-1$ - StringBuffer strSaveSelectedChartNameList = new StringBuffer(""); //$NON-NLS-1$ - - for (int i = 0; i < tableitems.length; i++) { - int chartType = Integer.parseInt(tableitems[i].getText(0)); - chartList.add(chartManager.getChartInstance(chartType)); - - strSaveChartNameList.append(tableitems[i].getText(2)); - strSaveChartNameList.append(","); //$NON-NLS-1$ - - if (tableitems[i].getText(3).equals(strEnableChart)) { - selectedChartList.add(chartManager - .getChartInstance(chartType)); - strSaveSelectedChartNameList.append(tableitems[i] - .getText(2)); - strSaveSelectedChartNameList.append(","); //$NON-NLS-1$ - } - } - - for(int i = tableitems.length; i < chartManager.getChartList().size(); i++) { - chartList.add(chartManager.getChartList().get(i)); - selectedChartList.add(chartManager.getChartList().get(i)); - } - - chartManager.setChartList(chartList); - chartManager.setSelectedChartList(selectedChartList); - AnalyzerUtil.getTimelineComposite().resetItems(); - TimelineMaster.getInstance().redrawTimeline(); - - ConfigureManager.getInstance().setValue( - ConfigureLabels.CONFIGUREMANAGER_CHART_AVAILABLE_ITEM_LIST, - strSaveChartNameList.toString()); - ConfigureManager.getInstance().setValue( - ConfigureLabels.CONFIGUREMANAGER_CHART_SELECTED_ITEM_LIST, - strSaveSelectedChartNameList.toString()); - shell.dispose(); - RunningDialog = false; - - } - }; - - private DACustomButtonClickEventListener cancelButtonListener = new DACustomButtonClickEventListener() { - - @Override - public void handleClickEvent(DACustomButton button) { - shell.dispose(); - RunningDialog = false; - } - }; - - private ShellListener shellListener = new ShellListener() { - - @Override - public void shellActivated(ShellEvent e) { - } - - @Override - public void shellClosed(ShellEvent e) { - RunningDialog = false; - } - - @Override - public void shellDeactivated(ShellEvent e) { - } - - @Override - public void shellDeiconified(ShellEvent e) { - } - - @Override - public void shellIconified(ShellEvent e) { - } - - }; - - @Override - public int open() { - shell = new Shell(parent, SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM ); - shell.setText(TimelineChartLabels.EDIT_CHART_DLG_TITLE); - shell.setFont(FontResources.EDIT_CHART_DLG_TITLE); - shell.setBackground(ColorResources.WINDOW_BG_COLOR); - shell.setSize(446, 450); - shell.setLayout(new FormLayout()); - - GridLayout editoeLayout = new GridLayout(); - Composite editorContainer = new Composite(shell, SWT.NONE); - - editorContainer.setLayout(editoeLayout); - - FormData data = new FormData(); - data.top = new FormAttachment(0, 0); - data.bottom = new FormAttachment(100, -49); - data.left = new FormAttachment(0, 0); - data.right = new FormAttachment(100, 0); - editorContainer.setLayoutData(data); - editorContainer.setBackground(ColorResources.EDIT_CHART_DIALOG_UPPER); - chartTableViewer = new TableViewer(editorContainer, SWT.MULTI - | SWT.FULL_SELECTION); - GridData tableGridData = new GridData(GridData.FILL_BOTH); - chartTableViewer.getTable().setLayoutData(tableGridData); - chartTableViewer.getTable().setLinesVisible(true); - - for (int i = 0; i < 4; i++) { - if (i == 0) - new TableColumn(chartTableViewer.getTable(), SWT.NONE) - .setWidth(82); - else if (i == 1) - new TableColumn(chartTableViewer.getTable(), SWT.NONE) - .setWidth(330); - else if (i == 2) - new TableColumn(chartTableViewer.getTable(), SWT.NONE) - .setWidth(0); - else if (i == 3) - new TableColumn(chartTableViewer.getTable(), SWT.NONE) - .setWidth(0); - } - - final List chartList = chartManager.getChartList(); - int chartListSize = chartList.size(); - List selectedChartList = chartManager - .getSelectedChartList(); - - final TableItem[] items = new TableItem[chartListSize]; - for (int i = 0; i < chartListSize; i++) { - items[i] = new TableItem(chartTableViewer.getTable(), SWT.NONE, i); - items[i].setText(0, String.valueOf(chartList.get(i).getChartType())); - items[i].setFont(FontResources.EDIT_CHART_DLG_TITLE); - items[i].setImage(0, ImageResources.ADD_CHART_CPU); - items[i].setText(1, " "); //$NON-NLS-1$ - items[i].setText(2, chartList.get(i).getChartName()); - items[i].setText(3, strDisableChart); - - for (int j = 0; j < selectedChartList.size(); j++) { - if (chartList.get(i).getChartType() == selectedChartList.get(j) - .getChartType()) { - items[i].setText(3, strEnableChart); - break; - } - } - } - - Listener paintListener = new Listener() { - public void handleEvent(Event event) { - switch (event.type) { - case SWT.MeasureItem: { - TableItem item = (TableItem) event.item; - String text = item.getText(event.index + 1); - Point size = event.gc.textExtent(text); - event.width = size.x; - event.height = Math.max(event.height, size.y); - - break; - } - case SWT.PaintItem: { - int width = chartTableViewer.getTable().getClientArea().width; - - TableItem item = (TableItem) event.item; - - String itemName = item.getText(event.index + 1); - Point size = event.gc.textExtent(itemName); - int offset2 = event.index == 0 ? Math.max(0, - (event.height - size.y) / 2) : 0; - - String itemExplan = ""; //$NON-NLS-1$ - size = event.gc.textExtent(itemExplan); - offset2 = event.index == 0 ? Math.max(0, - (event.height - size.y) / 2) : 0; - - String strItemStatus = item.getText(3); - - GC gc = event.gc; - event.gc.setAdvanced(true); - Rectangle rect = event.getBounds(); - Color foreground = gc.getForeground(); - Color background = gc.getBackground(); - if (strItemStatus.equals(strEnableChart)) { - event.gc.setForeground(ColorResources.ADD_CHART_ENABLE_COLOR_START); - event.gc.setBackground(ColorResources.ADD_CHART_ENABLE_COLOR_END); - } else { - event.gc.setForeground(ColorResources.ADD_CHART_DISABLE_COLOR_START); - event.gc.setBackground(ColorResources.ADD_CHART_DISABLE_COLOR_END); - - } - - event.gc.fillGradientRectangle(0, rect.y, width, 66, true); - gc.setForeground(foreground); - gc.setBackground(background); - event.detail &= ~SWT.SELECTED; - - if (strItemStatus.equals(strEnableChart) - && event.index == 1) { - event.gc.drawImage(ImageResources.ADD_CHART_ON, 374, - event.y + 6); - } else { - event.gc.drawImage(ImageResources.ADD_CHART_OFF, 374, - event.y + 6); - } - - if (event.index == 0) { - - if (strItemStatus.equals(strDisableChart)) { - event.gc.setAlpha(150); - } - - Image addIcon = chartManager.getChartInstance( - Integer.parseInt(item.getText(0))).getAddIcon(); - event.gc.drawImage(addIcon, 3, event.y); - - } else if (event.index == 1) { - event.gc.drawText(itemName, event.x + 20, event.y - + offset2 + 24, true); - event.gc.setForeground(ColorResources.BLACK); - } - - break; - } - case SWT.EraseItem: { - event.detail &= ~SWT.FOREGROUND; - break; - } - } - } - }; - chartTableViewer.getTable().addListener(SWT.MeasureItem, paintListener); - chartTableViewer.getTable().addListener(SWT.PaintItem, paintListener); - chartTableViewer.getTable().addListener(SWT.EraseItem, paintListener); - chartTableViewer.getTable().addMouseListener(itemZoomMouseListener); - - Transfer[] types = new Transfer[] { TextTransfer.getInstance() }; - DragSource source = new DragSource(chartTableViewer.getTable(), - DND.DROP_MOVE | DND.DROP_COPY); - source.setTransfer(types); - source.addDragListener(new DragSourceAdapter() { - public void dragSetData(DragSourceEvent event) { - DragSource ds = (DragSource) event.widget; - Table table = (Table) ds.getControl(); - TableItem[] selection = table.getSelection(); - StringBuffer buff = new StringBuffer(); - for (int i = 0, n = selection.length; i < n; i++) { - buff.append(selection[i].getText()); - } - event.data = buff.toString(); - - chartChangeSatus = false; - } - }); - - DropTarget target = new DropTarget(chartTableViewer.getTable(), - DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_DEFAULT); - target.setTransfer(types); - target.addDropListener(new DropTargetAdapter() { - public void dragEnter(DropTargetEvent event) { - - if (DragItemStartPlg == true) { - SwapItemIndexA = chartTableViewer.getTable() - .getSelectionIndex(); - DragItemStartPlg = false; - } - - if (event.detail == DND.DROP_DEFAULT) { - event.detail = (event.operations & DND.DROP_COPY) != 0 ? DND.DROP_COPY - : DND.DROP_NONE; - } - for (int i = 0, n = event.dataTypes.length; i < n; i++) { - if (TextTransfer.getInstance().isSupportedType( - event.dataTypes[i])) { - event.currentDataType = event.dataTypes[i]; - } - } - } - - public void dragOver(DropTargetEvent event) { - event.feedback = DND.FEEDBACK_SELECT | DND.FEEDBACK_SCROLL; - - DropTarget target = (DropTarget) event.widget; - Table table = (Table) target.getControl(); - - Point point = shell.getDisplay().map(null, table, event.x, - event.y); - TableItem tblItemTarget = table.getItem(point); - if (tblItemTarget == null) { - return; - } - - SwapItemIndexB = table.indexOf(tblItemTarget); - - if (ChangeDragItemIndex != SwapItemIndexB) { - TableItem[] chartTableItems = chartTableViewer.getTable() - .getItems(); - - String strIndexA = null; - String strIndexB = null; - - strIndexA = chartTableItems[SwapItemIndexA].getText(0); - strIndexB = chartTableItems[SwapItemIndexB].getText(0); - - chartTableItems[SwapItemIndexB].setText(0, strIndexA); - chartTableItems[SwapItemIndexA].setText(0, strIndexB); - - strIndexA = chartTableItems[SwapItemIndexA].getText(2); - strIndexB = chartTableItems[SwapItemIndexB].getText(2); - - chartTableItems[SwapItemIndexB].setText(2, strIndexA); - chartTableItems[SwapItemIndexA].setText(2, strIndexB); - - strIndexA = chartTableItems[SwapItemIndexA].getText(3); - strIndexB = chartTableItems[SwapItemIndexB].getText(3); - - chartTableItems[SwapItemIndexB].setText(3, strIndexA); - chartTableItems[SwapItemIndexA].setText(3, strIndexB); - - chartTableViewer.getTable().setDragDetect(true); - chartTableViewer.getTable().redraw(); - - int tempIndex = 0; - tempIndex = SwapItemIndexA; - SwapItemIndexA = SwapItemIndexB; - SwapItemIndexB = tempIndex; - - } - ChangeDragItemIndex = SwapItemIndexB; - } - - public void drop(DropTargetEvent event) { - DragItemStartPlg = true; - if (TextTransfer.getInstance().isSupportedType( - event.currentDataType)) { - } - } - }); - - Composite buttonComp = new Composite(shell, SWT.NONE); - buttonComp.setBackground(ColorResources.EDIT_CHART_DIALOG_LOWER); - buttonComp.setLayout(new FormLayout()); - data = new FormData(); - data.top = new FormAttachment(editorContainer, 0); - data.bottom = new FormAttachment(100, 0); - data.left = new FormAttachment(0, 0); - data.right = new FormAttachment(100, 0); - buttonComp.setLayoutData(data); - - DAButton okButton = new DAButton(buttonComp, SWT.PUSH); - okButton.addClickListener(okButtonListener); - okButton.setText(AnalyzerLabels.OK); - data = new FormData(); - data.top = new FormAttachment(0, 8); - data.left = new FormAttachment(0, 119); - data.width = DesignConstants.DA_BUTTON_WIDTH; - data.height = DesignConstants.DA_BUTTON_HEIGHT; - okButton.setLayoutData(data); - - DAButton cancelButton = new DAButton(buttonComp, SWT.PUSH); - cancelButton.addClickListener(cancelButtonListener); - cancelButton.setText(AnalyzerLabels.CANCEL); - data = new FormData(); - data.top = new FormAttachment(0, 8); - data.left = new FormAttachment(okButton, 8); - data.width = DesignConstants.DA_BUTTON_WIDTH; - data.height = DesignConstants.DA_BUTTON_HEIGHT; - cancelButton.setLayoutData(data); - - buttonComp.addPaintListener(new PaintListener() { - @Override - public void paintControl(PaintEvent e) { - Composite comp = (Composite) e.widget; - Rectangle rect = comp.getClientArea(); - e.gc.setForeground(ColorResources.DIALOG_SUNKEN_1); - e.gc.drawLine(rect.x, rect.y, rect.x + rect.width, rect.y); - e.gc.setForeground(ColorResources.DIALOG_SUNKEN_2); - e.gc.drawLine(rect.x, rect.y + 1, rect.x + rect.width, - rect.y + 1); - } - }); - - // Adds listeners. - RunningDialog = true; - shell.addShellListener(shellListener); - shell.open(); - - - - - return 0; - } - - private MouseListener itemZoomMouseListener = new MouseAdapter() { - public void mouseUp(MouseEvent event) { - if (chartChangeSatus == true) { - Table table = chartTableViewer.getTable(); - int selectItemIndex = table.getSelectionIndex(); - TableItem[] chartTableItems = chartTableViewer.getTable() - .getItems(); - if (chartTableItems[selectItemIndex].getText(3).equals( - strEnableChart)) { - chartTableItems[selectItemIndex] - .setText(3, strDisableChart); - } else if (chartTableItems[selectItemIndex].getText(3).equals( - strDisableChart)) { - chartTableItems[selectItemIndex].setText(3, strEnableChart); - } - chartTableViewer.getTable().redraw(); - } - chartChangeSatus = true; - } - }; -} \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimelineGlobalVariable.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimelineGlobalVariable.java deleted file mode 100644 index 0d597f4..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimelineGlobalVariable.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Sanghyun Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.timeline.common; - - - -public class TimelineGlobalVariable { - public static int currentScaleValue = 0; - public static int oriScaleValue = 0; - - public static int timetickWidthPx = TimelineConstants.NOT_INITED; - - public static int startPx = 0; - public static int endPx = TimelineConstants.NOT_INITED; - - public static int originalEndPx = TimelineConstants.NOT_INITED; - public static int chartRunningSec = TimelineConstants.NOT_INITED; - - public static boolean scaleChanged = false; - public static boolean allowRedrawTimeTickCanvas = true; - - public enum EnumScaleSec { - SCALE_0(10), SCALE_1(5), SCALE_2(1); - private int scaleSec; - private EnumScaleSec(int scaleValue) { - this.scaleSec = scaleValue; - } - - public int getScaleSec() { - return scaleSec; - } - } - - public static long TOTAL_MEMORY = 90; - public static boolean SUPPORT_WIFI = false; - public static boolean SUPPORT_BLUETOOTH = false; - public static boolean SUPPORT_GPS = false; -} diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimelineItemManager.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimelineItemManager.java deleted file mode 100755 index 16d15dc..0000000 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/common/TimelineItemManager.java +++ /dev/null @@ -1,672 +0,0 @@ -/* - * Dynamic Analyzer - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: - * Sanghyun Lee - * Juyoung Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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.timeline.common; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.ScrolledComposite; -import org.eclipse.swt.events.MouseAdapter; -import org.eclipse.swt.events.MouseEvent; -import org.eclipse.swt.events.MouseListener; -import org.eclipse.swt.graphics.GC; -import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.graphics.Rectangle; -import org.eclipse.swt.layout.FillLayout; -import org.eclipse.swt.layout.FormAttachment; -import org.eclipse.swt.layout.FormData; -import org.eclipse.swt.layout.FormLayout; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.layout.RowData; -import org.eclipse.swt.widgets.Canvas; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Listener; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.DASelectionData; -import org.tizen.dynamicanalyzer.resources.ColorResources; -import org.tizen.dynamicanalyzer.resources.FontResources; -import org.tizen.dynamicanalyzer.resources.ImageResources; -import org.tizen.dynamicanalyzer.ui.timeline.chart.ScreenshotChart; -import org.tizen.dynamicanalyzer.ui.timeline.chart.TimelineChart; -import org.tizen.dynamicanalyzer.utils.AnalyzerUtil; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChart; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartPlot; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartPlotIntervalMarker; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartPlotTooltip; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomChartSeries; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomScreenshotChartPlot; -import org.tizen.dynamicanalyzer.widgets.chart.DACustomUIEventChartPlot; - -public class TimelineItemManager { - private static TimelineItemManager instance = null; - - private final int ITEM_INFO_ZOOM_HEIGHT = 16; - private final int ITEM_INFO_ICON_HEIGHT = 50; - private final int ITEM_INFO_LABEL_HEIGHT = 20; - - private Composite itemsAreaComp; // same with TimelineView's - private TimelineChartManager chartManager = TimelineChartManager.getInstance(); - - List itemInfoList; - List seletedItemList; - List