aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse
diff options
context:
space:
mode:
Diffstat (limited to 'eclipse')
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/properties/AndroidPropertyPage.java4
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sdk/Sdk.java4
2 files changed, 7 insertions, 1 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/properties/AndroidPropertyPage.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/properties/AndroidPropertyPage.java
index 584d49f..212263a 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/properties/AndroidPropertyPage.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/properties/AndroidPropertyPage.java
@@ -143,7 +143,9 @@ public class AndroidPropertyPage extends PropertyPage {
mPropertiesWorkingCopy.save();
IResource projectProp = mProject.findMember(SdkConstants.FN_PROJECT_PROPERTIES);
- projectProp.refreshLocal(IResource.DEPTH_ZERO, new NullProgressMonitor());
+ if (projectProp != null) {
+ projectProp.refreshLocal(IResource.DEPTH_ZERO, new NullProgressMonitor());
+ }
} catch (Exception e) {
String msg = String.format(
"Failed to save %1$s for project %2$s",
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sdk/Sdk.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sdk/Sdk.java
index 2a1fba9..4f9bb09 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sdk/Sdk.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/sdk/Sdk.java
@@ -442,6 +442,10 @@ public final class Sdk {
// delete the old file.
ProjectProperties.delete(projectLocation, PropertyType.LEGACY_DEFAULT);
+
+ // make sure to use the new properties
+ properties = ProjectProperties.load(projectLocation,
+ PropertyType.PROJECT);
} catch (Exception e) {
AdtPlugin.log(IStatus.ERROR,
"Failed to rename properties file to %1$s for project '%s2$'",