From 5dfdcd6f860115bcf62efcaa00db2750673b1c11 Mon Sep 17 00:00:00 2001 From: jihye kim Date: Thu, 11 Jul 2013 14:46:56 +0900 Subject: [PATCH] [Title] emulator managaer: fix bug [Desc.] fix bug that to print wrong time and add print system information [Issue] N_SE-45770 Change-Id: Id9c2cbaed8b40e47c103d04e7bd942b0f8f77112 Signed-off-by: jihye kim --- package/changelog | 5 ++++ package/pkginfo.manifest | 2 +- .../tizen/emulator/manager/logging/EMLogger.java | 2 +- .../manager/resources/PatchImageResources.java | 33 +++++++++++++++------- src/org/tizen/emulator/manager/tool/About.java | 19 ++++++++++++- 5 files changed, 48 insertions(+), 13 deletions(-) diff --git a/package/changelog b/package/changelog index 3bf2cda..11aff3f 100644 --- a/package/changelog +++ b/package/changelog @@ -1,3 +1,8 @@ +* 2.2.12 +- fix log file bug -> print wrong time +- add print system information log +== jihye kim 2013-07-11 + * 2.2.11 - fix console mode bug -> does not exit because emulator manager is background process - fix VM button bug -> 'modify view' is changed to 'detail view' when mouse exit event diff --git a/package/pkginfo.manifest b/package/pkginfo.manifest index fb6dd90..26c848b 100644 --- a/package/pkginfo.manifest +++ b/package/pkginfo.manifest @@ -1,5 +1,5 @@ Source: emulator-manager -Version: 2.2.11 +Version: 2.2.12 Maintainer: Yeong-Kyoon Lee Package: emulator-manager diff --git a/src/org/tizen/emulator/manager/logging/EMLogger.java b/src/org/tizen/emulator/manager/logging/EMLogger.java index 117680f..618853a 100644 --- a/src/org/tizen/emulator/manager/logging/EMLogger.java +++ b/src/org/tizen/emulator/manager/logging/EMLogger.java @@ -172,7 +172,7 @@ class LoggerFormatter extends Formatter { sb.append('['); sb.append(cal.get(Calendar.YEAR)); sb.append('.'); - sb.append(cal.get(Calendar.MONTH)); + sb.append(cal.get(Calendar.MONTH) + 1); sb.append('.'); sb.append(cal.get(Calendar.DAY_OF_MONTH)); sb.append(' '); diff --git a/src/org/tizen/emulator/manager/resources/PatchImageResources.java b/src/org/tizen/emulator/manager/resources/PatchImageResources.java index 192d095..96b3100 100644 --- a/src/org/tizen/emulator/manager/resources/PatchImageResources.java +++ b/src/org/tizen/emulator/manager/resources/PatchImageResources.java @@ -29,6 +29,7 @@ package org.tizen.emulator.manager.resources; +import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.GC; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Display; @@ -43,6 +44,7 @@ public class PatchImageResources { Image image = new Image(Display.getCurrent(), width, height); GC gc = new GC(image); + gc.setInterpolation(SWT.NONE); gc.fillRectangle(0, 0, width, height); gc.drawImage(left, 0, 0); @@ -61,8 +63,9 @@ public class PatchImageResources { int height = left.getImageData().height; Image image = new Image(Display.getCurrent(), width, height); - + GC gc = new GC(image); + gc.setInterpolation(SWT.NONE); gc.fillRectangle(0, 0, width, height); gc.drawImage(left, 0, 0); @@ -83,6 +86,7 @@ public class PatchImageResources { Image image = new Image(Display.getCurrent(), width, height); GC gc = new GC(image); + gc.setInterpolation(SWT.NONE); gc.fillRectangle(0, 0, width, height); gc.drawImage(left, 0, 0); @@ -101,6 +105,7 @@ public class PatchImageResources { int height = middle.getImageData().height; Image image = new Image(Display.getCurrent(), width, height); GC gc = new GC(image); + gc.setInterpolation(SWT.NONE); gc.fillRectangle(0, 0, width, height); // left @@ -111,11 +116,11 @@ public class PatchImageResources { middle.getImageData().width, middle.getImageData().height, left.getImageData().width, 0, width - left.getImageData().width * 2, height); - + // right gc.drawImage(ImageResources.CATEGORYBOX_RIGHT.getImage(), width - left.getImageData().width, 0); - + gc.dispose(); return image; } @@ -128,6 +133,7 @@ public class PatchImageResources { Image image = new Image(Display.getCurrent(), width, height); GC gc = new GC(image); + gc.setInterpolation(SWT.NONE); gc.fillRectangle(0, 0, width, height); // left @@ -138,7 +144,7 @@ public class PatchImageResources { middle.getImageData().width, middle.getImageData().height, left.getImageData().width, 0, width - left.getImageData().width * 2, height); - + // right gc.drawImage(ImageResources.INPUTBOX_ON_RIGHT.getImage(), width - left.getImageData().width, 0); @@ -155,6 +161,7 @@ public class PatchImageResources { Image image = new Image(Display.getCurrent(), width, height); GC gc = new GC(image); + gc.setInterpolation(SWT.NONE); gc.fillRectangle(0, 0, width, height); // left @@ -178,12 +185,13 @@ public class PatchImageResources { Image image = new Image(Display.getCurrent(), width, height); GC gc = new GC(image); + gc.setInterpolation(SWT.NONE); gc.fillRectangle(0, 0, width, height); // left Image left = ImageResources.TAB_SELECTED_LEFT.getImage(); gc.drawImage(left, 0, 0); - + // middle Image middle = ImageResources.TAB_SELECTED_MIDDLE.getImage(); gc.drawImage(middle, 0, 0, @@ -211,8 +219,9 @@ public class PatchImageResources { Image image = new Image(Display.getCurrent(), width + leftWidth + rightWidth, height); - + GC gc = new GC(image); + gc.setInterpolation(SWT.NONE); gc.fillRectangle(0, 0, image.getImageData().width, image.getImageData().height); gc.drawImage(left, 0, 0); @@ -221,7 +230,7 @@ public class PatchImageResources { middle.getImageData().width, middle.getImageData().height, leftWidth, 0, width - (leftWidth + rightWidth), height); - + // right gc.drawImage(right, width - leftWidth , 0); @@ -239,8 +248,9 @@ public class PatchImageResources { int rightWidth = right.getImageData().width; Image image = new Image(Display.getCurrent(), width, height); - + GC gc = new GC(image); + gc.setInterpolation(SWT.NONE); gc.fillRectangle(0, 0, image.getImageData().width, image.getImageData().height); gc.drawImage(left, 0, 0); @@ -264,8 +274,9 @@ public class PatchImageResources { Image image = new Image(Display.getCurrent(), middle.getImageData().width, middle.getImageData().height * count); - + GC gc = new GC(image); + gc.setInterpolation(SWT.NONE); gc.fillRectangle(0, 0, image.getImageData().width, image.getImageData().height); for (int i = 0; i < (count); i++) { @@ -285,8 +296,9 @@ public class PatchImageResources { middle.getImageData().width, middle.getImageData().height * (count-1) + bottom.getImageData().height); - + GC gc = new GC(image); + gc.setInterpolation(SWT.NONE); gc.fillRectangle(0, 0, image.getImageData().width, image.getImageData().height); for (int i = 0; i < (count-1); i++) { @@ -304,6 +316,7 @@ public class PatchImageResources { public static Image getScrollbarBackground(int width, int height) { Image image = new Image(Display.getCurrent(), width, height); GC gc = new GC(image); + gc.setInterpolation(SWT.NONE); gc.fillRectangle(0, 0, width, height); Image temp = ImageResources.SCROLLBAR_BACK.getImage(); gc.drawImage(temp, 0, 0, temp.getImageData().width, temp.getImageData().height, diff --git a/src/org/tizen/emulator/manager/tool/About.java b/src/org/tizen/emulator/manager/tool/About.java index 2920300..2a25e8b 100644 --- a/src/org/tizen/emulator/manager/tool/About.java +++ b/src/org/tizen/emulator/manager/tool/About.java @@ -38,6 +38,7 @@ import java.io.InputStream; import java.util.Properties; import java.util.logging.Level; +import org.eclipse.swt.SWT; import org.tizen.emulator.manager.logging.EMLogger; import org.tizen.emulator.manager.resources.FilePathResources; import org.tizen.emulator.manager.resources.StringResources; @@ -145,7 +146,23 @@ public class About { contents = String.format("%-12s : %s\n%-12s : %s\n%-12s : %s\n%-12s : %s", "Version", about_version, "Build time" ,(time + " (GMT)"), "Git version", gitVersion, "Workspace path", workspace); - EMLogger.getLogger().info(contents); + printSystemInformation(); + } + + private void printSystemInformation() { + String systemInfo = ""; + systemInfo += "JAVA HOME: " + System.getProperty("java.home") + StringResources.NEW_LINE; + systemInfo += "JAVA VENDOR: " + System.getProperty("java.vendor") + StringResources.NEW_LINE; + systemInfo += "JAVA VERSION: " + System.getProperty("java.version") + StringResources.NEW_LINE; + systemInfo += "OS ARCH: " + System.getProperty("os.arch") + StringResources.NEW_LINE; + systemInfo += "OS NAME: " + System.getProperty("os.name") + StringResources.NEW_LINE; + systemInfo += "OS VERSION: " + System.getProperty("os.version") + StringResources.NEW_LINE; + systemInfo += "SWT PLATFROM: " + SWT.getPlatform() + StringResources.NEW_LINE; + systemInfo += "SWT VERSION: " + SWT.getVersion(); + EMLogger.getLogger().info("System Information" + + StringResources.NEW_LINE + systemInfo); + EMLogger.getLogger().info("EmulatorManager Information" + + StringResources.NEW_LINE + contents); } public String getContents() { -- 2.7.4