| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Dart project authors. | 2 * Copyright 2012 Dart project authors. |
| 3 * | 3 * |
| 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except | 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except |
| 5 * in compliance with the License. You may obtain a copy of the License at | 5 * in compliance with the License. You may obtain a copy of the License at |
| 6 * | 6 * |
| 7 * http://www.eclipse.org/legal/epl-v10.html | 7 * http://www.eclipse.org/legal/epl-v10.html |
| 8 * | 8 * |
| 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License | 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License |
| 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express | 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express |
| 11 * or implied. See the License for the specific language governing permissions a
nd limitations under | 11 * or implied. See the License for the specific language governing permissions a
nd limitations under |
| 12 * the License. | 12 * the License. |
| 13 */ | 13 */ |
| 14 package com.google.dart.tools.core.analysis; | 14 package com.google.dart.tools.core.analysis; |
| 15 | 15 |
| 16 class EverythingChangedTask extends Task { | 16 class EverythingChangedTask extends Task { |
| 17 | 17 |
| 18 private final AnalysisServer server; | 18 private final AnalysisServer server; |
| 19 private final Context context; | |
| 20 | 19 |
| 21 EverythingChangedTask(AnalysisServer server, Context context) { | 20 EverythingChangedTask(AnalysisServer server) { |
| 22 this.server = server; | 21 this.server = server; |
| 23 this.context = context; | |
| 24 } | 22 } |
| 25 | 23 |
| 26 @Override | 24 @Override |
| 27 public boolean isBackgroundAnalysis() { | 25 public boolean isBackgroundAnalysis() { |
| 28 return false; | 26 return false; |
| 29 } | 27 } |
| 30 | 28 |
| 31 @Override | 29 @Override |
| 32 public boolean isPriority() { | 30 public boolean isPriority() { |
| 33 return true; | 31 return true; |
| 34 } | 32 } |
| 35 | 33 |
| 36 @Override | 34 @Override |
| 37 public void perform() { | 35 public void perform() { |
| 38 context.discardLibraries(); | 36 server.getSavedContext().discardAllLibraries(); |
| 39 server.queueAnalyzeContext(); | 37 server.queueAnalyzeContext(); |
| 40 } | 38 } |
| 41 } | 39 } |
| OLD | NEW |