Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(638)

Side by Side Diff: dart/editor/tools/plugins/com.google.dart.tools.update.core/src/com/google/dart/tools/update/core/internal/jobs/InstallUpdateAction.java

Issue 366873005: Version 1.5.2 (Closed) Base URL: http://dart.googlecode.com/svn/branches/1.5/
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012, the Dart project authors. 2 * Copyright (c) 2012, the 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
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 UpdateUtils.unzip( 285 UpdateUtils.unzip(
286 updateZip, 286 updateZip,
287 tmpDir, 287 tmpDir,
288 UpdateJobMessages.InstallUpdateAction_extract_task, 288 UpdateJobMessages.InstallUpdateAction_extract_task,
289 mon.newChild(20)); 289 mon.newChild(20));
290 290
291 monitor.setTaskName(UpdateJobMessages.InstallUpdateAction_preparing_task); 291 monitor.setTaskName(UpdateJobMessages.InstallUpdateAction_preparing_task);
292 File sdkDir = new File(installTarget, "dart-sdk"); //$NON-NLS-1$ 292 File sdkDir = new File(installTarget, "dart-sdk"); //$NON-NLS-1$
293 UpdateUtils.deleteDirectory(sdkDir, mon.newChild(4)); 293 UpdateUtils.deleteDirectory(sdkDir, mon.newChild(4));
294 UpdateUtils.deleteDirectory(new File(installTarget, "samples"), mon.newChild (4)); //$NON-NLS-1$ 294 UpdateUtils.deleteDirectory(new File(installTarget, "samples"), mon.newChild (4)); //$NON-NLS-1$
295 295 // TODO(keertip): check can be removed after all installs are on version wit h android dir
296 File androidDir = new File(installTarget, "android");
297 if (androidDir.exists()) {
298 UpdateUtils.deleteDirectory(androidDir, mon.newChild(4));
299 }
296 terminateRunningDartLaunches(); 300 terminateRunningDartLaunches();
297 301
298 File dartium = DartSdkManager.getManager().getSdk().getDartiumWorkingDirecto ry(installTarget); 302 File dartium = DartSdkManager.getManager().getSdk().getDartiumWorkingDirecto ry(installTarget);
299 try { 303 try {
300 UpdateUtils.delete(dartium, mon.newChild(2)); 304 UpdateUtils.delete(dartium, mon.newChild(2));
301 } catch (Throwable th) { 305 } catch (Throwable th) {
302 //TODO(pquitslund): handle delete errors 306 //TODO(pquitslund): handle delete errors
303 UpdateCore.logError(th); 307 UpdateCore.logError(th);
304 } 308 }
305 309
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 private void terminateRunningDartLaunches() { 460 private void terminateRunningDartLaunches() {
457 ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); 461 ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
458 for (ILaunch launch : launchManager.getLaunches()) { 462 for (ILaunch launch : launchManager.getLaunches()) {
459 if (!launch.isTerminated() && isDartLaunch(launch) && launch.canTerminate( )) { 463 if (!launch.isTerminated() && isDartLaunch(launch) && launch.canTerminate( )) {
460 terminate(launch); 464 terminate(launch);
461 } 465 }
462 } 466 }
463 } 467 }
464 468
465 } 469 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698