();
for (OpenDefinitionsDocument odd: _documents) {
File f = odd.getRawFile();
for (R r: _regions.get(odd)) {
try {
- regions.add(new DocumentFileRegion(f,
- odd.createPosition(r.getStartOffset()),
- odd.createPosition(r.getEndOffset())));
+ regions.add(new DocumentFileRegion(f, odd.createPosition(r.getStartOffset()), odd.createPosition(r.getEndOffset())));
} catch (BadLocationException e) {
/* Should never get here */
throw new UnexpectedException(e);
diff --git a/drjava/src/edu/rice/cs/drjava/model/DJDocument.java b/drjava/src/edu/rice/cs/drjava/model/DJDocument.java
index c0eb41478..7189550ef 100644
--- a/drjava/src/edu/rice/cs/drjava/model/DJDocument.java
+++ b/drjava/src/edu/rice/cs/drjava/model/DJDocument.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import edu.rice.cs.drjava.model.definitions.reducedmodel.*;
@@ -85,10 +77,7 @@ public interface DJDocument extends SwingDocumentInterface {
* @param dist the distance from the current location to the new location.
*/
public void move(int dist);
-
-// /* Returns whether a block indent operation is in progress on this document. */
-// public boolean indentInProgress();
-
+
/** Finds the match for the closing brace immediately to the left, assuming there is such a brace.
* @return the relative distance backwards to the offset before the matching brace.
*/
diff --git a/drjava/src/edu/rice/cs/drjava/model/DJError.java b/drjava/src/edu/rice/cs/drjava/model/DJError.java
index 40c1ff52b..9928457b4 100644
--- a/drjava/src/edu/rice/cs/drjava/model/DJError.java
+++ b/drjava/src/edu/rice/cs/drjava/model/DJError.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.io.File;
diff --git a/drjava/src/edu/rice/cs/drjava/model/DeadClassLoader.java b/drjava/src/edu/rice/cs/drjava/model/DeadClassLoader.java
index e8e44c339..ecf2e72e2 100644
--- a/drjava/src/edu/rice/cs/drjava/model/DeadClassLoader.java
+++ b/drjava/src/edu/rice/cs/drjava/model/DeadClassLoader.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.lang.ClassLoader;
diff --git a/drjava/src/edu/rice/cs/drjava/model/DefaultGlobalModel.java b/drjava/src/edu/rice/cs/drjava/model/DefaultGlobalModel.java
index 9f1d32efa..1c7aaca29 100644
--- a/drjava/src/edu/rice/cs/drjava/model/DefaultGlobalModel.java
+++ b/drjava/src/edu/rice/cs/drjava/model/DefaultGlobalModel.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
@@ -52,9 +44,7 @@
import edu.rice.cs.drjava.config.BooleanOption;
import edu.rice.cs.drjava.model.FileSaveSelector;
import edu.rice.cs.drjava.model.JDKDescriptor;
-import edu.rice.cs.drjava.model.compiler.DummyCompilerListener;
-import edu.rice.cs.drjava.model.compiler.EclipseCompiler;
-import edu.rice.cs.drjava.model.compiler.descriptors.EclipseDescriptor;
+import edu.rice.cs.drjava.model.compiler.*;
import edu.rice.cs.drjava.model.definitions.ClassNameNotFoundException;
import edu.rice.cs.drjava.model.definitions.InvalidPackageException;
import edu.rice.cs.drjava.model.debug.Breakpoint;
@@ -73,10 +63,6 @@
import edu.rice.cs.drjava.model.repl.InteractionsListener;
import edu.rice.cs.drjava.model.repl.InteractionsScriptModel;
import edu.rice.cs.drjava.model.repl.newjvm.MainJVM;
-import edu.rice.cs.drjava.model.compiler.CompilerListener;
-import edu.rice.cs.drjava.model.compiler.CompilerModel;
-import edu.rice.cs.drjava.model.compiler.DefaultCompilerModel;
-import edu.rice.cs.drjava.model.compiler.CompilerInterface;
import edu.rice.cs.drjava.model.junit.DefaultJUnitModel;
import edu.rice.cs.drjava.model.junit.JUnitModel;
@@ -87,10 +73,10 @@
import edu.rice.cs.plt.reflect.ReflectUtil;
import edu.rice.cs.plt.tuple.Pair;
+import edu.rice.cs.util.AbsRelFile;
import edu.rice.cs.util.FileOpenSelector;
import edu.rice.cs.util.FileOps;
import edu.rice.cs.util.NullFile;
-import edu.rice.cs.util.AbsRelFile;
import edu.rice.cs.util.OperationCanceledException;
import edu.rice.cs.util.UnexpectedException;
import edu.rice.cs.util.swing.Utilities;
@@ -102,7 +88,7 @@
* methods, and the GlobalModel responds via the GlobalModelListener interface. This removes the dependency on the
* UI for the logical flow of the program's features. With the current implementation, we can finally test the compile
* functionality of DrJava, along with many other things.
- * @version $Id: DefaultGlobalModel.java 5755 2013-08-30 12:00:36Z rcartwright $
+ * @version $Id$
*/
public class DefaultGlobalModel extends AbstractGlobalModel {
/* FIELDS */
@@ -135,7 +121,7 @@ public void interpreterResetting() { }
public void interpreterReady(File wd) {
File buildDir = _state.getBuildDirectory();
if (buildDir != null) {
- // System.out.println("adding for reset: " + _state.getBuildDirectory().getAbsolutePath());
+ _log.log("adding buildDir for reset: " + _state.getBuildDirectory().getAbsolutePath());
_jvm.addBuildDirectoryClassPath(IOUtil.attemptAbsoluteFile(buildDir));
}
}
@@ -193,18 +179,23 @@ public void activeCompilerChanged() {
/* CONSTRUCTORS */
/** Constructs a new GlobalModel. Creates a new MainJVM and starts its Interpreter JVM. */
public DefaultGlobalModel() {
- Iterable extends JDKToolsLibrary> tools = findLibraries();
+ Iterable extends JDKToolsLibrary> tools = findLibraries(); // findLibraries should be called findTools
List compilers = new LinkedList();
-
- /* Note: the only debugger used in DrJava is JPDADebugger in the DrJava code base. But this debugger relies
- * on machinery provided by tools.jar library included in every Java JDK. If no tools.jar library is found,
- * DrJava creates a degenerate library containing the Eclipse compiler and no debugger or javadoc tool.
+
+ // TODO: should this be done a different way?
+ JavaxToolsCompiler javaxCompiler = new JavaxToolsCompiler();
+ compilers.add(javaxCompiler);
+
+ /* Note: the only debugger used in DrJava is JPDADebugger in the DrJava code base which relies
+ * on machinery provided by the tools.jar library included in every Java JDK (up through JDK 8). A copy of the
+ * tools.jar library from Java 8 Open JDK is included in the drjava.jar file.
*/
_debugger = null;
_javadocModel = null;
+ /* Gather tools: a list compilers, a debugger, and a javadoc tool. */
for (JDKToolsLibrary t : tools) {
// Utilities.show("Found tools.jar library: " + t);
- if (t.compiler().isAvailable() && t.version().supports(JavaVersion.JAVA_6)) compilers.add(t.compiler());
+ if (t.compiler().isAvailable() && t.version().supports(JavaVersion.JAVA_8)) compilers.add(t.compiler());
if (_debugger == null && t.debugger().isAvailable()) { _debugger = t.debugger(); }
if (_javadocModel == null && t.javadoc().isAvailable()) { _javadocModel = t.javadoc(); }
}
@@ -213,7 +204,7 @@ public DefaultGlobalModel() {
File workDir = Utilities.TEST_MODE ? new File(System.getProperty("user.home")) : getWorkingDirectory();
_jvm = new MainJVM(workDir);
-// AbstractMasterJVM._log.log(this + " has created a new MainJVM");
+ _log.log(this + " has created a new MainJVM");
_compilerModel = new DefaultCompilerModel(this, compilers);
_junitModel = new DefaultJUnitModel(_jvm, _compilerModel, this);
_interactionsDocument = new InteractionsDJDocument(_notifier);
@@ -285,7 +276,7 @@ public boolean equals(Object o) {
(_priority == cast._priority) &&
(_first == null ? cast._first == null : _first.equals(cast._first)) &&
(_second == null ? cast._second == null :
- ((_second==JDKDescriptor.NONE) && (cast._second==JDKDescriptor.NONE)));
+ ((_second==JDKDescriptor.JDK_DEFAULT) && (cast._second==JDKDescriptor.JDK_DEFAULT)));
}
}
@@ -304,8 +295,8 @@ public int compareTo(LibraryKey o) {
result = _first.compareTo(o._first);
}
if (result == 0) {
- if (_second == JDKDescriptor.NONE) { // identity
- if (o._second == JDKDescriptor.NONE) { // identity
+ if (_second == JDKDescriptor.JDK_DEFAULT) { // identity
+ if (o._second == JDKDescriptor.JDK_DEFAULT) { // identity
result = 0;
}
else {
@@ -313,7 +304,7 @@ public int compareTo(LibraryKey o) {
result = 1;
}
}
- else if (o._second == JDKDescriptor.NONE) { // identity
+ else if (o._second == JDKDescriptor.JDK_DEFAULT) { // identity
// other is NONE, this is something else; prefer NONE
result = -1;
}
@@ -330,67 +321,59 @@ private LibraryKey getLibraryKey(int priority, JDKToolsLibrary lib) {
return new LibraryKey(priority, coarsenVersion(lib.version()), lib.jdkDescriptor());
}
+ /** Fills the results Map with available tools.jar files located within found JDK distributions. */
private Iterable findLibraries() {
// Order to return: config setting, runtime (if different version), from search (if different versions)
- // We could give priority to libraries that have both available compilers and debuggers, but since this will
- // almost always be true, it seems like more trouble than it is worth
-
// map is sorted by version, lowest-to-highest
Map results = new TreeMap();
File configTools = DrJava.getConfig().getSetting(JAVAC_LOCATION);
if (configTools != FileOps.NULL_FILE) {
// TODO: reference to subclass in next line is a code smell!
- JDKToolsLibrary fromConfig = JarJDKToolsLibrary.makeFromFile(configTools, this, JDKDescriptor.NONE);
+ JDKToolsLibrary fromConfig = JarJDKToolsLibrary.makeFromFile(configTools, this, JDKDescriptor.JDK_DEFAULT);
if (fromConfig.isValid()) {
- JDKToolsLibrary._log.log("From config: " + fromConfig);
+ JDKToolsLibrary.msg("From config: " + fromConfig);
results.put(getLibraryKey(LibraryKey.PRIORITY_CONFIG, fromConfig), fromConfig);
}
- else { JDKToolsLibrary._log.log("From config: invalid " + fromConfig); }
+ else { JDKToolsLibrary.msg("From config: invalid " + fromConfig); }
}
- else { JDKToolsLibrary._log.log("From config: not set"); }
-
+
Iterable fromSearch = JarJDKToolsLibrary.search(this);
for (JDKToolsLibrary t : fromSearch) {
JavaVersion.FullVersion tVersion = t.version();
- JDKToolsLibrary._log.log("From search: " + t);
+ JDKToolsLibrary.msg("From search: " + t);
JavaVersion.FullVersion coarsenedVersion = coarsenVersion(tVersion);
- JDKToolsLibrary._log.log("\tVersion: " + tVersion+" " + tVersion.vendor());
- JDKToolsLibrary._log.log("\tCoarsened Version: " + coarsenedVersion + " " + coarsenedVersion.vendor());
+ JDKToolsLibrary.msg("\tVersion: " + tVersion+" " + tVersion.vendor());
+ JDKToolsLibrary.msg("\tCoarsened Version: " + coarsenedVersion + " " + coarsenedVersion.vendor());
// give a lower priority to built-in compilers
int priority = (edu.rice.cs.util.FileOps.getDrJavaFile().equals(tVersion.location())) ?
LibraryKey.PRIORITY_BUILTIN : LibraryKey.PRIORITY_SEARCH;
if (! results.containsKey(getLibraryKey(priority, t))) {
- JDKToolsLibrary._log.log("\tadded ");
+ JDKToolsLibrary.msg("\tadded ");
results.put(getLibraryKey(priority, t), t);
}
- else { JDKToolsLibrary._log.log("\tduplicate"); }
+ else { JDKToolsLibrary.msg("\tduplicate"); }
}
- // Only create a JDKToolslibrary for the embedded Eclipse compiler if the list of results is otherwise empty.
- // This library does not include javadoc since Eclipse relies on the javadoc tool bundled in a Sun/Oracle/OpenJDK
- // tools.jar.
+ /* Removed when OPEN JDK 8 tools.jar (unjarred) was added to drjava.jar */
+// // Only create a default JDKToolslibrary for the embedded tools.jar file if the list of results is otherwise empty.
+//
+// if (results.isEmpty()) {
+// JDKToolsLibrary defaultLibrary =
+// JarJDKToolsLibrary.makeFromFile(FileOps.getDrJavaFile(), this, JDKDescriptor.JDK_DEFAULT);
+// JDKToolsLibrary.msg("Returning default library: " + defaultLibrary);
+// return IterUtil.singleton(defaultLibrary);
+// }
- if (results.isEmpty()) {
- /* Build a JDKToolsLibrary from this JVM runtime (which has DrJava.jar on the classpath) using the embedded Eclipse compiler, no
- * debugger and no javadoc. The latter two tools are provided by the tools.jar library in a Java JDK. No JDK is available.
- */
- String path = System.getProperty("sun.boot.class.path");
- List bootClassPath = CollectUtil.makeList(IOUtil.parsePath(path));
- JDKDescriptor descriptor = EclipseDescriptor.ONLY;
- CompilerInterface compiler = new EclipseCompiler(JavaVersion.CURRENT_FULL, null /* on runtime class path */, bootClassPath);
- Debugger debugger = NoDebuggerAvailable.ONLY;
- JavadocModel javadoc = new NoJavadocAvailable(this); // TODO: convert this class to a singleton
- JDKToolsLibrary eclipseLibrary = new JDKToolsLibrary(JavaVersion.CURRENT_FULL, descriptor , compiler, debugger, javadoc);
-
- JDKToolsLibrary._log.log("Returning library: " + eclipseLibrary);
- return IterUtil.singleton(eclipseLibrary);
- }
+ // Add embedded tools.jar (unjarred) to libraries
+ JDKToolsLibrary defaultLibrary = JarJDKToolsLibrary.makeFromFile(FileOps.getDrJavaFile(), this, JDKDescriptor.JDK_DEFAULT);
+ results.put(getLibraryKey(LibraryKey.PRIORITY_BUILTIN, defaultLibrary), defaultLibrary);
+ JDKToolsLibrary.msg("Adding default library: " + defaultLibrary);
Iterable libraries = IterUtil.reverse(results.values());
- JDKToolsLibrary._log.log("Returning libraries: " + libraries);
+ JDKToolsLibrary.msg("findLibraries() returning libraries: " + libraries);
return libraries;
}
@@ -458,7 +441,7 @@ public void ensureJVMStarterFinished() {
public void resetInteractions(File wd, boolean forceReset) {
assert _interactionsModel._pane != null;
- debug.logStart();
+ _log.log("DefaultGlobalModel.resetInteractions(" + wd + ", " + forceReset + ") called");
File workDir = _interactionsModel.getWorkingDirectory();
if (wd == null) { wd = workDir; }
forceReset |= isClassPathChanged();
@@ -467,8 +450,9 @@ public void resetInteractions(File wd, boolean forceReset) {
DrJava.getConfig().setSetting(LAST_INTERACTIONS_DIRECTORY, wd);
getDebugger().setAutomaticTraceEnabled(false);
+// log.log("_interactionsModel.resetInteractions(" + wd + ", " + forceReset + ") called");
_interactionsModel.resetInterpreter(wd, forceReset);
- debug.logEnd();
+ _log.log("DefaultGlobalModel.resetInteractions(" + wd + ", " + forceReset + ") complete");
}
/** Interprets the current given text at the prompt in the interactions pane. */
@@ -614,7 +598,7 @@ protected void _runInInteractions(final String command, String qualifiedClassNam
String tempClassName = null;
- if(qualifiedClassName == null)
+ if (qualifiedClassName == null)
tempClassName = getDocument().getQualifiedClassName();
else
tempClassName = qualifiedClassName;
@@ -869,10 +853,13 @@ public void resetInteractionsClassPath() {
// System.err.println("Resetting interactions class path");
Iterable projectExtras = getExtraClassPath();
//System.out.println("Adding project classpath vector to interactions classpath: " + projectExtras);
- if (projectExtras != null) for (File cpE : projectExtras) { _interactionsModel.addProjectClassPath(cpE); }
-
+ if (projectExtras != null) {
+ _log.log("Adding the following files to ProjectClassPath: " + projectExtras);
+ for (File cpE : projectExtras) { _interactionsModel.addProjectClassPath(cpE); }
+ }
Vector cp = DrJava.getConfig().getSetting(EXTRA_CLASSPATH);
if (cp != null) {
+ _log.log("Adding following files to ExtraClassPath: " + cp);
for (File f : cp) { _interactionsModel.addExtraClassPath(f); }
}
@@ -893,7 +880,7 @@ public void resetInteractionsClassPath() {
// add project source root to projectFilesClassPath. All files in project tree have this root.
- _interactionsModel.addProjectFilesClassPath(getProjectRoot()); // is sync advisable here?
+ _interactionsModel.addProjectFilesClassPath(getProjectRoot());
setClassPathChanged(false); // reset classPathChanged state
}
}
diff --git a/drjava/src/edu/rice/cs/drjava/model/DefaultLightWeightParsingControl.java b/drjava/src/edu/rice/cs/drjava/model/DefaultLightWeightParsingControl.java
index beb18e7b5..46ac77f6c 100644
--- a/drjava/src/edu/rice/cs/drjava/model/DefaultLightWeightParsingControl.java
+++ b/drjava/src/edu/rice/cs/drjava/model/DefaultLightWeightParsingControl.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.util.List;
@@ -185,8 +177,7 @@ public void run() {
_lastUpdates.clear();
}
- /** Return the last enclosing class name for the specified document, "" if not inside a class, or
- * null if unknown.
+ /** Return the last enclosing class name for the specified document, "" if not inside a class, ornull if unknown.
* WARNING: In long source files and when contained in anonymous inner classes, this function might take a LONG time.
* @param doc the document for which we want the information
* @return the enclosing class name
diff --git a/drjava/src/edu/rice/cs/drjava/model/DocumentClosedException.java b/drjava/src/edu/rice/cs/drjava/model/DocumentClosedException.java
index bd3fc57ce..b097c8f6d 100644
--- a/drjava/src/edu/rice/cs/drjava/model/DocumentClosedException.java
+++ b/drjava/src/edu/rice/cs/drjava/model/DocumentClosedException.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
/** * Special DocumentClosedException to signify when a document's file no longer
diff --git a/drjava/src/edu/rice/cs/drjava/model/DrJavaFileUtils.java b/drjava/src/edu/rice/cs/drjava/model/DrJavaFileUtils.java
index f6215f509..9b58ede44 100644
--- a/drjava/src/edu/rice/cs/drjava/model/DrJavaFileUtils.java
+++ b/drjava/src/edu/rice/cs/drjava/model/DrJavaFileUtils.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.io.File;
diff --git a/drjava/src/edu/rice/cs/drjava/model/DummyDocumentRegion.java b/drjava/src/edu/rice/cs/drjava/model/DummyDocumentRegion.java
index 172f9482d..93dc43943 100644
--- a/drjava/src/edu/rice/cs/drjava/model/DummyDocumentRegion.java
+++ b/drjava/src/edu/rice/cs/drjava/model/DummyDocumentRegion.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.io.File;
diff --git a/drjava/src/edu/rice/cs/drjava/model/DummyGlobalModel.java b/drjava/src/edu/rice/cs/drjava/model/DummyGlobalModel.java
index da24da059..0a429497f 100644
--- a/drjava/src/edu/rice/cs/drjava/model/DummyGlobalModel.java
+++ b/drjava/src/edu/rice/cs/drjava/model/DummyGlobalModel.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.awt.print.PageFormat;
@@ -470,7 +462,7 @@ public String getMainClass() {
public File getMainClassContainingFile() {
throw new UnsupportedOperationException("Tried to call getMainClass on a Dummy");
}
-
+
public Iterable getExtraClassPath() {
throw new UnsupportedOperationException("Tried to call getExtraClasspath on a Dummy");
}
diff --git a/drjava/src/edu/rice/cs/drjava/model/DummyGlobalModelListener.java b/drjava/src/edu/rice/cs/drjava/model/DummyGlobalModelListener.java
index a5a08aa4c..ece837977 100644
--- a/drjava/src/edu/rice/cs/drjava/model/DummyGlobalModelListener.java
+++ b/drjava/src/edu/rice/cs/drjava/model/DummyGlobalModelListener.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.io.File;
diff --git a/drjava/src/edu/rice/cs/drjava/model/DummyGlobalModelTest.java b/drjava/src/edu/rice/cs/drjava/model/DummyGlobalModelTest.java
index f30d02124..da54af61f 100644
--- a/drjava/src/edu/rice/cs/drjava/model/DummyGlobalModelTest.java
+++ b/drjava/src/edu/rice/cs/drjava/model/DummyGlobalModelTest.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.io.File;
diff --git a/drjava/src/edu/rice/cs/drjava/model/DummyOpenDefDoc.java b/drjava/src/edu/rice/cs/drjava/model/DummyOpenDefDoc.java
index 5a75360f2..6a66a0c57 100644
--- a/drjava/src/edu/rice/cs/drjava/model/DummyOpenDefDoc.java
+++ b/drjava/src/edu/rice/cs/drjava/model/DummyOpenDefDoc.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
- * END_COPYRIGHT_BLOCK*/
-package edu.rice.cs.drjava.model;
+ * END_COPYRIGHT_BLOCK*/package edu.rice.cs.drjava.model;
import java.util.ArrayList;
import java.util.List;
@@ -60,11 +52,7 @@
import edu.rice.cs.util.docnavigation.*;
import edu.rice.cs.util.text.SwingDocument;
-public class DummyOpenDefDoc implements OpenDefinitionsDocument {
-
-// public int id() {
-// throw new UnsupportedOperationException("Dummy method");
-// }
+public class DummyOpenDefDoc implements OpenDefinitionsDocument {
public int compareTo(OpenDefinitionsDocument d) {
throw new UnsupportedOperationException("Dummy method");
@@ -72,21 +60,14 @@ public int compareTo(OpenDefinitionsDocument d) {
public boolean modifiedOnDisk() { throw new UnsupportedOperationException("Dummy method"); }
- public void addBrowserRegion(BrowserDocumentRegion r) {
- throw new UnsupportedOperationException("Dummy method");
- }
+ public void addBrowserRegion(BrowserDocumentRegion r) { throw new UnsupportedOperationException("Dummy method"); }
+
+ public void removeBrowserRegion(BrowserDocumentRegion r) { throw new UnsupportedOperationException("Dummy method"); }
- public void removeBrowserRegion(BrowserDocumentRegion r) {
- throw new UnsupportedOperationException("Dummy method");
- }
public boolean saveFile(FileSaveSelector com) throws IOException {
throw new UnsupportedOperationException("Dummy method");
}
-// public void uncommentLinesInDefinitions(int selStart, int selEnd) {
-// throw new UnsupportedOperationException("Dummy method");
-// }
-
public boolean canAbandonFile() { throw new UnsupportedOperationException("Dummy method"); }
public boolean quitFile() { throw new UnsupportedOperationException("Dummy method"); }
@@ -97,8 +78,6 @@ public boolean saveFile(FileSaveSelector com) throws IOException {
public boolean isModifiedSinceSave() { throw new UnsupportedOperationException("Dummy method"); }
-// public boolean indentInProgress() { throw new UnsupportedOperationException("Dummy method"); }
-
public int balanceForward() { throw new UnsupportedOperationException("Dummy method"); }
public int balanceBackward() { throw new UnsupportedOperationException("Dummy method"); }
@@ -147,18 +126,6 @@ public void print() throws PrinterException, BadLocationException, FileMovedExce
public RegionManager getBreakpointManager() { throw new UnsupportedOperationException("Dummy method"); }
public RegionManager getBookmarkManager() { throw new UnsupportedOperationException("Dummy method"); }
-
-// public List> getFindResultsManagers() {
-// throw new UnsupportedOperationException("Dummy method");
-// }
-
-// public void addFindResultsManager(RegionManager rm) {
-// throw new UnsupportedOperationException("Dummy method");
-// }
-//
-// public void removeFindResultsManager(RegionManager rm) {
-// throw new UnsupportedOperationException("Dummy method");
-// }
public void clearBrowserRegions() { throw new UnsupportedOperationException("Dummy method"); }
diff --git a/drjava/src/edu/rice/cs/drjava/model/DummyOpenDefDocTest.java b/drjava/src/edu/rice/cs/drjava/model/DummyOpenDefDocTest.java
index e9f0de1b8..236bdd4be 100644
--- a/drjava/src/edu/rice/cs/drjava/model/DummyOpenDefDocTest.java
+++ b/drjava/src/edu/rice/cs/drjava/model/DummyOpenDefDocTest.java
@@ -1,65 +1,328 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
- * END_COPYRIGHT_BLOCK*/
-package edu.rice.cs.drjava.model;
+ * END_COPYRIGHT_BLOCK*/package edu.rice.cs.drjava.model;
import edu.rice.cs.drjava.DrJavaTestCase;
-/** * DummyOpenDefDocTest for unit testing DummyOpenDefDoc. Uses
- * JUnit for testing.
- *
- * @author Jason Schiller
- * @version $Id$
- */
+/** DummyOpenDefDocTest for unit testing DummyOpenDefDoc. Uses JUnit for testing.
+ * @author Jason Schiller
+ * @version $Id$
+ */
public class DummyOpenDefDocTest extends DrJavaTestCase {
-
- /** Creates a DummyOpenDefDoc and ensures that it properly
- * throws UnsupportedOperationException by calling isModifiedOnDisk().
- */
- public void testProperExceptionThrowing() {
+ /** Creates a DummyOpenDefDoc and ensures that it properly implements isModifiedOnDisk(). */
+ public void testModifiedOnDisk() {
try {
DummyOpenDefDoc dummy = new DummyOpenDefDoc();
dummy.modifiedOnDisk();
- fail("DummyOpenDefDoc did not throw UnsupportedOperationException");
+ fail("DummyOpenDefDoc.modifiedOnDisk did not throw UnsupportedOperationException");
+ }
+ catch (UnsupportedOperationException e) {
+ //Do nothing, this is expected.
+ }
+ catch(Exception e) {
+ fail("DummyOpenDefDoc.modifiedOnDisk did not throw UnsupportedOperationException, but " + e);
+ }
+ }
+
+ /** Creates a DummyOpenDefDoc and ensures that it properly implements addBrowserRegion(...). */
+ public void testAddBrowserRegion() {
+ try {
+ DummyOpenDefDoc dummy = new DummyOpenDefDoc();
+ dummy.addBrowserRegion(null);
+ fail("DummyOpenDefDoc.addBrowserRegion did not throw UnsupportedOperationException");
+ }
+ catch (UnsupportedOperationException e) {
+ //Do nothing, this is expected.
+ }
+ catch(Exception e) {
+ fail("DummyOpenDefDoc.addBrowserRegion did not throw UnsupportedOperationException, but " + e);
+ }
+ }
+
+ /** Creates a DummyOpenDefDoc and ensures that it properly implements removeBrowserRegion(...). */
+ public void testRemoveBrowserRegion() {
+ try {
+ DummyOpenDefDoc dummy = new DummyOpenDefDoc();
+ dummy.removeBrowserRegion(null);
+ fail("DummyOpenDefDoc.removeBrowserRegion did not throw UnsupportedOperationException");
+ }
+ catch (UnsupportedOperationException e) {
+ //Do nothing, this is expected.
+ }
+ catch(Exception e) {
+ fail("DummyOpenDefDoc.removeBrowserRegion did not throw UnsupportedOperationException, but " + e);
+ }
+ }
+
+ /** Creates a DummyOpenDefDoc and ensures that it properly implements saveFile(...). */
+ public void testSaveFile() {
+ try {
+ DummyOpenDefDoc dummy = new DummyOpenDefDoc();
+ dummy.saveFile(null);
+ fail("DummyOpenDefDoc.saveFile did not throw UnsupportedOperationException");
+ }
+ catch (UnsupportedOperationException e) {
+ //Do nothing, this is expected.
+ }
+ catch(Exception e) {
+ fail("DummyOpenDefDoc.saveFile did not throw UnsupportedOperationException, but " + e);
+ }
+ }
+
+ /** Creates a DummyOpenDefDoc and ensures that it properly implements canAbandonFile(...). */
+ public void testCanAbandonFile() {
+ try {
+ DummyOpenDefDoc dummy = new DummyOpenDefDoc();
+ dummy.canAbandonFile();
+ fail("DummyOpenDefDoc.canAbandonFile did not throw UnsupportedOperationException");
+ }
+ catch (UnsupportedOperationException e) {
+ //Do nothing, this is expected.
+ }
+ catch(Exception e) {
+ fail("DummyOpenDefDoc.canAbandonFile did not throw UnsupportedOperationException, but " + e);
+ }
+ }
+
+ /** Creates a DummyOpenDefDoc and ensures that it properly implements quitFile(...). */
+ public void testQuitFile() {
+ try {
+ DummyOpenDefDoc dummy = new DummyOpenDefDoc();
+ dummy.quitFile();
+ fail("DummyOpenDefDoc.quitFile did not throw UnsupportedOperationException");
+ }
+ catch (UnsupportedOperationException e) {
+ //Do nothing, this is expected.
+ }
+ catch(Exception e) {
+ fail("DummyOpenDefDoc.quitFile did not throw UnsupportedOperationException, but " + e);
+ }
+ }
+
+ /** Creates a DummyOpenDefDoc and ensures that it properly implements setCurrentLocation(...). */
+ public void testSetCurrentLocation() {
+ try {
+ DummyOpenDefDoc dummy = new DummyOpenDefDoc();
+ dummy.setCurrentLocation(0);
+ fail("DummyOpenDefDoc.setCurrentLocation did not throw UnsupportedOperationException");
+ }
+ catch (UnsupportedOperationException e) {
+ //Do nothing, this is expected.
+ }
+ catch(Exception e) {
+ fail("DummyOpenDefDoc.setCurrentLocation did not throw UnsupportedOperationException, but " + e);
+ }
+ }
+
+ /** Creates a DummyOpenDefDoc and ensures that it properly implements getDocument(...). */
+ public void testGetDocument() {
+ try {
+ DummyOpenDefDoc dummy = new DummyOpenDefDoc();
+ dummy.getDocument();
+ fail("DummyOpenDefDoc.getDocument did not throw UnsupportedOperationException");
+ }
+ catch (UnsupportedOperationException e) {
+ //Do nothing, this is expected.
+ }
+ catch(Exception e) {
+ fail("DummyOpenDefDoc.getDocument did not throw UnsupportedOperationException, but " + e);
+ }
+ }
+
+ /** Creates a DummyOpenDefDoc and ensures that it properly implements isModifiedSinceSave(...). */
+ public void testIsModifiedSinceSave() {
+ try {
+ DummyOpenDefDoc dummy = new DummyOpenDefDoc();
+ dummy.isModifiedSinceSave();
+ fail("DummyOpenDefDoc.isModifiedSinceSave did not throw UnsupportedOperationException");
+ }
+ catch (UnsupportedOperationException e) {
+ //Do nothing, this is expected.
+ }
+ catch(Exception e) {
+ fail("DummyOpenDefDoc.isModifiedSinceSave did not throw UnsupportedOperationException, but " + e);
+ }
+ }
+
+ /** Creates a DummyOpenDefDoc and ensures that it properly implements balanceForward(...). */
+ public void testBalanceForward() {
+ try {
+ DummyOpenDefDoc dummy = new DummyOpenDefDoc();
+ dummy.balanceForward();
+ fail("DummyOpenDefDoc.balanceForward did not throw UnsupportedOperationException");
+ }
+ catch (UnsupportedOperationException e) {
+ //Do nothing, this is expected.
+ }
+ catch(Exception e) {
+ fail("DummyOpenDefDoc.balanceForward did not throw UnsupportedOperationException, but " + e);
+ }
+ }
+
+ /** Creates a DummyOpenDefDoc and ensures that it properly implements balanceBackward(...). */
+ public void testBalanceBackward() {
+ try {
+ DummyOpenDefDoc dummy = new DummyOpenDefDoc();
+ dummy.balanceBackward();
+ fail("DummyOpenDefDoc.balanceBackward did not throw UnsupportedOperationException");
+ }
+ catch (UnsupportedOperationException e) {
+ //Do nothing, this is expected.
+ }
+ catch(Exception e) {
+ fail("DummyOpenDefDoc.balanceBackward did not throw UnsupportedOperationException, but " + e);
+ }
+ }
+
+ /** Creates a DummyOpenDefDoc and ensures that it properly implements getFile(...). */
+ public void testGetFile() {
+ try {
+ DummyOpenDefDoc dummy = new DummyOpenDefDoc();
+ dummy.getFile();
+ fail("DummyOpenDefDoc.getFile did not throw UnsupportedOperationException");
+ }
+ catch (UnsupportedOperationException e) {
+ //Do nothing, this is expected.
+ }
+ catch(Exception e) {
+ fail("DummyOpenDefDoc.getFile did not throw UnsupportedOperationException, but " + e);
+ }
+ }
+
+ /** Creates a DummyOpenDefDoc and ensures that getRawFile(...) returns null. */
+ public void testGetRawFile() {
+ DummyOpenDefDoc dummy = new DummyOpenDefDoc();
+ assertEquals("getRawFile() does not return null", null, dummy.getRawFile());
+ }
+
+ /** Creates a DummyOpenDefDoc and ensures that it properly implements getParentDirectory(...). */
+ public void testParentDirectory() {
+ try {
+ DummyOpenDefDoc dummy = new DummyOpenDefDoc();
+ dummy.getParentDirectory();
+ fail("DummyOpenDefDoc.getParentDirectory did not throw UnsupportedOperationException");
+ }
+ catch (UnsupportedOperationException e) {
+ //Do nothing, this is expected.
+ }
+ catch(Exception e) {
+ fail("DummyOpenDefDoc.getParentDirectory did not throw UnsupportedOperationException, but " + e);
+ }
+ }
+
+ /** Creates a DummyOpenDefDoc and ensures that it properly implements fileExists(...). */
+ public void testFileExists() {
+ try {
+ DummyOpenDefDoc dummy = new DummyOpenDefDoc();
+ dummy.fileExists();
+ fail("DummyOpenDefDoc.fileExists did not throw UnsupportedOperationException");
+ }
+ catch (UnsupportedOperationException e) {
+ //Do nothing, this is expected.
+ }
+ catch(Exception e) {
+ fail("DummyOpenDefDoc.fileExists did not throw UnsupportedOperationException, but " + e);
+ }
+ }
+
+ /** Creates a DummyOpenDefDoc and ensures that it properly implements verifyExists(...). */
+ public void testVerifyExists() {
+ try {
+ DummyOpenDefDoc dummy = new DummyOpenDefDoc();
+ dummy.verifyExists();
+ fail("DummyOpenDefDoc.verifyExists did not throw UnsupportedOperationException");
+ }
+ catch (UnsupportedOperationException e) {
+ //Do nothing, this is expected.
+ }
+ catch(Exception e) {
+ fail("DummyOpenDefDoc.verifyExists did not throw UnsupportedOperationException, but " + e);
+ }
+ }
+
+ /** Creates a DummyOpenDefDoc and ensures that it properly implements cleanUpPrintJob(...). */
+ public void testCleanUpPrintJob() {
+ try {
+ DummyOpenDefDoc dummy = new DummyOpenDefDoc();
+ dummy.cleanUpPrintJob();
+ fail("DummyOpenDefDoc.cleanUpPrintJob did not throw UnsupportedOperationException");
+ }
+ catch (UnsupportedOperationException e) {
+ //Do nothing, this is expected.
+ }
+ catch(Exception e) {
+ fail("DummyOpenDefDoc.cleanUpPrintJob did not throw UnsupportedOperationException, but " + e);
+ }
+ }
+
+ /** Creates a DummyOpenDefDoc and ensures that it properly implements getFirstTopLevelClassName(...). */
+ public void testGetFirstTopLevelClassName() {
+ try {
+ DummyOpenDefDoc dummy = new DummyOpenDefDoc();
+ dummy.getFirstTopLevelClassName();
+ fail("DummyOpenDefDoc.getFirstTopLevelClassName did not throw UnsupportedOperationException");
+ }
+ catch (UnsupportedOperationException e) {
+ //Do nothing, this is expected.
+ }
+ catch(Exception e) {
+ fail("DummyOpenDefDoc.getFirstTopLevelClassName did not throw UnsupportedOperationException, but " + e);
+ }
+ }
+
+ /** Creates a DummyOpenDefDoc and ensures that it properly implements startCompile(...). */
+ public void testStartCompile() {
+ try {
+ DummyOpenDefDoc dummy = new DummyOpenDefDoc();
+ dummy.startCompile();
+ fail("DummyOpenDefDoc.startCompile did not throw UnsupportedOperationException");
+ }
+ catch (UnsupportedOperationException e) {
+ //Do nothing, this is expected.
+ }
+ catch(Exception e) {
+ fail("DummyOpenDefDoc.startCompile did not throw UnsupportedOperationException, but " + e);
+ }
+ }
+
+ /** Creates a DummyOpenDefDoc and ensures that it properly implements runMain(...). */
+ public void testRunMain() {
+ try {
+ DummyOpenDefDoc dummy = new DummyOpenDefDoc();
+ dummy.runMain("");
+ fail("DummyOpenDefDoc.runMain did not throw UnsupportedOperationException");
}
catch (UnsupportedOperationException e) {
//Do nothing, this is expected.
}
catch(Exception e) {
- fail("DummyOpenDefDoc did not throw UnsupportedOperationException, but " + e);
+ fail("DummyOpenDefDoc.runMain did not throw UnsupportedOperationException, but " + e);
}
}
}
diff --git a/drjava/src/edu/rice/cs/drjava/model/EventNotifier.java b/drjava/src/edu/rice/cs/drjava/model/EventNotifier.java
index d1bcf8921..1d89f12c3 100644
--- a/drjava/src/edu/rice/cs/drjava/model/EventNotifier.java
+++ b/drjava/src/edu/rice/cs/drjava/model/EventNotifier.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.util.LinkedList;
diff --git a/drjava/src/edu/rice/cs/drjava/model/EventNotifierTest.java b/drjava/src/edu/rice/cs/drjava/model/EventNotifierTest.java
index 406555310..ff4c41e0b 100644
--- a/drjava/src/edu/rice/cs/drjava/model/EventNotifierTest.java
+++ b/drjava/src/edu/rice/cs/drjava/model/EventNotifierTest.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import edu.rice.cs.drjava.DrJavaTestCase;
diff --git a/drjava/src/edu/rice/cs/drjava/model/FileGroupingState.java b/drjava/src/edu/rice/cs/drjava/model/FileGroupingState.java
index 57f8e4c75..63a48dd23 100644
--- a/drjava/src/edu/rice/cs/drjava/model/FileGroupingState.java
+++ b/drjava/src/edu/rice/cs/drjava/model/FileGroupingState.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.io.File;
diff --git a/drjava/src/edu/rice/cs/drjava/model/FileMovedException.java b/drjava/src/edu/rice/cs/drjava/model/FileMovedException.java
index 21eaeaf5f..4efa1e7c7 100644
--- a/drjava/src/edu/rice/cs/drjava/model/FileMovedException.java
+++ b/drjava/src/edu/rice/cs/drjava/model/FileMovedException.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.io.*;
diff --git a/drjava/src/edu/rice/cs/drjava/model/FileSaveSelector.java b/drjava/src/edu/rice/cs/drjava/model/FileSaveSelector.java
index d214943d2..4f18f3702 100644
--- a/drjava/src/edu/rice/cs/drjava/model/FileSaveSelector.java
+++ b/drjava/src/edu/rice/cs/drjava/model/FileSaveSelector.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.io.File;
diff --git a/drjava/src/edu/rice/cs/drjava/model/Finalizable.java b/drjava/src/edu/rice/cs/drjava/model/Finalizable.java
index 892b625e9..3180fd296 100644
--- a/drjava/src/edu/rice/cs/drjava/model/Finalizable.java
+++ b/drjava/src/edu/rice/cs/drjava/model/Finalizable.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.util.List;
diff --git a/drjava/src/edu/rice/cs/drjava/model/FinalizationEvent.java b/drjava/src/edu/rice/cs/drjava/model/FinalizationEvent.java
index be1f74f32..a661ad4b2 100644
--- a/drjava/src/edu/rice/cs/drjava/model/FinalizationEvent.java
+++ b/drjava/src/edu/rice/cs/drjava/model/FinalizationEvent.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
/** * Objects of this type are given to those
diff --git a/drjava/src/edu/rice/cs/drjava/model/FinalizationListener.java b/drjava/src/edu/rice/cs/drjava/model/FinalizationListener.java
index 374a59494..141a49c50 100644
--- a/drjava/src/edu/rice/cs/drjava/model/FinalizationListener.java
+++ b/drjava/src/edu/rice/cs/drjava/model/FinalizationListener.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
/** * A listener that may be added to classes that
diff --git a/drjava/src/edu/rice/cs/drjava/model/FindReplaceMachine.java b/drjava/src/edu/rice/cs/drjava/model/FindReplaceMachine.java
index cd0d0ec6e..00b7a75ba 100644
--- a/drjava/src/edu/rice/cs/drjava/model/FindReplaceMachine.java
+++ b/drjava/src/edu/rice/cs/drjava/model/FindReplaceMachine.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import edu.rice.cs.plt.lambda.Runnable1;
@@ -44,48 +36,45 @@
import edu.rice.cs.util.StringOps;
import edu.rice.cs.drjava.config.OptionConstants;
+import java.awt.Component;
import java.awt.EventQueue;
import javax.swing.text.BadLocationException;
-import java.awt.Component;
+import javax.swing.text.BadLocationException;;
-/** Implementation of logic of find/replace over a document.
+/** Implementation of logic of the find/replace command over a given document or all open documents.
* @version $Id$
*/
public class FindReplaceMachine {
- static private Log _log = new Log("FindReplace.txt", false);
+ static private final Log _log = new Log("FindReplace.txt", false);
/* Visible machine state; manipulated directly or indirectly by FindReplacePanel. */
- private volatile OpenDefinitionsDocument _doc; // Current search document
- private volatile OpenDefinitionsDocument _firstDoc; // First document where searching started (when searching all documents)
-// private Position _current; // Position of the cursor in _doc when machine is stopped
- private volatile int _current; // Position of the cursor in _doc when machine is stopped
- private MovingDocumentRegion _selectionRegion; // selected text region
-// private Position _start; // Position in _doc from which searching started or will start.
- private volatile String _findWord; // Word to find. */
- private volatile String _replaceWord; // Word to replace _findword.
+ private volatile OpenDefinitionsDocument _doc; // Current search document
+ private volatile OpenDefinitionsDocument _firstDoc; // First document where searching started (in all docs modes)
+ private volatile int _current; // Position of the cursor in _doc when machine is stopped
+ private volatile MovingDocumentRegion _selectionRegion; // selected text region
+ private volatile String _findWord; // Word to find. */
+ private volatile String _replaceWord; // Word to replace _findword.
private volatile boolean _matchCase;
private volatile boolean _matchWholeWord;
- private volatile boolean _searchAllDocuments; // Whether to search all documents (or just the current document)
- private volatile boolean _searchSelectionOnly; // Whether to search only the selection
- private volatile boolean _isForward; // Whether search direction is forward (false means backward)
- private volatile boolean _ignoreCommentsAndStrings; // Whether to ignore matches in comments and strings
- private volatile boolean _ignoreTestCases; // Whether to ignore documents that end in *Test.java
- private volatile String _lastFindWord; // Last word found; set to null by FindReplacePanel if caret is updated
- private volatile boolean _skipText; // Whether to skip over the current match if direction is reversed
- private volatile DocumentIterator _docIterator; // An iterator of open documents; _doc is current
+ private volatile boolean _searchAllDocuments; // Whether to search all documents (or just current document)
+ private volatile boolean _searchSelectionOnly; // Whether to search only the selection within current document
+ private volatile boolean _isForward; // Whether search direction is forward (false means backward)
+ private volatile boolean _ignoreCommentsAndStrings; // Whether to ignore matches in comments and strings
+ private volatile boolean _ignoreTestCases; // Whether to ignore documents that end in *Test.java
+ private volatile String _lastFindWord; // Last word found; set to null by FindReplacePanel if caret updated
+ private volatile boolean _skipText; // Whether to skip over the current match if direction reversed
+ private volatile DocumentIterator _docIterator; // An iterator of open documents; _doc is current
private volatile SingleDisplayModel _model;
- private volatile Component _frame;
-
- /** Standard Constructor.
- * Creates new machine to perform find/replace operations on a particular
- * document starting from a given position.
- * @param model the model
- * @param docIterator an object that allows navigation through open Swing
- * documents (it is DefaultGlobalModel)
- * @param frame the frame
- */
+ private volatile Component _frame;
+
+ /** Standard Constructor. Creates new machine to perform find/replace operations on documents. Only called ONCE in
+ * initializing FindReplacePanel. Search/replace commands reuse this machine for each subsequent search/replace
+ * @param model the model
+ * @param docIterator an object that allows navigation through open Swing documents (it is DefaultGlobalModel)
+ * @param frame the frame
+ */
public FindReplaceMachine(SingleDisplayModel model, DocumentIterator docIterator, Component frame) {
_skipText = false;
// _checkAllDocsWrapped = false;
@@ -94,6 +83,8 @@ public FindReplaceMachine(SingleDisplayModel model, DocumentIterator docIterator
_frame = frame;
_docIterator = docIterator;
_current = -1;
+ /* Using setters for internal initilization is VERY BAD taste; it obscures the initial state. What
+ * is the invariant for instances of this class? Who knows? */
setFindAnyOccurrence();
setFindWord("");
setReplaceWord("");
@@ -112,7 +103,7 @@ public void cleanUp() {
}
/** Called when the current position is updated in the document implying _skipText should not be set
- * if the user toggles _searchBackwards
+ * if the user toggles _isForward (setSearchBackwards)
*/
public void positionChanged() {
_lastFindWord = null;
@@ -127,7 +118,7 @@ public void setSearchBackwards(boolean searchBackwards) {
if (_isForward == searchBackwards) {
// If we switch from searching forward to searching backwards or vice versa, isOnMatch is true, and _findword is
// the same as the _lastFindWord, we know the user just found _findWord, so skip over this match.
- if (onMatch() && _findWord.equals(_lastFindWord)) _skipText = true;
+ if (onFindWordMatch() && _findWord.equals(_lastFindWord)) _skipText = true;
else _skipText = false;
}
_isForward = ! searchBackwards;
@@ -163,9 +154,7 @@ public void setIgnoreTestCases(boolean ignoreTestCases) {
public void setPosition(int pos) { _current = pos; }
/** @return the character offset to which this machine is currently pointing. */
- public int getCurrentOffset() { //return _current.getOffset();
- return _current;
- }
+ public int getCurrentOffset() { return _current; }
public String getFindWord() { return _findWord; }
@@ -194,10 +183,11 @@ public void setReplaceWord(String word) {
}
/** Determine if the machine is on an instance of the find word. Only executes in event thread except for
- * initialization.
+ * initialization and testing. Called by isMatch() in FindReplacePanel. Assumes search fields (_current, etc.)
+ * have been updated.
* @return true if the current position is right after an instance of the find word.
*/
- public boolean onMatch() {
+ public boolean onFindWordMatch() {
// Should be fixed now because of invokeAndWait in MainFrame constructor
// (was: this invariant doesn't hold. See DrJava bug #2321815)
@@ -206,7 +196,7 @@ public boolean onMatch() {
String findWord = _findWord;
int wordLen, off;
- if(_current == -1) return false;
+ if (_current == -1) return false;
wordLen = findWord.length();
if (_isForward) off = getCurrentOffset() - wordLen;
@@ -228,15 +218,14 @@ public boolean onMatch() {
return matchSpace.equals(findWord);
}
- /** If we're on a match for the find word, replace it with the replace word.
- * Only executes in event thread.
- * @return true if we're on a match; false otherwise
- */
+ /** If we're on a match for the find word, replace it with the replace word. Only executes in event thread.
+ * @return true if we're on a match; false otherwise
+ */
public boolean replaceCurrent() {
- assert EventQueue.isDispatchThread();
+ assert EventQueue.isDispatchThread() || Utilities.TEST_MODE;
- if (! onMatch()) return false;
+ if (! onFindWordMatch()) return false;
try {
// boolean atStart = false;
int offset = getCurrentOffset();
@@ -265,118 +254,131 @@ public boolean replaceCurrent() {
*/
public void setSelection(MovingDocumentRegion s) { _selectionRegion = s; }
- /** Replaces all occurrences of the find word with the replace word in the current document of in all documents
- * depending the value of the machine register _searchAllDocuments.
- * @return the number of replacements
+// /** Alternative interface for the private method replaceAll(...)
+// * @return the number of replacements */
+// public int replaceAll() { return replaceAll(_searchAllDocuments, _searchSelectionOnly); }
+//
+// /** Replaces all occurences of the find word with the replace word
+// * (i) in the current document or
+// * (ii) in all documents or
+// * (iii) in the current selection of the current document
+// * (depending the value of the flags searchAll and searchSelectionOnly)
+// * @return the number of replacements
+// * private method that is ONLY called in public method replaceAll()
+// */
+// private int replaceAll(boolean searchAll, boolean searchSelectionOnly) {
+//
+// assert EventQueue.isDispatchThread() || Utilities.TEST_MODE;
+//
+// if (searchAll) {
+// int count = 0; // the number of replacements done so far
+// int n = _docIterator.getDocumentCount();
+// for (int i = 0; i < n; i++) {
+// // replace all in the rest of the documents
+// count += _replaceAllInCurrentDoc(false);
+// _doc = _docIterator.getNextDocument(_doc, _frame);
+//
+// if (_doc == null) break;
+// }
+//
+// // update display (adding "*") in navigatgorPane
+// _model.getDocumentNavigator().repaint();
+//
+// return count;
+// }
+// else if (searchSelectionOnly) {
+// int count = 0;
+// count += _replaceAllInCurrentDoc(searchSelectionOnly);
+// return count;
+// }
+// else
+// return _replaceAllInCurrentDoc(false);
+// }
+//
+// /** Replaces all occurences of _findWord with _replaceWord in _doc. Never searches in other documents. Starts at
+// * the beginning or the end of the document (depending on find direction). This convention ensures that matches
+// * created by string replacement will not be replaced as in the following example:
+// * findString: "hello"
+// * replaceString: "e"
+// * document text: "hhellollo"
+// * Depending on the cursor position, clicking replace all could either make the document text read "hello"
+// * (which is correct) or "e". This is because of the behavior of findNext(), and it would be incorrect
+// * to change that behavior. Only executes in event thread.
+// * @param searchSelectionOnly true if we should only search in the current selection of documents
+// * @return the number of replacements
+// */
+// private int _replaceAllInCurrentDoc(boolean searchSelectionOnly) {
+//
+// assert EventQueue.isDispatchThread() || Utilities.TEST_MODE;
+//
+// if (! searchSelectionOnly) {
+// _selectionRegion = new MovingDocumentRegion(_doc, 0, _doc.getLength(),
+// _doc._getLineStartPos(0),
+// _doc._getLineEndPos(_doc.getLength()));
+// }
+// /* _selectionRegion is not degenerate unless document is degenerate; may be entire document. */
+// if (_isForward) setPosition(_selectionRegion.getStartOffset());
+// else setPosition(_selectionRegion.getEndOffset());
+//
+// int count = 0;
+// FindResult fr = findNext(false); // find next match in current doc
+// // Utilities.show(fr + " returned by call on findNext()");
+//
+// while (!fr.isWrapped() && fr.getFoundOffset() <= _selectionRegion.getEndOffset()) {
+// replaceCurrent();
+// count++;
+// // Utilities.show("Found " + count + " occurrences. Calling findNext() inside loop");
+// fr = findNext(false); // find next match in current doc
+// // Utilities.show("Call on findNext() returned " + fr.toString() + "in doc '" +
+// // _doc.getText().substring(0,fr.getFoundOffset()) + "[|]" + _doc.getText().substring(fr.getFoundOffset()) + "'");
+// }
+// return count;
+// }
+
+ /** Replaces all occurrences of the find word with the replace word in the specified region while performing the
+ * which occurs within the current document. On each match, the findAction command is executed, assuming that
+ * findAction does not modify the document it processes. Saves value of _searchAllDocuments and _searchSelectionOnly
+ * and restores them, an ugly hack dictated by embedding this information in the FindReplaceMachine. During this
+ * particular search action, _searchAllDocuments is false since it is confined to a region within the current document.
+ * Only executes in event thread.
+ * @param findAction action to perform on the occurrences; input is the FindResult, output is ignored
+ * @param region the selection region
+ * @return the number of processed occurrences
*/
- public int replaceAll() { return replaceAll(_searchAllDocuments, _searchSelectionOnly); }
-
- /** Replaces all occurences of the find word with the replace word in the
- * current document of in all documents or in the current selection of the
- * current document depending the value of the flag searchAll
- * @param searchAll true if we should search for occurrences in all documents
- * @param searchSelectionOnly true if we should only search in the current selection of documents
- * @return the number of replacements
- */
- private int replaceAll(boolean searchAll, boolean searchSelectionOnly) {
- if (searchAll) {
- int count = 0; // the number of replacements done so far
- int n = _docIterator.getDocumentCount();
- for (int i = 0; i < n; i++) {
- // replace all in the rest of the documents
- count += _replaceAllInCurrentDoc(false);
- _doc = _docIterator.getNextDocument(_doc, _frame);
-
- if (_doc==null) break;
- }
-
- // update display (adding "*") in navigatgorPane
- _model.getDocumentNavigator().repaint();
-
- return count;
- }
- else if(searchSelectionOnly) {
- int count = 0;
- count += _replaceAllInCurrentDoc(searchSelectionOnly);
- return count;
- }
- else
- return _replaceAllInCurrentDoc(false);
- }
-
- /** Replaces all occurences of _findWord with _replaceWord in _doc. Never searches in other documents. Starts at
- * the beginning or the end of the document (depending on find direction). This convention ensures that matches
- * created by string replacement will not be replaced as in the following example:
- * findString: "hello"
- * replaceString: "e"
- * document text: "hhellollo"
- * Depending on the cursor position, clicking replace all could either make the document text read "hello"
- * (which is correct) or "e". This is because of the behavior of findNext(), and it would be incorrect
- * to change that behavior. Only executes in event thread.
- * @param searchSelectionOnly true if we should only search in the current selection of documents
- * @return the number of replacements
- */
- private int _replaceAllInCurrentDoc(boolean searchSelectionOnly) {
-
- assert EventQueue.isDispatchThread();
-
- if (!searchSelectionOnly) {
- _selectionRegion = new MovingDocumentRegion(_doc, 0, _doc.getLength(),
- _doc._getLineStartPos(0),
- _doc._getLineEndPos(_doc.getLength()));
- }
- if (_isForward) setPosition(_selectionRegion.getStartOffset());
- else setPosition(_selectionRegion.getEndOffset());
+ public int processAll(Runnable1 findAction, MovingDocumentRegion region) {
- int count = 0;
- FindResult fr = findNext(false); // find next match in current doc
- // Utilities.show(fr + " returned by call on findNext()");
+ assert EventQueue.isDispatchThread() || Utilities.TEST_MODE;
- while (!fr.getWrapped() && fr.getFoundOffset() <= _selectionRegion.getEndOffset()) {
- replaceCurrent();
- count++;
- // Utilities.show("Found " + count + " occurrences. Calling findNext() inside loop");
- fr = findNext(false); // find next match in current doc
- // Utilities.show("Call on findNext() returned " + fr.toString() + "in doc '" +
- // _doc.getText().substring(0,fr.getFoundOffset()) + "[|]" + _doc.getText().substring(fr.getFoundOffset()) + "'");
- }
- return count;
- }
-
- /** Processes all occurences of the find word with the replace word in the
- * current document or in all documents depending the value of the machine
- * register _searchAllDocuments.
- * @param findAction action to perform on the occurrences; input is the FindResult, output is ignored
- * @param region the selection region
- * @return the number of processed occurrences
- */
- public int processAll(Runnable1 findAction, MovingDocumentRegion region) {
_selectionRegion = region;
- return processAll(findAction, _searchAllDocuments, _searchSelectionOnly);
+
+ int count = processAll(findAction);
+
+ return count;
}
- /** Processes all occurences of the find word with the replace word in the
- * current document or in all documents depending the value of the flag
- * searchAll. Assumes that findAction does not modify the document it
- * processes. Only executes in event thread.
- * @param findAction action to perform on the occurrences; input is the FindResult, output is ignored
- * @param searchAll true if we should search for occurrences in all documents
- * @param searchSelectionOnly true if we should only search in the current selection of documents
- * @return the number of replacements
- */
- private int processAll(Runnable1 findAction, boolean searchAll, boolean searchSelectionOnly) {
-
- assert EventQueue.isDispatchThread();
-
- if (searchAll) {
- int count = 0; // the number of replacements done so far
- int n = _docIterator.getDocumentCount();
+ /** Processes all occurences of the find word with the replace word in the current document or in all documents
+ * depending the value of fields _searchAllDocuments, _searchSelectionOnly, _selectionRegion. Assumes that
+ * findAction does not modify the document it processes. Only executes in event thread.
+ * Defined with public visibility for testing purposes only; called locally and from FindReplaceMachineTest.
+ * Modifies _searchSelectionOnly if it is inconsistent with _searchAllDocuments
+ * @param findAction action to perform on the occurrences; input is the FindResult, output is ignored.
+ * @return the number of replacements
+ */
+ public int processAll(Runnable1 findAction) {
+
+ assert EventQueue.isDispatchThread() || Utilities.TEST_MODE;
+
+ if (_searchAllDocuments) {
+ int count = 0; // the number of replacements done so far
+ _searchSelectionOnly = false; // force _searchSelectionOnly to be false
+ final int n = _docIterator.getDocumentCount();
for (int i = 0; i < n; i++) {
// process all in the rest of the documents
- count += _processAllInCurrentDoc(findAction, false);
+
+ count += _processAllInCurrentDoc(findAction);
_doc = _docIterator.getNextDocument(_doc, _frame);
- if(_doc==null) break;
+ if (_doc == null) break;
}
// update display (perhaps adding "*") in navigatgorPane
@@ -384,28 +386,32 @@ private int processAll(Runnable1 findAction, boolean searchAll, bool
return count;
}
- else if(searchSelectionOnly) {
+ else if (_searchSelectionOnly) {
int count = 0;
- count += _processAllInCurrentDoc(findAction, searchSelectionOnly);
+ count += _processAllInCurrentDoc(findAction);
return count;
}
- else return _processAllInCurrentDoc(findAction, false);
+ else /* search entire current document */
+ return _processAllInCurrentDoc(findAction);
}
- /** Processes all occurences of _findWord in _doc. Never processes other documents. Starts at the beginning or the
- * end of the document (depending on find direction). This convention ensures that matches created by string
- * replacement will not be replaced as in the following example:
- * findString: "hello"
- * replaceString: "e"
- * document text: "hhellollo"
- * Assumes this has mutually exclusive access to _doc (e.g., by hourglassOn) and findAction does not modify _doc.
- * Only executes in event thread.
- * @param findAction action to perform on the occurrences; input is the FindResult, output is ignored
- * @param searchSelectionOnly true if we should only search in the current selection of documents
- * @return the number of replacements
- */
- private int _processAllInCurrentDoc(Runnable1 findAction, boolean searchSelectionOnly) {
- if(!searchSelectionOnly) {
+ /** Processes all occurences of _findWord in _doc depending the values of fields _searchSelectionOnly,
+ * _selectionRegion and _isForward. Ignores value of _searchAllDocuments. Processes selected region (which may be
+ * the whole document) sequentially depending on find direction. This convention ensures that matches created by
+ * string replacement will not be replaced as in the following example:
+ * findString: "e"
+ * replaceString: "hello"
+ * document text: "hhellollo"
+ * Only executes in event thread. Assumes (i) this has exclusive access to _doc (since it only runs in event thread)
+ * and (ii) findAction does not modify _doc (What about replacement?)
+ * @param findAction action to perform on the occurrences; input is the FindResult, output is ignored
+ * @return the number of replacements
+ */
+ private int _processAllInCurrentDoc(Runnable1 findAction) {
+
+ assert EventQueue.isDispatchThread() || Utilities.TEST_MODE;
+
+ if (! _searchSelectionOnly) {
_selectionRegion = new MovingDocumentRegion(_doc, 0, _doc.getLength(), _doc._getLineStartPos(0),
_doc._getLineEndPos(_doc.getLength()));
}
@@ -415,7 +421,7 @@ private int _processAllInCurrentDoc(Runnable1 findAction, boolean se
int count = 0;
FindResult fr = findNext(false); // find next match in current doc
- while (! fr.getWrapped() && fr.getFoundOffset() <= _selectionRegion.getEndOffset()) {
+ while (!fr.isWrapped() && fr.getFoundOffset() <= _selectionRegion.getEndOffset()) {
findAction.run(fr);
count++;
fr = findNext(false); // find next match in current doc
@@ -436,7 +442,7 @@ private int _processAllInCurrentDoc(Runnable1 findAction, boolean se
*/
private FindResult findNext(boolean searchAll) {
- assert EventQueue.isDispatchThread();
+ assert EventQueue.isDispatchThread() || Utilities.TEST_MODE;
// Find next match, if any, in _doc.
FindResult fr;
@@ -474,21 +480,21 @@ private FindResult findNext(boolean searchAll) {
}
- /** Finds next match in specified doc only. If searching forward, len must
- * be doc.getLength(). If searching backward, start must be 0. If
- * searchAll, suppress executing in-document wrapped search, because it
- * must be deferred. Only runs in the event thread. Note than this method
- * does a wrapped search if specified search fails.
- * @param doc the document to search in
- * @param start the start offset for searching
- * @param len the length to search
- * @param searchAll flao
- * @return the next match in the specified document
- */
+ /** Finds next match in specified doc only. If searching forward, len must be doc.getLength(). If searching
+ * backward, start must be 0. If searchAll, suppress executing in-document wrapped search, because it must be
+ * deferred. Only runs in the event thread. Note than this method does a wrapped search if specified search fails.
+ * @param doc the document to search in
+ * @param start the start offset for searching
+ * @param len the length to search
+ * @param searchAll flao
+ * @return the next match in the specified document
+ */
private FindResult _findNextInDoc(OpenDefinitionsDocument doc, int start, int len, boolean searchAll) {
+
+ assert EventQueue.isDispatchThread() || Utilities.TEST_MODE;
+
// search from current position to "end" of document ("end" is start if searching backward)
-// Utilities.show("_findNextInDoc([" + doc.getText() + "], " + start + ", " + len + ", " + searchAll + ")");
-// _log.log("_findNextInDoc([" + doc.getText() + "], " + start + ", " + len + ", " + searchAll + ")");
+ _log.log("_findNextInDoc([" + doc.getText() + "], " + start + ", " + len + ", " + searchAll + ")");
FindResult fr = _findNextInDocSegment(doc, start, len);
if (fr.getFoundOffset() >= 0 || searchAll) return fr;
@@ -506,6 +512,8 @@ private FindResult _findNextInDoc(OpenDefinitionsDocument doc, int start, int le
*/
private FindResult _findWrapped(OpenDefinitionsDocument doc, int start, int len, boolean allWrapped) {
+ assert EventQueue.isDispatchThread() || Utilities.TEST_MODE;
+
final int docLen = doc.getLength();
if (docLen == 0) return new FindResult(doc, -1, true, allWrapped); // failure result
@@ -551,21 +559,24 @@ private FindResult _findNextInDocSegment(OpenDefinitionsDocument doc, int start,
/** Main helper method for findNext... that searches for _findWord inside the specified document segment. Only runs
* in the event thread.
- * @param doc document to be searched
- * @param start the location (offset/left edge) of the text segment to be searched
- * @param len the requested length of the text segment to be searched
- * @param wrapped whether this search is after wrapping around the document
- * @param allWrapped whether this seach is after wrapping around all documents
- * @return a FindResult object with foundOffset and a flag indicating wrapping to the beginning during a search. The
- * foundOffset returned insided the FindResult is -1 if no instance was found.
+ * @param doc: the document to be searched
+ * @param start: the location (offset/left edge) of the text segment to be searched
+ * @param len: the requested length of the text segment to be searched
+ * @param wrapped: whether this search is after wrapping around the document
+ * @param allWrapped: whether this seach is after wrapping around all documents
+ * @return a FindResult object with foundOffset and flags indicating wrapping to the beginning (start doc) during a
+ * (global) search. The foundOffset returned insided the FindResult is -1 if no instance was found.
*/
private FindResult _findNextInDocSegment(final OpenDefinitionsDocument doc, final int start, int len,
final boolean wrapped, final boolean allWrapped) {
// Utilities.show("called _findNextInDocSegment(" + doc.getText() + ",\n" + start + ", " + len + ", " + wrapped +
-// " ...)");
+// ", " = allWrapped + ")");
+
+ assert EventQueue.isDispatchThread() || Utilities.TEST_MODE;
+
boolean inTestCase = false;
for(String ext: OptionConstants.LANGUAGE_LEVEL_EXTENSIONS) {
- inTestCase |= doc.getFileName().endsWith("Test"+ext);
+ inTestCase |= doc.getFileName().endsWith("Test" + ext);
}
if (!_ignoreTestCases || ! inTestCase) {
@@ -578,8 +589,6 @@ private FindResult _findNextInDocSegment(final OpenDefinitionsDocument doc, fina
if (start + len > docLen) len = docLen - start;
-// if (start + len > docLen) len = docLen - start;
-
String text; // The text segment to be searched
final String findWord; // copy of word being searched (so it can converted to lower case if necessary
@@ -617,7 +626,7 @@ private FindResult _findNextInDocSegment(final OpenDefinitionsDocument doc, fina
if (_isForward) {
foundOffset += wordLen; // skip over matched word
-// text = text.substring(adjustedOffset, len); // len is length of text before update
+// text = text.substring(adjustedOffset, len); // len is length of text before update
rem = len - foundOffset; // len is updated to length of remaining text to search
matchLocation = foundLocation + wordLen; // matchLocation is index in _doc of right edge of match
// _current = docToSearch.createPosition(start); // put caret at beginning of found word
@@ -627,7 +636,7 @@ private FindResult _findNextInDocSegment(final OpenDefinitionsDocument doc, fina
foundOffset -= wordLen; // skip over matched word
rem = foundOffset; // rem is adjusted to match foundOffset
matchLocation = foundLocation; // matchLocation is index in _doc of left edge of match
-// text = text.substring(0, len); // len is length of text after update
+// text = text.substring(0, len); // len is length of text after update
// _current = docToSearch.createPosition(foundLocation); // put caret at end of found word
}
// _log.log("rem = " + rem);
@@ -659,7 +668,9 @@ private FindResult _findNextInDocSegment(final OpenDefinitionsDocument doc, fina
*/
private FindResult _findNextInOtherDocs(final OpenDefinitionsDocument startDoc, int start, int len) {
-// System.err.println("_findNextInOtherDocs(" + startDoc.getText() + ", " + start + ", " + len + ")");
+ assert EventQueue.isDispatchThread() || Utilities.TEST_MODE;
+
+ _log.log("_findNextInOtherDocs(" + startDoc.getText() + ", " + start + ", " + len + ")");
boolean allWrapped = false;
// _doc may be null if the next document isn't found and the user didn't want to continue!
@@ -700,7 +711,9 @@ private FindResult _findNextInOtherDocs(final OpenDefinitionsDocument startDoc,
* @param foundOffset - the position where that instance was found
* @return true if the whole word is found at foundOffset, false otherwise
*/
- private boolean wholeWordFoundAtCurrent(OpenDefinitionsDocument doc, int foundOffset) {
+ private boolean wholeWordFoundAtCurrent(OpenDefinitionsDocument doc, int foundOffset) {
+
+ assert EventQueue.isDispatchThread() || Utilities.TEST_MODE;
char leftOfMatch = 0; // forced initialization
char rightOfMatch = 0; // forced initialization
@@ -738,7 +751,7 @@ private boolean wholeWordFoundAtCurrent(OpenDefinitionsDocument doc, int foundOf
*/
private boolean _shouldIgnore(int foundOffset, OpenDefinitionsDocument odd) {
- assert EventQueue.isDispatchThread();
+ assert EventQueue.isDispatchThread() || Utilities.TEST_MODE;
return (_matchWholeWord && ! wholeWordFoundAtCurrent(odd, foundOffset)) ||
(_ignoreCommentsAndStrings && odd.isShadowed(foundOffset));
diff --git a/drjava/src/edu/rice/cs/drjava/model/FindReplaceMachineTest.java b/drjava/src/edu/rice/cs/drjava/model/FindReplaceMachineTest.java
index 8b77fd6ab..86c9550a8 100644
--- a/drjava/src/edu/rice/cs/drjava/model/FindReplaceMachineTest.java
+++ b/drjava/src/edu/rice/cs/drjava/model/FindReplaceMachineTest.java
@@ -1,42 +1,35 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import edu.rice.cs.drjava.DrJavaTestCase;
+import edu.rice.cs.plt.lambda.Runnable1;
import edu.rice.cs.plt.io.IOUtil;
import edu.rice.cs.util.StringOps;
import edu.rice.cs.util.UnexpectedException;
@@ -58,12 +51,9 @@ public class FindReplaceMachineTest extends DrJavaTestCase {
private volatile int _offset;
private static final AbstractGlobalModel _model = new AbstractGlobalModel();
- private static final String EVIL_TEXT =
- "Hear no evil, see no evil, speak no evil.";
- private static final String EVIL_TEXT_PREV =
- "Hear no evilprev, see no evilprev, speak no evilprev.";
- private static final String EVIL_TEXT_NEXT =
- "Hear no evilnext, see no evilnext, speak no evilnext.";
+ private static final String EVIL_TEXT = "Hear no evil, see no evil, speak no evil.";
+ private static final String EVIL_TEXT_PREV = "Hear no evilprev, see no evilprev, speak no evilprev.";
+ private static final String EVIL_TEXT_NEXT = "Hear no evilnext, see no evilnext, speak no evilnext.";
private static final String FIND_WHOLE_WORD_TEST_1 =
"public class Foo\n" +
"{\n" +
@@ -167,7 +157,7 @@ public void testFindNextAndFailIsOnMatch() throws BadLocationException {
_frm.setFindWord("evil");
_testFindNextSucceeds(_frm, 0, 12);
_doc.insertString(9, "-", null);
- assertTrue("no longer on find text", !_frm.onMatch());
+ assertTrue("no longer on find text", !_frm.onFindWordMatch());
// System.err.println("testFindNextAndFailIsOnMatch completed");
}
@@ -178,7 +168,7 @@ public void testFindNextOnSuffix() throws BadLocationException {
_frm.setFindWord("Hear");
_testFindNextSucceeds(_frm, 0, 4);
_doc.insertString(1, "-", null);
- assertTrue("no longer on find text", ! _frm.onMatch());
+ assertTrue("no longer on find text", ! _frm.onFindWordMatch());
// System.err.println("testFindNextAndFailIsOnMatch completed");
}
@@ -190,7 +180,7 @@ public void testFindPrevOnPrefix() throws BadLocationException {
_frm.setFindWord("Hear");
_testFindNextSucceeds(_frm, 0, 0);
_doc.insertString(1, "-", null);
- assertTrue("no longer on find text", ! _frm.onMatch());
+ assertTrue("no longer on find text", ! _frm.onFindWordMatch());
// System.err.println("testFindNextAndFailIsOnMatch completed");
}
@@ -228,10 +218,10 @@ public void testSimpleReplace() throws BadLocationException {
_initFrm(0);
_assertOffsets(_frm, 0, 0);
_frm.setFindWord("evil");
- _frm.setReplaceWord("monkey");
+ _frm.setReplaceWord("monkey evil");
_testFindNextSucceeds(_frm, 0, 12);
Utilities.invokeAndWait(new Runnable() { public void run() { _frm.replaceCurrent(); } });
- assertEquals("new replaced text", "Hear no monkey, see no evil, speak no evil.", _doc.getText());
+ assertEquals("new replaced text", "Hear no monkey evil, see no evil, speak no evil.", _doc.getText());
// System.err.println("testSimpleReplace completed");
}
@@ -241,9 +231,9 @@ public void testReplaceAllContinue() throws BadLocationException {
_initFrm(15);
_assertOffsets(_frm, 15, 15);
_frm.setFindWord("evil");
- _frm.setReplaceWord("monkey");
+ _frm.setReplaceWord("monkey evil");
replaceAll();
- assertEquals("revised text", "Hear no monkey, see no monkey, speak no monkey.", _doc.getText());
+ assertEquals("revised text", "Hear no monkey evil, see no monkey evil, speak no monkey evil.", _doc.getText());
// System.err.println("testReplaceAllContinue completed");
}
@@ -664,7 +654,7 @@ public void run() {
assertEquals("documents should equal", doc.toString(), frm.getDocument().toString());
assertEquals("findNext return value", found, _result.getFoundOffset());
_assertOffsets(frm, start, found);
- assertTrue("on find text", frm.onMatch());
+ assertTrue("on find text", frm.onFindWordMatch());
}
private void _testFindNextSucceeds(final FindReplaceMachine frm, int start, int found) {
@@ -676,7 +666,7 @@ public void run() {
});
assertEquals("findNext return value", found, _offset);
_assertOffsets(frm, start, found);
- assertTrue("on find text", frm.onMatch());
+ assertTrue("on find text", frm.onFindWordMatch());
}
private void _testFindNextFails(final FindReplaceMachine frm, int start, int current) {
@@ -701,17 +691,22 @@ private void _assertOffset(FindReplaceMachine frm, int current) {
}
private void replaceAll() {
- Utilities.invokeAndWait(new Runnable() { public void run() { _frm.replaceAll(); } });
- }
-
-// /** A thunk returning boolean. */
-// private interface ContinueCommand {
-// public boolean shouldContinue();
-// }
-
-// private static ContinueCommand CONTINUE = new ContinueCommand() {
-// public boolean shouldContinue() {
-// return true;
-// }
-// };
+ Utilities.invokeAndWait(new Runnable() {
+ /* code adapted from FindReplacePanel.replaceAll. Assumes _findWord,_replaceWord, _isForward (using
+ * setSearchBackwards) in _frm have already been set */
+ public void run() {
+// _frm._updateMachine(); // _frm should already be up to date.
+ int count = 0;
+ Runnable1 replaceMatchingString = // replaces current (found) string
+ new Runnable1() {
+ public void run(FindResult fr) {
+ if (fr.getFoundOffset() >= 0) /* matching string found */ _frm.replaceCurrent();
+ }};
+ try {
+ /* Replace all matching strings in region (which may be entire project). */
+ count = _frm.processAll(replaceMatchingString);
+ }
+ finally { _model.refreshActiveDocument(); }
+ }});
+ }
}
diff --git a/drjava/src/edu/rice/cs/drjava/model/FindResult.java b/drjava/src/edu/rice/cs/drjava/model/FindResult.java
index 348677bc0..7113f7e0a 100644
--- a/drjava/src/edu/rice/cs/drjava/model/FindResult.java
+++ b/drjava/src/edu/rice/cs/drjava/model/FindResult.java
@@ -1,45 +1,37 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
-/** Returned to FindMachineDialog with the location of the found string
- * (or -1 if the string was not found) as well as a flag indicating
- * whether the machine wrapped around the end of the document.
- *
+/** This class implements a findResults tuple conttaining the location of the found string (or -1 if the string was not
+ * found), the current document, the offset of the matching string, a flag indicating whether the machine wrapped
+ * around the end of the document (local search), and a flag indicating whether the search wrapped back to the start
+ * document (global search)
* @version $Id$
*/
public class FindResult {
@@ -49,11 +41,11 @@ public class FindResult {
private final boolean _allWrapped;
/** Constructor for a FindResult.
- * @param document the document where the found instance is located
- * @param foundoffset the offset of the instance found
- * @param wrapped {@code true} if the search wrapped to the beginning (or end) of the document
- * @param allWrapped {@code true} if the search wrapped to the start document
- */
+ * @param document the document where the found instance is located
+ * @param foundoffset the offset of the instance found
+ * @param wrapped {@code true} if the search wrapped to the beginning (or end) of the document
+ * @param allWrapped {@code true} if the search wrapped to the start document
+ */
public FindResult(OpenDefinitionsDocument document, int foundoffset, boolean wrapped, boolean allWrapped) {
_document = document;
_foundoffset = foundoffset;
@@ -73,7 +65,7 @@ public String toString() {
public int getFoundOffset() { return _foundoffset; }
/** @return true if the search wrapped to the beginning (or end) of the document */
- public boolean getWrapped() { return _wrapped; }
+ public boolean isWrapped() { return _wrapped; }
/** @return true if the search wrapped to the start document. */
public boolean getAllWrapped() { return _allWrapped; }
diff --git a/drjava/src/edu/rice/cs/drjava/model/GlobalEventNotifier.java b/drjava/src/edu/rice/cs/drjava/model/GlobalEventNotifier.java
index 5b5945d62..4524c30e1 100644
--- a/drjava/src/edu/rice/cs/drjava/model/GlobalEventNotifier.java
+++ b/drjava/src/edu/rice/cs/drjava/model/GlobalEventNotifier.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.io.File;
@@ -411,8 +403,7 @@ public void interpreterChanged(boolean inProgress) {
/** Called after a compile is started by the GlobalModel. */
public void compileStarted() {
_lock.startRead();
- try { for (GlobalModelListener l : _listeners) { l.compileStarted(); }
- }
+ try { for (GlobalModelListener l : _listeners) l.compileStarted(); }
finally { _lock.endRead(); }
}
@@ -570,7 +561,6 @@ public void javadocEnded(boolean success, File destDir, boolean allDocs) {
finally { _lock.endRead(); }
}
-
/** Called before attempting Javadoc, to give the user a chance to save. Do not continue with Javadoc if the user
* doesn't save!
*/
diff --git a/drjava/src/edu/rice/cs/drjava/model/GlobalIndentTest.java b/drjava/src/edu/rice/cs/drjava/model/GlobalIndentTest.java
index 7c012251f..0072dae2a 100644
--- a/drjava/src/edu/rice/cs/drjava/model/GlobalIndentTest.java
+++ b/drjava/src/edu/rice/cs/drjava/model/GlobalIndentTest.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import javax.swing.text.BadLocationException;
@@ -42,7 +34,7 @@
import edu.rice.cs.drjava.model.definitions.indent.Indenter;
import edu.rice.cs.util.OperationCanceledException;
-/** * Tests the indenting functionality on the level of the GlobalModel.
+/** Tests the indenting functionality on the level of the GlobalModel.
* Not only are we testing that the document turns out right, but also
* that the cursor position in the document is consistent with a standard.
* @version $Id$
diff --git a/drjava/src/edu/rice/cs/drjava/model/GlobalModel.java b/drjava/src/edu/rice/cs/drjava/model/GlobalModel.java
index b3c1fa2e8..f1fdd6933 100644
--- a/drjava/src/edu/rice/cs/drjava/model/GlobalModel.java
+++ b/drjava/src/edu/rice/cs/drjava/model/GlobalModel.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.awt.print.PageFormat;
@@ -387,9 +379,7 @@ public void openFolder(File dir, boolean rec, String ext)
/** Interprets the current given text at the prompt in the interactions pane. */
public void interpretCurrentInteraction();
- /** Returns the current classpath in use by the Interpreter JVM. This
- * includes the original jvm classpath, the global
- * drjava extra classpaths, and the project extra classpaths.
+ /** Returns the current classpath in use by the Interpreter JVM.
* @return the current classpath in use by the Interpreter JVM
*/
public Iterable getInteractionsClassPath();
diff --git a/drjava/src/edu/rice/cs/drjava/model/GlobalModelCompileErrorsTest.java b/drjava/src/edu/rice/cs/drjava/model/GlobalModelCompileErrorsTest.java
index e8df31eb5..6cf222f49 100644
--- a/drjava/src/edu/rice/cs/drjava/model/GlobalModelCompileErrorsTest.java
+++ b/drjava/src/edu/rice/cs/drjava/model/GlobalModelCompileErrorsTest.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.io.*;
@@ -339,7 +331,7 @@ public void testCompileFailsCorrectLineNumbers() throws BadLocationException, IO
Position p1 = cme.getPosition(ce1);
Position p2 = cme.getPosition(ce2);
assertTrue("location of first error should be between 20 and 29 inclusive (line 2), but was " + p1.getOffset(),
- p1.getOffset() <= 20 && p1.getOffset() <= 29);
+ p1.getOffset() >= 20 && p1.getOffset() <= 29);
assertTrue("location of error should be after 34 (line 3 or 4)", p2.getOffset() >= 34);
debug.logEnd();
diff --git a/drjava/src/edu/rice/cs/drjava/model/GlobalModelCompileIOTest.java b/drjava/src/edu/rice/cs/drjava/model/GlobalModelCompileIOTest.java
index b79e45330..84dca2e23 100644
--- a/drjava/src/edu/rice/cs/drjava/model/GlobalModelCompileIOTest.java
+++ b/drjava/src/edu/rice/cs/drjava/model/GlobalModelCompileIOTest.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.io.*;
diff --git a/drjava/src/edu/rice/cs/drjava/model/GlobalModelCompileSuccessOptionsTest.java b/drjava/src/edu/rice/cs/drjava/model/GlobalModelCompileSuccessOptionsTest.java
index 53863d861..e2de36fe3 100644
--- a/drjava/src/edu/rice/cs/drjava/model/GlobalModelCompileSuccessOptionsTest.java
+++ b/drjava/src/edu/rice/cs/drjava/model/GlobalModelCompileSuccessOptionsTest.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.io.*;
diff --git a/drjava/src/edu/rice/cs/drjava/model/GlobalModelCompileSuccessTest.java b/drjava/src/edu/rice/cs/drjava/model/GlobalModelCompileSuccessTest.java
index 34684d28c..bb8ed9d85 100644
--- a/drjava/src/edu/rice/cs/drjava/model/GlobalModelCompileSuccessTest.java
+++ b/drjava/src/edu/rice/cs/drjava/model/GlobalModelCompileSuccessTest.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import edu.rice.cs.drjava.model.definitions.InvalidPackageException;
@@ -136,17 +128,17 @@ public void testCompileClassPathOKDefaultPackage()
compiled.exists());
_model.removeListener(listener2);
}
-
+
/** Test that one compiled file can depend on the other.
- * We compile a.DrJavaTestFoo and then b.DrJavaTestFoo2 (which extends
- * DrJavaTestFoo). This shows that the compiler successfully found
- * DrJavaTestFoo2 when compiling DrJavaTestFoo.
- * Doesn't reset interactions because no interpretations are performed.
- * @throws BadLocationException if attempts to reference an invalid location
- * @throws IOException if an IO operation fails
- * @throws InterruptedException if execution is interrupted unexpectedly
- * @throws InvalidPackageException if the package is invalid
- */
+ * We compile a.DrJavaTestFoo and then b.DrJavaTestFoo2 (which extends
+ * DrJavaTestFoo). This shows that the compiler successfully found
+ * DrJavaTestFoo2 when compiling DrJavaTestFoo.
+ * Doesn't reset interactions because no interpretations are performed.
+ * @throws BadLocationException if attempts to reference an invalid location
+ * @throws IOException if an IO operation fails
+ * @throws InterruptedException if execution is interrupted unexpectedly
+ * @throws InvalidPackageException if the package is invalid
+ */
public void testCompileClassPathOKDifferentPackages() throws BadLocationException, IOException, InterruptedException,
InvalidPackageException {
// System.out.println("testCompileClasspathOKDifferentPackages()");
@@ -161,8 +153,8 @@ public void testCompileClassPathOKDifferentPackages() throws BadLocationExceptio
final File fooFile = new File(aDir, "DrJavaTestFoo.java");
// System.err.println("fooFile = " + fooFile.getCanonicalPath());
saveFile(doc1, new FileSelector(fooFile));
- // _packageName must be updated on save
- assertEquals("Check package name of doc1", "a", ((AbstractGlobalModel.ConcreteOpenDefDoc) doc1)._packageName);
+ // package name must be updated on save
+ assertEquals("Check package name of doc1", "a", ((AbstractGlobalModel.ConcreteOpenDefDoc) doc1).getPackageName());
// System.err.println("doc1 = " + doc1);
// System.err.println("doc1 has source root " + doc1.getSourceRoot());
CompileShouldSucceedListener listener = new CompileShouldSucceedListener();
@@ -182,8 +174,8 @@ public void testCompileClassPathOKDifferentPackages() throws BadLocationExceptio
final File foo2File = new File(bDir, "DrJavaTestFoo2.java");
// System.err.println("foo2File = " + foo2File.getCanonicalPath());
saveFile(doc2, new FileSelector(foo2File));
- // _packageName must be updated on save
- assertEquals("Check packangeName of doc2", "b", ((AbstractGlobalModel.ConcreteOpenDefDoc) doc2)._packageName);
+ // package name must be updated on save
+ assertEquals("Check packangeName of doc2", "b", ((AbstractGlobalModel.ConcreteOpenDefDoc) doc2).getPackageName());
// System.err.println("doc2 = " + doc2);
CompileShouldSucceedListener listener2 = new CompileShouldSucceedListener();
diff --git a/drjava/src/edu/rice/cs/drjava/model/GlobalModelCompileSuccessTestCase.java b/drjava/src/edu/rice/cs/drjava/model/GlobalModelCompileSuccessTestCase.java
index 4b16386c1..261c79c58 100644
--- a/drjava/src/edu/rice/cs/drjava/model/GlobalModelCompileSuccessTestCase.java
+++ b/drjava/src/edu/rice/cs/drjava/model/GlobalModelCompileSuccessTestCase.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import edu.rice.cs.plt.reflect.JavaVersion;
diff --git a/drjava/src/edu/rice/cs/drjava/model/GlobalModelCompileTest.java b/drjava/src/edu/rice/cs/drjava/model/GlobalModelCompileTest.java
index 0d7934a3e..415f4020b 100644
--- a/drjava/src/edu/rice/cs/drjava/model/GlobalModelCompileTest.java
+++ b/drjava/src/edu/rice/cs/drjava/model/GlobalModelCompileTest.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.io.*;
@@ -50,7 +42,7 @@
* @version $Id$
*/
public final class GlobalModelCompileTest extends GlobalModelTestCase {
- protected static final Log _log = new Log("GlobalModelCompileTest.txt", false);
+ protected static final Log _log = new Log("GlobalModel.txt", false);
/** Tests calling compileAll with no source files works. Does not reset interactions.
* @throws BadLocationException if attempts to reference an invalid location
@@ -70,10 +62,10 @@ public void run() {
}
});
listener.waitCompileDone();
- if (_model.getCompilerModel().getNumErrors() > 0) {
- fail("compile failed: " + getCompilerErrorString());
+ if (_model.getCompilerModel().getNumErrors() != 1) {
+ fail("Compilation Failure should generate one error: " + getCompilerErrorString());
}
- assertCompileErrorsPresent("compile should succeed", false);
+ assertCompileErrorsPresent("compile should succeed", true);
listener.checkCompileOccurred();
_model.removeListener(listener);
_log.log("testCompileAllWithNoFiles complete");
@@ -88,13 +80,14 @@ public void run() {
public void testCompileResetsInteractions() throws BadLocationException, IOException, InterruptedException,
EditDocumentException {
-// System.err.println("Starting testCompileResetsInteractions");
+ _log.log("Starting testCompileResetsInteractions");
OpenDefinitionsDocument doc = setupDocument(FOO_TEXT);
final File file = new File(_tempDir, "DrJavaTestFoo.java");
saveFile(doc, new FileSelector(file));
// Use the interpreter so resetInteractions is not optimized to a no-op
+ _log.log("Interpreting 0");
interpret("0");
CompileShouldSucceedListener listener = new CompileShouldSucceedListener();
@@ -107,6 +100,7 @@ public void run() {
}
});
listener.waitCompileDone();
+ _log.log("Compilation complete");
if (_model.getCompilerModel().getNumErrors() > 0) {
// System.err.println("Compile failed");
diff --git a/drjava/src/edu/rice/cs/drjava/model/GlobalModelIOTest.java b/drjava/src/edu/rice/cs/drjava/model/GlobalModelIOTest.java
index ebb9efb2c..08a8e99ef 100644
--- a/drjava/src/edu/rice/cs/drjava/model/GlobalModelIOTest.java
+++ b/drjava/src/edu/rice/cs/drjava/model/GlobalModelIOTest.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.io.*;
diff --git a/drjava/src/edu/rice/cs/drjava/model/GlobalModelJUnitTest.java b/drjava/src/edu/rice/cs/drjava/model/GlobalModelJUnitTest.java
index de03d80bd..a39dbdccd 100644
--- a/drjava/src/edu/rice/cs/drjava/model/GlobalModelJUnitTest.java
+++ b/drjava/src/edu/rice/cs/drjava/model/GlobalModelJUnitTest.java
@@ -1,36 +1,29 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
@@ -38,6 +31,7 @@
import java.io.File;
import java.io.IOException;
+import java.util.Arrays;
import java.util.List;
import edu.rice.cs.drjava.model.compiler.CompilerListener;
@@ -51,7 +45,7 @@
*/
public final class GlobalModelJUnitTest extends GlobalModelTestCase {
- private static Log _log = new Log("GlobalModelJUnit.txt", false);
+ private static Log _log = new Log("GlobalModel.txt", false);
/** Whether or not to print debugging output. */
static final boolean printMessages = true;
@@ -186,14 +180,9 @@ public final class GlobalModelJUnitTest extends GlobalModelTestCase {
" }";
-// /** Creates a test suite for JUnit to run.
-// * @return a test suite based on the methods in this class
-// */
-// public static Test suite() { return new TestSuite(GlobalModelJUnitTest.class); }
-
/** Tests that a JUnit file with no errors is reported to have no errors.
- * @throws Exception if something goes wrong
- */
+ * @throws Exception if something goes wrong
+ */
public void testNoJUnitErrors_NOJOIN() throws Exception {
_log.log("----testNoJUnitErrors-----");
// Utilities.show("Running testNoJUnitErrors");
@@ -265,9 +254,9 @@ public void testElspethOneJUnitError_NOJOIN() throws Exception {
listener.runJUnit(doc);
- JUnitErrorModel jem = _model.getJUnitModel().getJUnitErrorModel();
- assertEquals("test case has one error reported", 1, jem.getNumErrors());
- assertTrue("first error should be an error not a warning", !jem.getError(0).isWarning());
+ JUnitErrorModel junitErrorModel = _model.getJUnitModel().getJUnitErrorModel();
+ assertEquals("test case has one error reported", 1, junitErrorModel.getNumErrors());
+ assertTrue("first error should be an error not a warning", !junitErrorModel.getError(0).isWarning());
_model.removeListener(listener);
_log.log("testElspethOneJUnitError completed");
@@ -296,14 +285,14 @@ public void testRealError_NOJOIN() throws Exception {
listener.assertJUnitEndCount(1);
_model.removeListener(listener);
- _log.log("testRealError completed");
+ _log.log("+++Completing testRealError completed");
}
/** Tests that the ui is notified to put up an error dialog if JUnit is run on a non-TestCase.
* @throws Exception if something goes wrong
*/
public void testNonTestCaseError_NOJOIN() throws Exception {
- _log.log("----testNonTestCaseError-----");
+ _log.log("+++Starting testNonTestCaseError");
// Utilities.show("Running testNonTestCaseError");
final OpenDefinitionsDocument doc = setupDocument(NON_TESTCASE_TEXT);
@@ -324,7 +313,7 @@ public void testNonTestCaseError_NOJOIN() throws Exception {
// Check events fired
listener.assertJUnitStartCount(0); // JUnit is never started
- listener.assertJUnitEndCount(0); // JUnit never started and hence never ended
+ listener.assertJUnitEndCount(0); // JUnit never started and hence never ended
listener.assertNonTestCaseCount(1);
listener.assertJUnitSuiteStartedCount(0);
listener.assertJUnitTestStartedCount(0);
@@ -334,9 +323,9 @@ public void testNonTestCaseError_NOJOIN() throws Exception {
_log.log("testNonTestCaseError completed");
}
- /** Tests that the ui is notified to put up an error dialog if JUnit is run on a non-public TestCase.
- * @throws Exception if something goes wrong
- */
+ /** Tests that the UI is notified to put up an error dialog if JUnit is run on a non-public TestCase.
+ * @throws Exception if something goes wrong
+ */
public void testResultOfNonPublicTestCase_NOJOIN() throws Exception {
_log.log("----testResultOfNonPublicTestCase-----");
// Utilities.show("Running testResultOfNonPublicTestCase");
@@ -394,8 +383,8 @@ public void testResultOfNonPublicTestCase_NOJOIN() throws Exception {
// }
/** Tests a document that has no corresponding class file.
- * @throws Exception if something goes wrong
- */
+ * @throws Exception if something goes wrong
+ */
public void testNoClassFile() throws Exception {
_log.log("----testNoClassFile-----");
// Utilities.show("Running testNoClassFile");
@@ -685,11 +674,11 @@ public void safeJUnitAllWithErrors() throws Exception {
listener.assertJUnitTestEndedCount(2);
_model.removeListener(listener);
- JUnitErrorModel jem = _model.getJUnitModel().getJUnitErrorModel();
- assertEquals("test case has one error reported", 2, jem.getNumErrors());
+ JUnitErrorModel junitErrorModel = _model.getJUnitModel().getJUnitErrorModel();
+ assertEquals("test case has one error reported", 2, junitErrorModel.getNumErrors());
- assertTrue("first error should be an error", jem.getError(0).isWarning());
- assertFalse("second error should be a failure", jem.getError(1).isWarning());
+ assertTrue("first error should be an error", junitErrorModel.getError(0).isWarning());
+ assertFalse("second error should be a failure", junitErrorModel.getError(1).isWarning());
_log.log("testJUnitAllWithErrors completed");
}
@@ -779,7 +768,7 @@ public void testCorrectFilesAfterIncorrectChanges_NOJOIN() throws Exception {
final OpenDefinitionsDocument doc1 = setupDocument(MULTI_CLASSES_IN_FILE_TEXT);
final File file = new File(_tempDir, "DJTest.java");
saveFile(doc1, new FileSelector(file));
- _log.log("In testCorrectFilesAfterIncorrectChanges_NOJOIN(), DJTest.java = \n" + doc1.getText());
+ _log.log("In testCorrectFilesAfterIncorrectChanges, DJTest.java = \n" + doc1.getText());
final JUnitNonTestListener listener1 = new JUnitNonTestListener(true);
_model.addListener(listener1);
@@ -814,8 +803,8 @@ public void testCorrectFilesAfterIncorrectChanges_NOJOIN() throws Exception {
/** Tests if a JUnit4 style unit test works.
- * @throws Exception if something goes wrong
- */
+ * @throws Exception if something goes wrong
+ */
public void testJUnit4StyleTestWorks_NOJOIN() throws Exception {
_log.log("----testJUnit4StyleTestWorks-----");
@@ -832,18 +821,19 @@ public void testJUnit4StyleTestWorks_NOJOIN() throws Exception {
listener.checkCompileOccurred();
listener.runJUnit(doc);
+ _log.log("errors: " + Arrays.toString(_model.getJUnitModel().getJUnitErrorModel().getErrors()));
+
// runJUnit waits until the thread started in DefaultJUnitModel._rawJUnitOpenDefDocs has called notify
listener.assertJUnitStartCount(1);
- _log.log("errors: " + _model.getJUnitModel().getJUnitErrorModel());
-
+
listener.assertNonTestCaseCount(0);
assertEquals("test case should have no errors reported", 0,
_model.getJUnitModel().getJUnitErrorModel().getNumErrors());
_model.removeListener(listener);
- _log.log("testJUnit4StyleTestWorks completed");
+ _log.log("----testJUnit4StyleTestWorks completed");
}
/** Tests to see if a JUnit4 style test with multiple test cases passes.
@@ -867,9 +857,9 @@ public void testJUnit4MultiTest_NOJOIN() throws Exception {
listener.runJUnit(doc);
// runJUnit waits until the thread started in DefaultJUnitModel._rawJUnitOpenDefDocs has called notify
- listener.assertJUnitStartCount(1);
+ _log.log("errors: " + Arrays.toString(_model.getJUnitModel().getJUnitErrorModel().getErrors()));
- _log.log("errors: " + _model.getJUnitModel().getJUnitErrorModel());
+ listener.assertJUnitStartCount(1);
listener.assertNonTestCaseCount(0);
assertEquals("test case should have no errors reported", 0,
@@ -936,10 +926,9 @@ public void testJUnit4TwoMethod1Test_NOJOIN() throws Exception {
listener.runJUnit(doc);
// runJUnit waits until the thread started in DefaultJUnitModel._rawJUnitOpenDefDocs has called notify
- listener.assertJUnitStartCount(1);
-
- _log.log("errors: " + _model.getJUnitModel().getJUnitErrorModel());
+ _log.log("errors: " + Arrays.toString(_model.getJUnitModel().getJUnitErrorModel().getErrors()));
+ listener.assertJUnitStartCount(1);
listener.assertNonTestCaseCount(0);
assertEquals("test case should have no errors reported", 0,
_model.getJUnitModel().getJUnitErrorModel().getNumErrors());
diff --git a/drjava/src/edu/rice/cs/drjava/model/GlobalModelListener.java b/drjava/src/edu/rice/cs/drjava/model/GlobalModelListener.java
index 49e9036e3..83d45f1e5 100644
--- a/drjava/src/edu/rice/cs/drjava/model/GlobalModelListener.java
+++ b/drjava/src/edu/rice/cs/drjava/model/GlobalModelListener.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.io.File;
diff --git a/drjava/src/edu/rice/cs/drjava/model/GlobalModelOtherTest.java b/drjava/src/edu/rice/cs/drjava/model/GlobalModelOtherTest.java
index 7ae7afc4b..ac440da07 100644
--- a/drjava/src/edu/rice/cs/drjava/model/GlobalModelOtherTest.java
+++ b/drjava/src/edu/rice/cs/drjava/model/GlobalModelOtherTest.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.io.*;
@@ -55,7 +47,7 @@
import static edu.rice.cs.plt.debug.DebugUtil.debug;
/** A test on the GlobalModel that does deals with everything outside of simple file operations, e.g., compile, quit.
- * @version $Id: GlobalModelOtherTest.java 5444 2011-08-17 07:54:58Z rcartwright $
+ * @version $Id$
*/
public final class GlobalModelOtherTest extends GlobalModelTestCase implements OptionConstants {
diff --git a/drjava/src/edu/rice/cs/drjava/model/GlobalModelTestCase.java b/drjava/src/edu/rice/cs/drjava/model/GlobalModelTestCase.java
index 450b044e1..1b5671f3a 100644
--- a/drjava/src/edu/rice/cs/drjava/model/GlobalModelTestCase.java
+++ b/drjava/src/edu/rice/cs/drjava/model/GlobalModelTestCase.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import edu.rice.cs.drjava.DrJava;
@@ -75,7 +67,7 @@
*/
public abstract class GlobalModelTestCase extends MultiThreadedTestCase {
- public static final Log _log = new Log("GlobalModel.txt", false);
+ public static final Log _log = new Log("GlobalModel.txt", false);
protected volatile DefaultGlobalModel _model;
protected volatile InteractionsController _interactionsController;
@@ -130,7 +122,7 @@ public void run() {
}
}
});
- Utilities.clearEventQueue(); // Let some pending event queue operations complete
+// Utilities.clearEventQueue(); // Let some pending event queue operations complete
_model.setResetAfterCompile(false);
_log.log("Completed (GlobalModelTestCase) set up of " + this);
@@ -673,6 +665,7 @@ public TestListener() {
}
public synchronized void resetCounts() {
+ _log.log("Restting all counts to 0 and boolean flags to false");
fileNotFoundCount = 0;
newCount = 0;
openCount = 0;
@@ -1026,6 +1019,7 @@ public void updateCurrentLocationInDoc() { /* this event is not directly tested
}
public static class InteractionListener extends TestListener {
+ public static Log _log = new Log("GlobalModel.txt", false);
private static final int WAIT_TIMEOUT = 20000; // time to wait for _interactionDone or _resetDone
private volatile CompletionMonitor _interactionDone;
private volatile CompletionMonitor _resetDone;
@@ -1080,6 +1074,7 @@ public void consoleReset() {
public void resetConsoleResetCount() { consoleResetCount = 0; }
public synchronized void logInteractionStart() {
+ _log.log("Resetting _interactionDone and _resetDone");
_interactionDone.reset();
_resetDone.reset();
}
@@ -1104,9 +1099,12 @@ public static class CompileShouldSucceedListener extends InteractionListener {
private volatile boolean _compileDone = false; // records when compilaton is done
private final Object _compileLock = new Object(); // lock for _compileDone
- public synchronized void logCompileStart() {
- logInteractionStart();
- _compileDone = false;
+ public void logCompileStart() {
+// logInteractionStart();
+ synchronized (_compileLock) {
+ _log.log("In CSSL, logCompileStart called");
+ _compileDone = false;
+ }
}
public void compile(OpenDefinitionsDocument doc) throws IOException, InterruptedException {
@@ -1180,11 +1178,14 @@ public static class CompileShouldFailListener extends TestListener {
private final Object _compileLock = new Object(); // lock for _compileDone
public void logCompileStart() {
- synchronized(_compileLock) { _compileDone = false; }
+ synchronized (_compileLock) {
+ _log.log("In CSFL, logCompileStart called");
+ _compileDone = false;
+ }
}
public void waitCompileDone() throws InterruptedException {
- synchronized(_compileLock) {
+ synchronized (_compileLock) {
while (! _compileDone) {
// System.err.println("Waiting for JUnit to complete");
_compileLock.wait();
@@ -1200,6 +1201,7 @@ public void compile(OpenDefinitionsDocument doc) throws IOException, Interrupted
private void _notifyCompileDone() {
synchronized(_compileLock) {
+ _log.log("In CSFL, compilation done notification");
_compileDone = true;
_compileLock.notify();
}
@@ -1251,16 +1253,17 @@ public JUnitTestListener(boolean printListenerMessages) {
}
public synchronized void logJUnitStart() {
+ _log.log("JUnitStart called");
// logCompileStart();
_junitDone = false;
}
/** Runs JUnit on doc to completion.
- * @param doc the document on which to run JUnit
- * @throws IOException if an IO operation fails
- * @throws ClassNotFoundException if a class is not found
- * @throws InterruptedException if execution is interrupted unexpectedly
- */
+ * @param doc the document on which to run JUnit
+ * @throws IOException if an IO operation fails
+ * @throws ClassNotFoundException if a class is not found
+ * @throws InterruptedException if execution is interrupted unexpectedly
+ */
public void runJUnit(OpenDefinitionsDocument doc) throws IOException, ClassNotFoundException,
InterruptedException {
logJUnitStart();
@@ -1272,7 +1275,7 @@ public void runJUnit(OpenDefinitionsDocument doc) throws IOException, ClassNotFo
public void runJUnit(JUnitModel jm) throws IOException, ClassNotFoundException, InterruptedException {
logJUnitStart();
-// System.err.println("Starting JUnit");
+// _log.log("Starting JUnit");
jm.junitAll();
waitJUnitDone();
}
@@ -1303,20 +1306,20 @@ public synchronized void resetJUnitCounts() {
}
@Override public void junitStarted() {
- _log.log("listener.junitStarted");
+ _log.log("listener.junitStarted, incrementing count");
synchronized(this) { junitStartCount++; }
}
@Override public void junitSuiteStarted(int numTests) {
- _log.log("listener.junitSuiteStarted, numTests = " + numTests);
+ _log.log("listener.junitSuiteStarted, incrementing count, numTests = " + numTests);
assertJUnitStartCount(1);
synchronized(this) { junitSuiteStartedCount++; }
}
@Override public void junitTestStarted(String name) {
- _log.log(" listener.junitTestStarted, " + name);
+ _log.log(" listener.junitTestStarted, incrementing count " + name);
synchronized(this) { junitTestStartedCount++; }
}
@Override public void junitTestEnded(String name, boolean wasSuccessful, boolean causedError) {
- _log.log(" listener.junitTestEnded, name = " + name + " succ = " + wasSuccessful +
+ _log.log(" listener.junitTestEnded, incrementing count, name = " + name + " succ = " + wasSuccessful +
" err = " + causedError);
synchronized(this) { junitTestEndedCount++; }
assertEquals("junitTestEndedCount should be same as junitTestStartedCount", junitTestEndedCount,
@@ -1325,7 +1328,7 @@ public synchronized void resetJUnitCounts() {
@Override public void nonTestCase(boolean isTestAll, boolean didCompileFail) {
_log.log("listener.nonTestCase, isTestAll=" + isTestAll);
synchronized(this) { nonTestCaseCount++; }
- _log.log("nonTestCase() called; notifying JUnitDone");
+ _log.log("nonTestCase() called, incrementing count, notifying JUnitDone");
_notifyJUnitDone();
}
@Override public void classFileError(ClassFileError e) {
diff --git a/drjava/src/edu/rice/cs/drjava/model/IDocumentRegion.java b/drjava/src/edu/rice/cs/drjava/model/IDocumentRegion.java
index 8e7bb8815..28be7a188 100644
--- a/drjava/src/edu/rice/cs/drjava/model/IDocumentRegion.java
+++ b/drjava/src/edu/rice/cs/drjava/model/IDocumentRegion.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
/** Interface supported by all bona fide document regions (e.g., region classes other than DummyDocumentRegion). */
diff --git a/drjava/src/edu/rice/cs/drjava/model/IHighlighted.java b/drjava/src/edu/rice/cs/drjava/model/IHighlighted.java
index 4525b5ec8..bf453f8ef 100644
--- a/drjava/src/edu/rice/cs/drjava/model/IHighlighted.java
+++ b/drjava/src/edu/rice/cs/drjava/model/IHighlighted.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import javax.swing.text.Highlighter;
diff --git a/drjava/src/edu/rice/cs/drjava/model/ILoadDocuments.java b/drjava/src/edu/rice/cs/drjava/model/ILoadDocuments.java
index 37664c7c2..3743090e3 100644
--- a/drjava/src/edu/rice/cs/drjava/model/ILoadDocuments.java
+++ b/drjava/src/edu/rice/cs/drjava/model/ILoadDocuments.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.io.IOException;
diff --git a/drjava/src/edu/rice/cs/drjava/model/IRegion.java b/drjava/src/edu/rice/cs/drjava/model/IRegion.java
index 74d305f9e..486bdeab0 100644
--- a/drjava/src/edu/rice/cs/drjava/model/IRegion.java
+++ b/drjava/src/edu/rice/cs/drjava/model/IRegion.java
@@ -38,11 +38,10 @@
import java.io.File;
-/**
- * The minimal interface for all region classes. Excludes a document field
- * because DummyDocumentRegions are created before their corresponding document.
- * @version $Id$
- */
+/** The minimal interface for all region classes with files (??). Excludes a document field because DummyDocumentRegions
+ * are created before their corresponding document.
+ * @version $Id$
+ */
public interface IRegion extends Region {
/** *Copied from Region*.
diff --git a/drjava/src/edu/rice/cs/drjava/model/JDKDescriptor.java b/drjava/src/edu/rice/cs/drjava/model/JDKDescriptor.java
index 0a98cbad2..b45915f03 100644
--- a/drjava/src/edu/rice/cs/drjava/model/JDKDescriptor.java
+++ b/drjava/src/edu/rice/cs/drjava/model/JDKDescriptor.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.io.File;
@@ -48,8 +40,7 @@
import edu.rice.cs.plt.iter.IterUtil;
/** A description of a JDK.
- * Put subclasses of JDKDescriptor in the edu.rice.cs.drjava.model.compiler.descriptors package for DrJava
- * to find. */
+ * Put subclasses of JDKDescriptor in the edu.rice.cs.drjava.model.compiler.descriptors package for DrJava to find. */
public abstract class JDKDescriptor {
/** Return the name of this JDK.
* @return name */
@@ -158,11 +149,11 @@ public String toString() {
}
/** Singleton representing a JDK that doesn't have a descriptor. */
- public static final JDKDescriptor NONE = new None();
+ public static final JDKDescriptor JDK_DEFAULT = new Default();
- /** Class for the singleton representing a JDK that doesn't have a descriptor. */
- private static final class None extends JDKDescriptor {
- public String getName() { return "none"; }
+ /** Class for the singleton representing a JDK with the default descriptor. */
+ private static final class Default extends JDKDescriptor {
+ public String getName() { return "default"; }
public String getDescription(JavaVersion.FullVersion version) {
switch(version.vendor()) {
case ORACLE:
@@ -172,7 +163,7 @@ public String getDescription(JavaVersion.FullVersion version) {
case APPLE:
return "Apple JDK library " + version.toString();
default:
- return "JDK library " + version.toString();
+ return "Default OpenJDK library " + version.toString();
}
}
public Set getToolsPackages() { return Collections.emptySet(); }
@@ -189,7 +180,7 @@ public String getAdapterForDebugger(JavaVersion.FullVersion guessedVersion) {
return JDKToolsLibrary.adapterForDebugger(guessedVersion);
}
public boolean containsCompiler(File f) { return true; }
- public JavaVersion getMinimumMajorVersion() { return JavaVersion.JAVA_6; }
+ public JavaVersion getMinimumMajorVersion() { return JavaVersion.JAVA_8; }
public Iterable getAdditionalCompilerFiles(File compiler) throws FileNotFoundException {
return IterUtil.empty();
}
@@ -207,7 +198,7 @@ public static boolean exists(File jarOrDir, String... fileNames) {
JarFile jf = new JarFile(jarOrDir);
for (String fn: fileNames) {
- if (jf.getJarEntry(fn)==null) {
+ if (jf.getJarEntry(fn) == null) {
jf.close();
return false;
}
diff --git a/drjava/src/edu/rice/cs/drjava/model/JDKToolsLibrary.java b/drjava/src/edu/rice/cs/drjava/model/JDKToolsLibrary.java
index c09d8864f..be2b40067 100644
--- a/drjava/src/edu/rice/cs/drjava/model/JDKToolsLibrary.java
+++ b/drjava/src/edu/rice/cs/drjava/model/JDKToolsLibrary.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.util.ArrayList;
@@ -59,14 +51,12 @@
import edu.rice.cs.util.Log;
-/** Provides dynamic access to the interface of a JDK's tools.jar classes. This level of indirection
- * eliminates the need to have specific tools.jar classes available statically (and the resulting need
- * to reset the JVM if they are not), and makes it possible to interface with multiple tools.jar
- * libraries simultaneously. This class is concretely instantiated only to create a degenerate
- * library containing the embedded Eclipse compiler when no JDK is available. Since the most commonly
- * used JDKs are not open source, we dynamically search for them. If none is found, we fall back on
- * the Eclipse compiler with no debugger and no javadoc.
- * TODO: embed tools.jar from several openJDK distributions? The resulting footprint may be too large.
+/** Provides dynamic access to the interface of JDK tools.jar classes. This level of indirection eliminates the need to
+ * have specific tools.jar classes available statically (and the resulting need to reset the JVM if they are not), and
+ * makes it possible to interface with multiple tools.jar libraries simultaneously. This class is concretely
+ * instantiated only to create a degenerate library containing the Open JDK 8 compiler when no installed JDK is
+ * available. Since the most commonly used JDKs are not open source, we dynamically search for compilers embedded in
+ * them. If none is found, we fall back on the tools.jar file in Open JDK 8.
*/
public class JDKToolsLibrary {
@@ -104,32 +94,36 @@ public boolean isValid() {
public String toString() { return _jdkDescriptor.getDescription(_version); }
- public static String adapterForCompiler(JavaVersion.FullVersion version) {
- switch (version.majorVersion()) {
- case FUTURE: return "edu.rice.cs.drjava.model.compiler.Javac170Compiler";
- case JAVA_8: return "edu.rice.cs.drjava.model.compiler.Javac170Compiler";
- case JAVA_7: return "edu.rice.cs.drjava.model.compiler.Javac170Compiler";
- case JAVA_6: {
- switch (version.vendor()) {
- case OPENJDK: return "edu.rice.cs.drjava.model.compiler.Javac160OpenJDKCompiler";
- case UNKNOWN: return null;
- default: return "edu.rice.cs.drjava.model.compiler.Javac160Compiler";
- }
- }
- case JAVA_5: return "edu.rice.cs.drjava.model.compiler.Javac150Compiler";
- default: return null;
- }
+ public static String adapterForCompiler(JavaVersion.FullVersion version) {
+ return "edu.rice.cs.drjava.model.compiler.Javac170Compiler";
+ /* formerly the following */
+// switch (version.majorVersion()) {
+// case FUTURE: return "edu.rice.cs.drjava.model.compiler.Javac170Compiler";
+// case JAVA_8: return "edu.rice.cs.drjava.model.compiler.Javac170Compiler";
+// case JAVA_7: return "edu.rice.cs.drjava.model.compiler.Javac170Compiler";
+// case JAVA_6: {
+// switch (version.vendor()) {
+// case OPENJDK: return "edu.rice.cs.drjava.model.compiler.Javac160OpenJDKCompiler";
+// case UNKNOWN: return null;
+// default: return "edu.rice.cs.drjava.model.compiler.Javac160Compiler";
+// }
+// }
+// case JAVA_5: return "edu.rice.cs.drjava.model.compiler.Javac150Compiler";
+// default: return null;
+// }
}
- public static String adapterForDebugger(JavaVersion.FullVersion version) {
- switch (version.majorVersion()) {
- case FUTURE:
- case JAVA_8:
- case JAVA_7:
- case JAVA_6:
- case JAVA_5: return "edu.rice.cs.drjava.model.debug.jpda.JPDADebugger";
- default: return null;
- }
+ public static String adapterForDebugger(JavaVersion.FullVersion version) {
+ return "edu.rice.cs.drjava.model.debug.jpda.JPDADebugger";
+ /* formerly */
+// switch (version.majorVersion()) {
+// case FUTURE:
+// case JAVA_8:
+// case JAVA_7:
+// case JAVA_6:
+// case JAVA_5: return "edu.rice.cs.drjava.model.debug.jpda.JPDADebugger";
+// default: return null;
+// }
}
protected static CompilerInterface getCompilerInterface(String className, FullVersion version) {
diff --git a/drjava/src/edu/rice/cs/drjava/model/JarJDKToolsLibrary.java b/drjava/src/edu/rice/cs/drjava/model/JarJDKToolsLibrary.java
index 8bc7a6db6..e0f073ba0 100644
--- a/drjava/src/edu/rice/cs/drjava/model/JarJDKToolsLibrary.java
+++ b/drjava/src/edu/rice/cs/drjava/model/JarJDKToolsLibrary.java
@@ -1,6 +1,6 @@
/* BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -148,12 +148,12 @@ public static JarJDKToolsLibrary makeFromFile(File f, GlobalModel model, JDKDesc
}
/** Create a JarJDKToolsLibrary from a specific {@code "tools.jar"} or {@code "classes.jar"} file.
- * @param f the .jar file from which to create the JDK tools library
- * @param model the global model
- * @param desc a JDKDescriptor
- * @param additionalBootClassPath the boot classpath
- * @return the newly-created JarJDKToolsLibrary
- */
+ * @param f the .jar file from which to create the JDK tools library
+ * @param model the global model
+ * @param desc a JDKDescriptor
+ * @param additionalBootClassPath the boot classpath
+ * @return the newly-created JarJDKToolsLibrary
+ */
public static JarJDKToolsLibrary makeFromFile(File f, GlobalModel model, JDKDescriptor desc,
List additionalBootClassPath) {
assert desc != null;
@@ -226,8 +226,8 @@ else if (f.getName().equals("tools.jar")) {
try {
Class>[] sig = { FullVersion.class, String.class, List.class };
Object[] args = { version, f.toString(), bootClassPath };
- // JDKToolsLibrary._log.log("classpath for compiler: " + IterUtil.multilineToString(path));
- // JDKToolsLibrary._log.log("boot classpath for compiler: " + IterUtil.multilineToString(bootClassPath));
+ // JDKToolsLibrary.msg("classpath for compiler: " + IterUtil.multilineToString(path));
+ // JDKToolsLibrary.msg("boot classpath for compiler: " + IterUtil.multilineToString(bootClassPath));
CompilerInterface attempt = (CompilerInterface) ReflectUtil.loadLibraryAdapter(loader, path, compilerAdapter,
sig, args);
if (attempt.isAvailable()) { compiler = attempt; }
@@ -416,14 +416,13 @@ protected static LinkedHashMap> getDefaultSearchRoots()
String envJavaHome = null;
String programFiles = null;
String systemDrive = null;
- if (JavaVersion.CURRENT.supports(JavaVersion.JAVA_5)) {
+ if (JavaVersion.CURRENT.supports(JavaVersion.JAVA_8)) { /* formerly JavaVersion.JAVA_5 and later JavaVersion.JAVA_7 */
// System.getenv is deprecated under 1.3 and 1.4, and may throw a java.lang.Error (!),
// which we'd rather not have to catch
envJavaHome = System.getenv("JAVA_HOME");
programFiles = System.getenv("ProgramFiles");
systemDrive = System.getenv("SystemDrive");
}
- // To do: add OS query and filter additions depending on OS
// unwind out of potential JRE subdirectory
if (javaHome != null) {
@@ -447,43 +446,52 @@ protected static LinkedHashMap> getDefaultSearchRoots()
addIfDir(new File(programFiles), roots);
}
+ /* The following three lines were added to support OpenJDK8 on Windows 10/11. */
+ addIfDir(new File("/C:/Program Files/Zulu/zulu-8"), roots);
+ addIfDir(new File("/C:/Program Files (x86)/Zulu/zulu-8"), roots);
+ addIfDir(new File("/C:/Program Files/Amazon Corretto"), roots);
+
addIfDir(new File("/C:/Program Files/Java"), roots);
addIfDir(new File("/C:/Program Files (x86)/Java"), roots);
- addIfDir(new File("/C:/Program Files"), roots);
- addIfDir(new File("/C:/Program Files (x86)"), roots);
+// addIfDir(new File("/C:/Program Files"), roots);
+// addIfDir(new File("/C:/Program Files (x86)"), roots);
if (systemDrive != null) {
addIfDir(new File(systemDrive, "Java"), roots);
addIfDir(new File(systemDrive), roots);
}
- addIfDir(new File("/C:/Java"), roots);
- addIfDir(new File("/C:"), roots);
+// addIfDir(new File("/C:/Java"), roots);
+// addIfDir(new File("/C:"), roots);
/* Entries for Mac OS X */
addIfDir(new File("/System/Library/Java/JavaVirtualMachines"), roots);
addIfDir(new File("/Library/Java/JavaVirtualMachines"), roots);
// addIfDir(new File("/System/Library/Java/JavaVirtualMachines"), roots);
- /* Entries for Linux */
- addIfDir(new File("/usr/java"), roots);
- addIfDir(new File("/usr/j2se"), roots);
- addIfDir(new File("/usr"), roots);
- addIfDir(new File("/usr/local/java"), roots);
- addIfDir(new File("/usr/local/j2se"), roots);
- addIfDir(new File("/usr/local"), roots);
+// /* Entries for Linux */
+// addIfDir(new File("/usr/java"), roots);
+// addIfDir(new File("/usr/j2se"), roots);
+// addIfDir(new File("/usr"), roots);
+// addIfDir(new File("/usr/local/java"), roots);
+// addIfDir(new File("/usr/local/j2se"), roots);
+// addIfDir(new File("/usr/local"), roots);
/* Entries for Linux java packages */
addIfDir(new File("/usr/lib/jvm"), roots);
addIfDir(new File("/usr/lib/jvm/java-8-oracle"), roots);
addIfDir(new File("/usr/lib/jvm/java-8-openjdk"), roots);
- addIfDir(new File("/usr/lib/jvm/java-7-oracle"), roots);
- addIfDir(new File("/usr/lib/jvm/java-7-openjdk"), roots);
- addIfDir(new File("/usr/lib/jvm/java-6-sun"), roots);
- addIfDir(new File("/usr/lib/jvm/java-6-openjdk"), roots);
- addIfDir(new File("/usr/lib/jvm/java-1.5.0-sun"), roots);
+
+ /* Legacy versions of Java -- no longer supported */
+// addIfDir(new File("/usr/lib/jvm/java-7-oracle"), roots);
+// addIfDir(new File("/usr/lib/jvm/java-7-openjdk"), roots);
+// addIfDir(new File("/usr/lib/jvm/java-6-sun"), roots);
+// addIfDir(new File("/usr/lib/jvm/java-6-openjdk"), roots);
+// addIfDir(new File("/usr/lib/jvm/java-1.5.0-sun"), roots);
// addIfDir(new File("/home/javaplt/java/Linux-i686"), roots);
+ JDKToolsLibrary.msg("getDefaultSearchRoots() returning " + roots);
+
return roots;
}
@@ -496,7 +504,8 @@ protected static void searchRootsForJars(LinkedHashMap>
Predicate subdirFilter = LambdaUtil.or(IOUtil.regexCanonicalCaseFilePredicate("j2sdk.*"),
IOUtil.regexCanonicalCaseFilePredicate("jdk.*"),
LambdaUtil.or(IOUtil.regexCanonicalCaseFilePredicate("\\d+\\.\\d+\\.\\d+.*"),
- IOUtil.regexCanonicalCaseFilePredicate("java-.*")));
+ IOUtil.regexCanonicalCaseFilePredicate("java-.*"),
+ IOUtil.regexCanonicalCaseFilePredicate("zulu-.*")));
for (Map.Entry> root : roots.entrySet()) {
JDKToolsLibrary.msg("Searching root (for jar files): " + root.getKey());
for (File subdir : IOUtil.attemptListFilesAsIterable(root.getKey(), subdirFilter)) {
@@ -509,13 +518,12 @@ protected static void searchRootsForJars(LinkedHashMap>
}
}
- /** Check which jars are valid JDKs, and determine if they are compound or
- * full (non-compound) JDKs.
- * @param model the global model
- * @param jars the jar files
- * @param results container for valid full JDKs; populated by this function
- * @param compoundResults container for valid compound JDKs; populated by this function
- */
+ /** Check which jars are valid JDKs, and determine if they are compound or full (non-compound) JDKs.
+ * @param model the global model
+ * @param jars the jar files
+ * @param results container for valid full JDKs; populated by this function
+ * @param compoundResults container for valid compound JDKs; populated by this function
+ */
protected static void collectValidResults(GlobalModel model,
LinkedHashMap> jars,
Map> results,
@@ -548,12 +556,12 @@ protected static void collectValidResults(GlobalModel model,
}
/** Get completed compound JDKs by going through the list of compound JDKs
- * and finding full JDKs that complete them.
- * @param model the global model
- * @param collapsed iterator over collapsed JDKs
- * @param compoundCollapsed iterator over collapsed compound JDKs
- * @return completed compound JDKs
- */
+ * and finding full JDKs that complete them.
+ * @param model the global model
+ * @param collapsed iterator over collapsed JDKs
+ * @param compoundCollapsed iterator over collapsed compound JDKs
+ * @return completed compound JDKs
+ */
protected static Map>
getCompletedCompoundResults(GlobalModel model, Iterable collapsed,
Iterable compoundCollapsed) {
@@ -616,13 +624,12 @@ protected static void collectValidResults(GlobalModel model,
return completedResults;
}
- /** Produce a list of tools libraries discovered on the file system.
- * A variety of locations are searched; only those files that can produce a
- * valid library (see {@link #isValid} are returned. The result is sorted
- * by version. Where one library of the same version might be preferred
- * over another, the preferred library appears earlier in the result list.
- * @param model the global model
- * @return list of tools libraries discovered on the file system
+ /** Produce a list of tools libraries discovered on the file system. A variety of locations are searched; only those
+ * files that can produce a valid library (see {@link #isValid} are returned. The result is sorted by version.
+ * Where one library of the same version might be preferred over another, the preferred library appears earlier in
+ * the result list.
+ * @param model the global model
+ * @return list of tools libraries discovered on the file system
*/
public static Iterable search(GlobalModel model) {
JDKToolsLibrary.msg("---- Searching for Libraries ----");
@@ -688,7 +695,7 @@ public static Iterable search(GlobalModel model) {
* @param map map to which to add f
*/
private static void addIfDir(File f, Map super File, Set> map) {
- addIfDir(f, JDKDescriptor.NONE, map);
+ addIfDir(f, JDKDescriptor.JDK_DEFAULT, map);
}
/** Add a canonicalized {@code f} to the given set if it is an existing directory or link
@@ -715,7 +722,7 @@ private static void addIfDir(File f, JDKDescriptor c, Map super File, Set> map) {
- addIfFile(f, JDKDescriptor.NONE, map);
+ addIfFile(f, JDKDescriptor.JDK_DEFAULT, map);
}
/** Add a canonicalized {@code f} to the given set if it is an existing file
@@ -726,17 +733,17 @@ private static void addIfFile(File f, Map super File,Set> map)
private static void addIfFile(File f, JDKDescriptor c, Map super File,Set> map) {
addIfFile(f, Collections.singleton(c), map);
}
-
+
/** Add a canonicalized {@code f} to the given set if it is an existing file
- * @param f file to be added
- * @param cs set of JDKDescriptors
- * @param map map to which to add f
- */
+ * @param f file to be added
+ * @param cs set of JDKDescriptors
+ * @param map map to which to add f
+ */
private static void addIfFile(File f, Set cs, Map super File,Set> map) {
f = IOUtil.attemptCanonicalFile(f);
if (IOUtil.attemptIsFile(f)) {
Set set = map.get(f);
- if (set==null) {
+ if (set == null) {
set = new LinkedHashSet();
map.put(f, set);
}
@@ -755,14 +762,14 @@ private static void addIfFile(File f, Set cs, Map super File,Se
private static Iterable searchForJDKDescriptors() {
JDKToolsLibrary.msg("---- Searching for descriptors ----");
long t0 = System.currentTimeMillis();
- JDKToolsLibrary.msg("ms: "+t0);
+ JDKToolsLibrary.msg("ms: " + t0);
Iterable descriptors = IterUtil.empty();
try {
File f = edu.rice.cs.util.FileOps.getDrJavaFile();
JDKToolsLibrary.msg("drjava.jar: " + f);
if (f.isFile()) {
JarFile jf = new JarFile(f);
- JDKToolsLibrary.msg("jar file: " + jf);
+ JDKToolsLibrary.msg("jar file: " + jf.getManifest());
Enumeration entries = jf.entries();
while (entries.hasMoreElements()) {
JarEntry je = entries.nextElement();
diff --git a/drjava/src/edu/rice/cs/drjava/model/LightWeightParsingControl.java b/drjava/src/edu/rice/cs/drjava/model/LightWeightParsingControl.java
index 399282f6c..49a9e190c 100644
--- a/drjava/src/edu/rice/cs/drjava/model/LightWeightParsingControl.java
+++ b/drjava/src/edu/rice/cs/drjava/model/LightWeightParsingControl.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.util.List;
diff --git a/drjava/src/edu/rice/cs/drjava/model/LightWeightParsingListener.java b/drjava/src/edu/rice/cs/drjava/model/LightWeightParsingListener.java
index 992ae1487..aca5fa71f 100644
--- a/drjava/src/edu/rice/cs/drjava/model/LightWeightParsingListener.java
+++ b/drjava/src/edu/rice/cs/drjava/model/LightWeightParsingListener.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
/** Light-weight parsing visitor.
diff --git a/drjava/src/edu/rice/cs/drjava/model/MovingDocumentRegion.java b/drjava/src/edu/rice/cs/drjava/model/MovingDocumentRegion.java
index 1644ae56b..934d8ae94 100644
--- a/drjava/src/edu/rice/cs/drjava/model/MovingDocumentRegion.java
+++ b/drjava/src/edu/rice/cs/drjava/model/MovingDocumentRegion.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import java.util.List;
diff --git a/drjava/src/edu/rice/cs/drjava/model/MultiThreadedTestCase.java b/drjava/src/edu/rice/cs/drjava/model/MultiThreadedTestCase.java
index 9e6934f26..1b76d721f 100644
--- a/drjava/src/edu/rice/cs/drjava/model/MultiThreadedTestCase.java
+++ b/drjava/src/edu/rice/cs/drjava/model/MultiThreadedTestCase.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import edu.rice.cs.drjava.DrJavaTestCase;
@@ -54,7 +46,7 @@ public abstract class MultiThreadedTestCase extends DrJavaTestCase {
/** Initialize test state to not failed.
* @throws Exception This convention is mandated by the JUnit TestCase class which is an ancestor of this class.
*/
- public void setUp() throws Exception {
+ protected void setUp() throws Exception {
super.setUp();
_testFailed = false;
ExceptionHandler.ONLY.reset();
@@ -62,18 +54,17 @@ public void setUp() throws Exception {
}
/** If any test failed, print a message saying that some test failed in another thread (not the testing thread). */
- public void tearDown() throws Exception {
+ protected void tearDown() throws Exception {
ExceptionHandler.ONLY.rethrow();
if (_testFailed) fail("test failed in another thread");
DefinitionsPaneTest._log.log("MultithreadedTestCase.tearDown() calling super.tearDown()");
super.tearDown();
}
- /** This method prints the failure message to System.out and kills the JVM.
- * Just calling fail() doesn't always cause the test to fail, because the
- * listener is often called from another thread.
- * @param s the failure message
- */
+ /** This method prints the failure message to System.out and kills the JVM. Just calling fail() doesn't always cause
+ * the test to fail, because the listener is often called from another thread.
+ * @param s the failure message
+ */
protected static void listenerFail(String s) {
// StackTraceElement[] trace = Thread.getAllStackTraces().get(Thread.currentThread());
// System.err.println("TEST FAILED in a listener thread");
@@ -83,11 +74,10 @@ protected static void listenerFail(String s) {
fail(s);
}
- /** This method prints the failure message to System.out and kills the JVM.
- * Just calling fail() doesn't always cause the test to fail, because the
- * listener is often called from another thread.
- * @param t the exception whose trace should be printed
- */
+ /** This method prints the failure message to System.out and kills the JVM. Just calling fail() doesn't always cause
+ * the test to fail, because the listener is often called from another thread.
+ * @param t the exception whose trace should be printed
+ */
protected static void listenerFail(Throwable t) {
java.io.StringWriter sw = new java.io.StringWriter();
t.printStackTrace(new java.io.PrintWriter(sw));
diff --git a/drjava/src/edu/rice/cs/drjava/model/MultiThreadedTestCaseTest.java b/drjava/src/edu/rice/cs/drjava/model/MultiThreadedTestCaseTest.java
index 2d24aff8e..a3d70ec2d 100644
--- a/drjava/src/edu/rice/cs/drjava/model/MultiThreadedTestCaseTest.java
+++ b/drjava/src/edu/rice/cs/drjava/model/MultiThreadedTestCaseTest.java
@@ -1,46 +1,38 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
import edu.rice.cs.drjava.DrJavaTestCase;
import junit.framework.*;
/** Tests for MultiThreadedTestCase. */
-public class MultiThreadedTestCaseTest extends DrJavaTestCase {
+public class MultiThreadedTestCaseTest extends DrJavaTestCase {
public MultiThreadedTestCaseTest() { super(); }
public MultiThreadedTestCaseTest(String name) { super(name); }
@@ -52,13 +44,13 @@ public void testUncaught() {
public void run() { throw new RuntimeException(); }
});
t.start();
- join(t);
+ join(t); // waits for the new thread to finish
}
}
/** Uncaught exception in spawned thread. */
public void testUncaught() {
- TestResult tr = new Uncaught().run();
+ TestResult tr = new Uncaught().run(); // runs the tesXXX methods in the Uncaught TestCase object
assertEquals(1, tr.runCount());
assertEquals(1, tr.failureCount());
}
diff --git a/drjava/src/edu/rice/cs/drjava/model/OpenDefinitionsDocument.java b/drjava/src/edu/rice/cs/drjava/model/OpenDefinitionsDocument.java
index 7f8b474af..7a9ea807e 100644
--- a/drjava/src/edu/rice/cs/drjava/model/OpenDefinitionsDocument.java
+++ b/drjava/src/edu/rice/cs/drjava/model/OpenDefinitionsDocument.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model;
@@ -71,6 +63,7 @@ public interface OpenDefinitionsDocument extends DJDocument, FinalizableEric Shao-yu Cheng
* @version $Id$
*/
diff --git a/drjava/src/edu/rice/cs/drjava/model/cache/DCacheAdapter.java b/drjava/src/edu/rice/cs/drjava/model/cache/DCacheAdapter.java
index 734d28ab1..4a829aac4 100644
--- a/drjava/src/edu/rice/cs/drjava/model/cache/DCacheAdapter.java
+++ b/drjava/src/edu/rice/cs/drjava/model/cache/DCacheAdapter.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.cache;
import java.util.Set;
diff --git a/drjava/src/edu/rice/cs/drjava/model/cache/DDReconstructor.java b/drjava/src/edu/rice/cs/drjava/model/cache/DDReconstructor.java
index fe587f729..f4b7bc185 100644
--- a/drjava/src/edu/rice/cs/drjava/model/cache/DDReconstructor.java
+++ b/drjava/src/edu/rice/cs/drjava/model/cache/DDReconstructor.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.cache;
import edu.rice.cs.drjava.model.definitions.DefinitionsDocument;
diff --git a/drjava/src/edu/rice/cs/drjava/model/cache/DocumentCache.java b/drjava/src/edu/rice/cs/drjava/model/cache/DocumentCache.java
index 44edba524..ebc7a96fb 100644
--- a/drjava/src/edu/rice/cs/drjava/model/cache/DocumentCache.java
+++ b/drjava/src/edu/rice/cs/drjava/model/cache/DocumentCache.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.cache;
import javax.swing.event.DocumentListener;
diff --git a/drjava/src/edu/rice/cs/drjava/model/cache/DocumentCacheTest.java b/drjava/src/edu/rice/cs/drjava/model/cache/DocumentCacheTest.java
index 5fc65c0e4..a8b8691ad 100644
--- a/drjava/src/edu/rice/cs/drjava/model/cache/DocumentCacheTest.java
+++ b/drjava/src/edu/rice/cs/drjava/model/cache/DocumentCacheTest.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.cache;
import edu.rice.cs.drjava.DrJavaTestCase;
@@ -49,7 +41,7 @@
import java.util.HashMap;
import java.util.List;
-/** This used to extend GlobalModelTestCase, but now it extends just TestCase. Perhaps it should be changed back. */
+/** This test case formerly extended GlobalModelTestCase. Perhaps it should be changed back. */
public class DocumentCacheTest extends DrJavaTestCase {
private DefaultGlobalModel _model;
@@ -112,7 +104,7 @@ protected File tempFile(int i) throws IOException {
}
protected OpenDefinitionsDocument openFile(final File f) throws IOException {
- try{
+ try {
OpenDefinitionsDocument doc = _model.openFile(new FileOpenSelector() {
public File[] getFiles() { return new File[] {f}; }
});
diff --git a/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerError.java b/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerError.java
index c3ef355c0..550a5addb 100644
--- a/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerError.java
+++ b/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerError.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.compiler;
import java.io.File;
diff --git a/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerErrorModel.java b/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerErrorModel.java
index e614d3e42..7a7c7f636 100644
--- a/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerErrorModel.java
+++ b/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerErrorModel.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.compiler;
import java.io.File;
@@ -184,6 +176,9 @@ public CompilerErrorModel(DJError[] errors, GlobalModel model) {
Utilities.invokeLater(new Runnable() { public void run() { _calculatePositions(); } });
}
+ /** Accessor for errors field; only used in testing and debugging. */
+ public DJError[] getErrors() { return _errors; }
+
/** Accessor for errors maintained here.
* @param idx the index of the error to retrieve
* @return the error at index idx
@@ -355,7 +350,7 @@ private void _calculatePositions() {
}
else throw new UnexpectedException(e);
}
- if (document==null) {
+ if (document == null) {
do { curError++;}
while ((curError < _numErrors) && (_errors[curError].file().equals(file)));
//If the document couldn't be loaded, start the loop over at the top
diff --git a/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerErrorModelTest.java b/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerErrorModelTest.java
index b8e3ec039..d48e565c6 100644
--- a/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerErrorModelTest.java
+++ b/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerErrorModelTest.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
/** This class tests the internal functionality of CompilerErrorModel using a dummy implementation of the
* IGetDocuments interface.
*
diff --git a/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerEventNotifier.java b/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerEventNotifier.java
index 9a2e2d2fe..6b0e45f4c 100644
--- a/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerEventNotifier.java
+++ b/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerEventNotifier.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.compiler;
import java.io.File;
diff --git a/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerInterface.java b/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerInterface.java
index 67d9f6221..40c850d19 100644
--- a/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerInterface.java
+++ b/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerInterface.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.compiler;
import java.io.File;
@@ -89,8 +81,7 @@ List extends DJError> compile(List extends File> files, List extends File>
/** @return string to display in a combo box (generally {@code getName()}) */
String toString();
- /** A compiler can instruct DrJava to include additional elements for the boot
- * class path of the Interactions JVM.
+ /** A compiler can instruct DrJava to include additional elements for the boot class path of the Interactions JVM.
* @return list of files on the class path
*/
List additionalBootClassPathForInteractions();
diff --git a/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerListener.java b/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerListener.java
index 76a19bd49..d805a599f 100644
--- a/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerListener.java
+++ b/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerListener.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.compiler;
import java.io.File;
diff --git a/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerModel.java b/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerModel.java
index 97caa044b..0cd16c35e 100644
--- a/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerModel.java
+++ b/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerModel.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.compiler;
import java.io.IOException;
diff --git a/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerOptions.java b/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerOptions.java
index 49a91a51c..275ec7d67 100644
--- a/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerOptions.java
+++ b/drjava/src/edu/rice/cs/drjava/model/compiler/CompilerOptions.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.compiler;
import edu.rice.cs.drjava.config.*;
diff --git a/drjava/src/edu/rice/cs/drjava/model/compiler/DefaultCompilerModel.java b/drjava/src/edu/rice/cs/drjava/model/compiler/DefaultCompilerModel.java
index 86cd2199a..39a5a1bce 100644
--- a/drjava/src/edu/rice/cs/drjava/model/compiler/DefaultCompilerModel.java
+++ b/drjava/src/edu/rice/cs/drjava/model/compiler/DefaultCompilerModel.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.compiler;
import java.io.File;
@@ -233,14 +225,15 @@ private boolean _prepareForCompile() {
}
/** Compile the given documents.
- * @param docs the documents to be compiled
- * @throws IOException if an IO operation fails
- */
+ * @param docs the documents to be compiled
+ * @throws IOException if an IO operation fails
+ */
private void _doCompile(List docs) throws IOException {
_LLSTM.clearCache();
final ArrayList filesToCompile = new ArrayList();
final ArrayList excludedFiles = new ArrayList();
final ArrayList packageErrors = new ArrayList();
+
for (OpenDefinitionsDocument doc : docs) {
if (doc.isSourceFile()) {
File f = doc.getFile();
@@ -256,30 +249,24 @@ private void _doCompile(List docs) throws IOException {
else excludedFiles.add(doc.getFile());
}
+ if (filesToCompile.size() == 0)
+ packageErrors.add(new DJError("None of the documents in " + docs + " is a valid source file!", false));
+
Utilities.invokeLater(new Runnable() { public void run() { _notifier.compileStarted(); } });
try {
if (! packageErrors.isEmpty()) { _distributeErrors(packageErrors); }
- else {
- try {
- File buildDir = _model.getBuildDirectory();
- if (buildDir != null && buildDir != FileOps.NULL_FILE && ! buildDir.exists() && ! buildDir.mkdirs()) {
- throw new IOException("Could not create build directory: " + buildDir);
- }
-
-// File workDir = _model.getWorkingDirectory();
-// if (workDir == FileOps.NULL_FILE) workDir = null;
-// if (workDir != null && ! workDir.exists() && ! workDir.mkdirs()) {
-// throw new IOException("Could not create working directory: " + workDir);
-// }
-
- _compileFiles(filesToCompile, buildDir);
- }
- catch (Throwable t) {
- DJError err = new DJError(t.toString(), false);
- _distributeErrors(Arrays.asList(err));
- throw new UnexpectedException(t);
- }
+ else try {
+ File buildDir = _model.getBuildDirectory();
+ if (buildDir != null && buildDir != FileOps.NULL_FILE && ! buildDir.exists() && ! buildDir.mkdirs())
+ throw new IOException("Could not create build directory: " + buildDir);
+
+ _compileFiles(filesToCompile, buildDir);
+ }
+ catch (Throwable t) {
+ DJError err = new DJError(t.toString(), false);
+ _distributeErrors(Arrays.asList(err));
+ throw new UnexpectedException(t);
}
}
finally {
diff --git a/drjava/src/edu/rice/cs/drjava/model/compiler/DummyCompilerListener.java b/drjava/src/edu/rice/cs/drjava/model/compiler/DummyCompilerListener.java
index d6930bfa8..648e18f42 100644
--- a/drjava/src/edu/rice/cs/drjava/model/compiler/DummyCompilerListener.java
+++ b/drjava/src/edu/rice/cs/drjava/model/compiler/DummyCompilerListener.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.compiler;
import java.io.File;
diff --git a/drjava/src/edu/rice/cs/drjava/model/compiler/Javac160FilteringCompiler.java b/drjava/src/edu/rice/cs/drjava/model/compiler/Javac160FilteringCompiler.java
index ad19b47e3..843dfab7f 100644
--- a/drjava/src/edu/rice/cs/drjava/model/compiler/Javac160FilteringCompiler.java
+++ b/drjava/src/edu/rice/cs/drjava/model/compiler/Javac160FilteringCompiler.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.compiler;
import java.util.List;
diff --git a/drjava/src/edu/rice/cs/drjava/model/compiler/JavacCompiler.java b/drjava/src/edu/rice/cs/drjava/model/compiler/JavacCompiler.java
index 140eb7776..9b6ad5740 100644
--- a/drjava/src/edu/rice/cs/drjava/model/compiler/JavacCompiler.java
+++ b/drjava/src/edu/rice/cs/drjava/model/compiler/JavacCompiler.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.compiler;
import java.util.List;
@@ -56,7 +48,7 @@
/** An abstract parent for all javac-based compiler interfaces. Manages the auxiliary naming methods.
* To support loading via reflection, all subclasses are assumed to have a public constructor with
* a matching signature.
- * @version $Id: JavacCompiler.java 5611 2012-07-25 15:03:33Z rcartwright $
+ * @version $Id$
*/
public abstract class JavacCompiler implements CompilerInterface {
@@ -67,12 +59,10 @@ public abstract class JavacCompiler implements CompilerInterface {
/** The set of class names that are run as ACM Java Task Force library programs. */
protected static final Set ACM_PROGRAM_CLASSES = new HashSet();
static {
- Collections.addAll(ACM_PROGRAM_CLASSES, new String[] {
- "acm.program.Program",
- "acm.graphics.GTurtle"
- });
+ Collections.addAll(ACM_PROGRAM_CLASSES, new String[] {"acm.program.Program", "acm.graphics.GTurtle"});
}
+ /** Standard Constructor */
protected JavacCompiler(JavaVersion.FullVersion version, String location, List extends File> defaultBootClassPath) {
_version = version;
_location = location;
@@ -172,7 +162,7 @@ public static void runCommand(String s, Class> c) throws Throwable {
if (!m.getReturnType().equals(void.class)) { m = null; }
}
catch (java.lang.NoSuchMethodException e) { m = null; }
- if (m==null) {
+ if (m == null) {
java.applet.Applet instance = null;
if (args.length == 0) {
try {
@@ -191,7 +181,7 @@ public static void runCommand(String s, Class> c) throws Throwable {
System.err.println("Error: Please turn off 'Smart Run' or use 'java' command instead of 'run'.");
}
}
- if (instance==null) {
+ if (instance == null) {
try {
// try String[] constructor next
Constructor> ctor = c.getConstructor(String[].class);
@@ -210,7 +200,7 @@ public static void runCommand(String s, Class> c) throws Throwable {
}
}
}
- if (instance==null) {
+ if (instance == null) {
System.err.println("Static Error: This applet does not have a default constructor or a constructor "+
"accepting String[].");
return;
@@ -234,7 +224,7 @@ public static void runCommand(String s, Class> c) throws Throwable {
return;
}
}
- if (instance==null) {
+ if (instance == null) {
System.err.println("Static Error: This applet does not have a constructor accepting String[].");
return;
}
@@ -448,7 +438,7 @@ public String getOpenAllFilesInFolderExtension() {
// " if (!m.getReturnType().equals(void.class)) { m = null; }\n" +
// " }\n" +
// " catch (java.lang.NoSuchMethodException e) { m = null; }\n" +
-// " if (m==null) {\n" +
+// " if (m == null) {\n" +
// " java.applet.Applet instance = null;\n" +
// " boolean fail = false;\n");
// if (args.length == 0) {
@@ -469,7 +459,7 @@ public String getOpenAllFilesInFolderExtension() {
// " System.err.println(\"Error: Please turn off 'Smart Run' or use 'java' command instead of 'run'.\");\n" +
// " }\n" +
// " }\n" +
-// " if (instance==null) {\n" +
+// " if (instance == null) {\n" +
// " try {\n" +
// " // try String[] constructor next\n" +
// " java.lang.reflect.Constructor ctor = c.getConstructor(String[].class);\n" +
@@ -488,7 +478,7 @@ public String getOpenAllFilesInFolderExtension() {
// " }\n" +
// " }\n" +
// " }\n" +
-// " if (!fail && (instance==null)) {\n" +
+// " if (!fail && (instance == null)) {\n" +
// " System.err.println(\"Error: This applet does not have a default constructor or a constructor \"+\n" +
// " \"accepting String[].\");\n" +
// " fail = true;\n" +
@@ -513,14 +503,14 @@ public String getOpenAllFilesInFolderExtension() {
// " fail = true;\n" +
// " }\n" +
// " }\n" +
-// " if (!fail && (instance==null)) {\n" +
+// " if (!fail && (instance == null)) {\n" +
// " System.err.println(\"Error: This applet does not have a constructor accepting String[].\");\n" +
// " fail = true;\n" +
// " }\n");
// }
// command.append(
// " if (!fail) { edu.rice.cs.plt.swing.SwingUtil.showApplet(instance, 400, 300); }\n" +
-// " } // if (m==null)\n" +
+// " } // if (m == null)\n" +
// "} // if (isApplet)\n" +
// "else {\n" +
// " try {\n" +
diff --git a/drjava/src/edu/rice/cs/drjava/model/compiler/JavaxToolsCompiler.java b/drjava/src/edu/rice/cs/drjava/model/compiler/JavaxToolsCompiler.java
new file mode 100644
index 000000000..963910832
--- /dev/null
+++ b/drjava/src/edu/rice/cs/drjava/model/compiler/JavaxToolsCompiler.java
@@ -0,0 +1,435 @@
+package edu.rice.cs.drjava.model.compiler;
+
+import edu.rice.cs.drjava.DrJava;
+import edu.rice.cs.drjava.config.OptionConstants;
+import edu.rice.cs.drjava.model.DJError;
+import edu.rice.cs.drjava.model.DrJavaFileUtils;
+import edu.rice.cs.drjava.ui.SmartSourceFilter;
+import edu.rice.cs.plt.reflect.JavaVersion;
+import edu.rice.cs.util.ArgumentTokenizer;
+
+import javax.swing.filechooser.FileFilter;
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.util.*;
+import javax.tools.*; /* including ToolProvider, StandardLocation, DiagnosticCollector */
+
+/** The CompilerInterface for the javax.tools compiler embedded in the executing JVM.
+ * Manages the auxiliary naming methods.(?)
+ */
+
+public class JavaxToolsCompiler implements CompilerInterface {
+ /** The set of class names that are run as ACM Java Task Force library programs. */
+ protected static final Set ACM_PROGRAM_CLASSES = new HashSet();
+ static {
+ Collections.addAll(ACM_PROGRAM_CLASSES, new String[] {"acm.program.Program", "acm.graphics.GTurtle"});
+ }
+ private final JavaCompiler compiler;
+
+ /** Standard Constructor */
+ public JavaxToolsCompiler() { this.compiler = ToolProvider.getSystemJavaCompiler(); }
+
+ public boolean isAvailable() { return this.compiler != null; }
+
+ public List extends DJError> compile(List extends File> files, List extends File> classPath,
+ List extends File> sourcePath, File destination,
+ List extends File> bootClassPath, String sourceVersion, boolean showWarnings) {
+ // Check if compiler is available
+ if (compiler == null) {
+ List errors = new ArrayList<>();
+ errors.add(new DJError("The SystemJavaCompiler is not available", false));
+ return errors;
+ }
+
+ // Set up the file manager
+ StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null);
+
+ // Set the classpath, source path, and bootclasspath
+ try {
+ if (classPath != null) {
+ fileManager.setLocation(StandardLocation.CLASS_PATH, classPath);
+ }
+ if (sourcePath != null) {
+ fileManager.setLocation(StandardLocation.SOURCE_PATH, sourcePath);
+ }
+ if (bootClassPath != null) {
+ fileManager.setLocation(StandardLocation.PLATFORM_CLASS_PATH, bootClassPath);
+ }
+ } catch (IOException e) {
+ List errors = new ArrayList<>();
+ errors.add(new DJError("Error setting paths: " + e.getMessage(), false));
+ return errors;
+ }
+
+ // Convert files to a format the compiler understands
+ Iterable extends JavaFileObject> compilationUnits = fileManager.getJavaFileObjectsFromFiles(files);
+
+ // Prepare the compilation options
+ /* Question (by Corky): is the "-source" option necessary? The JavaxTools compiler is part of the executing JVM. */
+ List optionList = new ArrayList<>();
+ if (sourceVersion != null) {
+ optionList.add("-source");
+ optionList.add(sourceVersion);
+ }
+ if (destination != null) {
+ try {
+ fileManager.setLocation(StandardLocation.CLASS_OUTPUT, Collections.singletonList(destination));
+ } catch (IOException e) {
+ List errors = new ArrayList<>();
+ errors.add(new DJError("Error setting build directory: " + e.getMessage(), false));
+ return errors;
+ }
+ // This doesn't work for javax.tools compiler
+ // optionList.add("-d");
+ // optionList.add(destination.getAbsolutePath());
+ }
+
+ // Prepare a diagnostic collector to collect compile errors
+ DiagnosticCollector diagnostics = new DiagnosticCollector<>();
+
+ // Create a compilation task
+ JavaCompiler.CompilationTask task = compiler.getTask(null, fileManager, diagnostics, optionList, null, compilationUnits);
+
+ // Perform the compile task
+ boolean success = task.call();
+
+ // Process diagnostics to create DJError list
+ List errors = new ArrayList<>();
+ for (Diagnostic extends JavaFileObject> diagnostic : diagnostics.getDiagnostics()) {
+ DJError error = new DJError(new File(diagnostic.getSource().toUri()),
+ (int) diagnostic.getLineNumber() - 1, // DJError adds 1 to this number.
+ (int) diagnostic.getColumnNumber() - 1, // Fixes the cursor position offset.
+ diagnostic.getMessage(null),
+ diagnostic.getKind() == Diagnostic.Kind.ERROR);
+ errors.add(error);
+ }
+
+ // If compilation failed and no errors were reported, add a generic error message
+ if (!success && errors.isEmpty()) {
+ errors.add(new DJError("Compilation failed with unknown error", true));
+ }
+
+ return errors;
+ }
+ /* Question (Corky): Shouldn't we retreive the version of this System (JVM). */
+ public JavaVersion version() { return JavaVersion.JAVA_8; }
+
+ public String getName() { return "javax.tools"; }
+
+ public String getDescription() { return "Standard compiler in javax.tools"; }
+
+ public String toString() { return getName(); }
+
+ public List additionalBootClassPathForInteractions() { return Collections.emptyList(); }
+
+ /** Transform the command line to be interpreted into something the Interactions JVM can use.
+ * This replaces "java MyClass a b c" with Java code to call MyClass.main(new String[]{"a","b","c"}).
+ * "import MyClass" is not handled here.
+ * transformCommands should support at least "run", "java" and "applet".
+ * @param interactionsString unprocessed command line
+ * @return command line with commands transformed */
+ public String transformCommands(String interactionsString) {
+ if (interactionsString.startsWith("java ")) {
+ interactionsString = transformJavaCommand(interactionsString);
+ }
+ else if (interactionsString.startsWith("applet ")) {
+ interactionsString = transformAppletCommand(interactionsString);
+ }
+ else if (interactionsString.startsWith("run ")) {
+ interactionsString = transformRunCommand(interactionsString);
+ }
+ return interactionsString;
+ }
+
+ public static String transformJavaCommand(String s) {
+ // check the return type and public access before executing, per bug #1585210
+ String command =
+ "try '{'\n" +
+ " java.lang.reflect.Method m = {0}.class.getMethod(\"main\", java.lang.String[].class);\n" +
+ " if (!m.getReturnType().equals(void.class)) throw new java.lang.NoSuchMethodException();\n" +
+ "'}'\n" +
+ "catch (java.lang.NoSuchMethodException e) '{'\n" +
+ " throw new java.lang.NoSuchMethodError(\"main\");\n" +
+ "'}'\n" +
+ "{0}.main(new String[]'{'{1}'}');";
+ return _transformCommand(s, command);
+ }
+
+ public static String transformAppletCommand(String s) {
+ return _transformCommand(s,"edu.rice.cs.plt.swing.SwingUtil.showApplet(new {0}({1}), 400, 300);");
+ }
+
+ /** This method performs the "smart run". Unfortunately, we don't get the right static error messages.
+ * @param s full command line, i.e. "run MyClass 1 2 3"
+ * @param c class to be run, i.e. MyClass.class
+ * @throws Throwable if something goes wrong
+ */
+ public static void runCommand(String s, Class> c) throws Throwable {
+ if (s.endsWith(";")) s = _deleteSemiColon(s);
+ List tokens = ArgumentTokenizer.tokenize(s, true);
+ String[] args = new String[tokens.size() - 2];
+ for (int i = 2; i < tokens.size(); i++) {
+ String t = tokens.get(i);
+ args[i - 2] = t.substring(1, t.length() - 1);
+ }
+
+ boolean isProgram = false;
+ boolean isApplet = false;
+ Class> oldC = c;
+ while(c != null) {
+ if (ACM_PROGRAM_CLASSES.contains(c.getName())) { isProgram = true; break; }
+ c = c.getSuperclass();
+ }
+ c = oldC;
+ if (!isProgram) {
+ try {
+ // if this doesn't throw, c is a subclass of Applet
+ c.asSubclass(java.applet.Applet.class);
+ isApplet = true;
+ } catch(ClassCastException cce) { }
+ }
+
+ java.lang.reflect.Method m = null;
+ if (isApplet) {
+ try {
+ m = c.getMethod("main", java.lang.String[].class);
+ if (!m.getReturnType().equals(void.class)) { m = null; }
+ }
+ catch (java.lang.NoSuchMethodException e) { m = null; }
+ if (m == null) {
+ java.applet.Applet instance = null;
+ if (args.length == 0) {
+ try {
+ // try default (nullary) constructor first
+ Constructor> ctor = c.getConstructor();
+ instance = java.applet.Applet.class.cast(ctor.newInstance());
+ }
+ catch(NoSuchMethodException | InstantiationException | IllegalAccessException nsme) {
+ instance = null;
+ }
+ catch(java.lang.reflect.InvocationTargetException ite) {
+ if (ite.getCause()!=null) {
+ throw ite.getCause();
+ }
+ else {
+ System.err.println("Error: Please turn off 'Smart Run' or use 'java' command instead of 'run'.");
+ }
+ }
+ if (instance == null) {
+ try {
+ // try String[] constructor next
+ Constructor> ctor = c.getConstructor(String[].class);
+ instance = java.applet.Applet.class.cast(ctor.newInstance(new Object[] { new String[0] }));
+ }
+ catch(NoSuchMethodException | InstantiationException | IllegalAccessException nsme) {
+ instance = null;
+ }
+ catch(java.lang.reflect.InvocationTargetException ite) {
+ if (ite.getCause()!=null) {
+ throw ite.getCause();
+ }
+ else {
+ System.err.println("Error: Please turn off 'Smart Run' or use 'java' command instead of 'run'.");
+ return;
+ }
+ }
+ }
+ if (instance == null) {
+ System.err.println("Static Error: This applet does not have a default constructor or a constructor "+
+ "accepting String[].");
+ return;
+ }
+ }
+ else {
+ try {
+ // try String[] constructor
+ Constructor> ctor = c.getConstructor(String[].class);
+ instance = java.applet.Applet.class.cast(ctor.newInstance(new Object[] { args }));
+ }
+ catch(NoSuchMethodException | InstantiationException | IllegalAccessException nsme) {
+ instance = null;
+ }
+ catch(java.lang.reflect.InvocationTargetException ite) {
+ if (ite.getCause()!=null) {
+ throw ite.getCause();
+ }
+ else {
+ System.err.println("Error: Please turn off 'Smart Run' or use 'java' command instead of 'run'.");
+ return;
+ }
+ }
+ if (instance == null) {
+ System.err.println("Static Error: This applet does not have a constructor accepting String[].");
+ return;
+ }
+ }
+ edu.rice.cs.plt.swing.SwingUtil.showApplet(instance, 400, 300);
+ }
+ }
+ else {
+ try {
+ m = c.getMethod("main", java.lang.String[].class);
+ if (!m.getReturnType().equals(void.class)) {
+ System.err.println("Static Error: This class does not have a static void main method accepting String[].");
+ m = null;
+ }
+ }
+ catch (java.lang.NoSuchMethodException e) {
+ System.err.println("Static Error: This class does not have a static void main method accepting String[].");
+ m = null;
+ }
+ }
+ if (m != null) {
+ if (isProgram) {
+ String[] newArgs = new String[args.length+1];
+ newArgs[0] = "code="+c.getName();
+ System.arraycopy(args, 0, newArgs, 1, args.length);
+ args = newArgs;
+ }
+ try {
+ m.setAccessible(true);
+ m.invoke(null, new Object[] { args });
+ }
+ catch(SecurityException | IllegalAccessException se) {
+ System.err.println("Error: Please turn off 'Smart Run' or use 'java' command instead of 'run'.");
+ }
+ catch(java.lang.reflect.InvocationTargetException ite) {
+ if (ite.getCause()!=null) {
+ throw ite.getCause();
+ }
+ else {
+ System.err.println("Error: Please turn off 'Smart Run' or use 'java' command instead of 'run'.");
+ }
+ }
+ }
+ }
+
+ /** This is a method that automatically detects if
+ * a) the class is an ACM Java Task Force program (subclass of acm.program.Program)
+ * b) an applet
+ * c) a class with a static main method
+ *
+ * If a), then DrJava inserts "code=MyClass" as argument 0.
+ * If b), then DrJava performs the same as "applet MyClass" (see above).
+ * If c), then DrJava executes MyClass.main (traditional java behavior).
+ *
+ * @param s the command to be transformed
+ * @return the transformed command
+ */
+ public String transformRunCommand(String s) {
+ if (s.endsWith(";")) s = _deleteSemiColon(s);
+ List args = ArgumentTokenizer.tokenize(s, true);
+ final String classNameWithQuotes = args.get(1); // this is "MyClass"
+ final String className =
+ classNameWithQuotes.substring(1, classNameWithQuotes.length() - 1); // removes quotes, becomes MyClass
+
+ // we pass MyClass.class just to get a "Static Error: Undefined class 'MyClass'"
+ String ret = JavacCompiler.class.getName()+".runCommand(\""+s.toString()+"\", "+className+".class)";
+ // System.out.println(ret);
+ return ret;
+ }
+
+ /** Assumes a trimmed String. Returns a string of the call that the interpreter can use.
+ * The arguments get formatted as comma-separated list of strings enclosed in quotes.
+ * Example: _transformCommand("java MyClass arg1 arg2 arg3", "{0}.main(new String[]'{'{1}'}');")
+ * returns "MyClass.main(new String[]{\"arg1\",\"arg2\",\"arg3\"});"
+ * NOTE: the command to run is constructed using {@link java.text.MessageFormat}. That means that certain characters,
+ * single quotes and curly braces, for example, are special. To write single quotes, you need to double them.
+ * To write curly braces, you need to enclose them in single quotes. Example:
+ * MessageFormat.format("Abc {0} ''foo'' '{'something'}'", "def") returns "Abc def 'foo' {something}".
+ * @param s the command line, either "java MyApp arg1 arg2 arg3" or "applet MyApplet arg1 arg2 arg3"
+ * @param command the command to execute, with {0} marking the place for the class name and {1} the place for the arguments
+ * @return the transformed command
+ */
+ protected static String _transformCommand(String s, String command) {
+ if (s.endsWith(";")) s = _deleteSemiColon(s);
+ List args = ArgumentTokenizer.tokenize(s, true);
+ final String classNameWithQuotes = args.get(1); // this is "MyClass"
+ final String className = classNameWithQuotes.substring(1, classNameWithQuotes.length() - 1); // removes quotes, becomes MyClass
+ final StringBuilder argsString = new StringBuilder();
+ boolean seenArg = false;
+ for (int i = 2; i < args.size(); i++) {
+ if (seenArg) argsString.append(",");
+ else seenArg = true;
+ argsString.append(args.get(i));
+ }
+ return java.text.MessageFormat.format(command, className, argsString.toString());
+ }
+
+ /** Deletes the last character of a string. Assumes semicolon at the end, but does not check. Helper
+ * for _transformCommand(String,String).
+ * @param s the String containing the semicolon
+ * @return a substring of s with one less character
+ */
+ protected static String _deleteSemiColon(String s) { return s.substring(0, s.length() - 1); }
+
+// public boolean isSourceFileForThisCompiler(File f) {
+// if (f == null) return false;
+// String fileName = f.getName();
+// return fileName.endsWith(".java") || fileName.endsWith(".dj");
+// }
+
+ /** .java {@literal -->} true
+ * .dj {@literal -->} true
+ * .dj0 {@literal -->} true
+ * .dj1 {@literal -->} true
+ * .dj2 {@literal -->} true
+ * otherwise false
+ * @return true if the specified file is a source file for this compiler. */
+ public boolean isSourceFileForThisCompiler(File f) {
+ // by default, use DrJavaFileUtils.isSourceFile
+ return DrJavaFileUtils.isSourceFile(f);
+ }
+
+// public Set getSourceFileExtensions() {
+// HashSet extensions = new HashSet();
+// extensions.add("java");
+// return extensions;
+// }
+
+ /** Return the set of source file extensions that this compiler supports.
+ * @return the set of source file extensions that this compiler supports. */
+ public Set getSourceFileExtensions() { return DrJavaFileUtils.getSourceFileExtensions(); }
+
+// public String getSuggestedFileExtension() { return ".java"; }
+
+ /** Return the suggested file extension that will be appended to a file without extension.
+ * @return the suggested file extension */
+ public String getSuggestedFileExtension() { return DrJavaFileUtils.getSuggestedFileExtension(); }
+
+ /** Return a file filter that can be used to open files this compiler supports.
+ * @return file filter for appropriate source files for this compiler */
+ public FileFilter getFileFilter() { return new SmartSourceFilter(); }
+
+// public String getOpenAllFilesInFolderExtension() {
+// // Should we use OptionConstants for this?
+// return ".java";
+// }
+
+ /** Return the extension of the files that should be opened with the "Open Folder..." command.
+ * @return file extension for the "Open Folder..." command for this compiler. */
+ public String getOpenAllFilesInFolderExtension() {
+ return OptionConstants.LANGUAGE_LEVEL_EXTENSIONS[DrJava.getConfig().getSetting(OptionConstants.LANGUAGE_LEVEL)];
+ }
+
+ /** Return the set of keywords that should be highlighted in the specified file.
+ * @param f file for which to return the keywords
+ * @return the set of keywords that should be highlighted in the specified file. */
+ public Set getKeywordsForFile(File f) { return new HashSet<>(JAVA_KEYWORDS); }
+
+ /** Set of Java/GJ keywords for special coloring. */
+ public static final HashSet JAVA_KEYWORDS = new HashSet<>();
+ static {
+ final String[] words = {
+ "import", "native", "package", "goto", "const", "if", "else", "switch", "while", "for", "do", "true", "false",
+ "null", "this", "super", "new", "instanceof", "return", "static", "synchronized", "transient", "volatile",
+ "final", "strictfp", "throw", "try", "catch", "finally", "throws", "extends", "implements", "interface", "class",
+ "break", "continue", "public", "protected", "private", "abstract", "case", "default", "assert", "enum"
+ };
+ Collections.addAll(JAVA_KEYWORDS, words);
+ }
+
+ /** @return true since this compiler can be used in conjunction with the language level facility. */
+ public boolean supportsLanguageLevels() { return true; }
+}
\ No newline at end of file
diff --git a/drjava/src/edu/rice/cs/drjava/model/compiler/LanguageLevelStackTraceMapper.java b/drjava/src/edu/rice/cs/drjava/model/compiler/LanguageLevelStackTraceMapper.java
index de10e8448..dfdfd83c6 100644
--- a/drjava/src/edu/rice/cs/drjava/model/compiler/LanguageLevelStackTraceMapper.java
+++ b/drjava/src/edu/rice/cs/drjava/model/compiler/LanguageLevelStackTraceMapper.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.compiler;
import java.io.File;
@@ -276,7 +268,7 @@ public TreeMap readLLBlock(File LLFile) {
try { rdLine = bufReader.readLine(); } catch(java.io.IOException e){ }
- if(rdLine.indexOf("//") != 0) mapSize = 0; // Kills the for loop if read line is not of correct format
+ if (rdLine.indexOf("//") != 0) mapSize = 0; // Kills the for loop if read line is not of correct format
TreeMap map = new TreeMap();
diff --git a/drjava/src/edu/rice/cs/drjava/model/compiler/NoCompilerAvailable.java b/drjava/src/edu/rice/cs/drjava/model/compiler/NoCompilerAvailable.java
index 2b0b21b5a..fcc45e6d2 100644
--- a/drjava/src/edu/rice/cs/drjava/model/compiler/NoCompilerAvailable.java
+++ b/drjava/src/edu/rice/cs/drjava/model/compiler/NoCompilerAvailable.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.compiler;
import java.io.File;
@@ -79,6 +71,8 @@ public List extends DJError> compile(List extends File> files, List extend
@Override
public String toString() { return "None"; }
+ /** A compiler can instruct DrJava to include additional elements for the boot
+ * class path of the Interactions JVM. This isn't necessary for the Java compilers, though. */
public List additionalBootClassPathForInteractions() { return Arrays.asList(); }
/** Transform the command line to be interpreted into something the Interactions JVM can use.
diff --git a/drjava/src/edu/rice/cs/drjava/model/coverage/CoverageMetadata.java b/drjava/src/edu/rice/cs/drjava/model/coverage/CoverageMetadata.java
index e8ff05380..d760f9522 100644
--- a/drjava/src/edu/rice/cs/drjava/model/coverage/CoverageMetadata.java
+++ b/drjava/src/edu/rice/cs/drjava/model/coverage/CoverageMetadata.java
@@ -1,6 +1,6 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
+ * Copyright (c) 2001-2017, JavaPLT group at Rice University (drjava@rice.edu)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -39,20 +39,16 @@
import java.io.Serializable;
public class CoverageMetadata implements Serializable {
-
- private boolean doCoverage;
- private String outputDirectory;
-
- public CoverageMetadata(boolean doCoverage, String outputDirectory) {
- this.doCoverage = doCoverage;
- this.outputDirectory = outputDirectory;
- }
-
- public boolean getFlag() {
- return this.doCoverage;
- }
-
- public String getOutdirPath() {
- return this.outputDirectory;
- }
+
+ private boolean doCoverage;
+ private String outputDirectory;
+
+ public CoverageMetadata(boolean doCoverage, String outputDirectory) {
+ this.doCoverage = doCoverage;
+ this.outputDirectory = outputDirectory;
+ }
+
+ public boolean getFlag() { return this.doCoverage; }
+
+ public String getOutdirPath() { return this.outputDirectory; }
}
diff --git a/drjava/src/edu/rice/cs/drjava/model/coverage/JacocoClassLoader.java b/drjava/src/edu/rice/cs/drjava/model/coverage/JacocoClassLoader.java
new file mode 100644
index 000000000..d06a7dc4e
--- /dev/null
+++ b/drjava/src/edu/rice/cs/drjava/model/coverage/JacocoClassLoader.java
@@ -0,0 +1,139 @@
+/*BEGIN_COPYRIGHT_BLOCK
+ *
+ * Copyright (c) 2001-2017, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO: PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
+ *
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://github.com/DrJavaAtRice/drjava.
+ *
+ * This file is derived from code created for SETTE: Symbolic Execution based Test Tool Evaluator by Budapest University
+ * of Technology and Economics (BME). The following comments document the licensing terms for this code base.
+ *
+ * SETTE is a tool to help the evaluation and comparison of symbolic execution based test input
+ * generator tools.
+ *
+ * Budapest University of Technology and Economics (BME)
+ *
+ * Authors: Lajos Cseppentő , Zoltán Micskei
+ *
+ * Copyright 2014-2015
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
+ * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations under the License.
+ *
+ * END_COPYRIGHT_BLOCK*/
+
+package edu.rice.cs.drjava.model.coverage;
+
+
+import java.io.File;
+import java.io.IOException;
+
+import java.lang.ClassLoader;
+
+import edu.rice.cs.plt.io.IOUtil;
+import edu.rice.cs.util.Log;
+import edu.rice.cs.util.FileOps;
+import edu.rice.cs.util.IterableOps;
+import edu.rice.cs.util.UnexpectedException;
+
+import org.jacoco.core.instr.Instrumenter;
+
+/** A class loader that instruments classes for code coverage.
+ * @version $Id$
+ */
+public class JacocoClassLoader extends ClassLoader {
+
+ private static final Log _log = new Log("JUnitTestManager.txt", false);
+
+ private final File[] _binaryDirectories;
+ private final Instrumenter _instrumenter;
+
+ public JacocoClassLoader(Iterable binaryDirectories, Instrumenter instrumenter, ClassLoader parent) {
+ super(parent);
+
+ _binaryDirectories = IterableOps.toArray(binaryDirectories, File.class);
+ _instrumenter = instrumenter;
+
+ _log.log("JaCoCoClassLoader has been created");
+ }
+
+ @Override
+ protected Class> loadClass(String className, boolean resolve) throws ClassNotFoundException {
+
+ Class> javaClass = findLoadedClass(className);
+
+ if (javaClass != null) {
+ // class was already loaded (and instrumented if bytecode was found)
+ _log.log("The class " + className + " was already loaded");
+ return javaClass;
+ }
+
+ try {
+ // first try to load from one of the binary directories and instrument the class
+ File classFile = findBinaryFile(className);
+ if (classFile != null) {
+ _log.log("Found the class file " + classFile + " for the class " + className);
+ _log.log("Instrumenting and defining class: " + className);
+ final byte[] instrumentedBytes = _instrumenter.instrument(IOUtil.toByteArray(classFile), className);
+ final Class> definedClass = defineClass(className, instrumentedBytes, 0, instrumentedBytes.length);
+ _log.log("Returning instrumented class " + className);
+ return definedClass;
+ }
+ else {
+ // was not found, try to load with the parent, but it will not be instrumented
+ _log.log("Calling super.loadClass() for class " + className + " (corresponding file was not found by jacoco)");
+ return super.loadClass(className, resolve);
+ }
+ } catch (IOException ex) {
+ _log.log("In loading " + className + ", an IOException was thrown by jacoco", ex);
+ throw new UnexpectedException(ex);
+ }
+ }
+
+ public Class> tryLoadClass(String name) {
+ try { return loadClass(name); }
+ catch (ClassNotFoundException ex) { return null; }
+ }
+
+ /** Finds the corresponding binary file for the specified class.
+ * @param className the name of the class
+ * @return the binary file or null if it was not found
+ */
+ public File findBinaryFile(String className) {
+
+ // iterate binary directories in order
+ for (File dir : _binaryDirectories) {
+ File file = new File(dir, FileOps.classNameToClassFilename(className));
+ if (file.exists()) return file;
+ }
+
+ // not found
+ return null;
+ }
+}
diff --git a/drjava/src/edu/rice/cs/drjava/model/coverage/MemoryClassLoader.java b/drjava/src/edu/rice/cs/drjava/model/coverage/MemoryClassLoader.java
deleted file mode 100644
index 798d88fd5..000000000
--- a/drjava/src/edu/rice/cs/drjava/model/coverage/MemoryClassLoader.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package edu.rice.cs.drjava.model.coverage;
-
-import java.util.Map;
-import java.util.HashMap;
-import java.lang.ClassLoader;
-
-/**
- * A class loader that loads classes from in-memory data.
- */
-public class MemoryClassLoader extends ClassLoader {
-
- private final Map definitions =
- new HashMap();
-
- /**
- * Add a in-memory representation of a class.
- *
- * @param name name of the class
- * @param bytes class definition
- */
- public void addDefinition(final String name, final byte[] bytes) {
- definitions.put(name, bytes);
- }
-
- @Override
- protected Class> loadClass(final String name, final boolean resolve)
- throws ClassNotFoundException {
- final byte[] bytes = definitions.get(name);
- if (bytes != null) {
- return defineClass(name, bytes, 0, bytes.length);
- }
- return super.loadClass(name, resolve);
- }
-}
-
-
diff --git a/drjava/src/edu/rice/cs/drjava/model/coverage/ReportGenerator.java b/drjava/src/edu/rice/cs/drjava/model/coverage/ReportGenerator.java
index 66baa6de9..e34dc8f24 100644
--- a/drjava/src/edu/rice/cs/drjava/model/coverage/ReportGenerator.java
+++ b/drjava/src/edu/rice/cs/drjava/model/coverage/ReportGenerator.java
@@ -1,14 +1,12 @@
-/*******************************************************************************
+/* ******************************************************************************
* Copyright (c) 2009, 2014 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Brock Janiczak - initial API and implementation
- *
- *******************************************************************************/
+ * Brock Janiczak - initial API and implementation
+ * ******************************************************************************/
package edu.rice.cs.drjava.model.coverage;
import java.io.File;
@@ -19,181 +17,135 @@
import java.util.HashMap;
import java.util.ArrayList;
-import org.jacoco.core.analysis.Analyzer;
import org.jacoco.core.analysis.CoverageBuilder;
import org.jacoco.core.analysis.IBundleCoverage;
import org.jacoco.core.analysis.IClassCoverage;
import org.jacoco.core.analysis.ICounter;
import org.jacoco.core.data.ExecutionDataStore;
import org.jacoco.core.data.SessionInfoStore;
-import org.jacoco.core.instr.Instrumenter;
import org.jacoco.report.DirectorySourceFileLocator;
import org.jacoco.report.FileMultiReportOutput;
import org.jacoco.report.IReportVisitor;
import org.jacoco.report.html.HTMLFormatter;
-import edu.rice.cs.drjava.model.*;
-
-/**
- * This example creates a HTML report for eclipse like projects based on a
- * single execution data store called jacoco.exec. The report contains no
- * grouping information.
- *
- * The class files under test must be compiled with debug information, otherwise
- * source highlighting will not work.
- */
+/** This example creates a HTML report for eclipse like projects based on a single execution data store called
+ * jacoco.exec. The report contains no grouping information. The class files under test must be compiled with debug
+ * information, otherwise source highlighting will not work.
+ */
public class ReportGenerator {
-
- /* For building the coverage report */
- private CoverageBuilder coverageBuilder;
-
- /* The output directory in which to place the report */
- private final String reportDirectoryPath;
-
- /**
- * Simple constructor for a ReportGenerator; initializes fields based on
- * input parameters.
- *
- * @param reportDirectoryPath output directory in which to place the report
- * @param coverageBuilder object which builds the coverage report
- */
- public ReportGenerator(String reportDirectoryPath, CoverageBuilder coverageBuilder) {
- this.reportDirectoryPath = reportDirectoryPath;
- this.coverageBuilder = coverageBuilder;
- }
-
- /**
- * Given the coverage/execution information for the project rooted in the
- * input sourceDirectory, generates the coverage report for that project.
- * Does not return anything; instead, creates a tree of HTML files rooted
- * in this.reportDirectoryPath containing the coverage results.
- *
- * @param bundleCoverage coverage data
- * @param executionData execution data
- * @param sessionInfos session data
- * @param sourceDirectory the directory containing the project for which
- * the report is being gnenerated
- * @throws IOException if an IO operation fails
- */
- public void createReport(final IBundleCoverage bundleCoverage,
- ExecutionDataStore executionData, SessionInfoStore sessionInfos,
- File sourceDirectory) throws IOException {
-
- /* Create a concrete report visitor using the default configuration. */
- final HTMLFormatter htmlFormatter = new HTMLFormatter();
- final IReportVisitor visitor = htmlFormatter.
- createVisitor(new FileMultiReportOutput(new File(this.reportDirectoryPath)));
-
- /*
- * Initialize the report with all of the execution and session
- * information. At this point the report doesn't yet have any structure.
- */
- visitor.visitInfo(sessionInfos.getInfos(), executionData.getContents());
-
- /*
- * Populate the report structure with the bundle coverage information.
- * Call visitGroup if you need groups in your report.
- */
- visitor.visitBundle(bundleCoverage, new DirectorySourceFileLocator(
- sourceDirectory, "utf-8", 4));
- /*
- * Signal end of structure information to allow report to write all
- * information out.
- */
- visitor.visitEnd();
- }
-
- /**
- * Converts the input coverage status into the output color.
- *
- * @param status the status of the line (how well it was covered)
- * @return a color corresponding to the amount of coverage
+ /* For building the coverage report */
+ private CoverageBuilder coverageBuilder;
+
+ /* The output directory in which to place the report */
+ private final String reportDirectoryPath;
+
+ /** Simple constructor for a ReportGenerator; initializes fields based on input parameters.
+ * @param reportDirectoryPath output directory in which to place the report
+ * @param coverageBuilder object which builds the coverage report
+ */
+ public ReportGenerator(String reportDirectoryPath, CoverageBuilder coverageBuilder) {
+ this.reportDirectoryPath = reportDirectoryPath;
+ this.coverageBuilder = coverageBuilder;
+ }
+
+ /** Given the coverage/execution information for the project rooted in the input sourceDirectory, generates the
+ * coverage report for that project. Does not return anything; instead, creates a tree of HTML files rooted
+ * in this.reportDirectoryPath containing the coverage results.
+ * @param bundleCoverage coverage data
+ * @param executionData execution data
+ * @param sessionInfos session data
+ * @param sourceDirectory the directory containing the project for which
+ * the report is being gnenerated
+ * @throws IOException if an IO operation fails
+ */
+ public void createReport(final IBundleCoverage bundleCoverage, ExecutionDataStore executionData,
+ SessionInfoStore sessionInfos, File sourceDirectory) throws IOException {
+
+ /* Create a concrete report visitor using the default configuration. */
+ final HTMLFormatter htmlFormatter = new HTMLFormatter();
+ final IReportVisitor visitor = htmlFormatter.
+ createVisitor(new FileMultiReportOutput(new File(this.reportDirectoryPath)));
+
+ /* Initialize the report with all of the execution and session information. At this point the report doesn't yet
+ * have any structure.
*/
- private String getColor(final int status) {
-
- switch (status) {
- case ICounter.NOT_COVERED:
- return "red";
- case ICounter.PARTLY_COVERED:
- return "yellow";
- case ICounter.FULLY_COVERED:
- return "green";
- }
-
- /* Otherwise, this line contains no code, so don't color it */
- return "";
- }
-
- /**
- * Helper function which takes coverage data for a particular class and
- *
- *
- * @param cc the IClassCoverage object from which to get line colors
- * @return a list of colors, where the i-th element in the list
- * corresponds to the i-th line of code
+ visitor.visitInfo(sessionInfos.getInfos(), executionData.getContents());
+
+ /* Populate the report structure with the bundle coverage information. Call visitGroup if you need groups in your
+ * report.
*/
- private ArrayList getLineColorsForClassHelper(IClassCoverage cc) {
-
- ArrayList lineColors = new ArrayList();
-
- /*
- * Begin by assigning no color to all of the lines before the first
- * actual line of code.
- */
- for (int i = 0; i < cc.getFirstLine(); i++) {
- lineColors.add("");
- }
-
- /* Next, get the color of the lines after the first code line. */
- for (int i = cc.getFirstLine(); i <= cc.getLastLine(); i++) {
- lineColors.add(getColor(cc.getLine(i).getStatus()));
- }
-
- return lineColors;
+ visitor.visitBundle(bundleCoverage, new DirectorySourceFileLocator(sourceDirectory, "utf-8", 4));
+
+ /* Signal end of structure information to allow report to write all information out. */
+ visitor.visitEnd();
+ }
+
+ /** Converts the input coverage status into the output color.
+ * @param status the status of the line (how well it was covered)
+ * @return a color corresponding to the amount of coverage
+ */
+ private String getColor(final int status) {
+
+ switch (status) {
+ case ICounter.NOT_COVERED: return "red";
+ case ICounter.PARTLY_COVERED: return "yellow";
+ case ICounter.FULLY_COVERED: return "green";
+ default: return ""; /* this line contains no code, so don't color it */
}
-
- /**
- * Given a class name, determines the color that each line in that
- * class should be colored (based on coverage results).
- *
- * @param className the class (/file) for which to get line colors
- * @return a list of colors, where the i-th element in the list
- * corresponds to the i-th line of code
- */
- public ArrayList getLineColorsForClass(String className) {
-
- /* Initialize it to empty, in case the className is invalid */
- ArrayList lineColors = new ArrayList();
-
- /* Search for the requested class */
- for (final IClassCoverage cc : this.coverageBuilder.getClasses()) {
-
- /* Found the class! Get the color of each line. */
- if (cc.getName().equals(className)) {
- lineColors = getLineColorsForClassHelper(cc);
- break;
- }
- }
-
- return lineColors;
+ }
+
+ /** Help function which takes coverage data for a particular class and returns a corresponding list of line colors.
+ * @param cc the IClassCoverage object from which to get line colors
+ * @return a list of colors, where the i-th element in the list corresponds to the i-th line of code
+ */
+ private ArrayList getLineColorsForClassHelper(IClassCoverage cc) {
+
+ ArrayList lineColors = new ArrayList();
+
+ /* Begin by assigning no color to all of the lines before the first actual line of code. */
+ for (int i = 0; i < cc.getFirstLine(); i++) lineColors.add("");
+
+ /* Next, get the color of the lines after the first code line. */
+ for (int i = cc.getFirstLine(); i <= cc.getLastLine(); i++) lineColors.add(getColor(cc.getLine(i).getStatus()));
+
+ return lineColors;
+ }
+
+ /** Given a class name, determines the color of each line in that class according to coverage results.
+ * @param className the class (/file) for which to get line colors
+ * @return a list of colors, where the i-th element in the list corresponds to the i-th line of code
+ */
+ public ArrayList getLineColorsForClass(String className) {
+
+ /* Initialize it to empty, in case the className is invalid */
+ ArrayList lineColors = new ArrayList();
+
+ /* Search for the requested class */
+ for (final IClassCoverage cc : this.coverageBuilder.getClasses()) {
+
+ /* Found the class! Get the color of each line. */
+ if (cc.getName().equals(className)) {
+ lineColors = getLineColorsForClassHelper(cc);
+ break;
+ }
}
-
- /**
- * Given a list of classes, determines the color of each line in each
- * class (based on coverage results).
- *
- * @return a mapping of class names to the line colors for that class
- */
- public Map> getAllLineColors() {
-
- Map> allLineColors = new HashMap>();
-
- for (final IClassCoverage cc : this.coverageBuilder.getClasses()) {
- allLineColors.put(cc.getName(), this.getLineColorsForClassHelper(cc));
- }
-
- return allLineColors;
+
+ return lineColors;
+ }
+
+ /** Given a list of classes, determines the color of each line in each class (based on coverage results).
+ * @return a mapping of class names to the line colors for that class
+ */
+ public Map> getAllLineColors() {
+
+ Map> allLineColors = new HashMap>();
+
+ for (final IClassCoverage cc : this.coverageBuilder.getClasses()) {
+ allLineColors.put(cc.getName(), this.getLineColorsForClassHelper(cc));
}
+
+ return allLineColors;
+ }
}
diff --git a/drjava/src/edu/rice/cs/drjava/model/debug/Breakpoint.java b/drjava/src/edu/rice/cs/drjava/model/debug/Breakpoint.java
index a15d764fd..7fe39f5b6 100644
--- a/drjava/src/edu/rice/cs/drjava/model/debug/Breakpoint.java
+++ b/drjava/src/edu/rice/cs/drjava/model/debug/Breakpoint.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.debug;
import edu.rice.cs.drjava.model.OrderedDocumentRegion;
diff --git a/drjava/src/edu/rice/cs/drjava/model/debug/DebugBreakpointData.java b/drjava/src/edu/rice/cs/drjava/model/debug/DebugBreakpointData.java
index 2eaf1d932..655ea2d1d 100644
--- a/drjava/src/edu/rice/cs/drjava/model/debug/DebugBreakpointData.java
+++ b/drjava/src/edu/rice/cs/drjava/model/debug/DebugBreakpointData.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.debug;
import java.io.File;
diff --git a/drjava/src/edu/rice/cs/drjava/model/debug/DebugEventNotifier.java b/drjava/src/edu/rice/cs/drjava/model/debug/DebugEventNotifier.java
index d8ce907c1..f3a8980d1 100644
--- a/drjava/src/edu/rice/cs/drjava/model/debug/DebugEventNotifier.java
+++ b/drjava/src/edu/rice/cs/drjava/model/debug/DebugEventNotifier.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.debug;
import edu.rice.cs.drjava.model.EventNotifier;
diff --git a/drjava/src/edu/rice/cs/drjava/model/debug/DebugException.java b/drjava/src/edu/rice/cs/drjava/model/debug/DebugException.java
index c62648f49..42b184c84 100644
--- a/drjava/src/edu/rice/cs/drjava/model/debug/DebugException.java
+++ b/drjava/src/edu/rice/cs/drjava/model/debug/DebugException.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.debug;
/** * Thrown when something goes wrong in the integrated debugger.
diff --git a/drjava/src/edu/rice/cs/drjava/model/debug/DebugListener.java b/drjava/src/edu/rice/cs/drjava/model/debug/DebugListener.java
index d5d2d9bc1..f15f954da 100644
--- a/drjava/src/edu/rice/cs/drjava/model/debug/DebugListener.java
+++ b/drjava/src/edu/rice/cs/drjava/model/debug/DebugListener.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.debug;
import edu.rice.cs.drjava.model.RegionManagerListener;
diff --git a/drjava/src/edu/rice/cs/drjava/model/debug/DebugModelCallback.java b/drjava/src/edu/rice/cs/drjava/model/debug/DebugModelCallback.java
index e29b1df35..0d8c0e19c 100644
--- a/drjava/src/edu/rice/cs/drjava/model/debug/DebugModelCallback.java
+++ b/drjava/src/edu/rice/cs/drjava/model/debug/DebugModelCallback.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.debug;
/** Callback interface which allows a Debugger to respond to events fired
diff --git a/drjava/src/edu/rice/cs/drjava/model/debug/DebugStackData.java b/drjava/src/edu/rice/cs/drjava/model/debug/DebugStackData.java
index 479f52298..702c56828 100644
--- a/drjava/src/edu/rice/cs/drjava/model/debug/DebugStackData.java
+++ b/drjava/src/edu/rice/cs/drjava/model/debug/DebugStackData.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.debug;
/** * Class for keeping track of a stack frame in the debugger.
diff --git a/drjava/src/edu/rice/cs/drjava/model/debug/DebugTestCase.java b/drjava/src/edu/rice/cs/drjava/model/debug/DebugTestCase.java
index 657ca886e..e599cf2c1 100644
--- a/drjava/src/edu/rice/cs/drjava/model/debug/DebugTestCase.java
+++ b/drjava/src/edu/rice/cs/drjava/model/debug/DebugTestCase.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.debug;
import edu.rice.cs.drjava.model.*;
@@ -107,7 +99,7 @@ public abstract class DebugTestCase extends GlobalModelTestCase {
/* 3 */ "\n" +
/* 4 */ " Thread t = new Thread(){\n" +
/* 5 */ " public void run(){\n" +
- /* 6 */ " try{\n" +
+ /* 6 */ " try {\n" +
/* 7 */ " Thread.sleep(1000);\n" +
/* 8 */ " }\n" +
/* 9 */ " catch(InterruptedException e){\n" +
@@ -115,12 +107,12 @@ public abstract class DebugTestCase extends GlobalModelTestCase {
/* 11 */ " System.out.println(\"I\'m a thread! Yeah!\");\n" +
/* 12 */ " }\n" +
/* 13 */ " };\n" +
- /* 14 */ " try{\n" +
+ /* 14 */ " try {\n" +
/* 15 */ " t.start();\n" +
/* 16 */ " System.out.println(\"I just woke up. I\'m a big boy now.\");\n" +
/* 17 */ " System.out.println(\"James likes bananas!\");\n" +
/* 18 */ " System.out.println(\"Yes they do.\");\n" +
- /* 19 */ " }catch(Exception e){\n" +
+ /* 19 */ " } catch(Exception e){\n" +
/* 20 */ " e.printStackTrace();\n" +
/* 21 */ " }\n" +
/* 22 */ " }\n" +
@@ -255,14 +247,12 @@ public void tearDown() throws Exception {
super.tearDown();
}
- /** Ensures that the given object will wait for n notifications. Callers must
- * call o.wait() AFTER this is called. Use _notifyLock instead of
- * o.notify() when using this method. Only one object (o) can use this
- * synchronization protocol at a time, since it uses a field to store the
- * number of pending notifications.
- * @param n The number of times to be "notified" through _notifyLock
- * @throws InterruptedException if execution is interrupted unexpectedly
- */
+ /** Ensures that the given object will wait for n notifications. Callers must call o.wait() AFTER this is called.
+ * Use _notifyLock instead of o.notify() when using this method. Only one object (o) can use this synchronization
+ * protocol at a time, since it uses a field to store the number of pending notifications.
+ * @param n The number of times to be "notified" through _notifyLock
+ * @throws InterruptedException if execution is interrupted unexpectedly
+ */
protected void _setPendingNotifies(int n) throws InterruptedException {
synchronized(_notifierLock) {
_log.log("Waiting for " + n + " notifications ...");
diff --git a/drjava/src/edu/rice/cs/drjava/model/debug/DebugThreadData.java b/drjava/src/edu/rice/cs/drjava/model/debug/DebugThreadData.java
index 0527bdf31..a4e8a5b26 100644
--- a/drjava/src/edu/rice/cs/drjava/model/debug/DebugThreadData.java
+++ b/drjava/src/edu/rice/cs/drjava/model/debug/DebugThreadData.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.debug;
/** * Class for keeping track of the currently running threads.
diff --git a/drjava/src/edu/rice/cs/drjava/model/debug/DebugWatchData.java b/drjava/src/edu/rice/cs/drjava/model/debug/DebugWatchData.java
index 5b3e938fb..78ad1fbc0 100644
--- a/drjava/src/edu/rice/cs/drjava/model/debug/DebugWatchData.java
+++ b/drjava/src/edu/rice/cs/drjava/model/debug/DebugWatchData.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.debug;
/** * Class for keeping track of watched fields and variables.
diff --git a/drjava/src/edu/rice/cs/drjava/model/debug/DebugWatchDataTest.java b/drjava/src/edu/rice/cs/drjava/model/debug/DebugWatchDataTest.java
index 5e3f07cf3..df0956bd0 100644
--- a/drjava/src/edu/rice/cs/drjava/model/debug/DebugWatchDataTest.java
+++ b/drjava/src/edu/rice/cs/drjava/model/debug/DebugWatchDataTest.java
@@ -1,75 +1,59 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.debug;
import edu.rice.cs.drjava.DrJavaTestCase;
diff --git a/drjava/src/edu/rice/cs/drjava/model/debug/Debugger.java b/drjava/src/edu/rice/cs/drjava/model/debug/Debugger.java
index 195aba7ce..9ef1fe62f 100644
--- a/drjava/src/edu/rice/cs/drjava/model/debug/Debugger.java
+++ b/drjava/src/edu/rice/cs/drjava/model/debug/Debugger.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.debug;
import java.util.ArrayList;
@@ -57,17 +49,17 @@ public static enum StepType { STEP_INTO, STEP_OVER, STEP_OUT; }
public void removeListener(DebugListener listener);
/** Returns whether the debugger can be used in this copy of DrJava. This
- * does not indicate whether it is ready to be used, which is indicated
- * by isReady().
- * @return true if the debugger is available; false otherwise
- */
+ * does not indicate whether it is ready to be used, which is indicated
+ * by isReady().
+ * @return true if the debugger is available; false otherwise
+ */
public boolean isAvailable();
public DebugModelCallback callback();
/** Attaches the debugger to the Interactions JVM to prepare for debugging.
- * @throws DebugException if an error occurs during startup
- */
+ * @throws DebugException if an error occurs during startup
+ */
public void startUp() throws DebugException;
/** Disconnects the debugger from the Interactions JVM and cleans up any state. */
diff --git a/drjava/src/edu/rice/cs/drjava/model/debug/LineNotExecutableException.java b/drjava/src/edu/rice/cs/drjava/model/debug/LineNotExecutableException.java
index 5f51e01cb..a745e36ee 100644
--- a/drjava/src/edu/rice/cs/drjava/model/debug/LineNotExecutableException.java
+++ b/drjava/src/edu/rice/cs/drjava/model/debug/LineNotExecutableException.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.debug;
/** * Thrown when a breakpoint is set on a line that's not executable.
diff --git a/drjava/src/edu/rice/cs/drjava/model/debug/NoDebuggerAvailable.java b/drjava/src/edu/rice/cs/drjava/model/debug/NoDebuggerAvailable.java
index a7d777d58..0a09f8128 100644
--- a/drjava/src/edu/rice/cs/drjava/model/debug/NoDebuggerAvailable.java
+++ b/drjava/src/edu/rice/cs/drjava/model/debug/NoDebuggerAvailable.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.debug;
import java.util.ArrayList;
diff --git a/drjava/src/edu/rice/cs/drjava/model/debug/jpda/DebugAction.java b/drjava/src/edu/rice/cs/drjava/model/debug/jpda/DebugAction.java
index 65a46e429..d38009ca7 100644
--- a/drjava/src/edu/rice/cs/drjava/model/debug/jpda/DebugAction.java
+++ b/drjava/src/edu/rice/cs/drjava/model/debug/jpda/DebugAction.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.debug.jpda;
import com.sun.jdi.request.*;
diff --git a/drjava/src/edu/rice/cs/drjava/model/debug/jpda/DebugContextTest.java b/drjava/src/edu/rice/cs/drjava/model/debug/jpda/DebugContextTest.java
index d7784ee27..a7ffae212 100644
--- a/drjava/src/edu/rice/cs/drjava/model/debug/jpda/DebugContextTest.java
+++ b/drjava/src/edu/rice/cs/drjava/model/debug/jpda/DebugContextTest.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
/* Debugger deactivated in DrScala */
//package edu.rice.cs.drjava.model.debug.jpda;
//
diff --git a/drjava/src/edu/rice/cs/drjava/model/debug/jpda/DebugTest.java b/drjava/src/edu/rice/cs/drjava/model/debug/jpda/DebugTest.java
index 486a8ce7f..85e1465ff 100644
--- a/drjava/src/edu/rice/cs/drjava/model/debug/jpda/DebugTest.java
+++ b/drjava/src/edu/rice/cs/drjava/model/debug/jpda/DebugTest.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
/* Debugger deactivated in DrScala */
//package edu.rice.cs.drjava.model.debug.jpda;
diff --git a/drjava/src/edu/rice/cs/drjava/model/debug/jpda/DocumentDebugAction.java b/drjava/src/edu/rice/cs/drjava/model/debug/jpda/DocumentDebugAction.java
index 7f6cbbdff..c731e5db1 100644
--- a/drjava/src/edu/rice/cs/drjava/model/debug/jpda/DocumentDebugAction.java
+++ b/drjava/src/edu/rice/cs/drjava/model/debug/jpda/DocumentDebugAction.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.debug.jpda;
import com.sun.jdi.*;
diff --git a/drjava/src/edu/rice/cs/drjava/model/debug/jpda/EventHandlerThread.java b/drjava/src/edu/rice/cs/drjava/model/debug/jpda/EventHandlerThread.java
index e61ba4ddf..e873bece8 100644
--- a/drjava/src/edu/rice/cs/drjava/model/debug/jpda/EventHandlerThread.java
+++ b/drjava/src/edu/rice/cs/drjava/model/debug/jpda/EventHandlerThread.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.debug.jpda;
import edu.rice.cs.util.Log;
diff --git a/drjava/src/edu/rice/cs/drjava/model/debug/jpda/JPDABreakpoint.java b/drjava/src/edu/rice/cs/drjava/model/debug/jpda/JPDABreakpoint.java
index 7e73d4b7c..204e41c9e 100644
--- a/drjava/src/edu/rice/cs/drjava/model/debug/jpda/JPDABreakpoint.java
+++ b/drjava/src/edu/rice/cs/drjava/model/debug/jpda/JPDABreakpoint.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.debug.jpda;
import edu.rice.cs.drjava.model.IDocumentRegion;
diff --git a/drjava/src/edu/rice/cs/drjava/model/debug/jpda/JPDADebugTestCase.java b/drjava/src/edu/rice/cs/drjava/model/debug/jpda/JPDADebugTestCase.java
index 1cb889a15..4e9542404 100644
--- a/drjava/src/edu/rice/cs/drjava/model/debug/jpda/JPDADebugTestCase.java
+++ b/drjava/src/edu/rice/cs/drjava/model/debug/jpda/JPDADebugTestCase.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.debug.jpda;
import edu.rice.cs.drjava.model.debug.DebugTestCase;
diff --git a/drjava/src/edu/rice/cs/drjava/model/debug/jpda/JPDADebugger.java b/drjava/src/edu/rice/cs/drjava/model/debug/jpda/JPDADebugger.java
index 2bb545181..fdd72b51c 100644
--- a/drjava/src/edu/rice/cs/drjava/model/debug/jpda/JPDADebugger.java
+++ b/drjava/src/edu/rice/cs/drjava/model/debug/jpda/JPDADebugger.java
@@ -1,39 +1,31 @@
/*BEGIN_COPYRIGHT_BLOCK
*
- * Copyright (c) 2001-2010, JavaPLT group at Rice University (drjava@rice.edu)
- * All rights reserved.
+ * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ * * Redistributions of source code must retain the above copyright notice, this list of conditions and the following
+ * disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
+ * following disclaimer in the documentation and/or other materials provided with the distribution.
+ * * Neither the names of DrJava, the JavaPLT group, Rice University, nor the names of its contributors may be used
+ * to endorse or promote products derived from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * This software is Open Source Initiative approved Open Source Software.
- * Open Source Initative Approved is a trademark of the Open Source Initiative.
+ * This software is Open Source Initiative approved Open Source Software. Open Source Initative Approved is a trademark
+ * of the Open Source Initiative.
*
- * This file is part of DrJava. Download the current version of this project
- * from http://www.drjava.org/ or http://sourceforge.net/projects/drjava/
+ * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ or
+ * http://sourceforge.net/projects/drjava/
*
* END_COPYRIGHT_BLOCK*/
-
package edu.rice.cs.drjava.model.debug.jpda;
import java.awt.EventQueue;
@@ -327,7 +319,7 @@ public void removeListener(DebugListener listener) {
throw new IllegalArgumentException("Given thread must be suspended.");
// threadRef.suspend();
//
-// try{
+// try {
// if ( threadRef.frameCount() <= 0 ) {
// printMessage(threadRef.name() + " could not be suspended. It had no stackframes.");
// _suspendedThreads.push(threadRef);
@@ -1080,21 +1072,18 @@ boolean setCurrentThread(ThreadReference thread) {
}
}
- /** Returns a Vector with the loaded ReferenceTypes for the given class name
- * (empty if the class could not be found). Makes no attempt to load the
- * class if it is not already loaded. If the lineNumber is not
- * DebugAction.ANY_LINE, this method ensures that the returned ReferenceTypes
- * contain the given lineNumber, searching through inner classes if necessary.
- * If no inner classes contain the line number, an empty Vector is returned.
- *
- * If custom class loaders are in use, multiple copies of the class
- * may be loaded, so all are returned.
- *
- * @param className the class name
- * @param lineNumber the line number
- * @return a vector with the loaded ReferenceTypes for the given class name
- */
- /* synchronized */ Vector getReferenceTypes(String className, int lineNumber) {
+ /** Returns a Vector with the loaded ReferenceTypes for the given class name (empty if the class could not be found).
+ * Makes no attempt to load the class if it is not already loaded. If the lineNumber is not DebugAction.ANY_LINE,
+ * this method ensures that the returned ReferenceTypes contain the given lineNumber, searching through inner classes
+ * if necessary. If no inner classes contain the line number, an empty Vector is returned.
+ *
+ * If custom class loaders are in use, multiple copies of the class may be loaded, so all are returned.
+ *
+ * @param className the class name
+ * @param lineNumber the line number
+ * @return a vector with the loaded ReferenceTypes for the given class name
+ */
+ Vector getReferenceTypes(String className, int lineNumber) {
assert EventQueue.isDispatchThread();
// Get all classes that match this name
List classes;
@@ -1453,14 +1442,14 @@ private void _hideWatches() {
String type = "";
// ArrayList arr_index = new ArrayList();
//
-// if(name.indexOf("[") != -1 && name.indexOf("]") != -1) {
+// if (name.indexOf("[") != -1 && name.indexOf("]") != -1) {
// name = name.substring(0, name.indexOf("["));
// arr_index.add(Integer.parseInt(w.getName().substring(w.getName().indexOf("[")+1, w.getName().indexOf("]"))));
-// if(w.getName().indexOf("]")<(w.getName().length()-1)) {
+// if (w.getName().indexOf("]")<(w.getName().length()-1)) {
// String iter = w.getName().substring(w.getName().indexOf("]")+1, w.getName().length());
// while(iter.indexOf("[") != -1 && iter.indexOf("]") != -1) {
// arr_index.add(Integer.parseInt(iter.substring(iter.indexOf("[")+1, iter.indexOf("]"))));
-// if(iter.indexOf("]")<(iter.length()-1))
+// if (iter.indexOf("]")<(iter.length()-1))
// iter = iter.substring(iter.indexOf("]")+1, iter.length());
// else
// iter = "";
@@ -1473,7 +1462,7 @@ private void _hideWatches() {
// indices[i] = arr_index.get(i);
// }
Pair