diff options
2 files changed, 8 insertions, 4 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/AddSuppressAttribute.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/AddSuppressAttribute.java index 3297756..cd077ec 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/AddSuppressAttribute.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/AddSuppressAttribute.java @@ -115,7 +115,7 @@ class AddSuppressAttribute implements ICompletionProposal { // Use the non-namespace form of set attribute since we can't // reference the namespace until the model has been reloaded - mElement.setAttribute(prefix + ':' + ATTR_IGNORE, mId); + mElement.setAttribute(prefix + ':' + ATTR_IGNORE, ignore); UiElementNode rootUiNode = mEditor.getUiRootNode(); if (rootUiNode != null) { diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/LintViewPart.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/LintViewPart.java index 956ee9d..e9f94cc 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/LintViewPart.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/lint/LintViewPart.java @@ -229,7 +229,7 @@ public class LintViewPart extends ViewPart implements SelectionListener, IJobCha mRemoveAllAction = new LintViewAction("Remove All", ACTION_REMOVE_ALL, sharedImages.getImageDescriptor(ISharedImages.IMG_ELCL_REMOVEALL), sharedImages.getImageDescriptor(ISharedImages.IMG_ELCL_REMOVEALL_DISABLED)); - mRefreshAction = new LintViewAction("Refresh", ACTION_REFRESH, + mRefreshAction = new LintViewAction("Refresh (& Save Files)", ACTION_REFRESH, iconFactory.getImageDescriptor(REFRESH_ICON), null); mRemoveAllAction.setEnabled(true); mCollapseAll = new LintViewAction("Collapse All", ACTION_COLLAPSE, @@ -461,6 +461,11 @@ public class LintViewPart extends ViewPart implements SelectionListener, IJobCha public void run() { switch (mAction) { case ACTION_REFRESH: { + IWorkbench workbench = PlatformUI.getWorkbench(); + if (workbench != null) { + workbench.saveAllEditors(false /*confirm*/); + } + Job[] jobs = EclipseLintRunner.getCurrentJobs(); if (jobs.length > 0) { EclipseLintRunner.cancelCurrentJobs(false); @@ -471,9 +476,8 @@ public class LintViewPart extends ViewPart implements SelectionListener, IJobCha } Job job = EclipseLintRunner.startLint(resources, null, false /*fatalOnly*/, false /*show*/); - if (job != null) { + if (job != null && workbench != null) { job.addJobChangeListener(LintViewPart.this); - IWorkbench workbench = PlatformUI.getWorkbench(); ISharedImages sharedImages = workbench.getSharedImages(); setImageDescriptor(sharedImages.getImageDescriptor( ISharedImages.IMG_ELCL_STOP)); |