diff options
author | Tor Norbye <tnorbye@google.com> | 2012-10-22 17:25:01 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2012-10-22 17:46:59 -0700 |
commit | cbfe6c5f0a012d5987b79ddb717842af61b636d0 (patch) | |
tree | fb714e62a9b528904b66ed76810f6574cb446c98 /eclipse/plugins | |
parent | 1f73155e9a70dd7ddabf37de63d06f1d022af4d7 (diff) | |
download | sdk-cbfe6c5f0a012d5987b79ddb717842af61b636d0.zip sdk-cbfe6c5f0a012d5987b79ddb717842af61b636d0.tar.gz sdk-cbfe6c5f0a012d5987b79ddb717842af61b636d0.tar.bz2 |
Ensure that the configuration bar is visible
This handles a scenario which can come up if you
switch the SDK installation area, or start the
IDE with a project that does not have a valid
project property setting pointing to a valid
platform.
Change-Id: I645033707a575d9da86b619c2f97787957b1200b
Diffstat (limited to 'eclipse/plugins')
2 files changed, 11 insertions, 1 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationChooser.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationChooser.java index ea66ac4..750c192 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationChooser.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/configuration/ConfigurationChooser.java @@ -537,6 +537,8 @@ public class ConfigurationChooser extends Composite selectConfiguration(mConfiguration.getEditedConfig()); updateActivity(); } + } else if (sdkStatus == LoadStatus.FAILED) { + setVisible(true); } } finally { mDisableUpdates--; @@ -808,6 +810,8 @@ public class ConfigurationChooser extends Composite // compute the final current config mConfiguration.syncFolderConfig(); + } else if (targetStatus == LoadStatus.FAILED) { + setVisible(true); } } finally { mDisableUpdates--; diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/RenderPreview.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/RenderPreview.java index 78e670e..95722c5 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/RenderPreview.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/RenderPreview.java @@ -505,11 +505,17 @@ public class RenderPreview implements IJobChangeListener { /** Render immediately */ private void renderSync() { + GraphicalEditorPart editor = mCanvas.getEditorDelegate().getGraphicalEditor(); + if (editor.getReadyLayoutLib(false /*displayError*/) == null) { + // Don't attempt to render when there is no ready layout library: most likely + // the targets are loading/reloading. + return; + } + disposeThumbnail(); Configuration configuration = mAlternateInput != null ? mAlternateConfiguration : mConfiguration; - GraphicalEditorPart editor = mCanvas.getEditorDelegate().getGraphicalEditor(); ResourceResolver resolver = getResourceResolver(configuration); RenderService renderService = RenderService.create(editor, configuration, resolver); |