[Title] DA Singleton change algorithm
authorphjwithyou.park <phjwithyou.park@samsung.com>
Wed, 1 Aug 2012 05:58:02 +0000 (14:58 +0900)
committerphjwithyou.park <phjwithyou.park@samsung.com>
Wed, 1 Aug 2012 05:58:02 +0000 (14:58 +0900)
[Type] feature
[Module] init
[Priority] normal
[CQ#]
[Redmine#] 6185
[Problem]
[Cause]
[Solution]
[TestCase]

org.tizen.dynamicanalyzer.workbench/src/org/tizen/dynamicanalyzer/workbench/Application.java

index 6c8eed8..d65a195 100644 (file)
@@ -23,13 +23,15 @@ import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.PlatformUI;
 
 class Monitor extends Thread {
+       static int portNumber = 6824;
        public boolean bDARunning = false;
+       
        public void run( ) {
                try {
-                       ServerSocket local = new ServerSocket(56592);
+                       portNumber += 12345;
+                       ServerSocket local = new ServerSocket(portNumber);
                        local.accept();
                } catch (SocketException e) {
-                       System.out.println("Application Running 1\n");
                        bDARunning = true;                  
                } catch (IOException e) {
                        e.printStackTrace();
@@ -46,7 +48,7 @@ public class Application implements IApplication {
                Shell dialog = new Shell(display);
                Shell shell = new Shell(dialog);
                
-               shell.setSize(460, 153);
+               shell.setSize(420, 153);
                FormLayout shellLayout = new FormLayout();
                shell.setLayout(shellLayout);
                shell.setText("Info");
@@ -81,10 +83,10 @@ public class Application implements IApplication {
                buildTime.setForeground( new Color( display, 0, 0, 0 ) );
 
                FormData labelData = new FormData();
-               labelData.left = new FormAttachment(0, 10);
+               labelData.left = new FormAttachment(0, 23);
                labelData.top = new FormAttachment(0, 6);
                labelData.height = 64;
-               labelData.width = 45;
+               labelData.width = 35;
                icon.setLayoutData(labelData);
 
                labelData = new FormData();
@@ -153,16 +155,20 @@ public class Application implements IApplication {
                 ApplicationWorkbenchWindowAdvisor.appName = args[1];
             }
 
-            Monitor monitor =new Monitor( );
-            monitor.start( );
+                       Monitor monitor_1 =new Monitor( );
+                       monitor_1.start();
+            Thread.sleep(100);
+            
+            Monitor monitors_2 =new Monitor( );
+            monitors_2.start();
             Thread.sleep(100);
-            if ( monitor.bDARunning == true )
+
+            if ( monitor_1.bDARunning == true && monitors_2.bDARunning == true )
             {
-               RunningDlg( display );
+                               RunningDlg(display);
             }
             
             int returnCode =PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
-
             if (returnCode == PlatformUI.RETURN_RESTART) {
                 return IApplication.EXIT_RESTART;
             } else {