[Title] fix bug and remove some unnecessary code
authorgreatim <jaewon81.lim@samsung.com>
Mon, 3 Mar 2014 02:25:23 +0000 (11:25 +0900)
committergreatim <jaewon81.lim@samsung.com>
Mon, 3 Mar 2014 02:25:23 +0000 (11:25 +0900)
[Desc.]
[Issue]

org.tizen.dynamicanalyzer.workbench/src/org/tizen/dynamicanalyzer/workbench/Application.java
org.tizen.dynamicanalyzer.workbench/src/org/tizen/dynamicanalyzer/workbench/ApplicationWorkbenchWindowAdvisor.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/sql/DBTableManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/sql/SqlManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/MessageParser.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/SWAPLogParser.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/format/SystemLogFormat.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/ToolbarArea.java

index fa108fc..c4cc9bb 100755 (executable)
@@ -54,11 +54,13 @@ public class Application implements IApplication {
        public Object start(IApplicationContext context) throws Exception {
                Display display = PlatformUI.createDisplay();
 
+               // set workspace directory for dynamic analyzer
                Location instanceLoc = Platform.getInstanceLocation();
                String path = WorkbenchUtils.DYNAMIC_ANALYZER_INSTALL_PATH
                                + File.separator;
                instanceLoc.set(new URL("file", null, path), false);
 
+               // create log file of dynamic analyzer
                SimpleDateFormat format = new SimpleDateFormat("yyyy_MM_dd_HH-mm-ss", //$NON-NLS-1$
                                Locale.KOREA);
                Date date = new Date();
@@ -89,6 +91,7 @@ public class Application implements IApplication {
                        }
                }
 
+               // check for multiple instance of dynamic analyzer
                if (WorkbenchSingletonFocusManager.checkDASingleton()) {
                        System.out.println("Already DA Running");
                        WorkbenchSingletonFocusManager.setFocusDA();
@@ -97,14 +100,6 @@ public class Application implements IApplication {
                        System.out.println("First DA Running");
                }
 
-               String[] argv = (String[]) context.getArguments().get(
-                               "application.args");//$NON-NLS-1$
-               if (argv.length > 0) {
-                       ApplicationWorkbenchWindowAdvisor.setAutoStart(true);
-               } else {
-                       ApplicationWorkbenchWindowAdvisor.setAutoStart(false);
-               }
-
                int returnCode = PlatformUI.createAndRunWorkbench(display,
                                new ApplicationWorkbenchAdvisor());
 
index 082c7ee..e0f9168 100755 (executable)
@@ -57,7 +57,6 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
        private static final int MIN_HEIGHT = 600;
        private int width = DEFAULT_WIDTH;
        private int height = DEFAULT_HEIGHT;
-       static boolean isAutoStart = false;
 
        public ApplicationWorkbenchWindowAdvisor(
                        IWorkbenchWindowConfigurer configurer) {
@@ -72,6 +71,7 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
 
        @Override
        public void createWindowContents(Shell shell) {
+               // customize workbench window
                ToolbarArea.createInstance(getWindowConfigurer(), shell);
                PathManager.setLogPostFix(WorkbenchUtils.getLogPostFix());
                AboutDialog.updateBuildInfoForMac();
@@ -120,13 +120,6 @@ public class ApplicationWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor {
 
                AnalyzerUtil.executeCommand(ExitHandler.ID);
 
-               if (null != ToolbarArea.getInstance()) {
-                       ToolbarArea.getInstance().dispose();
-               }
                return true;
        }
-
-       public static void setAutoStart(boolean status) {
-               isAutoStart = status;
-       }
 }
index 5e948a9..59d6222 100755 (executable)
@@ -74,6 +74,7 @@ public class DBTableManager {
        public static final String EMPTY = CommonConstants.EMPTY;
        public static final String TEXT = "VARCHAR(256)";//$NON-NLS-1$
        public static final String BIG_TEXT = "VARCHAR(1024)";//$NON-NLS-1$
+       public static final String BIGBIG_TEXT = "VARCHAR(16384)";//$NON-NLS-1$
 //     public static final String TEXT = "LONGVARCHAR";//$NON-NLS-1$
 //     public static final String BIG_TEXT = "LONGVARCHAR";//$NON-NLS-1$
        public static final String INTEGER = "INTEGER";//$NON-NLS-1$
index 448294e..709d999 100755 (executable)
@@ -269,6 +269,8 @@ public class SqlManager {
                                type = DBTableManager.LONG;
                        } else if (dbTypes.get(i) == LogFormat.S) {
                                type = DBTableManager.BIG_TEXT;
+                       } else if (dbTypes.get(i) == LogFormat.LV) {
+                               type = DBTableManager.BIGBIG_TEXT;
                        }
                        query.append(type);
                        if (i + 1 == size) {
index 999eb2d..5d0d0cd 100755 (executable)
@@ -72,7 +72,7 @@ import org.tizen.dynamicanalyzer.ui.widgets.DADialog;
 import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
 
 public class MessageParser {
-       static final boolean PRINT_DATA_LOG_TOFILE = false;
+       static final boolean PRINT_DATA_LOG_TOFILE = true;
 
        static final int MSG_ID_INDEX = 0;
        static final int MSG_LENGTH_INDEX = 1;
@@ -230,8 +230,13 @@ public class MessageParser {
                                .getNano();
 
                if (0 == startSec && 0 == startNano) {
-                       startTime.setSec(ByteUtils.toInt(data, 8));
-                       startTime.setNano(ByteUtils.toInt(data, 12));
+                       // original code (before webapp support)
+                       startTime.setSec(sec);
+                       startTime.setNano(nano);
+                       
+                       // for webapp support
+//                     startTime.setSec(ByteUtils.toInt(data, 8));
+//                     startTime.setNano(ByteUtils.toInt(data, 12));
                        AnalyzerManager.getProject().setProfileStartTime(startTime);
                }
 
index 276e1ae..12ce1e7 100755 (executable)
@@ -177,10 +177,10 @@ public class SWAPLogParser implements Runnable {
                                        }
 
                                        // irregular call check still necessary?
-                                       if (AnalyzerManager.getCallstackManager()
-                                                       .isIrregularUserCall(pData)) {
-                                               continue;
-                                       }
+//                                     if (AnalyzerManager.getCallstackManager()
+//                                                     .isIrregularUserCall(pData)) {
+//                                             continue;
+//                                     }
 
                                        ProcessInfo processInfo = processInfoPkg
                                                        .getProcessInfo(pData.getTime());
index 00098c1..1967b59 100644 (file)
@@ -56,7 +56,7 @@ public class SystemLogFormat extends LogFormat {
                dbColumnNames.addAll(Arrays.asList(dcn));
 
                Integer[] dct = { T, T, T,I, T,
-                               I, S,
+                               I, LV,
                                I, I, I, I,I, L, L,
                                I, I,I, I, I,
                                I, I,
index 7c34ef1..7bfcd89 100755 (executable)
@@ -32,7 +32,6 @@ import java.util.HashMap;
 import java.util.List;
 
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Cursor;
 import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.layout.FormAttachment;
 import org.eclipse.swt.layout.FormData;
@@ -126,8 +125,6 @@ public class ToolbarArea {
 
        private DACustomToggleButton viewSourceButton;
 
-       private Cursor cursor;
-
        private static final int TIMER_WIDTH = 121;
        private static int COMBO_FIRST_INDEX = 0;
 
@@ -199,7 +196,7 @@ public class ToolbarArea {
                toolbarComposite.setBackground(ColorResources.COOLBAR_BG_COLOR);
 
                createToolbar(toolbarComposite);
-
+               
                Control page = configurer.createPageComposite(baseComposite);
 
                FormData data = new FormData();
@@ -830,12 +827,6 @@ public class ToolbarArea {
                addToolbarListeners();
        }
 
-       public void dispose() {
-               if (null != cursor) {
-                       cursor.dispose();
-               }
-       }
-
        public long getTime() {
                return timerClock.getTimeInMicroseconds();
        }