Replace WindowActivator with IDE 61/34561/1
authorjungwook.ryu <jungwook.ryu@samsung.com>
Thu, 29 Jan 2015 05:23:03 +0000 (14:23 +0900)
committerjungwook.ryu <jungwook.ryu@samsung.com>
Thu, 29 Jan 2015 05:23:03 +0000 (14:23 +0900)
Change-Id: Ica149762306ac8def22c928394b72b3d0b792fe7
Signed-off-by: jungwook.ryu <jungwook.ryu@samsung.com>
org.tizen.dynamicanalysis.ide.native.eplugin/src/org/tizen/dynamicanalysis/ide/eplugin/communication/OpenEditManager.java

index 040ea5d..0aef59f 100644 (file)
@@ -38,14 +38,16 @@ import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.jface.text.BadLocationException;
 import org.eclipse.jface.text.IDocument;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.ide.IDE;
 import org.eclipse.ui.texteditor.IDocumentProvider;
 import org.eclipse.ui.texteditor.ITextEditor;
-
 import org.tizen.dynamicanalysis.ide.eplugin.DALog;
 
 public class OpenEditManager implements Runnable
@@ -139,8 +141,21 @@ public class OpenEditManager implements Runnable
                        }
                        getEditor().setHighlightRange(offset, 0, true); //move cursor
                        
-                       FocusManager fm = new FocusManager();
-                       fm.start();
+//                     FocusManager fm = new FocusManager();
+//                     fm.start();
+                       Display.getCurrent().syncExec(new Runnable() {
+                               @Override
+                               public void run() {
+                                       Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
+                                       if (null == shell.getDisplay().getActiveShell()) {
+                                               shell.open();
+                                               shell.setFullScreen(true);
+                                               shell.setFullScreen(false);
+                                               shell.setFocus();
+                                               shell.forceActive();
+                                       }
+                               }
+                       });
                }
                catch (IOException e)
                {