import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Platform;
import org.tizen.common.util.log.Logger;
/**
return null;
}
+
+ /**
+ * Check whether target project is located in default location or not.
+ * @param descriptionLocation .cproject location of target project.
+ * @return true if it is located in default location. False if not.
+ */
+ public static boolean isDefaultProjectLocation(IPath descriptionLocation) {
+ if(descriptionLocation.segmentCount() < 2) {
+ return false;
+ }
+ return descriptionLocation.removeLastSegments(2).toFile().equals(Platform.getLocation().toFile());
+ }
}