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

Side by Side Diff: pkg/analysis_services/lib/index/local_file_index.dart

Issue 426773002: Issue 20240. Use a FileManager that manages its own temporary directory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library services.index.local_file_index; 5 library services.index.local_file_index;
6 6
7 import 'dart:io';
8
9 import 'package:analysis_services/index/index.dart'; 7 import 'package:analysis_services/index/index.dart';
10 import 'package:analysis_services/src/index/local_index.dart'; 8 import 'package:analysis_services/src/index/local_index.dart';
11 import 'package:analysis_services/src/index/store/codec.dart'; 9 import 'package:analysis_services/src/index/store/codec.dart';
12 import 'package:analysis_services/src/index/store/separate_file_manager.dart'; 10 import 'package:analysis_services/src/index/store/temporary_folder_file_manager. dart';
13 import 'package:analysis_services/src/index/store/split_store.dart'; 11 import 'package:analysis_services/src/index/store/split_store.dart';
14 import 'package:analyzer/src/generated/engine.dart'; 12 import 'package:analyzer/src/generated/engine.dart';
15 13
16 14
17 Index createLocalFileIndex(Directory directory) { 15 Index createLocalFileIndex() {
18 var fileManager = new SeparateFileManager(directory); 16 var fileManager = new TemporaryFolderFileManager();
19 var stringCodec = new StringCodec(); 17 var stringCodec = new StringCodec();
20 var nodeManager = new FileNodeManager(fileManager, 18 var nodeManager = new FileNodeManager(fileManager,
21 AnalysisEngine.instance.logger, stringCodec, new ContextCodec(), 19 AnalysisEngine.instance.logger, stringCodec, new ContextCodec(),
22 new ElementCodec(stringCodec), new RelationshipCodec(stringCodec)); 20 new ElementCodec(stringCodec), new RelationshipCodec(stringCodec));
23 return new LocalIndex(nodeManager); 21 return new LocalIndex(nodeManager);
24 } 22 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698