From 35cfb6bc1f12d4e4335c28e0922db3a9f672d7b7 Mon Sep 17 00:00:00 2001 From: "gyeongmin.ju" Date: Thu, 30 Mar 2017 14:26:19 +0900 Subject: [PATCH] RTSDK: improve new app wizard ux & fixed wrong app macro improve new app wizard ux & fixed wrong app macro Change-Id: If5c51e092a460deafddc39964ced4cd61b8fc141 Signed-off-by: gyeongmin.ju --- .../src/org/tizen/rt/ide/wizards/NewRtAppWizard.java | 4 ++-- .../org/tizen/rt/ide/wizards/NewRtAppWizardPage.java | 19 +++++++------------ 2 files changed, 9 insertions(+), 14 deletions(-) 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 dfabe9a..483aa63 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 @@ -78,14 +78,14 @@ public class NewRtAppWizard extends Wizard implements INewWizard { */ @Override public boolean performFinish() { - final String containerName = page.getContainerName(); + final String appName = page.getAppName(); final String localtion = page.getFileName(); final IProject project = page.getProject(); final String tempFileName = page.getTemplateFileName(); IRunnableWithProgress op = new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException { try { - doFinish(containerName, localtion, tempFileName, project, monitor); + doFinish(appName, localtion, tempFileName, project, monitor); } catch (CoreException e) { throw new InvocationTargetException(e); } finally { diff --git a/rt-ide/tizen.rt.product.plugin/src/org/tizen/rt/ide/wizards/NewRtAppWizardPage.java b/rt-ide/tizen.rt.product.plugin/src/org/tizen/rt/ide/wizards/NewRtAppWizardPage.java index ab77c9e..af75dd3 100644 --- a/rt-ide/tizen.rt.product.plugin/src/org/tizen/rt/ide/wizards/NewRtAppWizardPage.java +++ b/rt-ide/tizen.rt.product.plugin/src/org/tizen/rt/ide/wizards/NewRtAppWizardPage.java @@ -91,6 +91,7 @@ public class NewRtAppWizardPage extends WizardPage { lblProject.setText("Project:"); containerText = new Text(container, SWT.BORDER | SWT.SINGLE); + containerText.setEnabled(false); containerText.setEditable(false); containerText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); @@ -171,16 +172,10 @@ public class NewRtAppWizardPage extends WizardPage { */ private void dialogChanged() { IResource container = ResourcesPlugin.getWorkspace().getRoot() - .findMember(new Path(getContainerName())); + .findMember(getProject().getFullPath()); String fileName = getFileName(); - if (getContainerName().length() == 0) { - updateStatus("File container must be specified"); - return; - } - - if (container == null - || (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) { + if (container == null || (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) { updateStatus("File container must exist"); return; } @@ -193,8 +188,8 @@ public class NewRtAppWizardPage extends WizardPage { return; } - IFolder folder = container.getProject().getFolder(fileName); - IFile file = container.getProject().getFile(fileName); + IFolder folder = project.getFolder(fileName); + IFile file = project.getFile(fileName); if ((folder != null && folder.exists()) || (file != null && file.exists())) { updateStatus("Application path (or file) is already exits"); return; @@ -212,8 +207,8 @@ public class NewRtAppWizardPage extends WizardPage { return project; } - public String getContainerName() { - return containerText.getText(); + public String getAppName() { + return appNameText.getText(); } public String getFileName() { -- 2.7.4