From 86d60f0df2e36e5ec37a205e05352c828f494a4d Mon Sep 17 00:00:00 2001 From: "daeryong.park" Date: Tue, 28 Mar 2017 12:16:13 +0900 Subject: [PATCH] RTSDK : Refresh project code moved to more proper location - Refresh project code moved to more proper location Change-Id: I062386441ae5036e456dae2f71032b5784357992 Signed-off-by: daeryong.park --- .../egit/ui/internal/clone/RtGitImportWizard.java | 1 + .../rt/ide/wizards/NewArtikProjectWizard.java | 83 ++-------------------- 2 files changed, 7 insertions(+), 77 deletions(-) diff --git a/rt-ide/tizen.rt.product.plugin/src/org/eclipse/egit/ui/internal/clone/RtGitImportWizard.java b/rt-ide/tizen.rt.product.plugin/src/org/eclipse/egit/ui/internal/clone/RtGitImportWizard.java index 98ca991..a0c5191 100644 --- a/rt-ide/tizen.rt.product.plugin/src/org/eclipse/egit/ui/internal/clone/RtGitImportWizard.java +++ b/rt-ide/tizen.rt.product.plugin/src/org/eclipse/egit/ui/internal/clone/RtGitImportWizard.java @@ -225,6 +225,7 @@ public class RtGitImportWizard extends AbstractRtGitCloneWizard implements IImpo if (project != null) { try { RtProjectNature.makeRtProject(project, monitor); + project.refreshLocal(IResource.DEPTH_INFINITE, monitor); } catch (CoreException e) { logger.error(e.getMessage(), e); } diff --git a/rt-ide/tizen.rt.product.plugin/src/org/tizen/rt/ide/wizards/NewArtikProjectWizard.java b/rt-ide/tizen.rt.product.plugin/src/org/tizen/rt/ide/wizards/NewArtikProjectWizard.java index 6c4614b..bac5546 100644 --- a/rt-ide/tizen.rt.product.plugin/src/org/tizen/rt/ide/wizards/NewArtikProjectWizard.java +++ b/rt-ide/tizen.rt.product.plugin/src/org/tizen/rt/ide/wizards/NewArtikProjectWizard.java @@ -209,6 +209,12 @@ public class NewArtikProjectWizard extends BasicNewResourceWizard implements IEx } } + try { + RtProjectNature.makeRtProject(_newProject, monitor); + } catch (CoreException e) { + logger.error(e.getMessage(), e); + } + _newProject.refreshLocal(IResource.DEPTH_INFINITE, monitor); monitor.worked(1); @@ -223,11 +229,6 @@ public class NewArtikProjectWizard extends BasicNewResourceWizard implements IEx final IProjectDescription description = workspace.newProjectDescription(newProjectHandle.getName()); description.setLocationURI(location); - // create the new project operation - // IRunnableWithProgress op = new IRunnableWithProgress() { - // @Override - // public void run(IProgressMonitor monitor) throws - // InvocationTargetException { CreateProjectOperation op = new CreateProjectOperation(description, Messages.NewArtikProjectWizard_CreateOperationLabel); try { @@ -241,78 +242,6 @@ public class NewArtikProjectWizard extends BasicNewResourceWizard implements IEx } catch (ExecutionException e) { // throw new InvocationTargetException(e); } - // } - // }; - - try { - RtProjectNature.makeRtProject(newProjectHandle, monitor); - } catch (CoreException e) { - logger.error(e.getMessage(), e); - } - - // // run the new project creation operation - // try { - // getContainer().run(true, true, op); - // } catch (InterruptedException e) { - // return null; - // } catch (InvocationTargetException e) { - // Throwable t = e.getTargetException(); - // if (t instanceof ExecutionException && t.getCause() instanceof - // CoreException) { - // CoreException cause = (CoreException) t.getCause(); - // IStatus status = null; - //// if (cause.getStatus().getCode() == - // IResourceStatus.CASE_VARIANT_EXISTS) { - //// status = BundleMakerUiUtils.newWarning( - //// format("The underlying file system is case insensitive. There is an - // existing project or directory that conflicts with '%s'", - //// newProjectHandle.getName()), - //// cause); - //// } else { - //// status = BundleMakerUiUtils.newStatus(cause, "Problems while - // creating the project"); - //// } - // StatusAdapter statusAdapter = new StatusAdapter(status); - // statusAdapter.setProperty(IStatusAdapterConstants.TITLE_PROPERTY, - // "Project creation problems"); - // StatusManager.getManager().handle(status, StatusManager.BLOCK); - // } else { - // IStatus status = null; - // StatusAdapter statusAdapter = new StatusAdapter(status); - // statusAdapter.setProperty(IStatusAdapterConstants.TITLE_PROPERTY, - // "Project creation problems"); - // StatusManager.getManager().handle(statusAdapter, StatusManager.LOG | - // StatusManager.BLOCK); - // } - // return null; - // } - - // try { - // BundleMakerCore.addBundleMakerNature(newProjectHandle); - // if (mainPage.isTransformationScriptSupportSelected()) { - // - // TransformationScriptSupport.enableTransformationScriptSupport(newProjectHandle, - // PreferenceConstants.getDefaultJRELibrary()); - // - // } - // IBundleMakerProject bundleMakerProject = - // BundleMakerCore.getBundleMakerProject(newProjectHandle); - // IModifiableProjectDescription modifiableProjectDescription = - // bundleMakerProject - // .getModifiableProjectDescription(); - // modifiableProjectDescription.setJre(mainPage.getSelectedJreId()); - // modifiableProjectDescription.save(); - // - // } catch (CoreException ex) { - // IStatus status = BundleMakerUiUtils.newStatus(ex, "Could not add - // Bundlemaker nature"); - // StatusAdapter statusAdapter = new StatusAdapter(status); - // statusAdapter.setProperty(IStatusAdapterConstants.TITLE_PROPERTY, - // "Project creation problems"); - // StatusManager.getManager().handle(status, StatusManager.BLOCK); - // return null; - // - // } _newProject = newProjectHandle; -- 2.7.4