Skip to content

Commit 8e3ecab

Browse files
committed
This revision eliminates more irrelevant code (vestiges of DrJava) and
slightly revises the interactions reset implementation which is still imperfect. It also updates the platform code base so that Windows registry settings refer to DrScala rather than DrJava. The following files were modified or deleted: modified: src/edu/rice/cs/drjava/config/OptionConstants.java modified: src/edu/rice/cs/drjava/model/AbstractDJDocument.java modified: src/edu/rice/cs/drjava/model/AbstractGlobalModel.java modified: src/edu/rice/cs/drjava/model/DefaultGlobalModel.java modified: src/edu/rice/cs/drjava/model/DummyGlobalModel.java modified: src/edu/rice/cs/drjava/model/DummyOpenDefDoc.java modified: src/edu/rice/cs/drjava/model/GlobalModel.java modified: src/edu/rice/cs/drjava/model/JDKDescriptor.java modified: src/edu/rice/cs/drjava/model/JDKToolsLibrary.java modified: src/edu/rice/cs/drjava/model/JarJDKToolsLibrary.java modified: src/edu/rice/cs/drjava/model/OpenDefinitionsDocument.java modified: src/edu/rice/cs/drjava/model/debug/Breakpoint.java modified: src/edu/rice/cs/drjava/model/debug/DebugBreakpointData.java modified: src/edu/rice/cs/drjava/model/debug/DebugEventNotifier.java modified: src/edu/rice/cs/drjava/model/debug/DebugException.java modified: src/edu/rice/cs/drjava/model/debug/DebugListener.java modified: src/edu/rice/cs/drjava/model/debug/DebugModelCallback.java modified: src/edu/rice/cs/drjava/model/debug/DebugStackData.java modified: src/edu/rice/cs/drjava/model/debug/DebugTestCase.java modified: src/edu/rice/cs/drjava/model/debug/DebugThreadData.java modified: src/edu/rice/cs/drjava/model/debug/DebugWatchData.java modified: src/edu/rice/cs/drjava/model/debug/DebugWatchDataTest.java modified: src/edu/rice/cs/drjava/model/debug/Debugger.java modified: src/edu/rice/cs/drjava/model/debug/LineNotExecutableException.java modified: src/edu/rice/cs/drjava/model/debug/NoDebuggerAvailable.java modified: src/edu/rice/cs/drjava/model/debug/jpda/DebugContextTest.java modified: src/edu/rice/cs/drjava/model/debug/jpda/DebugTest.java modified: src/edu/rice/cs/drjava/model/debug/jpda/JPDAStackData.java modified: src/edu/rice/cs/drjava/model/debug/jpda/JPDAThreadData.java modified: src/edu/rice/cs/drjava/model/junit/DefaultJUnitModel.java modified: src/edu/rice/cs/drjava/model/repl/InteractionsDocument.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/InteractionsModelTest.java modified: src/edu/rice/cs/drjava/model/repl/RMIInteractionsModel.java modified: src/edu/rice/cs/drjava/model/repl/newjvm/MainJVM.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/project/ProjectFileIR.java modified: src/edu/rice/cs/drjava/project/ProjectFileParser.java modified: src/edu/rice/cs/drjava/project/ProjectProfile.java modified: src/edu/rice/cs/drjava/project/XMLProjectFileParser.java modified: src/edu/rice/cs/drjava/ui/DebugPanel.java modified: src/edu/rice/cs/drjava/ui/InteractionsController.java modified: src/edu/rice/cs/drjava/ui/MainFrame.java modified: src/edu/rice/cs/drjava/ui/MainFrameStatics.java modified: src/edu/rice/cs/drjava/ui/avail/GUIAvailabilityListener.java modified: src/edu/rice/cs/drjava/ui/config/ConfigDescriptions.java modified: src/edu/rice/cs/drjava/ui/config/ConfigFrame.java modified: src/edu/rice/cs/util/ProcessChain.java modified: src/edu/rice/cs/util/ProcessSequence.java modified: src/edu/rice/cs/util/jar/JarCreationTest.java modified: src/edu/rice/cs/util/text/ConsoleDocument.java modified: src/edu/rice/cs/util/text/EditDocumentInterface.java modified: src/edu/rice/cs/util/text/SwingDocument.java modified: ../platform/build.xml modified: ../platform/classes/base-windows/edu/rice/cs/drjava/platform/WindowsPlatform.class modified: ../platform/classes/base-windows/edu/rice/cs/drjava/platform/WindowsRegistry$CreateResult.class modified: ../platform/classes/base-windows/edu/rice/cs/drjava/platform/WindowsRegistry$QueryInfoResult.class modified: ../platform/classes/base-windows/edu/rice/cs/drjava/platform/WindowsRegistry$RegistryAccessDeniedException.class modified: ../platform/classes/base-windows/edu/rice/cs/drjava/platform/WindowsRegistry$RegistryException.class modified: ../platform/classes/base-windows/edu/rice/cs/drjava/platform/WindowsRegistry$RegistryKeyNotFoundException.class modified: ../platform/classes/base-windows/edu/rice/cs/drjava/platform/WindowsRegistry.class modified: ../platform/src-windows/edu/rice/cs/drjava/platform/WindowsPlatform.java modified: ../platform/src-windows/edu/rice/cs/drjava/platform/WindowsRegistry.java modified: ../platform/src-windows/edu/rice/cs/drjava/platform/WindowsRegistryTest.java deleted: ../platform/svn-info.txt
1 parent 3447963 commit 8e3ecab

File tree

67 files changed

+2508
-2375
lines changed

Some content is hidden

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

67 files changed

+2508
-2375
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,9 +1300,9 @@ public static ArrayList<String> evaluate() {
13001300
/** Whether to prompt before quitting DrJava. */
13011301
public static final BooleanOption QUIT_PROMPT = new BooleanOption("quit.prompt", Boolean.TRUE);
13021302

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

13071307
/** Whether to prompt to save before compiling. */
13081308
public static final BooleanOption ALWAYS_SAVE_BEFORE_COMPILE =

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2677,10 +2677,7 @@ protected void removeUpdate(AbstractDocument.DefaultDocumentEvent chng) {
26772677
/** Returns the byte image (as written to a file) of this document. */
26782678
public byte[] getBytes() { return getText().getBytes(); }
26792679

2680-
public void clear() {
2681-
try { remove(0, getLength()); }
2682-
catch(BadLocationException e) { throw new UnexpectedException(e); }
2683-
}
2680+
// public void clear() { ... } // Inherited from SwingDocument
26842681

26852682
/** @return true if pos is the position of one of the chars in an occurrence of "//" or "/*" in text. */
26862683
private static boolean isCommentOpen(String text, int pos) {

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

Lines changed: 55 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,15 @@
9393
import edu.rice.cs.drjava.model.cache.DDReconstructor;
9494
import edu.rice.cs.drjava.model.cache.DocumentCache ;
9595
import edu.rice.cs.drjava.model.compiler.CompilerModel;
96-
import edu.rice.cs.drjava.model.debug.Breakpoint;
97-
import edu.rice.cs.drjava.model.debug.DebugBreakpointData;
98-
import edu.rice.cs.drjava.model.debug.DebugException ;
99-
import edu.rice.cs.drjava.model.debug.DebugWatchData;
100-
import edu.rice.cs.drjava.model.debug.Debugger;
101-
import edu.rice.cs.drjava.model.debug.NoDebuggerAvailable;
96+
97+
/* Debugger deactivated in DrScala */
98+
//import edu.rice.cs.drjava.model.debug.Breakpoint;
99+
//import edu.rice.cs.drjava.model.debug.DebugBreakpointData;
100+
//import edu.rice.cs.drjava.model.debug.DebugException ;
101+
//import edu.rice.cs.drjava.model.debug.DebugWatchData;
102+
//import edu.rice.cs.drjava.model.debug.Debugger;
103+
//import edu.rice.cs.drjava.model.debug.NoDebuggerAvailable;
104+
102105
import edu.rice.cs.drjava.model.javadoc.ScaladocModel;
103106
import edu.rice.cs.drjava.model.definitions.ClassNameNotFoundException;
104107
import edu.rice.cs.drjava.model.definitions.CompoundUndoManager;
@@ -227,11 +230,13 @@ public class AbstractGlobalModel implements SingleDisplayModel, OptionConstants,
227230
/** Notifier list for the global model. */
228231
public GlobalEventNotifier getNotifier() { return _notifier; }
229232

230-
/** Manager for breakpoint regions. */
231-
protected final ConcreteRegionManager<Breakpoint> _breakpointManager;
232233

233-
/** @return manager for breakpoint regions. */
234-
public RegionManager<Breakpoint> getBreakpointManager() { return _breakpointManager; }
234+
/* Debugger deactivated in DrScala */
235+
// /** Manager for breakpoint regions. */
236+
// protected final ConcreteRegionManager<Breakpoint> _breakpointManager;
237+
//
238+
// /** @return manager for breakpoint regions. */
239+
// public RegionManager<Breakpoint> getBreakpointManager() { return _breakpointManager; }
235240

236241
/** Manager for bookmark regions. */
237242
protected final ConcreteRegionManager<MovingDocumentRegion> _bookmarkManager;
@@ -289,7 +294,10 @@ public AbstractGlobalModel() {
289294
_findResultsManagers = new LinkedList<RegionManager<MovingDocumentRegion>>();
290295
_browserHistoryManager = new BrowserHistoryManager();
291296

292-
_breakpointManager = new ConcreteRegionManager<Breakpoint>();
297+
298+
/* Debugger deactivated in DrScala */
299+
// _breakpointManager = new ConcreteRegionManager<Breakpoint>();
300+
293301
/* The following method was included in an anonymous class definition of _breakpointManager, but it
294302
was inacessible because no such method exists in the visible interface of ConcreteRegionManager. */
295303

@@ -1845,7 +1853,10 @@ private void _loadProject(final ProjectFileIR ir) throws IOException {
18451853
// clear browser, breakpoint, and bookmark histories
18461854

18471855
if (! _browserHistoryManager.getRegions().isEmpty()) _browserHistoryManager.clearBrowserRegions();
1848-
if (! _breakpointManager.getDocuments().isEmpty()) _breakpointManager.clearRegions();
1856+
1857+
/* Debugger deactivated in DrScala */
1858+
// if (! _breakpointManager.getDocuments().isEmpty()) _breakpointManager.clearRegions();
1859+
18491860
if (! _bookmarkManager.getDocuments().isEmpty()) _bookmarkManager.clearRegions();
18501861

18511862
final String projfilepath = projectRoot.getCanonicalPath();
@@ -2115,7 +2126,9 @@ public boolean closeFileWithoutPrompt(final OpenDefinitionsDocument doc) {
21152126
}
21162127

21172128
// remove regions for this file
2118-
_breakpointManager.removeRegions(doc);
2129+
2130+
/* Debugger deactivated in DrScala */
2131+
// _breakpointManager.removeRegions(doc);
21192132
_bookmarkManager.removeRegions(doc);
21202133

21212134
// The following copy operation is dictated by the silly "no comodification" constraint on Collection iterators
@@ -2588,16 +2601,17 @@ public Iterable<File> getSourceRootSet() {
25882601
// return doc.getDisplayFullPath();
25892602
// }
25902603

2591-
/** throws UnsupportedOperationException */
2592-
public Debugger getDebugger() {
2593-
// throw new UnsupportedOperationException("AbstractGlobalModel does not support debugging");
2594-
return NoDebuggerAvailable.ONLY;
2595-
}
2596-
2597-
/** throws UnsupportedOperationException */
2598-
public int getDebugPort() throws IOException {
2599-
throw new UnsupportedOperationException("AbstractGlobalModel does not support debugging");
2600-
}
2604+
/* Debugger deactivated in DrScala */
2605+
// /** throws UnsupportedOperationException */
2606+
// public Debugger getDebugger() {
2607+
// // throw new UnsupportedOperationException("AbstractGlobalModel does not support debugging");
2608+
// return NoDebuggerAvailable.ONLY;
2609+
// }
2610+
//
2611+
// /** throws UnsupportedOperationException */
2612+
// public int getDebugPort() throws IOException {
2613+
// throw new UnsupportedOperationException("AbstractGlobalModel does not support debugging");
2614+
// }
26012615

26022616
/** Checks if any open definitions documents have been modified since last being saved.
26032617
* @return whether any documents have been modified
@@ -3295,8 +3309,11 @@ public void saveTo(OutputStream os) throws IOException {
32953309
resetModification();
32963310
if (! oldFile.equals(file)) {
32973311
/* remove regions for this document */
3298-
removeFromDebugger();
3299-
_breakpointManager.removeRegions(this);
3312+
3313+
/* Debugger deactivated in DrScala */
3314+
// removeFromDebugger();
3315+
// _breakpointManager.removeRegions(this);
3316+
33003317
_bookmarkManager.removeRegions(this);
33013318
for (RegionManager<MovingDocumentRegion> rm: getFindResultsManagers()) rm.removeRegions(this);
33023319
clearBrowserRegions();
@@ -3568,7 +3585,7 @@ public boolean revertIfModifiedOnDisk() throws IOException {
35683585

35693586
/** Degenerate version of close; does not remove breakpoints in this document */
35703587
public void close() {
3571-
removeFromDebugger();
3588+
// removeFromDebugger();
35723589
_cacheAdapter.close();
35733590
}
35743591

@@ -3580,8 +3597,11 @@ public void revertFile() throws IOException {
35803597
if (doc.isUntitled()) throw new UnexpectedException("Cannot revert an Untitled file!");
35813598

35823599
//need to remove old, possibly invalid breakpoints
3583-
removeFromDebugger();
3584-
_breakpointManager.removeRegions(this);
3600+
3601+
/* Debugger deactivated in DrScala */
3602+
// removeFromDebugger();
3603+
// _breakpointManager.removeRegions(this);
3604+
35853605
_bookmarkManager.removeRegions(this);
35863606
for (RegionManager<MovingDocumentRegion> rm: getFindResultsManagers()) rm.removeRegions(this);
35873607
doc.clearBrowserRegions();
@@ -3670,9 +3690,10 @@ public void setCurrentLocation(int location) {
36703690
* @return the relative distance forwards to the offset after the matching brace.
36713691
*/
36723692
public int balanceForward() { return getDocument().balanceForward(); }
3673-
3674-
/** @return the breakpoint region manager. */
3675-
public RegionManager<Breakpoint> getBreakpointManager() { return _breakpointManager; }
3693+
3694+
/* Debugger deactivated in DrScala */
3695+
// /** @return the breakpoint region manager. */
3696+
// public RegionManager<Breakpoint> getBreakpointManager() { return _breakpointManager; }
36763697

36773698
/** @return the bookmark region manager. */
36783699
public RegionManager<MovingDocumentRegion> getBookmarkManager() { return _bookmarkManager; }
@@ -3684,8 +3705,9 @@ public void clearBrowserRegions() {
36843705
_browserRegions.clear();
36853706
}
36863707

3687-
/** throws UnsupportedOperationException */
3688-
public void removeFromDebugger() { /* do nothing because it is called in methods in this class */ }
3708+
/* Debugger deactivated in DrScala */
3709+
// /** throws UnsupportedOperationException */
3710+
// public void removeFromDebugger() { /* do nothing because it is called in methods in this class */ }
36893711

36903712
public String toString() { return getFileName(); }
36913713

0 commit comments

Comments
 (0)