From: daeryong.park Date: Mon, 3 Apr 2017 01:59:31 +0000 (+0900) Subject: RTSDK : Select and reveal created app folder with new app wizard X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=91901d1155c6f19f34b391684ff6d0d990723b12;p=sdk%2Fide%2Frt-ide-product.git RTSDK : Select and reveal created app folder with new app wizard - Select and reveal created app folder with new app wizard Change-Id: I5aba0fbfce3f23595308c6ba27146a10f7f42068 Signed-off-by: daeryong.park --- diff --git a/rt-ide/tizen.rt.product.plugin/src/org/tizen/rt/ide/wizards/NewRtAppWizard.java b/rt-ide/tizen.rt.product.plugin/src/org/tizen/rt/ide/wizards/NewRtAppWizard.java index 481676b..378105c 100644 --- a/rt-ide/tizen.rt.product.plugin/src/org/tizen/rt/ide/wizards/NewRtAppWizard.java +++ b/rt-ide/tizen.rt.product.plugin/src/org/tizen/rt/ide/wizards/NewRtAppWizard.java @@ -24,27 +24,26 @@ */ package org.tizen.rt.ide.wizards; -import org.eclipse.jface.viewers.IStructuredSelection; -import org.eclipse.jface.wizard.Wizard; -import org.eclipse.ui.INewWizard; -import org.eclipse.ui.IWorkbench; -import org.eclipse.core.runtime.*; -import org.eclipse.jface.operation.*; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; import java.lang.reflect.InvocationTargetException; -import java.net.URI; import java.nio.file.Files; import java.nio.file.Paths; import java.nio.file.StandardCopyOption; import java.util.HashMap; import java.util.Map; +import org.eclipse.core.resources.IFolder; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.jface.viewers.ISelection; -import org.eclipse.core.resources.*; - -import java.io.*; -import org.eclipse.ui.*; -import org.eclipse.ui.ide.IDE; +import org.eclipse.jface.operation.IRunnableWithProgress; +import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.tizen.rt.ide.Messages; @@ -52,11 +51,10 @@ import org.tizen.rt.ide.util.MacroUtil; import org.tizen.rt.ide.util.ZipUtil; import org.tizen.rt.ide.util.ZipUtil.AbstractRunner; -public class NewRtAppWizard extends Wizard implements INewWizard { +public class NewRtAppWizard extends BasicNewResourceWizard { private final Logger logger = LoggerFactory.getLogger(NewRtAppWizard.class); private NewRtAppWizardPage page; - private ISelection selection; /** * Constructor for NewRtAppWizard. @@ -97,6 +95,12 @@ public class NewRtAppWizard extends Wizard implements INewWizard { }; try { getContainer().run(true, false, op); + + // select and reveal created app folder + IFolder folder = project.getFolder(localtion); + if (folder != null && folder.exists()) { + selectAndReveal(folder); + } } catch (InterruptedException e) { return false; } catch (InvocationTargetException e) { @@ -215,12 +219,4 @@ public class NewRtAppWizard extends Wizard implements INewWizard { monitor.worked(1); } - - /** - * We will accept the selection in the workbench to see if we can initialize from it. - * @see IWorkbenchWizard#init(IWorkbench, IStructuredSelection) - */ - public void init(IWorkbench workbench, IStructuredSelection selection) { - this.selection = selection; - } }