Skip to content

Commit ab485c7

Browse files
author
y4zhang
committed
finish collecting all related data for compiling event
1 parent 0764967 commit ab485c7

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

drjava/src/edu/rice/cs/drjava/model/AbstractGlobalModel.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,6 @@ public OpenDefinitionsDocument newFile(String text) {
12331233
if (dir == null) dir = getMasterWorkingDirectory();
12341234
OpenDefinitionsDocument doc = newFile(dir, text);
12351235
setActiveDocument(doc);
1236-
//DataCollector.newFile(dir, doc);
12371236
return doc;
12381237
}
12391238

@@ -1435,8 +1434,7 @@ private OpenDefinitionsDocument[] _openFiles(File[] files)
14351434
_notifier.fileOpened(d);
14361435
//DataCollector.openClass(d.getParentDirectory(),d)
14371436
}
1438-
}
1439-
1437+
}
14401438
return retDocs.toArray(new OpenDefinitionsDocument[0]);
14411439
}
14421440

@@ -3338,6 +3336,8 @@ public void saveTo(OutputStream os) throws IOException {
33383336
// We don't save if this happens.
33393337
return false;
33403338
}
3339+
//DefinitionsDocument ddoc = getDocument();
3340+
//DataCollector.newFile(_packageName,_parentDir, ddoc);
33413341
}
33423342

33433343
/** This method tells the document to prepare all the DrJavaBook and PagePrinter objects. */

drjava/src/edu/rice/cs/drjava/model/compiler/DefaultCompilerModel.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@
6565
import edu.rice.cs.plt.io.IOUtil;
6666
import edu.rice.cs.plt.iter.IterUtil;
6767
import edu.rice.cs.plt.collect.CollectUtil;
68+
69+
//import edu.rice.cs.drjava.collect.*;
6870
// import edu.rice.cs.plt.tuple.Pair;
6971
// TODO: use the preceding pair class instead of javalanglevels.Pair; must change javalanglevels code as well
7072

@@ -273,6 +275,7 @@ private void _doCompile(List<OpenDefinitionsDocument> docs) throws IOException {
273275
}
274276
catch (Throwable t) {
275277
DJError err = new DJError(t.toString(), false);
278+
//DataCollector.compiled(filesToCompile, Arrays.asList(err),false,false);
276279
_distributeErrors(Arrays.asList(err));
277280
throw new UnexpectedException(t);
278281
}
@@ -361,11 +364,13 @@ private void _compileFiles(List<File> files, File buildDir) throws IOException {
361364
synchronized(_compilerLock) {
362365
if (preprocessedFiles == null) {
363366
errors.addAll(compiler.compile(files, classPath, null, buildDir, bootClassPath, null, true));
367+
//DataCollector.compiled(files, errors,true,true);
364368
}
365369
else {
366370
/** If compiling a language level file, do not show warnings, as these are not caught by the language level
367371
* parser */
368372
errors.addAll(compiler.compile(preprocessedFiles, classPath, null, buildDir, bootClassPath, null, false));
373+
//DataCollector.compiled(files, errors,false,true);
369374
}
370375
}
371376
}

drjava/src/edu/rice/cs/drjava/ui/MainFrame.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5148,7 +5148,6 @@ private void _close() {
51485148
// Either this is an external file or user actually wants to close it
51495149
for(OpenDefinitionsDocument doc: l) {
51505150
_model.closeFile(doc);
5151-
//DataCollector.closeFile(doc);
51525151
}
51535152
}
51545153

@@ -5322,7 +5321,7 @@ private boolean _rename() {
53225321
/** this highlights the document in the navigator */
53235322
_model.refreshActiveDocument();
53245323
//File newFile = _model.getActiveDocument().getFile();
5325-
//DataCollector.RenamedClass(oldFile, newFile);
5324+
//DataCollector.renamedClass(oldFile, newFile);
53265325
return toReturn;
53275326
}
53285327
}

0 commit comments

Comments
 (0)