From: hyunsik.noh Date: Mon, 10 Dec 2012 01:15:20 +0000 (+0900) Subject: [Title] Add message dialog when fail to get platformlog X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=97b4c296c1fb3e72fb2e469b61e0ad3920fbf7e5;p=sdk%2Fide%2Fcommon-eplugin.git [Title] Add message dialog when fail to get platformlog [Type] [Module] [Priority] [CQ#] [Redmine#] 7548 [Problem] [Cause] [Solution] Change-Id: I512d9b4b8c56e368c069d8a4be29a744fba783eb --- diff --git a/org.tizen.common.connection/src/org/tizen/common/connection/ui/ConnectionExplorer.java b/org.tizen.common.connection/src/org/tizen/common/connection/ui/ConnectionExplorer.java index dfa98dc..d892cf1 100755 --- a/org.tizen.common.connection/src/org/tizen/common/connection/ui/ConnectionExplorer.java +++ b/org.tizen.common.connection/src/org/tizen/common/connection/ui/ConnectionExplorer.java @@ -35,6 +35,7 @@ import org.eclipse.jface.action.IMenuListener; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.MenuManager; import org.eclipse.jface.action.Separator; +import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.swt.SWT; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; @@ -450,12 +451,18 @@ public class ConnectionExplorer extends ViewPart @Override public void processNewLines(String[] lines) { - result.set(Integer.parseInt(lines[0])); + if(lines[0].equals(PLATFORMLOG_ON) || lines[0].equals(PLATFORMLOG_OFF)) + { + result.set(Integer.parseInt(lines[0])); + } + else + { + MessageDialog.openError(parent.getShell(), ConnectionUIMessages.Explorer_Message_PlatformLogError, lines[0] ); //$NON-NLS-1$ + } } }); } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); + Logger.error("Fail to get platform log", e.getMessage()); } } } @@ -467,7 +474,7 @@ public class ConnectionExplorer extends ViewPart toolBar = new ToolBar(shell, SWT.NULL); toolBar.setLayoutData(layoutData); - new ToolItem(toolBar, SWT.SEPARATOR); // Separator + new ToolItem(toolBar, SWT.SEPARATOR);// Separator emulManagerToolItem = new ToolItem(toolBar, SWT.PUSH); emulManagerToolItem.setImage(ConnectionPlugin.getImageDescriptorFromPlugin("icons/emulator_manager.gif").createImage()); @@ -488,7 +495,7 @@ public class ConnectionExplorer extends ViewPart }); emulManagerToolItem.setEnabled(true); - new ToolItem(toolBar, SWT.SEPARATOR); // Separator + new ToolItem(toolBar, SWT.SEPARATOR);// Separator pushToolItem = new ToolItem(toolBar, SWT.PUSH); pushToolItem.setImage(ConnectionPlugin.getImageDescriptorFromPlugin("icons/push.gif").createImage()); @@ -503,7 +510,7 @@ public class ConnectionExplorer extends ViewPart }); pushToolItem.setEnabled(false); - new ToolItem(toolBar, SWT.SEPARATOR); // Separator + new ToolItem(toolBar, SWT.SEPARATOR);// Separator pullToolItem = new ToolItem(toolBar, SWT.PUSH); pullToolItem.setImage(ConnectionPlugin.getImageDescriptorFromPlugin("icons/pull.gif").createImage()); diff --git a/org.tizen.common.connection/src/org/tizen/common/connection/ui/ConnectionUIMessages.java b/org.tizen.common.connection/src/org/tizen/common/connection/ui/ConnectionUIMessages.java index 60694a1..e2d1db2 100644 --- a/org.tizen.common.connection/src/org/tizen/common/connection/ui/ConnectionUIMessages.java +++ b/org.tizen.common.connection/src/org/tizen/common/connection/ui/ConnectionUIMessages.java @@ -51,6 +51,7 @@ public class ConnectionUIMessages extends NLS public static String Explorer_Tooltip_Pull; public static String Explorer_Message_EmulatorError; + public static String Explorer_Message_PlatformLogError; static { diff --git a/org.tizen.common.connection/src/org/tizen/common/connection/ui/ConnectionUIMessages.properties b/org.tizen.common.connection/src/org/tizen/common/connection/ui/ConnectionUIMessages.properties index 758de8f..b094ca2 100644 --- a/org.tizen.common.connection/src/org/tizen/common/connection/ui/ConnectionUIMessages.properties +++ b/org.tizen.common.connection/src/org/tizen/common/connection/ui/ConnectionUIMessages.properties @@ -17,4 +17,5 @@ Explorer_Tooltip_Pull = Pull the content from the connected target device Explorer_Message_Invalid_Character = File contains invalid characters like -Explorer_Message_EmulatorError = Emulator is not installed or the install path is invalid. +Explorer_Message_EmulatorErrr = Emulator is not installed or the install path is invalid. +Explorer_Message_PlatformLogError = Fail to get platformlog