Skip to content

Commit 2fe52a8

Browse files
committed
This revision is the conclusion of a major refactoring of the concurrency structure of DrScala. I still have to remove redundant readers and writings locking (occuring only in the event dispatch thread so it is already serialized).
The following files were modified, added, or removed: modified: lib/plt.jar modified: src/edu/rice/cs/drjava/CommandLineTest.java modified: src/edu/rice/cs/drjava/DrScala.java modified: src/edu/rice/cs/drjava/DrScalaRoot.java modified: src/edu/rice/cs/drjava/config/DrScalaPropertySetup.java modified: src/edu/rice/cs/drjava/config/DrScalaPropertySetupTest.java modified: src/edu/rice/cs/drjava/config/OptionConstants.java modified: src/edu/rice/cs/drjava/model/AbstractGlobalModel.java modified: src/edu/rice/cs/drjava/model/DefaultGlobalModel.java deleted: src/edu/rice/cs/drjava/model/DefaultLightWeightParsingControl.java modified: src/edu/rice/cs/drjava/model/DummyGlobalModel.java modified: src/edu/rice/cs/drjava/model/DummyGlobalModelListener.java modified: src/edu/rice/cs/drjava/model/FindReplaceMachine.java modified: src/edu/rice/cs/drjava/model/GlobalEventNotifier.java modified: src/edu/rice/cs/drjava/model/GlobalModel.java modified: src/edu/rice/cs/drjava/model/GlobalModelCompileErrorsTest.java modified: src/edu/rice/cs/drjava/model/GlobalModelCompileIOTest.java modified: src/edu/rice/cs/drjava/model/GlobalModelCompileSuccessOptionsTest.java modified: src/edu/rice/cs/drjava/model/GlobalModelCompileSuccessTest.java modified: src/edu/rice/cs/drjava/model/GlobalModelCompileTest.java modified: src/edu/rice/cs/drjava/model/GlobalModelIOTest.java modified: src/edu/rice/cs/drjava/model/GlobalModelJUnitTest.java modified: src/edu/rice/cs/drjava/model/GlobalModelOtherTest.java modified: src/edu/rice/cs/drjava/model/GlobalModelTestCase.java modified: src/edu/rice/cs/drjava/model/SingleDisplayModelTest.java modified: src/edu/rice/cs/drjava/model/cache/DocumentCache.java modified: src/edu/rice/cs/drjava/model/cache/DocumentCacheTest.java modified: src/edu/rice/cs/drjava/model/compiler/CompilerErrorModelTest.java modified: src/edu/rice/cs/drjava/model/compiler/CompilerEventNotifier.java modified: src/edu/rice/cs/drjava/model/compiler/DefaultCompilerModel.java modified: src/edu/rice/cs/drjava/model/javadoc/DefaultScaladocModel.java modified: src/edu/rice/cs/drjava/model/junit/DefaultJUnitModel.java modified: src/edu/rice/cs/drjava/model/junit/JUnitError.java modified: src/edu/rice/cs/drjava/model/junit/JUnitErrorModelTest.java modified: src/edu/rice/cs/drjava/model/junit/JUnitTestManager.java renamed: src/edu/rice/cs/drjava/model/repl/DummyInteractionsListener.java -> src/edu/rice/cs/drjava/model/repl/DefaultInteractionsListener.java modified: src/edu/rice/cs/drjava/model/repl/DefaultInteractionsModel.java modified: src/edu/rice/cs/drjava/model/repl/InteractionsDJDocumentTest.java modified: src/edu/rice/cs/drjava/model/repl/InteractionsDocument.java modified: src/edu/rice/cs/drjava/model/repl/InteractionsEventNotifier.java modified: src/edu/rice/cs/drjava/model/repl/InteractionsListener.java modified: src/edu/rice/cs/drjava/model/repl/InteractionsModel.java modified: src/edu/rice/cs/drjava/model/repl/InteractionsModelCallback.java modified: src/edu/rice/cs/drjava/model/repl/InteractionsModelErrorTest.java modified: src/edu/rice/cs/drjava/model/repl/InteractionsModelTest.java modified: src/edu/rice/cs/drjava/model/repl/JavaInterpreterTest.java modified: src/edu/rice/cs/drjava/model/repl/RMIInteractionsModel.java modified: src/edu/rice/cs/drjava/model/repl/newjvm/ClassPathManager.java modified: src/edu/rice/cs/drjava/model/repl/newjvm/DrScalaInterpreter.java modified: src/edu/rice/cs/drjava/model/repl/newjvm/InterpretResult.java modified: src/edu/rice/cs/drjava/model/repl/newjvm/InterpreterJVM.java modified: src/edu/rice/cs/drjava/model/repl/newjvm/InterpreterJVMRemoteI.java modified: src/edu/rice/cs/drjava/model/repl/newjvm/MainJVM.java modified: src/edu/rice/cs/drjava/model/repl/newjvm/NewJVMTest.java modified: src/edu/rice/cs/drjava/platform/DefaultPlatform.java modified: src/edu/rice/cs/drjava/platform/PlatformSupport.java modified: src/edu/rice/cs/drjava/ui/AbortablePanel.java modified: src/edu/rice/cs/drjava/ui/AbstractConsoleController.java modified: src/edu/rice/cs/drjava/ui/ConsoleController.java modified: src/edu/rice/cs/drjava/ui/DebugPanel.java modified: src/edu/rice/cs/drjava/ui/FindReplacePanel.java modified: src/edu/rice/cs/drjava/ui/GenerateCustomDrScalaJarFrame.java modified: src/edu/rice/cs/drjava/ui/InteractionsController.java modified: src/edu/rice/cs/drjava/ui/InteractionsPaneTest.java modified: src/edu/rice/cs/drjava/ui/InteractionsScriptController.java modified: src/edu/rice/cs/drjava/ui/JUnitPanel.java modified: src/edu/rice/cs/drjava/ui/MainFrame.java modified: src/edu/rice/cs/drjava/ui/NewJavaClassDialog.java modified: src/edu/rice/cs/drjava/ui/ProjectAdvancedPropertiesFrame.java modified: src/edu/rice/cs/drjava/ui/ProjectMenuTest.java modified: src/edu/rice/cs/drjava/ui/ProjectPropertiesFrame.java modified: src/edu/rice/cs/drjava/ui/RegionsListPanel.java modified: src/edu/rice/cs/drjava/ui/RegionsTreePanel.java modified: src/edu/rice/cs/drjava/ui/config/ConfigFrame.java modified: src/edu/rice/cs/drjava/ui/predictive/PredictiveInputFrame.java modified: src/edu/rice/cs/util/ArgumentTokenizer.java modified: src/edu/rice/cs/util/Log.java modified: src/edu/rice/cs/util/newjvm/AbstractMasterJVM.java modified: src/edu/rice/cs/util/newjvm/AbstractSlaveJVM.java modified: src/edu/rice/cs/util/newjvm/IntegratedMasterSlaveTest.java modified: src/edu/rice/cs/util/swing/AsyncTask.java modified: src/edu/rice/cs/util/swing/AsyncTaskLauncher.java modified: ../plt/plt.jar modified: ../plt/src/edu/rice/cs/plt/concurrent/CompletionMonitor.java
1 parent 95c2127 commit 2fe52a8

File tree

84 files changed

+1317
-1788
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1317
-1788
lines changed

drjava/lib/plt.jar

138 Bytes
Binary file not shown.

drjava/src/edu/rice/cs/drjava/CommandLineTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public void run() {
118118

119119
_log.log("Creating a MainFrame for " + this);
120120
_mf = new MainFrame();
121-
_log.log("Created a MainFrame for " + this + "; stating file setup");
121+
_log.log("Created a MainFrame for " + this + "; stating file setUp");
122122

123123
try {
124124
f1 = File.createTempFile("DrScala-test", ".scala").getCanonicalFile();

drjava/src/edu/rice/cs/drjava/DrScala.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
* @version $Id: DrScala.java 5594 2012-06-21 11:23:40Z rcartwright $
9494
*/
9595
public class DrScala {
96-
public static volatile Log _log = new Log("DrScala.txt", false);
96+
public static volatile Log _log = new Log("GlobalModel.txt", false);
9797

9898
private static final String DEFAULT_MAX_HEAP_SIZE_ARG = "-Xmx256M";
9999

@@ -180,7 +180,7 @@ public static synchronized void clearFilesToOpen() {
180180
public static void main(final String[] args) {
181181
// handleCommandLineArgs will return true if DrScala should be loaded
182182
if (handleCommandLineArgs(args)) {
183-
// Platform-specific UI setup.
183+
// Platform-specific UI setUp.
184184
PlatformFactory.ONLY.beforeUISetup();
185185
configureAndLoadDrScalaRoot(args);
186186
}
@@ -224,14 +224,14 @@ public static void configureAndLoadDrScalaRoot(String[] args) {
224224
JVMBuilder jvmb = JVMBuilder.DEFAULT.jvmArguments(_jvmArgs);
225225

226226
// extend classpath if JUnit/ConcJUnit location specified
227-
_log.log("JVMBuilder: classPath = "+jvmb.classPath());
227+
_log.log("JVMBuilder: classPath = " + jvmb.classPath());
228228
ArrayList<File> extendedClassPath = new ArrayList<File>();
229229
for(File f: jvmb.classPath()) { extendedClassPath.add(f); }
230-
_log.log("JVMBuilder: extendedClassPath = "+extendedClassPath);
230+
_log.log("JVMBuilder: extendedClassPath = " + extendedClassPath);
231231
jvmb = jvmb.classPath(edu.rice.cs.plt.iter.IterUtil.asSizedIterable(extendedClassPath));
232-
_log.log("JVMBuilder: jvmArguments = "+jvmb.jvmArguments());
233-
_log.log("JVMBuilder: classPath = "+jvmb.classPath());
234-
_log.log("JVMBuilder: mainParams = "+classArgs);
232+
_log.log("JVMBuilder: jvmArguments = " + jvmb.jvmArguments());
233+
_log.log("JVMBuilder: classPath = " + jvmb.classPath());
234+
_log.log("JVMBuilder: mainParams = " + classArgs);
235235

236236
// start new DrScala
237237
Process p = jvmb.start(DrScalaRoot.class.getName(), classArgs);
@@ -267,7 +267,7 @@ public static void configureAndLoadDrScalaRoot(String[] args) {
267267
// reset configuration, save, and reload it
268268
getConfig().resetToDefaults();
269269
getConfig().saveConfiguration();
270-
if (!handleCommandLineArgs(args)) { System.exit(0); }
270+
if (! handleCommandLineArgs(args)) { System.exit(0); }
271271
++failCount;
272272
continue;
273273
}

drjava/src/edu/rice/cs/drjava/DrScalaRoot.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public class DrScalaRoot {
9797

9898
public static void main(final String[] args) {
9999
debug.log("Starting up");
100-
// Platform-specific UI setup.
100+
// Platform-specific UI setUp.
101101
PlatformFactory.ONLY.beforeUISetup();
102102

103103
// Utilities.show("DrScalaRoot started with args = " + Arrays.toString(args));
@@ -152,7 +152,7 @@ public static void main(final String[] args) {
152152
UIManager.setLookAndFeel(configLAFName);
153153
}
154154

155-
// The MainFrame *must* be constructed after the compiler setup process has
155+
// The MainFrame *must* be constructed after the compiler setUp process has
156156
// occurred; otherwise, the list of compilers in the UI will be wrong.
157157

158158
// Utilities.showDebug("Creating MainFrame");

drjava/src/edu/rice/cs/drjava/config/DrScalaPropertySetup.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
* @version $Id: DrJavaPropertySetup.java 5594 2012-06-21 11:23:40Z rcartwright $
6060
*/
6161
public class DrScalaPropertySetup implements OptionConstants {
62-
public static void setup() {
62+
public static void setUp() {
6363
final String DEF_DIR = "${drjava.working.dir}";
6464

6565
// fake "Config" properties

drjava/src/edu/rice/cs/drjava/config/DrScalaPropertySetupTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public class DrScalaPropertySetupTest extends MultiThreadedTestCase {
5757
public static final java.util.Random _r = new java.util.Random();
5858
public void setUp() throws Exception {
5959
super.setUp();
60-
DrScalaPropertySetup.setup();
60+
DrScalaPropertySetup.setUp();
6161
}
6262
public void tearDown() throws Exception {
6363
super.tearDown();

drjava/src/edu/rice/cs/drjava/config/OptionConstants.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ public static ArrayList<KeyStroke> vector(KeyStroke... ks) {
512512

513513
/** The key binding for showing the print preview */
514514
public static final ArrayListOption<KeyStroke> KEY_PAGE_SETUP =
515-
new ArrayListOption<KeyStroke>("key.page.setup", new KeyStrokeOption("",null), to.vector());
515+
new ArrayListOption<KeyStroke>("key.page.setUp", new KeyStrokeOption("",null), to.vector());
516516

517517
/** The key binding for showing the print preview. */
518518
public static final ArrayListOption<KeyStroke> KEY_PRINT_PREVIEW =
@@ -785,11 +785,11 @@ public static ArrayList<KeyStroke> vector(KeyStroke... ks) {
785785
new ArrayListOption<KeyStroke>("key.clear.history", new KeyStrokeOption("",null), to.vector());
786786

787787
/** The key binding for resetting the interactions pane. */
788-
public static final ArrayListOption<KeyStroke> KEY_RESET_INTERACTIONS =
788+
public static final ArrayListOption<KeyStroke> KEY_RESET_INTERPRETER =
789789
new ArrayListOption<KeyStroke>("key.reset.interactions", new KeyStrokeOption("",null), to.vector());
790790

791791
/** The key binding for hard resetting the interactions pane. */
792-
public static final ArrayListOption<KeyStroke> KEY_HARD_RESET_INTERACTIONS =
792+
public static final ArrayListOption<KeyStroke> KEY_HARD_RESET_INTERPRETER =
793793
new ArrayListOption<KeyStroke>("key.hard.reset.interactions", new KeyStrokeOption("",null), to.vector());
794794

795795
/** The key binding for viewing the interactions classpath. */
@@ -1302,7 +1302,7 @@ public static ArrayList<String> evaluate() {
13021302
public static final BooleanOption QUIT_PROMPT = new BooleanOption("quit.prompt", Boolean.TRUE);
13031303

13041304
// /** Whether to prompt before resetting the interactions pane. */
1305-
// public static final BooleanOption INTERACTIONS_RESET_PROMPT =
1305+
// public static final BooleanOption RESET_INTERPRETER_PROMPT =
13061306
// new BooleanOption("interactions.reset.prompt", Boolean.TRUE);
13071307

13081308
/** Whether to prompt to save before compiling. */
@@ -1495,12 +1495,12 @@ public static ForcedChoiceOption evaluate() {
14951495
new NonNegativeIntegerOption("window.width", Integer.valueOf(800));
14961496

14971497
/** X position of MainFrame at startUp. Can be overridden if out of bounds. This value can legally be negative in a
1498-
* multi-screen setup.
1498+
* multi-screen setUp.
14991499
*/
15001500
public static final IntegerOption WINDOW_X = new IntegerOption("window.x", Integer.valueOf(Integer.MAX_VALUE));
15011501

15021502
/** Y position of MainFrame at startUp. Can be overridden if out of bounds. This value can legally be negative in a
1503-
* multi-screen setup.
1503+
* multi-screen setUp.
15041504
*/
15051505
public static final IntegerOption WINDOW_Y = new IntegerOption("window.y", Integer.valueOf(Integer.MAX_VALUE));
15061506

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

Lines changed: 21 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public class AbstractGlobalModel implements SingleDisplayModel, OptionConstants,
213213
*/
214214
private volatile File _activeDirectory;
215215

216-
/** A state varible indicating whether the class path has changed. Reset to false by resetInteractions. */
216+
/** A state varible indicating whether the class path has changed. Reset to false by resetInterpreter. */
217217
private volatile boolean classPathChanged = false;
218218

219219
/** The abstract container which contains views of open documents and allows user to navigate document focus among
@@ -257,16 +257,6 @@ public void removeFindResultsManager(RegionManager<MovingDocumentRegion> rm) {
257257

258258
/** @return manager for browser history regions. */
259259
public BrowserHistoryManager getBrowserHistoryManager() { return _browserHistoryManager; }
260-
261-
// /** Completion monitor for loading the files of a project (as OpenDefinitionsDocuments). */
262-
// public final CompletionMonitor projectLoading = new CompletionMonitor();
263-
264-
// Lightweight parsing is disabled until we have something that is beneficial and works better in the background.
265-
// /** Light-weight parsing controller. */
266-
// protected LightWeightParsingControl _parsingControl;
267-
//
268-
// /** @return the parsing control */
269-
// public LightWeightParsingControl getParsingControl() { return _parsingControl; }
270260

271261
// ----- CONSTRUCTORS -----
272262

@@ -280,9 +270,6 @@ public AbstractGlobalModel() {
280270
_bookmarkManager = new ConcreteRegionManager<MovingDocumentRegion>();
281271
_findResultsManagers = new LinkedList<RegionManager<MovingDocumentRegion>>();
282272
_browserHistoryManager = new BrowserHistoryManager();
283-
284-
/* Unnecessary in DrScala. */
285-
// _registerOptionListeners();
286273

287274
setFileGroupingState(makeFlatFileGroupingState());
288275
Utilities.invokeLater(new Runnable() { public void run() { _notifier.projectRunnableChanged(); } });
@@ -342,7 +329,7 @@ public void focusLost(FocusEvent e) { }
342329
_ensureNotEmpty();
343330
setActiveFirstDocument();
344331

345-
// setup option listener for clipboard history
332+
// setUp option listener for clipboard history
346333
OptionListener<Integer> clipboardHistorySizeListener = new OptionListener<Integer>() {
347334
public void optionChanged(OptionEvent<Integer> oce) {
348335
ClipboardHistoryModel.singleton().resize(oce.value);
@@ -351,7 +338,7 @@ public void optionChanged(OptionEvent<Integer> oce) {
351338
DrScala.getConfig().addOptionListener(CLIPBOARD_HISTORY_SIZE, clipboardHistorySizeListener);
352339
ClipboardHistoryModel.singleton().resize(DrScala.getConfig().getSetting(CLIPBOARD_HISTORY_SIZE).intValue());
353340

354-
// setup option listener for browser history
341+
// setUp option listener for browser history
355342
OptionListener<Integer> browserHistoryMaxSizeListener = new OptionListener<Integer>() {
356343
public void optionChanged(OptionEvent<Integer> oce) {
357344
AbstractGlobalModel.this.getBrowserHistoryManager().setMaximumSize(oce.value);
@@ -1068,7 +1055,7 @@ public void setCustomManifest(String manifest) { }
10681055

10691056
// ----- METHODS -----
10701057

1071-
/** Add a listener to this global model.
1058+
/** Add a listener to this global model. The _notifier object in the model holds all listeners.
10721059
* @param listener a listener that reacts on events generated by the GlobalModel.
10731060
*/
10741061
public void addListener(GlobalModelListener listener) { _notifier.addListener(listener); }
@@ -1245,11 +1232,11 @@ public OpenDefinitionsDocument newTestCase(String name, boolean makeSetUp, boole
12451232
buf.append(name);
12461233
buf.append("(name: String) extends TestCase(name) {\n\n");
12471234

1248-
// TODO (williamf): Add setup and teardown methods for Scala
1235+
// TODO (williamf): Add setUp and teardown methods for Scala
12491236
// if (makeSetUp) {
12501237
// buf.append("/**\n");
12511238
// buf.append("* This method is called before each test method, to perform any common\n");
1252-
// buf.append("* setup if necessary.\n");
1239+
// buf.append("* setUp if necessary.\n");
12531240
// buf.append("*/\n");
12541241
// if (! elementary) buf.append("public ");
12551242
// buf.append("void setUp() throws Exception {\n}\n\n");
@@ -1844,7 +1831,7 @@ public boolean accept(OpenDefinitionsDocument d) {
18441831
createJarFlags, autoRefresh, manifest, storedPreferences));
18451832

18461833
// Reset interactions pane in new working directory as part of loading this projet
1847-
resetInteractions(getWorkingDirectory());
1834+
resetInterpreter(getWorkingDirectory());
18481835

18491836
ArrayList<DocFile> projFiles = new ArrayList<DocFile>();
18501837
DocFile active = null;
@@ -1940,8 +1927,11 @@ public void closeProject(boolean suppressReset) {
19401927
// remove previous listeners
19411928
removePreviousListeners();
19421929

1943-
/* Unless false value is passed as suppressRest, reset interactions as part of closing project */
1944-
if (! suppressReset) resetInteractions(getWorkingDirectory());
1930+
/* Unless false value is passed as suppressRest, reset interactions as part of closing project.
1931+
* Why? In DrScala, resetting interactions is very expensive. Opening a new project and compiling the open
1932+
* documents in flat file mode both reset interactions. */
1933+
// if (! suppressReset) resetInterpreter(getWorkingDirectory());
1934+
19451935
_notifier.projectClosed();
19461936
setActiveDocument(getDocumentNavigator().getDocuments().get(0));
19471937
}
@@ -1965,7 +1955,7 @@ public boolean closeFile(OpenDefinitionsDocument doc) {
19651955
}
19661956

19671957
/** Attempts to close all open documents. Also ensures the invariant that there is always at least
1968-
* one open document holds by creating a new file if necessary. Resets interactions iff operation succeeds.
1958+
* one open document holds by creating a new file if necessary. No longer resets interactions when operation succeeds.
19691959
* @return true if all documents were closed
19701960
*/
19711961
public boolean closeAllFiles() {
@@ -1976,7 +1966,7 @@ public boolean closeAllFiles() {
19761966
Utilities.invokeLater(new Runnable() { public void run() { _notifier.allFilesClosed(); } });
19771967

19781968
_log.log("Resetting interactions pane to use " + getWorkingDirectory() + " as working directory");
1979-
resetInteractions(getWorkingDirectory());
1969+
// resetInterpreter(getWorkingDirectory());
19801970
}
19811971
return res;
19821972
}
@@ -2331,13 +2321,13 @@ void setDefinitionsIndent(int indent) {
23312321
}
23322322

23332323
/** A degenerate operation since this has no slave JVM and no interactions model. */
2334-
public void resetInteractions() { /* do nothing */ }
2324+
public void resetInterpreter() { /* do nothing */ }
23352325

23362326
/** A degenerate operation since this has no slave JVM and no interactions model. */
2337-
public void resetInteractions(File wd) { /* do nothing */ }
2327+
public void resetInterpreter(File wd) { /* do nothing */ }
23382328

23392329
/** A degenerate operation since this has no slave JVM and no interactions model. */
2340-
public void hardResetInteractions(File wd) { /* do nothing */ }
2330+
public void hardResetInterpreter(File wd) { /* do nothing */ }
23412331

23422332
/** Resets the console. Fires consoleReset() event. */
23432333
public void resetConsole() {
@@ -2577,7 +2567,7 @@ public void addToBrowserHistory(boolean before) {
25772567
}
25782568

25792569
/** throws an UnsupportedOperationException */
2580-
public Iterable<File> getClassPath() {
2570+
public List<File> getClassPath() {
25812571
throw new UnsupportedOperationException("AbstractGlobalModel does not support class paths");
25822572
}
25832573

@@ -2999,7 +2989,7 @@ public String getText() {
29992989

30002990
public DefinitionsDocument make() throws IOException, BadLocationException, FileMovedException {
30012991

3002-
// System.err.println("DDReconstructor.make() called on " + ConcreteOpenDefDoc.this);
2992+
_log.log("DDReconstructor.make() called on " + ConcreteOpenDefDoc.this);
30032993
DefinitionsDocument newDefDoc = new DefinitionsDocument(_notifier);
30042994
newDefDoc.setOpenDefDoc(ConcreteOpenDefDoc.this);
30052995

@@ -3029,14 +3019,11 @@ public DefinitionsDocument make() throws IOException, BadLocationException, File
30293019

30303020
// tempDoc.setUndoManager(_undo);
30313021
assert ! newDefDoc.isModifiedSinceSave();
3032-
// System.err.println ("_packageName in make() = " + _packageName);
3033-
// System.err.println("tempDoc.getLength() = " + tempDoc.getLength());
30343022
_packageName = newDefDoc.getPackageName();
30353023
_log.log("Setting _packageName for " + newDefDoc + " in make() to '" + _packageName + "'");
30363024
return newDefDoc;
30373025
}
30383026

3039-
30403027
/** Saves the information for this document before it is kicked out of the cache. Only called from
30413028
* DocumentCache. Assumes that cache lock is already held.
30423029
*/
@@ -3315,7 +3302,7 @@ public boolean modifiedOnDisk() {
33153302
* the class file to that of the source file. An empty untitled document is consider to be "in sync".
33163303
*/
33173304
public boolean checkIfClassFileInSync() {
3318-
// _log.log("checkIfClassFileInSync() called for " + this);
3305+
_log.log("checkIfClassFileInSync() called for " + this);
33193306
if (isEmpty()) return true;
33203307

33213308
// If modified, then definitely out of sync
@@ -3336,7 +3323,7 @@ public boolean checkIfClassFileInSync() {
33363323
setCachedClassFile(classFile);
33373324
if ((classFile == FileOps.NULL_FILE) || (! classFile.exists())) {
33383325
// couldn't find the class file
3339-
_log.log(this + ": Could not find class file");
3326+
_log.log(this + ": Could not find class file; returning false for checkIfClassFileInSync");
33403327
setClassFileInSync(false);
33413328
return false;
33423329
}

0 commit comments

Comments
 (0)