RTSDK : Refresh project code moved to more proper location
authordaeryong.park <bdragon.park@samsung.com>
Tue, 28 Mar 2017 03:16:13 +0000 (12:16 +0900)
committerdaeryong.park <bdragon.park@samsung.com>
Tue, 28 Mar 2017 07:49:48 +0000 (16:49 +0900)
- Refresh project code moved to more proper location

Change-Id: I062386441ae5036e456dae2f71032b5784357992
Signed-off-by: daeryong.park <bdragon.park@samsung.com>
rt-ide/tizen.rt.product.plugin/src/org/eclipse/egit/ui/internal/clone/RtGitImportWizard.java
rt-ide/tizen.rt.product.plugin/src/org/tizen/rt/ide/wizards/NewArtikProjectWizard.java

index 98ca991..a0c5191 100644 (file)
@@ -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);
                         }
index 6c4614b..bac5546 100644 (file)
@@ -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;