Squashed commit of the following:
authorjihye kim <jihye1128.kim@samsung.com>
Thu, 26 Apr 2012 10:48:24 +0000 (19:48 +0900)
committerjihye kim <jihye1128.kim@samsung.com>
Thu, 26 Apr 2012 10:48:24 +0000 (19:48 +0900)
commit 6a0b6acdd1a1c35d07bb296ce49bde84d347828a
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Mon Apr 23 21:11:16 2012 +0900

    [Title]change version name to "TIZEN Larkspur"
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 8cc630dd902bc750ed60cccf5978d3224775eb8a
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Mon Apr 23 20:37:26 2012 +0900

    [Title]change version name to "TIZEN Larkspur"
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit bc3fb0eef0edb94e8f1e6a4b63e44f40833ae462
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Sun Apr 22 20:40:35 2012 +0900

    [Title]change version name to Larkspur on about dialog
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 418e3775592b24653a06f4b5840e2018189dfe7b
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Sun Apr 22 20:27:01 2012 +0900

    [Title]change version name to Larkspur
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 3fcd76afc9b74342045393e5a963ef312ad5436b
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Fri Apr 20 11:00:06 2012 +0900

    [Title]remove SD Card XMLSchema
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 400073a8af81f93cf506fe59e5812318ddca8be7
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Thu Apr 19 22:32:50 2012 +0900

    [Title]Remove SD card
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 24a06ddd7bcd2d69141894ade41c5ca5d962e248
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Thu Apr 19 18:44:10 2012 +0900

    [Title]change version name to Larkspur and fix checking kvm routine
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit f169672b1877d8f78946fd132f5306f36c7c8aad
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Wed Apr 18 17:25:03 2012 +0900

    [Title]add logs and exception handling
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 7e89dd30b128cd108b0a113952344714208f124a
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Mon Apr 16 16:10:55 2012 +0900

    [Title]'Create Base Image' button not changed when check multi VM
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 9ec16b9fa2ad94365cf8e79baa848ae98118cbeb
Author: jihye kim <jihye1128.kim@samsung.com>
Date:   Sun Apr 15 18:28:03 2012 +0900

    [Title] modify 'reset' and 'delete' button state
    [Type] bug fix
    [Module] emulator manager
    [Priority] major
    [Jira#] N_SE-602
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 4cacd07512f0146e4224ec9cedfa7d2f11ff524f
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Sat Apr 14 00:21:11 2012 +0900

    [Title]fix multi instance checking on windows
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 926916b62f5b00455b50938d02083528e8eb4c55
Author: jihye kim <jihye1128.kim@samsung.com>
Date:   Fri Apr 13 04:06:27 2012 +0900

    [Title] modify dpi and delete hax dialog
    [Type] bug fix
    [Module] emulator manager
    [Priority] major
    [Jira#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit cf74ea31f73ef015d149c0a92c110a13abb0492f
Author: jihye kim <jihye1128.kim@samsung.com>
Date:   Fri Apr 13 01:51:51 2012 +0900

    [Title] add check hex program
    [Type] work
    [Module] emulator manager
    [Priority] major
    [Jira#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 8c62fc884ab3d4ada1ec85a4d78064e41ed52128
Author: jihye kim <jihye1128.kim@samsung.com>
Date:   Tue Apr 10 21:21:23 2012 +0900

    [Title] change max length of vm name 19 -> 20
    [Type] bug fix
    [Module] emulator manager
    [Priority] major
    [Jira#] N_SE-500
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 31de06bf543720a85819dad1a74d1ab29f904fef
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Sat Apr 7 17:46:52 2012 +0900

    [Title]do not use Create Base Image while VM is running
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit ff77332fdc11d327002057fa11ff92151b022c11
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Sat Apr 7 15:24:50 2012 +0900

    [Title]version up to 1.0.40
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit abad36526d3658917e79fdc3ac93f2bb9a721c85
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Sat Apr 7 14:17:10 2012 +0900

    [Title]fix file sharing not working on windows
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 786ea0fcf7a0d28cff6820aee9bcc8665be26676
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Sat Apr 7 04:47:32 2012 +0900

    [Title]version up to 1.0.39
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit f3db9fb4b17985e6269f53d977a31ca85d178283
Merge: e75978a e692f8a
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Sat Apr 7 04:57:18 2012 +0900

    Merge "[Title]fix starting emulator manager routine [Type] [Module] [Priority] [CQ#] [Redmine#] [Problem] [Cause] [Solution] [TestCase]" into release-1.0

commit e692f8a733a99e944a668f8a8be626a956da19d9
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Sat Apr 7 04:45:11 2012 +0900

    [Title]fix starting emulator manager routine
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit e75978ab13de7de5351e8556b8cffefc2c08077b
Author: jihye kim <jihye1128.kim@samsung.com>
Date:   Sat Apr 7 01:47:07 2012 +0900

    [Title] modify control empty .tizen_vms_path
    [Type] bug fix
    [Module] emulator manager
    [Priority] major
    [Jira#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 5e97754f091ad6e33756825d213c874382dd001d
Author: jihye kim <jihye1128.kim@samsung.com>
Date:   Sat Apr 7 01:05:56 2012 +0900

    [Title] bug fix -> deselected item issue
    [Type] bug fix
    [Module] emulator manager
    [Priority] major
    [Jira#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 9ee5fcb734145e38d558a3e8a0310eec6aba760e
Merge: 7541de5 e0eda3a
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Sat Apr 7 00:49:46 2012 +0900

    Merge "[Title]change javaw to java [Type] [Module] [Priority] [CQ#] [Redmine#] [Problem] [Cause] [Solution] [TestCase]" into release-1.0

commit e0eda3a2f15e1f4a55f7d29cd24e8c778895383a
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Sat Apr 7 00:37:57 2012 +0900

    [Title]change javaw to java
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 7541de599acf37950dd912288c633378a15d242f
Author: jihye kim <jihye1128.kim@samsung.com>
Date:   Sat Apr 7 00:14:02 2012 +0900

    [Title] change skin type popup
    [Type] work
    [Module] emulator manager
    [Priority] major
    [Jira#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 0442811c3fdd5eb992b514d2042ace29a69bd74d
Author: jihye kim <jihye1128.kim@samsung.com>
Date:   Sat Apr 7 00:09:59 2012 +0900

    [Title] update package version
    [Type] work
    [Module] emulator manager
    [Priority] major
    [Jira#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit a0711bece4d31c30942c93b6dc1c9a939c7e3680
Merge: dd44147 6b55c3d
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Sat Apr 7 00:08:41 2012 +0900

    Merge "[Title]change position of checking authrization [Type] [Module] [Priority] [CQ#] [Redmine#] [Problem] [Cause] [Solution] [TestCase]" into release-1.0

commit 90cc7abc3df3dab1e039a2c7c651729b88258c90
Author: jihye kim <jihye1128.kim@samsung.com>
Date:   Sat Apr 7 00:06:22 2012 +0900

    [Title] modify select workspace module
    [Type] bug fix
    [Module] emulator manager
    [Priority] major
    [Jira#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 6b55c3de84d8efc73a29c8013af6a8ecd53502ea
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Fri Apr 6 23:56:36 2012 +0900

    [Title]change position of checking authrization
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit dd44147397c29321aff39d46cf61fc63a502876f
Merge: 7a49d4f 3b58ad0
Author: yeongkyoon lee <yeongkyoon.lee@samsung.com>
Date:   Fri Apr 6 23:56:26 2012 +0900

    Merge "[Title] UI bugs fix and add context menu icon (create base image) [Type] [Module] Emulator/ [Priority] [CQ#] [Redmine#] [Problem] [Cause] [Solution] [TestCase]" into release-1.0

commit 7a49d4f77aedfecd5d716574ee3d02e194effc80
Merge: f7e95cc f3866ac
Author: yeongkyoon lee <yeongkyoon.lee@samsung.com>
Date:   Fri Apr 6 23:52:12 2012 +0900

    Merge "[Title] Avoid table packing bugs on linux [Type] [Module] Emulator/ [Priority] [CQ#] [Redmine#] [Problem] [Cause] [Solution] [TestCase]" into release-1.0

commit 3b58ad066024121e6caf7b203c9d33e7569f68dc
Author: syeon.hwang <syeon.hwang@samsung.com>
Date:   Fri Apr 6 23:41:30 2012 +0900

    [Title] UI bugs fix and add context menu icon (create base image)
    [Type]
    [Module] Emulator/
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit f7e95cc86138d7ac34d0b1dcc99c049e2f3e4599
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Fri Apr 6 23:32:45 2012 +0900

    [Title]fix creating directory authorization
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit f3866ac3b275a1c32207f0c4104f13df189979df
Author: syeon.hwang <syeon.hwang@samsung.com>
Date:   Fri Apr 6 23:24:17 2012 +0900

    [Title] Avoid table packing bugs on linux
    [Type]
    [Module] Emulator/
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 146e3f7484355ccf8e438c6a373f200e963b1b88
Author: jihye kim <jihye1128.kim@samsung.com>
Date:   Fri Apr 6 21:11:29 2012 +0900

    [Title] emulator mamager version up
    [Type] work
    [Module] emulator manager
    [Priority] major
    [Jira#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit e7cdfd9fdb347e9182d34888a244a33f8d441006
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Fri Apr 6 17:56:58 2012 +0900

    [Title]fix sentence
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 9091c41c8c32ab0ba830fc35919231c83e1e87e9
Author: jihye kim <jihye1128.kim@samsung.com>
Date:   Fri Apr 6 15:55:52 2012 +0900

    [Title] change dialog init mode
    [Type] bug fix
    [Module] emulator manager
    [Priority] major
    [Jira#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit a014150b531b46ba9d15fb0a073c37e9a2e99951
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Fri Apr 6 15:42:00 2012 +0900

    [Title]create thread for run emulator-manager.jar
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 514ebbaa127a019ea6f131f28c43f674355be4e4
Author: jihye kim <jihye1128.kim@samsung.com>
Date:   Fri Apr 6 15:28:37 2012 +0900

    [Title] delete literal strings and unused source
    [Type] work
    [Module] emulator manager
    [Priority] major
    [Jira#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit c0ea2b6107669365ed0149654c3f00d940c4b14a
Author: jihye kim <jihye1128.kim@samsung.com>
Date:   Fri Apr 6 15:09:59 2012 +0900

    [Title] change MessageBox -> MessageDialog
    [Type] work
    [Module] emulator manager
    [Priority] major
    [Jira#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 45ba0b239454e9f5697549b86a75ec000ac7dc3b
Author: jihye kim <jihye1128.kim@samsung.com>
Date:   Fri Apr 6 14:39:03 2012 +0900

    [Title] change contextmenu order
    [Type] work
    [Module] emulator manager
    [Priority] major
    [Jira#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 65366930cf31b22eb7df4acf463a5bc9e3cd4471
Author: jihye kim <jihye1128.kim@samsung.com>
Date:   Fri Apr 6 14:27:11 2012 +0900

    [Title] modify control toolbar
    [Type] work
    [Module] emulator manager
    [Priority] major
    [Jira#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit f05799db796f28b3b4a420436ba1e272def6501b
Author: jihye kim <jihye1128.kim@samsung.com>
Date:   Fri Apr 6 14:05:46 2012 +0900

    [Title] add create image tool item
    [Type] work
    [Module] emulator manager
    [Priority] major
    [Jira#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 96cd48b89250c4e668d6241902d95e82dbeb6c27
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Fri Apr 6 13:58:53 2012 +0900

    [Title]fix message of Clone dialog
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 9656214814bd1c75b183ffa1a623c19f0c55123d
Author: syeon.hwang <syeon.hwang@samsung.com>
Date:   Fri Apr 6 12:24:03 2012 +0900

    [Title] Add null checking
    [Type]
    [Module] Emulator/
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 2b03320d6be26bc16b7cecdbfd3e2749f575e546
Author: jihye kim <jihye1128.kim@samsung.com>
Date:   Fri Apr 6 11:57:26 2012 +0900

    [Title] add selecting vms path
    [Type] work
    [Module] emulator manager
    [Priority] major
    [Jira#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit dabcbb44a328c6b485f9550c7b37e9bdbd1be4d1
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Thu Apr 5 23:09:01 2012 +0900

    [Title]fix directory authority
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]raise exception when User can't create file or directory.
    [Cause]
    [Solution]
    [TestCase]

commit 71e67b85c2565d548ac4a03fc93a30c9f1b7aa12
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Thu Apr 5 22:21:07 2012 +0900

    [Title]modify dialog sentences
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit c9dfdd7faebde1715b912e4d4a9ecd6b50434b6f
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Thu Apr 5 21:30:52 2012 +0900

    [Title]fill contents of About Dialog
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit cf8bbac01d0ac0ae6665b1c9d10917d38e671880
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Thu Apr 5 18:07:51 2012 +0900

    [Title]add save mode when use workspace option
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 1b376bee693a571de08d2074d6812ca0d0ab63fe
Author: jihye kim <jihye1128.kim@samsung.com>
Date:   Thu Apr 5 16:29:55 2012 +0900

    [Title] modify setting workspace
    [Type] work
    [Module] emulator manager
    [Priority] major
    [Jira#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 5425d93028b115d56702284c80f61205400c5930
Author: syeon.hwang <syeon.hwang@samsung.com>
Date:   Thu Apr 5 15:34:54 2012 +0900

    [Title] disable clone item by default
    [Type]
    [Module] Emulator/
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 502ffe995a3471f4f14946277f27c96fc7f1d265
Author: syeon.hwang <syeon.hwang@samsung.com>
Date:   Thu Apr 5 15:21:55 2012 +0900

    [Title] Introduce new UI based on tool items
    [Type]
    [Module] Emulator/
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit a2c48784b8a7d4ec289212035bf767303db9cfc8
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Wed Apr 4 21:14:25 2012 +0900

    [Title]remove unused source code
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit df90e4e3b78a58f5c4efb0f129730b76eb33a78a
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Wed Apr 4 20:36:36 2012 +0900

    [Title]use workspace permanently
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 5749f6587535cccef49facd32d66798c607e2c56
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Wed Apr 4 17:48:07 2012 +0900

    [Title]Version up to 1.0.34
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 59921fd9e409d950c94ddd40e230fb6ff90c4e51
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Wed Apr 4 17:27:34 2012 +0900

    [Title]fix Display
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]made new display every MessageBox call
    [Cause]
    [Solution]
    [TestCase]

commit bb853ff2ccb46ca7cffcebef73e65a6345dcfc95
Author: jihye kim <jihye1128.kim@samsung.com>
Date:   Wed Apr 4 16:16:00 2012 +0900

    [Title] Add MessageDialog class
    [Type] work
    [Module] emulator manager
    [Priority] major
    [Jira#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

commit 6e966cc31f20219afc14a8d562f7a2f884d256d4
Merge: d8f71b8 fe42ccc
Author: syeon.hwang <syeon.hwang@samsung.com>
Date:   Wed Apr 4 15:33:01 2012 +0900

    Merge branch 'develop' into release-1.0

commit d8f71b819a17da66d5b0e6777e9335aed84a5141
Merge: 1526fb7 df265ee
Author: syeon.hwang <syeon.hwang@samsung.com>
Date:   Wed Apr 4 15:21:57 2012 +0900

    Merge branch 'release-1.0' of gerrithost:/sdk/emulator/emulator-manager into release-1.0

commit df265ee5283c7f459b1fa9d27951f5cc1bc749e4
Merge: 98f174e 033de98
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Wed Apr 4 15:08:51 2012 +0900

    Merge "[Title]fix problem related with sending argument to emulator manager [Type] [Module] [Priority] [CQ#] [Redmine#] [Problem] [Cause] [Solution] [TestCase]" into release-1.0

commit 033de98c78f2c9428ac50049f0b5951a21333480
Author: munkyu.im <munkyu.im@samsung.com>
Date:   Wed Apr 4 14:56:16 2012 +0900

    [Title]fix problem related with sending argument to emulator manager
    [Type]
    [Module]
    [Priority]
    [CQ#]
    [Redmine#]
    [Problem]
    [Cause]
    [Solution]
    [TestCase]

50 files changed:
VERSION [new file with mode: 0644]
build.xml
dist/linux/emulator-manager.sh
dist/win32/emulator-manager.bat [deleted file]
dist/win32/emulator-manager.c
jaxb_src/org/tizen/emulator/manager/vms/xml/BaseInformationType.java
jaxb_src/org/tizen/emulator/manager/vms/xml/DeviceType.java
jaxb_src/org/tizen/emulator/manager/vms/xml/DiskImageFormatType.java
jaxb_src/org/tizen/emulator/manager/vms/xml/DisplayType.java
jaxb_src/org/tizen/emulator/manager/vms/xml/EmulatorConfiguration.java
jaxb_src/org/tizen/emulator/manager/vms/xml/ObjectFactory.java
jaxb_src/org/tizen/emulator/manager/vms/xml/RamType.java
jaxb_src/org/tizen/emulator/manager/vms/xml/SkinType.java
jaxb_src/org/tizen/emulator/manager/vms/xml/StorageType.java [deleted file]
jaxb_src/org/tizen/emulator/manager/vms/xml/TouchType.java
jaxb_src/org/tizen/emulator/manager/vms/xml/UsabilityType.java
jaxb_src/org/tizen/emulator/manager/vms/xml/package-info.java
package/pkginfo.manifest
resource/res/about.png [new file with mode: 0644]
resource/res/arm.png [new file with mode: 0644]
resource/res/createimage.png [new file with mode: 0755]
resource/res/x86.png [new file with mode: 0644]
src/org/tizen/emulator/manager/EmulatorManager.java
src/org/tizen/emulator/manager/logging/EMLogger.java
src/org/tizen/emulator/manager/tool/CheckVirtualization.java [new file with mode: 0644]
src/org/tizen/emulator/manager/tool/FileIO.java
src/org/tizen/emulator/manager/tool/SelectWorkspace.java [new file with mode: 0644]
src/org/tizen/emulator/manager/tool/StringResource.java
src/org/tizen/emulator/manager/ui/ArchitectureGroup.java
src/org/tizen/emulator/manager/ui/CloneDialog.java
src/org/tizen/emulator/manager/ui/MainDialog.java
src/org/tizen/emulator/manager/ui/MenuHandling.java
src/org/tizen/emulator/manager/ui/MessageDialog.java [new file with mode: 0644]
src/org/tizen/emulator/manager/ui/ResourceRegistry.java
src/org/tizen/emulator/manager/ui/SelectWorkspaceDialog.java [new file with mode: 0644]
src/org/tizen/emulator/manager/ui/detail/DetailTableView.java
src/org/tizen/emulator/manager/ui/detail/VMPropertyView.java
src/org/tizen/emulator/manager/ui/detail/VMResource.java
src/org/tizen/emulator/manager/ui/vmstree/ContextMenu.java
src/org/tizen/emulator/manager/ui/vmstree/RowItem.java
src/org/tizen/emulator/manager/ui/vmstree/VMsTree.java
src/org/tizen/emulator/manager/vms/Creator.java
src/org/tizen/emulator/manager/vms/EmulatorVMs.java
src/org/tizen/emulator/manager/vms/Launcher.java
src/org/tizen/emulator/manager/vms/Modifier.java
src/org/tizen/emulator/manager/vms/VMCreateHelper.java
src/org/tizen/emulator/manager/vms/VMPropertyValue.java
src/org/tizen/emulator/manager/vms/VMsWorker.java
xsd/em.xml
xsd/em.xsd

diff --git a/VERSION b/VERSION
new file mode 100644 (file)
index 0000000..4ec2608
--- /dev/null
+++ b/VERSION
@@ -0,0 +1 @@
+Larkspur
index 9ad2204..c99d4df 100644 (file)
--- a/build.xml
+++ b/build.xml
                <delete dir="build" />
                <delete file="${jar.file}" />
        </target>
+    
+    <target name="make-properties">
+               <echo message="make properties..." />
+               <tstamp>
+                       <format property="build_time" pattern="MM/dd/yyyy hh:mm aa" timezone="GMT" locale="en" />
+               </tstamp>
+               <exec executable="cat" outputproperty="version">
+                       <arg value="VERSION" />
+               </exec>
+               <exec executable="git" outputproperty="build_git_commit" failifexecutionfails="false">
+                       <arg value="rev-parse" />
+                       <arg value="--short" />
+                       <arg value="HEAD" />
+               </exec>
+               <propertyfile file="about.properties" comment="Auto-generated properties - DO NOT EDIT">
+                       <entry key="version" value="${version}" />
+                       <entry key="build_time" value="${build_time}" />
+                       <entry key="build_git_commit" value="${build_git_commit}" />
+               </propertyfile>
+       </target>
 
-       <target name="linux-compile" depends="clean">
+       <target name="linux-compile" depends="make-properties">
                <echo message="compiling..." />
                <mkdir dir="bin" />
                <javac encoding="UTF-8" fork="true" srcdir="src:jaxb_src" destdir="bin" debug="on" memorymaximumsize="128m">
@@ -31,7 +51,7 @@
                </javac>
        </target>
 
-       <target name="windows-compile" depends="clean">
+       <target name="windows-compile" depends="make-properties">
                <echo message="compiling..." />
                <mkdir dir="bin" />
                <javac encoding="UTF-8" fork="true" srcdir="src:jaxb_src" destdir="bin" debug="on" memorymaximumsize="128m">
@@ -39,7 +59,7 @@
                </javac>
        </target>
 
-       <target name="mac-compile" depends="clean">
+       <target name="mac-compile" depends="make-properties">
                <echo message="compiling..." />
                <mkdir dir="bin" />
                <javac encoding="UTF-8" fork="true" srcdir="src:jaxb_src" destdir="bin" debug="on" memorymaximumsize="128m">
@@ -59,6 +79,7 @@
                        <fileset dir="resource/res" />
                </copy>
                <jar jarfile="dist/linux/${jar.file}" basedir="build" duplicate="add">
+                       <fileset file="about.properties" />
                        <manifest>
                                <attribute name="Main-Class" value="${mainclass}" />
                                <attribute name="Class-path" value="lib/swt/gtk-linux/${swt.file}" />
                        <fileset dir="resource/res" />
                </copy>
                <jar jarfile="dist/win32/${jar.file}" basedir="build" duplicate="add">
+                       <fileset file="about.properties" />
                        <manifest>
                                <attribute name="Main-Class" value="${mainclass}" />
                                <attribute name="Class-path" value="lib/swt/win32-win32/${swt.file}" />
                        <fileset dir="resource/res" />
                </copy>
                <jar jarfile="dist/mac/${jar.file}" basedir="build" duplicate="add">
+                       <fileset file="about.properties" />
                        <manifest>
                                <attribute name="Main-Class" value="${mainclass}" />
                                <attribute name="Class-path" value="lib/swt/cocoa-macosx/${swt.file}" />
                <delete dir="build" />
        </target>
 
-</project>
\ No newline at end of file
+</project>
index c41c66d..2182014 100755 (executable)
@@ -13,11 +13,9 @@ else
 em_path="."
 fi
 
-mode=$1
-
 if [ -f $current_emulmgr ]
 then
-java -jar $current_emulmgr $mode $*
+java -jar $current_emulmgr $*
 else
-java -jar $em_path"/emulator-manager.jar" $mode $*
+java -jar $em_path"/emulator-manager.jar" $*
 fi
diff --git a/dist/win32/emulator-manager.bat b/dist/win32/emulator-manager.bat
deleted file mode 100755 (executable)
index 40c85a7..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-@ECHO OFF\r
-set install_path=%localappdata%\.TizenSDK\tizensdkpath\r
-::echo %install_path%\r
-\r
-for /f "tokens=2 delims==" %%i in (%install_path%) do set tizen_path=%%i\r
-::echo %tizen_path%\r
-\r
-set em_path=%tizen_path%\Emulator\bin\r
-\r
-set mode=%1\r
-\r
-javaw -jar %em_path%\emulator-manager.jar %mode%\r
index 093e469..94a8675 100644 (file)
@@ -4,7 +4,8 @@
 #include <stdlib.h>\r
 #include <stdio.h>\r
 \r
-int main(int argc, char* argv[]) {\r
+int main(int argc, char* argv[]) \r
+{\r
     FILE *propertyFile;\r
     HKEY hKey;\r
     char strPropertyFilePath[MAX];\r
@@ -16,6 +17,9 @@ int main(int argc, char* argv[]) {
        DWORD ret;\r
        int i;\r
        DWORD fileAttr;\r
+       STARTUPINFO sti = { 0 };\r
+    PROCESS_INFORMATION pi = { 0 };\r
+\r
        ret = GetCurrentDirectory(512, currentEmulmgr);\r
        strcat(currentEmulmgr, EMULMGR_JAR);\r
      // Get a "tizensdkpath" file path\r
@@ -66,7 +70,25 @@ int main(int argc, char* argv[]) {
                        strcat(strCommand, argv[i]);\r
                }\r
        }\r
-    // execute emulator-manager\r
-    WinExec(strCommand, SW_SHOWNORMAL);\r
+    \r
+    if(!CreateProcess(NULL,\r
+                strCommand,\r
+                NULL,\r
+                NULL,\r
+                FALSE,\r
+                NORMAL_PRIORITY_CLASS,\r
+                NULL,\r
+                NULL,\r
+                &sti,\r
+                &pi)\r
+            ) {\r
+        fprintf(stderr, "Unable to generate Emulator Manager process\n");\r
+        exit(1);\r
+    }\r
+\r
+    DWORD rc = WaitForSingleObject(\r
+            pi.hProcess, // process handle\r
+            INFINITE);\r
+\r
     return 0;\r
 }\r
index 92b5227..6bc60ae 100644 (file)
@@ -2,7 +2,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2012.04.02 at 05:39:01 Ã¬\98¤í\9b\84 KST 
+// Generated on: 2012.04.20 at 10:49:37 Ã¬\98¤ì \84 KST 
 //
 
 
index fd661da..aea64d7 100644 (file)
@@ -2,7 +2,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2012.04.02 at 05:39:01 Ã¬\98¤í\9b\84 KST 
+// Generated on: 2012.04.20 at 10:49:37 Ã¬\98¤ì \84 KST 
 //
 
 
@@ -25,7 +25,7 @@ import javax.xml.bind.annotation.XmlType;
  *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
  *       &lt;sequence>
  *         &lt;element name="display" type="{http://www.tizen.org/em}displayType"/>
- *         &lt;element name="storage" type="{http://www.tizen.org/em}storageType"/>
+ *         &lt;element name="storage" type="{http://www.w3.org/2001/XMLSchema}string"/>
  *         &lt;element name="RAM" type="{http://www.tizen.org/em}ramType"/>
  *         &lt;element name="touch" type="{http://www.tizen.org/em}touchType" minOccurs="0"/>
  *       &lt;/sequence>
@@ -48,7 +48,7 @@ public class DeviceType {
     @XmlElement(required = true)
     protected DisplayType display;
     @XmlElement(required = true)
-    protected StorageType storage;
+    protected String storage;
     @XmlElement(name = "RAM", required = true)
     protected RamType ram;
     protected TouchType touch;
@@ -82,10 +82,10 @@ public class DeviceType {
      * 
      * @return
      *     possible object is
-     *     {@link StorageType }
+     *     {@link String }
      *     
      */
-    public StorageType getStorage() {
+    public String getStorage() {
         return storage;
     }
 
@@ -94,10 +94,10 @@ public class DeviceType {
      * 
      * @param value
      *     allowed object is
-     *     {@link StorageType }
+     *     {@link String }
      *     
      */
-    public void setStorage(StorageType value) {
+    public void setStorage(String value) {
         this.storage = value;
     }
 
index ac336f0..f41a6d6 100644 (file)
@@ -2,7 +2,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2012.04.02 at 05:39:01 Ã¬\98¤í\9b\84 KST 
+// Generated on: 2012.04.20 at 10:49:37 Ã¬\98¤ì \84 KST 
 //
 
 
index d651a3e..fccba72 100644 (file)
@@ -2,7 +2,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2012.04.02 at 05:39:01 Ã¬\98¤í\9b\84 KST 
+// Generated on: 2012.04.20 at 10:49:37 Ã¬\98¤ì \84 KST 
 //
 
 
index 7901954..bc812b2 100644 (file)
@@ -2,7 +2,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2012.04.02 at 05:39:01 Ã¬\98¤í\9b\84 KST 
+// Generated on: 2012.04.20 at 10:49:37 Ã¬\98¤ì \84 KST 
 //
 
 
index 1cc5fbb..600fed9 100644 (file)
@@ -2,7 +2,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2012.04.02 at 05:39:01 Ã¬\98¤í\9b\84 KST 
+// Generated on: 2012.04.20 at 10:49:37 Ã¬\98¤ì \84 KST 
 //
 
 
@@ -37,6 +37,14 @@ public class ObjectFactory {
     }
 
     /**
+     * Create an instance of {@link UsabilityType }
+     * 
+     */
+    public UsabilityType createUsabilityType() {
+        return new UsabilityType();
+    }
+
+    /**
      * Create an instance of {@link BaseInformationType }
      * 
      */
@@ -45,59 +53,59 @@ public class ObjectFactory {
     }
 
     /**
-     * Create an instance of {@link RamType.Size }
+     * Create an instance of {@link DiskImageFormatType }
      * 
      */
-    public RamType.Size createRamTypeSize() {
-        return new RamType.Size();
+    public DiskImageFormatType createDiskImageFormatType() {
+        return new DiskImageFormatType();
     }
 
     /**
-     * Create an instance of {@link DisplayType.Resolution }
+     * Create an instance of {@link BaseInformationType.DiskImage }
      * 
      */
-    public DisplayType.Resolution createDisplayTypeResolution() {
-        return new DisplayType.Resolution();
+    public BaseInformationType.DiskImage createBaseInformationTypeDiskImage() {
+        return new BaseInformationType.DiskImage();
     }
 
     /**
-     * Create an instance of {@link EmulatorConfiguration }
+     * Create an instance of {@link UsabilityType.Logging }
      * 
      */
-    public EmulatorConfiguration createEmulatorConfiguration() {
-        return new EmulatorConfiguration();
+    public UsabilityType.Logging createUsabilityTypeLogging() {
+        return new UsabilityType.Logging();
     }
 
     /**
-     * Create an instance of {@link StorageType.SDCard }
+     * Create an instance of {@link RamType.Size }
      * 
      */
-    public StorageType.SDCard createStorageTypeSDCard() {
-        return new StorageType.SDCard();
+    public RamType.Size createRamTypeSize() {
+        return new RamType.Size();
     }
 
     /**
-     * Create an instance of {@link UsabilityType.Logging }
+     * Create an instance of {@link EmulatorConfiguration }
      * 
      */
-    public UsabilityType.Logging createUsabilityTypeLogging() {
-        return new UsabilityType.Logging();
+    public EmulatorConfiguration createEmulatorConfiguration() {
+        return new EmulatorConfiguration();
     }
 
     /**
-     * Create an instance of {@link DisplayType }
+     * Create an instance of {@link UsabilityType.FileSharing }
      * 
      */
-    public DisplayType createDisplayType() {
-        return new DisplayType();
+    public UsabilityType.FileSharing createUsabilityTypeFileSharing() {
+        return new UsabilityType.FileSharing();
     }
 
     /**
-     * Create an instance of {@link UsabilityType }
+     * Create an instance of {@link DisplayType.Density }
      * 
      */
-    public UsabilityType createUsabilityType() {
-        return new UsabilityType();
+    public DisplayType.Density createDisplayTypeDensity() {
+        return new DisplayType.Density();
     }
 
     /**
@@ -117,35 +125,11 @@ public class ObjectFactory {
     }
 
     /**
-     * Create an instance of {@link BaseInformationType.DiskImage }
-     * 
-     */
-    public BaseInformationType.DiskImage createBaseInformationTypeDiskImage() {
-        return new BaseInformationType.DiskImage();
-    }
-
-    /**
-     * Create an instance of {@link StorageType }
-     * 
-     */
-    public StorageType createStorageType() {
-        return new StorageType();
-    }
-
-    /**
-     * Create an instance of {@link DiskImageFormatType }
-     * 
-     */
-    public DiskImageFormatType createDiskImageFormatType() {
-        return new DiskImageFormatType();
-    }
-
-    /**
-     * Create an instance of {@link UsabilityType.FileSharing }
+     * Create an instance of {@link DeviceType }
      * 
      */
-    public UsabilityType.FileSharing createUsabilityTypeFileSharing() {
-        return new UsabilityType.FileSharing();
+    public DeviceType createDeviceType() {
+        return new DeviceType();
     }
 
     /**
@@ -157,11 +141,11 @@ public class ObjectFactory {
     }
 
     /**
-     * Create an instance of {@link DisplayType.Density }
+     * Create an instance of {@link DisplayType.Resolution }
      * 
      */
-    public DisplayType.Density createDisplayTypeDensity() {
-        return new DisplayType.Density();
+    public DisplayType.Resolution createDisplayTypeResolution() {
+        return new DisplayType.Resolution();
     }
 
     /**
@@ -173,11 +157,11 @@ public class ObjectFactory {
     }
 
     /**
-     * Create an instance of {@link DeviceType }
+     * Create an instance of {@link DisplayType }
      * 
      */
-    public DeviceType createDeviceType() {
-        return new DeviceType();
+    public DisplayType createDisplayType() {
+        return new DisplayType();
     }
 
 }
index a1d46a9..230efc9 100644 (file)
@@ -2,7 +2,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2012.04.02 at 05:39:01 Ã¬\98¤í\9b\84 KST 
+// Generated on: 2012.04.20 at 10:49:37 Ã¬\98¤ì \84 KST 
 //
 
 
index f51136a..cb25e71 100644 (file)
@@ -2,7 +2,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2012.04.02 at 05:39:01 Ã¬\98¤í\9b\84 KST 
+// Generated on: 2012.04.20 at 10:49:37 Ã¬\98¤ì \84 KST 
 //
 
 
diff --git a/jaxb_src/org/tizen/emulator/manager/vms/xml/StorageType.java b/jaxb_src/org/tizen/emulator/manager/vms/xml/StorageType.java
deleted file mode 100644 (file)
index 7a2fe7b..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
-// Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2012.04.02 at 05:39:01 ì˜¤í›„ KST 
-//
-
-
-package org.tizen.emulator.manager.vms.xml;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-
-
-/**
- * <p>Java class for storageType complex type.
- * 
- * <p>The following schema fragment specifies the expected content contained within this class.
- * 
- * <pre>
- * &lt;complexType name="storageType">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       &lt;sequence>
- *         &lt;element name="SDCard">
- *           &lt;complexType>
- *             &lt;complexContent>
- *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *                 &lt;sequence>
- *                   &lt;element name="diskImage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *                 &lt;/sequence>
- *               &lt;/restriction>
- *             &lt;/complexContent>
- *           &lt;/complexType>
- *         &lt;/element>
- *       &lt;/sequence>
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlType(name = "storageType", propOrder = {
-    "sdCard"
-})
-public class StorageType {
-
-    @XmlElement(name = "SDCard", required = true)
-    protected StorageType.SDCard sdCard;
-
-    /**
-     * Gets the value of the sdCard property.
-     * 
-     * @return
-     *     possible object is
-     *     {@link StorageType.SDCard }
-     *     
-     */
-    public StorageType.SDCard getSDCard() {
-        return sdCard;
-    }
-
-    /**
-     * Sets the value of the sdCard property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {@link StorageType.SDCard }
-     *     
-     */
-    public void setSDCard(StorageType.SDCard value) {
-        this.sdCard = value;
-    }
-
-
-    /**
-     * <p>Java class for anonymous complex type.
-     * 
-     * <p>The following schema fragment specifies the expected content contained within this class.
-     * 
-     * <pre>
-     * &lt;complexType>
-     *   &lt;complexContent>
-     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
-     *       &lt;sequence>
-     *         &lt;element name="diskImage" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
-     *       &lt;/sequence>
-     *     &lt;/restriction>
-     *   &lt;/complexContent>
-     * &lt;/complexType>
-     * </pre>
-     * 
-     * 
-     */
-    @XmlAccessorType(XmlAccessType.FIELD)
-    @XmlType(name = "", propOrder = {
-        "diskImage"
-    })
-    public static class SDCard {
-
-        protected String diskImage;
-
-        /**
-         * Gets the value of the diskImage property.
-         * 
-         * @return
-         *     possible object is
-         *     {@link String }
-         *     
-         */
-        public String getDiskImage() {
-            return diskImage;
-        }
-
-        /**
-         * Sets the value of the diskImage property.
-         * 
-         * @param value
-         *     allowed object is
-         *     {@link String }
-         *     
-         */
-        public void setDiskImage(String value) {
-            this.diskImage = value;
-        }
-
-    }
-
-}
index 9c665ab..28593d6 100644 (file)
@@ -2,7 +2,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2012.04.02 at 05:39:01 Ã¬\98¤í\9b\84 KST 
+// Generated on: 2012.04.20 at 10:49:37 Ã¬\98¤ì \84 KST 
 //
 
 
index 4ae8095..efc43bc 100644 (file)
@@ -2,7 +2,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2012.04.02 at 05:39:01 Ã¬\98¤í\9b\84 KST 
+// Generated on: 2012.04.20 at 10:49:37 Ã¬\98¤ì \84 KST 
 //
 
 
index e6d7c74..2c8828a 100644 (file)
@@ -2,7 +2,7 @@
 // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
 // Any modifications to this file will be lost upon recompilation of the source schema. 
-// Generated on: 2012.04.02 at 05:39:01 Ã¬\98¤í\9b\84 KST 
+// Generated on: 2012.04.20 at 10:49:37 Ã¬\98¤ì \84 KST 
 //
 
 @javax.xml.bind.annotation.XmlSchema(namespace = "http://www.tizen.org/em", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
index 384b311..b43d962 100644 (file)
@@ -1,5 +1,5 @@
 Package: emulator-manager
-Version: 1.0.33
+Version: 1.0.53
 OS: linux
 Build-host-os: linux
 Maintainer: Yeong-Kyoon Lee<yeongkyoon.lee@samsung.com>
@@ -7,7 +7,7 @@ Source: emulator-manager
 Description: Tizen Emulator Manager
 
 Package: emulator-manager
-Version: 1.0.33
+Version: 1.0.53
 OS: windows
 Build-host-os: windows
 Maintainer: Yeong-Kyoon Lee<yeongkyoon.lee@samsung.com>
diff --git a/resource/res/about.png b/resource/res/about.png
new file mode 100644 (file)
index 0000000..fbe5841
Binary files /dev/null and b/resource/res/about.png differ
diff --git a/resource/res/arm.png b/resource/res/arm.png
new file mode 100644 (file)
index 0000000..67cdb2d
Binary files /dev/null and b/resource/res/arm.png differ
diff --git a/resource/res/createimage.png b/resource/res/createimage.png
new file mode 100755 (executable)
index 0000000..051beb0
Binary files /dev/null and b/resource/res/createimage.png differ
diff --git a/resource/res/x86.png b/resource/res/x86.png
new file mode 100644 (file)
index 0000000..636fffd
Binary files /dev/null and b/resource/res/x86.png differ
index 694d217..a860e49 100644 (file)
@@ -35,13 +35,14 @@ import java.io.RandomAccessFile;
 import java.nio.channels.FileLock;
 import java.util.logging.Level;
 
-import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.MessageBox;
 import org.eclipse.swt.widgets.Shell;
 import org.tizen.emulator.manager.logging.EMLogger;
+import org.tizen.emulator.manager.tool.CheckVirtualization;
 import org.tizen.emulator.manager.tool.FileIO;
+import org.tizen.emulator.manager.tool.SelectWorkspace;
 import org.tizen.emulator.manager.ui.MainDialog;
+import org.tizen.emulator.manager.ui.MessageDialog;
 import org.tizen.emulator.manager.vms.EmulatorVMs;
 
 public class EmulatorManager {
@@ -58,14 +59,13 @@ public class EmulatorManager {
        
        public EmulatorManager(ManagerModeType mode) {
                this.mode = mode;
-               this.display = new Display();
+               this.display = Display.getCurrent();
        }
 
        public ManagerModeType getManagerMode() {
                return mode;
        }
 
-
        public MainDialog getMainDialog() {
                return mainDialog;
        }
@@ -84,87 +84,101 @@ public class EmulatorManager {
        private void dispose() {
                mainDialog.dispose();
        }
-       
+
        static ManagerModeType parseArgs(String[] args) {
                boolean isArgsError = false;
-               
+               final String SAVE_TRUE = ",save=true";
+               final String SAVE_FALSE = ",save=false";
                ManagerModeType mode = ManagerModeType.PUBLIC_MODE;
-               
+               String workspacePath = null;
+               boolean isSave = true;
+
                if(args.length > 0) {
                        for(int i = 0; i < args.length; i++) {
                                if(args[i].equals("--workspace") || args[i].equals("-w")) {
                                        if(args.length == i + 1 || args[i + 1].startsWith("--")) {
                                                isArgsError = true;
                                        } else {
-                                               EmulatorVMs.getInstance().setVMsBaseDirectory(args[i + 1]);
+                                               /* used workspace option correctly */
+                                               if(args[i+1].endsWith(SAVE_TRUE)) {
+                                                       workspacePath = args[i=1].substring(0, args[i=1].length() - SAVE_TRUE.length());
+                                                       isSave = true;
+                                               }
+                                               else if(args[i+1].endsWith(SAVE_FALSE)) {
+                                                       workspacePath = args[i=1].substring(0, args[i=1].length() - SAVE_FALSE.length());
+                                                       isSave = false;
+                                               }
+                                               else {
+                                                       isArgsError = true;
+                                               }
                                        }
                                } else if (args[i].equals("--inhouse")) {
                                        mode = ManagerModeType.INHOUSE_MODE;
                                }
                        }
                }
-               else {
-                       EmulatorVMs.getInstance().setVMsBaseDirectory(FileIO.getInstance().getTizenVmsPath());
-               }
                
+               
+               if (!SelectWorkspace.setWorkspace(workspacePath, isSave)) {
+                       exitEmulatorManager(0);
+               }
+
+               MessageDialog msg = new MessageDialog(new Shell(Display.getCurrent()));
                if (isArgsError == true) {
-                       getMessageBoxInNewShell(SWT.ICON_INFORMATION,  "INFO", "You did not input workspace path after\n" +
-                                       "command line option --workspace or -w\n" +
-                                       "Emulator Manager sets in default workspace.").open();
+                       msg.openWarningDialog("Used workspace option parameter is not proper. Aborting...\n" +
+                                       "\nSee right examples below.\n" +
+                                       "[--workspace {workspace path},save=true]\n" +
+                                       "[-w {workspace path},save=true]\n" +
+                                       "[--workspace {workspace path},save=false]\n" +
+                                       "[-w {workspace path},save=false]\n" +
+                                       "\nThe workspace path must be absolute."
+                                       );
+                       exitEmulatorManager(0);
                }
-               
+
                return mode;
        }
-       
-       static MessageBox getMessageBoxInNewShell(int style, String text, String message) {
-               Shell shell = new Shell(Display.getCurrent());
-               MessageBox msg = new MessageBox(shell, SWT.ICON_INFORMATION);
-               msg.setText(text);
-               msg.setMessage(message);
-               
-               return msg;
-       }
-       
-       static void exitEmulatorManager(int returnValue) {
+
+       public static void exitEmulatorManager(int returnValue) {
                System.exit(returnValue);
        }
        
        public static void main(String[] args) {
-               ManagerModeType mode = parseArgs(args);
-
-               instance = new EmulatorManager(mode);
-               
-               EMLogger.getLogger().log(Level.INFO, "Start Emulator Manager!!\n");
-               
-               try {
-                       EmulatorVMs.getInstance().loadProperties();
-               } catch (Exception e) {
-                       e.printStackTrace();
-               }
-                       
+               MessageDialog msg = new MessageDialog(new Shell(Display.getCurrent()));
                try {
                        FileLock lock = new RandomAccessFile(new File(FileIO.getInstance().getBinPath()
                                        + File.separator + "." +System.getProperty("user.name"))+ ".lock",
                                        "rw").getChannel().tryLock();
                        if (lock == null) {
-                               getMessageBoxInNewShell(SWT.ICON_INFORMATION,  "INFO", "Can not launch Emulator Manager.\n" +
-                                               "Another one with the same user name is running now.").open();
-                               
+                               msg.openInfoDialog("Can not launch Emulator Manager.\n" +
+                                               "Another one with the same user name is running now.");
                                exitEmulatorManager(0);
                        }
                } catch (Exception e) {
-                       getMessageBoxInNewShell(SWT.ICON_INFORMATION,  "INFO", 
-                                       "Can not launch Emulator Manager.\n" +e.getMessage()).open();
-                       
+                       msg.openInfoDialog("Can not launch Emulator Manager.\n" +e.getMessage());
                        exitEmulatorManager(-1);
+               }
+
+               ManagerModeType mode = parseArgs(args);
+               instance = new EmulatorManager(mode);
+
+               EMLogger.getLogger().log(Level.INFO, "Start Emulator Manager!!\n");
+               
+               // check hax or kvm
+               CheckVirtualization.getInstance().check();
+
+               try {
+                       EmulatorVMs.getInstance().loadProperties();
+               } catch (Exception e) {
+                       EMLogger.getLogger().log(Level.WARNING, e.getMessage());
                } 
-                                               
+
                instance.preare();
                instance.DrawUI();
 
                instance.dispose();
        }
-       
+
        public enum ManagerModeType {
                PUBLIC_MODE("public"),
                INHOUSE_MODE("inhouse");
index b3c29d8..02b73a0 100644 (file)
@@ -68,7 +68,7 @@ public class EMLogger {
                File logFolder;
                Handler logFileHandler;
                try {
-                       logFolder = new File(FileIO.getInstance().getEtcPath());
+                       logFolder = new File(FileIO.getInstance().getTizenVmsArchPath());
                        if (!logFolder.exists()) {
                                logFolder.mkdirs();
                        }
diff --git a/src/org/tizen/emulator/manager/tool/CheckVirtualization.java b/src/org/tizen/emulator/manager/tool/CheckVirtualization.java
new file mode 100644 (file)
index 0000000..20f8e1b
--- /dev/null
@@ -0,0 +1,139 @@
+package org.tizen.emulator.manager.tool;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.logging.Level;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.tizen.emulator.manager.logging.EMLogger;
+
+public class CheckVirtualization {
+       private static CheckVirtualization instance = new CheckVirtualization();
+       private static boolean isSupport = true;
+       private static String enable_command = null;
+       private static String disable_command = null;
+       private static boolean isCheck = false;
+
+       private CheckVirtualization() {
+               // singleton class
+       }
+
+       public static CheckVirtualization getInstance() {
+               return instance;
+       }
+
+       public boolean isSupportVirtualization() {
+               return isSupport;
+       }
+
+       public String getEnableCommnad() {
+               return enable_command;
+       }
+
+       public String getDisableCommnad() {
+               return disable_command;
+       }
+
+       public void check() {
+               if (!isCheck) {
+                       checkVirtualization();
+                       isCheck = true;
+               }
+       }
+
+       private void checkVirtualization() {
+               //CheckDialog dialog = new CheckDialog();
+               //dialog.create();
+               Work work = new Work();
+               work.setDaemon(true);
+               work.start();
+
+               //dialog.open();
+
+               try {
+                       work.join();
+               } catch (InterruptedException e) {
+                       // TODO Auto-generated catch block
+                       EMLogger.getLogger().log(Level.INFO, "Exception" + e.getMessage() + "\n");
+               }
+               /*
+               while(work.isAlive()) {
+                       if(!Display.getCurrent().readAndDispatch()) 
+                               Display.getCurrent().sleep();
+               }
+               */
+
+               //dialog.close();
+       }
+       
+       private class Work extends Thread {
+               public void run() {
+                       if (System.getProperty("os.name").toLowerCase().indexOf("windows") > -1) {
+                               int exitValue = 0;
+
+                               List<String> cmd = new ArrayList<String>();
+                               cmd.add(FileIO.getInstance().getBinPath() + File.separator + "check-hax.exe");
+                               ProcessBuilder pb = new ProcessBuilder(cmd);
+                               pb.directory(new File(FileIO.getInstance().getBinPath()));
+
+                               try {
+                                       Process process = null;
+                                       process = pb.start();
+                                       process.waitFor();
+                                       exitValue = process.exitValue();
+                                       EMLogger.getLogger().log(Level.INFO, "Check-hax.exe's exit value : " + exitValue + "\n");
+                               } catch (IOException e) {
+                                       EMLogger.getLogger().log(Level.INFO, "IOException" + e.getMessage() + "\n");
+                               }  catch (InterruptedException e) {
+                                       EMLogger.getLogger().log(Level.INFO, "InterruptedException" + e.getMessage() + "\n");
+                               }  catch (Exception e) {
+                                       EMLogger.getLogger().log(Level.INFO, "Exception" + e.getMessage() + "\n");
+                               }
+
+                               if(exitValue == 0) {
+                                       isSupport = true;
+                               } else {
+                                       isSupport = false;
+                               }
+                               enable_command = "-enable-hax";
+                       } else if (System.getProperty("os.name").toLowerCase().indexOf("linux") > -1) {
+                               if(new File("/dev/kvm").canRead()) {
+                                       isSupport = true;
+                               } else {
+                                       isSupport = false;
+                               }
+                               enable_command = "-enable-kvm";
+                       }
+               }
+       }
+}
+
+class CheckDialog {
+       private Shell dialog;
+
+       public void create() {
+               dialog = new Shell(Display.getCurrent(), SWT.APPLICATION_MODAL);
+               dialog.setText("Info");
+               dialog.setSize(300, 100);
+               dialog.setLayout(new GridLayout(1, false));
+               
+               Label label = new Label(dialog, SWT.NONE);
+               label.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, true));
+               label.setText("Please wait !!\nCheck whether virtualization is supported.");
+       }
+       
+       public void open() {
+               dialog.open();
+       }
+
+       public void close() {
+               dialog.close();
+       }
+}
index ff7eadb..0ea7e19 100644 (file)
@@ -107,6 +107,12 @@ public class FileIO {
 
                x86KernelPath = dataPath + x86_kernel_suffix;
                biosPath = dataPath + bios_suffix;
+
+               vmsPath = EmulatorVMs.getInstance().getVMsBaseDirectory();
+               vmsArchPath = vmsPath + arch_suffix;
+       }
+
+       public static void setVMSPath() {
                vmsPath = EmulatorVMs.getInstance().getVMsBaseDirectory();
                vmsArchPath = vmsPath + arch_suffix;
                //testPrintPath();
@@ -138,6 +144,9 @@ public class FileIO {
                }
        }
 
+       private FileIO() {
+       }
+
        public static FileIO getInstance() {
                return instance;
        }
diff --git a/src/org/tizen/emulator/manager/tool/SelectWorkspace.java b/src/org/tizen/emulator/manager/tool/SelectWorkspace.java
new file mode 100644 (file)
index 0000000..99cc3f2
--- /dev/null
@@ -0,0 +1,155 @@
+/*
+ * Emulator Manager
+ *
+ * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * MunKyu Im <munkyu.im@samsung.com>
+ * SeokYeon Hwang <syeon.hwang@samsung.com>
+ * JiHye Kim <jihye1128.kim@samsung.com>
+ * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.emulator.manager.tool;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.Properties;
+
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.tizen.emulator.manager.EmulatorManager;
+import org.tizen.emulator.manager.ui.MessageDialog;
+import org.tizen.emulator.manager.ui.SelectWorkspaceDialog;
+import org.tizen.emulator.manager.vms.EmulatorVMs;
+
+public class SelectWorkspace {
+       private static Properties prop = null;
+
+       private static String oldShow = null;
+       private static String oldPath = null;
+
+       public static boolean setWorkspace(String workspacePath, boolean isSave) {
+               boolean isModify = false;
+               String workspaceConfPath = null;
+               if (isSave) {
+                       workspaceConfPath = System.getProperty("user.home") + File.separator + StringResource.WORKSPACE_NAME;
+                       prop = new Properties();
+                       try {
+                               prop.load(new FileInputStream(workspaceConfPath));
+                       } catch (FileNotFoundException e) {
+                               // make conf file..
+                               File f = new File(workspaceConfPath);
+                               try {
+                                       f.createNewFile();
+                                       BufferedWriter out = new BufferedWriter(new FileWriter(f));
+                                       out.write(StringResource.SHOW_SELECTION_DIAGLOG + "=false\n");
+                                       out.write(StringResource.RECENT_VMS_PATH + "=\n");
+                                       out.close();
+                                       prop.load(new FileInputStream(f));
+                               } catch (IOException e1) {
+                                       prop = null;
+                               }
+                       } catch (IOException e) {
+                               prop = null;
+                       }
+
+                       String show = "false";
+                       if (prop != null) {
+                               oldShow = prop.getProperty(StringResource.SHOW_SELECTION_DIAGLOG);
+                               oldPath = prop.getProperty(StringResource.RECENT_VMS_PATH);
+
+                               show = oldShow;
+                               if (workspacePath == null) {
+                                       /* There is no workspace option. */
+                                       if (show != null) {
+                                               if (show.equals("true")) {
+                                                       SelectWorkspaceDialog dialog = new SelectWorkspaceDialog(prop);
+                                                       dialog.create();
+                                                       Shell shell = dialog.open();
+                                                       while(!shell.isDisposed()) {
+                                                               if(!Display.getCurrent().readAndDispatch()) 
+                                                                       Display.getCurrent().sleep();
+                                                       }
+       
+                                                       if (dialog.isCanceled()) {
+                                                               return false;
+                                                       }
+                                                       workspacePath = dialog.getSelectedPath();
+                                                       show = dialog.isShowDialog() ? "true" : "false";
+                                               } else if (show.equals("false")) {
+                                                       workspacePath = prop.getProperty(StringResource.RECENT_VMS_PATH);
+                                               }
+                                       }
+                               }
+                       }
+
+                       if (workspacePath != null && !workspacePath.isEmpty()) {
+                               if (prop != null) {
+                                       if (show != oldShow) {
+                                               prop.setProperty(StringResource.SHOW_SELECTION_DIAGLOG, show);
+                                               isModify = true;
+                                       }
+
+                                       if (!workspacePath.equals(oldPath)) {
+                                               prop.setProperty(StringResource.RECENT_VMS_PATH, workspacePath);
+                                               isModify = true;
+                                       }
+                               }
+                       } else {
+                               workspacePath = null;
+                       }
+               }
+
+               if (workspacePath != null && !workspacePath.isEmpty()) {
+                       File fi = new File(workspacePath + File.separator + "x86");
+                       if(!fi.exists()) {
+                               boolean result = fi.mkdirs();
+                               if(!result) {
+                                       MessageDialog msg = new MessageDialog(new Shell(Display.getCurrent()));
+                                       msg.openWarningDialog("Can not organize workspace. Aborting...\n" +
+                                                       "User do not have authority to use [" + workspacePath + "]"); 
+                                       EmulatorManager.exitEmulatorManager(-1);
+                               }
+                       }
+
+                       if (isSave && isModify && prop != null) {
+                               try {
+                                       prop.store(new FileOutputStream(workspaceConfPath),null);
+                               } catch (FileNotFoundException e) {
+                                       // TODO Auto-generated catch block
+                                       e.printStackTrace();
+                               } catch (IOException e) {
+                                       // TODO Auto-generated catch block
+                                       e.printStackTrace();
+                               }
+                       }
+                       EmulatorVMs.getInstance().setVMsBaseDirectory(workspacePath);
+                       FileIO.setVMSPath();
+               }
+               return true;
+       }
+}
index d4fe7ae..991fc75 100644 (file)
 package org.tizen.emulator.manager.tool;
 
 public class StringResource {
-
+       // VMsProperty View
        public final static String SUPPORTED = "Supported";
        public final static String NOT_SUPPORTED = "Not supported";
-
        // key type
        public final static String ONE_KEY  = "1key";
        public final static String THREE_KEYS = "3keys";
-       
        public final static String ONE_KEY_TYPE = "1Key Type";
        public final static String THREE_KEYS_TYPE = "3Keys Type";
 
+       // Main Dialog
+       public static final String MAIN_TITLE = "Emulator Manager";
+       public static final String MAIN_TITLE_INHOUSE = "Emulator Manager (Inhouse)";
        public static final String REFRESH = "Refresh";
        public static final String LAUNCH  = "Launch";
        public static final String MODIFY  = "Modify";
        public static final String CREATE  = "Create";
        public static final String CANCEL  = "Cancel";
        public static final String CONFIRM = "Confirm";
-
+       public static final String OK = "OK";
        public static final String DETAIL  = "Detail";
        public static final String DELETE  = "Delete";
        public static final String RESET = "Reset";
        public static final String CLONE   = "Clone";
        public static final String CREATE_IMAGE = "Create Base Image";
+
+       // Select Workspace and Dialog
+       public static final String WORKSPACE_NAME = ".tizen_vms_path";
+       public static final String VMS_PATH = "[VMS_PATH]";
+       public static final String SHOW_SELECTION_DIAGLOG = "SHOW_PATH_SELECTION_DIALOG";
+       public static final String RECENT_VMS_PATH="RECENT_VMS_PATH";
+       public static final String SWD_TITLE = "Select VMS path";
+       public static final String SWD_BROWSE = "Browse...";
+       public static final String SWD_ASK_AGAIN = "Use this as the default and do not ask again";
+       public static final String SELECT_DIRECTORY = "Select a Direcory";
+
+        //ArchitectureGroup
+       public static final String GROUP_TITLE = "Emulator Architecture";
+       public static final String X86 = "X86";
+       public static final String x86 = "x86";
+       public static final String ARM = "ARM";
+       
+       //About Dialog
+       public static final String ABOUT_PROP_FILENAME = "about.properties";
+       public static final String PROP_KEY_VERSION = "version";
+       public static final String PROP_KEY_BUILD_TIME = "build_time";
+       public static final String PROP_KEY_GIT_VERSION = "build_git_commit";
 }
index 60bb4f3..e732624 100644 (file)
@@ -37,6 +37,7 @@ import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Group;
+import org.tizen.emulator.manager.tool.StringResource;
 import org.tizen.emulator.manager.vms.VMsProperty.Architecture;
 
 public class ArchitectureGroup {
@@ -51,17 +52,17 @@ public class ArchitectureGroup {
                
                group = new Group(archComposite, SWT.NONE);
                
-               group.setText("Emulator Architecture");
+               group.setText(StringResource.GROUP_TITLE);
                group.setLayout(new GridLayout(2, false));
 
                x86RadioButton = new Button(group, SWT.RADIO);
                x86RadioButton.setData(Architecture.x86);
-               x86RadioButton.setText("X86");
+               x86RadioButton.setText(StringResource.X86);
                x86RadioButton.setSelection(true);
 
                armRadioButton = new Button(group, SWT.RADIO);
                armRadioButton.setData(Architecture.ARM);
-               armRadioButton.setText("ARM");
+               armRadioButton.setText(StringResource.ARM);
                armRadioButton.setSelection(false);
                // TODO : not support ARM
                armRadioButton.setEnabled(false);
@@ -82,7 +83,6 @@ public class ArchitectureGroup {
                armRadioButton.addSelectionListener(archSelectionListener);
        }
 
-
        public void setLayoutData(Object data) {
                group.setLayoutData(data);
        }
index 036fa2d..fed9775 100644 (file)
@@ -40,12 +40,12 @@ import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.MessageBox;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Text;
+import org.tizen.emulator.manager.tool.StringResource;
+import org.tizen.emulator.manager.ui.MessageDialog;
 import org.tizen.emulator.manager.ui.ResourceRegistry.ImageName;
 import org.tizen.emulator.manager.ui.detail.VMPropertyView;
-import org.tizen.emulator.manager.ui.vmstree.VMsTree;
 import org.tizen.emulator.manager.vms.VMCreateHelper;
 import org.tizen.emulator.manager.vms.VMsProperty;
 import org.tizen.emulator.manager.vms.VMsWorkerException;
@@ -63,9 +63,9 @@ public class CloneDialog {
 
        private String vmName   = null;
        
-       public CloneDialog(MainDialog mainDialog, VMsTree vmsTree) {
+       public CloneDialog(MainDialog mainDialog, VMsProperty prop) {
                this.mainDialog = mainDialog;
-               property = vmsTree.getSelectionItem();
+               property = prop;
                
                helper = new VMCreateHelper();
        }
@@ -73,11 +73,11 @@ public class CloneDialog {
        public void open() {
                dialog = new Shell(mainDialog.getShell(), SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
                dialog.setText("Emulator Cloning");
-               dialog.setSize(300, 180);
+               dialog.setSize(350, 180);
                dialog.setLayout(new GridLayout(1, true));
 
                Label info = new Label(dialog, SWT.WRAP);
-               info.setText("Create new Emulator\nby copying the selected Emulator.");
+               info.setText("Clone new VM which has the same configurations\nas you selected.");
 
                Label sep = new Label(dialog, SWT.SEPARATOR | SWT.HORIZONTAL);
                sep.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true));
@@ -87,7 +87,7 @@ public class CloneDialog {
                name.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true));
 
                infoLabel = new Label(dialog, SWT.WRAP);
-               infoLabel.setText("");
+               infoLabel.setText("Input new VM-name.");
                infoLabel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true));
 
                Composite buttonComposite = new Composite(dialog, SWT.NONE);
@@ -95,12 +95,12 @@ public class CloneDialog {
                buttonComposite.setLayoutData(new GridData(SWT.RIGHT, SWT.FILL, true, false));
 
                confirmButton = new Button(buttonComposite, SWT.PUSH);
-               confirmButton.setText("Confirm");
+               confirmButton.setText(StringResource.CONFIRM);
                confirmButton.setImage(ResourceRegistry.getImage(ImageName.CONFIRM));
                confirmButton.setEnabled(false);
 
                cancelButton = new Button(buttonComposite, SWT.PUSH);
-               cancelButton.setText("Cancel");
+               cancelButton.setText(StringResource.CANCEL);
                cancelButton.setImage(ResourceRegistry.getImage(ImageName.CANCEL));
 
                addListener();
@@ -123,17 +123,16 @@ public class CloneDialog {
                        }
                        @Override
                        public void widgetSelected(SelectionEvent event) {
-                               MessageBox msg = new MessageBox(mainDialog.getShell(), SWT.ICON_INFORMATION);
-                               msg.setText("INFO");
-                               
+                               MessageDialog msg = new MessageDialog();
+                               String message = "";
                                try {
                                        property.getWorker().cloneVM(vmName);
-                                       msg.setMessage("Emulator cloning completed!");  
+                                       message = "Emulator cloning completed!";        
                                } catch (VMsWorkerException e) {
-                                       msg.setMessage(e.getMessage());
+                                       message = e.getMessage();
                                }
-                               
-                               msg.open();
+
+                               msg.openInfoDialog(message);
 
                                dialog.close();
                                mainDialog.refreshProperties();
@@ -156,7 +155,7 @@ public class CloneDialog {
        }
        
        private void checkImageName() {
-               if (vmName.length() == VMPropertyView.MAX_NAME_LEN) {
+               if (vmName.length() > VMPropertyView.MAX_NAME_LEN) {
                        infoLabel.setText("Max length of name is 20.");
                        confirmButton.setEnabled(false);
                        return;
@@ -174,7 +173,11 @@ public class CloneDialog {
                        return;
                }
 
-               infoLabel.setText("");
+               if (vmName.length() == VMPropertyView.MAX_NAME_LEN) {
+                       infoLabel.setText("Max length of name is 20.");
+               } else {
+                       infoLabel.setText("Input new VM-name.");
+               }
                if (vmName.isEmpty()) {
                        confirmButton.setEnabled(false);
                } else {
index 78657bf..e1a44e2 100644 (file)
 
 package org.tizen.emulator.manager.ui;
 
+import java.io.IOException;
 import java.io.InputStream;
+import java.util.Properties;
+import java.util.logging.Level;
 
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.SashForm;
@@ -43,19 +46,17 @@ import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.MessageBox;
 import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.ToolBar;
+import org.eclipse.swt.widgets.ToolItem;
 import org.tizen.emulator.manager.EmulatorManager.ManagerModeType;
-import org.tizen.emulator.manager.tool.FileIO;
+import org.tizen.emulator.manager.logging.EMLogger;
 import org.tizen.emulator.manager.tool.StringResource;
 import org.tizen.emulator.manager.ui.ResourceRegistry.ImageName;
 import org.tizen.emulator.manager.ui.detail.DetailTableView;
 import org.tizen.emulator.manager.ui.vmstree.VMsTree;
 import org.tizen.emulator.manager.vms.EmulatorVMs;
 import org.tizen.emulator.manager.vms.VMsProperty;
-import org.tizen.emulator.manager.vms.VMsWorker;
 import org.tizen.emulator.manager.vms.VMsWorkerException;
 
 public class MainDialog {
@@ -64,11 +65,21 @@ public class MainDialog {
        SashForm sashForm;
        ArchitectureGroup archGroup;
        
+       // ToolItems...
+       ToolItem aboutItem;
+       ToolItem refreshItem;
+       ToolItem resetItem;
+       ToolItem deleteItem;
+       ToolItem cloneItem;
+       ToolItem createImageItem;
+//     ToolItem modifyItem;
+
+       
+       ToolItem x86ToggleItem;
+       ToolItem armToggleItem;
+
        // LEFT VIEW
        VMsTree vmsTree;
-       Button refreshButton;
-       Button deleteButton;
-       Button resetButton;
 
        // RIGHT VIEW
        DetailTableView detailView;
@@ -78,18 +89,17 @@ public class MainDialog {
        Button rightButton;
 
        MenuHandling handling;
-       
+
        Shell shell;
        Image icon;
 
        public MainDialog(ManagerModeType mode) {
                shell = new Shell(Display.getCurrent());
-
                shell.setSize(700, 500);
                if (mode.equals(ManagerModeType.INHOUSE_MODE)) {
-                       shell.setText("Emulator Manager (Inhouse)");
+                       shell.setText(StringResource.MAIN_TITLE_INHOUSE);
                } else {
-                       shell.setText("Emulator Manager");
+                       shell.setText(StringResource.MAIN_TITLE);
                }
                shell.setLayout(new FillLayout());
 
@@ -105,13 +115,40 @@ public class MainDialog {
                mainComposite.setLayout(getNopaddedGridLayout(1, false));
 
                {
+                       // Architecture selection group and main SashForm...
+
                        Composite archComposite = new Composite(mainComposite, SWT.NONE);
-                       archComposite.setLayout(getNopaddedGridLayout(1, false));
+                       GridLayout upperLayout = new GridLayout(2, false);
+                       upperLayout.marginWidth = 0;
+                       archComposite.setLayout(upperLayout);
                        archComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+
+                       // Top ToolBar
+                       ToolBar leftToolBar = new ToolBar(archComposite, SWT.NONE | SWT.RIGHT);
+                       leftToolBar.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, true, false));
+                       aboutItem = new ToolItem(leftToolBar, SWT.PUSH);
+                       ToolItem separator = new ToolItem(leftToolBar, SWT.SEPARATOR);
+                       separator.setWidth(10);                 
+                       refreshItem = new ToolItem(leftToolBar, SWT.PUSH);
+                       separator = new ToolItem(leftToolBar, SWT.SEPARATOR);
+                       separator.setWidth(10);
+//                     modifyItem = new ToolItem(leftToolBar, SWT.PUSH);
+                       resetItem = new ToolItem(leftToolBar, SWT.PUSH);
+                       deleteItem = new ToolItem(leftToolBar, SWT.PUSH);
+                       
+                       cloneItem = new ToolItem(leftToolBar, SWT.PUSH);
+                       createImageItem = new ToolItem(leftToolBar, SWT.PUSH);
+                       
+                       decorateLeftSideToolItems();
+
+                       ToolBar toolBar = new ToolBar(archComposite, SWT.RIGHT);
+                       toolBar.setLayoutData(new GridData(SWT.END, SWT.CENTER, true, false));
+                       x86ToggleItem = new ToolItem(toolBar, SWT.CHECK);                       
+                       armToggleItem = new ToolItem(toolBar, SWT.CHECK);
                        
-                       archGroup = new ArchitectureGroup(this, archComposite);
-                       archGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+                       decorateRightSideToolItems();
                        
+                       // Main SashForm
                        sashForm = new SashForm(mainComposite, SWT.HORIZONTAL);
                        sashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
                        sashForm.setLayout(new FillLayout());
@@ -123,25 +160,6 @@ public class MainDialog {
 
                                vmsTree = new VMsTree(this, leftView);
                                vmsTree.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
-                               Composite buttonComposite = new Composite(leftView, SWT.NONE);
-                               buttonComposite.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, true, false));
-                               buttonComposite.setLayout(new FillLayout());
-
-                               {
-                                       Label temp = new Label(buttonComposite, SWT.NONE);
-                                       temp.setText("TODO FIX ME");
-                                       temp.setVisible(false);
-                                       temp = new Label(buttonComposite, SWT.NONE);
-                                       temp.setText("TODO FIX ME");
-                                       temp.setVisible(false);
-
-                                       refreshButton = new Button(buttonComposite, SWT.PUSH);
-                                       deleteButton = new Button(buttonComposite, SWT.PUSH);
-                                       resetButton = new Button(buttonComposite, SWT.PUSH);
-                                       
-                                       decorateLeftBottomButtons();
-                               }
                        }
 
                        // Right : detail table
@@ -152,6 +170,8 @@ public class MainDialog {
 
                                detailView = new DetailTableView(this);
                                detailView.createDetailView(shell, rightView);
+                               detailView.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true));
+
 
                                Composite bottomComposite = new Composite(rightView, SWT.NONE);
                                GridLayout bottomLayout = getNopaddedGridLayout(2, false);
@@ -196,14 +216,13 @@ public class MainDialog {
                                                        try {
                                                                detailView.getCurrentPoperty().getWorker().launchVM();
                                                        } catch (VMsWorkerException e) {
-                                                               MessageBox alert = new MessageBox(getShell(), SWT.OK);
-                                                               alert.setMessage(e.getMessage());
-                                                               alert.open();
+                                                               new MessageDialog().openInfoDialog(e.getMessage());
                                                        }
                                                } else if (type.equals(StringResource.CONFIRM)) {
                                                        VMsProperty pro = detailView.confirm();
                                                        if (pro != null) { // success
                                                                refreshProperties();
+                                                               vmsTree.setSelectProperty(pro);
                                                                openDetailView(pro);
                                                        }
                                                }
@@ -219,9 +238,6 @@ public class MainDialog {
                }
 
                handling = new MenuHandling(shell, vmsTree);
-
-               deleteButton.setEnabled(false);
-               resetButton.setEnabled(false);
        }
 
        public void open() {
@@ -232,29 +248,32 @@ public class MainDialog {
                }
                
        }
-       
+
        public Shell getShell() {
                return shell;
        }
 
-
-       public void resetVirtualMachine() {
-               handling.resetVirtualMachine();
+       public void resetVM() {
+               handling.resetVirtualMachine(detailView.getCurrentPoperty());
        }
 
-       public void cloneVirtualMachine() {
-               CloneDialog cloneDialog = new CloneDialog(this, vmsTree);
+       public void cloneVM() {
+               CloneDialog cloneDialog = new CloneDialog(this, detailView.getCurrentPoperty());
                cloneDialog.open();
        }
 
        // TOOD : error checking
-       public void deleteVirtualMachine() {
-               if (handling.deleteVirtualMachine()) {
-                       closeDetailView();
+       public void deleteVM() {
+               if (handling.deleteVirtualMachine(detailView.getCurrentPoperty())) {
                        refreshProperties();
+                       closeDetailView();
                }
        }
 
+       public void createBaseImage() {
+               handling.createBaseImage(detailView.getCurrentPoperty());
+       }
+
        public void refreshVMsTable() {
                vmsTree.refreshContents();
        }
@@ -274,13 +293,11 @@ public class MainDialog {
 
        public void openDetailView(VMsProperty property) {
                if (vmsTree.getSelectionContentCount() == 1) {
-                       deleteButton.setEnabled(true);
-                       resetButton.setEnabled(true);
+                       setToolBarState(State.TRUE);
                } else {
-                       deleteButton.setEnabled(false);
-                       resetButton.setEnabled(false);
+                       setToolBarState(State.FALSE);
                }
-
+               
                leftButton.setText(StringResource.MODIFY);
                leftButton.setImage(ResourceRegistry.getImage(ImageName.MODIFY));
                rightButton.setText(StringResource.LAUNCH);
@@ -293,18 +310,15 @@ public class MainDialog {
 
        public void closeDetailView() {
                if (vmsTree.getSelectionContentCount() > 1) {
-                       deleteButton.setEnabled(true);
-                       resetButton.setEnabled(true);
+                       setToolBarState(State.CLOSE_DETAIL);
                } else {
-                       deleteButton.setEnabled(false);
-                       resetButton.setEnabled(false);
+                       setToolBarState(State.FALSE);
                }
                detailView.closeDetailView();
        }
 
        public void openModifyView(VMsProperty property) {
-               deleteButton.setEnabled(false);
-               resetButton.setEnabled(false);
+               setToolBarState(State.FALSE);
 
                leftButton.setText(StringResource.CANCEL);
                leftButton.setImage(ResourceRegistry.getImage(ImageName.CANCEL));
@@ -317,8 +331,7 @@ public class MainDialog {
        }
 
        public void openCreateDetailView(boolean isDefault) {
-               deleteButton.setEnabled(false);
-               resetButton.setEnabled(false);
+               setToolBarState(State.FALSE);
 
                leftButton.setText(StringResource.CREATE);
                leftButton.setImage(ResourceRegistry.getImage(ImageName.CREATE));
@@ -333,8 +346,7 @@ public class MainDialog {
        }
 
        public void openCreateDetailView() {
-               deleteButton.setEnabled(false);
-               resetButton.setEnabled(false);
+               setToolBarState(State.FALSE);
 
                leftButton.setText(StringResource.CREATE);
                leftButton.setImage(ResourceRegistry.getImage(ImageName.CREATE));
@@ -345,8 +357,7 @@ public class MainDialog {
        }
 
        public void openCreateView() {
-               deleteButton.setEnabled(false);
-               resetButton.setEnabled(false);
+               setToolBarState(State.FALSE);
 
                leftButton.setText(StringResource.CANCEL);
                leftButton.setImage(ResourceRegistry.getImage(ImageName.CANCEL));
@@ -362,7 +373,31 @@ public class MainDialog {
                if(icon != null)
                        icon.dispose();
        }
-       
+enum State {
+       FALSE, TRUE, CLOSE_DETAIL;
+}
+       private void setToolBarState(State state) {
+               switch(state) {
+               case FALSE:
+                       deleteItem.setEnabled(false);
+                       resetItem.setEnabled(false);
+                       cloneItem.setEnabled(false);
+                       createImageItem.setEnabled(false);
+                       break;
+               case TRUE:
+                       deleteItem.setEnabled(true);
+                       resetItem.setEnabled(true);
+                       cloneItem.setEnabled(true);
+                       createImageItem.setEnabled(true);
+                       break;
+               case CLOSE_DETAIL:
+                       deleteItem.setEnabled(true);
+                       resetItem.setEnabled(true);
+                       cloneItem.setEnabled(false);
+                       createImageItem.setEnabled(false);
+                       break;
+               }
+       }
        private GridLayout getNopaddedGridLayout(int numColumns, boolean makeColumnEqualWidth) {
                GridLayout layout = new GridLayout(numColumns, makeColumnEqualWidth);
                layout.horizontalSpacing = 0;
@@ -377,15 +412,61 @@ public class MainDialog {
                return layout;
        }
 
-       public boolean isX86Selected() {
-               return archGroup.x86RadioButton.getSelection();
+       private String getAboutDialogContents() {
+               String version = "";
+               String time = "";
+               String gitVersion = "";
+               String contens = "";
+               String workspace = EmulatorVMs.getInstance().getVMsBaseDirectory();
+               InputStream in = this.getClass().getClassLoader().getResourceAsStream(StringResource.ABOUT_PROP_FILENAME );
+               Properties properties = new Properties();
+               
+               if(in != null) {
+                       try {
+                               properties.load(in);
+                       } catch (IOException e1) {
+                               EMLogger.getLogger().log(Level.SEVERE, e1.getMessage() + "\n");
+                       }
+                       
+                       version = properties.getProperty(StringResource.PROP_KEY_VERSION);
+                       time = properties.getProperty(StringResource.PROP_KEY_BUILD_TIME);
+                       gitVersion = properties.getProperty(StringResource.PROP_KEY_GIT_VERSION);
+               }
+               
+               if(version.isEmpty() || version.contains(StringResource.PROP_KEY_VERSION)) {
+                       version = "Not identified";
+               }
+               if(time.isEmpty() || time.contains(StringResource.PROP_KEY_BUILD_TIME)) {
+                       time = "Not identified";
+               }
+               if(gitVersion.isEmpty() || gitVersion.contains(StringResource.PROP_KEY_GIT_VERSION)) {
+                       gitVersion = "Not identified";
+               }
+               if(workspace.isEmpty()) {
+                       workspace  = "Not identified";
+               }
+       
+               contens = "Version : TIZEN " + version + "\nBuild time : " + time + " (GMT)" +
+               "\nGit version : "+ gitVersion + "\nWorkspace path : " + workspace;
+                
+               return contens;
        }
        
-       private void decorateLeftBottomButtons() {
-               refreshButton.setText(StringResource.REFRESH);
-               refreshButton.setToolTipText("refresh list of virtual machine");
-               refreshButton.setImage(ResourceRegistry.getImage(ImageName.REFRESH));
-               refreshButton.addSelectionListener(new SelectionListener() {
+       private void decorateLeftSideToolItems() {
+               aboutItem.setImage(ResourceRegistry.getImage(ImageName.ABOUT));
+               aboutItem.setToolTipText("About Emulator Manager");
+               aboutItem.addSelectionListener(new SelectionListener() {
+                       @Override
+                       public void widgetSelected(SelectionEvent e) {
+                               new MessageDialog().openInfoDialog("About Emulator Manager",getAboutDialogContents());
+                       }
+                       @Override
+                       public void widgetDefaultSelected(SelectionEvent e) {}
+               });
+
+               refreshItem.setImage(ResourceRegistry.getImage(ImageName.REFRESH));
+               refreshItem.setToolTipText("refresh list of VM");
+               refreshItem.addSelectionListener(new SelectionListener() {
                        @Override
                        public void widgetSelected(SelectionEvent e) {
                                refreshProperties();
@@ -394,73 +475,96 @@ public class MainDialog {
                        public void widgetDefaultSelected(SelectionEvent e) {}
                });
                
-               deleteButton.setText(StringResource.DELETE);
-               deleteButton.setToolTipText("delete selected virtual machine");
-               deleteButton.setImage(ResourceRegistry.getImage(ImageName.DELETE));
-               deleteButton.addSelectionListener(new SelectionListener() {
+               cloneItem.setText(StringResource.CLONE);
+               cloneItem.setImage(ResourceRegistry.getImage(ImageName.CLONE));
+               cloneItem.setToolTipText("Clone from selected VM");
+               cloneItem.setEnabled(false);
+               cloneItem.addSelectionListener(new SelectionListener() {
                        @Override
                        public void widgetSelected(SelectionEvent e) {
-                               deleteVirtualMachine();
+                               cloneVM();
+                       }
+                       @Override
+                       public void widgetDefaultSelected(SelectionEvent e) {}
+               });
+               
+//             modifyItem.setText("Modify");
+//             modifyItem.setImage(ResourceRegistry.getImage(ImageName.MODIFY));
+//             modifyItem.setToolTipText("Modify selected VM");
+//             modifyItem.addSelectionListener(new SelectionListener() {
+//                     @Override
+//                     public void widgetSelected(SelectionEvent e) {
+//                             modifyVM(vmsTree.getSelectionItem());
+//                     }
+//                     @Override
+//                     public void widgetDefaultSelected(SelectionEvent e) {
+//                     }
+//             });
+
+               resetItem.setText(StringResource.RESET);
+               resetItem.setImage(ResourceRegistry.getImage(ImageName.RESET));
+               resetItem.setToolTipText("Format OS of selected VM");
+               resetItem.setEnabled(false);
+               resetItem.addSelectionListener(new SelectionListener() {
+                       @Override
+                       public void widgetSelected(SelectionEvent e) {
+                               resetVM();
                        }
                        @Override
                        public void widgetDefaultSelected(SelectionEvent e) {
                        }
                });
                
-               resetButton.setText(StringResource.RESET);
-               resetButton.setToolTipText("format os of virtual machine");
-               resetButton.setImage(ResourceRegistry.getImage(ImageName.RESET));
-               resetButton.addSelectionListener(new SelectionListener() {
+               deleteItem.setText(StringResource.DELETE);
+               deleteItem.setImage(ResourceRegistry.getImage(ImageName.DELETE));
+               deleteItem.setToolTipText("Delete selected VM");
+               deleteItem.setEnabled(false);
+               deleteItem.addSelectionListener(new SelectionListener() {
                        @Override
-                       public void widgetDefaultSelected(SelectionEvent arg0) {
+                       public void widgetSelected(SelectionEvent e) {
+                               deleteVM();
                        }
-
                        @Override
-                       public void widgetSelected(SelectionEvent arg0) {
-                               resetVirtualMachine();
+                       public void widgetDefaultSelected(SelectionEvent e) {
                        }
-
                });
+               
+               createImageItem.setText(StringResource.CREATE_IMAGE);
+               createImageItem.setImage(ResourceRegistry.getImage(ImageName.CREATEIMAGE));
+               createImageItem.setToolTipText("Create new base image from selected VM");
+               createImageItem.setEnabled(false);
+               createImageItem.addSelectionListener(new SelectionListener() {
+                       @Override
+                       public void widgetSelected(SelectionEvent e) {
+                               createBaseImage();
+                       }
+                       @Override
+                       public void widgetDefaultSelected(SelectionEvent e) {
+                       }
+               });
+               
        }
-
-       public void createBaseImage() {
-               MessageBox msg = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK | SWT.CANCEL);
-               msg.setText("Warning");
-               msg.setMessage("This process may take about 30 to 60 seconds.\nAre you sure you want to continue?");
-
-               int response = msg.open();
-               if (response != SWT.OK) {
-                       return;
-               }
-
-               VMsProperty property = vmsTree.getSelectionItem();
-               FileDialog fd = new FileDialog(shell, SWT.SAVE);
-               fd.setText("Create 'Base Image' As");
-               String[] filter = {"*."+ property.getArch().toString()};
-               String[] filterName = {"Image Files(*." + property.getArch().toString() + ")"};
-               fd.setFilterExtensions(filter);
-               fd.setFilterNames(filterName);
-               fd.setFileName("emulimg-" + property.getName());
-               fd.setFilterPath(FileIO.getInstance().getTizenVmsPath());
-
-               msg = new MessageBox(shell, SWT.ICON_INFORMATION);
-               msg.setText("Info");
-
-               String path = null;
-               path = fd.open();
-               if (path == null) {
-                       msg.setMessage("Task has canceled");
-                       msg.open();
-                       return;
-               }
-
-               VMsWorker worker = new VMsWorker(property);
-               try {
-                       worker.createNewBaseImage(property, path);
-                       msg.setMessage("Succeeded to create 'Base Image'!\nPath: " + path);
-               } catch (VMsWorkerException e) {
-                       msg.setMessage(e.getMessage());
-               }
-               msg.open();
+       
+       private void decorateRightSideToolItems() {
+               x86ToggleItem.setText(StringResource.x86);
+               x86ToggleItem.setImage(ResourceRegistry.getImage(ImageName.X86));
+               x86ToggleItem.setToolTipText("x86 Architecture");
+               x86ToggleItem.setSelection(true);
+               x86ToggleItem.addSelectionListener(new SelectionListener() {
+                       @Override
+                       public void widgetSelected(SelectionEvent e) {
+                               x86ToggleItem.setSelection(true);
+                               refreshProperties();
+                       }
+                       @Override
+                       public void widgetDefaultSelected(SelectionEvent e) {}
+                       
+               });
+               
+               armToggleItem.setText(StringResource.ARM);
+               armToggleItem.setImage(ResourceRegistry.getImage(ImageName.ARM));
+               armToggleItem.setToolTipText("ARM Architecture");
+               armToggleItem.setSelection(false);
+               armToggleItem.setEnabled(false);
        }
 }
index 137d866..2dd3158 100644 (file)
@@ -31,8 +31,9 @@
 package org.tizen.emulator.manager.ui;
 
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.FileDialog;
 import org.eclipse.swt.widgets.Shell;
+import org.tizen.emulator.manager.tool.FileIO;
 import org.tizen.emulator.manager.ui.vmstree.VMsTree;
 import org.tizen.emulator.manager.vms.VMsProperty;
 import org.tizen.emulator.manager.vms.VMsWorkerException;
@@ -46,26 +47,21 @@ public class MenuHandling {
                this.vmsTree    = vmsTree;
        }
 
-       public void resetVirtualMachine() {
-               MessageBox msg = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK | SWT.CANCEL);
-               msg.setText("Warning");
-               msg.setMessage("This VM will be formatting.\nAre you sure you want to continue?");
-
-               int response = msg.open();
-               
+       public void resetVirtualMachine(VMsProperty prop) {
+               MessageDialog msg = new MessageDialog();
+               int response = msg.openSelectionDialog("This VM will be formatted.\nAre you sure you want to continue?");
+       
                if (response != SWT.OK)
                        return;
-               
-               msg = new MessageBox(shell, SWT.ICON_INFORMATION);
-               msg.setText("INFO");
-               
+
                VMsProperty[] properties = vmsTree.getSelectionItems();
+               if (properties.length == 0) {
+                       properties = new VMsProperty[1];
+                       properties[0] = prop;
+               }
                for (VMsProperty property : properties) {
                        if(property.getWorker().isRunningNow()) {
-                               msg.setMessage("[" + property.getName() + "] is running now...\n" +
-                                               "Reset process is canceled !");
-                               msg.open();
-                               
+                               msg.openInfoDialog("Canceled reset process!\n" + "[" + property.getName() + "] is running now...");
                                return;
                        }
                }
@@ -74,38 +70,29 @@ public class MenuHandling {
                        try {
                                property.getWorker().resetVM();
                        } catch (VMsWorkerException e) {
-                               msg.setMessage(" Reset [" + property.getName() + "] failed...\n"
+                               msg.openInfoDialog(" Reset [" + property.getName() + "] failed...\n"
                                                + e.getMessage());
-                               msg.open();
-                               
-                               break;
+                               return;
                        }
                }
                
-               msg.setMessage("Reset process completed !");
-               msg.open();
+               msg.openInfoDialog("Completed reset process!");
        }
 
-       public boolean deleteVirtualMachine() {
-               MessageBox msg = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK | SWT.CANCEL);
-               msg.setText("INFO");
-               msg.setMessage("Are you sure you want to delete selected VM?");
-
-               
-               int response = msg.open();
+       public boolean deleteVirtualMachine(VMsProperty prop) {
+               MessageDialog msg = new MessageDialog();
+               int response = msg.openSelectionDialog("Are you sure you want to delete selected VM?");
                if (response != SWT.OK)
                        return false;
-               
-               msg = new MessageBox(shell, SWT.ICON_INFORMATION);
-               msg.setText("INFO");
 
                VMsProperty[] properties = vmsTree.getSelectionItems();
+               if (properties.length == 0) {
+                       properties = new VMsProperty[1];
+                       properties[0] = prop;
+               }
                for (VMsProperty property : properties) {
                        if(property.getWorker().isRunningNow()) {
-                               msg.setMessage("[" + property.getName() + "] is running now...\n" +
-                                               "Delete process is canceled !");
-                               msg.open();
-                               
+                               msg.openInfoDialog("Canceled delete process!\n" + "[" + property.getName() + "] is running now...");
                                return false;
                        }
                }
@@ -114,17 +101,47 @@ public class MenuHandling {
                        try {
                                property.getWorker().deleteVM();
                        } catch (VMsWorkerException e) {
-                               msg.setMessage(" Delete [" + property.getName() + "] failed...\n"
+                               msg.openInfoDialog(" Delete [" + property.getName() + "] failed...\n"
                                                + e.getMessage());
-                               msg.open();                             
-                               
                                return false;
                        }
                }
-               
-               msg.setMessage("Delete process completed !");
-               msg.open();
-               
+
+               msg.openInfoDialog("Completed delete process!");
+
                return true;
        }
+       
+       public void createBaseImage(VMsProperty prop) {
+               MessageDialog msg = new MessageDialog();
+               VMsProperty property = prop;
+               if(prop.getWorker().isRunningNow()) {
+                       msg.openWarningDialog("Can not 'Create Base Image' while source VM is running.");
+                       return ;
+               }
+                       
+               FileDialog fd = new FileDialog(shell, SWT.SAVE);
+               fd.setText("Create 'Base Image' As");
+               String[] filter = {"*."+ property.getArch().toString()};
+               String[] filterName = {"Image Files(*." + property.getArch().toString() + ")"};
+               fd.setFilterExtensions(filter);
+               fd.setFilterNames(filterName);
+               fd.setFileName("emulimg-" + property.getName());
+               fd.setFilterPath(FileIO.getInstance().getTizenVmsPath());
+
+               String path = null;
+               path = fd.open();
+               if (path == null) {
+                       return;
+               }
+
+               String returnMSG = "";
+               try {
+                       property.getWorker().createNewBaseImage(property, path);
+                       returnMSG = "Succeeded to create 'Base Image'!\nPath: " + path;
+               } catch (VMsWorkerException e) {
+                       returnMSG =e.getMessage();
+               }
+               msg.openInfoDialog(returnMSG);
+       }
 }
diff --git a/src/org/tizen/emulator/manager/ui/MessageDialog.java b/src/org/tizen/emulator/manager/ui/MessageDialog.java
new file mode 100644 (file)
index 0000000..d81ec72
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * Emulator Manager
+ *
+ * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * MunKyu Im <munkyu.im@samsung.com>
+ * SeokYeon Hwang <syeon.hwang@samsung.com>
+ * JiHye Kim <jihye1128.kim@samsung.com>
+ * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.emulator.manager.ui;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
+import org.tizen.emulator.manager.EmulatorManager;
+
+public class MessageDialog
+{
+       private Shell shell;
+       public MessageDialog() {
+               this.shell = EmulatorManager.getInstance().getMainDialog().getShell();
+       }
+
+       public MessageDialog(Shell shell) {
+               if (shell == null) {
+                       this.shell = new Shell();
+               } else {
+                       this.shell = shell;
+               }
+       }
+
+    public int openInfoDialog(final String message) {
+       return openInfoDialog("Info", message);
+    }
+
+    public int openInfoDialog(final String title, final String message) {
+       return openMessageDialog(title, message, SWT.OK | SWT.MODELESS | SWT.ICON_INFORMATION);
+    }
+
+    public int openWarningDialog(final String message) {
+       return openWarningDialog("Warning", message);
+    }
+
+    public int openWarningDialog(final String title, final String message) {
+       return openMessageDialog(title, message, SWT.OK | SWT.MODELESS | SWT.ICON_WARNING);
+    }
+
+    public int openSelectionDialog(final String message) {
+       return openSelectionDialog("Warning", message);
+    }
+
+    public int openSelectionDialog(final String title, final String message) {
+       return openMessageDialog(title, message, SWT.OK | SWT.CANCEL | SWT.MODELESS | SWT.ICON_WARNING);
+    }
+
+    int msgResponse = 0;
+    public int openMessageDialog(final String title, final String message, final int style) {
+        MessageBox dialog = new MessageBox(shell, style);
+        dialog.setText(title);
+        dialog.setMessage(message);
+        msgResponse = dialog.open();
+       return msgResponse;
+    }
+}
index 6f2d091..7215efe 100644 (file)
@@ -41,7 +41,8 @@ import org.eclipse.swt.widgets.Display;
 public class ResourceRegistry {
        public enum ImageName {
                CANCEL("cancel"), CONFIRM("confirm"), CREATE("create"), DELETE("delete"), DETAILS("details"),
-               FOLDER("folder"), MODIFY("modify"), REFRESH("refresh"), RESET("reset"), LAUNCH("launch"), CLONE("clone");
+               FOLDER("folder"), MODIFY("modify"), REFRESH("refresh"), RESET("reset"), LAUNCH("launch"), CREATEIMAGE("createimage"),
+               ABOUT("about"), CLONE("clone"), ARM("arm"), X86("x86");
 
                String name;
 
diff --git a/src/org/tizen/emulator/manager/ui/SelectWorkspaceDialog.java b/src/org/tizen/emulator/manager/ui/SelectWorkspaceDialog.java
new file mode 100644 (file)
index 0000000..0129255
--- /dev/null
@@ -0,0 +1,226 @@
+/*
+ * Emulator Manager
+ *
+ * Copyright (C) 2011 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * MunKyu Im <munkyu.im@samsung.com>
+ * SeokYeon Hwang <syeon.hwang@samsung.com>
+ * JiHye Kim <jihye1128.kim@samsung.com>
+ * YeongKyoon Lee <yeongkyoon.lee@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
+package org.tizen.emulator.manager.ui;
+
+import java.util.Properties;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.DirectoryDialog;
+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.eclipse.swt.widgets.Text;
+import org.tizen.emulator.manager.tool.StringResource;
+import org.tizen.emulator.manager.vms.EmulatorVMs;
+
+public class SelectWorkspaceDialog {
+       private Shell dialog;
+       private String selectedPath = null;
+       private boolean showDialog  = true;
+       private Properties prop = null;
+
+       private Button askButton;
+       private Button browseButton;
+       private Text pathText;
+
+       private Button cancelButton;
+       private Button okButton;
+       
+       private boolean isCanceled = true;
+
+       public SelectWorkspaceDialog(Properties prop) {
+               this.prop = prop;
+       }
+
+       public void create() {
+               dialog = new Shell(Display.getCurrent(), SWT.CLOSE);
+               dialog.setText(StringResource.SWD_TITLE);
+               dialog.setSize(500, 180);
+               GridLayout layout = new GridLayout(1, false);
+               layout.horizontalSpacing        = 0;
+               layout.verticalSpacing          = 0;
+               layout.marginBottom             = 0;
+               layout.marginHeight             = 0;
+               layout.marginLeft                       = 0;
+               layout.marginRight                      = 0;
+               layout.marginTop                        = 0;
+               layout.marginWidth                      = 0;
+               dialog.setLayout(layout);
+
+               Composite labelComposite = new Composite(dialog, SWT.NONE);
+               labelComposite.setLayout(new FillLayout());
+               labelComposite.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
+               Label label = new Label(dialog, SWT.NONE);
+               label.setLayoutData(new GridData(SWT.FILL, SWT.TOP, false, true));
+               label.setText("   Emulator Manager stores your VM list in a folder.\n" +
+                                       "   Choose a folder to use for this session");
+               label.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
+
+               Label sep = new Label(dialog, SWT.SEPARATOR | SWT.HORIZONTAL);
+               sep.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true));
+
+               Composite browseComposite = new Composite(dialog, SWT.NONE);
+               browseComposite.setLayout(new GridLayout(2, false));
+               browseComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+
+
+               pathText = new Text(browseComposite, SWT.BORDER);
+               if (prop == null || prop.getProperty(StringResource.RECENT_VMS_PATH).isEmpty()) {
+                       selectedPath = EmulatorVMs.getInstance().getVMsBaseDirectory();
+               } else {
+                       selectedPath =prop.getProperty(StringResource.RECENT_VMS_PATH);
+               }
+               pathText.setText(selectedPath);
+
+               pathText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+
+               browseButton = new Button(browseComposite, SWT.PUSH);
+               browseButton.setText(StringResource.SWD_BROWSE);
+
+               Composite bottomComposite = new Composite(dialog, SWT.NONE);
+               bottomComposite.setLayout(new GridLayout(3, false));
+               bottomComposite.setLayoutData(new GridData(SWT.FILL, SWT.BOTTOM, false, true));
+
+               askButton = new Button(bottomComposite, SWT.CHECK);
+               askButton.setText(StringResource.SWD_ASK_AGAIN);
+               
+               new Label(bottomComposite, SWT.NONE);
+               new Label(bottomComposite, SWT.NONE);
+
+               new Label(bottomComposite, SWT.NONE);
+
+               cancelButton = new Button(bottomComposite, SWT.PUSH);
+               cancelButton.setText(StringResource.CANCEL);
+               cancelButton.setSize(100, SWT.NONE);
+               cancelButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+
+               okButton = new Button(bottomComposite, SWT.PUSH);
+               okButton.setText(StringResource.OK);
+               okButton.setSize(100, SWT.NONE);
+               okButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+
+               addListener();
+
+       }
+
+       private void addListener() {
+               dialog.addListener(SWT.Close, new Listener() {
+                       @Override
+                       public void handleEvent(Event event) {
+                               if (isCanceled) {
+                                       showDialog = true;
+                                       selectedPath = null;
+                                       setCanceled(true);
+                               }
+                       }
+                       
+               });
+
+               browseButton.addSelectionListener(new SelectionListener(){
+                       @Override
+                       public void widgetSelected(SelectionEvent e) {
+                               DirectoryDialog dd = new DirectoryDialog(dialog, SWT.OPEN);
+                               dd.setText(StringResource.SELECT_DIRECTORY);
+                               selectedPath = dd.open();
+                               if (selectedPath != null) {
+                                       pathText.setText(selectedPath);
+                               }
+                       }
+                       @Override
+                       public void widgetDefaultSelected(SelectionEvent e) {
+                       }
+               });
+               
+               askButton.addSelectionListener(new SelectionListener() {
+                       @Override
+                       public void widgetSelected(SelectionEvent e) {
+                               showDialog = !askButton.getSelection();
+                       }
+                       @Override
+                       public void widgetDefaultSelected(SelectionEvent e) {
+                       }
+                       
+               });
+               
+               cancelButton.addSelectionListener(new SelectionListener() {
+                       @Override
+                       public void widgetSelected(SelectionEvent e) {
+                               isCanceled = true;
+                               dialog.close();
+                       }
+                       @Override
+                       public void widgetDefaultSelected(SelectionEvent e) {
+                       }
+               });
+
+               okButton.addSelectionListener(new SelectionListener() {
+                       @Override
+                       public void widgetSelected(SelectionEvent e) {
+                               isCanceled = false;
+                               dialog.close();
+                       }
+                       @Override
+                       public void widgetDefaultSelected(SelectionEvent e) {
+                       }
+                       
+               });
+       }
+
+       public Shell open() {
+               dialog.open();
+               return dialog;
+       }
+
+       public String getSelectedPath() {
+               return selectedPath;
+       }
+
+       public boolean isShowDialog() {
+               return showDialog;
+       }
+
+       public boolean isCanceled() {
+               return isCanceled;
+       }
+
+       public void setCanceled(boolean isCanceled) {
+               this.isCanceled = isCanceled;
+       }
+}
\ No newline at end of file
index 6075160..d34618b 100644 (file)
@@ -31,7 +31,6 @@
 package org.tizen.emulator.manager.ui.detail;
 
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Event;
@@ -67,9 +66,8 @@ public class DetailTableView {
 
        public void createDetailView(Shell shell, Composite rightView) {
                detailTable = new Table(rightView, SWT.BORDER);
-               detailTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true));
                detailTable.setHeaderVisible(true);
-               detailTable.setLinesVisible(true);
+               detailTable.setLinesVisible(false);
                detailTable.addListener(SWT.MeasureItem, new Listener() {
                        @Override
                        public void handleEvent(Event event) {
@@ -213,4 +211,8 @@ public class DetailTableView {
        public VMsProperty confirm() {
                return vmView.confirm();
        }
+
+       public void setLayoutData(Object data) {
+               detailTable.setLayoutData(data);
+       }
 }
index 7b64ca3..7a8b81e 100644 (file)
@@ -46,14 +46,15 @@ import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.DirectoryDialog;
 import org.eclipse.swt.widgets.FileDialog;
 import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.MessageBox;
 import org.eclipse.swt.widgets.Spinner;
 import org.eclipse.swt.widgets.Table;
 import org.eclipse.swt.widgets.TableItem;
 import org.eclipse.swt.widgets.Text;
 import org.tizen.emulator.manager.EmulatorManager;
 import org.tizen.emulator.manager.EmulatorManager.ManagerModeType;
+import org.tizen.emulator.manager.tool.CheckVirtualization;
 import org.tizen.emulator.manager.tool.StringResource;
+import org.tizen.emulator.manager.ui.MessageDialog;
 import org.tizen.emulator.manager.ui.ResourceRegistry;
 import org.tizen.emulator.manager.ui.ResourceRegistry.ImageName;
 import org.tizen.emulator.manager.vms.Creator;
@@ -65,7 +66,7 @@ import org.tizen.emulator.manager.vms.VMsWorkerException;
 enum CItem{
        ImageName("Name"), ImageNameInfo(""), BaseImage("BaseImage"), 
        Resolution("Display Resolution"), Density("Display Density"), SkinType("Front Key Type"),
-       SDType("SDCard"), SDPath("SDCard Path"), RAMSize("RAM Size"),
+       RAMSize("RAM Size"),
        ShareType("File Sharing"), SharePath("File Sharing Path"), HWVirtual("HW Virtualization"),
        TouchType("Max Touch Point");
 
@@ -81,7 +82,7 @@ enum CItem{
 enum DItem{
        ImageName("Name"), BaseImage("BaseImage"), 
        Resolution("Display Resolution"), Density("Display Density"), SkinType("Front Key Type"),
-       SDType("SDCard"), SDPath("SDCard Path"), RAMSize("RAM Size"),
+       RAMSize("RAM Size"),
        ShareType("File Sharing"), SharePath("File Sharing Path"), HWVirtual("HW Virtualization"),
        TouchType("Max Touch Point"), Dummy("");
 
@@ -189,17 +190,13 @@ public class VMPropertyView {
                widget.itemList.get(DItem.SkinType.ordinal()).setText(1, oldValue.keyType == 1
                                                                        ? StringResource.ONE_KEY_TYPE : StringResource.THREE_KEYS_TYPE);
 
-               widget.itemList.get(DItem.SDType.ordinal()).setText(1, oldValue.isSDCardSupport 
-                                                                                                                       ? StringResource.SUPPORTED : StringResource.NOT_SUPPORTED);
-               widget.itemList.get(DItem.SDPath.ordinal()).setText(1, oldValue.SDCardPathName);
-
                widget.itemList.get(DItem.RAMSize.ordinal()).setText(1, String.valueOf(oldValue.ramSize));
 
                widget.itemList.get(DItem.ShareType.ordinal()).setText(1,oldValue.isFileShareSupport 
                                                                                                                                ? StringResource.SUPPORTED : StringResource.NOT_SUPPORTED);
                widget.itemList.get(DItem.SharePath.ordinal()).setText(1, oldValue.fileSharePathName);
 
-               widget.itemList.get(DItem.HWVirtual.ordinal()).setText(1, oldValue.isHWVirtualization && helper.isSupportVirtualization()
+               widget.itemList.get(DItem.HWVirtual.ordinal()).setText(1, oldValue.isHWVirtualization && CheckVirtualization.getInstance().isSupportVirtualization()
                                ? StringResource.SUPPORTED : StringResource.NOT_SUPPORTED);
 
                if (managerMode.equals(ManagerModeType.INHOUSE_MODE)) {
@@ -222,15 +219,12 @@ public class VMPropertyView {
                // TODO : please !!!
                widget.itemList.get(CItem.SkinType.ordinal()).setText(1, StringResource.ONE_KEY_TYPE);
 
-               widget.itemList.get(CItem.SDType.ordinal()).setText(1, StringResource.NOT_SUPPORTED);
-               widget.itemList.get(CItem.SDPath.ordinal()).setText(1, oldValue.SDCardPathName);
-
                widget.itemList.get(CItem.RAMSize.ordinal()).setText(1, String.valueOf(oldValue.ramSize));
 
                widget.itemList.get(CItem.ShareType.ordinal()).setText(1, StringResource.NOT_SUPPORTED);
                widget.itemList.get(CItem.SharePath.ordinal()).setText(1, oldValue.fileSharePathName);
 
-               widget.itemList.get(CItem.HWVirtual.ordinal()).setText(1, oldValue.isHWVirtualization && helper.isSupportVirtualization()
+               widget.itemList.get(CItem.HWVirtual.ordinal()).setText(1, oldValue.isHWVirtualization && CheckVirtualization.getInstance().isSupportVirtualization()
                                ? StringResource.SUPPORTED : StringResource.NOT_SUPPORTED);
 
                if (managerMode.equals(ManagerModeType.INHOUSE_MODE)) {
@@ -245,7 +239,6 @@ public class VMPropertyView {
                createNameArea(table);
                createBaseImageArea(table);
                createDisplayArea(table);
-               createSDCardArea(table);
                createRAMSizeArea(table);
                createFileShareArea(table);
                createHWVirtualArea(table);
@@ -261,7 +254,6 @@ public class VMPropertyView {
                createNameArea(table);
                createBaseImageArea(table);
                createDisplayArea(table);
-               createSDCardArea(table);
                createRAMSizeArea(table);
                createFileShareArea(table);
                createHWVirtualArea(table);
@@ -293,11 +285,9 @@ public class VMPropertyView {
                
                editor = new TableEditor(table);
                editor.grabHorizontal = true;
-               editor.setEditor(widget.SDCardTypeCombo, widget.itemList.get(DItem.SDType.ordinal()), 1);
                
                editor = new TableEditor(table);
                editor.grabHorizontal = true;
-               editor.setEditor(widget.SDCardPathCombo, widget.itemList.get(DItem.SDPath.ordinal()), 1);
                
                editor = new TableEditor(table);
                editor.grabHorizontal = true;
@@ -346,14 +336,6 @@ public class VMPropertyView {
                editor = new TableEditor(table);
                editor.grabHorizontal = true;
                editor.setEditor(widget.skinTypeCombo, widget.itemList.get(CItem.SkinType.ordinal()), 1);
-
-               editor = new TableEditor(table);
-               editor.grabHorizontal = true;
-               editor.setEditor(widget.SDCardTypeCombo, widget.itemList.get(CItem.SDType.ordinal()), 1);
-
-               editor = new TableEditor(table);
-               editor.grabHorizontal = true;
-               editor.setEditor(widget.SDCardPathCombo, widget.itemList.get(CItem.SDPath.ordinal()), 1);
                
                editor = new TableEditor(table);
                editor.grabHorizontal = true;
@@ -405,7 +387,7 @@ public class VMPropertyView {
        }
 
        private void checkImageName() {
-               if (newValue.imageName.length() == MAX_NAME_LEN) {
+               if (newValue.imageName.length() > MAX_NAME_LEN) {
                        widget.nameinfoLabel.setText("Max length is 20.");
                        widget.confirmButton.setEnabled(false);
                        return;
@@ -424,7 +406,11 @@ public class VMPropertyView {
                        return;
                }
 
-               widget.nameinfoLabel.setText("");
+               if (newValue.imageName.length() == MAX_NAME_LEN) {
+                       widget.nameinfoLabel.setText("Max length is 20.");
+               } else {
+                       widget.nameinfoLabel.setText("");
+               }
                if (newValue.imageName.isEmpty()) {
                        widget.confirmButton.setEnabled(false);
                } else {
@@ -492,6 +478,7 @@ public class VMPropertyView {
                                                        DisplayResoultion.getInstance().findIndex(oldValue.resolution));
                widget.DIPspinner = new Spinner(table, SWT.BORDER);
                widget.DIPspinner.setValues(oldValue.dpi, 100, 480, 0, 1, 1);
+               widget.DIPspinner.setTextLimit(3);
                if (!isCreateMode) {
                        widget.DIPspinner.setEnabled(false);
                }
@@ -540,7 +527,7 @@ public class VMPropertyView {
                                */
                        }
                });
-               
+
                // TODO
                widget.skinTypeCombo.addSelectionListener(new SelectionListener() {
                        @Override
@@ -549,11 +536,9 @@ public class VMPropertyView {
                                if (i == 0) {// 1key type
                                        newValue.keyType = 1;
                                } else if (i == 1) { // 3key type
-                                       MessageBox msg = new MessageBox(table.getShell(), SWT.ICON_WARNING);
-                                       msg.setText("Warning");
-                                       msg.setMessage("Check platform of emulator supports 3 keys(Call/Home/End)\n"
-                                                                       +"If platform has not support 3 keys, just change emulator skin.");
-                                       msg.open();
+                                       MessageDialog msg = new MessageDialog();
+                                       msg.openWarningDialog("Pleaes check wheter platform of Emulator supports 3 keys(Call/Home/End).\n"
+                                                                       +"If the platform does not support 3 keys, only emulator skin is changed.");
                                        newValue.keyType = 3;
                                }
                                if (!isCreateMode) {
@@ -567,82 +552,6 @@ public class VMPropertyView {
                });
        }
 
-       private void createSDCardArea(final Table table) {
-               widget.SDCardTypeCombo = helper.makeCombo(table);
-               helper.addComboItem(widget.SDCardTypeCombo, SupportType.getInstance().getList());
-               widget.SDCardTypeCombo.select(oldValue.isSDCardSupport == true ? 0 : 1);
-
-               widget.SDCardPathCombo = helper.makeCombo(table);
-               helper.addComboItem(widget.SDCardPathCombo, SDCard.getInstance().getList());
-               widget.SDCardPathCombo.add(oldValue.SDCardPathName, 0);
-               widget.SDCardPathCombo.add("-----------------------------------------------", 1);
-               widget.SDCardPathCombo.add("--Select existing SDCard", SDCard.getInstance().size() + 2);
-               widget.SDCardPathCombo.select(0);
-               widget.SDCardPathCombo.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-               widget.SDCardPathCombo.setEnabled(oldValue.isSDCardSupport);
-
-               createSDCardListener();
-       }
-
-       private void createSDCardListener() {
-               widget.SDCardTypeCombo.addSelectionListener(new SelectionListener() {
-                       @Override
-                       public void widgetSelected(SelectionEvent e) {
-                               int index = widget.SDCardTypeCombo.getSelectionIndex();
-                               if (index == 0) { // supported
-                                       newValue.isSDCardSupport = true;
-                                       widget.SDCardPathCombo.setEnabled(true);
-                               } else if (index == 1) { // not supported
-                                       newValue.isSDCardSupport = false;
-                                       widget.SDCardPathCombo.setEnabled(false);
-                               }
-
-                               if (!isCreateMode) {
-                                       checkModifyState();
-                               }
-                       }
-                       @Override
-                       public void widgetDefaultSelected(SelectionEvent e) {
-                       }
-               });
-
-               widget.SDCardPathCombo.addSelectionListener(new SelectionListener() {
-                       @Override
-                       public void widgetSelected(SelectionEvent e) {
-                               int i = widget.SDCardPathCombo.getSelectionIndex();
-                               if (i == SDCard.getInstance().size() + 2) { // Select Exist SDCard
-                                       if (widget.SDImageFD == null) {
-                                               widget.SDImageFD = new FileDialog(table.getShell(), SWT.OPEN);
-                                               widget.SDImageFD.setText("Select an existing SD card");
-                                               String[] filter = {"*.img"};
-                                               String[] filterName = {"SD Card Image Files(*.img)"};
-                                               widget.SDImageFD.setFilterExtensions(filter);
-                                               widget.SDImageFD.setFilterNames(filterName);
-                                       }
-                                       String path = widget.SDImageFD.open();
-                                       if(path != null) {
-                                               newValue.SDCardPath = path;
-                                               newValue.SDCardPathName = path.substring(path.lastIndexOf(SEFARATOR) + 1, path.length());
-                                       }
-                               } else if (i != 0 && i != 1) {
-                                       newValue.SDCardPath = widget.SDCardPathCombo.getItem(i);
-                                       newValue.SDCardPathName = widget.SDCardPathCombo.getItem(i);
-                               }
-
-                               widget.SDCardPathCombo.remove(0);
-                               widget.SDCardPathCombo.add(newValue.SDCardPathName, 0);
-                               widget.SDCardPathCombo.select(0);
-
-                               if (!isCreateMode) {
-                                       checkModifyState();
-                               }
-                       }
-                       @Override
-                       public void widgetDefaultSelected(SelectionEvent e) {
-                       }
-               });
-       }
-
        private void createRAMSizeArea(Table table) {
                widget.ramSizeCombo = helper.makeCombo(table);
                helper.addComboItem(widget.ramSizeCombo, RamSize.getInstance().getList(),
@@ -729,10 +638,10 @@ public class VMPropertyView {
        private void createHWVirtualArea(final Table table) {
                widget.HWVirtualCombo = helper.makeCombo(table);
                helper.addComboItem(widget.HWVirtualCombo, SupportType.getInstance().getList());
-               widget.HWVirtualCombo.select(oldValue.isHWVirtualization && helper.isSupportVirtualization()
+               widget.HWVirtualCombo.select(oldValue.isHWVirtualization && CheckVirtualization.getInstance().isSupportVirtualization()
                                                                        ? 0 : 1);
                
-               if (!helper.isSupportVirtualization()) {
+               if (!CheckVirtualization.getInstance().isSupportVirtualization()) {
                        widget.HWVirtualCombo.setEnabled(false);
                }
                
@@ -790,23 +699,23 @@ public class VMPropertyView {
 
        public VMsProperty confirm() {
                VMsProperty p = null;
-               MessageBox msg = new MessageBox(table.getShell(), SWT.ICON_INFORMATION);
-               msg.setText("INFO");
+               MessageDialog msg = new MessageDialog();
+               String message = "";
                try {
                        if (isCreateMode) {
                                p = Creator.create(newValue);
-                               msg.setMessage("Succeeded to create the VM!");
+                               message= "Succeeded to create the VM!";
                        }
                        else {
                                property.getWorker().modifyVM(oldValue, newValue);
                                p = property;
-                               msg.setMessage("Succeeded to modify the VM!");
+                               message = "Succeeded to modify the VM!";
                        }
                } catch (VMsWorkerException e) {
-                       msg.setMessage(e.getMessage());
+                       message = e.getMessage();
                }
-               
-               msg.open();
+
+               msg.openInfoDialog(message);
                                
                return p;
        }
@@ -826,10 +735,6 @@ class VMViewWidget {
        public Spinner DIPspinner;
        public Combo skinTypeCombo;
 
-       public Combo  SDCardTypeCombo;
-       public Combo  SDCardPathCombo;
-       public FileDialog SDImageFD;
-       
        public Combo ramSizeCombo;
 
        public Combo  shareTypeCombo;
@@ -851,8 +756,6 @@ class VMViewWidget {
                resolutionCombo.dispose();
                DIPspinner.dispose();
                skinTypeCombo.dispose();
-               SDCardTypeCombo.dispose();
-               SDCardPathCombo.dispose();
                ramSizeCombo.dispose();
                shareTypeCombo.dispose();
                selectShareFolderButton.dispose();
index 8c253c8..a325017 100644 (file)
@@ -32,7 +32,7 @@ package org.tizen.emulator.manager.ui.detail;
 
 import java.util.ArrayList;
 
-import org.tizen.emulator.manager.vms.VMCreateHelper;
+import org.tizen.emulator.manager.tool.StringResource;
 
 class StringArrayResource
 {
@@ -87,8 +87,8 @@ class SupportType extends StringArrayResource
 
        private SupportType()
        {
-               add(0, "Supported");
-               add(1, "Not supported");
+               add(0, StringResource.SUPPORTED);
+               add(1, StringResource.NOT_SUPPORTED);
                
                setDefaultIndex(1);
        }
@@ -137,67 +137,6 @@ class DisplayResoultion extends StringArrayResource
        }
 }
 
-class SkinPath extends StringArrayResource
-{
-       private static SkinPath skinPath = new SkinPath();
-       public static SkinPath getInstance() {
-               return skinPath;
-       }
-
-       private SkinPath() {
-               ArrayList<String> list = new VMCreateHelper().makeSkinfolderList();
-               int index = 0;
-               for (String s : list) {
-                       add(index++, s);
-               }
-       }
-
-       public int findIndex(String r) {
-               String[] strArray = getList();
-               String s = null;
-               // TODO:
-               r = "emul_" + r;
-               for (int i = 0; i < strArray.length; i++) {
-                       s = strArray[i];
-                       if (s.equals(r)) {
-                               return i;
-                       }
-               }
-               return getDefaultIndex();
-       }
-}
-
-class SDCard extends StringArrayResource
-{
-       private static SDCard capacity = new SDCard();
-       public static SDCard getInstance()
-       {
-               return capacity;
-       }
-
-       private SDCard()
-       {
-               add(0, "sdcard_256.img (256MB)");
-               add(1, "sdcard_512.img (512MB)");
-               add(2, "sdcard_1024.img (1024MB)");
-               add(3, "sdcard_1536.img (1536MB)");
-
-               setDefaultIndex(1);
-       }
-       
-       public int findIndex(String type) {
-               String[] strArray = getList();
-               String s = null;
-               for (int i = 0; i < strArray.length; i++) {
-                       s = strArray[i];
-                       if (s.contains(type)) {
-                               return i;
-                       }
-               }
-               return getDefaultIndex();
-       }
-}
-
 class RamSize extends StringArrayResource
 {
        private static RamSize size = new RamSize();
index ef40cef..2423c67 100644 (file)
@@ -37,11 +37,11 @@ import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.widgets.Menu;
 import org.eclipse.swt.widgets.MenuItem;
-import org.eclipse.swt.widgets.MessageBox;
 import org.eclipse.swt.widgets.Tree;
 import org.eclipse.swt.widgets.TreeItem;
 import org.tizen.emulator.manager.EmulatorManager;
 import org.tizen.emulator.manager.tool.StringResource;
+import org.tizen.emulator.manager.ui.MessageDialog;
 import org.tizen.emulator.manager.ui.ResourceRegistry;
 import org.tizen.emulator.manager.ui.ResourceRegistry.ImageName;
 import org.tizen.emulator.manager.vms.VMsProperty;
@@ -70,15 +70,14 @@ public class ContextMenu {
                                try {
                                        property.getWorker().launchVM();
                                } catch (VMsWorkerException e) {
-                                       MessageBox alert = new MessageBox(EmulatorManager.getInstance().getMainDialog().getShell(), SWT.OK);
-                                       alert.setMessage(e.getMessage());
-                                       alert.open();
+                                       new MessageDialog().openInfoDialog(e.getMessage());
                                }
                        }
                        @Override
                        public void widgetDefaultSelected(SelectionEvent event) {
                        }
                });
+
                final MenuItem modifyItem = new MenuItem(treeMenu, SWT.NONE);
                modifyItem.setText(StringResource.MODIFY);
                modifyItem.setImage(ResourceRegistry.getImage(ImageName.MODIFY));
@@ -92,30 +91,33 @@ public class ContextMenu {
                                EmulatorManager.getInstance().getMainDialog().openModifyView(property);
                        }
                });
-               final MenuItem deleteItem = new MenuItem(treeMenu, SWT.NONE);
-               deleteItem.setText(StringResource.DELETE);
-               deleteItem.setImage(ResourceRegistry.getImage(ImageName.DELETE));
-               deleteItem.addSelectionListener(new SelectionListener() {
+
+               new MenuItem(treeMenu, SWT.SEPARATOR);
+
+               final MenuItem resetItem = new MenuItem(treeMenu, SWT.NONE);
+               resetItem.setText(StringResource.RESET);
+               resetItem.setImage(ResourceRegistry.getImage(ImageName.RESET));
+               resetItem.addSelectionListener(new SelectionListener() {
                        @Override
                        public void widgetDefaultSelected(SelectionEvent arg0) {
                        }
                        @Override
                        public void widgetSelected(SelectionEvent arg0) {
-                               EmulatorManager.getInstance().getMainDialog().deleteVirtualMachine();
+                               EmulatorManager.getInstance().getMainDialog().resetVM();
                        }
                });
-               final MenuItem resetItem = new MenuItem(treeMenu, SWT.NONE);
-               resetItem.setText(StringResource.RESET);
-               resetItem.setImage(ResourceRegistry.getImage(ImageName.RESET));
-               resetItem.addSelectionListener(new SelectionListener() {
+
+               final MenuItem deleteItem = new MenuItem(treeMenu, SWT.NONE);
+               deleteItem.setText(StringResource.DELETE);
+               deleteItem.setImage(ResourceRegistry.getImage(ImageName.DELETE));
+               deleteItem.addSelectionListener(new SelectionListener() {
                        @Override
                        public void widgetDefaultSelected(SelectionEvent arg0) {
                        }
                        @Override
                        public void widgetSelected(SelectionEvent arg0) {
-                               EmulatorManager.getInstance().getMainDialog().resetVirtualMachine();
+                               EmulatorManager.getInstance().getMainDialog().deleteVM();
                        }
-                       
                });
 
                new MenuItem(treeMenu, SWT.SEPARATOR);
@@ -130,12 +132,13 @@ public class ContextMenu {
 
                        @Override
                        public void widgetSelected(SelectionEvent arg0) {
-                               EmulatorManager.getInstance().getMainDialog().cloneVirtualMachine();
+                               EmulatorManager.getInstance().getMainDialog().cloneVM();
                        }
                });
 
                final MenuItem createImageItem = new MenuItem(treeMenu, SWT.NONE);
                createImageItem.setText(StringResource.CREATE_IMAGE);
+               createImageItem.setImage(ResourceRegistry.getImage(ImageName.CREATEIMAGE));
                createImageItem.addSelectionListener(new SelectionListener() {
                        @Override
                        public void widgetSelected(SelectionEvent e) {
index 6f2a54a..0cd3ee2 100644 (file)
@@ -63,7 +63,7 @@ class PropertyContent implements TreeContent {
 
 class CreateMarker implements TreeMarker {
        public CreateMarker(TreeItem item) {
-               item.setText("<< Create new... >>       ");
+               item.setText("<< Create new... >>");
                
                Font font = ResourceRegistry.getFont(SWT.BOLD);
                if(font == null) {
index 05917b1..58d9978 100644 (file)
@@ -41,12 +41,11 @@ import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.MessageBox;
 import org.eclipse.swt.widgets.Tree;
 import org.eclipse.swt.widgets.TreeColumn;
 import org.eclipse.swt.widgets.TreeItem;
-import org.tizen.emulator.manager.EmulatorManager;
 import org.tizen.emulator.manager.ui.MainDialog;
+import org.tizen.emulator.manager.ui.MessageDialog;
 import org.tizen.emulator.manager.vms.EmulatorVMs;
 import org.tizen.emulator.manager.vms.VMsProperty;
 import org.tizen.emulator.manager.vms.VMsProperty.Architecture;
@@ -61,7 +60,7 @@ public class VMsTree {
 
        EmulatorVMs fsImage = EmulatorVMs.getInstance();
 
-       public VMsTree(MainDialog mainDialog, Composite parent) {
+       public VMsTree(final MainDialog mainDialog, Composite parent) {
                this.mainDialog = mainDialog;
 
                this.vmsTree = new Tree(parent, SWT.BORDER | SWT.MULTI | SWT.FULL_SELECTION);
@@ -79,7 +78,8 @@ public class VMsTree {
                }
 
                refreshContents();
-               pack();
+               packAll();
+               packAll(); // FIXME: Need second pack avoid column becomes too narrow... why ???
 
                contextMenu.prepare(vmsTree);
                Menu tableMenu = contextMenu.getMenu();
@@ -102,20 +102,20 @@ public class VMsTree {
 
                                        if (vmsTree.getSelection()[0].getData() instanceof CreateMarker) {
                                                if (vmsTree.getSelection()[0].getParentItem().getText().equals("Custom")) {
-                                                       VMsTree.this.mainDialog.openCreateDetailView(false);
+                                                       mainDialog.openCreateDetailView(false);
                                                } else {
-                                                       VMsTree.this.mainDialog.openCreateDetailView(true);
+                                                       mainDialog.openCreateDetailView(true);
                                                }
                                                return;
                                        }
 
                                        if(vmsTree.getSelection()[0].getData() instanceof TreeMarker) {
-                                               VMsTree.this.mainDialog.closeDetailView();
+                                               mainDialog.closeDetailView();
                                                return;
                                        }
 
                                        PropertyContent content = (PropertyContent)data;
-                                       VMsTree.this.mainDialog.openDetailView(content.property);
+                                       mainDialog.openDetailView(content.property);
                                }
                        }
 
@@ -131,9 +131,7 @@ public class VMsTree {
                                try {
                                        property.getWorker().launchVM();
                                } catch (VMsWorkerException e) {
-                                       MessageBox alert = new MessageBox(EmulatorManager.getInstance().getMainDialog().getShell(), SWT.OK);
-                                       alert.setMessage(e.getMessage());
-                                       alert.open();
+                                       new MessageDialog().openInfoDialog(e.getMessage());
                                }
                        }
                });
@@ -149,13 +147,13 @@ public class VMsTree {
                                                        return;
                                                }
                                        }
-                                       EmulatorManager.getInstance().getMainDialog().deleteVirtualMachine();
+                                       mainDialog.deleteVM();
                                }
                        }
                });
        }
 
-       private void pack() {
+       private void packAll() {
                for(TreeColumn column : vmsTree.getColumns()) {
                        column.pack();
                }
@@ -176,13 +174,13 @@ public class VMsTree {
                RowItem rowItem = null;
 
                // FIXME !!
-               // TODO: We insert "1.0" now...
+               // TODO: We insert "Tizen Larkspur" now...
                TreeItem tempItem = new TreeItem(vmsTree, SWT.NONE);
-               rowItem = new StandardVMsMarker("1.0", tempItem);
+               rowItem = new StandardVMsMarker("TIZEN Larkspur", tempItem);
                tempItem.setData(rowItem);
 
                Map<String, TreeItem> itemsMap = new HashMap<String, TreeItem>();
-               itemsMap.put("1.0", tempItem);
+               itemsMap.put("TIZEN Larkspur", tempItem);
 
                TreeItem createItem = new TreeItem(tempItem, SWT.NONE);
                rowItem = new CreateMarker(createItem);
@@ -286,4 +284,21 @@ public class VMsTree {
        public void setLayoutData(Object data) {
                vmsTree.setLayoutData(data);
        }
-}
\ No newline at end of file
+
+       public void setSelectProperty(VMsProperty property) {
+               Object data;
+               vmsTree.deselectAll();
+               for (TreeItem item : vmsTree.getItems()) {
+                       for (TreeItem i : item.getItems()) {
+                               data = i.getData();
+                               if (data instanceof TreeMarker) {
+                                       continue;
+                               }
+                               if (((PropertyContent)data).getProperty().getName().equals(property.getName())) {
+                                       vmsTree.select(i);
+                                       break;
+                               }
+                       }
+               }
+       }
+}
index 572e8f9..b4093de 100644 (file)
@@ -70,7 +70,6 @@ public class Creator {
                        createFileShare();
                        createDisplay();
                        createRam();
-                       createSDCard();
                        createHWVirtualization();
                }
                catch(VMsCreatorException e) {
@@ -166,16 +165,6 @@ public class Creator {
 
        private void createRam() {}
 
-       private void createSDCard() throws VMsCreatorException {
-               if (newVM.isSDCardSupport) {
-                       try {
-                               Modifier.modifySDCard(newVM);
-                       } catch (VMsWorkerException e) {
-                               throw new VMsCreatorException(e.getMessage());
-                       }
-               }
-       }
-
        private void createHWVirtualization() {}
 
        private void settingProperty() {
@@ -192,7 +181,7 @@ public class Creator {
                if (newVM.isDefaultImage) {
                        ec.getBaseInformation().getDiskImage().setType("standard");
                        // TODO : get version
-                       ec.getBaseInformation().getDiskImage().setVersion("1.0");
+                       ec.getBaseInformation().getDiskImage().setVersion("TIZEN Larkspur");
                } else {
                        ec.getBaseInformation().getDiskImage().setType("custom");
                }
@@ -234,12 +223,6 @@ public class Creator {
                ec.getDevice().getRAM().getSize().setUnit("MiB");
                ec.getDevice().getRAM().getSize().setValue(newVM.ramSize);
 
-               ec.getDevice().setStorage(factory.createStorageType());
-               ec.getDevice().getStorage().setSDCard(factory.createStorageTypeSDCard());
-               if (newVM.isSDCardSupport) {
-                       ec.getDevice().getStorage().getSDCard().setDiskImage(newVM.SDCardPath);
-               }
-
                if (EmulatorManager.getInstance().getManagerMode().equals(ManagerModeType.INHOUSE_MODE)) {
                        ec.getDevice().setTouch(factory.createTouchType());
                        ec.getDevice().getTouch().setMaxTouchPoint(newVM.maxTouchCount);
index d3d97cb..79ac888 100644 (file)
@@ -75,10 +75,6 @@ public class EmulatorVMs {
 
        public void setVMsBaseDirectory(String baseVMsDir) {
                vmsBaseDirectoryName = baseVMsDir;
-
-               File fi = new File(vmsBaseDirectoryName);
-               if(!fi.exists())
-                       fi.mkdirs();
        }
 
        public String getVMsBaseDirectory() {
index e2833ec..7bc12e5 100644 (file)
@@ -39,13 +39,15 @@ import java.util.List;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
 import org.tizen.emulator.manager.EmulatorManager;
 import org.tizen.emulator.manager.EmulatorManager.ManagerModeType;
 import org.tizen.emulator.manager.logging.EMLogger;
+import org.tizen.emulator.manager.tool.CheckVirtualization;
 import org.tizen.emulator.manager.tool.FileIO;
 import org.tizen.emulator.manager.tool.PortHelper;
+import org.tizen.emulator.manager.ui.MessageDialog;
 import org.tizen.emulator.manager.vms.xml.TouchType;
 
 public class Launcher {
@@ -60,9 +62,9 @@ public class Launcher {
                /* check available port number */
                portNo = new PortHelper().getPortNo();
                if(portNo == -1) {
-                       MessageBox alert = new MessageBox(EmulatorManager.getInstance().getMainDialog().getShell(), SWT.OK);
-                       alert.setMessage("Can not execute emulator.\n All available ports are in use.");
-                       alert.open();
+                       MessageDialog alert = new MessageDialog(EmulatorManager.getInstance().getMainDialog().getShell());
+                       alert.openInfoDialog("Can not execute emulator.\n All available ports are in use.");
+
                        return false;
                }
 
@@ -71,170 +73,184 @@ public class Launcher {
                else
                        binary = "emulator-x86";
 
-               if (property.getConfiguration().getUsability().isHwVirtualization() && VMCreateHelper.isSupport) {
-                       hwVirtualization = VMCreateHelper.enable_command;
+               if (property.getConfiguration().getUsability().isHwVirtualization() && CheckVirtualization.getInstance().isSupportVirtualization()) {
+                       hwVirtualization = CheckVirtualization.getInstance().getEnableCommnad();
                } else {
-                       hwVirtualization = VMCreateHelper.disable_command;
+                       hwVirtualization = CheckVirtualization.getInstance().getDisableCommnad();
                }
 
                /* make cmd to run emulator */
-               try {
-                       List<String> cmd = new ArrayList<String>();
-                       int width = property.getConfiguration().getDevice().getDisplay().getResolution().getWidth();
-                       int height = property.getConfiguration().getDevice().getDisplay().getResolution().getHeight();
-                       String skinPath = null;
-                       if (property.getConfiguration().getDevice().getDisplay().getSkinPath() != null) {
-                               skinPath = property.getConfiguration().getDevice().getDisplay().getSkinPath().getPath();
-                               if (skinPath.isEmpty()) {
-                                       skinPath = null;
-                               }
-                       }
-                       String fileshare = property.getConfiguration().getUsability().getFileSharing().getPath();
-                       String sdcard = property.getConfiguration().getDevice().getStorage().getSDCard().getDiskImage();
-                       int isLinux = System.getProperty("os.name").toLowerCase().indexOf("linux");
-                       int isWindows = System.getProperty("os.name").toLowerCase().indexOf("linux");
-                       String osVersion = System.getProperty("os.version");
-                       boolean isFileshare = true;
-                       if (fileshare == null) {
-                               isFileshare = false;
-                       }
-                       boolean isSDcard = true;
-                       if (sdcard == null) {
-                               isSDcard = false;
-                       }
-                       FileIO fio = new FileIO();
-                       cmd.add(fio.getBinPath() + File.separator + binary);
-                       cmd.add("--skin-args");
-                       cmd.add("width=" + width);
-                       cmd.add("height=" + height);
-                       if (skinPath != null) {
-                               cmd.add("skin.path=" + skinPath);
+               MessageDialog msg = new MessageDialog(new Shell(Display.getCurrent()));
+               
+               List<String> cmd = new ArrayList<String>();
+               int width = property.getConfiguration().getDevice().getDisplay().getResolution().getWidth();
+               int height = property.getConfiguration().getDevice().getDisplay().getResolution().getHeight();
+               String skinPath = null;
+               if (property.getConfiguration().getDevice().getDisplay().getSkinPath() != null) {
+                       skinPath = property.getConfiguration().getDevice().getDisplay().getSkinPath().getPath();
+                       if (skinPath.isEmpty()) {
+                               skinPath = null;
                        }
-                       cmd.add("--qemu-args");
-                       cmd.add("-drive");
-                       cmd.add("file=" + EmulatorVMs.getInstance().getVMsBaseDirectory() + File.separator  +property.getArch().toString() + File.separator + property.getName() + File.separator +"emulimg-" + property.getName() + ".x86,if=virtio");
-                       cmd.add( "-boot");
-                       cmd.add("c");
-                       cmd.add("-append");
-                       /* is linux and use fileshare [kernel option] */
-                       if(isLinux > -1 && isFileshare) { 
-                               cmd.add("console=ttyS0 video=uvesafb:ywrap,"
+               }
+               String fileshare = property.getConfiguration().getUsability().getFileSharing().getPath();
+               int isLinux = System.getProperty("os.name").toLowerCase().indexOf("linux");
+               int isWindows = System.getProperty("os.name").toLowerCase().indexOf("windows");
+               String osVersion = System.getProperty("os.version");
+               boolean isFileshare = true;
+               if (fileshare == null) {
+                       isFileshare = false;
+               }
+               
+               FileIO fio = FileIO.getInstance();
+               cmd.add(fio.getBinPath() + File.separator + binary);
+               cmd.add("--skin-args");
+               cmd.add("width=" + width);
+               cmd.add("height=" + height);
+               if (skinPath != null) {
+                       cmd.add("skin.path=" + skinPath);
+               }
+               cmd.add("--qemu-args");
+               cmd.add("-drive");
+               cmd.add("file=" + EmulatorVMs.getInstance().getVMsBaseDirectory() + File.separator + property.getArch().toString() + File.separator + property.getName() + File.separator +"emulimg-" + property.getName() + ".x86,if=virtio");
+               cmd.add( "-boot");
+               cmd.add("c");
+               cmd.add("-append");
+               /* is linux and use fileshare [kernel option] */
+               if(isLinux > -1 && isFileshare) { 
+                       cmd.add("console=ttyS0 video=uvesafb:ywrap,"
+                               + width
+                               + "x" 
+                               + height 
+                               + "-32@60"
+                               + " dpi=" + property.getConfiguration().getDevice().getDisplay().getDensity().getValue() * 10 
+                               + " ip=10.0.2.16::10.0.2.2:255.255.255.0::eth0:none 5 virtio-9p");
+               }
+               else {
+                       cmd.add("console=ttyS0 video=uvesafb:ywrap,"
                                        + width
                                        + "x" 
                                        + height 
                                        + "-32@60"
                                        + " dpi=" + property.getConfiguration().getDevice().getDisplay().getDensity().getValue() * 10 
-                                       + " ip=10.0.2.16::10.0.2.2:255.255.255.0::eth0:none 5 virtio-9p");
-                       }
-                       else {
-                               cmd.add("console=ttyS0 video=uvesafb:ywrap,"
-                                               + width
-                                               + "x" 
-                                               + height 
-                                               + "-32@60"
-                                               + " dpi=" + property.getConfiguration().getDevice().getDisplay().getDensity().getValue() * 10 
-                                               + " ip=10.0.2.16::10.0.2.2:255.255.255.0::eth0:none 5");
-                       }
-                       /* is linux and use fileshare [non-kernel option] */
-                       if(isLinux > -1 && isFileshare) {
-                               cmd.add("-virtfs");
-                               cmd.add("local,path=" + property.getConfiguration().getUsability().getFileSharing().getPath() +",security_model=none,mount_tag=fileshare");
-                       }
+                                       + " ip=10.0.2.16::10.0.2.2:255.255.255.0::eth0:none 5");
+               }
+               /* is linux and use fileshare [non-kernel option] */
+               if(isLinux > -1 && isFileshare) {
+                       cmd.add("-virtfs");
+                       cmd.add("local,path=" + property.getConfiguration().getUsability().getFileSharing().getPath() +",security_model=none,mount_tag=fileshare");
+               }
 
-                       if(isSDcard) {
-                               cmd.add("-drive");
-                               cmd.add("file=" + sdcard + ",if=virtio");
-                       }
-                       /* is windows XP and use fileshare */
-                       if(isWindows > -1 && osVersion.equals("5.1") && isFileshare) { 
-                                       /* delete if fileshare with the same name existed */
-                                       List<String> cmd2 = new ArrayList<String>();
-                                       cmd2.add("net");
-                                       cmd2.add("share");
-                                       cmd2.add("emulator-" + portNo);
-                                       cmd2.add("/delete");
-                                       ProcessBuilder pb2 = new ProcessBuilder(cmd2);
-                                       pb2.start();
-                                       
-                                       /* start net share */
-                                       List<String> cmd3 = new ArrayList<String>();
-                                       cmd3.add("net");
-                                       cmd3.add("share");
-                                       cmd3.add("emulator-" + portNo + "=" + fileshare);
-                                       ProcessBuilder pb3 = new ProcessBuilder(cmd3);
-                                       pb3.start();
-                       }
-                       /* is windows 7 and use fileshare */
-                       else if(isWindows > -1 && osVersion.equals("6.1") && isFileshare) {
+               /* is windows XP and use fileshare */
+               if(isWindows > -1 && osVersion.equals("5.1") && isFileshare) { 
                                /* delete if fileshare with the same name existed */
                                List<String> cmd2 = new ArrayList<String>();
                                cmd2.add("net");
                                cmd2.add("share");
                                cmd2.add("emulator-" + portNo);
                                cmd2.add("/delete");
+                               logger.log(Level.INFO, String.format("%s\n", cmd2));
                                ProcessBuilder pb2 = new ProcessBuilder(cmd2);
-                               pb2.start();
+                               try {
+                                       pb2.start();
+                               } catch (IOException e) {
+                                       msg.openWarningDialog("Failed to execute fileshare command.\n" + e.getMessage());
+                               }
                                
                                /* start net share */
                                List<String> cmd3 = new ArrayList<String>();
                                cmd3.add("net");
                                cmd3.add("share");
                                cmd3.add("emulator-" + portNo + "=" + fileshare);
-                               cmd3.add("/grant:"+ System.getProperty("user.name") + ",full");
+                               logger.log(Level.INFO, String.format("%s\n", cmd3));
                                ProcessBuilder pb3 = new ProcessBuilder(cmd3);
-                               pb3.start();
+                               try {
+                                       pb3.start();
+                               } catch (IOException e) {
+                                       msg.openWarningDialog("Failed to execute fileshare command.\n" + e.getMessage());
+                               }
+               }
+               /* is windows 7 and use fileshare */
+               else if(isWindows > -1 && osVersion.equals("6.1") && isFileshare) {
+                       /* delete if fileshare with the same name existed */
+                       List<String> cmd2 = new ArrayList<String>();
+                       cmd2.add("net");
+                       cmd2.add("share");
+                       cmd2.add("emulator-" + portNo);
+                       cmd2.add("/delete");
+                       logger.log(Level.INFO, String.format("%s\n", cmd2));
+                       ProcessBuilder pb2 = new ProcessBuilder(cmd2);
+                       try {
+                               pb2.start();
+                       } catch (IOException e) {
+                               msg.openWarningDialog("Failed to execute fileshare command.\n" + e.getMessage());
                        }
-                       cmd.add("-serial");
-                       cmd.add("file:" + EmulatorVMs.getInstance().getVMsBaseDirectory() + File.separator + property.getArch().toString() + File.separator + property.getName() + File.separator + "logs" + File.separator + "emulator.klog");
-                       cmd.add("-m");
-                       cmd.add(String.valueOf(property.getConfiguration().getDevice().getRAM().getSize().getValue()));
-                       cmd.add("-M");
-                       cmd.add("maru-x86-machine");
-                       cmd.add("-net");
-                       cmd.add("nic,model=virtio");
-                       cmd.add("-soundhw");
-                       cmd.add("all");
-                       cmd.add("-usb");
-                       cmd.add("-usbdevice");
-                       cmd.add("maru-touchscreen");
-                       cmd.add("-vga");
-                       cmd.add("maru");
-                       cmd.add("-bios");
-                       cmd.add("bios.bin");
-                       cmd.add("-L");
-                       cmd.add(fio.getBiosPath());
-                       cmd.add("-kernel");
-                       cmd.add(fio.getKernelPath() + File.separator+ "bzImage");
-                       cmd.add("-net");
-                       cmd.add("user");
-                       cmd.add("-rtc");
-                       cmd.add("base=utc");
                        
-                       /* append HW virtualization option if supports */
-                       if (hwVirtualization != null) {
-                               cmd.add(hwVirtualization);
+                       /* start net share */
+                       List<String> cmd3 = new ArrayList<String>();
+                       cmd3.add("net");
+                       cmd3.add("share");
+                       cmd3.add("emulator-" + portNo + "=" + fileshare);
+                       cmd3.add("/grant:"+ System.getProperty("user.name") + ",full");
+                       logger.log(Level.INFO, String.format("%s\n", cmd3));
+                       ProcessBuilder pb3 = new ProcessBuilder(cmd3);
+                       try {
+                               pb3.start();
+                       } catch (IOException e) {
+                                msg.openWarningDialog("Failed to execute fileshare command.\n" + e.getMessage());
                        }
+               }
+               cmd.add("-serial");
+               cmd.add("file:" + EmulatorVMs.getInstance().getVMsBaseDirectory() + File.separator + property.getArch().toString() + File.separator + property.getName() + File.separator + "logs" + File.separator + "emulator.klog");
+               cmd.add("-m");
+               cmd.add(String.valueOf(property.getConfiguration().getDevice().getRAM().getSize().getValue()));
+               cmd.add("-M");
+               cmd.add("maru-x86-machine");
+               cmd.add("-net");
+               cmd.add("nic,model=virtio");
+               cmd.add("-soundhw");
+               cmd.add("all");
+               cmd.add("-usb");
+               cmd.add("-usbdevice");
+               cmd.add("maru-touchscreen");
+               cmd.add("-vga");
+               cmd.add("maru");
+               cmd.add("-bios");
+               cmd.add("bios.bin");
+               cmd.add("-L");
+               cmd.add(fio.getBiosPath());
+               cmd.add("-kernel");
+               cmd.add(fio.getKernelPath() + File.separator+ "bzImage");
+               cmd.add("-net");
+               cmd.add("user");
+               cmd.add("-rtc");
+               cmd.add("base=utc");
+               
+               /* append HW virtualization option if supports */
+               if (hwVirtualization != null) {
+                       cmd.add(hwVirtualization);
+               }
 
-                       if (EmulatorManager.getInstance().getManagerMode().equals(ManagerModeType.INHOUSE_MODE)) {
-                               TouchType touchType = property.getConfiguration().getDevice().getTouch();
-                               if (touchType != null) {
-                                       cmd.add("-max-touch-point");
-                                       cmd.add("" + touchType.getMaxTouchPoint());
-                               }
+               if (EmulatorManager.getInstance().getManagerMode().equals(ManagerModeType.INHOUSE_MODE)) {
+                       TouchType touchType = property.getConfiguration().getDevice().getTouch();
+                       if (touchType != null) {
+                               cmd.add("-max-touch-point");
+                               cmd.add("" + touchType.getMaxTouchPoint());
                        }
+               }
 
-                       /* append user added options if exists */
-                       String advancedOptions = property.getConfiguration().getUsability().getAdvancedOptions();
-                       if (advancedOptions != null) {
-                               String[] arrOptions = advancedOptions.split(" ");
-                               for (String option : arrOptions) {
-                                       cmd.add(option);
-                               }
+               /* append user added options if exists */
+               String advancedOptions = property.getConfiguration().getUsability().getAdvancedOptions();
+               if (advancedOptions != null) {
+                       String[] arrOptions = advancedOptions.split(" ");
+                       for (String option : arrOptions) {
+                               cmd.add(option);
                        }
-                       logger.log(Level.INFO, String.format("Starting Emulator Command : %s\n", cmd));
-                       ProcessBuilder pb = new ProcessBuilder(cmd);
-                       pb.directory(new File(fio.getBinPath()));
-
+               }
+               logger.log(Level.INFO, String.format("Starting Emulator Command : %s\n", cmd));
+               ProcessBuilder pb = new ProcessBuilder(cmd);
+               pb.directory(new File(fio.getBinPath()));
+               
+               try {
                        Process process = pb.start();
 
                        final InputStream in1 = new BufferedInputStream(process.getInputStream());
@@ -250,6 +266,7 @@ public class Launcher {
                                        }
                                }
                        }).start();
+
                        new Thread(new Runnable() {
                                @Override
                                public void run() {
@@ -262,9 +279,10 @@ public class Launcher {
                        }).start();
 
                } catch (IOException e) {
-                       e.printStackTrace();
+                       msg.openWarningDialog("Failed to launch [" + property.getName() + "]\n" + e.getMessage());
                        return false;
                }
+               
                return true;
        }
 }
index 04f929f..a9254e7 100644 (file)
@@ -80,18 +80,6 @@ public class Modifier {
                        property.getConfiguration().getDevice().getDisplay().getDensity().setValue(newVM.dpi);
                }
 
-               if (newVM.isSDCardSupport != oldVM.isSDCardSupport) {
-                       if (newVM.isSDCardSupport) {
-                               modifySDCard(newVM);
-                               property.getConfiguration().getDevice().getStorage().getSDCard().setDiskImage(newVM.SDCardPath);
-                       } else {
-                               property.getConfiguration().getDevice().getStorage().getSDCard().setDiskImage(null);
-                       }
-               } else if (newVM.isSDCardSupport && !newVM.SDCardPathName.equals(oldVM.SDCardPathName)) {
-                       modifySDCard(newVM);
-                       property.getConfiguration().getDevice().getStorage().getSDCard().setDiskImage(newVM.SDCardPath);
-               }
-
                if (newVM.ramSize != oldVM.ramSize) {
                        property.getConfiguration().getDevice().getRAM().getSize().setValue(newVM.ramSize);
                }
@@ -124,64 +112,4 @@ public class Modifier {
 
                EmulatorVMs.getInstance().storeXML(property);
        }
-       
-       static void modifySDCard(VMPropertyValue newVM) throws VMsWorkerException {
-               if (newVM.SDCardPath.endsWith("MB)")) { // New
-                       String sdCardName = newVM.SDCardPath.substring(0, newVM.SDCardPath.lastIndexOf(" "));
-                       String dataPath = FileIO.getInstance().getDataPath() + File.separator + sdCardName;
-
-                       File src  = new File(dataPath);
-                       if(!src.exists()) {
-                               throw new VMsWorkerException("Failed to create SD card image.!\nFile does not exist :" + dataPath);
-                       }
-
-                       File dest = new File(FileIO.getInstance().getVirtualTargetPath(newVM.imageName) + File.separator + sdCardName);
-                       try {
-                               dest.createNewFile();
-                               newVM.SDCardPath = dest.getAbsolutePath();
-                       } catch (IOException e) {
-                               throw new VMsWorkerException("Failed to create new image path!");
-                       }
-
-                       
-                       FileInputStream inputStream = null;
-                       FileOutputStream outputStream = null;
-                       FileChannel fcin = null;
-                       FileChannel fcout = null;
-                       try {
-                               inputStream = new FileInputStream(src);         
-                               outputStream = new FileOutputStream(dest);
-
-                               fcin =  inputStream.getChannel();
-                               fcout = outputStream.getChannel();
-                               long size = fcin.size();
-                               fcin.transferTo(0, size, fcout);
-                       } catch (FileNotFoundException e) {
-                               throw new VMsWorkerException("Failed to create SD card image!\n" + e.getMessage());
-                       } catch (IOException e) {
-                               throw new VMsWorkerException("Failed to create SD card image!\n" + e.getMessage());
-                       }finally {
-                               try {
-                                       if (fcout != null)
-                                               fcout.close();
-                                       if (fcin != null)
-                                               fcin.close();
-                                       if (outputStream != null)
-                                               outputStream.close();
-                                       if (inputStream != null)
-                                               inputStream.close();
-                               } catch (IOException e) {
-                                       throw new VMsWorkerException(e.getMessage());
-                               }
-                       }
-               } else {
-                       if (newVM.SDCardPath == null || newVM.SDCardPath.isEmpty()) {
-                               throw new VMsWorkerException("Select the SD card image!");
-                       }
-
-                       if (newVM.SDCardPath.equals("( None )")) {
-                               throw new VMsWorkerException("Select the SD card image !");
-                       }
-               }
-       }
 }
index 537b9df..c95a525 100644 (file)
 
 package org.tizen.emulator.manager.vms;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.widgets.Combo;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Listener;
-import org.tizen.emulator.manager.tool.FileIO;
 import org.tizen.emulator.manager.vms.VMsProperty.Architecture;
 
 public class VMCreateHelper {
@@ -109,51 +104,4 @@ public class VMCreateHelper {
 
                combo.select(defaultIndex);
        }
-
-       public ArrayList<String> makeSkinfolderList() {
-               ArrayList<String> list = new ArrayList<String>();
-               File skins = new File(FileIO.getInstance().getSkinPath());
-
-               if (skins.exists()) {
-                       //System.out.println(skins.getAbsolutePath());
-                       for (File dir : skins.listFiles()) {
-                               if (dir.isDirectory()) {
-                                       //System.out.println(dir.getName());
-                                       list.add(dir.getName());
-                               }
-                       } 
-               }
-               return list;
-       }
-
-       // TODO : update please !!
-       public static boolean isSupport = false;
-       public static String enable_command = "";
-       public static String disable_command = null;
-       static {
-               if (System.getProperty("os.name").toLowerCase().indexOf("windows") > -1) {
-                               File haxDev = new File("\\\\.\\HAX");
-                               try {
-                                       if(haxDev.createNewFile())
-                                               isSupport = true;
-                               } catch (IOException e) {
-                                       isSupport = false;
-                               }
-                       }
-                       enable_command = "-enable-hax";
-                       disable_command = "-disable-hax";
-
-               if (System.getProperty("os.name").toLowerCase().indexOf("linux") > -1) {
-                       if(new File("/dev/kvm").exists()) {
-                               isSupport = true;
-                       }
-                       enable_command = "-enable-kvm";
-               }
-       }
-
-       
-       
-       public boolean isSupportVirtualization() {
-               return isSupport;
-       }
 }
index 0052165..73beef8 100644 (file)
@@ -54,10 +54,6 @@ public class VMPropertyValue implements Cloneable {
        public int keyType;
        public String skinPath;
 
-       public boolean isSDCardSupport;
-       public String SDCardPath;
-       public String SDCardPathName;
-
        public int ramSize;
 
        public boolean isFileShareSupport; 
@@ -101,16 +97,6 @@ public class VMPropertyValue implements Cloneable {
                }
                //
 
-               SDCardPath = property.getConfiguration().getDevice().getStorage().getSDCard().getDiskImage();
-               if (SDCardPath != null) {
-                       isSDCardSupport = true;
-                       SDCardPathName = SDCardPath.substring
-                                                                               (SDCardPath.lastIndexOf(File.separator) + 1, SDCardPath.length());
-               } else {
-                       SDCardPath = "";
-                       SDCardPathName = "( None )";
-               }
-
                fileSharePath = property.getConfiguration().getUsability().getFileSharing().getPath();
                if (fileSharePath  != null) {
                        isFileShareSupport = true;
@@ -148,10 +134,6 @@ public class VMPropertyValue implements Cloneable {
                dest.skinPath = this.skinPath;
                dest.keyType = this.keyType;
 
-               dest.isSDCardSupport = this.isSDCardSupport;
-               dest.SDCardPath = this.SDCardPath;
-               dest.SDCardPathName = this.SDCardPathName;
-
                dest.ramSize = this.ramSize;
 
                dest.isFileShareSupport = this.isFileShareSupport; 
@@ -179,12 +161,6 @@ public class VMPropertyValue implements Cloneable {
                        return false;
                if(this.keyType != dest.keyType)
                        return false;
-               if(this.isSDCardSupport != dest.isSDCardSupport) {
-                       return false;
-               } else {
-                       if (!this.SDCardPath.equals(dest.SDCardPath))
-                               return false;
-               }
                if(this.ramSize != dest.ramSize)
                        return false;
                if(this.isFileShareSupport != dest.isFileShareSupport) {
@@ -224,10 +200,6 @@ public class VMPropertyValue implements Cloneable {
                value.keyType = 1;
                //
 
-               value.isSDCardSupport   = false;
-               value.SDCardPath                        = "";
-               value.SDCardPathName      = "( None )";
-
                value.ramSize                   = 512;
 
                value.isFileShareSupport        = false; 
index e30a47f..c8152b3 100644 (file)
@@ -37,15 +37,19 @@ import java.io.InputStreamReader;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.logging.Level;
+import java.util.logging.Logger;
 
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
 import org.tizen.emulator.manager.logging.EMLogger;
 import org.tizen.emulator.manager.tool.FileIO;
+import org.tizen.emulator.manager.ui.MessageDialog;
 
 
 
 public class VMsWorker {
        VMsProperty property;
-
+       
        public VMsWorker(VMsProperty property) {
                this.property = property;
        }
@@ -141,9 +145,10 @@ public class VMsWorker {
        // check if the emulator instance with the same name is running now.
        public boolean isRunningNow()
        {
+               Logger logger = EMLogger.getLogger();
+               MessageDialog msg = new MessageDialog(new Shell(Display.getCurrent()));
                int isLinux = System.getProperty("os.name").toLowerCase().indexOf("linux");
                int isWindows = System.getProperty("os.name").toLowerCase().indexOf("windows");
-
                try { 
                        String line;
                        List<String> cmd = new ArrayList<String>();
@@ -156,16 +161,18 @@ public class VMsWorker {
                                cmd.add("/V");
                                cmd.add("/FI");
                                cmd.add("\"IMAGENAME eq java.exe\"");
+                               cmd.add("/FO");
+                               cmd.add("CSV");
                        }
 
                        ProcessBuilder pb = new ProcessBuilder(cmd);
                        Process p = pb.start();
                        BufferedReader stdOut = new BufferedReader(new InputStreamReader(p.getInputStream()));
-
                        if(isLinux > -1) {
                                while ((line = stdOut.readLine()) != null) {
-                                       if(line.contains(FileIO.getInstance().getVirtualTargetImagePath(property.getName()))) {
-                                               //System.out.println("exist in"+ line);
+                                       String imagePath = FileIO.getInstance().getVirtualTargetImagePath(property.getName());
+                                       if(line.contains(imagePath)) {
+                                               logger.log(Level.INFO, line + " contains " + imagePath + "\n");
                                                stdOut.close();
                                                return true; 
                                        }
@@ -173,19 +180,23 @@ public class VMsWorker {
                        }
                        else if(isWindows > -1) {
                                while ((line = stdOut.readLine()) != null) {
-                                       if(line.contains(property.getName()+ ":261")) {
-                                               //System.out.println("exist in"+ line);
+                                       String[] titleName = line.split(",");
+                                       // "split[split.length - 1]" is window title.
+                                       if(titleName[titleName.length - 1].startsWith("\"" + property.getName()+ ":261")) {
+                                               logger.log(Level.INFO, "contains " +titleName[titleName.length - 1] + "\n");
                                                stdOut.close();
                                                return true; 
                                        }
                                }
                        }               
                        stdOut.close();
-                       //System.out.println("not exist anywhere");
+                       logger.log(Level.INFO, "not exist anywhere\n");
                        return false;                                                    
-               } catch (Exception err) { 
-                       err.printStackTrace();
-                       return true;
+               } catch (Exception err) {
+                       logger.log(Level.SEVERE, err.getMessage());
+                       msg.openWarningDialog("Error occured while checking if the same VM .\n" +
+                                                                                                                                               err.getMessage());
+                       return false;
                }  
        }
 }
\ No newline at end of file
index 33756c7..be3ba82 100644 (file)
@@ -24,9 +24,6 @@
       <density unit="dpi">0</density>
       <skinPath/>
     </display>
-    <storage>
-      <SDCard/>
-    </storage>
     <RAM>
       <size unit="MiB">0</size>
     </RAM>
index 08ebd0c..ab10e86 100644 (file)
                <sequence>
                        <element name="display" type="em:displayType" minOccurs="1"
                                maxOccurs="1" />
-                       <element name="storage" type="em:storageType" minOccurs="1"
+                       <element name="storage" type="string" minOccurs="1"
                                maxOccurs="1" />
                        <element name="RAM" type="em:ramType" minOccurs="1"
                                maxOccurs="1" />
                </sequence>
        </complexType>
 
-       <complexType name="storageType">
-               <sequence>
-                       <element name="SDCard" minOccurs="1" maxOccurs="1">
-                               <complexType>
-                                       <sequence>
-                                               <element name="diskImage" type="string" minOccurs="0"
-                                                       maxOccurs="1" />
-                                       </sequence>
-                               </complexType>
-                       </element>
-               </sequence>
-       </complexType>
 
        <complexType name="ramType">
                <sequence>