diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..f004f98f4 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +drjava/src/**/* ident diff --git a/.gitignore b/.gitignore index 8df17358f..24425b5b2 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,19 @@ *.sav *.new *.drjava +*.txt +*.log *~ +*.old +*.new +*.mine +*.alt +codecoverage drjava/classes drjava/drjava.jar +drjava/build.xml.* +drjava/coverage_report +scratch +.idea/ +*.iml +*.exec \ No newline at end of file diff --git a/README b/README deleted file mode 100644 index 92fc4d584..000000000 --- a/README +++ /dev/null @@ -1 +0,0 @@ -This is a test of merging between project repositories and the main repository. diff --git a/README.md b/README.md new file mode 100644 index 000000000..92047d980 --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +# OVERVIEW + +This code base is merely a continuation of the DrJava code base formerly hosted +at Sourceforge. We decided to shift from Subversion to Git for two reasons: + +1. Git is more flexible (and complex) than Subversion. +1. Second, and more importantly, Git appears to be the preferred repository and +version control system among software developers and our upper level students +are more familiar with Git than Subversion. + +# Future Extensions + +This repository also includes the unreleased pedagogic IDE +for Scala called DrScala, which we will release as soon as we can persuade the Scala developers +to fix a serious bug in the :require REPL command which we use to dynamically +add new paths to the REPL class path. + +# Distribution of binaries + +We will continue to distribute new releases of DrJava via Sourceforge to +preserve our distribution interface. The move from Subversion on Sourceforge +to Git on Github only concerns DrJava developers and others interested in the +DrJava code base. diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 000000000..ec1ff874f --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,2 @@ +docs +fo diff --git a/docs/src/developer/gettingStarted.docbook b/docs/src/developer/gettingStarted.docbook index 6274ea6aa..a996892d1 100644 --- a/docs/src/developer/gettingStarted.docbook +++ b/docs/src/developer/gettingStarted.docbook @@ -1,422 +1,667 @@ - + @version $Id: devdoc.docbook 3498 2006-01-17 22:36:31Z dlsmith $ --> - - Getting Started + Getting Started - This section provides a step-by-step tutorial for new DrJava developers on setting up a build environment and making modifications to the code base. It discusses much of the material only lightly, presenting just the essential information required to get everything working properly. Links are interspersed to more comprehensive treatment elsewhere. + This section provides a step-by-step tutorial for new DrJava developers + on setting up a build environment and making modifications to the code base. + It discusses much of the material only lightly, presenting just the essential + information required to get everything working properly. Links are + interspersed to more comprehensive treatment elsewhere. -
- Setting up Your Accounts -
- SourceForge - The DrJava project is hosted by SourceForge.net. We take advantage of SourceForge's source control, Web space, bug tracking, and mailing list features. Regardless of whether you will be committing code or not, we recommend registering for a SourceForge user account to provide a point of contact in the Tracker forums. If you will be a member of the DrJava development team, the project administrators will add your account to the project to allow you to commit code and respond to bugs and feature requests. - - If you don't already have a SourceForge user account, go to http://sourceforge.net and click on "Create Account"; follow the directions until your account is set up and you can log in to the site. +
Setting up Your Accounts
+ SourceForge The DrJava project is hosted by + SourceForge.net. We take advantage of SourceForge's source control, Web + space, bug tracking, and mailing list features. Regardless of whether you + will be committing code or not, we recommend registering for a SourceForge + user account to provide a point of contact in the Tracker forums. If you + will be a member of the DrJava development team, the project administrators + will add your account to the project to allow you to commit code and respond + to bugs and feature requests. If you + don't already have a SourceForge user account, go to http://sourceforge.net and click on + "Create Account"; follow the directions until your account is set up and you + can log in to the site. - Visit the DrJava project page. The "Tracker" and "Code" sections (you made need to click on "More" first) are particularly relevant. You should also follow the "Mailing Lists" link and consider subscribing to one of the mailing lists. drjava-hackers is a high-traffic list containing all initial bug and feature request posts; drjava-users is generally limited to messages announcing new development and stable application releases. + Visit the DrJava project + page. The "Tracker" and "Code" sections (you made need to + click on "More" first) are particularly relevant. You should also + follow the "Mailing Lists" link and consider subscribing to one of the + mailing lists. drjava-hackers is a high-traffic + list containing all initial bug and feature request posts; + drjava-users is generally limited to messages + announcing new development and stable application + releases. - If you are a member of the Rice DrJava development team, ask a project administrator to add you as a project member. - + If you are a member of the Rice DrJava development + team, ask a project administrator to add you as a project + member.
-
- Java PLT Group at Rice - For Rice students wishing to work with the DrJava developer team, you should also do the following: - - Get a Computer Science Department Unix account, if you don't already have one. This account is distinct from the Owlnet account given to all undergraduates, and will allow you to login and develop in the PLT computer lab. You can pick up an application from the department secretaries; have it signed by Corky Cartwright. - Subscribe to the drjava mailing list. You can do so here: https://mailman.rice.edu/mailman/listinfo/drjava-l. This list is the main electronic forum for communication among the team members (like a course discussion board). Feel free to post your ideas or ask for help here. - - -
+
Java PLT Group at Rice For Rice students + wishing to work with the DrJava developer team, you should also do the + following: Get a Computer Science Department + Unix account, if you don't already have one. This account is distinct from + the Owlnet account given to all undergraduates, and will allow you to login + and develop in the PLT computer lab. You can pick up an application from + the department secretaries; have it signed by Corky + Cartwright. Subscribe to the + drjava mailing list. You can do so here: https://mailman.rice.edu/mailman/listinfo/drjava-l. + This list is the main electronic forum for communication among the team + members (like a course discussion board). Feel free to post your ideas or + ask for help here.
-
- Installing Essential Software +
Installing Essential Software - You will need to have three programs properly installed and set up on any system you intend to use for development. These are the Sun Java Development Kit (for compilation), a Subversion client (to access the source code repository), and Apache Ant (for scripted building). + You will need to have three programs properly installed and set up on + any system you intend to use for development. These are the Sun Java + Development Kit or OpenJDK (for compilation), a Subversion or Git client + (to access the source code repository), and Apache Ant (for scripted + building). -
- Sun Java Development Kit - If it's not already installed on your system, you can download the JDK from Sun's Web site. You will need to have installed the JDK version 5 (note the distinction on the download pages between a Java Runtime Environment, which just contains the tools needed to run Java programs, and a Java Development Kit, which contains a compiler and other tools, in addition to the runtime application). You may also want to install JDK version 6. The DrJava sources depend on Java 5 (but not 6) language features and APIs. (Note: theoretically, any Java 5 compiler should be able to handle the DrJava sources. However, there are currently some dependencies on Sun's tools in the main DrJava code module, so you will need to have those tools available.) - - You should set up your command-line environment so that you can access the java and javac commands. See Command-Line Environment Settings for details. - - - Rice Java PLT - On the Rice Computer Science department network, various versions of the JDK are installed at /home/javaplt/java, organized by platform (such as Linux-i686) and then by version. - - - - Mac OS X - Java is built in to Mac OS X, which makes Apple, rather than Sun, the main source of core Java software for the platform. Java 5 is only supported since version 10.4 (Tiger) of the operating system, and Java 6 requires OS X 10.5 (Leopard) and a recent (64-bit Intel) machine. If you haven't done so already, you should install the Xcode Tools, distributed on CD or DVD with the OS, and also available from the Apple Developer Connection (free membership may be required). This will contain at least the Java 1.4 tools. If you need to, you can then dowload the Java 5 or Java 6 tools from the ADC Web site. To see what is currently installed, go to /System/Library/Frameworks/JavaVM.framework/Versions. - To select which version of Java is used to launch applications and to run command-line tools, run /Applications/Utilities/Java/Java Preferences. There is no need to manually adjust the PATH variable or manipulate symbolic links. - For more information on Java in OS X, see Apple's Java development page and, specifically, this FAQ. +
Sun Java Development Kit If + it's not already installed on your system, you can download the JDK from + Sun's Web site. You will need to + have installed the JDK version 8 (note the distinction on the download + pages between a Java Runtime Environment, which just + contains the tools needed to run Java programs, and a + Java Development Kit, which contains a compiler and + other tools, in addition to the runtime application). + + You should set up your command-line environment so that you can + access the java and javac commands. + See Command-Line Environment + Settings for details. + + Rice Java PLT On the Rice Computer Science + department network, various versions of the JDK are installed at + /home/javaplt/java, organized by platform (such as + Linux-i686) and then by version. + + Mac OS X As of OS X 10.7 (2011) + Java is no longer built into Mac OS X, so you'll have to install it + yourself. If you haven't done so already, you should install the Xcode + Tools, distributed on CD or DVD with the OS, and also available from the + Apple Developer + Connection (free membership is required). To see what is + currently installed, go to + /System/Library/Frameworks/JavaVM.framework/Versions. + + To select which version of Java is used to launch applications and + to run command-line tools, run + /Applications/Utilities/Java/Java Preferences. + There is no need to manually adjust the PATH variable + or manipulate symbolic links. For more information on Java + in OS X, see Apple's Java + development page and, specifically, this FAQ.
-
- Subversion Client - The DrJava source code is stored on a SourceForge server using Subversion. This allows changes to the sources to be tracked and permits a number of developers to work on different parts of the code at the same time. In order to access the source repository, you will need a Subversion client. See the Subversion Web site for links to a client for your platform. - - Your command-line path will need to be set up so that the svn command is available. See Command-Line Environment Settings for details. - - - Rice Java PLT - On the Rice Computer Science department network, the Subversion client is located at /home/javaplt/packages/subversion-1.5.4/bin. - - - - Mac OS X - Subversion is installed with recent versions of Xcode Tools. See the previous note for instructions on installing Xcode. After this installation, you can find out if you have Subversion by typing svn --version at the command line. +
Version Control Client + The DrJava source code is stored on a SourceForge server using + Subversion, and on GitHub using Git. This allows changes to the sources to + be tracked and permits a number of developers to work on different parts of + the code at the same time. In order to access the source repository, you + will need a Subversion client or a Git client. See the Subversion website or the + Git website for links to + a client for your platform. + + Your command-line path will need to be set up so that the + svn or git command is available. + See Command-Line Environment + Settings for details. + + Rice Java PLT On the Rice Computer Science + department network, the Subversion client is located at + /home/javaplt/packages/subversion-1.5.4/bin. -
+ + Mac OS X Subversion is installed with recent + versions of Xcode Tools. See the previous + note for instructions on installing Xcode. After this + installation, you can find out if you have Subversion by typing + svn --version at the command line. +
-
- Apache Ant - Ant is a build script interpreter — loosely a Java- and XML-based alternative to the make command on Unix systems. It can be downloaded from Apache's Web site. Decompress the package and copy the jakarta-ant-xxx folder to a convenient location (such as /usr/local, your home directory, or C:\Program Files). - - Once installed, you should follow Apache's installation recommendations for setting up your environment. See Command-Line Environment Settings for details. - - - Rice Java PLT - On the Rice Computer Science department network, Ant is available in the /home/javaplt/packages/apache-ant-1.x.x directories. - - - - Microsoft Windows (95, 98, & Me) - According to the Ant installation instructions, the ant executable script will not work correctly in older Windows systems if Ant is installed in a location with a long filename. They recommend creating a C:\ant directory. See the Ant Manual for details. - - - - Mac OS X - Ant is installed with the Xcode Tools. See the previous note for details. - +
Apache Ant Ant is a build + script interpreter — loosely a Java- and XML-based alternative to the + make command on Unix systems. It can be downloaded from + Apache's Web site. Decompress + the package and copy the jakarta-ant-xxx folder to a + convenient location (such as /usr/local, your home + directory, or C:\Program Files). + + Once installed, you should follow Apache's installation + recommendations for setting up your environment. See Command-Line Environment Settings + for details. + + Rice Java PLT On the Rice Computer Science + department network, Ant is available in the + /home/javaplt/packages/apache-ant-1.x.x + directories. + + + + Mac OS X Ant is installed with the Xcode + Tools. See the previous note for + details.
-
- Command-Line Environment Settings - - Once you've installed these programs on your system, you'll need to ensure that your command-line environment is set up properly. Because shells vary widely in the conventions they use, you may need to familiarize yourself with the idiosyncrasies of your particular platform. - - - Unix - On Unix systems, the environment variables can be set by modifying a login script file. Assuming you are running a bash shell, you can see how your environment is currently set up by typing env. You can also use which to test the PATH variable — for example, which ant will print a full path to the ant executable if Ant is correctly set up. It is important to check the current settings before making changes. - - To make changes to the default environment settings, edit (or create) the .bashrc file in your home directory to contain the needed declarations. (On some systems, such as Mac OS X or the Rice Owlnet network, you should use the .profile file instead.) Under bash, an environment variable is set with a command like the following: - - export ANT_HOME=/usr/local/ant - - Note that path-like variables (such as PATH and CLASSPATH) should use a colon (:) to delimit filenames. You can use a variable's value at any time (both in a later declaration and at the command line) with syntax like $ANT_HOME. - - After making changes, you will need to open a new terminal window before the settings will take effect. - - - - Microsoft Windows - Each version of Windows has a slightly different method for setting environment variables. In most cases, you can select System in the Control Panel (or choose Properties after right-clicking on My Computer), and then find a button for Environment Variables (usually on the Advanced tab). You may need to log out and back in before your settings will take effect. Note that path-like variables (such as PATH and CLASSPATH) should use a semicolon (;) to delimit filenames. You can use a variable's value at any time (both in a later declaration and at the command line) with syntax like $ANT_HOME [TODO: is this true?]. - - If you're using Cygwin (a Unix-like environment for Windows), many of the Unix instructions above are relevant. You could, for example, define the environment variables in a .bashrc file. However, it's probably best to use the system-wide Windows facilities (such as the Environment Variables dialog box) whenever possible. One problem you will encounter when using Cygwin is that Windows filenames and paths are formatted differently from Cygwin filenames and paths. Generally, Java applications (including Ant, with some exceptions) will only be able to handle Windows-style paths. On the other hand, some Cygwin programs expect Cygwin's Unix-like paths. To deal with this problem, you may need to thoroughly familiarize yourself with the cygpath command, which converts between the two formats. - - - The following table summarizes the variables and corresponding values that should be set up on your system: - - - +
Command-Line Environment + Settings + + Once you've installed these programs on your system, you'll need to + ensure that your command-line environment is set up properly. Because + shells vary widely in the conventions they use, you may need to + familiarize yourself with the idiosyncrasies of your particular + platform. + + *nix On Unix and Unix-like systems, the + environment variables can be set by modifying a login script file. + Assuming you are running a bash shell, you can see how + your environment is currently set up by typing env. + You can also use which to test the + PATH variable — for example, which + ant will print a full path to the ant + executable if Ant is correctly set up. It is important to check the + current settings before making changes. + + To make changes to the default environment settings, edit (or + create) the .bashrc file in your home directory to + contain the needed declarations. (On some systems, such as Mac OS X or + the Rice Owlnet network, you should use the + .profile file instead.) Under + bash, an environment variable is set with a command + like the following: + + export + ANT_HOME=/usr/local/ant + + Note that path-like variables (such as PATH and + CLASSPATH) should use a colon + (:) to delimit filenames. You can use a + variable's value at any time (both in a later declaration and at the + command line) with syntax like $ANT_HOME. + + After making changes, you will need to open a new terminal window + before the settings will take effect. + + Microsoft Windows We recommend using Ubuntu on + Windows. + + If you're using Cygwin (a Unix-like environment for Windows), + many of the *nix instructions above are relevant. You + could, for example, define the environment + variables in a .bashrc file. However, it's + probably best to use the system-wide Windows facilities (such as the + Environment Variables dialog box) whenever + possible. One problem you will encounter when using Cygwin is that + Windows filenames and paths are formatted differently from Cygwin + filenames and paths. Generally, Java applications (including Ant, with + some exceptions) will only be able to handle + Windows-style paths. On the other hand, some + Cygwin programs expect Cygwin's Unix-like paths. To deal with this + problem, you may need to thoroughly familiarize yourself with the + cygpath command, which converts between the two + formats. + + The following table summarizes the variables and corresponding + values that should be set up on your system: + + - - - Variable - Value - Notes - - + Variable Value + Notes - - JAVA5_HOME - Location of the Java 5 installation. The specified directory should have a bin subdirectory containing java, javac, javadoc, etc. - Required in order to locate the correct standard libraries when compiling. Rice CS: /home/javaplt/java/Linux-i686/1.5. + JAVA_HOME + Location of the Java installation. The specified + directory should have a bin subdirectory + containing java, javac, + javadoc, etc. Required in order + to locate the correct standard libraries when compiling. Rice + CS: + /home/javaplt/java/Linux-i686/1.5. - - JAVA6_HOME - Location of the Java 6 installation. The specified directory should have a bin subdirectory containing java, javac, javadoc, etc. - Optional; makes it possible to explicitly request that Java 6 be used by the Ant script when running or testing. Rice CS: /home/javaplt/java/Linux-i686/1.6. + - - ANT_HOME - Location of the Ant installation. The specified directory should contain the bin and lib subdirectories. - The Ant command generally needs this in order to work correctly (although on some platforms Ant will work fine without it). Rice CS: /home/javaplt/packages/ant. - + ANT_HOME Location + of the Ant installation. The specified directory should contain + the bin and lib + subdirectories. The Ant command generally needs + this in order to work correctly (although on some platforms Ant + will work fine without it). Rice CS: + /home/javaplt/packages/ant. - - PATH - For example, $PATH:$JAVA_HOME/bin:$ANT_HOME/bin. - You will want the ant command on your path, as it will be used often. The Ant script requires that java, javac, and svn be available from the command line. You may want to explore the current settings before you make any modifications. Note the use of previously-declared environment variables in this example. Also keep in mind that the first matching location for a command in the path will shadow all later matches. - + PATH For example, + $PATH:$JAVA_HOME/bin:$ANT_HOME/bin. + You will want the ant command on your + path, as it will be used often. The Ant script requires that + java, javac, and + svn be available from the command line. You + may want to explore the current settings before you make any + modifications. Note the use of previously-declared environment + variables in this example. Also keep in mind that the + first matching location for a command in the + path will shadow all later matches. - - - - + -
-
+
-
- Accessing and Modifying the Source Code +
Accessing and Modifying the Source + Code - Now that your development system is ready, you can get to work! These instructions will demonstrate some of the typical tasks you'll want to accomplish in browsing, building, and modifying the DrJava sources. + Now that your development system is ready, you can get to work! + These instructions will demonstrate some of the typical tasks you'll want + to accomplish in browsing, building, and modifying the DrJava + sources. -
- Downloading the Sources +
Downloading the Sources - You can use Subversion to get a copy of the DrJava source code. In Subversion terminology, downloading a fresh copy is (usually) synonymous with "checking out" the code. You can download the sources with the following command: + You can use Subversion or Git to get a copy of the DrJava source + code. In Subversion terminology, downloading a fresh copy is (usually) + synonymous with "checking out" the code; the corresponding operation with + Git is "cloning" the repository. You can download the sources with the + following commands: - svn co https://drjava.svn.sourceforge.net/svnroot/drjava/trunk/drjava - - A drjava directory will be created in your working directory, and Subversion will output the name of each file it downloads. - - Note that the above command only checks out part of the DrJava sources. The sources are divided into independent modules, each a subdirectory of trunk. Each module can be built, tested, and modified without the others. You can check out a different directory by simply modifying the URL given to Subversion. - - - While it is possible to check out the entire https://drjava.svn.sourceforge.net/svnroot/drjava directory, you should not do so! This top-level directory contains dozens of copies of the sources, including snapshots at various stages of development. If you download this directory, it will take a lot of time and disk space. - + $ svn co + https://drjava.svn.sourceforge.net/svnroot/drjava/trunk/drjava + + $ git clone + https://github.com/DrJavaAtRice/drjava.git + + A drjava directory will be created in your working + directory. Subversion will output the name of each file it downloads, + while Git will give you progress reports along the way. + + Note that the above Subversion command only checks out + part of the DrJava sources. The sources are divided + into independent modules, each a subdirectory of + trunk. Each module can be built, tested, and + modified without the others. You can check out a different directory by + simply modifying the URL given to Subversion. Git works on a different + model, and as such cannot clone only part of a repository; the above Git + command will include all of the sources. + + While it is possible to check out the entire + https://drjava.svn.sourceforge.net/svnroot/drjava + directory, it is not necessary. This top-level directory contains + dozens of copies of the sources, including snapshots at various stages + of development. If you download this directory, it will take a lot of + time and disk space. The full list of trunk's subdirectories includes: - - - drjava - The main application, containing the bulk of the code. Building this module will create the DrJava application. - + drjava + The main application, containing the bulk of the code. + Building this module will create the DrJava + application. - - dynamicjava - The DynamicJava interpreter, which implements the functionality behind the Interactions Pane. + dynamicjava + The DynamicJava interpreter, which implements the + functionality behind the Interactions Pane. - - javalanglevels - A Java preprocessor used to provide the Language Levels facility. - + javalanglevels + A Java preprocessor used to provide the Language + Levels facility. - - plt - General-purpose utility classes, including things that are "missing" from the Java API like predicates and tuples. - + plt + General-purpose utility classes, including things + that are "missing" from the Java API like predicates and + tuples. - - platform - A collection of platform-dependent code, such as the concrete compiler interfaces and special OS-specific GUI setup instructions. - + platform + A collection of platform-dependent code, such as the + concrete compiler interfaces and special OS-specific GUI setup + instructions. - - docs - The project documentation, including this document and end-user help files. - + docs + The project documentation, including this document + and end-user help files. - - eclipse - A wrapper for the interactions pane that allows it to be run as a plug-in to the Eclipse IDE. + eclipse + A wrapper for the interactions pane that allows it to + be run as a plug-in to the Eclipse IDE. - - jedit - A similar wrapper for the interactions pane in the JEdit IDE. - + jedit + A similar wrapper for the interactions pane in the + JEdit IDE. - - misc - Files that don't belong in a specific module. - + misc + Files that don't belong in a specific + module. - You may find it helpful to streamline the check-out process by creating an alias or a script file for the check-out command. + You may find it helpful to streamline the check-out process by + creating an alias or a script file for the check-out command.
-
- Building the Sources +
Building the Sources - In the drjava directory, you will find the file build.xml. This is the module's Ant script, containing instructions that automate a variety of development tasks. While in the drjava directory, enter: + In the drjava directory, you will find the + file build.xml. This is the module's Ant script, + containing instructions that automate a variety of development tasks. + While in the drjava directory, enter: - ant help + ant + help or just ant - The name help refers to an Ant target. Different targets can be used to accomplish different tasks, and they are often set up to recognize dependencies. For example, the test target recognizes its dependency on the compile target; when you ask Ant to run the tests, it will automatically compile them first. In this particular example, the help target (which is set up as the default when none is specified) simply prints a message about the script and the environment settings it expects. If an error occurs here, Ant may not be properly set up. + The name help refers to an Ant + target. Different targets can be used to + accomplish different tasks, and they are often set up to recognize + dependencies. For example, the test target + recognizes its dependency on the compile target; + when you ask Ant to run the tests, it will automatically compile them + first. In this particular example, the help target + (which is set up as the default when none is specified) simply prints a + message about the script and the environment settings it expects. If + an error occurs here, Ant may not be properly set up. Second, enter the following command: - ant -p + ant + -p - You will see a list of all the documented targets in the project. Note that, due to the dependencies between targets, the build target will run generate-source, compile, test, and jar. That is, it will do everything required to build and test a new application. Try it out: + You will see a list of all the documented targets in the project. Note + that, due to the dependencies between targets, the + build target will run + generate-source, compile, + test, and jar. That is, it will + do everything required to build and test a new application. Try it + out: - ant build + ant + build - The process will take awhile. Ant will generally log each action it takes to the console; you should make sure you can follow what's going on. Here's a summary of the major steps: + The process will take awhile. Ant will generally log each action it + takes to the console; you should make sure you can follow what's going + on. Here's a summary of the major steps: - - - <literal>generate-source</literal> - Performs any necessary preprocessing before the Java compiler is invoked. For example, a Version.java file is created so that a unique version number for this build will be accessible to the code (in particular, the DrJava application's About dialog box). - - - - - - <literal>do-compile</literal> - Invokes the javac compiler (the specific version used depends on your command path). Generated class files will be placed in a new classes directory, with the subdirectories base and test for standard and test classes, respectively. Any compiler errors or warnings will be printed to the console. Where warnings are expected, they will be tagged in the code with a @SuppressWarnings annotation. Thus, any warnings you see during compilation highlight a problem that should be addressed. - - + + <literal>generate-source</literal> Performs any + necessary preprocessing before the Java compiler is invoked. For + example, a Version.java file is created so that + a unique version number for this build will be accessible to the code + (in particular, the DrJava application's About + dialog box). + + <literal>do-compile</literal> + Invokes the javac compiler (the specific + version used depends on your command path). Generated class files + will be placed in a new classes directory, with + the subdirectories base and + test for standard and test classes, + respectively. Any compiler errors or warnings will be printed to the + console. Where warnings are expected, they will be tagged in the + code with a @SuppressWarnings annotation. Thus, + any warnings you see during compilation highlight a problem that + should be addressed. - - - <literal>unjar-libs</literal> - Expands the *.jar files in the lib directory into classes/lib. These library classes will be bundled with the finished product. - - - - - - <literal>test</literal> - Runs the JUnit tests in classes/test (the specific version of java used depends on your command path). This will constitute the bulk of the build time. A summary of the running time for each test will be logged, and if a failure occurs, testing will halt immediately. - - - - - - <literal>jar</literal> - Creates the drjava.jar file. This is the executable application. It will contain a MANIFEST.MF file listing the build's unique version number and your user name. - + <literal>unjar-libs</literal> + Expands the *.jar files in the + lib directory into + classes/lib. These library classes will be + bundled with the finished product. + + <literal>test</literal> + Runs the JUnit tests in classes/test (the + specific version of java used depends on your + command path). This will constitute the bulk of the build time. A + summary of the running time for each test will be logged, and if a + failure occurs, testing will halt immediately. - - - - Now that you've built the application, you can run it with the following command: - - java -jar drjava.jar - You can also run the application in some systems by double-clicking on the drjava.jar file. And the Ant script includes a variety of run commands that act as shortcuts: ant run-jar, for example, will compile, build a jar file, and run the application with assertions and error logging turned on. + <literal>jar</literal> + Creates the drjava.jar file. This is the + executable application. It will contain a + MANIFEST.MF file listing the build's unique + version number and your user name. + + + Now that you've built the application, you can run it with the + following command: + + java -jar + drjava.jar + + You can also run the application in some systems by double-clicking on + the drjava.jar file. And the Ant script includes + a variety of run commands that act as shortcuts: + ant run-jar, for example, will compile, build a jar + file, and run the application with assertions and error logging turned + on. - - Mac OS X - When you run the drjava.jar file, the DrJava GUI may not look quite right. This is because the official OS X application release wraps the jar file in some additional packaging and settings. However, all the essential functionality should still be there in your unofficial version. - -
+ Mac OS X When you run the + drjava.jar file, the DrJava GUI may not look quite + right. This is because the official OS X application release wraps the + jar file in some additional packaging and settings. However, all the + essential functionality should still be there in your unofficial + version.
-
- Modifying the Sources - - Once you've got a fresh copy of the sources and verified that they will build correctly, you're ready to start making modifications. The source files are stored in the src directory; you should be able to explore and edit them in any IDE or text editor. IDEs will be able to interface with the build script with various degrees of sophistication. If the IDE you use does not support Ant scripts (or you'd rather not bother with making it work properly), you can either do most of your building and testing from the command line, or do your "casual" development in the IDE, and just run the scripts when you are ready to commit a change. In the latter case, you'll want to keep a few things in mind: - - - It's best to consider the contents of the drjava directory transient — you will want to occasionally delete the directory completely and start from a fresh checkout. Thus, IDE-specific files like project descriptions are better stored somewhere else (unless you don't mind recreating them). +
Modifying the Sources + + Once you've got a fresh copy of the sources and verified that they + will build correctly, you're ready to start making modifications. The + source files are stored in the src directory; you + should be able to explore and edit them in any IDE or text editor. IDEs + will be able to interface with the build script with various degrees of + sophistication. If the IDE you use does not support Ant scripts (or + you'd rather not bother with making it work properly), you can either do + most of your building and testing from the command line, or do your + "casual" development in the IDE, and just run the scripts when you are + ready to commit a change. In the latter case, you'll want to keep a few + things in mind: + + It's best to consider the contents of + the drjava directory transient — you will want + to occasionally delete the directory completely and start from a fresh + checkout. Thus, IDE-specific files like project descriptions are + better stored somewhere else (unless you don't mind recreating + them). - By default, the javac compiler places the *.class files it generates in the same location as their sources. That approach clutters up the src directory significantly, and should be avoided. You should also avoid putting the compiled classes in one of the Ant script's target locations (such as classes/base), as that might lead to confusing behavior when you invoke the script later. The best option is to either create a classes/ide-name directory in which to place your classes, or just store the IDE-compiled classes somewhere else entirely. + By default, the javac compiler + places the *.class files it generates in the + same location as their sources. That approach clutters up the + src directory significantly, and should be + avoided. You should also avoid putting the compiled classes in one + of the Ant script's target locations (such as + classes/base), as that might lead to confusing + behavior when you invoke the script later. The best option is to + either create a + classes/ide-name + directory in which to place your classes, or just store the + IDE-compiled classes somewhere else entirely. - Your IDE's classpath should contain all the jar files in the lib directory (but not the lib/buildlib directory, with the exception of lib/buildlib/junit.jar). + Your IDE's classpath should contain all the jar files + in the lib directory (but not the + lib/buildlib directory, with the exception of + lib/buildlib/junit.jar). - You'll need to invoke the generate-source Ant target before you attempt to compile in the IDE (that is, unless the files have already been generated). Otherwise, some sources will be missing and the compilation will fail. Some IDEs may also have trouble with these files occasionally disappearing and reappearing, so you might want to ensure that the sources are in a consistent state before opening or closing the IDE application. + You'll need to invoke the + generate-source Ant target before you attempt to + compile in the IDE (that is, unless the files have already been + generated). Otherwise, some sources will be missing and the + compilation will fail. Some IDEs may also have trouble with these + files occasionally disappearing and reappearing, so you might want to + ensure that the sources are in a consistent state before opening or + closing the IDE application. - - If you're using Eclipse, see the Eclipse section for instructions on setting up a project. - - To get oriented and understand the program design, you may want to browse the System Architecture notes, along with the javadocs from the latest release (available at drjava.org). You can also generate your own up-to-date copy of the javadocs by invoking the Ant javadoc target. Before you make significant changes to the code, you should familiarize yourself with the Development Best Practices section of this document. - - Once you've made some modifications, you'll probably want to try them out. The Ant script offers a couple of ways to do this. First, you can enter + If you're using Eclipse, see the Eclipse section for instructions on setting up + a project. + + To get oriented and understand the program design, you may want to + browse the System Architecture + notes, along with the javadocs from the latest release (available at + drjava.org). You can also + generate your own up-to-date copy of the javadocs by invoking the Ant + javadoc target. Before you make significant changes + to the code, you should familiarize yourself with the Development Best Practices section of this + document. + + Once you've made some modifications, you'll probably want to try + them out. The Ant script offers a couple of ways to do this. First, you + can enter - ant run + ant + run - This will run the DrJava application located in the classes/base directory. You can also run the JUnit tests. You can run a specific test (rather than waiting for all of them to run) by typing + This will run the DrJava application located in the + classes/base directory. You can also run the + JUnit tests. You can run a specific test (rather + than waiting for all of them to run) by typing - ant -Dtest-spec=filterString test + ant + -Dtest-spec=filterString + test - All test classes in classes/test with paths matching filterString will be run by JUnit. + All test classes in classes/test with paths + matching filterString will be run by + JUnit.
-
- Submitting Your Changes - - When you're ready to submit the changes you've made to the Subversion archive (in Subversion terminology, commit the changes), and assuming you're a member of the DrJava SourceForge project, you can do so with the Ant script. While the svn command could be invoked directly from the command line (or some IDEs), using Ant is the preferred approach because it allows you to ensure that your changes do not break any functionality or conflict with other changes that have been made by other developers concurrently. The Ant script will run a fresh compile and all tests before committing your changes. - - If this is the first time you've committed a change on your current system, you will need to perform a manual commit in order to check your authentication. You can do this by checking out the https://drjava.svn.sourceforge.net/svnroot/drjava/trunk/misc/authenticate directory and following the instructions in authenticate/authenticate.txt. When you commit, you will be prompted for a password (if the username is incorrect, just hit Enter and you will be prompted for a username as well). [TODO: Improve this process, if possible. It would be nice if there were just an "svn authenticate" command.] That authentication information will be stored on your system, and future commits will not require you to reenter your password. - - After your system is set up for automatic authentication, you can perform a commit with the following: +
Submitting Your Changes + + When you're ready to submit the changes you've made to the + Subversion archive (in Subversion terminology, + commit the changes), and assuming you're a member + of the DrJava SourceForge project, you can do so with the Ant script. If + you're a Git user you will have to commit and + push manually, or if you don't have write access to + the repository, submit a pull + request. + + While the svn command could be + invoked directly from the command line (or some IDEs), using Ant is the + preferred approach because it allows you to ensure that your changes do + not break any functionality or conflict with other changes that have been + made by other developers concurrently. The Ant script will run a fresh + compile and all tests before committing your changes. + + If this is the first time you've committed a change on your current + system, you will need to perform a manual commit in order to check your + authentication. You can do this by checking out the + https://drjava.svn.sourceforge.net/svnroot/drjava/trunk/misc/authenticate + directory and following the instructions in + authenticate/authenticate.txt. When you commit, you + will be prompted for a password (if the username is incorrect, just hit + Enter and you will be prompted for a username as well). [TODO: Improve + this process, if possible. It would be nice if there were just an "svn + authenticate" command.] That authentication information will be stored + on your system, and future commits will not require you to reenter your + password. + + After your system is set up for automatic authentication, you can + perform a commit with the following: - ant commit + ant + commit The major steps in this process are enumerated below: - - - <literal>clean-intermediate</literal> - Removes all intermediate build products — that is, files that didn't come from the Subversion repository and that aren't finished products. This will include generated sources and the classes directory. Note that, typically, this target (or just clean) is also invoked directly as the need arises. - - - - - - <literal>clean-products</literal> - Removes all final build products. This will include DrJava jar files and generated javadocs. - - - - - - <literal>update</literal> - Downloads all new changes that have been made in the Subversion repository since you last checked out (or updated) your sources. The command will list all filenames that are being changed locally; after the update, the status Subversion command will display any discrepancies between the repository and your working copy. If there is a conflict in the update (you and someone else have both changed the same file, or perhaps specifically an overlapping part of the same file), Subversion will let you know and give you a chance to manually merge the changes. This target is also typically invoked directly as the need arises (and you should use it often to catch conflicts while they are still small). - - - - - - <literal>build</literal> - The project is built from scratch, as described previously. This ensures that your submission is a valid, tested copy of the program. - - - - - - <literal>clean-intermediate</literal> - To prevent extraneous messages when the commit takes place, the project is cleaned up once again. - - - - - - <literal>commit</literal> - You are first prompted to enter a log message describing the changes you've made. These are generally just one-line summaries. Keep in mind that your message will be read in the context of the entire project when, for example, someone wants to know what changes have been made to the application recently. If you need help in remembering what files you've touched, look at the output of update, which ran just before the project was rebuilt. Next, each file you've modified will be uploaded and the changes will be assigned a fresh revision number. - - - - - -
- -
- + + <literal>clean-intermediate</literal> Removes + all intermediate build products — that is, files that didn't + come from the Subversion repository and that aren't finished + products. This will include generated sources and the + classes directory. Note that, typically, this + target (or just clean) is also invoked directly as + the need arises. + + + <literal>clean-products</literal> Removes all + final build products. This will include DrJava jar files and + generated javadocs. + + <literal>update</literal> + Downloads all new changes that have been made in the Subversion + repository since you last checked out (or updated) your sources. The + command will list all filenames that are being changed locally; after + the update, the status Subversion command will + display any discrepancies between the repository and your working + copy. If there is a conflict in the update (you and someone else + have both changed the same file, or perhaps specifically an + overlapping part of the same file), Subversion will let you know and + give you a chance to manually merge the changes. This target is also + typically invoked directly as the need arises (and you should use it + often to catch conflicts while they are still + small). + + <literal>build</literal> + The project is built from scratch, as described previously. + This ensures that your submission is a valid, tested copy of the + program. + + + <literal>clean-intermediate</literal> To prevent + extraneous messages when the commit takes place, the project is + cleaned up once again. + + <literal>commit</literal> + You are first prompted to enter a log message describing the + changes you've made. These are generally just one-line summaries. + Keep in mind that your message will be read in the context of the + entire project when, for example, someone wants to know what changes + have been made to the application recently. If you need help in + remembering what files you've touched, look at the output of + update, which ran just before the project was + rebuilt. Next, each file you've modified will be uploaded and the + changes will be assigned a fresh revision number. + + +
+ +
diff --git a/docs/src/quickstart/CodeCoverageReport.png b/docs/src/quickstart/CodeCoverageReport.png new file mode 100644 index 000000000..d8466fad4 Binary files /dev/null and b/docs/src/quickstart/CodeCoverageReport.png differ diff --git a/docs/src/quickstart/CodeCoverageWindow.png b/docs/src/quickstart/CodeCoverageWindow.png new file mode 100644 index 000000000..da0c54eb6 Binary files /dev/null and b/docs/src/quickstart/CodeCoverageWindow.png differ diff --git a/docs/src/quickstart/JDKDownload.jpg b/docs/src/quickstart/JDKDownload.jpg index 31df504ee..6bdd0adb5 100644 Binary files a/docs/src/quickstart/JDKDownload.jpg and b/docs/src/quickstart/JDKDownload.jpg differ diff --git a/docs/src/quickstart/JDKDownload.jpg.old b/docs/src/quickstart/JDKDownload.jpg.old new file mode 100644 index 000000000..31df504ee Binary files /dev/null and b/docs/src/quickstart/JDKDownload.jpg.old differ diff --git a/docs/src/quickstart/quickstart.docbook b/docs/src/quickstart/quickstart.docbook index b8f3244ce..46741512e 100644 --- a/docs/src/quickstart/quickstart.docbook +++ b/docs/src/quickstart/quickstart.docbook @@ -1,1264 +1,1473 @@ - - + - - 2009-08-03 - A Quick Start Guide to DrJava - - + 2009-08-03 A Quick Start Guide to + DrJava - - Introduction + Introduction - DrJava is a programming environment for Java designed specifically for beginners, but it is also suitable for advanced program development. - -This document is a quick introduction to DrJava that will help you set it up properly on your computer and -introduce you to some of its key features. - For more detailed and technical user documentation, see the User Documentation available from our website: http://www.drjava.org + DrJava is a programming environment for Java designed specifically + for beginners, but it is also suitable for advanced program + development. + +This document is a quick introduction to DrJava that will help you set it up +properly on your computer and introduce you to some of its key features. +For more detailed and technical user documentation, see the User + Documentation available from our website: http://www.drjava.org - - - Getting Ready to Use DrJava - This chapter describes how to start using DrJava, including where to get the program and how to run it. - -
- Downloading the JDK - To compile programs in DrJava, you must make sure you have a Java JDK (Java Development Kit) installed on your machine. All Java distributions available for downloading come in two forms: a JDK and a JRE (Java Runtime Environment). A JDK distribution consists of a JRE distribution (a Java Virtual Machine implementation) plus a collection of development tools including javac, a Java compiler, and javadoc, Java documentation generator. DrJava requires a JDK installation because it uses both javac and javadoc as plugin components. Without these components, DrJava can only edit Java programs; it cannot execute them or generate documentation for them. If you do not have a JDK installed already, you can download one for Windows, Linux, or Solaris computers directly from the Oracle webite. Apple Macintosh machines running Mac OS X already have a JDK installed. To download a JDK from the Oracle website, just follow these steps! - - - - Go to http://www.oracle.com/technetwork/java/javase/downloads/index.html, - - - Do a search for "JDK" - - - Select the most recent build of Java from the list of options you see. We recommend Java 6, assuming that you are using a current release of DrJava. Recent releases of DrJava are not compatible with versions of the JDK prior to Java 5 (previously called Java 1.5.0). Older versions of DrJava are compatible with Java 1.3 and Java 1.4. - - - Click on the link to download the JDK. - - - - - - - - Now, install the JDK, and you are ready to install and run DrJava! - - + + Getting Ready to Use DrJava + This chapter describes how to start using DrJava, including where + to get the program and how to run it. + +
Downloading the JDK To + compile programs in DrJava, you must make sure you have a Java JDK + (Java Development Kit) installed on your machine. All Java + distributions available for downloading come in two forms: a JDK + and a JRE (Java Runtime Environment). A JDK distribution consists + of a JRE distribution (a Java Virtual Machine implementation) plus + a collection of development tools including + javac, a Java compiler, and + javadoc, Java documentation generator. DrJava + requires a JDK installation because it uses both + javac and javadoc as plugin + components. Without these components, DrJava can only edit Java + programs; it cannot execute them or generate documentation for + them. If you do not have a JDK installed already, you can download + one for Windows, Linux, or Solaris computers directly from the + Oracle webite. Apple Macintosh machines running Mac OS X already + have a JDK installed. To download a JDK from the Oracle website, + just follow these steps! + + Go to http://www.oracle.com/technetwork/java/javase/downloads/index.html, + Do a search for "JDK" + Select the most recent build of + Java from the list of options you see. We recommend Java 8, + assuming that you are using a current release of DrJava. + Recent releases of DrJava are not compatible with versions of + the JDK prior to Java 5 (previously called Java 1.5.0). Older + versions of DrJava are compatible with Java 1.3 and Java 1.4. + Click on the link + to download the JDK. + + Now, install the + JDK, and you are ready to install and run DrJava! +
-
- Downloading DrJava - Follow these easy step by step instructions to download DrJava: - - - Go to http://www.drjava.org. - - - Select which build of DrJava is right for you, and click on the appropriate button. We recommend using the most recent stable or beta releases since they support all of the Java 5 language extensions and Java 6 APIs, which make Java programming simpler. We also recommend that Windows users download the .exe file, that Mac OS X users use the osx.tar.gz version, and that other users download the .jar version. If you have problems with a beta release of DrJava, you can roll back to the most recent stable version. Experienced users may want to experiment with other versions of DrJava including the most recent -Development Build jar instead. To do so, click on the "more download options" link. - - - - - - - - - Click on one of the Download buttons to go to the download server. Choose a site to download the file from, and then click on the corresponding icon in the "Download" column on the far right to start the download. - - - - - - - - The download should begin automatically. When prompted, select where you wish to save the file to disk, and it will be downloaded to your computer. - - - Congratulations! You have now downloaded DrJava! Now let's get DrJava running on your machine. - - -
-
+
Downloading DrJava Follow + these easy step by step instructions to download DrJava: + Go to http://www.drjava.org. + Select which build of + DrJava is right for you, and click on the appropriate + button. We recommend using the most recent stable or beta + releases since they support all of the Java 8 language + extensions, which make Java programming simpler. We also + recommend that Windows users download the + .exe file, that Mac OS X users use the + osx.tar.gz version, and that other + users download the .jar version. If + you have problems with a beta release of DrJava, you can + roll back to the most recent stable version. Experienced + users may want to experiment with other versions of DrJava + including the most recent Development Build jar instead. To + do so, click on the "more download options" link. + + + Click on one of the Download buttons to + go to the download server. Choose a site to download the file from, and + then click on the corresponding icon in the "Download" column on the far + right to start the download. + The + download should begin automatically. When prompted, select where you wish + to save the file to disk, and it will be downloaded to your computer. + Congratulations! You have now + downloaded DrJava! Now let's get DrJava running on your machine. +
- - Using DrJava, the Basics - Okay, you've downloaded DrJava. Now, how do you use it? You're about to find out. This chapter will tell you how to run DrJava as well as how to do basic file editing and compilation. You'll also learn how to use the most powerful feature of DrJava: The Interactions Pane -
- Running DrJava - If you are running on Windows, all you need to do is double-click DrJava's .exe file, and DrJava will launch. On Mac OSX, unpack the osx.tar.gz (you can use StuffIt), and drag the file to Applications. On all other platforms, run DrJava from the command line by giving the command java -jar nameOfJar.jar (nameOfJar.jar should be the name of the DrJava jar you downloaded). + Using DrJava, the Basics Okay, + you've downloaded DrJava. Now, how do you use it? You're about to + find out. This chapter will tell you how to run DrJava as well as + how to do basic file editing and compilation. You'll also learn how + to use the most powerful feature of DrJava: The Interactions + Pane +
Running DrJava If you are + running on Windows, all you need to do is double-click DrJava's + .exe file, and DrJava will launch. On Mac + OSX, unpack the osx.tar.gz (you can use + StuffIt, or run + $ tar -xvzf + osx.tar.gz + in a Terminal), + and drag the file to Applications. On all other platforms, run + DrJava from the command line by giving the command + $ java -jar <DrJava jar + file> +
-
- Opening and Creating Files - To create a new file, choose "File, New" from the File menu, or click on the "New" button on the toolbar. A new file is created for you, and you can begin typing in it. To open a file, choose "File, Open" from the File menu, or click on the "Open" button on the toolbar. A file chooser window will then be opened. The current directory is displayed at the top of the pop-up window. Navigate through this and select the file or files you wish to open. - - - - - - +
Opening and Creating Files + To create a new file, choose "File, New" from the File menu, or + click on the "New" button on the toolbar. A new file is created + for you, and you can begin typing in it. To open a file, choose + "File, Open" from the File menu, or click on the "Open" button on + the toolbar. A file chooser window will then be opened. The + current directory is displayed at the top of the pop-up window. + Navigate through this and select the file or files you wish to + open. + + - Once you have opened an existing file or created a new file, you will notice that the names of all open files are listed on the left of the screen, and the text of one file is displayed on the right. Select a file name on the left to have the file's text display on the right. The right pane is called the Definitions Pane. It is where you edit your files. - - - - - + Once you have opened an existing file or created a new file, you + will notice that the names of all open files are listed on the left + of the screen, and the text of one file is displayed on the right. + Select a file name on the left to have the file's text display on the + right. The right pane is called the Definitions Pane. It is where + you edit your files.
+ +
Saving Files To save a + file, either click on the "Save" button or choose "File, Save." If + your file has been saved in the past, this will just overwrite the + old version. If your file has never been saved, you will be + prompted for where you wish to save the file. The current directory + is displayed at the top of the pop-up window. You can also use + "File, Save As" to save the file with a different name, and "File, + Save All" to save all open files. + +
-
- Saving Files - -To save a file, either click on the "Save" button or choose "File, Save." If your file has been saved in the past, this will just overwrite the old version. If your file has never been saved, you will be prompted for where you wish to save the file. The current directory is displayed at the top of the pop-up window. You can also use "File, Save As" to save the file with a different name, and "File, Save All" to save all open files. - - - - - - - -
- - -
- Compiling Files - To compile all open files, click on the "Compile" button. If you want to just compile a specific file, right click on its name on the left listing of files, and select Compile Current Document. Once the compile is completed, the results are displayed on the Compiler Output tab at the bottom of the screen. If there are no errors, you will see "Last compilation completed successfully". If there are errors, they will be listed. If both errors and warnings are found, the number of each is listed, and errors will be listed before warnings. If you click on an error, it will highlight the place in your source code where the error is. Use the up and down arrow buttons to navigate between error messages. - - - - - +
Compiling Files To + compile all open files, click on the "Compile" button. If you want + to just compile a specific file, right click on its name on the + left listing of files, and select Compile Current Document. Once + the compile is completed, the results are displayed on the Compiler + Output tab at the bottom of the screen. If there are no errors, you + will see "Last compilation completed successfully". If there are + errors, they will be listed. If both errors and warnings are found, + the number of each is listed, and errors will be listed before + warnings. If you click on an error, it will highlight the place in + your source code where the error is. Use the up and down arrow + buttons to navigate between error messages. + +
-
- The Interactions Pane - - - - - - +
The Interactions Pane + + + + The Interactions Pane is one of the best and most distinctive + features of DrJava. It offers both beginning students and more + experienced programmers the ability to quickly try out code without + having to write cumbersome main methods. 1. One way to + use the Interactions Pane is to input basic Java expressions like 1+1. + Those expressions will then be interpreted and evaluated, and the + result will be displayed. This example shows how to do basic + calculations in the Interactions Pane: + + + + 2. Another way to use the Interactions Pane is to instantiate classes + and then call their methods--this allows you to quickly and easily + verify the behavior of methods. This example shows how to instantiate a + class and call one of its methods: + + + + 3. In addition, you can define classes and interfaces in the + Interactions Pane, and then instantiate these classes and test them. + This example shows how to create a class and call one of its + methods: + + + 4. It is important to remember that if you are working with classes + that are packaged in the Definitions Pane (where the file's text is), + it is important to make the same package declaration in the + Interactions Pane. Also, you need to import any other packages you + wish to use, like you would in a normal .java + file. In this example, you can see how the package is used, and also + that until the java.util package is imported, + Vector cannot be used: + +
+ + +
System.in + + Many beginner programs rely on keyboard input read through + System.in. DrJava provides full support for + this. There are two ways to use System.in in + DrJava. First, you can invoke a method in your code that relies on + System.in in the Interactions Pane. When you + do this, the System.in input box will appear. Type your input, and + press Return. + + + + Alternatively, you can use the System.in.read() + method in the Interactions Pane directly. When the input box appears, + type your text and then either press Return. + + + +When the the input box appears in the Interactions Pane, you can choose + to close the input stream by selecting the menu item "Tools, Interactions + & Console, Close System.in", or by pressing the keyboard shortcut for + it, which is Ctrl-D . The shortcut is labeled + Close System.in in the Key Bindings section of the + preferences. + +Here is an example of closing the input stream. The text in square + brackets was entered by the user. + + Welcome to DrJava. Working directory is + /Users/Shared/drjava > System.in.read() [1] 49 > System.in.read() 10 > + System.in.read() // press Ctrl-D now [] -1 > + +The user first types '1' and then presses Return. This lets DrJava read a + 49, which is the ASCII code for the character '1', and then 10, which is + the ASCII code for the new line created by Return. In the second input box, + the user pressed Ctrl-D immediately to close the input stream. This lets + DrJava read -1, indicating of the end of the stream. - The Interactions Pane is one of the best and most distinctive features of DrJava. It offers both beginning students and more experienced programmers the ability to quickly try out code without having to write cumbersome main methods. - 1. One way to use the Interactions Pane is to input basic Java expressions like 1+1. Those expressions will then be interpreted and evaluated, and the result will be displayed. This example shows how to do basic calculations in the Interactions Pane: +
- - - - - - 2. Another way to use the Interactions Pane is to instantiate classes and then call their methods--this allows you to quickly and easily verify the behavior of methods. This example shows how to instantiate a class and call one of its methods: +
Find and Replace + + + The Find and Replace menu is a useful way to search for specific + text in your files, and replace it, if you so choose. To launch the + Find/Replace tab, either use the keyboard shortcut Ctrl-F or choose + "Edit, Find and Replace" from the menu at the top of the DrJava + window. Once you do this, the Find/Replace tab will appear at the + bottom of the screen. Type the text you want to search for in the + "Find Next" box, and if you want to replace it with anything, type + that in the "Replace With" box. Then, chose which of the four + options to the right of those text boxes that you want to use, and + press one of the buttons at the bottom, or the Enter key. The + direction of the search executed by pressing the Enter key depends + on the direction of the last search. (The last direction is + indicated by the label of the Find box: "Find Next" or "Find + Prev"). + + Match + Case: Makes the search becomes case + sensitive. + + Search All Documents: Causes + your search text to be looked for in all open files. + + + Whole Word: Only finds + instances of your search text that are preceeded and followed + by either a space, a period, or an open or close parenthesis. + + + No Comments/String: Ignores + any instances found within comments or strings. + + + Search Selection Only: Only + used with Find/Replace All. Allows user to find/replace all + instances of a word or phrase within a highlighted portion of + the document. + + + + To go from instance to instance of your search text, use the four + buttons at the bottom. + Find Next: Finds the next + instance. Switches the label of the Find box to "Find + Next", indicating the direction of the next search. + + + Find Previous: Finds the + previous instance. Switches the label of the Find box to "Find + Prev", indicating the direction of the next search. + + + Find All: Find all occurrences + of the search string. This opens a new "Find: word" pane, where + "word" is replaced with the search string. In this pane, view + all found instances and jump to their locations in the text. + You can have as many "Find All" panes as you like open + concurrently. The "Find All" tool also automatically underlines + the occurrences. In the screenshot below, the user searched for + the word "System": + + + Replace/Find Next: Replaces + the current instance with your replace text and then finds the + next instance. Switches the label of the Find box to "Find + Next", indicating the direction of the next search + + + Replace/Find Previous: + Replaces the current instance with your replace text and then + finds the previous instance. Switches the label of the Find box + to "Find Previous", indicating the direction of the next search + + + Replace: Replaces the current + instance with your replace text. + + + Replace All: Replaces all + instances of the search text with the replace text + automatically + + A relatively new feature of Find and Replace is the ability to + search across more than one line of text. The Find and Replace text + boxes can accept more than one line of text. To use this feature you + have two options. First, you can copy/paste directly into the Find and + Replace boxes and search/replace as normal. Second, you can type text + directly into the boxes, and when you want to create a new line press + Ctrl-Enter (Note: Pressing only the Enter key when inside the Find box + executes a Find. It DOES NOT create a new line. Both Enter and + Ctrl-Enter create a new line inside the Replace box). + + - - - - - +
+ - 3. In addition, you can define classes and interfaces in the Interactions Pane, and then instantiate these classes and test them. This example shows how to create a class and call one of its methods: - - - - - + - 4. It is important to remember that if you are working with classes that are packaged in the Definitions Pane (where the file's text is), it is important to make the same package declaration in the Interactions Pane. Also, you need to import any other packages you wish to use, like you would in a normal .java file. In this example, you can see how the package is used, and also that until the java.util package is imported, Vector cannot be used: + + Advanced Features DrJava + provides support for many advanced features. + +
JUnit Testing of Files + DrJava offers a JUnit test facility. For information about JUnit + and JUnit tests, check out http://www.junit.org. Click + the "Test" button to test all open JUnit tests, or select the file + you want to test on the left menu, right click, and select "Test + Current Document". The tests will be run, and the output will be + displayed on the Test Output tab at the bottom of the screen. If + all your tests passed, you will see a green bar. + + + + If any tests failed, you will see a red bar. All failing tests + will be listed in the test pane. Click on one, and its location in the + source code will be highlighted. + + + +
- - - - - -
+
Integrated Code Coverage + DrJava provides code coverage analysis with JaCoCo 0.7.7. For more + information, see EclEmma's + documentation. Click the "Code Coverage" button to open + a popup where you can tell DrJava to open your default browser with + the report upon completion, and specify a directory in which to put + the coverage report. + + + + When the analysis finishes, you can view the report in your + browser of choice. If you didn't choose to have the report + automatically opened, you can direct your browser to the + index.html file in the directory + containing the report. Entries in the "Element" column are + links to more specific analysis of that item. + + +
+
Generating JavaDoc Documentation + DrJava offers the ability to generate JavaDoc documentation for + the user's java files. For information about what JavaDoc is and + how to format your comments to take advantage of it, see http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html. -
- System.in + To generate JavaDoc for all files in the same directories as your + open files, click the "JavaDoc" button on the toolbar. You will then + be asked where you want to save the javadoc files. Select a location + and click OK. Your JavaDoc will be generated for you. - Many beginner programs rely on keyboard input read through System.in. DrJava provides full support for this. There are two ways to use System.in in DrJava. First, you can invoke a method in your code that relies on System.in in the Interactions Pane. When you do this, the System.in input box will appear. Type your input, and press Return. + + + To generate JavaDoc for one specific file, select it from the open + list of files and right click and select "Preview JavaDoc" for current + Document. You will be able to view the JavaDoc for that file in the + JavaDoc viewer. - - - - - + - Alternatively, you can use the System.in.read() method in the Interactions Pane directly. When the input box appears, type your text and then either press Return. +
- - - - - +
The Debugger The debugger + allows you to step through the execution of a program and stop at + any point you choose so that you can track down bugs in your code. + What makes our debugger an unusually powerful tool is that it + allows you to modify the values of fields and variables + while debugging! First, we will explain a + little bit about how the debugger works in general, and then we + will explain how you can use the Interactions Pane to modify field + and variable values during runtime and thus more quickly zero in on + problems in your code. + + To enable the debugger, select "Debugger, Debug Mode". This will + launch the debug panel in the lower part of DrJava, right above the + Interactions Pane. + + + + Debug Panel: The Debug Panel has three + tabs to help you track control flow in your program. These tabs + are labeled Watches, Stack, and Threads. + + + Watches: This is a table that displays + the instantaneous values of specified fields and variables + given the current line that the debugger is on. To add a + watch, click in the leftmost column on the first empty row. + A cursor should appear and you can type in the name of the + field or variable. You can also put in expressions that + require evaluation such as x + 1 or array accesses. + + + + Stack: This a table that lists + the current stackframes. Use this to determine the trail of + methods that have been invoked to arrive at the current line in + the execution. You can double-click on a particular stack + frame to scroll to center it in the Definitions Pane. + + + + + + + Threads: This is list of the + threads that are running in the virtual machine. If there are + multiple threads that are suspended, you can set the active + thread (the thread whose execution you're examining) by + double-clicking on the desired thread. + + -When the the input box appears in the Interactions Pane, you can choose to close the input stream by selecting the menu item "Tools, Interactions & Console, Close System.in", or by pressing the keyboard shortcut for it, which is Ctrl-D . The shortcut is labeled Close System.in in the Key Bindings section of the preferences. - -Here is an example of closing the input stream. The text in square brackets was entered by the user. - - -Welcome to DrJava. Working directory is /Users/Shared/drjava -> System.in.read() - [1] -49 -> System.in.read() -10 -> System.in.read() // press Ctrl-D now - [] --1 -> - - -The user first types '1' and then presses Return. This lets DrJava read -a 49, which is the ASCII code for the character '1', and then 10, which is the -ASCII code for the new line created by Return. In the second input box, the -user pressed Ctrl-D immediately to close the input stream. This lets DrJava -read -1, indicating of the end of the stream. - +Breakpoints Another important part of the + debugger is the breakpoints panel. Even when the debugger is not + enabled, you can set breakpoints using the Ctrl+B + shortcut or by selecting the "Toggle Breakpoint" command from the + Debugger menu or the context menu. This will highlight the current line + in red, and the debugger will stop the running program when it reaches + this line. To remove a breakpoint again, place the cursor on the same + line and press Ctrl+B again. +To view all the breakpoints you have set and to navigate between them, + you can open the Breakpoints Panel by pressing + Ctrl+Shift+B or selecting the "Breakpoints" command from + the Debugger menu. In this panel, all currently set breakpoints are listed, + sorted by document and line number. To move the cursor to the location of a + breakpoint, double-click on one of the entries in the Breakpoints panel, or + select it and press the "Go to" button. You can also select + one or more breakpoints and use the "Enable" or "Disable" button to + temporarily enable or disable the selected breakpoints. If a breakpoint is + disabled, it remains set, but the program will not stop there. This is + useful if you may need a breakpoint again later, but want it ignored right + now. With the "Remove" button, you can remove one or more + selected breakpoints. The "Remove All" button clears the entire list of + breakpoints. Breakpoints are considered part of a project and + are therefore saved to and restored from a project file. + +
+
Using the Debugger To use the + debugger, you must first set a breakpoint on the + line(s) of code on which you want execution to stop. To do this, right + click on the line of code that you want the breakpoint on and select + Toggle Breakpoint from the menu. -
- Find and Replace - - - - - - - The Find and Replace menu is a useful way to search for specific text in your files, and replace it, if you so choose. To launch the Find/Replace tab, either use the keyboard shortcut Ctrl-F or choose "Edit, Find and Replace" from the menu at the top of the DrJava window. Once you do this, the Find/Replace tab will appear at the bottom of the screen. Type the text you want to search for in the "Find Next" box, and if you want to replace it with anything, type that in the "Replace With" box. Then, chose which of the four options to the right of those text boxes that you want to use, and press one of the buttons at the bottom, or the Enter key. The direction of the search executed by pressing the Enter key depends on the direction of the last search. (The last direction is indicated by the label of the Find box: "Find Next" or "Find Prev"). - - - - Match Case: Makes the search becomes case sensitive. - - - - Search All Documents: Causes your search text to be looked for in all open files. - - - - Whole Word: Only finds instances of your search text that are preceeded and followed by either a space, a period, or an open or close parenthesis. - - - - No Comments/String: Ignores any instances found within comments or strings. - - - - Search Selection Only: - Only used with Find/Replace All. Allows user to find/replace all instances of a word or phrase within a highlighted portion of the document. - - - - - To go from instance to instance of your search text, use the four buttons at the bottom. - - - Find Next: Finds the next instance. Switches the label of the Find box to "Find Next", indicating the direction of the next search. - - - - Find Previous: Finds the previous instance. Switches the label of the Find box to "Find Prev", indicating the direction of the next search. - - - - Find All: Find all occurrences of the search string. This opens a new "Find: word" pane, where "word" is replaced with the search string. In this pane, view all found instances and jump to their locations in the text. You can have as many "Find All" panes as you like open concurrently. The "Find All" tool also automatically underlines the occurrences. In the screenshot below, the user searched for the word "System": - - - - - - - - - Replace/Find Next: Replaces the current instance with your replace text and then finds the next instance. Switches the label of the Find box to "Find Next", indicating the direction of the next search - - - - Replace/Find Previous: Replaces the current instance with your replace text and then finds the previous instance. Switches the label of the Find box to "Find Previous", indicating the direction of the next search - + - - Replace: Replaces the current instance with your replace text. - +Once a breakpoint is set, it is highlighted in red, like this: + - - Replace All: Replaces all instances of the search text with the replace text automatically - - +Once you have set the breakpoint(s), enable the debugger by pressing + Ctrl+D or invoking the "Debug Mode" command of the + Debugger menu. - A relatively new feature of Find and Replace is the ability to search across more than one line of text. The Find and Replace text boxes can accept more than one line of text. To use this feature you have two options. First, you can copy/paste directly into the Find and Replace boxes and search/replace as normal. Second, you can type text directly into the boxes, and when you want to create a new line press Ctrl-Enter (Note: Pressing only the Enter key when inside the Find box executes a Find. It DOES NOT create a new line. Both Enter and Ctrl-Enter create a new line inside the Replace box). + - - - - - +Now enter a statement in the Interactions Pane that will run the method + containing the breakpoint(s). Once execution reaches a breakpoint, it will + halt, awaiting input from you. -
- + - +At this point, the line that is about to be executed is highlighted in a + special color (light blue by default), the "resume", "step into", "step + over", and "step out" buttons are enabled, and a special prompt appears in + the Interactions Pane. - - - Advanced Features - DrJava provides support for many advanced features. - -
- JUnit Testing of Files - DrJava offers a JUnit test facility. For information about JUnit and JUnit tests, check out http://www.junit.org. Click the "Test" button to test all open JUnit tests, or select the file you want to test on the left menu, right click, and select "Test Current Document". The tests will be run, and the output will be displayed on the Test Output tab at the bottom of the screen. If all your tests passed, you will see a green bar. - - - - - - - - If any tests failed, you will see a red bar. All failing tests will be listed in the test pane. Click on one, and its location in the source code will be highlighted. - - - - - - - -
+ The Resume Button: + runs the program until another breakpoint is reached, or + the interaction has ended. -
- Generating JavaDoc Documentation - DrJava offers the ability to generate JavaDoc documentation for the user's java files. For information about what JavaDoc is and how to format your comments to take advantage of it, see http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html. + The Step Into Button: steps + through the execution of the method invocations in the current + line. - To generate JavaDoc for all files in the same directories as your open files, click the "JavaDoc" button on the toolbar. You will then be asked where you want to save the javadoc files. Select a location and click OK. Your JavaDoc will be generated for you. + The Step Over Button: executes + the current line and stops execution on the next line. + - - - - - - - To generate JavaDoc for one specific file, select it from the open list of files and right click and select "Preview JavaDoc" for current Document. You will be able to view the JavaDoc for that file in the JavaDoc viewer. - - - - - - - -
- -
- The Debugger - The debugger allows you to step through the execution of a program and stop at any point you choose so that you can track down bugs in your code. What makes our debugger an unusually powerful tool is that it allows you to modify the values of fields and variables while debugging! First, we will explain a little bit about how the debugger works in general, and then we will explain how you can use the Interactions Pane to modify field and variable values during runtime and thus more quickly zero in on problems in your code. - - To enable the debugger, select "Debugger, Debug Mode". This will launch the debug panel in the lower part of DrJava, right above the Interactions Pane. - - - - - - - - - Debug Panel: - The Debug Panel has three tabs to help you track control flow in your program. These tabs are labeled Watches, Stack, and Threads. - - - - - Watches: - This is a table that displays the instantaneous values of specified fields and variables given the current line that the debugger is on. To add a watch, click in the leftmost column on the first empty row. A cursor should appear and you can type in the name of the field or variable. You can also put in expressions that require evaluation such as x + 1 or array accesses. - - - - - - - - - Stack: - This a table that lists the current stackframes. Use this to determine the trail of methods that have been invoked to arrive at the current line in the execution. You can double-click on a particular stack frame to scroll to center it in the Definitions Pane. - - - - - - - - - - - - Threads: - This is list of the threads that are running in the virtual machine. If there are multiple threads that are suspended, you can set the active thread (the thread whose execution you're examining) by double-clicking on the desired thread. - - - - - - - - - -Breakpoints - Another important part of the debugger is the breakpoints panel. Even when the debugger is not enabled, you can set breakpoints using the Ctrl+B shortcut or by selecting the "Toggle Breakpoint" command from the Debugger menu or the context menu. This will highlight the current line in red, and the debugger will stop the running program when it reaches this line. To remove a breakpoint again, place the cursor on the same line and press Ctrl+B again. - To view all the breakpoints you have set and to navigate between them, you can open the Breakpoints Panel by pressing Ctrl+Shift+B or selecting the "Breakpoints" command from the Debugger menu. In this panel, all currently set breakpoints are listed, sorted by document and line number. To move the cursor to the location of a breakpoint, double-click on one of the entries in the Breakpoints panel, or select it and press the "Go to" button. - You can also select one or more breakpoints and use the "Enable" or "Disable" button to temporarily enable or disable the selected breakpoints. If a breakpoint is disabled, it remains set, but the program will not stop there. This is useful if you may need a breakpoint again later, but want it ignored right now. - With the "Remove" button, you can remove one or more selected breakpoints. The "Remove All" button clears the entire list of breakpoints. - Breakpoints are considered part of a project and are therefore saved to and restored from a project file. - - - - - - -
- -
-Using the Debugger - To use the debugger, you must first set a breakpoint on the line(s) of code on which you want execution to stop. To do this, right click on the line of code that you want the breakpoint on and select Toggle Breakpoint from the menu. - - - - - - + The Step Out Button: executes + the rest of the current method and stops execution at the line + from which the current method was called. + -Once a breakpoint is set, it is highlighted in red, like this: - - - - - - -Once you have set the breakpoint(s), enable the debugger by pressing Ctrl+D or invoking the "Debug Mode" command of the Debugger menu. - - - - - - - -Now enter a statement in the Interactions Pane that will run the method containing the breakpoint(s). Once execution reaches a breakpoint, it will halt, awaiting input from you. - - - - - - - -At this point, the line that is about to be executed is highlighted in a special color (light blue by default), the "resume", "step into", "step over", and "step out" buttons are enabled, and a special prompt appears in the Interactions Pane. - - - - The Resume Button: - runs the program until another breakpoint is reached, or the interaction has ended. - - - - The Step Into Button: - steps through the execution of the method invocations in the current line. - - - - The Step Over Button: - executes the current line and stops execution on the next line. - - - - The Step Out Button: - executes the rest of the current method and stops execution at the line from which the current method was called. - - - - At the prompt, you can still type arbitrary Java expressions like usual, but you have additional power--all the fields, variables, methods, and classes than can be seen from the current point in the execution can be viewed and modified. This gives you incredible power--you can actually modify the values of your fields and variables while debugging. All you have to do is type in an assignment statement. -
+ At the prompt, you can still type arbitrary Java expressions like + usual, but you have additional power--all the fields, variables, + methods, and classes than can be seen from the current point in the + execution can be viewed and modified. This gives you incredible + power--you can actually modify the values of your fields and variables + while debugging. All you have to do is type in an assignment + statement.
- - The Project Facility -
- Overview - The project facility is intended to provide a lightweight approach to managing a large number of files spread between different subfolders and packages. - - The project facility makes it easy to work with larger projects, and allows you to save open java files into a project file and then reopen the project at a later time. This means that you don't have to waste time reopening files in multiple folders. The project facility was designed with two goals in mind: -1. To allow sets of related files to be opened together. -2. To allow DrJava's tools and options to manage a set of related files as a single entity. + The Project Facility
Overview The project + facility is intended to provide a lightweight approach to + managing a large number of files spread between different + subfolders and packages. + + The project facility makes it easy to work with larger projects, and + allows you to save open java files into a project file and then reopen + the project at a later time. This means that you don't have to waste + time reopening files in multiple folders. The project facility was + designed with two goals in mind: 1. To allow sets of + related files to be opened together. 2. To allow DrJava's + tools and options to manage a set of related files as a single + entity. + + The fundamental difference between the DrJava project facility and + the project facilities of most professional development environments is + that DrJava does not distinguish between "Open" files and "Project" + files--if a file is open and in the project source directory, it is + part of the project. - The fundamental difference between the DrJava project facility and the project facilities of most professional development environments is that DrJava does not distinguish between "Open" files and "Project" files--if a file is open and in the project source directory, it is part of the project. - -
+
-
- Tree View +
Tree View - This project facility introduces a new view in DrJava called Tree View. When you are working with a project, the left hand pane displays the files in a tree view rather than the traditional list view. This means that you can see where your files are in relationship to each other. If you select a folder in the tree view, when you select "Open" or "Save", the default directory DrJava looks in will correspond to that folder. + This project facility introduces a new view in DrJava called + Tree View. When you are working with a project, + the left hand pane displays the files in a tree view rather than the + traditional list view. This means that you can see where your files + are in relationship to each other. If you select a folder in the tree + view, when you select "Open" or "Save", the default directory DrJava + looks in will correspond to that folder. - - - - - + - There are three main categories of files in Tree View: Source, External, and Auxilary files. + There are three main categories of files in Tree View: Source, + External, and Auxilary files. - - - Source Files: - All files located in or below the project file's directory(project directory). Thus, the location of your project file determines what files are part of your project. It is important to put the project file in the root of your project hierarchy. - + Source + Files: All files located in or below the + project file's directory(project directory). Thus, the + location of your project file determines what files are + part of your project. It is important to put the project + file in the root of your project hierarchy. + - - External Files: - Files that are not in the project directory. They will never be compiled or tested as part of your project. They are not saved in the project file. - + External Files: Files that are + not in the project directory. They will never be compiled or + tested as part of your project. They are not saved in the + project file. - - Included External Files: - Files that are located outside of the project directory but that are still important to the project. They are compiled and tested with the project and are opened whenever the project is opened. - + Included External Files: Files + that are located outside of the project directory but that are + still important to the project. They are compiled and tested + with the project and are opened whenever the project is + opened. - + - To move a file from the External Files branch to the Included External Files branch, right click on the file in the tree listing, and select the appropriate option at the bottom of the menu. + To move a file from the External Files branch to the Included + External Files branch, right click on the file in the tree listing, and + select the appropriate option at the bottom of the menu. - The behavior of some of the buttons also changes in Tree View. The "Compile All" button only compiles open project source and auxiliary files, instead of all open files. "Test All" will only tess open project source and auxiliary files. To compile or test the external files, you can right click on the folder and select "Compile Folder" or "Test Folder". + The behavior of some of the buttons also changes in Tree View. The + "Compile All" button only compiles open project source and auxiliary + files, instead of all open files. "Test All" will only tess open + project source and auxiliary files. To compile or test the external + files, you can right click on the folder and select "Compile Folder" or + "Test Folder". - - - - - + -
+
-
- Creating and Saving a Project +
Creating and Saving a Project - When you want to create a new project, you have two options. The first is that you can chose "Project, New" from the top menu to create a brand new project. Once you have done this, a Save dialog box pops up. Specifiy where you want the project file to be saved, and you are ready to go. It is important to note that all project files must be in the directory or a subdirectory of where the project file is saved. - - - - - - - - The other way to create a project is to open up the java files you want to include in the project, and then select "Project, Save As". This will create a new project consisting of those files. + When you want to create a new project, you have two options. The + first is that you can chose "Project, New" from the top menu to create + a brand new project. Once you have done this, a Save dialog box pops + up. Specifiy where you want the project file to be saved, and you are + ready to go. It is important to note that all project files must be in + the directory or a subdirectory of where the project file is + saved. + + + + The other way to create a project is to open up the java files you + want to include in the project, and then select "Project, Save As". + This will create a new project consisting of those files. - - - - - + + + To add new files to your project, just open them. They will + automatically be sorted into the correct folder. When you save the + project, they will be saved with it.
Saving Your Project If you make any + changes to the structure or state of your project (for instance, + collapsing a folder tree or opening or closing files), you will want to + save it so your preferences are maintained. To save a project, select + "Project, Save". Note that saving a project only saves the list of + what files are in the project; it does not save the files themselves. + Use "File, Save All" to save all the files in the project. + + Saving a project will also save which document you are currently + viewing so that it will be re-displayed the next time you open the + project. It also saves the cursor location in each file as well as + whether a folder in the project tree is collapsed or expanded. - To add new files to your project, just open them. They will automatically be sorted into the correct folder. When you save the project, they will be saved with it. -
-
-Saving Your Project - If you make any changes to the structure or state of your project (for instance, collapsing a folder tree or opening or closing files), you will want to save it so your preferences are maintained. To save a project, select "Project, Save". Note that saving a project only saves the list of what files are in the project; it does not save the files themselves. Use "File, Save All" to save all the files in the project. - - Saving a project will also save which document you are currently viewing so that it will be re-displayed the next time you open the project. It also saves the cursor location in each file as well as whether a folder in the project tree is collapsed or expanded. - -
+
-
- Opening a Project +
Opening a Project - To open a project file, just select "Project, Open" and select the project file you wish to open. + To open a project file, just select "Project, Open" and select the + project file you wish to open. - - - - - -
- -
- Compiling Your Project - When compiling a project, you must decide whether you want to compile only the open project files or all of the files in a project. Compiling all open files will only compile those files that are open in the project view (source files and auxiliary files). To do this, sellect "Project, Compile Open Project Files" or right click on the root of the project tree and select "Compile Open Project Files". You can also click on the "Compile All" button. + +
+ +
Compiling Your Project + When compiling a project, you must decide whether you want to + compile only the open project files or all of the files in a + project. Compiling all open files will only compile those files + that are open in the project view (source files and auxiliary + files). To do this, sellect "Project, Compile Open Project Files" + or right click on the root of the project tree and select "Compile + Open Project Files". You can also click on the "Compile All" + button. - To compile all project files (source and auxiliary), even ones not currently open in DrJava, select "Project, Compile Project", or right click on the root of the project and click "Compile Project". + To compile all project files (source and auxiliary), even ones not + currently open in DrJava, select "Project, Compile Project", or right + click on the root of the project and click "Compile Project". - Note that all files in the External Files folder will not be compiled as part of the project--you must do this separately. + Note that all files in the External Files folder will not be compiled + as part of the project--you must do this separately. - You can compile from the Project Menu: + You can compile from the Project Menu: - - - - - + - Or from the Navigator Pane: + Or from the Navigator Pane: - - - - - + -
+
-
- Testing Your Project - There are also two options for testing a project: test just the open project files or test the entire project. These have the same meaning that they do for compiling. To test only the open project files, select "Project, Test Open Project Files". This will test all JUnit test files currently open in the source files and auxiliary files branches. - To test all project files, even those not open in DrJava, select "Project, TestProject". This will test all JUnit test files in the project directory and its subfolders as well as all of the auxiliary files. - External files will never be tested. +
Testing Your Project + There are also two options for testing a project: test just the + open project files or test the entire project. These have the same + meaning that they do for compiling. To test only the open project + files, select "Project, Test Open Project Files". This will test + all JUnit test files currently open in the source files and + auxiliary files branches. To test all project files, + even those not open in DrJava, select "Project, TestProject". This + will test all JUnit test files in the project directory and its + subfolders as well as all of the auxiliary files. + External files will never be tested. - - - - - + -
+
-
- Running a Project - To run the main method of a project, select "Project, Run Main Class." This will load the class specified as the project's main class in Project Properties, and run its main method. If you have not specified the file to load in Project Properties, this option is grayed out +
Running a Project To + run the main method of a project, select "Project, Run Main Class." + This will load the class specified as the project's main class in + Project Properties, and run its main method. If you have not + specified the file to load in Project Properties, this option is + grayed out - - - - - + - If you have configured a main class, then DrJava will also show a "Run Project" toolbar button. If you have not specified a class as main class, a "Run" button is shown instead that runs the main method of the currently shown document. + If you have configured a main class, then DrJava will also show a + "Run Project" toolbar button. If you have not specified a class as + main class, a "Run" button is shown instead that runs the main + method of the currently shown document. -
- - -
- Clean Build Directory - This option is only enabled once you have specified a build directory in the Project Properties dialog box. Once you have specified a build directory, selecting this option will remove all .class files and empty directories in the build directory. - - - - - - -
- -
- Project Properties - The Project Properties dialog box allows you to set two optional properties to better utilize the project facility. To access the Project Properties dialog, select "Project, Project Properties". - - - Project Root: - This is the directory where the source files are located. It corresponds to the default package of your project. If no directory is entered, the directory containing the project file is assumed. - - - - Build Directory: - Set this if you want your compiled files to be compiled to a directory other than the source directory. This is often useful if your project is large or you want to be able to clean the build directory (see the option on the Project menu). - - - - Working Directory: - DrJava will use this directory as "current" directory for the Interactions pane and the user program. - - - - Main Class: - This allows you to specify the class that holds the main method for the project. When this is set, you can use "Project, Run Main Class" to launch the program. - - - - Extra Classpath: - In this section you can list directories or JAR files that should be included on the classpath while you are working with this project. The classes added this way are available both in the Interactions pane and when compiling. - - - - - - - -
- - +
- - - The Preferences Menu - The Preferences menu in DrJava can be accessed by selecting "Edit, Preferences" on the main toolbar, or by the keyboard shortcut Ctrl-semi-colon. This menu gives you the ability to tweak your configuration of DrJava so that it better serves your needs. To switch between Preference Categories, click on the names in the left part of the Preferences window. +
Clean Build Directory + This option is only enabled once you have specified a build + directory in the Project Properties dialog box. Once you have + specified a build directory, selecting this option will remove all + .class files and empty directories in the + build directory. + +
+ +
Project Properties + The Project Properties dialog box allows you to set two optional + properties to better utilize the project facility. To access the + Project Properties dialog, select "Project, Project + Properties". + + Project Root: This is the directory where + the source files are located. It corresponds to the default package + of your project. If no directory is entered, the directory + containing the project file is assumed. + + Build Directory: Set this if you want + your compiled files to be compiled to a directory other than the + source directory. This is often useful if your project is large or + you want to be able to clean the build directory (see the option on + the Project menu). + + Working Directory: DrJava will use this + directory as "current" directory for the Interactions pane and the + user program. + + Main Class: This allows you to specify + the class that holds the main method for the project. When this is + set, you can use "Project, Run Main Class" to launch the + program. + + Extra Classpath: In this section you + can list directories or JAR files that should be included on the + classpath while you are working with this project. The classes + added this way are available both in the Interactions pane and when + compiling. + + +
+ +
-
- Resource Locations - The Resource Locations menu allows you to specify the location of many important resources. All of these fields are optional and can be left blank if you want default values to take effect. + + The Preferences Menu The + Preferences menu in DrJava can be accessed by selecting "Edit, + Preferences" on the main toolbar, or by the keyboard shortcut + Ctrl-semi-colon. This menu gives you the ability to tweak your + configuration of DrJava so that it better serves your needs. To + switch between Preference Categories, click on the names in the left + part of the Preferences window. + + +
Resource Locations + The Resource Locations menu allows you to specify the location of + many important resources. All of these fields are optional and can + be left blank if you want default values to take effect. - - - Web Browser and Web Browser Command: - Allow you to specify which web browser you want to use for viewing Javadoc and Help files. You can choose to specify the Web Browser program directly, state the command you use to launch your browser, or leave both blank if your system has a default browser. - - - - Tools.jar Location: - The directory of your tools.jar file which has the compiler and debugger. This file is usually created during the installation of the Java JDK. - - - - Display All Compiler Versions: - By default, DrJava only displays one compiler per major version, even if multiple updates are found (Example: You have JDK 6 Updates 10 and 14 installed; DrJava will only display JDK 6 Update 14). To display all compiler versions, mark this checkbox. Note: You have to restart DrJava when you change this setting. - + Web Browser and Web Browser + Command: Allow you to specify which web + browser you want to use for viewing Javadoc and Help files. + You can choose to specify the Web Browser program directly, + state the command you use to launch your browser, or leave + both blank if your system has a default browser. + + + Tools.jar Location: The + directory of your tools.jar file which has the compiler and + debugger. This file is usually created during the installation + of the Java JDK. + + Display All Compiler Versions: + By default, DrJava only displays one compiler per major + version, even if multiple updates are found (Example: You have + JDK 6 Updates 10 and 14 installed; DrJava will only display JDK + 6 Update 14). To display all compiler versions, mark this + checkbox. Note: You have to restart DrJava when you change this + setting. - - Extra Classpath: - A way for you to specify extra directories you want the compiler to look in when it is trying to find class files. Use "Add" and "Remove" to control which directories are on the classpath, and "Move Up" and "Move Down" to order the directories in the order you want them to be looked through. If no directories are specified here, the compiler will look in the directories of the files you are compiling. - + Extra Classpath: A way for you + to specify extra directories you want the compiler to look in + when it is trying to find class files. Use "Add" and "Remove" + to control which directories are on the classpath, and "Move + Up" and "Move Down" to order the directories in the order you + want them to be looked through. If no directories are + specified here, the compiler will look in the directories of + the files you are compiling. - + - - - - - + Older versions of DrJava also had the following options: - - - JSR-14 and JSR-14 Collections Path: - The JSR-14 jar is the location of the JSR14 compiler, while the JSR-14 Collections path is a collection of the generified collection classes, such as Vector<?>. If you are not using the JSR14 compiler, you can just leave these blank. - - - -
- -
- Display Options - The Display Options menu allows you to control how DrJava looks. - - - - Look and Feel: - Specify what theme DrJava uses - - - - Plastic Theme: - If Plastic is selected as Look and Feel, then the specific theme can be selected here - - - - Toolbar Buttons: - Choose the configuration of text and graphics that you want on your toolbar. - - - - Line Numbers: - Choose whether you want these shown on the left hand side of the definitions pane. - - - - Show sample of source code when fast switching: - Choose whether a sample of the source code around the current caret position should be shown in the Fast Switch window. - - - - Show Code Preview Popups: - Whether a sample of the source code around the document location should be shown in the Breakpoints, Bookmarks and Find Results panes. - - - - Size of Clipboard History: - DrJava puts all text that you copy or cut out of text in a Ctrl+Shift+V, you can show the entries of the history and paste one of its items. This setting determines the size of the history. - - - - Display Fully-Qualified Class Names in "Go to File" Dialog: - If this option is checked, the "Go to File" dialog displays both the simple and the fully-qualified class name (i.e. both MyClass and foo.bar.MyClass). This sometimes makes navigation easier, but it may increase the time it takes to display the "Go to File" dialog. - - - - Scan Class Files For Auto-Completion After Each Compile: - DrJava can auto-complete the names of user classes. If this option is checked, DrJava will scan all class files that were created after each compile to obtain the names, even of inner classes. IF this option is not checked, DrJava can only auto-complete the names of the documents that are open. Selecting this option slows down compiles. - - - - Consider Java API Classes for Auto Completion: - When this option is enabled, DrJava will include the names of the standard Java API classes in the list of names used for auto-completion. - - - - Display Right Margin: - Enable this option to let DrJava display a vertical line representing the right margin of the document. - - - - Right Margin Position: - This option controls the position of the right margin. By default, the right margin line is displayed after 120 columns, provided the "Display Right Margin" option above is enabled. - - - - - - - - - - - There are two submenus under Display Options, Fonts and Colors. -
- -
- Fonts Options - The Fonts Options allows you to specify how the font should look. There are four font categories. - - - Main Font: - Specifies the font for the text in the definitions pane and the Interactions Pane. - - - - Line Numbers Font: - Specifies the font for the line numbers in the definitions pane, if you enabled them. - - - - Document List Font: - Specifies the font for the file names in the navigator pane on the left. - - - - Toolbar Font: - Specifies the font used on the toolbar - - - - You also have the option of using anti-aliased text. If this is selected, DrJava displays a smoothed version of the text. In some situations, this is more pleasant to view. + JSR-14 and JSR-14 Collections + Path: The JSR-14 jar is the location of the + JSR14 compiler, while the JSR-14 Collections path is a + collection of the generified collection classes, such as + Vector<?>. If you are not using the JSR14 compiler, + you can just leave these blank. + - - - - - - +
-
+
Display Options The + Display Options menu allows you to control how DrJava looks. + -
- Color Options + Look and Feel: + Specify what theme DrJava uses + - The Colors Menu allows you to specify colors for a variety of types of text. Click on the "..." button to change the color for a type of text. The color is then demonstrated on the colors menu. + Plastic Theme: If Plastic is + selected as Look and Feel, then the specific theme can be + selected here + + Toolbar Buttons: Choose the + configuration of text and graphics that you want on your + toolbar. + + Line Numbers: Choose whether + you want these shown on the left hand side of the definitions + pane. + + Show sample of source code when fast + switching: Choose whether a sample of the source + code around the current caret position should be shown in the + Fast Switch window. + + Show Code Preview Popups: + Whether a sample of the source code around the document + location should be shown in the Breakpoints, Bookmarks and Find + Results panes. + + Size of Clipboard History: + DrJava puts all text that you copy or cut out of text in a + Ctrl+Shift+V, you can show the entries of + the history and paste one of its items. This setting determines + the size of the history. + + Display Fully-Qualified Class Names in "Go to + File" Dialog: If this option is checked, the "Go + to File" dialog displays both the simple and the + fully-qualified class name (i.e. both MyClass and + foo.bar.MyClass). This sometimes makes navigation easier, but + it may increase the time it takes to display the "Go to File" + dialog. + + Scan Class Files For Auto-Completion After + Each Compile: DrJava can auto-complete the names + of user classes. If this option is checked, DrJava will scan + all class files that were created after each compile to obtain + the names, even of inner classes. IF this option is not + checked, DrJava can only auto-complete the names of the + documents that are open. Selecting this option slows down + compiles. + + Consider Java API Classes for Auto + Completion: When this option is enabled, DrJava + will include the names of the standard Java API classes in the + list of names used for auto-completion. + + + Display Right Margin: Enable + this option to let DrJava display a vertical line representing + the right margin of the document. + + + Right Margin Position: This + option controls the position of the right margin. By default, + the right margin line is displayed after 120 columns, provided + the "Display Right Margin" option above is enabled. + + + + + + + There are two submenus under Display Options, Fonts and + Colors.
+ +
Fonts Options The + Fonts Options allows you to specify how the font should look. + There are four font categories. + Main Font: Specifies the font + for the text in the definitions pane and the + Interactions Pane. + + Line Numbers Font: Specifies + the font for the line numbers in the definitions pane, if you + enabled them. + + Document List Font: Specifies + the font for the file names in the navigator pane on the + left. + + Toolbar Font: Specifies the + font used on the toolbar + - - - - - + You also have the option of using anti-aliased text. If this is + selected, DrJava displays a smoothed version of the text. In some + situations, this is more pleasant to view. -
+ + -
- Window Positions - The Window Positions category allows you to control if DrJava saves the positions of its windows. +
- - - Save Window Size and Position: - Check this if you want the size and position of the main DrJava window to be saved on exit. - +
Color Options - - Save "xxx"Dialog Position: - Check this if you want the size and position of the "xxx" dialog to be saved on exit (different choices for "xxx"). - + The Colors Menu allows you to specify colors for a variety of types + of text. Click on the "..." button to change the color for a type of + text. The color is then demonstrated on the colors menu. - - Reset "xxx" Dialog Position and Size: - Press this button to reset the size and position of the "xxx" dialog (different choices for "xxx"). This can be useful if the dialog was displayed outside the screen for some reason and is not accessible. - + - - Detach Tabbed Panes: - By default, the tabbed panes are attached to the bottom of DrJava's main window. By selecting this option, DrJava displays the tabbed panes in their own separate window. - +
- - Detach Debugger: - By default, the debugger pane is displayed in DrJava's main window. By selecting this option, DrJava displays the debugger in its own separate window. - +
Window Positions The Window + Positions category allows you to control if DrJava saves the + positions of its windows. - + Save Window Size and + Position: Check this if you want the size and + position of the main DrJava window to be saved on + exit. -
+ Save "xxx"Dialog Position: + Check this if you want the size and position of the "xxx" + dialog to be saved on exit (different choices for + "xxx"). -
- Key Bindings - - The Key Bindings menu allows you to specify the keyboard shortcuts you use for everything from compiling a document to cutting text to resetting the Interactions Pane. The only restriction is that the shortcut you choose must be one basic entry--for example, you cannot use Ctrl-X, Ctrl-S to save a file, but you could use Ctrl-Alt-S. However, actions accept multiple key bindings so that a user may bind both Ctrl-X and Ctrl-S to the save file action and use either keystroke combination to save their file. Adding support for a wider range of keyboard shortcuts is a feature request currently under review. - - - - - - - -
- -
- Compiler Options - - The Compiler Options menu allows you to set what warnings you will be shown in the compilation window on a normal compile. An explanation of each warning is given if you hover the mouse over it. We recommend that beginning programmers uncheck all of these boxes until they have a solid understanding of what the warnings mean. - - - - - - - -
- -
- Interactions Pane - - The Interactions Pane category allows you to set options for the Interactions Pane. - - - Size of Interactions History: - Specifies how many interactions will be stored in the history for you to scroll through using the up arrow. - - - - Enable the "Auto Import" Dialog: - When this option is enabled, DrJava will display a dialog to automatically import classes when a class name is interpreted but not known. After the class has been selected, DrJava will execute the appropriate "import" statement and re-execute the line that caused the dialog to appear. - - - - Classes to Auto-Import: - This option allows you to select classes and packages that should be imported automatically whenever the Interactions Pane is reset. List fully-qualified class names (e.g. java.util.ArrayList, or packages ending with a *, e.g. java.util.*). - - - - Restore last working directory of the Interactions Pane on start up: - If this option is enabled, DrJava will restore the directory that was last used in the Interactions Pane. If it is disabled, DrJava will always use the value of the "user.home" property. - - - - Smart Run Command: - If this option is enabled, DrJava will run applets and ACM Java Task Force Programs using the "Run" and "Run Project" buttons as well. These applets and ACM Java Task Force Programs do not need to have a main method to be run, as long as they are proper applets or ACM Java Task Force Programs. - - - - Enforce access control: - This option controls the access control DrJava performs when class members are accessed. If the option is set to 'private and package only', then access control is used for all class members that are private or package private. If it is set to 'private only', then access control is used only for private members, and the other access levels can always be accessed. If it is set to 'disabled', all class members can be accessed, regardless of their access level. (Note: Currently, access control in DrJava's Interactions Pane has not been fully implemented; at most, access is checked for private and package private members; protected members can always be accessed.) - - - - Require semicolon: - If this option is enabled, then DrJava will require a semicolon at the end of statements in the Interactions Pane. - - - - Require variable type: - If this option is enabled, then DrJava will a variable type for variable declarations in the Interactions Pane (e.g. int i = 5). If it is disabled, DrJava will attempt to assign a variable type automatically (e.g. i = 5 to declare an int i). - - - - -
- -
- Debugger Options - The Debugger Menu gives you more control over the debugger. - - - - The Sourcepath Box: - Allows you to specify any libraries that you want the debugger to look through. The order of libraries in the list specifies the order in which they are searched for matching .java files. Use "Add" and "Remove" to control what is on the Sourcepath, and "Move Up" and "Move Down" to control the order. - - - - Stepped Into Checkboxes: - Allow you to specify what will be stepped into. If you tell the debugger to step into a file, it will open up the source and show you line by line what is being executed. You would only do this if you were curious about behavior that was expected to occur within the method being executed. Normally, you would not step into Java classes and Interpreter classes, because you assume their code is correct and are intstead interested in how your code interacts with them. You should never select Step Into DrJava classes unless you are debugging DrJava itself. - - - - Classes/Packages to Exclude: - Allows you to specify other classes/packages to step over. This should be a list with fully qualified names. To exclude a whole package, add packagename.* to the list. You might use this box to exclude instructor provided libraries, for example java.util.* . - - - - Auto-Import after Breakpoint/Step: - Automatically imports all classes and packages again that had been imported when the program was last suspended, i.e. before the breakpoint was hit or before the last step was taken. - - - - Auto-Step Rate in ms: - The delay interval at which the automatic trace steps into each line of code in the program. - - - - - - - - - -
- -
- Javadoc Options - - The Javadoc menu lets you specify everything you need to generate perfect Javadoc for your source files. For information on Javadoc in general, see the Javadoc section above. - - - - Access Level: - Allows you to set the level of what will be shown in your documentation. Choose the most restrictive access you want displayed, and everything less restrictive will also be included. - - - - Java Version for Javadoc Links and URL: - Set the version to whatever version of java your code relies on, and maek sure the corresponding URL is set appropriately. Because most Javadoc documentation references library files in the Java API, it is important to specify which version of the API to link to. - This option also controls which URL is used to access the Javadoc pages for the Java API. - - - - JUnit 3.8.2 URL - The URL to use when generating links to JUnit 3.8.2 library classes or opening the Javadoc pages for the Java API. - - - - Additional Javadoc URLs - A list of URLs used to open Javadoc pages for user-specified libraries. Please enter the URL to the directory that contains the allclasses-frame.html file. For example, to open DrJava's Javadoc, enter http://drjava.org/javadoc/drjava. - - - - Default Desination Directory: - Specifies where the generated documentation will be saved. Click on the "..." button to specify it. - - - - Custom Javadoc Parameters: - Allows the expert user to pass more complicated flags to Javadoc. - - - - Generate Javadoc from Source Roots - Controls whether all packages in a file's directory have Javadoc run over them, or whether just the immediate package and subpackage do. - - - - - - - - - -
- -
- Notifications Options - The Notifications category lets you say whether or not you want notifications on certain actions. This is the place to come if you accidentally turn off a warning and want to turn it back on. - - - - - - - -
- -
- Miscellaneous Options - - The Miscellaneous category contains all of the options that did not fit neatly into one of the above categories. - - - - Indent Level: - Specifies the number of spaces that make up a "tab" in DrJava. This is used for auto-indenting. - - - - Recent Files List Size: - Specifies how many of your most recently open files are displayed when you open the "File" menu on the toolbar. - - - - Maximum Size of Browser History: - Specifies how many source code locations are stored in the browser history. This history can be used to go back and forth, like in a web browser. - - - - - The Checkboxes: - Specify a variety of options that are personal preference: - - - - Automatically Close Block Comments: - Puts a "*/" after every "/**" or "/*" you type, so you don't have to remember to close the comment. - - - - Allow Assert Keyword in Java 1.4: - Passes a flag to the 1.4 compiler that specifies the assert keyword is okay. - - - - Keep Emacs-style Backup Files: - Tells DrJava to automatically make backups of files such that file file.java would be backed up as file.java~. This is a nice option, because it provides an additional level of protection against lost code. - - - - Clear Console After Interactions Reset: - Makes the Interactions Pane clear when it is reset. After a reset, any previous objects built in the Interactions Pane have been lost and must be recreated. Clearing the console helps you remember that you need to recreate everything. - - - - Require test classes in projects to end in "Test": - Whether to require that JUnit test classes in projects end in "Test". If this is enabled, classes that do not end in "Test" will not be considered JUnit tests when in project mode. - + Reset "xxx" Dialog Position and Size: + Press this button to reset the size and position of the "xxx" + dialog (different choices for "xxx"). This can be useful if the + dialog was displayed outside the screen for some reason and is + not accessible. - - - - Put the focus in the definitions pane after find/replace: - If this option is checked, the focus will be put in the definitions pane after using "Find". If this is not checked, then the focus will remain in the Find/Replace tab. - - - - Forcefully Quit DrJava: - On some systems (namely tablet PCs), DrJava does not shut down properly when quit. Select this option to remedy this problem. - - - - Enable Remote Control: - Java's "remote control" allows other applications to control certain aspects of DrJava, for example what file is displayed. This feature is also necessary if you want to double-click on a .java file to open the file in an existing instance of DrJava. - - - - Remote Control Port: - Selects the port that Drjava uses for its remote control. - + Detach Tabbed Panes: By + default, the tabbed panes are attached to the bottom of + DrJava's main window. By selecting this option, DrJava displays + the tabbed panes in their own separate window. + - - Follow File Delay: - Specifies the number of milliseconds that have to pass before DrJava will update a "Follow File" window again. - + Detach Debugger: By default, + the debugger pane is displayed in DrJava's main window. By + selecting this option, DrJava displays the debugger in its own + separate window. - - Maximum Lines in "Follow File" Window: - Specifies the number of of lines that a "Follow File" window may contain. If a file has more than this many lines, only the end of the file will be displayed. - + - - +
-
+
Key Bindings - - - - - + The Key Bindings menu allows you to specify the keyboard shortcuts + you use for everything from compiling a document to cutting text to + resetting the Interactions Pane. The only restriction is that the + shortcut you choose must be one basic entry--for example, you cannot + use Ctrl-X, Ctrl-S to save a file, but you could use Ctrl-Alt-S. + However, actions accept multiple key bindings so that a user may bind + both Ctrl-X and Ctrl-S to the save file action and use either keystroke + combination to save their file. Adding support for a wider range of + keyboard shortcuts is a feature request currently under review. -
+ -
- File Types +
- Configurable options for file types. Note that the options here are only available on Windows, and only if the .exe file is used. - .drjava files are DrJava project files. .djapp files are DrJava add-ons. .java files are Java source files. +
Compiler Options - - - Associate .drjava and .djapp Files with DrJava - Set the file type associations so that double-clicking on .drjava and .djapp files in the Windows Explorer will open them in DrJava. - + The Compiler Options menu allows you to set what warnings you will + be shown in the compilation window on a normal compile. An explanation + of each warning is given if you hover the mouse over it. We recommend + that beginning programmers uncheck all of these boxes until they have a + solid understanding of what the warnings mean. - - Remove .drjava and .djapp File Associations - Remove the association of .drjava and .djapp files with DrJava. - + - - Associate .java Files with DrJava - Set the file type associations so that double-clicking on .java files in the Windows Explorer will open them in DrJava. - +
- - Remove .java File Associations - Remove the association of .java files with DrJava. - +
Interactions Pane + + The Interactions Pane category allows you to set options for the + Interactions Pane. + Size of Interactions History: Specifies + how many interactions will be stored in the history for you + to scroll through using the up arrow. + + + Enable the "Auto Import" Dialog: + When this option is enabled, DrJava will display a dialog to + automatically import classes when a class name is interpreted + but not known. After the class has been selected, DrJava will + execute the appropriate "import" statement and re-execute the + line that caused the dialog to appear. + + + Classes to Auto-Import: This + option allows you to select classes and packages that should be + imported automatically whenever the Interactions Pane is reset. + List fully-qualified class names (e.g. java.util.ArrayList, or + packages ending with a *, e.g. java.util.*). + + + Restore last working directory of the + Interactions Pane on start up: If this option is + enabled, DrJava will restore the directory that was last used + in the Interactions Pane. If it is disabled, DrJava will always + use the value of the "user.home" property. + + + Smart Run Command: If this + option is enabled, DrJava will run applets and ACM Java Task + Force Programs using the "Run" and "Run Project" buttons as + well. These applets and ACM Java Task Force Programs do not + need to have a main method to be run, as long as they are + proper applets or ACM Java Task Force Programs. + + + Enforce access control: This + option controls the access control DrJava performs when class + members are accessed. If the option is set to 'private and + package only', then access control is used for all class + members that are private or package private. If it is set to + 'private only', then access control is used only for private + members, and the other access levels can always be accessed. If + it is set to 'disabled', all class members can be accessed, + regardless of their access level. (Note: Currently, access + control in DrJava's Interactions Pane has not been fully + implemented; at most, access is checked for private and package + private members; protected members can always be + accessed.) + + Require semicolon: If this + option is enabled, then DrJava will require a semicolon at the + end of statements in the Interactions Pane. + + + Require variable type: If this + option is enabled, then DrJava will a variable type for + variable declarations in the Interactions Pane (e.g. + int i = 5). If it is disabled, DrJava will + attempt to assign a variable type automatically (e.g. + i = 5 to declare an int + i). + + - - Automatically assign .java, .drjava and .djapp Files to DrJava - Specifies whether Drjava should automatically associate .java, .drjava and .djapp files with DrJava so those files are opened with DrJava when double-clicked. When set to the default, "ask me at startup", DrJava will check at startup if those associations exist, and if not, present a dialog allowing the user to set the file associations. Setting this option to "always" will set the file associations automatically at startup without user interaction. Setting it to "never" will not change file associations nor ask the user. - +
- +
Debugger Options The + Debugger Menu gives you more control over the debugger. + + The Sourcepath Box: + Allows you to specify any libraries that you want the + debugger to look through. The order of libraries in the + list specifies the order in which they are searched for + matching .java files. Use "Add" and "Remove" to control + what is on the Sourcepath, and "Move Up" and "Move Down" to + control the order. + + Stepped Into Checkboxes: Allow + you to specify what will be stepped into. If you tell the + debugger to step into a file, it will open up the source and + show you line by line what is being executed. You would only + do this if you were curious about behavior that was expected to + occur within the method being executed. Normally, you would + not step into Java classes and Interpreter classes, because you + assume their code is correct and are intstead interested in how + your code interacts with them. You should never select Step + Into DrJava classes unless you are debugging DrJava itself. + + + Classes/Packages to Exclude: + Allows you to specify other classes/packages to step over. + This should be a list with fully qualified names. To exclude a + whole package, add packagename.* to the + list. You might use this box to exclude instructor provided + libraries, for example java.util.* + . + + Auto-Import after Breakpoint/Step: + Automatically imports all classes and packages again that had + been imported when the program was last suspended, i.e. before + the breakpoint was hit or before the last step was + taken. + + Auto-Step Rate in ms: The + delay interval at which the automatic trace steps into each + line of code in the program. + -
- + -
- JVM Options +
+ +
Javadoc Options + + The Javadoc menu lets you specify everything you need to generate + perfect Javadoc for your source files. For information on Javadoc in + general, see the Javadoc section above. + + Access Level: + Allows you to set the level of what will be shown in your + documentation. Choose the most restrictive access you want + displayed, and everything less restrictive will also be + included. + + Java Version for Javadoc Links and + URL: Set the version to whatever version of java + your code relies on, and maek sure the corresponding URL is set + appropriately. Because most Javadoc documentation references + library files in the Java API, it is important to specify which + version of the API to link to. This + option also controls which URL is used to access the Javadoc pages + for the Java API. + + JUnit 3.8.2 URL The URL to use + when generating links to JUnit 3.8.2 library classes or opening + the Javadoc pages for the Java API. + + + Additional Javadoc URLs A list + of URLs used to open Javadoc pages for user-specified + libraries. Please enter the URL to the directory that contains + the allclasses-frame.html file. For + example, to open DrJava's Javadoc, enter http://drjava.org/javadoc/drjava. + + + Default Desination Directory: + Specifies where the generated documentation will be saved. + Click on the "..." button to specify it. + + + Custom Javadoc Parameters: + Allows the expert user to pass more complicated flags to + Javadoc. + + Generate Javadoc from Source Roots + Controls whether all packages in a file's directory have + Javadoc run over them, or whether just the immediate package + and subpackage do. + + + - The JVM category contains options for the two Java Virtual Machines (JVMs) that DrJava uses. +
- - - Maximum Heap Size for Main JVM in MB - Specifies how many megabytes of memory Java should use for the Main JVM (the main part of DrJava including the editor and compiler). The "default" setting leaves this up to Java. If you experience "Out of memory" errors, set this to a value that is larger than 64 MB (default in Java 5) but smaller than the amount of physical memory you have. If it is still too small, choose the next bigger setting. Note: You have to restart DrJava for changes to become effective. - +
Notifications Options + The Notifications category lets you say whether or not you want + notifications on certain actions. This is the place to come if you + accidentally turn off a warning and want to turn it back on. - - JVM Args for Main JVM - Specifies the JVM arguments that should be used for DrJava's Main JVM, other than the maximum heap size (-Xmx), which is controlled using the option above. Note: You have to restart DrJava for changes to become effective. - + - - Maximum Heap Size for Interactions JVM in MB - Specifies how many megabytes of memory Java should use for the Interactions JVM (used to interpret code in the Interactions Pane and to run programs developed in DrJava). The "default" setting leaves this up to Java. If you experience "Out of memory" errors, set this to a value that is larger than 64 MB (default in Java 5) but smaller than the amount of physical memory you have. If it is still too small, choose the next bigger setting. Note: You have to reset the Interactions Pane for changes to become effective. - +
- - JVM Args for Interactions JVM - Specifies the JVM arguments that should be used for DrJava's Interactions JVM, other than the maximum heap size (-Xmx), which is controlled using the option above. Note: You have to reset the Interactions Pane for changes to become effective. - +
Miscellaneous + Options + + The Miscellaneous category contains all of the options that did not + fit neatly into one of the above categories. + + Indent + Level: Specifies the number of spaces that + make up a "tab" in DrJava. This is used for + auto-indenting. + + Recent Files List Size: + Specifies how many of your most recently open files are + displayed when you open the "File" menu on the toolbar. + + + Maximum Size of Browser History: + Specifies how many source code locations are stored in the + browser history. This history can be used to go back and forth, + like in a web browser. + + The Checkboxes: Specify a + variety of options that are personal preference: + + Automatically Close Block Comments: + Puts a "*/" after every "/**" or "/*" you type, so + you don't have to remember to close the comment. + + + Allow Assert Keyword in Java 1.4: + Passes a flag to the 1.4 compiler that specifies the + assert keyword is okay. + + Keep Emacs-style Backup Files: + Tells DrJava to automatically make backups of files such + that file file.java would be backed up as file.java~. This + is a nice option, because it provides an additional level + of protection against lost code. + + + Clear Console After Interactions + Reset: Makes the Interactions Pane clear when + it is reset. After a reset, any previous objects built in + the Interactions Pane have been lost and must be recreated. + Clearing the console helps you remember that you need to + recreate everything. + + Require test classes in projects to end + in "Test": Whether to require that JUnit test + classes in projects end in "Test". If this is enabled, + classes that do not end in "Test" will not be considered + JUnit tests when in project mode. + - + + + Put the focus in the definitions pane + after find/replace: If this option is + checked, the focus will be put in the definitions pane + after using "Find". If this is not checked, then the focus + will remain in the Find/Replace tab. + + + Forcefully Quit DrJava: On + some systems (namely tablet PCs), DrJava does not shut down + properly when quit. Select this option to remedy this + problem. + + Enable Remote Control: + Java's "remote control" allows other applications to + control certain aspects of DrJava, for example what file is + displayed. This feature is also necessary if you want to + double-click on a .java file to open the file in an + existing instance of DrJava. + + + Remote Control Port: + Selects the port that Drjava uses for its remote + control. + + Follow File Delay: + Specifies the number of milliseconds that have to pass + before DrJava will update a "Follow File" window + again. + + Maximum Lines in "Follow File" + Window: Specifies the number of of lines that + a "Follow File" window may contain. If a file has more than + this many lines, only the end of the file will be + displayed. + + + + + + + +
+ +
File Types + + Configurable options for file types. Note that the options here are + only available on Windows, and only if the .exe file is used. + .drjava files are DrJava project files. .djapp files are DrJava + add-ons. .java files are Java source files. + + Associate + .drjava and .djapp Files with DrJava Set the + file type associations so that double-clicking on .drjava + and .djapp files in the Windows Explorer will open them in + DrJava. + + Remove .drjava and .djapp File + Associations Remove the association of + .drjava and .djapp files with DrJava. + + + Associate .java Files with DrJava + Set the file type associations so that double-clicking on + .java files in the Windows Explorer will open them in + DrJava. + + Remove .java File Associations + Remove the association of .java files with DrJava. + + + Automatically assign .java, .drjava and + .djapp Files to DrJava Specifies whether + Drjava should automatically associate .java, .drjava and + .djapp files with DrJava so those files are opened with + DrJava when double-clicked. When set to the default, "ask + me at startup", DrJava will check at startup if those + associations exist, and if not, present a dialog allowing + the user to set the file associations. Setting this option + to "always" will set the file associations automatically at + startup without user interaction. Setting it to "never" + will not change file associations nor ask the user. + + + + +
+ -
+
JVM Options + + The JVM category contains options for the two Java Virtual Machines + (JVMs) that DrJava uses. + + Maximum Heap + Size for Main JVM in MB Specifies how many + megabytes of memory Java should use for the Main JVM (the + main part of DrJava including the editor and compiler). The + "default" setting leaves this up to Java. If you experience + "Out of memory" errors, set this to a value that is larger + than 64 MB (default in Java 5) but smaller than the amount + of physical memory you have. If it is still too small, + choose the next bigger setting. Note: You have to restart + DrJava for changes to become effective. + + + JVM Args for Main JVM + Specifies the JVM arguments that should be used for + DrJava's Main JVM, other than the maximum heap size (-Xmx), + which is controlled using the option above. Note: You have + to restart DrJava for changes to become effective. + + + Maximum Heap Size for Interactions JVM in + MB Specifies how many megabytes of memory + Java should use for the Interactions JVM (used to interpret + code in the Interactions Pane and to run programs developed + in DrJava). The "default" setting leaves this up to Java. + If you experience "Out of memory" errors, set this to a + value that is larger than 64 MB (default in Java 5) but + smaller than the amount of physical memory you have. If it + is still too small, choose the next bigger setting. Note: + You have to reset the Interactions Pane for changes to + become effective. + + JVM Args for Interactions JVM + Specifies the JVM arguments that should be used for + DrJava's Interactions JVM, other than the maximum heap size + (-Xmx), which is controlled using the option above. Note: + You have to reset the Interactions Pane for changes to + become effective. + + + +
diff --git a/docs/src/user/userdoc.docbook b/docs/src/user/userdoc.docbook index 5d2b53360..50b0616dc 100644 --- a/docs/src/user/userdoc.docbook +++ b/docs/src/user/userdoc.docbook @@ -1,1252 +1,1980 @@ - - + - - 2009-08-03 - DrJava User Documentation - - + 2009-08-03 DrJava User Documentation + - - Introduction - - DrJava is a programming environment for Java, primarily intended to help students focus more on program design than on the features of a complicated development environment. DrJava also provides many advanced features for experienced developers. These features center around DrJava's Interactions Pane, which is a "read-eval-print loop" that allows users to easily develop, test, and debug Java programs in an interactive, incremental manner. - - Home Page: http://drjava.org - Original Paper: http://drjava.org/papers/drjava-paper.shtml - - + Introduction + + DrJava is a programming environment for Java, primarily intended to + help students focus more on program design than on the features of a + complicated development environment. DrJava also provides many + advanced features for experienced developers. These features center + around DrJava's Interactions Pane, which is a "read-eval-print loop" + that allows users to easily develop, test, and debug Java programs in + an interactive, incremental manner. Home + Page: http://drjava.org + Original Paper: http://drjava.org/papers/drjava-paper.shtml + - - Getting Started - This chapter describes the basics for how to start using DrJava, including where to get the program and how to run it. - -
- Philosophy - The general idea behind DrJava is to provide powerful development tools that are as easy to use as possible. For this reason, we try to make DrJava easy to run and easy to understand, through a simple user interface with few panes and a legible toolbar. Meanwhile, we want to help novice users become comfortable with writing Java code by allowing them to quickly evaluate expressions in DrJava's Interactions Pane. All of our powerful features try to build on this simple and interactive interface. - The rest of this chapter will walk you through downloading and running DrJava, but if you have the DrJava .jar file, you can just double-click it to get started. -
- -
- Downloading DrJava - You can download the newest releases of DrJava as a .jar file from our home page, http://drjava.org, or directly from our Project Filelist page on SourceForge. + Getting Started This + chapter describes the basics for how to start using DrJava, including + where to get the program and how to run it. + +
Philosophy The general + idea behind DrJava is to provide powerful development tools that + are as easy to use as possible. For this reason, we try to make + DrJava easy to run and easy to understand, through a simple user + interface with few panes and a legible toolbar. Meanwhile, we want + to help novice users become comfortable with writing Java code by + allowing them to quickly evaluate expressions in DrJava's + Interactions Pane. All of our powerful features try to build on + this simple and interactive interface. The rest of + this chapter will walk you through downloading and running DrJava, + but if you have the DrJava .jar file, you can + just double-click it to get started.
+ +
Downloading DrJava You + can download the newest releases of DrJava as a + .jar file from our home page, http://drjava.org, or directly + from our Project + Filelist page on SourceForge. - - Stable, Beta and Development Releases - We make a distinction between Stable, Beta and Development releases of DrJava. All releases must pass our rigorous suite of unit tests and should be safe to use, but we have found that a period of beta-testing can be helpful for finding additional bugs. Any large new features are first released as a Beta release and go through a beta-testing period before being included in Stable releases, ensuring these releases are safe for all users. Our Development releases contain newer features that are under development. We believe these releases are also ready to use, but they have not been widely beta-tested, so some users may prefer to use Beta or Stable releases, or perhaps only Stable releases. - -
- -
- Running DrJava - On many platforms, DrJava can be started by simply double-clicking on the .jar file you downloaded. DrJava can also be started from a command prompt, where you can optionally give it a list of source files to open at startup: - - java -jar drjava-RELEASE-DATE-rREVISION.jar - -config [CONFIG_FILE] - filename.java - - Replace RELEASE-DATE-rREVISION with the appropriate value for your version of DrJava, e.g. java -jar drjava-stable-20080904-r4668.jar. The "config" argument is optional and allows you to specify a custom configuration file, rather than the .drjava file stored in your home directory. - - - Running DrJava on Mac OS X - If you are using Mac OS X, you can download DrJava as an Application from our website. Download the drjava-RELEASE-DATE-rREVISION-osx.tar.gz file and decompress it. You can then copy the DrJava icon into your Applications folder or keep it on your Dock. + Stable, Beta and Development Releases + We make a distinction between Stable, Beta and Development + releases of DrJava. All releases must pass our rigorous suite of + unit tests and should be safe to use, but we have found that a + period of beta-testing can be helpful for finding additional + bugs. Any large new features are first released as a Beta + release and go through a beta-testing period before being + included in Stable releases, ensuring these releases are safe for + all users. Our Development releases contain newer features that + are under development. We believe these releases are also ready + to use, but they have not been widely beta-tested, so some users + may prefer to use Beta or Stable releases, or perhaps only Stable + releases.
+ +
Running DrJava On many + platforms, DrJava can be started by simply double-clicking on the + .jar file you downloaded. DrJava can also be + started from a command prompt, where you can optionally give it a + list of source files to open at startup: + java -jar drjava-RELEASE-DATE-rREVISION.jar -config [CONFIG_FILE] filename.java Replace + RELEASE-DATE-rREVISION with the appropriate value for your version + of DrJava, e.g. java -jar + drjava-stable-20080904-r4668.jar. The "config" + argument is optional and allows you to specify a custom + configuration file, rather than the .drjava + file stored in your home directory. + + Running DrJava on Mac OS X If you are + using Mac OS X, you can download DrJava as an Application from + our website. Download the + drjava-RELEASE-DATE-rREVISION-osx.tar.gz + file and decompress it. You can then copy the DrJava icon into + your Applications folder or keep it on your Dock. - - Running DrJava on Windows - If you are using Windows, you can download DrJava as an executable file from our website. Download the drjava-RELEASE-DATE-rREVISION.exe file. You can then run it like a normal Windows program. - -
- -
- System Requirements - DrJava requires Java version 5 or later. Note that you will need to have the JDK (not the JRE) installed if you wish to use the debugger or create Javadoc within DrJava. - We recommend downloading and using Oracle's JDK 6 (from http://www.oracle.com/technetwork/java/javase/downloads/index.html) for Solaris, Linux, and Windows. Other users should use the Java virtual machine that comes with their operating system (including Mac OS X). - Mac OS X 10.7 "Lion" does not include a default Java runtime anymore. Therefore, the operating system may prompt you to install Java if you have not installed it before. You can also download Java for OS X Lion from Apple's website, or search for Java downloads for Mac OS X. - DrJava uses two Java Virtual Machines (one for the main program, and one for the Interactions Pane) that use Java's Remote Method Invocation (RMI) to communicate with each other. RMI uses TCP/IP as the default transport mechanism, so you must have those drivers installed. Without TCP/IP, DrJava will not start properly. - Note that there is an incompatibility between Java's Swing -GUI library and the Compiz window manager on Linux. We, the developers -of DrJava, cannot do anything to fix this problem. We hope that future -versions of Java and Compiz will address the incompatibility. In the -meantime, we recommend that you disable Compiz if you experience -problems. We also suggest that you use the latest versions of Compiz -and Java, so you can benefit from possible bug fixes made by Oracle and -the Compiz developers. For more information, see http://drjava.org/compiz/. + Running DrJava on Windows If you are + using Windows, you can download DrJava as an executable file from + our website. Download the + drjava-RELEASE-DATE-rREVISION.exe file. You + can then run it like a normal Windows program. +
+ +
System Requirements + DrJava requires Java version 8 or later. Note that you will need + to have the JDK (not the JRE) installed if you wish to use the + debugger or create Javadoc within DrJava. We recommend + downloading and using Oracle's JDK 8 (from http://www.oracle.com/technetwork/java/javase/downloads/index.html) + for Solaris, Linux, and Windows. Other users should use the Java + virtual machine that comes with their operating system (including + Mac OS X). Mac OS X 10.7 "Lion" and later do not + include a default Java runtime anymore. Therefore, the operating + system may prompt you to install Java if you have not installed it + before. You can also download Java for OS X + Lion from Apple's website, or search + for Java downloads for Mac OS X. DrJava + uses two Java Virtual Machines (one for the main program, and one + for the Interactions Pane) that use Java's Remote Method Invocation + (RMI) to communicate with each other. RMI uses TCP/IP as the + default transport mechanism, so you must have those drivers + installed. Without TCP/IP, DrJava will not start properly. + Note that there is an incompatibility between Java's Swing GUI + library and the Compiz window manager on Linux. We, the developers + of DrJava, cannot do anything to fix this problem. + We hope that future versions of Java and Compiz will address the + incompatibility. In the meantime, we recommend that you disable + Compiz if you experience problems. We also suggest that you use the + latest versions of Compiz and Java, so you can benefit from + possible bug fixes made by Oracle and the Compiz developers. For + more information, see http://drjava.org/compiz/. + Or, simply use Compton.
-
- License - -Copyright (c) 2001-2009, JavaPLT group at Rice University (drjava@rice.edu) -All rights reserved. - +
License Copyright (c) + 2001-2009, JavaPLT group at Rice University (drjava@rice.edu) All + rights reserved. Redistribution and use in source and binary forms, with or -withoutmodification, 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. - - - - -Developed by: Java Programming Languages Team - Rice University - http://www.cs.rice.edu/~javaplt/ - - - - DynamicJava - Copyright (c) 1999 Dyade - Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DYADE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE - Except as contained in this notice, the name of Dyade shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Dyade. + withoutmodification, 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. + + Developed by: Java Programming Languages Team Rice + University http://www.cs.rice.edu/~javaplt/ + + DynamicJava - Copyright (c) 1999 Dyade Permission is + hereby granted, free of charge, to any person obtaining a copy of + this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without + limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: The above copyright notice and + this permission notice shall be included in all copies or substantial + portions of the Software. THE SOFTWARE IS PROVIDED "AS + IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT + NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL DYADE BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE Except as contained in this notice, the name of + Dyade shall not be used in advertising or otherwise to promote the + sale, use or other dealings in this Software without prior written + authorization from Dyade.
- - Editing Programs - DrJava's core component is an editor for writing Java source code. Like most text editors, it supports a wide range of editing features such as "Find/Replace", "Go to Line", "Go to File", while also providing more advanced features like syntax coloring, automatic indentation, brace matching, and even a limited notion of auto-completion. - -
- Definitions Pane - The Definitions Pane is the main window of DrJava, displaying the currently active source file. As you edit files in this window, DrJava helps out with several useful features. - - - Syntax Coloring - DrJava colors special types of text differently to help make the structure of the program more apparent. Comments appear in green, while Java keywords and types appear in blue. Strings are colored red and characters are colored magenta, with all other text colored black. These colors are all configurable (see Configuring DrJava). - - One notable difference between syntax coloring in DrJava and other common editors (such as Emacs) is that DrJava uses fully correct coloring as the document is edited. For example, simply typing the beginning of a block comment ("/*") will immediately update the coloring of the entire document, unlike some other editors which will only update the color of a line when that line is edited. Having an accurate view of the program is an important aspect of understanding its structure. - - - Automatic Indentation - The key to indenting code in DrJava is the Tab key. Rather than simply inserting a tab or spaces, pressing Tab properly indents the current line (or selected text) using common coding conventions. As you type multiple lines of code into the Definitions Pane, DrJava automatically indents each line using the same technique. By default, two spaces are used for each indentation level, although this can be configured in the Preferences window. (In DrJava, code is always indented with spaces, and never with actual tab characters.) - - - - Brace Matching - To help you match open and close braces, DrJava highlights the region enclosed by a pair of braces. If you place the cursor immediately after a close brace, parenthesis, or bracket, all text between that character and the corresponding open brace is highlighted in another color. Like syntax coloring, brace matching is also done in a fully correct manner, updated with each keystroke. In addition, when the cursor is right after a closing curly brace, the line containing the matching open brace is displayed in the lower status bar. + Editing Programs DrJava's core + component is an editor for writing Java source code. Like most text + editors, it supports a wide range of editing features such as + "Find/Replace", "Go to Line", "Go to File", while also providing more + advanced features like syntax coloring, automatic indentation, brace + matching, and even a limited notion of auto-completion. + +
Definitions Pane The + Definitions Pane is the main window of DrJava, displaying the + currently active source file. As you edit files in this window, + DrJava helps out with several useful features. + + Syntax Coloring DrJava colors special + types of text differently to help make the structure of the + program more apparent. Comments appear in green, while Java + keywords and types appear in blue. Strings are colored red and + characters are colored magenta, with all other text colored + black. These colors are all configurable (see Configuring DrJava). + One notable difference between syntax coloring in + DrJava and other common editors (such as Emacs) is that DrJava uses + fully correct coloring as the document is edited. + For example, simply typing the beginning of a block comment ("/*") will + immediately update the coloring of the entire document, unlike some other + editors which will only update the color of a line when that line is + edited. Having an accurate view of the program is an important aspect of + understanding its structure. + + Automatic Indentation The key to + indenting code in DrJava is the Tab key. + Rather than simply inserting a tab or spaces, pressing + Tab properly indents the current line (or + selected text) using common coding conventions. As you type + multiple lines of code into the Definitions Pane, DrJava + automatically indents each line using the same technique. By + default, two spaces are used for each indentation level, although + this can be configured in the Preferences window. (In DrJava, + code is always indented with spaces, and never with actual tab + characters.) + + Brace Matching To help you match open + and close braces, DrJava highlights the region enclosed by a pair + of braces. If you place the cursor immediately after a close + brace, parenthesis, or bracket, all text between that character + and the corresponding open brace is highlighted in another color. + Like syntax coloring, brace matching is also done in a + fully correct manner, updated with each + keystroke. In addition, when the cursor is right after a closing + curly brace, the line containing the matching open brace is + displayed in the lower status bar. - - Commenting / Uncommenting - To help you easily write multi-line comments, DrJava automatically adds spaces and an asterisk on each new line. In addition, there is an option in the "Miscellaneous" section of the Preferences window that will tell DrJava to automatically close multi-line comments for you. Commands in the Edit menu are also available to comment out or uncomment a block of selected code using winged comments ("//"). The key bindings for these commands default to Ctrl+Slash and Ctrl+Shift+Slash respectively. Commenting out a block of code will place "//" markers at the start of each line in the block, preserving the indentation of the code. + Commenting / Uncommenting To help you + easily write multi-line comments, DrJava automatically adds + spaces and an asterisk on each new line. In addition, there is + an option in the "Miscellaneous" section of the Preferences + window that will tell DrJava to automatically close multi-line + comments for you. Commands in the Edit menu are also available + to comment out or uncomment a block of selected code using winged + comments ("//"). The key bindings for these commands default to + Ctrl+Slash and + Ctrl+Shift+Slash respectively. Commenting out + a block of code will place "//" markers at the start of each line + in the block, preserving the indentation of the code. - - Context Menu - The Definitions Pane has a context menu, which can be used by right-clicking in the pane. (Mac users should use Ctrl+Click or Option+Click.) This menu provides shortcuts to useful features such as cut, copy, and paste, as well as indenting, commenting, and setting breakpoints and bookmarks. + Context Menu The Definitions Pane has a + context menu, which can be used by right-clicking in the pane. + (Mac users should use Ctrl+Click or + Option+Click.) This menu provides shortcuts + to useful features such as cut, copy, and paste, as well as + indenting, commenting, and setting breakpoints and + bookmarks. + + Auto-Completion DrJava supports a very + limited notion of auto-completion that is nonetheless useful. + This feature is accessible as "Auto-Complete Word Under Cursor" + in the Edit menu, and it is also bound to the keyboard shortcut + Ctrl-Shift-Space by default. When invoked, + DrJava will look at the word to the left of the cursor and + attempt to auto-complete it, based on a list of documents + currently open. If there is no unique auto-completion match, + DrJava displays a predictive + input dialog with the auto-completion + candidates. When a project is open, + DrJava can also be configured to scan all class files after a compile + to obtain the auto-completion information (see Configuring DrJava). With that + option set, DrJava can auto-complete the names of all classes in your + project, even those of inner classes. On the + "Auto-Complete Word Under Cursor" diaog, there is a checkbox labeled + "Java API". If this is checked, then DrJava will also use the class + names from the Standard Java API, JUnit 3.8.2 and the user-specified + additional libraries as suggestions for auto-completion. If it is + disabled, only class names from your own source files are + used. Next to the "OK" button is the "Fully Qualified" + button. If the class "Integer" is selected, and the user presses + "OK", DrJava will auto-complete the word to "Integer". If, however, + "Fully Qualified" is used to close the dialog, DrJava will enter the + entire fully qualified class name, "java.lang.Integer" in this + case. Please note that auto-completion currently only + works for class names, and completely ignores all context except for + the word to the left of the cursor (i.e. it may generate code that + does not compile). + + Clipboard History Any text you copy or + cut out of DrJava documents will be placed in the clipboard + history, and the last 10 entries are kept (that number is + configurable, see Configuring + DrJava). To access one of the entries in the history, + use the "Paste from History" command in the Edit menu or press + Ctrl+Shift+V. In the dialog that opens up, you + can browse the history and select the entry to paste. In addition + to inserting the text at the cursor, the selected entry will also + be moved to the top of the clipboard history, and will therefore + subsequently be available with the regular paste + command. The clipboard history is a + great tool to minimize scrolling and document switching: Instead of + going back and forth several times, you can just "copy, copy, copy" + several pieces of code in a row, then go to another place in the code + and do "paste, paste from history, paste from history". + + Right Margin DrJava can display a line + after a specified number of columns, representing the right + margin of the document. By default, this line is displayed after + 120 columns. You can type past this line, and it has no effect on + the saved files or executed programs, but the right margin line + can help you format your source code more + uniformly. You can enable or disable + the right margin line in the Display category of the Preferences + window. The color of the line can be changed in the Colors category + of the Preferences. (See Configuring + DrJava.)
+ +
Multiple Documents Most + Java programs have several closely related source files, so DrJava + supports having multiple documents open at the same time. A list + of all of the names of the open documents appears in a pane to the + left of the Definitions Pane, listing files in the order in which + they were opened. You can view and edit a particular document by + selecting it in the list, or by using the Previous and Next + Document commands in the Edit Menu. These commands will switch to + the next for previous document in alphabetical order. (These + commands have keyboard shortcuts as well: + Ctrl+Comma and Ctrl+Period.) + You can also press Ctrl+Back Quote to switch + between recently active documents. This short cut is similar to + Window's shortcut for switching windows. Hold down + Control and press Back Quote + to activate it. A small window will show the filename of the + document about to be switched to. Press Back + Quote to cycle filenames and release + Control to switch docments. The + full file path of the current document is displayed both in the + title bar and in the status bar at the bottom of the window. + + Context Menu The Document List also has + a context menu, which can be used by right-clicking on any + document in the list. (Mac users should use + Ctrl+Click or + Option+Click.) This menu provides shortcuts + to document-related commands, such as saving, reverting, + printing, compiling, testing, running Javadoc, and calling the + main method.
+ +
Source Navigation + DrJava has many simple features to help you edit and navigate + source files. + + Find/Replace DrJava has a Find and + Replace utility, which is conveniently displayed as one of the + tabs at the bottom of the window, rather than as a dialog + blocking part of the window. The tab is first displayed when you + Find/Replace from the Edit Menu (or using the keyboard shortcut, + Ctrl+F), and it can be closed by clicking on + the "X" button in the upper right corner of the tab (or by + hitting the Escape key). + To search for a term, type it in the Find text field and click + "Find Next" or "Find Previous" (or press Enter). + To replace the term with another, type the new term in the Replace + text field, find an occurrence using "Find Next" or "Find Previous", + and then click "Replace". The "Replace/Find Next", + "Replace/FindPrevious" and "Replace All" buttons help to speed up + this process. The "Find All" button accumulates all + occurrences and displays them in a new, separate pane labeled "Find: + word", where "word" is replaced with the search string. You can keep + as many "Find All" panes open as you like. The panes keep the + occurrences sorted by document and line number and allow you to jump + to the source location with the "Go to" button, bookmark an + occurrence using the "Bookmark" button, or to remove an occurrence + from the list with the "Remove" button. Occurrences can also be + underlined with different colors to make them easier to find in the + Definitions pane. There are also four checkboxes to + customize each search: "Match Case","Search All Documents", "Whole + Word", "No Comments/Strings", and "No Test Cases". Unchecking the + first box will return case-insensitive results, checking the second + box will tell DrJava to search through all of the open documents in + sequence, checking the third box will ignore partial matches (i.e. it + will ignore "hello" if the search text is "lo"), and checking the + last box ignores instances found within comments and strings. + Checking the "No Test Case" box will cause Java to ignore matches in + files with test cases. Currently, this is being determined by + examining the file name: If the file name ends with "Test.java", it + is considered a test case and will be skilled. Note that + if "Search All Documents" is enabled, the search will not wrap to the + beginning of the current document until all other documents have + first been searched. DrJava can also search across more than one + line of text (i.e. the search string can include line breaks). For + detailed instructions on its usage, see the "Find and Replace" + section in the Quickstart documents under the Help menu. + The last checkbox is "Search Selection Only". Checking this + checkbox, allows the user only to Find/Replace All and disables the + Search All Documents as well as No Test Cases checkboxes. The search + will be limited to a highlighted portion of the document. The Find + Again option after Find All with Search Selection Only has been + checked only searches within the selected region likewise. + + Go to Line Selecting "Go to Line" from + the Edit Menu (or hitting Ctrl+G) will display + a dialog allowing you to scroll to a particular line + number. + + Go to File With the "Go to File" dialog + from the Edit Menu (or hitting Ctrl+Shift+G), + you can quickly jump to another file. It will open a predictive input dialog, + ask you to type the name of the document, and quickly narrow down + the list of candidates. You can then use the cursor keys and + Enter to select the file you want to + view. The "Go to File" dialog also + incorporates the function of the "Go to Line" dialog: If you enter a + colon (":") followed by a line number at the end of your input text, + the editor will select the file and then jump to the entered line + number. Example: "FooBa:123" may take you to the FooBar.java file at + line 123. + + Go to File Under Cursor "Go to File + Under Cursor", also in the Edit Menu and bound to the shortcut + F6), is a special form of "Go to File": It + considers the word the cursor is currently on and uses it as a + starting point for your search. If there is a unique match, + DrJava will open that file immediately; otherwise, this feature + behaves just like "Go to File". + + Fast Switching With Fast Switching, you + can easily switch between recently active documents. Simple hold + down Control, and press the Back + Quote key to navigate through the filenames of + recently active documents. Release the Control + key to switch to the document with that filename. - - Auto-Completion - DrJava supports a very limited notion of auto-completion that is nonetheless useful. This feature is accessible as "Auto-Complete Word Under Cursor" in the Edit menu, and it is also bound to the keyboard shortcut Ctrl-Shift-Space by default. When invoked, DrJava will look at the word to the left of the cursor and attempt to auto-complete it, based on a list of documents currently open. If there is no unique auto-completion match, DrJava displays a predictive input dialog with the auto-completion candidates. - When a project is open, DrJava can also be configured to scan all class files after a compile to obtain the auto-completion information (see Configuring DrJava). With that option set, DrJava can auto-complete the names of all classes in your project, even those of inner classes. - On the "Auto-Complete Word Under Cursor" diaog, there is a checkbox labeled "Java API". If this is checked, then DrJava will also use the class names from the Standard Java API, JUnit 3.8.2 and the user-specified additional libraries as suggestions for auto-completion. If it is disabled, only class names from your own source files are used. - Next to the "OK" button is the "Fully Qualified" button. If the class "Integer" is selected, and the user presses "OK", DrJava will auto-complete the word to "Integer". If, however, "Fully Qualified" is used to close the dialog, DrJava will enter the entire fully qualified class name, "java.lang.Integer" in this case. - Please note that auto-completion currently only works for class names, and completely ignores all context except for the word to the left of the cursor (i.e. it may generate code that does not compile). - - - Clipboard History - Any text you copy or cut out of DrJava documents will be placed in the clipboard history, and the last 10 entries are kept (that number is configurable, see Configuring DrJava). To access one of the entries in the history, use the "Paste from History" command in the Edit menu or press Ctrl+Shift+V. In the dialog that opens up, you can browse the history and select the entry to paste. In addition to inserting the text at the cursor, the selected entry will also be moved to the top of the clipboard history, and will therefore subsequently be available with the regular paste command. - The clipboard history is a great tool to minimize scrolling and document switching: Instead of going back and forth several times, you can just "copy, copy, copy" several pieces of code in a row, then go to another place in the code and do "paste, paste from history, paste from history". - - - Right Margin - DrJava can display a line after a specified number of columns, representing the right margin of the document. By default, this line is displayed after 120 columns. You can type past this line, and it has no effect on the saved files or executed programs, but the right margin line can help you format your source code more uniformly. - You can enable or disable the right margin line in the Display category of the Preferences window. The color of the line can be changed in the Colors category of the Preferences. (See Configuring DrJava.) -
- -
- Multiple Documents - Most Java programs have several closely related source files, so DrJava supports having multiple documents open at the same time. A list of all of the names of the open documents appears in a pane to the left of the Definitions Pane, listing files in the order in which they were opened. You can view and edit a particular document by selecting it in the list, or by using the Previous and Next Document commands in the Edit Menu. These commands will switch to the next for previous document in alphabetical order. (These commands have keyboard shortcuts as well: Ctrl+Comma and Ctrl+Period.) You can also press Ctrl+Back Quote to switch between recently active documents. This short cut is similar to Window's shortcut for switching windows. Hold down Control and press Back Quote to activate it. A small window will show the filename of the document about to be switched to. Press Back Quote to cycle filenames and release Control to switch docments. - The full file path of the current document is displayed both in the title bar and in the status bar at the bottom of the window. + Line Numbering DrJava displays the + cursor's current line number and column number on the right side + of the status bar at the bottom of the window. The line number is + shown on the left and starts at 1, and the column number is shown + on the right and starts at 0. + + All line numbers can also be displayed in the left margin of the + Definitions Pane, using the "Show All Line Numbers" option in the + "Display Options" section of the Preferences window. The line number + font can be changed in the "Fonts" section. (See Configuring DrJava.) + + Bookmarks DrJava allows you to bookmark + places in your code that you deem important. If you have a + project open, the bookmarks even get saved to and loaded from the + project file. By pressing Ctrl-Shift-M or + using the "Bookmarks" item in the Tools menu, you can display the + list of bookmarks in the "Bookmarks" pane. The bookmarks are + sorted by document and line number. + With the Ctrl-M keyboard shortcut or the "Toggle + Bookmark" items from the Tools menu or the Definition pane's context + menu, you can add and remove bookmarks. If no text is selected, + "Toggle Bookmark" will add or remove a bookmark for the entire line + the cursor is on. If text is selected, the selected text is + bookmarked. By selecting a bookmark in the "Bookmarks" + pane and pressing the "Go to" button, you can jump to the location + associated with the bookmark. You can also select one or more + bookmarks and remove them with the "Remove" button, or clear the + entire list with the "Remove All" button. - - Context Menu - The Document List also has a context menu, which can be used by right-clicking on any document in the list. (Mac users should use Ctrl+Click or Option+Click.) This menu provides shortcuts to document-related commands, such as saving, reverting, printing, compiling, testing, running Javadoc, and calling the main method. -
-
- Source Navigation - DrJava has many simple features to help you edit and navigate source files. - - - Find/Replace - DrJava has a Find and Replace utility, which is conveniently displayed as one of the tabs at the bottom of the window, rather than as a dialog blocking part of the window. The tab is first displayed when you Find/Replace from the Edit Menu (or using the keyboard shortcut, Ctrl+F), and it can be closed by clicking on the "X" button in the upper right corner of the tab (or by hitting the Escape key). - To search for a term, type it in the Find text field and click "Find Next" or "Find Previous" (or press Enter). To replace the term with another, type the new term in the Replace text field, find an occurrence using "Find Next" or "Find Previous", and then click "Replace". The "Replace/Find Next", "Replace/FindPrevious" and "Replace All" buttons help to speed up this process. - The "Find All" button accumulates all occurrences and displays them in a new, separate pane labeled "Find: word", where "word" is replaced with the search string. You can keep as many "Find All" panes open as you like. The panes keep the occurrences sorted by document and line number and allow you to jump to the source location with the "Go to" button, bookmark an occurrence using the "Bookmark" button, or to remove an occurrence from the list with the "Remove" button. Occurrences can also be underlined with different colors to make them easier to find in the Definitions pane. - There are also four checkboxes to customize each search: "Match Case","Search All Documents", "Whole Word", "No Comments/Strings", and "No Test Cases". Unchecking the first box will return case-insensitive results, checking the second box will tell DrJava to search through all of the open documents in sequence, checking the third box will ignore partial matches (i.e. it will ignore "hello" if the search text is "lo"), and checking the last box ignores instances found within comments and strings. Checking the "No Test Case" box will cause Java to ignore matches in files with test cases. Currently, this is being determined by examining the file name: If the file name ends with "Test.java", it is considered a test case and will be skilled. - Note that if "Search All Documents" is enabled, the search will not wrap to the beginning of the current document until all other documents have first been searched. -DrJava can also search across more than one line of text (i.e. the search string can include line breaks). For detailed instructions on its usage, see the "Find and Replace" section in the Quickstart documents under the Help menu. - The last checkbox is "Search Selection Only". Checking this checkbox, allows the user only to Find/Replace All and disables the Search All Documents as well as No Test Cases checkboxes. The search will be limited to a highlighted portion of the document. The Find Again option after Find All with Search Selection Only has been checked only searches within the selected region likewise. - - - Go to Line - Selecting "Go to Line" from the Edit Menu (or hitting Ctrl+G) will display a dialog allowing you to scroll to a particular line number. - - - - Go to File - With the "Go to File" dialog from the Edit Menu (or hitting Ctrl+Shift+G), you can quickly jump to another file. It will open a predictive input dialog, ask you to type the name of the document, and quickly narrow down the list of candidates. You can then use the cursor keys and Enter to select the file you want to view. - - The "Go to File" dialog also incorporates the function of the "Go to Line" dialog: If you enter a colon (":") followed by a line number at the end of your input text, the editor will select the file and then jump to the entered line number. Example: "FooBa:123" may take you to the FooBar.java file at line 123. - - - Go to File Under Cursor - "Go to File Under Cursor", also in the Edit Menu and bound to the shortcut F6), is a special form of "Go to File": It considers the word the cursor is currently on and uses it as a starting point for your search. If there is a unique match, DrJava will open that file immediately; otherwise, this feature behaves just like "Go to File". - - - - Fast Switching - With Fast Switching, you can easily switch between recently active documents. Simple hold down Control, and press the Back Quote key to navigate through the filenames of recently active documents. Release the Control key to switch to the document with that filename. - - - - Line Numbering - DrJava displays the cursor's current line number and column number on the right side of the status bar at the bottom of the window. The line number is shown on the left and starts at 1, and the column number is shown on the right and starts at 0. - - - All line numbers can also be displayed in the left margin of the Definitions Pane, using the "Show All Line Numbers" option in the "Display Options" section of the Preferences window. The line number font can be changed in the "Fonts" section. (See Configuring DrJava.) - - - Bookmarks - DrJava allows you to bookmark places in your code that you deem important. If you have a project open, the bookmarks even get saved to and loaded from the project file. By pressing Ctrl-Shift-M or using the "Bookmarks" item in the Tools menu, you can display the list of bookmarks in the "Bookmarks" pane. The bookmarks are sorted by document and line number. - With the Ctrl-M keyboard shortcut or the "Toggle Bookmark" items from the Tools menu or the Definition pane's context menu, you can add and remove bookmarks. If no text is selected, "Toggle Bookmark" will add or remove a bookmark for the entire line the cursor is on. If text is selected, the selected text is bookmarked. - By selecting a bookmark in the "Bookmarks" pane and pressing the "Go to" button, you can jump to the location associated with the bookmark. You can also select one or more bookmarks and remove them with the "Remove" button, or clear the entire list with the "Remove All" button. - +
Predictive Input Dialogs + DrJava uses "predictive input dialogs" in several places, e.g. in + the "Go to File" and "Open Java API Javadoc" features. This type of + dialog presents you a list of candidates and allows you to quickly + select one of them based on its name. The top portion + of the dialog displays a list of candidates that match your current + choice. The text field below allows you to enter text to narrow + down the list. On the bottom, there is an "OK" button to accept the + current selection, a "Cancel" button to leave the dialog, and a + drop-down box to choose the way candidates are selected. Matching + is always done case-insensitively. + Fragments With this matching strategy, + you can enter word fragments separated by spaces, and the list + will display all the items that contain all the fragments. + Example: If you enter "foo bar", the items "FooBar" and + "SomeFooMooBar" will be displayed, but "Foo" or "FumBar" will + not. Prefix + With this strategy, only items that begin with the text + entered will be displayed in the list. If you enter "foo", the + items "Foo" and "FooBar" will be displayed, but "BarFoo" will + not. RegEx + This matching strategy allows you to enter Perl-style regular + expressions (as implemented by the java.util.regex package), + and the list will contain all the items that match the regular + expression. As an example, the regular expression ".*" will + display all items, while "[a-m].*" will display all that begin + with the letters 'A' through 'M'.
-
- Predictive Input Dialogs - DrJava uses "predictive input dialogs" in several places, e.g. in the "Go to File" and "Open Java API Javadoc" features. This type of dialog presents you a list of candidates and allows you to quickly select one of them based on its name. - The top portion of the dialog displays a list of candidates that match your current choice. The text field below allows you to enter text to narrow down the list. On the bottom, there is an "OK" button to accept the current selection, a "Cancel" button to leave the dialog, and a drop-down box to choose the way candidates are selected. Matching is always done case-insensitively. - Fragments - With this matching strategy, you can enter word fragments separated by spaces, and the list will display all the items that contain all the fragments. Example: If you enter "foo bar", the items "FooBar" and "SomeFooMooBar" will be displayed, but "Foo" or "FumBar" will not. - Prefix - With this strategy, only items that begin with the text entered will be displayed in the list. If you enter "foo", the items "Foo" and "FooBar" will be displayed, but "BarFoo" will not. - RegEx - This matching strategy allows you to enter Perl-style regular expressions (as implemented by the java.util.regex package), and the list will contain all the items that match the regular expression. As an example, the regular expression ".*" will display all items, while "[a-m].*" will display all that begin with the letters 'A' through 'M'. -
- -
- Detachable Tabbed Panes - For a long time, the Interactions Pane, the Console Pane, Find/Replace, and the Compiler and JUnit Panes were always attached to the bottom of the DrJava main frame. Users who desire the Definitions Pane to be as large as possible, or users with multi-monitor displays, may wish to use the new "Detach Tabbed Panes" option in the "Edit" menu. - When this option is enabled, the tabbed panes will be detached from the bottom of the main frame and displayed freely floating in their own window. The window position is saved, so it's possible to create a nice layout, quit DrJava, and have the same layout restored when DrJava is started again. Another nice side-effect is that all panes can display a lot more items without the need for scrolling. To re-attach the tabbed panes to the DrJava main frame again, simply disable the "Detach Tabbed Panes" option again. - The panes in the free-floating window otherwise behave exactly the same as when they are attached. It's just a different screen layout. -
+
Detachable Tabbed Panes + For a long time, the Interactions Pane, the Console Pane, + Find/Replace, and the Compiler and JUnit Panes were always attached + to the bottom of the DrJava main frame. Users who desire the + Definitions Pane to be as large as possible, or users with + multi-monitor displays, may wish to use the new "Detach Tabbed + Panes" option in the "Edit" menu. When this option is + enabled, the tabbed panes will be detached from the bottom of the + main frame and displayed freely floating in their own window. The + window position is saved, so it's possible to create a nice layout, + quit DrJava, and have the same layout restored when DrJava is + started again. Another nice side-effect is that all panes can + display a lot more items without the need for scrolling. To + re-attach the tabbed panes to the DrJava main frame again, simply + disable the "Detach Tabbed Panes" option again. The + panes in the free-floating window otherwise behave exactly the same + as when they are attached. It's just a different screen + layout.
- - Project Facility -
- Overview - DrJava includes a project facility for managing many files. The project facility allows you to save your open files in a project file, and reopen the project file at a later time to work on some or all of the project files. - - New Projects - To create a new project, either select "New" in the Project menu for a project that is initially empty, or select "Save As" in the project menu when you have one or more files already open. - - Selecting "Save As" in the Project Menu will create a new project out of the files currently open. - - Saving a Project - To save a project, either select "Save" in the Project menu, or select "Save As" in the Project Menu. Note that when you save the project, it only saves the list of files that are in the project, not the files themselves. Saving the project does not save the individual files that are members of the project. Use "Save All" if you wish to save all files as well as the project file to which they belong. - - Saving a project will also save which document is currently active, as well as the cursor location in every open document. It will also remember the layout of the project tree, so if some folders are collapsed when the project is saved, then the folders will be collapsed the next time the project is opened. - - Opening a Project - To open a project, select "Open" under the Project menu, then select a previously saved project file. You can also open previously open projects in the recent project file list in the project menu. Simply open the Project Menu and click the name of the project file to open that project. - - - Compiling a Project - There are two options for compiling a project: compiling the open project files, or compiling the entire project. To compile all open project files, select "Compile Open Project Files" under the Project menu, or right click the root of the tree and select "Compile Open Project Files." This will compile all files in the project view including auxiliary files. All files in the external branch (Under the External Files folder) will not be compiled. - - Similarly, to compile all project files, even if they are not currently open in DrJava, select "Compile Project" from the Project Menu or the Context menu for the root of the tree. This will compile every source file in the project directory as well as source files in the Auxiliary Files branch. - When not in project view, the "Compile All" button compiles all open files, whereas in project view, "Compile All" only compiles the open project. - - Testing a Project - There are two options for testing a project: testing the open project files, or testing the entire project. To test all open project files, select "Test Open Project Files" under the Project menu. This will test all JUnit test files currently open in the Source Files project branch as well as the Auxiliary Files. All files in the external branch (Under the External Files folder) will not be tested. - - To test all project files, including files not open in DrJava, choose "Test Project" in the project menu. This will search the project directory (the directory that the project file is saved in) for source files, and test any and all junit test cases it finds. This will also test all test files in the Auxiliary Files branch of the project tree. - - Running a Project - To run the main method of a project, select "Run Main Class" under the Project menu. This option is only available if you have specified a file containing the project's main method in the "Project Properties" dialog in the Project menu. - - - Create Jar File from Project - You can create a jar file that contains the project's source code, its compiled class files, or both by selecting "Create Jar File from Project" in the Project menu. This will display a dialog that allows you to specify the jar file's location and what gets put into it. If you are placing class files into the jar file, you can make the jar file executable by selecting "Make executable" and entering the main class. For more control over the properties of the jar, you may enter a custom manifest by selecting "Custom Manifest" and pressing the "Edit Manifest" button. You may opt to include all source files in the jar, embeded in a seperate jar, by selecting "Jar source files". You can also include all files in the project directory by selecting "Jar All files". - Note that if you have not specified a build directory in the Project Properties all classes found in the same directory contaning the project file will included if you place class files in the jar. For class files to be included successfully you must have recently compiled the project. -
-
- Tree View - - Overview - - When using the project facility, the navigator pane on the left hand side of the DrJava window displays the files in a tree view, giving you a graphical representation of where the project files are located in the project directories. - Files are organized into three main branches: Source Files, Auxiliary Files, and External Files. The exact characteristics of each of these branches will be described in the following paragraphs. - - - Some of the menu items behaviors change slightly when a project is open. The "Compile All" button will compile only project Source Files instead of every open file. Likewise, "Test All" will only test the files that are in the "Source Files" and "Auxiliary Files" branches. - You can manually compile or test the other branches by right clicking on the folder and selecting "Compile Folder" or "Test Folder" respectively. - Only one project can be opened at a time. - - - Source Files - A file is categorized as a Source File if it is located at or below the directory in which the project file is saved. We call the directory that the project file is saved the "project directory." This means that the location of the project file in your filesystem will determine which Java files will be considered part of your project. - - - External Files - Files located outside of the project directory will automatically be added to the External Files branch. External Files are not compiled or tested when you compile or test the project. Also, the list of external files that are currently open is not saved in your project file. - - - - Included External Files - Included External Files are files that are located outside of the project's root directory and are explicitly added to the project. Included External Files are compiled and tested when the project is compiled or tested. Also, the list of Included External Files is saved to the project file when the project is saved. - Included External Files will also be automatically opened when the project is opened. Only a file in External Files can be moved to the Included External Files branch. - - To add an External File to the Included External Files branch, right click the filename in the External Files list and select the "Include With Project" option. - To remove a file from the Included External Files, right click the filename and select the "Do Not Include With Project" option. - -
+ Project Facility
Overview DrJava includes + a project facility for managing many files. The project facility + allows you to save your open files in a project file, and reopen + the project file at a later time to work on some or all of the + project files. New Projects + To create a new project, either select "New" in the Project + menu for a project that is initially empty, or select "Save + As" in the project menu when you have one or more files + already open. Selecting "Save As" + in the Project Menu will create a new project out of the files + currently open. Saving a + Project To save a project, either select "Save" + in the Project menu, or select "Save As" in the Project Menu. + Note that when you save the project, it only saves the list + of files that are in the project, not the files themselves. + Saving the project does not save the individual files that + are members of the project. Use "Save All" if you wish to + save all files as well as the project file to which they + belong. Saving a project will also + save which document is currently active, as well as the cursor + location in every open document. It will also remember the layout + of the project tree, so if some folders are collapsed when the + project is saved, then the folders will be collapsed the next + time the project is opened. Opening a + Project To open a project, select "Open" under + the Project menu, then select a previously saved project + file. You can also open previously open projects in the + recent project file list in the project menu. Simply open the + Project Menu and click the name of the project file to open + that project. + Compiling a Project There are two options + for compiling a project: compiling the open project files, or + compiling the entire project. To compile all open project + files, select "Compile Open Project Files" under the Project + menu, or right click the root of the tree and select "Compile + Open Project Files." This will compile all files in the + project view including auxiliary files. All files in the + external branch (Under the External Files folder) will not be + compiled. Similarly, to compile + all project files, even if they are not currently open in DrJava, + select "Compile Project" from the Project Menu or the Context + menu for the root of the tree. This will compile every source + file in the project directory as well as source files in the + Auxiliary Files branch. When not in project view, + the "Compile All" button compiles all open files, whereas in + project view, "Compile All" only compiles the open + project. Testing a Project + There are two options for testing a project: testing the + open project files, or testing the entire project. To test + all open project files, select "Test Open Project Files" + under the Project menu. This will test all JUnit test files + currently open in the Source Files project branch as well as + the Auxiliary Files. All files in the external branch (Under + the External Files folder) will not be tested. + To test all project files, including files not + open in DrJava, choose "Test Project" in the project menu. This will + search the project directory (the directory that the project file is + saved in) for source files, and test any and all junit test cases it + finds. This will also test all test files in the Auxiliary Files + branch of the project tree. Running a + Project To run the main method of a project, select + "Run Main Class" under the Project menu. This option is only + available if you have specified a file containing the project's + main method in the "Project Properties" dialog in the Project + menu. Create Jar File + from Project You can create a jar file that + contains the project's source code, its compiled class files, or + both by selecting "Create Jar File from Project" in the Project + menu. This will display a dialog that allows you to specify the + jar file's location and what gets put into it. If you are placing + class files into the jar file, you can make the jar file + executable by selecting "Make executable" and entering the main + class. For more control over the properties of the jar, you may + enter a custom manifest by selecting "Custom Manifest" and + pressing the "Edit Manifest" button. You may opt to include all + source files in the jar, embeded in a seperate jar, by selecting + "Jar source files". You can also include all files in the project + directory by selecting "Jar All files". + Note that if you have not specified a build directory in the Project Properties all + classes found in the same directory contaning the project file will + included if you place class files in the jar. For class files to be + included successfully you must have recently compiled the + project.
Tree + View Overview When using + the project facility, the navigator pane on the left hand side of + the DrJava window displays the files in a tree view, giving you a + graphical representation of where the project files are located + in the project directories. Files are organized into three main + branches: Source Files, Auxiliary Files, and External Files. The + exact characteristics of each of these branches will be described + in the following paragraphs. Some of + the menu items behaviors change slightly when a project is open. The + "Compile All" button will compile only project Source Files instead + of every open file. Likewise, "Test All" will only test the files + that are in the "Source Files" and "Auxiliary Files" branches. You + can manually compile or test the other branches by right clicking on + the folder and selecting "Compile Folder" or "Test Folder" + respectively. Only one project can be opened at a time. + Source Files A file is + categorized as a Source File if it is located at or below the + directory in which the project file is saved. We call the directory + that the project file is saved the "project directory." This means + that the location of the project file in your filesystem will + determine which Java files will be considered part of your + project. External + Files Files located outside of the project directory + will automatically be added to the External Files branch. External + Files are not compiled or tested when you compile or test the + project. Also, the list of external files that are currently open is + not saved in your project file. + Included External Files Included External Files are + files that are located outside of the project's root directory and + are explicitly added to the project. Included External Files are + compiled and tested when the project is compiled or tested. Also, the + list of Included External Files is saved to the project file when the + project is saved. Included External Files will also be automatically + opened when the project is opened. Only a file in External Files can + be moved to the Included External Files branch. + To add an External File to the Included External Files branch, right + click the filename in the External Files list and select the "Include + With Project" option. To remove a file from the Included External Files, + right click the filename and select the "Do Not Include With Project" + option.
-
- Project Properties - - Project Root - The project root specifies the directory that corresponds to the default package of the project. All project files should be located in this directory or one of its subdirectories. - - - Build Directory - The project facility allows the user to set a build directory where class files will be compiled. This gives the user the ability to separate source and class files. This setting is required for the "Clean Build Directory" and "Create Jar from Project" features to work correctly. - - To clean the build directory, open the Project Menu and click "Clean Build Directory." This will remove all .class files and empty directories in the build directory. - - Working Directory - The working directory corresponds to "current" directory of the project, i.e. new File(".") or System.getProperty("user.dir"). - - Main Class - The project facility allows the user to specify a "Main Class" for your project. When the "Run Project" button is pressed or the "Run Main Class of Project" is then selected in the Project menu, the main method of the "Main Class" specified will be executed. If no "Main Class" is specified, the "Run Main Document of Project" item will not be available, and the "Run Project" button is replaced by the "Run" button that runs the main method of the current document. The "Main Class" may be specified as a file, using the file selection dialog, or as a fully qualified class name entered directly into the field. Note that to run inner classes, the name must be entered directly. - - - Extra Classpath - In the "Extra Classpath" area, you may add additional directories or jar files to the project's classpath. - -
+
Project Properties + Project Root The project root specifies + the directory that corresponds to the default package of the + project. All project files should be located in this directory or + one of its subdirectories. + Build Directory The project facility allows the + user to set a build directory where class files will be compiled. + This gives the user the ability to separate source and class + files. This setting is required for the "Clean Build Directory" + and "Create Jar from Project" features to work correctly. + To clean the build directory, open the Project Menu + and click "Clean Build Directory." This will remove all .class files and + empty directories in the build directory. + Working Directory The working directory corresponds + to "current" directory of the project, i.e. new + File(".") or + System.getProperty("user.dir"). + Main Class The project facility allows the + user to specify a "Main Class" for your project. When the "Run + Project" button is pressed or the "Run Main Class of Project" is then + selected in the Project menu, the main method of the "Main Class" + specified will be executed. If no "Main Class" is specified, the "Run + Main Document of Project" item will not be available, and the "Run + Project" button is replaced by the "Run" button that runs the main + method of the current document. The "Main Class" may be specified as + a file, using the file selection dialog, or as a fully qualified + class name entered directly into the field. Note that to run inner + classes, the name must be entered directly. + Extra Classpath In the "Extra Classpath" + area, you may add additional directories or jar files to the + project's classpath.
- - Interactions Pane - One of the key distinguishing features of DrJava is its Interactions Pane, which allows you to enter and evaluate Java statements and expressions on the fly. This is remarkably useful for beginning students, who no longer have to learn to write main methods, recompile, and run programs from a command line simply to test how a new class or method behaves. From a teaching standpoint, the Interactions Pane is a very easy way to help students learn to write Java without having to explain the full meaning of syntax like "public static void main", and it also provides an ideal way to perform demonstrations in class. The Interactions Pane can also be used to experiment with your own programs or new libraries, or even to create graphical user interfaces interactively. - - - How to Use - The Interactions Pane supports the execution of any valid Java statements as well as the evaluation of Java expressions. Simply define variables and call methods as you would in an ordinary method, or even define new classes and methods and call them interactively. In general, any statement or expression ending without a semicolon will display its result in the Interactions Pane, while those ending with a semicolon will complete without displaying a result. Result objects are displayed using the object's toString() method. Any system output will be displayed in the Interactions Pane in green (as well as in the Console tab), while system errors will be displayed in red by default. Any system input will cause a box to be inserted in the Interactions Pane where you can type what you want System.in to read. This text will be colored purple. These colors can be modified in the "Colors" section in the Preferences window. - + Interactions Pane One of the + key distinguishing features of DrJava is its Interactions Pane, which + allows you to enter and evaluate Java statements and expressions on + the fly. This is remarkably useful for beginning students, who no + longer have to learn to write main methods, recompile, and run + programs from a command line simply to test how a new class or method + behaves. From a teaching standpoint, the Interactions Pane is a very + easy way to help students learn to write Java without having to + explain the full meaning of syntax like "public static void main", + and it also provides an ideal way to perform demonstrations in class. + The Interactions Pane can also be used to experiment with your own + programs or new libraries, or even to create graphical user + interfaces interactively. + + How to Use The Interactions Pane supports + the execution of any valid Java statements as well as the + evaluation of Java expressions. Simply define variables and call + methods as you would in an ordinary method, or even define new + classes and methods and call them interactively. In general, any + statement or expression ending without a semicolon will display its + result in the Interactions Pane, while those ending with a + semicolon will complete without displaying a result. Result + objects are displayed using the object's toString() method. Any + system output will be displayed in the Interactions Pane in green + (as well as in the Console tab), while system errors will be + displayed in red by default. Any system input will cause a box to + be inserted in the Interactions Pane where you can type what you + want System.in to read. This text will be colored purple. These + colors can be modified in the "Colors" section in the Preferences + window. - Here is a simple interactions session, to demonstrate how the Interactions Pane can be used to experiment with objects or show GUI components. + Here is a simple interactions session, to demonstrate how the + Interactions Pane can be used to experiment with objects or show GUI + components. - -Welcome to DrJava. -> String s = "Hello World"; -> s -"Hello World" -> s.length() -11 -> import javax.swing.*; -> JFrame frame = new JFrame("My JFrame"); -> frame.show(); -> - - - Intelligent Newlines - DrJava parses your input each time Enter is pressed. If it finds that the input is not complete (unmatched braces or a missing semicolon, for example), it will automatically insert a newline, prompting you for more input on the next line. This feature makes declaring loops, methods, and classes very clean. - - - Resetting the Interactions Pane - You can reset the Interactions Pane if you wish to start from scratch or if a method call hangs and does not return. Resetting removes any variables from scope and terminates any methods running in the Interactions Pane. To do this, simply choose the "Reset Interactions" command from the Tools menu. This will also reset the Debugger and any JUnit tests that are currently running. - - - - Running the Main Method - For convenience, DrJava supports calling the main method of a class in the Interactions Pane by simply entering "java" followed by the class name and any arguments. For example, to run MyClass with args "arg1" and "arg2", type the following into the Interactions Pane: - - java MyClass arg1 arg2 - Note that this feature does not support passing special flags or arguments to the JVM itself, as is supported on the command line. - Another shortcut for this feature is the "Run Document's Main Method" command, which can be found in both the Tools menu and the context menu of the document list. This command will simply insert the appropriate "java MyClass" text into the Interactions Pane to run the current class's main method. - - DrJava also displays either a "Run Project" or a "Run" button in its toolbar, depending on whether you have specified a "Main Class" for the project or not, respectively. "Run Project" will run the main method of the project's "Main Class", while "Run" while execute the main method of the currently open document. - - If "Smart Run Command" option is enabled, DrJava will also run applets and ACM Java Task Force programs using the "Run" or "Run Project" buttons (see Configuring DrJava). - - The same smart behavior of running regular Java classes, applets and ACM Java Task Force programs can also be achieved by entering "run" followed by the class name and any arguments in the Interactions Pane. For example, to run MySomething with args "arg1" and "arg2", type the following into the Interactions Pane: + Welcome to DrJava. > String s = "Hello World"; > s "Hello + World" > s.length() 11 > import javax.swing.*; > JFrame frame = new + JFrame("My JFrame"); > frame.show(); > + Intelligent Newlines DrJava parses your input each + time Enter is pressed. If it finds that the input is not complete + (unmatched braces or a missing semicolon, for example), it will + automatically insert a newline, prompting you for more input on the + next line. This feature makes declaring loops, methods, and + classes very clean. + Resetting the Interactions Pane You can reset the + Interactions Pane if you wish to start from scratch or if a method + call hangs and does not return. Resetting removes any variables + from scope and terminates any methods running in the Interactions + Pane. To do this, simply choose the "Reset Interactions" command + from the Tools menu. This will also reset the Debugger and any + JUnit tests that are currently running. + + Running the Main Method For convenience, + DrJava supports calling the main method of a class in the + Interactions Pane by simply entering "java" followed by the class + name and any arguments. For example, to run MyClass with args + "arg1" and "arg2", type the following into the Interactions + Pane: java MyClass arg1 + arg2 Note that this feature does not support + passing special flags or arguments to the JVM itself, as is supported + on the command line. Another shortcut for this feature is + the "Run Document's Main Method" command, which can be found in both + the Tools menu and the context menu of the document list. This command + will simply insert the appropriate "java MyClass" + text into the Interactions Pane to run the current class's main + method. + + DrJava also displays either a "Run Project" or a "Run" button in its + toolbar, depending on whether you have specified a "Main Class" for the + project or not, respectively. "Run Project" will run the main method of + the project's "Main Class", while "Run" while execute the main method + of the currently open document. + + If "Smart Run Command" option is enabled, DrJava will also run + applets and ACM Java Task Force programs using the "Run" or "Run + Project" buttons (see Configuring + DrJava). + + The same smart behavior of running regular Java classes, applets and + ACM Java Task Force programs can also be achieved by entering "run" + followed by the class name and any arguments in the Interactions Pane. + For example, to run MySomething with args "arg1" and "arg2", type the + following into the Interactions Pane: run MySomething arg1 arg2 - - Running the Document as Applet - For users who write Java applets, DrJava has a built-in applet viewer that supports calling the run() method of a class in the Interactions Pane by simply entering "applet" followed by the class name. Any arguments will be passed to the constructor as strings. For example, to create MyApplet(String a, String b) with arguments "arg1" and "arg2" and then call the object's run() method, type the following into the Interactions Pane: - - applet MyApplet arg1 arg2 - Another shortcut for this feature is the "Run Document as Applet" command, which can be found in both the Tools menu and the context menu of the document list. This command will simply insert the appropriate "applet MyApplet" text into the Interactions Pane to run the current document as applet. - - - Keyboard Shortcuts - Many actions in the Interactions Pane have keyboard shortcuts for ease of use. Use the Up and Down arrow keys to scroll through a history of the previously entered commands, or Ctrl+B to clear the current command. You can also use Shift+Enter to insert newlines into statements in the Interactions Pane. DrJava also now supports searching backwards through history. To use this feature, type in the first few characters of the command you wish to repeat and hit the Tab key. The last command that matches the characters you typed will appear. Hitting Tab repeated searches farther back, while Shift-Tab will move you forward in the history. - - - - Setting the Classpath - To interact with any class within the Interactions Pane, it must be included on the Interactions Classpath, which can include more than the user's own classpath. Any class which is opened in the Definitions Pane of DrJava is automatically added to this classpath, but additional classes and directories can be added using the "Extra Classpath" configuration option. (See Configuring DrJava.) The current classpath of the Interactions Pane can be viewed at any time by selecting "View Interactions Classpath" from the context menu. - - - - Saving the Interactions History - You can save all of your past interactions to a file at any time, using the "Save Interactions History" command in the Tools and popup menus. This command gives you the option to edit any part of the history before saving it, through a separate window that supports editing. By default, up to 500 of the most recent Interaction commands are kept in this history, though this number is configurable. Histories are saved in files with a .hist extension, and they can be later executed in the Interactions Pane with the "Execute Interactions History" command in the Tools menu. Saving and executing histories can be particularly useful for initial setup of an often repeated task, such as importing several packages and initializing frequently used variables. To help manage the history, a "Clear Interactions History" command is also provided in the Tools menu. - - - - Loading a History File as a Script - You can load a history file as a script that can be executed one line at a time, using the "Load Interactions History as Script" command in the Tools and popup menus. A panel will appear on the right side of the Interactions Pane with buttons that allow you to display the previous interaction, execute the current interaction, display the next interaction, and close the panel. This feature is useful during presentations because you can step through a series of interactions that has been prepared in advance, allowing the audience to see the result of each interaction. + Running the Document as Applet For users + who write Java applets, DrJava has a built-in applet viewer that + supports calling the run() method of a class + in the Interactions Pane by simply entering "applet" followed by + the class name. Any arguments will be passed to the constructor as + strings. For example, to create MyApplet(String a, + String b) with arguments "arg1" and "arg2" and then + call the object's run() method, type the + following into the Interactions Pane: + applet MyApplet arg1 arg2 Another + shortcut for this feature is the "Run Document as Applet" command, + which can be found in both the Tools menu and the context menu of the + document list. This command will simply insert the appropriate + "applet MyApplet" text into the Interactions Pane to + run the current document as applet. + + Keyboard Shortcuts Many actions in the + Interactions Pane have keyboard shortcuts for ease of use. Use the + Up and Down arrow keys to scroll through a history of the + previously entered commands, or Ctrl+B to clear + the current command. You can also use + Shift+Enter to insert newlines into statements + in the Interactions Pane. DrJava also now supports searching + backwards through history. To use this feature, type in the first + few characters of the command you wish to repeat and hit the Tab + key. The last command that matches the characters you typed will + appear. Hitting Tab repeated searches farther back, while + Shift-Tab will move you forward in the history. - - Lifting Interactions to Definitions - One common use of the Interactions Pane is to test a line of code intended for a program, even before it is written in the program itself. For example, this can be the case when experimenting with method calls to determine their results. In this situation, it is convenient to copy a working line from the Interactions Pane into the Definitions Pane. This can be done quickly with the "Lift Current Interaction to Definitions" command in the Tools menu, which simply copies the text at the current prompt and pastes it at the cursor position in the Definitions Pane. + Setting the Classpath To interact with + any class within the Interactions Pane, it must be included on the + Interactions Classpath, which can include more than the user's own + classpath. Any class which is opened in the Definitions Pane of + DrJava is automatically added to this classpath, but additional + classes and directories can be added using the "Extra Classpath" + configuration option. (See Configuring DrJava.) The + current classpath of the Interactions Pane can be viewed at any + time by selecting "View Interactions Classpath" from the context + menu. + + Saving the Interactions History You can + save all of your past interactions to a file at any time, using the + "Save Interactions History" command in the Tools and popup menus. + This command gives you the option to edit any part of the history + before saving it, through a separate window that supports editing. + By default, up to 500 of the most recent Interaction commands are + kept in this history, though this number is configurable. + Histories are saved in files with a .hist + extension, and they can be later executed in the Interactions Pane + with the "Execute Interactions History" command in the Tools menu. + Saving and executing histories can be particularly useful for + initial setup of an often repeated task, such as importing several + packages and initializing frequently used variables. To help + manage the history, a "Clear Interactions History" command is also + provided in the Tools menu. + + Loading a History File as a Script You + can load a history file as a script that can be executed one line + at a time, using the "Load Interactions History as Script" command + in the Tools and popup menus. A panel will appear on the right + side of the Interactions Pane with buttons that allow you to + display the previous interaction, execute the current interaction, + display the next interaction, and close the panel. This feature is + useful during presentations because you can step through a series + of interactions that has been prepared in advance, allowing the + audience to see the result of each interaction. - - Context Menu - The Interactions Pane has a context menu, which can be used by right-clicking in the pane. (Mac users should use Ctrl+Click or Option+Click.) This menu provides shortcuts to useful commands for the Interactions Pane, including cut, copy, and paste, as well as resetting the Interactions Pane, executing, loading, and saving history files, viewing the current classpath, and copying the current interaction to the Definitions Pane. - + Lifting Interactions to Definitions One + common use of the Interactions Pane is to test a line of code + intended for a program, even before it is written in the program + itself. For example, this can be the case when experimenting with + method calls to determine their results. In this situation, it is + convenient to copy a working line from the Interactions Pane into + the Definitions Pane. This can be done quickly with the "Lift + Current Interaction to Definitions" command in the Tools menu, + which simply copies the text at the current prompt and pastes it at + the cursor position in the Definitions Pane. + + Context Menu The Interactions Pane has + a context menu, which can be used by right-clicking in the pane. + (Mac users should use Ctrl+Click or + Option+Click.) This menu provides shortcuts + to useful commands for the Interactions Pane, including cut, + copy, and paste, as well as resetting the Interactions Pane, + executing, loading, and saving history files, viewing the current + classpath, and copying the current interaction to the Definitions + Pane. - - Tiger Features - DrJava provides support for Tiger (JDK 1.5) features in the interactions pane. These include enum types, static import, for each statements, methods with variable arguments, generics, and autoboxing. Note that you must be running Java 2, version 1.5.0 or later to use 1.5 features in the Interactions Pane. Also, DrJava does not currently type check generics, so while they may be used in the interactions pane without a syntax error, we do not yet provide full support for type checking of generics. - - -
- System.in and Closing the Input Stream - -Your program can ask for text input from the user by invoking System.in. You can also use the System.in.read() method in the Interactions Pane directly. When the input box appears, type your text and then either press Return. + Tiger Features DrJava provides support + for Tiger (JDK 1.5) features in the interactions pane. These + include enum types, static import, for each statements, methods + with variable arguments, generics, and autoboxing. Note that you + must be running Java 2, version 1.5.0 or later to use 1.5 + features in the Interactions Pane. Also, DrJava does not + currently type check generics, so while they may be used in the + interactions pane without a syntax error, we do not yet provide + full support for type checking of generics. + +
System.in and Closing the + Input Stream + +Your program can ask for text input from the user by invoking + System.in. You can also use the + System.in.read() method in the Interactions Pane + directly. When the input box appears, type your text and then either press + Return. -You can choose to close the input stream by selecting the menu item "Tools, Interactions & Console, Close System.in", or by pressing the keyboard shortcut for it, which is Ctrl-D . The shortcut is labeled Close System.in in the Key Bindings section of the preferences. - -Here is an example of closing the input stream. The text in square brackets was entered by the user. - - -Welcome to DrJava. Working directory is /Users/Shared/drjava -> System.in.read() - [1] -49 -> System.in.read() -10 -> System.in.read() // press Ctrl-D now - [] --1 -> - - -The user first types '1' and then presses Return. This lets DrJava read -a 49, which is the ASCII code for the character '1', and then 10, which is the -ASCII code for the new line created by Return. In the second input box, the -user pressed Ctrl-D immediately to close the input stream. This lets DrJava -read -1, indicating of the end of the stream. -
- -
- Imports in the Interactions Pane - - Auto-Import - When you use a class name in the Interactions Pane that is not yet known, probably because the class or its package have not been imported yet, DrJava displays an error: - Welcome to DrJava. Working directory is /Users/Shared/drjava -> File f -Static Error: Undefined class 'File' - At this time, DrJava will open a predictive input dialog populated with all Java API classes. The initial suggestion is a class that matches the unknown class as closely as possible. After choosing the desired class, DrJava will import that class and re-execute the line that caused the error: - Welcome to DrJava. Working directory is /Users/Shared/drjava -> File f -Static Error: Undefined class 'File' -> import java.io.File; // auto-import -File f -> - In the predictive input dialog, there is also a checkbox that allows you to import the entire package that contains the selected class, e.g. java.io.* instead of just java.io.File: - Welcome to DrJava. Working directory is /Users/Shared/drjava -> File f -Static Error: Undefined class 'File' -> import java.io.*; // auto-import -File f -> - - - Default Imports - In DrJava's preferences under "Miscellaneous", the user can add or remove classes and packages that the user would like to automatically import in the Interactions Pane whenver the pane has been reset. After the Interactions Pane has been reset, these classes and packages are immediately available. -
- +You can choose to close the input stream by selecting the menu item + "Tools, Interactions & Console, Close System.in", or by pressing the + keyboard shortcut for it, which is Ctrl-D . The + shortcut is labeled Close System.in in the Key + Bindings section of the preferences. + +Here is an example of closing the input stream. The text in square + brackets was entered by the user. + + Welcome to DrJava. Working directory is + /Users/Shared/drjava > System.in.read() [1] 49 > System.in.read() 10 > + System.in.read() // press Ctrl-D now [] -1 > + +The user first types '1' and then presses Return. This lets DrJava read a + 49, which is the ASCII code for the character '1', and then 10, which is + the ASCII code for the new line created by Return. In the second input box, + the user pressed Ctrl-D immediately to close the input stream. This lets + DrJava read -1, indicating of the end of the stream.
+ +
Imports in the Interactions + Pane Auto-Import When you + use a class name in the Interactions Pane that is not yet + known, probably because the class or its package have not been + imported yet, DrJava displays an error: + Welcome to DrJava. Working directory is + /Users/Shared/drjava > File f Static Error: Undefined class + 'File' At this time, DrJava will open a + predictive input dialog + populated with all Java API classes. The initial suggestion is a + class that matches the unknown class as closely as possible. After + choosing the desired class, DrJava will import that class and + re-execute the line that caused the error: + Welcome to DrJava. Working directory is + /Users/Shared/drjava > File f Static Error: Undefined class + 'File' > import java.io.File; // auto-import File f > + In the predictive input dialog, there is also a + checkbox that allows you to import the entire package that contains the + selected class, e.g. java.io.* instead of just java.io.File: + Welcome to DrJava. Working directory is + /Users/Shared/drjava > File f Static Error: Undefined class 'File' + > import java.io.*; // auto-import File f > + + Default Imports In DrJava's preferences + under "Miscellaneous", the user can add or remove classes and + packages that the user would like to automatically import in the + Interactions Pane whenver the pane has been reset. After the + Interactions Pane has been reset, these classes and packages are + immediately available.
- - Compiling Programs - Java compilers check your programs for errors and translate them to class files which can be used. Any time you change the source file for a class, it must be compiled before it can be used. To do this in DrJava, you can simply click on the "Compile All" button on the toolbar to compile any open documents. Any resulting errors will be highlighted in the document. - -
- Compiling Files - To compile the documents you have open in DrJava, click on the "Compile All" button on the toolbar, or choose either "Compile All" or "Compile Current Document" from the Tools menu. Before the compilation can begin, all open files must be saved, even if only the current document is being compiled. This is necessary because one file can depend on other files, and it is important that no files have been modified when errors are displayed. (Otherwise, an error could be highlighted on a line which has changed.) Once a compilation completes successfully, the Interactions Pane is reset so that the new class files can be used. The output on the Console Tab is also reset to begin the new session, unless the "Clear Console After Interactions Reset" option in the "Miscellaneous" section of the Preferences is unchecked. - In project mode, you have the option to compile all project source files, even if those files are not currently open in DrJava. To compile all source files, click "Compile Open Project Files" in the Project Menu. This option is also available by right clicking the root of the project tree. -
- -
- Viewing Compiler Errors - If the compiler finds any errors in your program, DrJava displays them in the Compiler Output tab at the bottom of the window. A summary of each error is displayed in the list, including the file name and line number. You can click on any error to highlight the corresponding line in the document itself. (Note that a file will be opened automatically if it contains errors detected by the compiler.) Similarly, if the cursor is moved to a line of code that contains an error while the Compiler Output tab is displayed, that line and the corresponding error message are highlighted. You can disable highlighting compiler errors in the source by unchecking the "Highlight Source" checkbox on the Compiler Output tab, or by closing the Compiler Output tab. -
- -
- Selecting a Compiler - DrJava supports the use of different Java compilers, such as different versions of the "Javac" compiler supplied with the JDK. DrJava will attempt to locate the your Java compiler on startup by searching for standard installation directories, but sometimes it is unable to find a compiler. In this case, it will use the included Eclipse compiler instead. Note that the location of the compiler can be specified in the Preferences (see Configuring DrJava). If more than one compiler is specified, the active compiler can be selected from a menu on the Compiler Output tab itself. - - - DrJava will only display one compiler for each major version even though you have more than one update the JDK installed (Example: you have JDK 6 Updates 10 and 14 installed; DrJava will only display JDK 6 Update 14). If you want to display all compiler versions that were found, enable "Show all compiler versions" in the Preferences (see Configuring DrJava). - The preferred compiler can also be selected permanently by setting the Compiler Preference in the Compiler Options category of the Preferences. DrJava will then choose the selected compiler at startup. -
-
+ Compiling Programs Java + compilers check your programs for errors and translate them to class + files which can be used. Any time you change the source file for a + class, it must be compiled before it can be used. To do this in + DrJava, you can simply click on the "Compile All" button on the + toolbar to compile any open documents. Any resulting errors will be + highlighted in the document. + +
Compiling Files To + compile the documents you have open in DrJava, click on the + "Compile All" button on the toolbar, or choose either "Compile All" + or "Compile Current Document" from the Tools menu. Before the + compilation can begin, all open files must be saved, even if only + the current document is being compiled. This is necessary because + one file can depend on other files, and it is important that no + files have been modified when errors are displayed. (Otherwise, an + error could be highlighted on a line which has changed.) Once a + compilation completes successfully, the Interactions Pane is reset + so that the new class files can be used. The output on the Console + Tab is also reset to begin the new session, unless the "Clear + Console After Interactions Reset" option in the "Miscellaneous" + section of the Preferences is unchecked. In project + mode, you have the option to compile all project source files, even + if those files are not currently open in DrJava. To compile all + source files, click "Compile Open Project Files" in the Project + Menu. This option is also available by right clicking the root of + the project tree.
+ +
Viewing Compiler Errors + If the compiler finds any errors in your program, DrJava displays + them in the Compiler Output tab at the bottom of the window. A + summary of each error is displayed in the list, including the file + name and line number. You can click on any error to highlight the + corresponding line in the document itself. (Note that a file will + be opened automatically if it contains errors detected by the + compiler.) Similarly, if the cursor is moved to a line of code + that contains an error while the Compiler Output tab is displayed, + that line and the corresponding error message are highlighted. You + can disable highlighting compiler errors in the source by + unchecking the "Highlight Source" checkbox on the Compiler Output + tab, or by closing the Compiler Output tab.
+ +
Selecting a Compiler + DrJava supports the use of different Java compilers, such as + different versions of the "Javac" compiler supplied with the JDK. + DrJava will attempt to locate the your Java compiler on startup by + searching for standard installation directories, but sometimes it + is unable to find a compiler. In this case, it will use the + included Eclipse compiler instead. Note that the location of the + compiler can be specified in the Preferences (see Configuring DrJava). If more + than one compiler is specified, the active compiler can be selected + from a menu on the Compiler Output tab itself. + + DrJava will only display one compiler for each major version even +though you have more than one update the JDK installed (Example: you have JDK 6 +Updates 10 and 14 installed; DrJava will only display JDK 6 Update 14). If you +want to display all compiler versions that were found, enable "Show all +compiler versions" in the Preferences (see Configuring DrJava). The +preferred compiler can also be selected permanently by setting the Compiler Preference in the +Compiler Options category of the Preferences. DrJava will then choose the +selected compiler at startup.
- - Testing using JUnit - While compilers can look for structural problems in a program, they cannot tell whether the results of a program or method are correct. Instead, all developers test their programs to ensure that they behave as expected. This can be as simple as calling a method in the Interactions Pane to view its results, but this technique requires you to think about the answers you expect every time you run any tests. A much better solution is to give the tests the answers you expect, and let the tests themselves do all the work. - - Thankfully, a technique known as unit testing makes this quite easy. You write many small tests that create your objects and assert that they behave the way you expect in different situations. A unit test framework known as JUnit (http://www.junit.org) automates the process of running these tests, letting you quickly see whether your program returns the results you expect. - - DrJava makes the process of running unit tests very simple by providing support for JUnit. Once you have written a JUnit test class (as described in the next section), you can simply choose the "Test Current Document" command from the Tools menu to run the tests and view the results. The name of the tests being run will be shown in the Test Output tab, with each test method turning green if it completes successfully and red if it fails. Any failures will be displayed after the list of methods in the same way as the compiler errors. A progress bar will keep you updated on how many tests have been run. - - Also, clicking the "Test" button on the toolbar or choosing "Test All Documents" from the Tools menu will run JUnit on any open testcases, making running multiple test files very simple. - - -
- Writing Unit Tests with JUnit + Testing using JUnit While compilers + can look for structural problems in a program, they cannot tell + whether the results of a program or method are correct. Instead, all + developers test their programs to ensure that they behave as + expected. This can be as simple as calling a method in the + Interactions Pane to view its results, but this technique requires + you to think about the answers you expect every time you run any + tests. A much better solution is to give the tests the answers you + expect, and let the tests themselves do all the work. + + Thankfully, a technique known as unit testing makes this quite easy. + You write many small tests that create your objects and assert that + they behave the way you expect in different situations. A unit test + framework known as JUnit (http://www.junit.org) automates + the process of running these tests, letting you quickly see whether + your program returns the results you expect. + + DrJava makes the process of running unit tests very simple by + providing support for JUnit. Once you have written a JUnit test class + (as described in the next section), you can simply choose the "Test + Current Document" command from the Tools menu to run the tests and view + the results. The name of the tests being run will be shown in the Test + Output tab, with each test method turning green if it completes + successfully and red if it fails. Any failures will be displayed after + the list of methods in the same way as the compiler errors. A progress bar + will keep you updated on how many tests have been run. + + Also, clicking the "Test" button on the toolbar or choosing "Test All + Documents" from the Tools menu will run JUnit on any open testcases, + making running multiple test files very simple. + + +
Writing Unit Tests with JUnit - With the JUnit framework, unit tests are any public classes that extend the junit.framework.TestCase class, and that have any number of methods with names beginning with the word "test". JUnit provides methods to easily assert things about your own classes, as well as the ability to run a group of tests. - - The requirements for writing unit test classes are described below, with an example provided in the next section. In general, though, the intent is for you to create instances of your classes in the test methods, get results from any methods that you call, and assert that those results match your expectations. If these assertions pass, then your program has behaved correctly and your tests have succeeded. - - - Writing a Test Case - To use DrJava's Test command on a document, you must use the programming conventions outlined below. You can also choose the "New JUnit Test Case" command from the File menu to automatically generate a template with these conventions. - - - At the top of the file, include: - import junit.framework.TestCase; - - - The main class of the file must: - - - be public - - - extend TestCase - + With the JUnit framework, unit tests are any public classes that + extend the junit.framework.TestCase class, and + that have any number of methods with names beginning with the word + "test". JUnit provides methods to easily assert + things about your own classes, as well as the ability to run a group + of tests. + + The requirements for writing unit test classes are described below, + with an example provided in the next section. In general, though, + the intent is for you to create instances of your classes in the test + methods, get results from any methods that you call, and assert that + those results match your expectations. If these assertions pass, + then your program has behaved correctly and your tests have + succeeded. + + Writing a Test Case To use DrJava's + Test command on a document, you must use the programming + conventions outlined below. You can also choose the "New JUnit + Test Case" command from the File menu to automatically generate a + template with these conventions. + At the top of the file, include: + import + junit.framework.TestCase; + The main class of the file + must: be + public + extend + TestCase - - - - Methods of this class to be run automatically when the Test command is invoked must: - - - be public and not static - - - return void - - - take no arguments - - - have a name beginning with "test" - - - - - - Test methods in this class can call any of the following methods (among others): - - - void assertTrue(String, boolean) - which issues an error report with the given string if the boolean is false. - - - void assertEquals(String, int, int) - which issues an error report with the given string if the two integers are not equal. The first int is the expected value, and the second int is the actual (tested) value. Note that this method can also be called using any primitives or with Objects, using their equals() methods for comparison. - - - void fail(String) - - which immediately causes the test to fail, issuing an error report with the given string. - - - - Test methods are permitted to throw any type of exception, as long as it is declared in the "throws" clause of the method contract. If an exception is thrown, the test fails immediately. - - - - If there is any common setup work to be done before running each test (such as initializing instance variables), do it in the body of a method with the following contract: - protected void setUp() - This method is automatically run before any tests in the class. (Similarly, you can write a protected void tearDown() method to be called after each test.) - - - - If you would rather control which methods are called when running the tests (rather than using all methods starting with "test"), you can write a method to create a test suite. This method should be of the form: - -public static Test suite() { - TestSuite suite = new TestSuite(); - suite.addTest(new <classname>("<methodname>")); - ... - return suite; -} - - It is then also necessary to import TestSuite and Test from junit.framework. There is also a version of the addTest method that takes a Test, so test suites can be composed. - - - - - - A simple example of a TestCase class is given in the next section. There are many other ways to use JUnit, as well. See the JUnit Cookbook at http://junit.sourceforge.net/doc/cookbook/cookbook.htm for more examples and information. -
- - -
- Simple Test Example - Suppose you are writing a Calculator class that can perform simple operations on pairs of integers. Before you even write the class, take a moment to write a few tests for it, as shown below. (By writing tests early, you start thinking about which cases might cause problems.) Then write the Calculator class, compile both classes, and run the tests to see if they pass. If they do, write a few more test methods to check other cases that you have realized are important. In this way, you can build up programs with a great deal of confidence. - - -import junit.framework.TestCase; -public class CalculatorTest extends TestCase { - - public void testAddition() { - Calculator calc = new Calculator(); - // 3 + 4 = 7 - int expected = 7; - int actual = calc.add(3, 4); - assertEquals("adding 3 and 4", expected, actual); - } - - public void testDivision() { - Calculator calc = new Calculator(); - // Divide by zero shouldn't work - try { - calc.divide(2, 0); - fail("Should have thrown an exception!"); - } - catch (ArithmeticException e) { - // Good, that's what we expect - } - } - -} - - -
- - -
- Viewing Test Failures - If one or more test methods in a JUnit test class fails, each one is displayed in the Test Output tab at the bottom of the window. This list of failures is similar to the list of compiler errors, in that a summary of the error is given in the tab, and clicking on it highlights the corresponding line in the file (as long as the "Highlight Source" checkbox is checked). Note that DrJava displays a warning message if the test class has been modified since the last time it was compiled, since the changes will not be reflected in the behavior of the test. Closing the Test Output tab resets the current set of JUnit failures. - - - Aborting Tests - If a suite of tests takes a long time or goes into an infinite loop, you can abort the tests by choosing the "Reset Interactions" command from the Tools menu. An error will be displayed in the Test Output tab showing that the tests were aborted. - + Methods of this class to be + run automatically when the Test command is invoked must: + be public and + not static + return void + take no arguments + have a name beginning with + "test" + - - Viewing the Stack Trace - When a JUnit test fails or throws an exception, it is sometimes helpful to view the entire stack trace when diagnosing the problem. To view the stack trace for any test failure, right click on the failure in the Test Output tab and select "Show Stack Trace." - -
+ Test methods in this class can call any of the following + methods (among others): + void assertTrue(String, + boolean) which issues an error report + with the given string if the boolean is false. + void assertEquals(String, + int, int) which issues an error report + with the given string if the two integers are not equal. The + first int is the expected value, and the second int is the + actual (tested) value. Note that this method can also be called + using any primitives or with Objects, using their + equals() methods for comparison. + void + fail(String) + + which immediately causes the test to fail, issuing an error report with + the given string. + + Test methods are permitted to throw any type of exception, as long + as it is declared in the "throws" clause of the + method contract. If an exception is thrown, the test fails + immediately. + + If there is any common setup work to be done before running + each test (such as initializing instance variables), do it in the + body of a method with the following contract: + protected void setUp() This + method is automatically run before any tests in the class. + (Similarly, you can write a protected void + tearDown() method to be called after each + test.) + + If you would rather control which methods are called when + running the tests (rather than using all methods starting with + "test"), you can write a method to create a test + suite. This method should be of the form: + public static Test suite() { TestSuite suite = new TestSuite(); + suite.addTest(new <classname>("<methodname>")); ... + return suite; } It is then also necessary to + import TestSuite and Test from + junit.framework. There is also a version of the + addTest method that takes a + Test, so test suites can be composed. + + + A simple example of a TestCase class is given in the next section. + There are many other ways to use JUnit, as well. See the JUnit + Cookbook at http://junit.sourceforge.net/doc/cookbook/cookbook.htm + for more examples and information.
+ + +
Simple Test Example + Suppose you are writing a Calculator class that can perform + simple operations on pairs of integers. Before you even write the + class, take a moment to write a few tests for it, as shown below. + (By writing tests early, you start thinking about which cases might + cause problems.) Then write the Calculator class, compile both + classes, and run the tests to see if they pass. If they do, write + a few more test methods to check other cases that you have realized + are important. In this way, you can build up programs with a great + deal of confidence. + + import junit.framework.TestCase; public class CalculatorTest + extends TestCase { + + public void testAddition() { Calculator calc = new Calculator(); // 3 + 4 = 7 + int expected = 7; int actual = calc.add(3, 4); assertEquals("adding 3 and 4", + expected, actual); } + + public void testDivision() { Calculator calc = new Calculator(); // Divide by + zero shouldn't work try { calc.divide(2, 0); fail("Should have thrown an + exception!"); } catch (ArithmeticException e) { // Good, that's what we + expect } } + +}
+ + +
Viewing Test Failures If + one or more test methods in a JUnit test class fails, each one is + displayed in the Test Output tab at the bottom of the window. This + list of failures is similar to the list of compiler errors, in that a + summary of the error is given in the tab, and clicking on it + highlights the corresponding line in the file (as long as the + "Highlight Source" checkbox is checked). Note that DrJava displays + a warning message if the test class has been modified since the + last time it was compiled, since the changes will not be reflected + in the behavior of the test. Closing the Test Output tab resets + the current set of JUnit failures. + + Aborting Tests If a suite of tests + takes a long time or goes into an infinite loop, you can abort + the tests by choosing the "Reset Interactions" command from the + Tools menu. An error will be displayed in the Test Output tab + showing that the tests were aborted. + + Viewing the Stack Trace When a JUnit + test fails or throws an exception, it is sometimes helpful to + view the entire stack trace when diagnosing the problem. To view + the stack trace for any test failure, right click on the failure + in the Test Output tab and select "Show Stack Trace." +
- - Language Level Facility + Language Level Facility The Java Language Level Facility provides a student-friendly - introduction to Java. As of April 2010, there is a single, - simplified language level called Functional - Java. When used with a complementary curriculum, this - language level forms a powerful learning tool. + introduction to Java. As of April 2010, there is a single, simplified + language level called Functional Java. When used + with a complementary curriculum, this language level forms a powerful + learning tool. In the past, there are three levels: -Elementary, Intermediate, and -Advanced, and each level progressively introduces -students to more Java features. Files written using these three -language levels can still be compiled, but not be created anymore. The -new Functional Java language level can compile files written for the -old Elementary and Intermediate language leves; the old Advanced level -can be compiled by the regular Java compiler. - -
- Using the Java Language Level Facility - - The Java Language Level Facility is fully integrated into - DrJava. To select the level at which you wish to work, click on - the "Language Levels" menu in the menu bar and select a level. - If you do not want to use any Language Level, select "Full - Java". - - Selecting your level affects how new files are saved. - Each file's extension specifies its level. Functional Java files - are given the .dj extension; Full Java - files have the usual .java - extension. - - In the past, files using the Elementary, Intermediate, and - Advanced Levels had the .dj0, - .dj1 , and .dj2 - extensions, respectively. These files can still be loaded and - compiled, but DrJava suggests that you rename .dj0 and .dj1 - files to .dj files, and .dj2 files to .java files. - - You can reference classes defined at any language level - regardless of the level you are currently using, but you cannot - reference Full Java files (or old Advanced Level files) unless - you have first compiled them seperately. - - Because each level is a restricted subset of Full Java, - instructors must be careful when allowing their students to - use library functions. For instance, at the Elementary level, - "null" is not a valid keyword, so functions that may return - null should not be used. Similar caution must be exercised - with arrays. Arrays are not introduced until the Advanced - level, so library functions that rely on arrays should not be - used until then. Also, although we do not allow the mutation - of fields or variables at the Elementary and Intermediate - levels, we do not prohibit the use of library classes with - their own mutation methods such as - java.util.LinkedList. Because of this, - the students and their teachers must be careful to not use - mutable datatypes. - - Internally, the Language Level Facility translates - .dj, .dj0, - .dj1 and .dj2 files - to .java files with the same name. For - example, the file Example.dj creates the - hidden file named Example.java. Please - make sure that you do not have both a Java Language Level file - and a .java file with the same name, as - this would overwrite your .java file. We - also advise against opening the generated - .java files. If you do open them, DrJava - will warn you when you compile and ask you to close the - .java files. + Elementary, Intermediate, and + Advanced, and each level progressively introduces + students to more Java features. Files written using these three + language levels can still be compiled, but not be created anymore. The + new Functional Java language level can compile files written for the + old Elementary and Intermediate language leves; the old Advanced level + can be compiled by the regular Java compiler. + +
Using the Java Language Level + Facility + + The Java Language Level Facility is fully integrated into DrJava. + To select the level at which you wish to work, click on the "Language + Levels" menu in the menu bar and select a level. If you do not want + to use any Language Level, select "Full Java". + + Selecting your level affects how new files are saved. Each file's + extension specifies its level. Functional Java files are given the + .dj extension; Full Java files have the usual + .java extension. + + In the past, files using the Elementary, Intermediate, and Advanced + Levels had the .dj0, .dj1 , + and .dj2 extensions, respectively. These files + can still be loaded and compiled, but DrJava suggests that you rename + .dj0 and .dj1 files to .dj files, and .dj2 files to .java + files. + + You can reference classes defined at any language level regardless + of the level you are currently using, but you cannot reference Full + Java files (or old Advanced Level files) unless you have first + compiled them seperately. + + Because each level is a restricted subset of Full Java, instructors + must be careful when allowing their students to use library functions. + For instance, at the Elementary level, "null" is not a valid keyword, + so functions that may return null should not be used. Similar caution + must be exercised with arrays. Arrays are not introduced until the + Advanced level, so library functions that rely on arrays should not be + used until then. Also, although we do not allow the mutation of fields + or variables at the Elementary and Intermediate levels, we do not + prohibit the use of library classes with their own mutation methods + such as java.util.LinkedList. Because of this, + the students and their teachers must be careful to not use mutable + datatypes. + + Internally, the Language Level Facility translates + .dj, .dj0, + .dj1 and .dj2 files to + .java files with the same name. For example, the + file Example.dj creates the hidden file named + Example.java. Please make sure that you do not + have both a Java Language Level file and a .java + file with the same name, as this would overwrite your + .java file. We also advise against opening the + generated .java files. If you do open them, DrJava + will warn you when you compile and ask you to close the + .java files.
-
- What Does the Functional Java Level Provide? - The Functional Java language level roughly corresponds to the old Intermediate Level. More details to follow. -
+
What Does the Functional Java Level + Provide? The Functional Java language level roughly + corresponds to the old Intermediate + Level. More details to follow.
-
- What Did the Old Levels Provide? - The general presentation of concepts in the old Language Levels Facility corresponds to the book How To Design Programs by Felleisen, Findler, Flatt, and Krishnamurthi. Basically, the levels provide an incremental introduction to data structures and operations on those structures while helping to simplify syntax for the students. - The levels are also designed to allow the introduction of design patterns--models for writing code with certain abstract behavior that are essential to teaching elegant object-oriented programming. - - Here is a summary of what is allowed at each of the three old language levels. - - - - - - - - And here is a summary of the code augmentation performed at each level. - - - - - +
What Did the Old Levels + Provide? The general presentation of concepts in the + old Language Levels Facility corresponds to the book How + To Design Programs by Felleisen, Findler, Flatt, and + Krishnamurthi. Basically, the levels provide an incremental + introduction to data structures and operations on those structures + while helping to simplify syntax for the students. + The levels are also designed to allow the introduction of + design patterns--models for writing code with + certain abstract behavior that are essential to teaching elegant + object-oriented programming. + + Here is a summary of what is allowed at each of the three old + language levels. + + + + And here is a summary of the code augmentation performed at each + level. Read on for a more detailed explaination of each level. -
+
-
- The Old Elementary Level +
The Old Elementary Level - The old Elementary Level provides support for programming in functional Java, which can be taught with only algebraic data types--types that are inductively defined, such as integers, booleans, lists, and trees. Because of this, only a small subset of the Java language is necessary. Most importantly, all fields and variables are immutable; in other words, they are automatically made final, so their values cannot be changed once they are set. - - Because of this immutability of data, for, while, and do loops cannot be used at the Elementary level. We also do not allow arrays because they are commonly used with a procedural-style approach to programming (loops) rather than an object-oriented one and are inherently mutable. And since void return methods have few uses without mutable data, they are only allowed in JUnit test cases at this level. We also simplify the language for the student by not allowing null as a keyword. This protects beginning students from getting null-pointer exceptions but also means that instructors should not allow the students to use library functions that return null. In addition, interfaces are not allowed at the Elementary Level; only classes and abstract classes are allowed. By waiting to introduce interfaces until after the students are familiar with abstract classes, we hope students will have an easier time differentiating between interfaces and abstract classes. We also disallow the use of explicit access modifiers (final, private, static, etc.), and instead automatically make all fields and local variables private and all methods public. The one exception to this is that classes and methods can be denoted as abstract. We also do not allow the use of package or import statements in order to simplify the concepts that beginning students must learn. Of course, students' classes can still reference other files in the same directory, and they also have access to all classes in the java.lang package, and if students extend "TestCase" we automatically import junit.framework.TestCase for them. - We automatically generate a constructor for each class that students write at the Elementary Level. Each class's constructor takes a value for each of its fields, and sets the fields to those values. None of a class's fields can be set outside of the automatically generated constructor. We consider fields to be any field in the class or one of its superclasses that also has a visible accessor (a method of the same name as the field that returns its type). We automatically generate accessors for each field (for example, field my_field would have an accessor my_field()). We also generate a toString() method that returns a description of the object--its class name and field values, an equals() method that determines if two objects are equal by comparing their class types and the values for each of their fields, and a hashCode() method that follows the Java Language Specification that if two objects are equal, their hash codes are the same. Students cannot override any augmented methods at this level. - Although at first glance this level seems limited, even the basic functionality provided is powerful and flexible. The Composite, Union, Interpreter, and Factory patterns can all be taught at the Elementary level. -
- -
- The Old Intermediate Level - At the old Intermediate level, the focus is still on functional programming with immutable data. However, there is an added twist: functions can now be used as data. Because of this, we introduce anonymous inner classes as a new construct. These anonymous inner classes can be stored in variables and passed as arguments to methods. - Although we allow anonymous inner classes, students still cannot use nested classes or nested interfaces at this level. They introduce a level of complexity in naming and referencing that is best deferred to the Advanced Level. - In addition to anonymous inner classes, several new concepts are introduced at this level. We now allow interfaces, which should be intuitive to students since they have been working with abstract classes at the Elementary Level. In addition, we allow package and import statements to broaden the scope of classes the student has access to (including the Java libraries), and to help them learn how to modularize their own projects. We allow the null keyword to be used and also allow explicit visibility specifiers such as public, private, and protected for all constructs except fields and variables, and the keyword static. However, only fields can be static at this level; static methods are still prohibited. We also introduce casts because they are useful with the Visitor design pattern--frequently the arguments to and return type of visitors is Object, and if a more specific contract for the specific function is known, the data can be cast. Students can also define their own constructors at this level, though they must make sure that all of a class's non-static fields are given a value in the constructor. Non-static fields still cannot be assigned outside of a constructor, and static fields must be given a value where they are defined. All fields are still made final. - The code augmentation is the same as that done at the Elementary Level, except that if a student defines a constructor that takes in all the fields of the class, we do not generate a duplicate constructor, and accessors are not generated for static fields, so static field values are not included in the constructor, equals(), toString(), and hashCode() methods. Students cannot override any autogenerated methods besides the constructor. - Both the Command and Visitor design patterns deal with passing functions as data and should be taught at this level. The Singleton design pattern can also be taught here. -
-
- The Old Advanced Level - As students move to the old Advanced level, they are introduced to mutable data for the first time. This change in perspective allows us to make several extensions to the language. - The introduction of mutable data goes hand in hand with the explicit use of the final keyword--students must now mark the data they do not want to be mutable as "final". Explicit visibility modifiers may now be used for fields and variables. For, while, and do loops, as well as switch statements are now allowed, though students cannot make assignments in the conditional expression of the loops and the switch expression of the switch statement. This should help students avoid a common error of using "=" instead of "==". Students can get around this restriction by nesting the assignment in parentheses--for instance ((i=5)) rather than (i=5). Break and continue statements are also allowed because they are useful with loops. We restrict switch statements further by not allowing fall through in any switch case, including the last one, and by enforcing that if there is a default case, it must be the last case in the block. A label in a switch statement can only be a character constant, integer constant, or a negative sign followed by an integer constant--not an arbitrary constant expression. Mutable data also means that arrays are now a useful data type, so we support the use of arrays at this level. And, mutable data means that void return methods make sense in some cases, so they are also allowed. - The language is more flexible in other areas at this level as well. We allow non-static fields to be assigned a value where they are declared, thus giving students more freedom in what arguments need to be passed to the constructor. In addition, we allow static methods as well as static fields at the Advanced level. Nested classes and interfaces, both static and dynamic, are also supported at the Advanced level. - No code augmentation is done at the Advanced Level. - The Strategy, State, Decorator, and Model-View-Controller design patterns can all be taught at this level. - Please note that this final level is still under development and may not be fully functional. It will be finished soon. + The old Elementary Level provides support for programming in + functional Java, which can be taught with only algebraic data + types--types that are inductively defined, such as + integers, booleans, + lists, and trees. Because of + this, only a small subset of the Java language is necessary. Most + importantly, all fields and variables are immutable; in other words, + they are automatically made final, so their values cannot be changed + once they are set. + + Because of this immutability of data, for, + while, and do loops cannot be + used at the Elementary level. We also do not allow arrays because they + are commonly used with a procedural-style approach to programming + (loops) rather than an object-oriented one and are inherently mutable. + And since void return methods have few uses without mutable data, they + are only allowed in JUnit test cases at this level. We also simplify + the language for the student by not allowing null + as a keyword. This protects beginning students from getting + null-pointer exceptions but also means that instructors should not + allow the students to use library functions that return null. In + addition, interfaces are not allowed at the Elementary Level; only + classes and abstract classes are allowed. By waiting to introduce + interfaces until after the students are familiar with abstract classes, + we hope students will have an easier time differentiating between + interfaces and abstract classes. We also disallow the use of explicit + access modifiers (final, + private, static, etc.), and + instead automatically make all fields and local variables private and + all methods public. The one exception to this is that classes and + methods can be denoted as abstract. We also do + not allow the use of package or + import statements in order to simplify the + concepts that beginning students must learn. Of course, students' + classes can still reference other files in the same directory, and they + also have access to all classes in the java.lang + package, and if students extend "TestCase" we automatically import + junit.framework.TestCase for them. + We automatically generate a constructor for each + class that students write at the Elementary Level. Each class's + constructor takes a value for each of its fields, and sets the fields + to those values. None of a class's fields can be set outside of the + automatically generated constructor. We consider fields to be any field + in the class or one of its superclasses that also has a visible + accessor (a method of the same name as the field that returns its + type). We automatically generate accessors for + each field (for example, field my_field would have an accessor + my_field()). We also generate a toString() method + that returns a description of the object--its class name and field + values, an equals() method that determines if two + objects are equal by comparing their class types and the values for + each of their fields, and a hashCode() method that + follows the Java Language Specification that if two objects are equal, + their hash codes are the same. Students cannot override any augmented + methods at this level. Although at first glance + this level seems limited, even the basic functionality provided is + powerful and flexible. The Composite, + Union, Interpreter, and + Factory patterns can all be taught at the + Elementary level.
+ +
The Old Intermediate Level + At the old Intermediate level, the focus is still on functional + programming with immutable data. However, there is an added twist: + functions can now be used as data. Because of this, we introduce + anonymous inner classes as a new construct. These anonymous inner + classes can be stored in variables and passed as arguments to methods. + Although we allow anonymous inner classes, students still + cannot use nested classes or nested interfaces at this level. They + introduce a level of complexity in naming and referencing that is best + deferred to the Advanced Level. In addition to anonymous + inner classes, several new concepts are introduced at this level. We now + allow interfaces, which should be intuitive to students since they have + been working with abstract classes at the Elementary Level. In addition, + we allow package and import + statements to broaden the scope of classes the student has access to + (including the Java libraries), and to help them learn how to modularize + their own projects. We allow the null keyword to be + used and also allow explicit visibility specifiers such as + public, private, and + protected for all constructs except fields and + variables, and the keyword static. However, only + fields can be static at this level; static methods are still prohibited. + We also introduce casts because they are useful with the + Visitor design pattern--frequently the arguments to + and return type of visitors is Object, and if a more specific contract for + the specific function is known, the data can be cast. Students can also + define their own constructors at this level, though they must make sure + that all of a class's non-static fields are given a value in the + constructor. Non-static fields still cannot be assigned outside of a + constructor, and static fields must be given a value where they are + defined. All fields are still made final. The code + augmentation is the same as that done at the Elementary Level, except that + if a student defines a constructor that takes in all the fields of the + class, we do not generate a duplicate constructor, and accessors are not + generated for static fields, so static field values are not included in + the constructor, equals(), toString(), and hashCode() methods. Students + cannot override any autogenerated methods besides the constructor. + Both the Command and Visitor + design patterns deal with passing functions as data and should be taught + at this level. The Singleton design pattern can also + be taught here.
The + Old Advanced Level As students move to the old + Advanced level, they are introduced to mutable data for the first time. + This change in perspective allows us to make several extensions to the + language. The introduction of mutable data goes hand in + hand with the explicit use of the final + keyword--students must now mark the data they do not want to be mutable as + "final". Explicit visibility modifiers may now be used for fields and + variables. For, while, and + do loops, as well as switch + statements are now allowed, though students cannot make assignments in the + conditional expression of the loops and the switch expression of the + switch statement. This should help students avoid a common error of using + "=" instead of "==". Students can get around this restriction by nesting + the assignment in parentheses--for instance ((i=5)) rather than (i=5). + Break and continue statements + are also allowed because they are useful with loops. We restrict + switch statements further by not allowing fall + through in any switch case, including the last one, and by enforcing that + if there is a default case, it must be the last case in the block. A + label in a switch statement can only be a character constant, integer + constant, or a negative sign followed by an integer constant--not an + arbitrary constant expression. Mutable data also means that arrays are + now a useful data type, so we support the use of arrays at this level. + And, mutable data means that void return methods make + sense in some cases, so they are also allowed. The language + is more flexible in other areas at this level as well. We allow + non-static fields to be assigned a value where they are declared, thus + giving students more freedom in what arguments need to be passed to the + constructor. In addition, we allow static methods as well as static + fields at the Advanced level. Nested classes and interfaces, both static + and dynamic, are also supported at the Advanced level. No + code augmentation is done at the Advanced Level. The + Strategy, State, + Decorator, and + Model-View-Controller design patterns can all be + taught at this level. Please note that this final level is + still under development and may not be fully functional. It will be + finished soon. -
- +
- - Debugger - DrJava provides advanced tools for debugging your programs in the Interactions Pane. You can set breakpoints in source files in the Definitions Pane, call methods that stop at the breakpoints in the Interactions Pane, and then interact with programs while they are suspended at breakpoints. Once a breakpoint is reached, users can interact with any variables, fields, or methods that are in scope in the suspended method. Users can also resume the method call, or step through it a line at a time. Finally, the values of local variables and fields can be watched in a table as the method call progresses. + Debugger DrJava provides advanced + tools for debugging your programs in the Interactions Pane. You can + set breakpoints in source files in the Definitions Pane, call methods + that stop at the breakpoints in the Interactions Pane, and then + interact with programs while they are suspended at breakpoints. Once + a breakpoint is reached, users can interact with any variables, + fields, or methods that are in scope in the suspended method. Users + can also resume the method call, or step through it a line at a time. + Finally, the values of local variables and fields can be watched in a + table as the method call progresses. + +
Using the Debugger To use + DrJava's debugger, select the "Debug Mode" command from the + Debugger menu. An informational panel will be displayed between + the Definitions Pane and the Interactions Pane, and several menu + items in the Debugger menu will become enabled. + + A Note on Modifying Files When using + the debugger, it is essential to remember that any modifications + to source files will not be reflected in the behavior of the + Interactions Pane or the debugger until the classes are + recompiled. Changing a source file while the debugger is running + is not recommended, since lines which are highlighted by the + debugger may no longer correspond to the lines in the running + class file. To help notify you of this danger, DrJava displays a + warning message in the Debug Panel if the current document is out + of sync with its class file. + + Because the debugger depends on the classes used in the + Interactions Pane, the debugger is automatically reset each time any + files are compiled, or when the Interactions Pane is reset. -
- Using the Debugger - To use DrJava's debugger, select the "Debug Mode" command from the Debugger menu. An informational panel will be displayed between the Definitions Pane and the Interactions Pane, and several menu items in the Debugger menu will become enabled. - - - A Note on Modifying Files - When using the debugger, it is essential to remember that any modifications to source files will not be reflected in the behavior of the Interactions Pane or the debugger until the classes are recompiled. Changing a source file while the debugger is running is not recommended, since lines which are highlighted by the debugger may no longer correspond to the lines in the running class file. To help notify you of this danger, DrJava displays a warning message in the Debug Panel if the current document is out of sync with its class file. - - - Because the debugger depends on the classes used in the Interactions Pane, the debugger is automatically reset each time any files are compiled, or when the Interactions Pane is reset. - -
- -
- Breakpoints - You can set a breakpoint on almost any line of code in a source file in the Definitions Pane, using either the "Toggle Breakpoint on Current Line" command in the Debugger menu, the "Toggle Breakpoint" command on the context (right-click) menu in the Definitions Pane, or by pressing Ctrl+B. When a breakpoint is set, the line will be highlighted in red and an entry will appear in the "Breakpoints" panel, which can be displayed using the "Breakpoints" command in the Debugger menu, or by pressing Ctrl+Shift+B. When a method is called in the Interactions Pane and the control flow reaches a line of code where a breakpoint has been set, DrJava suspends the execution of the program, highlights the line in bright blue and prints a message to the Interactions Pane. DrJava then displays a new prompt in the Interactions Pane, allowing you to interact with the suspended program until it is resumed (see Interactions at a Breakpoint). Breakpoints are considered part of a project and are therefore saved to and loaded from a project file. - - When setting breakpoints, it is important to remember that only lines with actual executable code can be used. Blank lines and comments will never trigger a breakpoint, even if the line is highlighted in red. (Note that we do not yet support breakpoints on method contracts either, although this will be supported in a later version of DrJava.) - - - Breakpoints Panel - The "Breakpoints" panel can be displayed using the "Breakpoints" command in the Debugger menu, or by pressing Ctrl+Shift+B. It lists all breakpoints that have been set in the currently open documents, sorted by document and line number. There are several buttons on the right side of the panel that help you manage the breakpoints: - You can select one or more breakpoints and press the "Enable" or "Disable" button to enable or disable the selected breakpoints. When a breakpoint is disabled, it remains set, but the program will not be suspended when the breakpoint is reached. This is useful if you may need the breakpoint again later, but want the program to ignore it right now. - If you select exactly one breakpoint, you can use the "Go to" button to jump to the location associated with the breakpoint. With the "Remove" button, you can remove one or more breakpoints that you have selected. You may also clear the entire list using the "Remove All" button. - - - Debugging JUnit Tests - DrJava will also stop at breakpoints during JUnit tests. Simply set a breakpoint on a line of a test method or in a method called by a test, and then choose the "Test Using JUnit" command from the Tools menu. When control flow reaches the breakpoint, the test will be suspended. - -
- - -
- Interactions at a Breakpoint - When DrJava reaches a breakpoint during a method call, it prints a new prompt to the Interactions Pane. This new interpreter has the context of the program which has been suspended, including all variables, fields (even "this"), and methods that are in scope in the suspended method. (The prompt text itself contains the name of the thread which has been suspended. In most cases, this name will include the text being interpreted.) You can type the name of any variable or field to view its value or assign it a new value, or you can call any method in scope to observe its behavior. Existing lines of code in the program cannot be changed or skipped, however, and the "return" keyword is not available. Any changes you make to variables or fields will be reflected in the program when it resumes execution, either by stepping or resuming. -
- - - -
- Stepping and Resuming - After DrJava reaches a breakpoint, the method being called is suspended, and several commands in the Debug Menu and Debug Panel become available. Choosing "Resume" allows the current method to finish execution, at least until another breakpoint is reached. If any other threads are suspended when you resume, the Interactions Pane will switch to the most recently suspended thread. Otherwise, the original ("top level") prompt is restored. Alternatively, you can use the Step commands in the Debug menu to step through the execution of the method, one line at a time. Each time a step completes, the debugger highlights the next line of code to be executed. If the code is in another file, the debugger will look for the file on the Sourcepath and attempt to open it. - - - Step Into - The Step Into command will walk into any method calls that occur in the code, possibly opening additional files. - - - - Step Over - The Step Over command will not enter any new method calls, treating them instead as a single operation to be stepped over. - - - - Step Out - The Step Out command will finish running the current method and stop at the next line of code from where the method was called. - - - - Sourcepath and Step Options - The sourcepath is the set of directories in which to look for source files when stepping. It can be set in the Debugger section of the Preferences window (which can be opened from the Edit menu). This section in the Preferences also contains options for controlling which classes will be included as part of stepping. By default, DrJava will never step into its own source, nor its Java Interpreter (DynamicJava), nor Java itself. If you are interested, and have downloaded the source files, you can enable these options to see how Java or DrJava works. You can also specify which classes and packages you want to exclude when stepping. To exclude specific classes, type in the qualified class name (the package name followed by a period and the class name). To exclude entire packages (as well as their subpackages), type the package name followed by a period and an asterisk. Each class or package name must be separated by a comma. - - - - Automatic Trace - The Automatic Trace command allows the user to execute periodic "Step Into" commands, by default every 1000 milliseconds. This will cause DrJava to execute the program line by line, entering called methods. After such a periodic step, the user has the option oof disabling the automatic trace by pressing the "Disable Automatic Trace" button. If the automatic trace is not disabled, the program will run its course, and the automatic trace will be turned off at the end of the program. The user can change the delay interval for stepping located in DrJava's preferences. -
-
- Debug Panel - The Debug Panel appears when Debug Mode is on, with several informational tabs and buttons. DrJava displays currently watched fields and variables with their values in a table in the Watches tab. The Stack tab displays the current stack trace any time a method has been suspended, and the Threads tab shows all current threads along with their status at that point in time. Most of these tabs provide context (right-click) menus for easy access to related commands, such as scrolling to a line in a stack frame, or resuming a suspended thread. - - - Watching Fields and Variables - You can watch the values of class fields and local variables by entering the field or variable name into a row in the Watches table. Any time a method is suspended (e.g. after a breakpoint or step), the current value of the field or variable (if any) is displayed. Watches can be removed from the table by deleting the name and pressing Enter. You cannot enter expressions that need to be evaluated into the watch table. For example, "s.length" is not a valid watch entry. Type expressions like these into the Interactions Pane to see their values. - -
+
Breakpoints You can + set a breakpoint on almost any line of code in a source file in the + Definitions Pane, using either the "Toggle Breakpoint on Current + Line" command in the Debugger menu, the "Toggle Breakpoint" command + on the context (right-click) menu in the Definitions Pane, or by + pressing Ctrl+B. When a breakpoint is set, the + line will be highlighted in red and an entry will appear in the + "Breakpoints" panel, which can be displayed using the "Breakpoints" + command in the Debugger menu, or by pressing + Ctrl+Shift+B. When a method is called in the + Interactions Pane and the control flow reaches a line of code where + a breakpoint has been set, DrJava suspends the execution of the + program, highlights the line in bright blue and prints a message to + the Interactions Pane. DrJava then displays a new prompt in the + Interactions Pane, allowing you to interact with the suspended + program until it is resumed (see Interactions at a + Breakpoint). Breakpoints are considered part of a + project and are therefore saved to and loaded from a project + file. + + When setting breakpoints, it is important to remember that only + lines with actual executable code can be used. Blank lines and + comments will never trigger a breakpoint, even if the line is + highlighted in red. (Note that we do not yet support breakpoints on + method contracts either, although this will be supported in a later + version of DrJava.) + + Breakpoints Panel The "Breakpoints" + panel can be displayed using the "Breakpoints" command in the + Debugger menu, or by pressing Ctrl+Shift+B. It + lists all breakpoints that have been set in the currently open + documents, sorted by document and line number. There are several + buttons on the right side of the panel that help you manage the + breakpoints: You can select one or more + breakpoints and press the "Enable" or "Disable" button to enable or + disable the selected breakpoints. When a breakpoint is disabled, it + remains set, but the program will not be suspended when the + breakpoint is reached. This is useful if you may need the breakpoint + again later, but want the program to ignore it right now. + If you select exactly one breakpoint, you can use the "Go to" + button to jump to the location associated with the breakpoint. + With the "Remove" button, you can remove one or more breakpoints + that you have selected. You may also clear the entire list using the + "Remove All" button. + + Debugging JUnit Tests DrJava will also + stop at breakpoints during JUnit tests. Simply set a breakpoint + on a line of a test method or in a method called by a test, and + then choose the "Test Using JUnit" command from the Tools menu. + When control flow reaches the breakpoint, the test will be + suspended.
+ + +
Interactions at a + Breakpoint When DrJava reaches a breakpoint during a + method call, it prints a new prompt to the Interactions Pane. This + new interpreter has the context of the program which has been + suspended, including all variables, fields (even + "this"), and methods that are in scope in the + suspended method. (The prompt text itself contains the name of the + thread which has been suspended. In most cases, this name will + include the text being interpreted.) You can type the name of any + variable or field to view its value or assign it a new value, or + you can call any method in scope to observe its behavior. Existing + lines of code in the program cannot be changed or skipped, however, + and the "return" keyword is not available. Any + changes you make to variables or fields will be reflected in the + program when it resumes execution, either by stepping or + resuming.
+ + + +
Stepping and Resuming After + DrJava reaches a breakpoint, the method being called is suspended, + and several commands in the Debug Menu and Debug Panel become + available. Choosing "Resume" allows the current method to finish + execution, at least until another breakpoint is reached. If any + other threads are suspended when you resume, the Interactions Pane + will switch to the most recently suspended thread. Otherwise, the + original ("top level") prompt is restored. Alternatively, you can + use the Step commands in the Debug menu to step through the + execution of the method, one line at a time. Each time a step + completes, the debugger highlights the next line of code to be + executed. If the code is in another file, the debugger will look + for the file on the Sourcepath and attempt to open it. + + Step Into The Step Into command will + walk into any method calls that occur in the code, possibly + opening additional files. + + Step Over The Step Over command will + not enter any new method calls, treating them instead as a single + operation to be stepped over. + + Step Out The Step Out command will + finish running the current method and stop at the next line of + code from where the method was called. + + Sourcepath and Step Options The + sourcepath is the set of directories in which to look for source + files when stepping. It can be set in the Debugger section of + the Preferences window (which can be opened from the Edit menu). + This section in the Preferences also contains options for + controlling which classes will be included as part of stepping. + By default, DrJava will never step into its own source, nor its + Java Interpreter (DynamicJava), nor Java itself. If you are + interested, and have downloaded the source files, you can enable + these options to see how Java or DrJava works. You can also + specify which classes and packages you want to exclude when + stepping. To exclude specific classes, type in the qualified + class name (the package name followed by a period and the class + name). To exclude entire packages (as well as their + subpackages), type the package name followed by a period and an + asterisk. Each class or package name must be separated by a + comma. + + Automatic Trace The Automatic Trace + command allows the user to execute periodic "Step Into" commands, + by default every 1000 milliseconds. This will cause DrJava to + execute the program line by line, entering called methods. After + such a periodic step, the user has the option oof disabling the + automatic trace by pressing the "Disable Automatic Trace" button. + If the automatic trace is not disabled, the program will run its + course, and the automatic trace will be turned off at the end of + the program. The user can change the delay interval for stepping + located in DrJava's preferences.
+ +
Debug Panel The Debug Panel + appears when Debug Mode is on, with several informational tabs and + buttons. DrJava displays currently watched fields and variables + with their values in a table in the Watches tab. The Stack tab + displays the current stack trace any time a method has been + suspended, and the Threads tab shows all current threads along with + their status at that point in time. Most of these tabs provide + context (right-click) menus for easy access to related commands, + such as scrolling to a line in a stack frame, or resuming a + suspended thread. + + Watching Fields and Variables You can + watch the values of class fields and local variables by entering + the field or variable name into a row in the Watches table. Any + time a method is suspended (e.g. after a breakpoint or step), the + current value of the field or variable (if any) is displayed. + Watches can be removed from the table by deleting the name and + pressing Enter. You cannot enter expressions that need to be + evaluated into the watch table. For example, "s.length" is not a + valid watch entry. Type expressions like these into the + Interactions Pane to see their values. +
-
- Detachable Debug Panel - When the Debug Panel is visible, it is normally attached to DrJava's main frame and displayed just above the bottom panes, and below the editor pane. To conserve screen space or make better use of dual monitors, the Debug Panel can also be detached. - To do this, click on the "Detach Debugger" menu item in the "Debug" menu and make sure that a checkmark appears next to "Detach Debugger". All debugger controls are now displayed in a separate window called "Debugger". To re-attach the "Debugger" window to DrJava's main frame, remove the checkmark next to "Detach Debugger" or close the "Debugger" window. -
- +
Detachable Debug Panel + When the Debug Panel is visible, it is normally attached to + DrJava's main frame and displayed just above the bottom panes, and + below the editor pane. To conserve screen space or make better use + of dual monitors, the Debug Panel can also be detached. + To do this, click on the "Detach Debugger" menu item in the + "Debug" menu and make sure that a checkmark appears next to "Detach + Debugger". All debugger controls are now displayed in a separate + window called "Debugger". To re-attach the "Debugger" window to + DrJava's main frame, remove the checkmark next to "Detach Debugger" + or close the "Debugger" window.
- - Documentation with Javadoc - Documenting your code is crucial to help others understand it, and even to remind yourself how your own older programs work. Unfortunately, it is easy for most external documentation to become out of date as a program changes. For this reason, it is useful to write documentation as comments in the code itself, where they can be easily updated with other changes. Javadoc is a documentation tool which defines a standard format for such comments, and which can generate HTML files to view the documentation from a web broswer. (As an example, see Oracle's Javadoc documentation for the Java libraries at http://download.oracle.com/javase/6/docs/api/.) - - You can easily run Javadoc over your programs from within DrJava, using the "Javadoc All Documents" and "Preview Javadoc for Current Document" commands in the Tools menu. These commands will generate Javadoc HTML files from the comments you have written and display them in a browser. This chapter gives a brief overview of these commands and how to write Javadoc comments. More detailed information on writing Javadoc comments can be found online at http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html. - + Documentation with Javadoc + Documenting your code is crucial to help others understand it, and + even to remind yourself how your own older programs work. + Unfortunately, it is easy for most external documentation to become + out of date as a program changes. For this reason, it is useful to + write documentation as comments in the code itself, where they can be + easily updated with other changes. Javadoc is a documentation tool + which defines a standard format for such comments, and which can + generate HTML files to view the documentation from a web broswer. + (As an example, see Oracle's Javadoc documentation for the Java + libraries at http://download.oracle.com/javase/6/docs/api/.) + + You can easily run Javadoc over your programs from within DrJava, + using the "Javadoc All Documents" and "Preview Javadoc for Current + Document" commands in the Tools menu. These commands will generate + Javadoc HTML files from the comments you have written and display them + in a browser. This chapter gives a brief overview of these commands + and how to write Javadoc comments. More detailed information on + writing Javadoc comments can be found online at http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html. + + +
Writing Javadoc Comments + In general, Javadoc comments are any multi-line comments + ("/** ... */") that are placed before class, + field, or method declarations. They must begin with a slash and + two stars, and they can include special tags to describe + characteristics like method parameters or return values. The HTML + files generated by Javadoc will describe each field and method of a + class, using the Javadoc comments in the source code itself. + Examples of different Javadoc comments are listed below. + + Simple Comments Normal Javadoc comments + can be placed before any class, field, or method declaration to + describe its intent or characteristics. For example, the + following simple Student class has several Javadoc + comments. /** * Represents + a student enrolled in the school. * A student can be enrolled in + many courses. */ public class Student { + + /** * The first and last name of this student. */ private String name; + + /** * Creates a new Student with the given name. * The name should include + both first and * last name. */ public Student(String name) { this.name = + name; } + +} + + Using Tags Tags can be used at the end + of each Javadoc comment to provide more structured information + about the code being described. For example, most Javadoc + comments for methods include "@param" and + "@return" tags when applicable, to describe + the method's parameters and return value. The + "@param" tag should be followed by the + parameter's name, and then a description of that parameter. The + "@return" tag is followed simply by a + description of the return value. Examples of these tags are + given below. /** * Gets the + first and last name of this Student. * @return this Student's name. + */ public String getName() { return name; } + + /** * Changes the name of this Student. * This may involve a lengthy legal + process. * @param newName This Student's new name. * Should + include both first * and last name. */ public void + setName(String newName) { name = newName; } + + Other common tags include "@throws e" (to + describe some Exception "e" which is thrown by a method) and + "@see #foo" (to provide a link to a field or + method named "foo").
+ + +
How to Use Javadoc in DrJava + In general, Javadoc HTML files are most useful when they are + generated in large batches, since the HTML files for each of the + related classes can link to each other. For this reason, DrJava's + "Javadoc All Documents" command looks for all source files in the + folders and subfolders of the open documents and includes them all + in the documentation, saving the files in a + "doc" folder nearby. (This folder will be + placed either in the current folder or the top-level folder of the + current package.) On the other hand, it is occasionally useful to + view the Javadoc HTML for a single class, to quickly get a feel for + its structure. Therefore, DrJava also provides a "Preview Javadoc + for Current Document" command that only generates Javadoc for the + current open document without saving it to a permanent location. + (This command saves the file in a temporary location that will be + automatically deleted when you quit DrJava.) If either of these + commands finds errors in the source files, they will report them in + a tab like compiler + errors. + + Viewing Javadoc When either of the + "Javadoc All Documents" or "Preview Javadoc for Current Document" + commands complete successfully (or find only warnings and no + errors), DrJava displays the resulting HTML files in a new window. + For Windows and Mac OS X users, these files will be displayed in + the system's default web browser. On other platforms, the files + will be displayed in a simple viewer, unless the "Web Browser" + option has been configured in the "Resource Locations" section of + the Preferences (see Configuring + DrJava). + + Configuring Javadoc You can configure + many aspects of how Javadoc files are generated. Most prominent is + the ability to hide fields and methods below a particular access + level (eg. public or + protected). By default, no private fields or + methods are shown. Other options include specifying a URL to link + to the Java library API (which defaults to Oracle's own website), + specifying a default destination directory for all Javadoc files, + and specifying any custom parameters to pass to the Javadoc tool + itself. Finally, for programs with many nested packages (folders), + DrJava provides an option to always generate Javadoc for all + packages in the program, rather than just the sub-packages of the + open documents. -
- Writing Javadoc Comments - In general, Javadoc comments are any multi-line comments ("/** ... */") that are placed before class, field, or method declarations. They must begin with a slash and two stars, and they can include special tags to describe characteristics like method parameters or return values. The HTML files generated by Javadoc will describe each field and method of a class, using the Javadoc comments in the source code itself. Examples of different Javadoc comments are listed below. - - - Simple Comments - Normal Javadoc comments can be placed before any class, field, or method declaration to describe its intent or characteristics. For example, the following simple Student class has several Javadoc comments. - - -/** - * Represents a student enrolled in the school. - * A student can be enrolled in many courses. - */ -public class Student { - - /** - * The first and last name of this student. - */ - private String name; - - /** - * Creates a new Student with the given name. - * The name should include both first and - * last name. - */ - public Student(String name) { - this.name = name; - } - -} - - - - Using Tags - Tags can be used at the end of each Javadoc comment to provide more structured information about the code being described. For example, most Javadoc comments for methods include "@param" and "@return" tags when applicable, to describe the method's parameters and return value. The "@param" tag should be followed by the parameter's name, and then a description of that parameter. The "@return" tag is followed simply by a description of the return value. Examples of these tags are given below. - - - /** - * Gets the first and last name of this Student. - * @return this Student's name. - */ - public String getName() { - return name; - } - - /** - * Changes the name of this Student. - * This may involve a lengthy legal process. - * @param newName This Student's new name. - * Should include both first - * and last name. - */ - public void setName(String newName) { - name = newName; - } - - - Other common tags include "@throws e" (to describe some Exception "e" which is thrown by a method) and "@see #foo" (to provide a link to a field or method named "foo").
- -
- How to Use Javadoc in DrJava - In general, Javadoc HTML files are most useful when they are generated in large batches, since the HTML files for each of the related classes can link to each other. For this reason, DrJava's "Javadoc All Documents" command looks for all source files in the folders and subfolders of the open documents and includes them all in the documentation, saving the files in a "doc" folder nearby. (This folder will be placed either in the current folder or the top-level folder of the current package.) On the other hand, it is occasionally useful to view the Javadoc HTML for a single class, to quickly get a feel for its structure. Therefore, DrJava also provides a "Preview Javadoc for Current Document" command that only generates Javadoc for the current open document without saving it to a permanent location. (This command saves the file in a temporary location that will be automatically deleted when you quit DrJava.) If either of these commands finds errors in the source files, they will report them in a tab like compiler errors. - - - Viewing Javadoc - When either of the "Javadoc All Documents" or "Preview Javadoc for Current Document" commands complete successfully (or find only warnings and no errors), DrJava displays the resulting HTML files in a new window. For Windows and Mac OS X users, these files will be displayed in the system's default web browser. On other platforms, the files will be displayed in a simple viewer, unless the "Web Browser" option has been configured in the "Resource Locations" section of the Preferences (see Configuring DrJava). - - - - Configuring Javadoc - You can configure many aspects of how Javadoc files are generated. Most prominent is the ability to hide fields and methods below a particular access level (eg. public or protected). By default, no private fields or methods are shown. Other options include specifying a URL to link to the Java library API (which defaults to Oracle's own website), specifying a default destination directory for all Javadoc files, and specifying any custom parameters to pass to the Javadoc tool itself. Finally, for programs with many nested packages (folders), DrJava provides an option to always generate Javadoc for all packages in the program, rather than just the sub-packages of the open documents. - - -
- -
- Java API Javadoc - If you have access to the Java API Javadoc pages, DrJava allows you to quickly open a Javadoc page for a class: With the "Open Java API Javadoc" item in the Tools menu (bound to Shift+F6), you can open a predictive input dialog populated with all Java API classes. After you have selected a class, DrJava will try to open the corresponding Javadoc page in a browser. - The "Open Java API Javadoc for Word Under Cursor" feature, also in the Tools menu and bound to Ctrl+Shift+F6, looks at the word the cursor is on and uses it as a starting point for the search. If there is a unique match, then DrJava will open the Javadoc page immediately; otherwise this feature works just like "Open Java API Javadoc". - Note that this feature requires access to the Java API Javadoc pages, e.g. on the internet. DrJava will use the version and location set for "Java Version for 'Open Java API Javadoc'" in the "Javadoc" pane of the "Preferences" dialog (see Configuring DrJava) and access that location the first time this feature is used during a DrJava session. You can use Java API Javadoc pages on your local system by entering a URL beginning with file:// followed by the directory the allclasses-frame.html file is in. You may also have to set the right values for the "Web Browser" and "Web Browser Command" settings in the "Resource Locations" portion of the "Preferences" dialog. -You can also open the Javadoc pages for JUnit 3.8.2 by entering a URL in the "JUnit 3.8.2 URL" field of the "Javadoc" pane of the "Preferences" dialog. You can open the Javadoc for user-defined libraries by entering the URLs in the "Additional Javadoc URLs" list. Please enter the URL to the directorythat contains the allclasses-frame.html file. For example, to open DrJava's Javadoc, enter http://drjava.org/javadoc/drjava. +
Java API Javadoc If + you have access to the Java API Javadoc pages, DrJava allows you to + quickly open a Javadoc page for a class: With the "Open Java API + Javadoc" item in the Tools menu (bound to + Shift+F6), you can open a predictive input dialog + populated with all Java API classes. After you have selected a + class, DrJava will try to open the corresponding Javadoc page in a + browser. The "Open Java API Javadoc for Word Under + Cursor" feature, also in the Tools menu and bound to + Ctrl+Shift+F6, looks at the word the cursor is + on and uses it as a starting point for the search. If there is a + unique match, then DrJava will open the Javadoc page immediately; + otherwise this feature works just like "Open Java API + Javadoc". Note that this feature requires access to + the Java API Javadoc pages, e.g. on the internet. DrJava will use + the version and location set for "Java Version for 'Open Java API + Javadoc'" in the "Javadoc" pane of the "Preferences" dialog (see + Configuring DrJava) and access + that location the first time this feature is used during a DrJava + session. You can use Java API Javadoc pages on your local system by + entering a URL beginning with file:// followed + by the directory the allclasses-frame.html + file is in. You may also have to set the right values for the "Web + Browser" and "Web Browser Command" settings in the "Resource + Locations" portion of the "Preferences" dialog. You + can also open the Javadoc pages for JUnit 3.8.2 by entering a URL + in the "JUnit 3.8.2 URL" field of the "Javadoc" pane of the + "Preferences" dialog. You can open the Javadoc for user-defined + libraries by entering the URLs in the "Additional Javadoc URLs" + list. Please enter the URL to the directorythat contains the + allclasses-frame.html file. For example, to + open DrJava's Javadoc, enter http://drjava.org/javadoc/drjava.
- - External Process Facility - DrJava includes an interface to execute external command line programs and supply them with values from inside the DrJava editor. - -
- Executing External Processes - TODO - - - Simple Programs - TODO - -
- -
- Follow File - Using the "Follow File" option in the "Tools" menu, the user can - open a text file in one of the panes on the bottom of DrJava's main - frame and keep an eye on how it changes. DrJava checks every once in - a while (by default every 300 milliseconds) if the file has changed - and updates the display accordingly. The time between the updates - and how many lines are displayed (by default only the last 100) can - be controlled on the "Miscellaneous" pane of the "Preferences" frame - (see Configuring DrJava). -
+ External Process Facility + DrJava includes an interface to execute external command line + programs and supply them with values from inside the DrJava + editor. + +
Executing External + Processes TODO + + Simple Programs TODO +
+ +
Follow File Using + the "Follow File" option in the "Tools" menu, the user can open a + text file in one of the panes on the bottom of DrJava's main frame + and keep an eye on how it changes. DrJava checks every once in a + while (by default every 300 milliseconds) if the file has changed + and updates the display accordingly. The time between the updates + and how many lines are displayed (by default only the last 100) can + be controlled on the "Miscellaneous" pane of the "Preferences" + frame (see Configuring + DrJava).
- - Other Dialogs - There are several other dialogs in DrJava that you may encounter. - -
- Check for New Version - The DrJava development team works year-around to improve DrJava. - To make it easier for users to determine whether there is a newer - version available, DrJava now periodically polls the website for - the latest version (by default, this is done once a week). If - a new version is found, the user can press the "Manual Download" button - to be taken directly to the web page with the latest version - of DrJava. There is also an "Automatic Update" button that - downloads the new version automatically and then restarts DrJava. - The "Check for New Version" dialog appears automatically - when DrJava is started and a new version is found, but the user can - perform a manual check by selecting "Check for New Version" in - the "Help" menu. - - - Check for (type of new version) - The DrJava developers release different kinds of versions: - Stable versions, which should not cause major problems; beta versions, - which are stable but not yet well tested; and development versions, - which contain new features or changes that may be problematic. - - By default, DrJava will only notify the user of new stable - or beta versions, but this setting can be changed by picking a - different "Check for" condition -- the user can check for stable versions - only, or be interested in all kinds of versions. -
- - -
- Send System Information to DrJava Developers - It is tremendously helpful for the DrJava developers to - know what operating systems and versions of Java are being - used. To get a better overview, DrJava now includes a simple - and completely anonymous survey. - This survey transmits only the version number of DrJava - that is being used, the name and version of the operating - system, and the version and vendor of Java that is being - used. This information can in no way be traced back to - anyone's computer. - Every few months, DrJava will ask the user if these - pieces of information may be sent to the DrJava developers. - When DrJava notices that the user's system has changed - or that a new version of DrJava is being used, it may also - ask the user to participate in the survey. This usually - happens automatically when DrJava starts, but the user - can also elect to send information by using the "Send System - Information" item in the "Help" menu (multiple submissions - will be ignored). - - Never ask me again - If you do not want to be bothered again by this - question, you can check the "Never ask me again" checkbox - on the dialog, and DrJava will not ask you to participate - in the survey anymore. - - Thank you for helping us make DrJava better! + Other Dialogs There are + several other dialogs in DrJava that you may encounter. + +
Check for New + Version The DrJava development team works year-around + to improve DrJava. To make it easier for users to determine + whether there is a newer version available, DrJava now periodically + polls the website for the latest version (by default, this is done + once a week). If a new version is found, the user can press the + "Manual Download" button to be taken directly to the web page with + the latest version of DrJava. There is also an "Automatic Update" + button that downloads the new version automatically and then + restarts DrJava. The "Check for New Version" dialog + appears automatically when DrJava is started and a new version is + found, but the user can perform a manual check by selecting "Check + for New Version" in the "Help" menu. + + Check for (type of new version) The + DrJava developers release different kinds of versions: Stable + versions, which should not cause major problems; beta versions, + which are stable but not yet well tested; and development + versions, which contain new features or changes that may be + problematic. By default, DrJava will + only notify the user of new stable or beta versions, but this setting + can be changed by picking a different "Check for" condition -- the + user can check for stable versions only, or be interested in all + kinds of versions.
+ + +
Send System Information to + DrJava Developers It is tremendously helpful for the + DrJava developers to know what operating systems and versions of + Java are being used. To get a better overview, DrJava now includes + a simple and completely anonymous survey. This survey + transmits only the version number of DrJava that is being used, the + name and version of the operating system, and the version and + vendor of Java that is being used. This information can in no way + be traced back to anyone's computer. Every few months, + DrJava will ask the user if these pieces of information may be sent + to the DrJava developers. When DrJava notices that the + user's system has changed or that a new version of DrJava is being + used, it may also ask the user to participate in the survey. This + usually happens automatically when DrJava starts, but the user can + also elect to send information by using the "Send System + Information" item in the "Help" menu (multiple submissions will be + ignored). Never ask me again + If you do not want to be bothered again by this question, you + can check the "Never ask me again" checkbox on the dialog, and + DrJava will not ask you to participate in the survey + anymore. Thank you for helping us + make DrJava better!
+ +
Set File Associations + DrJava can detect if .java, .drjava and .djapp files have not + been associated with DrJava. If this is the case, DrJava may + display the "Set File Associations?" dialog at startup. This dialog + has four buttons. Yes Set + file associations so .java, .drjava and .djapp files open in + DrJava when double-clicked. + No Do not set file + associations. + Always Set file associations, and do + this automatically from now on without asking me + again. Never + Do not set file associations, and never ask me about it + again. These settings can also be + changed within DrJava by opening the Preferences window and + selecting the "File Types" pane (see Configuring DrJava).
-
- Set File Associations - DrJava can detect if .java, .drjava and .djapp files - have not been associated with DrJava. If this is the case, - DrJava may display the "Set File Associations?" dialog at - startup. This dialog has four buttons. - Yes - Set file associations so .java, .drjava and .djapp - files open in DrJava when double-clicked. - No - Do not set file associations. - Always - Set file associations, and do this automatically - from now on without asking me again. - Never - Do not set file associations, and never ask me about it -again. - These settings can also be changed within DrJava by - opening the Preferences window and selecting the "File Types" -pane (see Configuring DrJava). +
Compiz Detected + DrJava suffers from an incompatibility between the Linux window + manager Compiz and Oracle's Swing Java GUI library. We, the + developers of DrJava, cannot do anything to fix this problem. We + hope that future versions of Java and Compiz will address the + incompatibility. In the meantime, we recommend that you disable + Compiz if you experience problems. We also suggest that you use the + latest versions of Compiz and Java, so you can benefit from + possible bug fixes made by Oracle and the Compiz developers. For + more information, see http://drjava.org/compiz/. + When DrJava detects that you are using Compiz, it will display + the "Compiz Detected" dialog at startup and ask if you want to + start DrJava nonetheless. The dialog has three buttons. + Yes Start DrJava, even though Compiz + is being used. Yes, and + ignore from now on Start DrJava, and never + complain about Compiz again. + No Do not start + DrJava. Whether DrJava should display + this warning can be changed by opening the Preferences window and + selecting the "Notifications" pane (see Configuring DrJava).
-
- Compiz Detected - DrJava suffers from an incompatibility between the Linux -window manager Compiz and Oracle's Swing Java GUI library. We, the -developers of DrJava, cannot do anything to fix this problem. We hope -that future versions of Java and Compiz will address the -incompatibility. In the meantime, we recommend that you disable Compiz -if you experience problems. We also suggest that you use the latest -versions of Compiz and Java, so you can benefit from possible bug -fixes made by Oracle and the Compiz developers. For more information, see -http://drjava.org/compiz/. - When DrJava detects that you are using Compiz, it will -display the "Compiz Detected" dialog at startup and ask if you want to -start DrJava nonetheless. The dialog has three buttons. - Yes - Start DrJava, even though Compiz is being used. - Yes, and ignore from now on - Start DrJava, and never complain about Compiz again. - No - Do not start DrJava. - Whether DrJava should display this warning can be changed by - opening the Preferences window and selecting the -"Notifications" pane (see Configuring -DrJava). -
- -
- Generate Custom drjava.jar File - This dialog can be found in the Tools, Advanced menu. This -dialog lets you generate a custom drjava.jar file based on the -currently running version of DrJava, and you can include additional -jar files, zip files or directories. These additional files are added -to the drjava.jar and are immediately available in the generated -DrJava application without having to set up extra classpaths. - - If a file is contained in more than one source, the file -contained in the first source will be included; conflicting files from -sources further down the list will be skipped. Files belonging to -DrJava always take precedence. - - Note: This implies that DrJava's manifest file will be used. - - Please note that the added files may produce a copy of -DrJava does not work as intended, and that it will be more difficult -for us to help you with these problems. YOU ARE USING THE CUSTOM -DRJAVA.JAR FILE AT YOUR OWN RISK. - - The dialog contains the following components: - - - Output Jar File - The file that the custom drjava.jar should be written to. - - - - Additional Sources - The list of additional jar or zip files or directories -that should be added to the custom drjava.jar file. If a file is -contained in more than one source, the file contained in the first -source will be included; conflicting files from sources further down -the list will be skipped. Files belonging to DrJava always take -precedence.The file that the custom drjava.jar should be written -to. - - - - Check Conflicts - Pressing this button causes DrJava to scan itself and the additional sources to identify conflicts. If any conflicts are found, they are listed in a dialog. - - - - Generate - Pressing this button lets DrJava generate the specified output file. It first checks for conflicts, though, and if conflicts are found they are displayed; - the user then has the option of aborting the generation or generating anyway. - - - - Close - This closes the dialog. - +
Generate Custom + drjava.jar File This dialog can be found in the + Tools, Advanced menu. This dialog lets you generate a custom + drjava.jar file based on the currently running version of DrJava, + and you can include additional jar files, zip files or directories. + These additional files are added to the drjava.jar and are + immediately available in the generated DrJava application without + having to set up extra classpaths. + + If a file is contained in more than one source, the file contained in + the first source will be included; conflicting files from sources + further down the list will be skipped. Files belonging to DrJava + always take precedence. + + Note: This implies that DrJava's manifest file will be + used. + + Please note that the added files may produce a copy of DrJava does + not work as intended, and that it will be more difficult for us to help + you with these problems. YOU ARE USING THE CUSTOM DRJAVA.JAR FILE AT + YOUR OWN RISK. + + The dialog contains the following components: + + Output Jar File The file that the + custom drjava.jar should be written to. + + Additional Sources The list of + additional jar or zip files or directories that should be added + to the custom drjava.jar file. If a file is contained in more + than one source, the file contained in the first source will be + included; conflicting files from sources further down the list + will be skipped. Files belonging to DrJava always take + precedence.The file that the custom drjava.jar should be written + to. + + Check Conflicts Pressing this button + causes DrJava to scan itself and the additional sources to + identify conflicts. If any conflicts are found, they are listed + in a dialog. + + Generate Pressing this button lets + DrJava generate the specified output file. It first checks for + conflicts, though, and if conflicts are found they are displayed; + the user then has the option of aborting the generation or + generating anyway. + + Close This closes the dialog. +
@@ -1255,1093 +1983,1072 @@ to. - - Configuring DrJava - DrJava has many configurable options which can be set using the Preferences command in the Edit menu, allowing the user to change both DrJava's appearance and behavior. Changes made to the configurable options are saved in a .drjava file in the user's home directory. The Preferences window is the preferred method for setting these options, although more experienced users may also edit the configuration file itself. - -
- Preferences Window - The Preferences window is available in the Edit menu, and provides a graphical means to edit all configurable options in DrJava. It displays the options in several categories, each of which can be displayed as a panel of options. Each option has a tool tip with a short description, which can be displayed by holding the mouse arrow over the option. - - The Apply button submits the changes on all panels and saves them to the config file, while the OK button does the same and also closes the window. The Cancel button closes the window without applying or saving the changes. Each panel also has a Reset to Defaults button, which resets each of the options on that panel to its original value. Resetting does not take effect until the changes are applied with the Apply or OK buttons. -
- -
- Editing the Config File - All configured options are stored in the .drjava file in the user's home directory. (The location of this file varies on different platforms.) This file is a standard Java properties file, with one option on each line and with option keys and values separated by an equals sign. Any options not defined in this file will have their default value. While it is recommended to use the Preferences window in most cases, the config file can also be edited manually to adjust values as desired. The correct option keys and default values for each option are given in the Available Options section. - - Note: All parameters are parsed as standard Java strings, so escape characters must be considered. Notably, to include a Windows-style path in a parameter value, all backslashes must be escaped. For example: + Configuring DrJava DrJava + has many configurable options which can be set using the Preferences + command in the Edit menu, allowing the user to change both DrJava's + appearance and behavior. Changes made to the configurable options + are saved in a .drjava file in the user's home + directory. The Preferences window is the preferred method for + setting these options, although more experienced users may also edit + the configuration file itself. + +
Preferences Window + The Preferences window is available in the Edit menu, and + provides a graphical means to edit all configurable options in + DrJava. It displays the options in several categories, each of + which can be displayed as a panel of options. Each option has a + tool tip with a short description, which can be displayed by + holding the mouse arrow over the option. + + The Apply button submits the changes on all panels and saves them + to the config file, while the OK button does the same and also closes + the window. The Cancel button closes the window without applying or + saving the changes. Each panel also has a Reset to Defaults button, + which resets each of the options on that panel to its original value. + Resetting does not take effect until the changes are applied with the + Apply or OK buttons.
+ +
Editing the Config File All + configured options are stored in the .drjava + file in the user's home directory. (The location of this file + varies on different platforms.) This file is a standard Java + properties file, with one option on each line and with option keys + and values separated by an equals sign. Any options not defined in + this file will have their default value. While it is recommended + to use the Preferences window in most cases, the config file can + also be edited manually to adjust values as desired. The correct + option keys and default values for each option are given in the + Available Options + section. + + Note: All parameters are parsed as standard Java strings, so escape + characters must be considered. Notably, to include a Windows-style + path in a parameter value, all backslashes must be escaped. For + example: javac.location=c:\\jdk6\\lib\\tools.jar -
+
-
- Available Options - All available configuration options are displayed in the following sections. The option keys and default values are also provided for users who wish to edit their configuration file. +
Available Options All + available configuration options are displayed in the following + sections. The option keys and default values are also provided for + users who wish to edit their configuration file. -
- Resource Locations - These options specify where to find Java resources on your computer, such as compilers or classpath directories. +
Resource Locations + These options specify where to find Java resources on your + computer, such as compilers or classpath directories. - - Web Browser (browser.file = "") - - and - + Web Browser (browser.file = + "") and - - Web Browser Command (browser.string = "") - - These two settings allow you to specify how Javadoc files and links from the Help files are opened. On Windows and Mac OS X, we suggest that you leave both options blank so that the default browser of the OS will be used. On other platforms, e.g. on Linux, you need to set one or both of them to let DrJava successfully open HTML files. - The filename specified as "Web Browser", if one is set, is the executable that will be run. If no text has been entered as "Web Browser Command", then only the URL will be passed as parameter to the executable. - If text has been entered as "Web Browser Command", then any occurrence of "<URL>" will be replaced with the URL to open. If "<URL>" never occurs. then the URL to open will be appended to the very end. - Note that this means there are several ways of accomplishing the same thing. Let's assume that "/usr/bin/mozilla" is the filename of the browser. Then these settings all accomplish the same thing: - - - "/usr/bin/mozilla" as "Web Browser" and nothing as "Web Browser Command" - - - "/usr/bin/mozilla" as "Web Browser" and "<URL>" as "Web Browser Command" - - - Nothing as "Web Browser" and "/usr/bin/mozilla" as "Web Browser Command" - - - Nothing as "Web Browser" and "/usr/bin/mozilla <URL>" as "Web Browser Command" - - - Useful settings for Linux: Leave the "Web Browser" setting blank and enter the text specified below as "Web Browser Command". - - - Mozilla (if it is already running) - mozilla -remote "openurl(<URL>)" - - - Mozilla (if it is not already running) - mozilla <URL> - - - Konqueror (the KDE web browser) - konqueror <URL> - - - Useful settings for Windows: If you do not want the system's default web browser, either specify the executable as "Web Browser" and leave the "Web Browser Command" blank, or leave the "Web Browser" setting blank, and enter the command line as "Web Browser Command". If the web browser's filename contains spaces, then the filename must be surrounded by double quotes in the "Web Browser Command". Example: - - - Leave the "Web Browser" setting blank and enter the following text as "Web Browser Command": - "C:\Program Files\Internet Explorer\iexplore.exe" <URL> - - - Useful settings for Mac OS X: If you do not want the system's browser, we advise that you use the "Web Browser Command" and leave the "Web Browser" setting blank. If possible, use Mac OS X's "open" command as in the examples below: - - - Open in Safari: Leave the "Web Browser" setting blank and enter the following text as "Web Browser Command": - open -b com.apple.Safari <URL> - - - Open in TextEdit: Leave the "Web Browser" setting blank and enter the following text as "Web Browser Command": - open -b com.apple.TextEdit <URL> - - - - + Web Browser Command (browser.string = + "") These two settings allow + you to specify how Javadoc files and links from the Help files + are opened. On Windows and Mac OS X, we suggest that you leave + both options blank so that the default browser of the OS will + be used. On other platforms, e.g. on Linux, you need to set + one or both of them to let DrJava successfully open HTML + files. The filename specified as "Web Browser", + if one is set, is the executable that will be run. If no text + has been entered as "Web Browser Command", then only the URL + will be passed as parameter to the executable. If + text has been entered as "Web Browser Command", then any + occurrence of "<URL>" will be + replaced with the URL to open. If + "<URL>" never occurs. then the URL to + open will be appended to the very end. Note that + this means there are several ways of accomplishing the same + thing. Let's assume that "/usr/bin/mozilla" + is the filename of the browser. Then these settings all + accomplish the same thing: + "/usr/bin/mozilla" as "Web + Browser" and nothing as "Web Browser Command" + + "/usr/bin/mozilla" as "Web + Browser" and "<URL>" as "Web + Browser Command" + Nothing as "Web Browser" and + "/usr/bin/mozilla" as "Web Browser + Command" Nothing + as "Web Browser" and "/usr/bin/mozilla + <URL>" as "Web Browser + Command" + Useful settings for Linux: Leave the "Web Browser" setting + blank and enter the text specified below as "Web Browser + Command". Mozilla (if + it is already running) mozilla + -remote "openurl(<URL>)" + Mozilla (if it is not already + running) mozilla + <URL> + Konqueror (the KDE web browser) + konqueror <URL> + Useful settings for Windows: If you + do not want the system's default web browser, either specify the + executable as "Web Browser" and leave the "Web Browser Command" blank, + or leave the "Web Browser" setting blank, and enter the command line + as "Web Browser Command". If the web browser's filename contains + spaces, then the filename must be surrounded by double quotes in the + "Web Browser Command". Example: + Leave the "Web Browser" setting blank and enter the + following text as "Web Browser Command": + "C:\Program Files\Internet Explorer\iexplore.exe" + <URL> + Useful settings for Mac OS X: If you do not want the system's + browser, we advise that you use the "Web Browser Command" and leave + the "Web Browser" setting blank. If possible, use Mac OS X's "open" + command as in the examples below: + Open in Safari: Leave the "Web Browser" setting blank and + enter the following text as "Web Browser Command": + open -b com.apple.Safari + <URL> Open + in TextEdit: Leave the "Web Browser" setting blank and enter + the following text as "Web Browser Command": + open -b com.apple.TextEdit + <URL> + - - Tools.jar Location (javac.location = "") - - Specifies the location of the JDK's tools.jar, which contains the classes necessary for the compiler and the debugger. This file is usually found in the JDK's lib directory. - - + Tools.jar Location (javac.location = + "") Specifies the location + of the JDK's tools.jar, which contains + the classes necessary for the compiler and the debugger. This + file is usually found in the JDK's lib + directory. - - Display All Compiler Versions (all.compiler.versions = false) - - By default, DrJava only displays one compiler per major version, even if multiple updates are found (Example: You have JDK 6 Updates 10 and 14 installed; DrJava will only display JDK 6 Update 14). To display all compiler versions, mark this checkbox. Note: You have to restart DrJava when you change this setting. - - + Display All Compiler Versions + (all.compiler.versions = false) + By default, DrJava only displays one compiler per + major version, even if multiple updates are found (Example: + You have JDK 6 Updates 10 and 14 installed; DrJava will only + display JDK 6 Update 14). To display all compiler versions, + mark this checkbox. Note: You have to restart DrJava when you + change this setting. - - Extra Classpath (extra.classpath = "") - - Used to specify any directories or jar files to append to the classpath of the Interactions window and the compiler. Separate the directories using the system-specific path separator (eg. colon on Unix, semicolon on Windows). - - + Extra Classpath (extra.classpath = + "") Used to specify any + directories or jar files to append to the + classpath of the Interactions window and the compiler. + Separate the directories using the system-specific path + separator (eg. colon on Unix, semicolon on Windows). + - -
+
-
- Display Options - These configurable options affect how DrJava's user interface is displayed. +
Display Options + These configurable options affect how DrJava's user interface is + displayed. - - Look and Feel (look.and.feel = "") - - Name of the Swing LookAndFeel class which determines the general appearance of DrJava. If this option is changed while DrJava is running, the changes will not apply until you restart. - - - - - Plastic Theme (plastic.theme = "DesertBlue") - - If Plastic is selected as Look and Feel, then this setting changes the theme that is used to display DrJava. If Plastic is not selected, changing this setting has no effect. If this option is changed while DrJava is running, the changes will not apply until you restart. - - + Look and Feel (look.and.feel = + "") Name of the Swing + LookAndFeel class which determines the general appearance + of DrJava. If this option is changed while DrJava is + running, the changes will not apply until you + restart. + + Plastic Theme (plastic.theme = + "DesertBlue") If Plastic + is selected as Look and Feel, then this setting changes the + theme that is used to display DrJava. If Plastic is not + selected, changing this setting has no effect. If this + option is changed while DrJava is running, the changes will + not apply until you restart. + - - Toolbar Buttons (toolbar.icons.enabled = true, toolbar.text.enabled = true) - - These radio buttons control whether the toolbar buttons contain text, icons, or both. When set manually in the config file, each of the two options can be set to true or false, though icons will be displayed if both are set to false. - + Toolbar Buttons (toolbar.icons.enabled = true, + toolbar.text.enabled = true) + These radio buttons control whether the toolbar buttons contain + text, icons, or both. When set manually in the config file, each + of the two options can be set to true or false, though icons will + be displayed if both are set to false. - - Show All Line Numbers (lineenum.enabled = false) - - Whether to display all line numbers along the left margin of the Definitions Pane. - - - - - Show sample of source code when fast switching (show.source.for.fast.switch = true) - - Whether a sample of the source code around the current caret position should be shown in the Fast Switch window. - - - - - Show Code Preview Popups (show.code.preview.popups = false) - - Whether a sample of the source code around the document location should be shown in the Breakpoints, Bookmarks and Find Results panes. - - - - - Size of Clipboard History (clipboardhistory.store.size = 10) - - How many entries are saved in the clipboard history. - - - - - Display Fully-Qualified Class Names in "Go to File" Dialog (dialog.gotofile.fully.qualified = false) - - Whether the "Go to File" dialog should also include the fully-qualified class names. Example: There is a file myPackage/MyClass.java (in the myPackage package). With this setting enabled, the "Go to File" dialog will contain both MyClass.java and myPackage.MyClass.java; with the setting disabled, it will only contain MyClass.java. - - - - - Scan Class Files For Auto-Completion After Each Compile (dialog.completeword.scan.class.files = false) - - When this option is enabled, a project is open, and a build directory has been set, DrJava will scan all class files after each compile and add their names to the auto-completion list. This allows DrJava to auto-complete the class names of all user classes, not just the names of the open document. This option requires additional disk accesses and therefore slows down compiles. - - - - - Consider Java API Classes for Auto Completion (dialog.completeword.javaapi = false) - - When this option is enabled, DrJava will include the names of the standard Java API classes in the list of names used for auto-completion. - - - - - Display Right Margin (display.right.margin = true) - - Enable this option to let DrJava display a vertical line representing the right margin of the document. - - - - - Right Margin Position (right.margin.columns = 120) - - This option controls the position of the right margin. By default, the right margin line is displayed after 120 columns, provided the "Display Right Margin" option above is enabled. - - + Show All Line Numbers (lineenum.enabled = + false) Whether to display all + line numbers along the left margin of the Definitions Pane. + + + Show sample of source code when fast switching + (show.source.for.fast.switch = true) + Whether a sample of the source code around the current + caret position should be shown in the Fast Switch window. + + + Show Code Preview Popups + (show.code.preview.popups = false) + Whether a sample of the source code around the document + location should be shown in the Breakpoints, Bookmarks and Find + Results panes. + + Size of Clipboard History + (clipboardhistory.store.size = 10) + How many entries are saved in the clipboard + history. + + Display Fully-Qualified Class Names in "Go to File" + Dialog (dialog.gotofile.fully.qualified = + false) Whether the "Go to File" + dialog should also include the fully-qualified class names. + Example: There is a file myPackage/MyClass.java (in the myPackage + package). With this setting enabled, the "Go to File" dialog will + contain both MyClass.java and myPackage.MyClass.java; with the + setting disabled, it will only contain MyClass.java. + + + Scan Class Files For Auto-Completion After Each Compile + (dialog.completeword.scan.class.files = + false) When this option is + enabled, a project is open, and a build directory has been set, + DrJava will scan all class files after each compile and add their + names to the auto-completion list. This allows DrJava to + auto-complete the class names of all user classes, not just the + names of the open document. This option requires additional disk + accesses and therefore slows down compiles. + + + Consider Java API Classes for Auto Completion + (dialog.completeword.javaapi = false) + When this option is enabled, DrJava will include the + names of the standard Java API classes in the list of names used + for auto-completion. + + Display Right Margin (display.right.margin = + true) Enable this option to let + DrJava display a vertical line representing the right margin of + the document. + + Right Margin Position (right.margin.columns = + 120) This option controls the + position of the right margin. By default, the right margin line is + displayed after 120 columns, provided the "Display Right Margin" + option above is enabled.
-
- Font Options - Each font option is specified as a string containing the font name, style, and size, separated by dashes. The style should be in upper-case (ie. PLAIN, BOLD, ITALIC, or BOLDITALIC), while the font name must be a valid font on the system. (In most cases, using the font chooser in the Preferences window is the simplest approach.) - +
Font Options Each + font option is specified as a string containing the font name, + style, and size, separated by dashes. The style should be in + upper-case (ie. PLAIN, BOLD, ITALIC, or BOLDITALIC), while the font + name must be a valid font on the system. (In most cases, using the + font chooser in the Preferences window is the simplest + approach.) - - Main Font (font.main = Monospaced-PLAIN-12) - - This font is used for the definitions pane and the tabs at the bottom of the window. - - + Main Font (font.main = + Monospaced-PLAIN-12) This font + is used for the definitions pane and the tabs at the bottom of the + window. - - Line Numbers Font (font.doclist = Monospaced-PLAIN-12) - - This font is used for the line numbers on the left side of the Definitions Pane, if the "Show All Line Numbers" option in the "Display Options" section is enabled. The actual font size will be limited by the size of the Main Font. - - - - - Document List Font (font.doclist = Monospaced-PLAIN-10) - - This font is used in the list of all open documents on the left side of the window. - - + Line Numbers Font (font.doclist = + Monospaced-PLAIN-12) This font + is used for the line numbers on the left side of the Definitions + Pane, if the "Show All Line Numbers" option in the "Display + Options" section is enabled. The actual font size will be limited + by the size of the Main Font. + + Document List Font (font.doclist = + Monospaced-PLAIN-10) This font + is used in the list of all open documents on the left side of the + window. - - Toolbar Font (font.toolbar = dialog-PLAIN-10) - - This font is used on the toolbar buttons, if the button names are configured to be displayed. - - + Toolbar Font (font.toolbar = + dialog-PLAIN-10) This font is + used on the toolbar buttons, if the button names are configured to + be displayed.
-
- Color Options - Colors are defined similarly to HTML colors: as six hexadecimal digits preceded by a pound sign. The first two digits specify a red value, the next two specify a green value, and the next two specify a blue value. For example, #00FF00 would be a bright green. (In most cases, using the color chooser in the Preferences window is the simplest approach.) +
Color Options + Colors are defined similarly to HTML colors: as six hexadecimal + digits preceded by a pound sign. The first two digits specify a + red value, the next two specify a green value, and the next two + specify a blue value. For example, #00FF00 + would be a bright green. (In most cases, using the color chooser + in the Preferences window is the simplest approach.) - - Syntax Colors for Definitions + Syntax Colors for Definitions - - Normal Color (definitions.normal.color = #000000) - - Used as the default color for program text. - - + Normal Color (definitions.normal.color = + #000000) Used as the default + color for program text. - - Keyword Color (definitions.keyword.color = #0000FF) - - Used as the color for known keywords (eg. "public", "for"). - + Keyword Color (definitions.keyword.color = + #0000FF) Used as the color for + known keywords (eg. "public", "for"). - - Type Color (definitions.type.color = #00007C) - - Used for known primitive types (eg. "int") and capitalized words, which usually correspond to class names. - - + Type Color (definitions.type.color = + #00007C) Used for known + primitive types (eg. "int") and capitalized words, which usually + correspond to class names. - - Comment Color (definitions.comment.color = #007C00) - - Used as the color for all comments. - - + Comment Color (definitions.comment.color = + #007C00) Used as the color for + all comments. - - Double-quoted Color (definitions.double.quoted.color = #B20000) - - Used as the color for strings, which use double quotation marks. - - + Double-quoted Color + (definitions.double.quoted.color = #B20000) + Used as the color for strings, which use double quotation + marks. - - Single-quoted Color (definitions.single.quoted.color = #FF00FF) - - Used as the color for characters, which use single quotation marks. - - + Single-quoted Color + (definitions.single.quoted.color = #FF00FF) + Used as the color for characters, which use single + quotation marks. - - Number Color (definitions.number.color = #00B2B2) - - Used as the color for all numbers. - - + Number Color (definitions.number.color = + #00B2B2) Used as the color for + all numbers. - - Other Colors - - Background Color (definitions.background.color = #FFFFFF) - - Used as the background color for all panes. - - - - - Brace-matching Color (definitions.match.color = #BEFFE6) - - Used as the highlight color when matching braces. - - - - - Compiler Error Color (compiler.error.color = #FFFF00) - - Used as the highlight color for compiler errors and JUnit test failures. - - - - - Bookmark Color (bookmark.color = #00FF00) - - Used as the highlight color for bookmarks. - - - - - Find Results Color 1/2/3/4 (find.results.color1 = #FF9933, find.results.color2 = #30C996, find.results.color3 = #30FCFC, find.results.color4 = #FF66CC) - - Used as the highlight color for find results. - - - - - Debugger Breakpoint Color (debug.breakpoint.color = #FF0000) - - Used as the highlight color for breakpoints. - - - - - Disabled Debugger Breakpoint Color (debug.breakpoint.disabled.color = #800000) - - Used as the highlight color for disabled breakpoints. - - - - - Debugger Location Color (debug.thread.color = #64FFFF) - - Used as the highlight color for the location of the current thread in the debugger, shown after a breakpoint is hit or a step has occurred. - - - - - System.out Color (system.out.color = #007C00) - - Used as the color for text from System.out. - - - - - System.err Color (system.err.color = #FF0000) - - Used as the color for text from System.err. - - - - - System.in Color (system.in.color = #7C007C) - - Used as the color for text to be read by System.in. - - - - - Interactions Error Color (interactions.error.color = #B20000) - - Used as the color for text that indicates errors in the Interactions Pane. - - - - - Debug Message Color (debug.message.color = #0000B2) - - Used as the color for text displayed by the debugger. - - - - - DrJava Errors Button Background Color (rjava.errors.button.color = #FF0000) - - Used as background color for the "DrJava Errors" button that is displayed in case of an internal DrJava error. - - - - - Right Margin Color (right.margin.color = #CCCCCC) - - Used as line color for the vertical line representing the right margin of the document, if the line is enabled. - - + Other Colors + Background Color (definitions.background.color = + #FFFFFF) Used as the + background color for all panes. + + + Brace-matching Color (definitions.match.color = + #BEFFE6) Used as the highlight + color when matching braces. + + Compiler Error Color (compiler.error.color = + #FFFF00) Used as the highlight + color for compiler errors and JUnit test failures. + + + Bookmark Color (bookmark.color = + #00FF00) Used as the highlight + color for bookmarks. + + Find Results Color 1/2/3/4 (find.results.color1 + = #FF9933, find.results.color2 = + #30C996, find.results.color3 = + #30FCFC, find.results.color4 = + #FF66CC) Used as the highlight + color for find results. + + Debugger Breakpoint Color + (debug.breakpoint.color = #FF0000) + Used as the highlight color for breakpoints. + + + Disabled Debugger Breakpoint Color + (debug.breakpoint.disabled.color = #800000) + Used as the highlight color for disabled + breakpoints. + + Debugger Location Color (debug.thread.color = + #64FFFF) Used as the highlight + color for the location of the current thread in the debugger, + shown after a breakpoint is hit or a step has occurred. + + + System.out Color (system.out.color = + #007C00) Used as the color for + text from System.out. + + System.err Color (system.err.color = + #FF0000) Used as the color for + text from System.err. + + System.in Color (system.in.color = + #7C007C) Used as the color for + text to be read by System.in. + + Interactions Error Color + (interactions.error.color = #B20000) + Used as the color for text that indicates errors in the + Interactions Pane. + + Debug Message Color (debug.message.color = + #0000B2) Used as the color for + text displayed by the debugger. + + DrJava Errors Button Background Color + (rjava.errors.button.color = #FF0000) + Used as background color for the "DrJava Errors" button + that is displayed in case of an internal DrJava error. + + + Right Margin Color (right.margin.color = + #CCCCCC) Used as line color for + the vertical line representing the right margin of the document, + if the line is enabled.
-
- Window Positions - DrJava can save the last position of the main window and its dialogs and restore them the next time DrJava is started. - - - - Save Main Window Postion (window.store.position = true) - - Whether to save the position and size of the DrJava window between sessions. - - +
Window Positions + DrJava can save the last position of the main window and its + dialogs and restore them the next time DrJava is started. + + Save Main Window Postion + (window.store.position = true) + Whether to save the position and size of the + DrJava window between sessions. + - - Save "xxx" Dialog Postion (several choices for "xxx": dialog.clipboardhistory.store.position = true, dialog.gotofile.store.position = true, dialog.openjavadoc.store.position = true, dialog.completeword.store.position = true, dialog.jaroptions.store.position = true) - - Whether to save the position and size of the indicated dialog between DrJava sessions. - - + Save "xxx" Dialog Postion (several choices for "xxx": + dialog.clipboardhistory.store.position = true, + dialog.gotofile.store.position = true, + dialog.openjavadoc.store.position = true, + dialog.completeword.store.position = true, + dialog.jaroptions.store.position = true) + Whether to save the position and size of the indicated + dialog between DrJava sessions. - - Reset "xxx" Dialog Postion and Size (several choices for "xxx") - - By pressing this button, you can reset the position and size of the indicated dialog to its default value. This is useful if the dialog somehow appeared outside the screen and is not accessible, e.g. when switching from a dual-screen computer to a single-screen computer. - - + Reset "xxx" Dialog Postion and Size (several choices for + "xxx") By pressing this button, you can reset + the position and size of the indicated dialog to its default + value. This is useful if the dialog somehow appeared outside the + screen and is not accessible, e.g. when switching from a + dual-screen computer to a single-screen computer. + - - Detach Tabbed Panes (tabbedpanes.detach = false) - - By default, the tabbed panes are attached to the bottom of DrJava's main window. By selecting this option, DrJava displays the tabbed panes in their own separate window. - - + Detach Tabbed Panes (tabbedpanes.detach = + false) By default, the tabbed + panes are attached to the bottom of DrJava's main window. By + selecting this option, DrJava displays the tabbed panes in their + own separate window. - - Detach Debugger (debugger.detach = false) - - By default, the debugger pane is displayed in DrJava's main window. By selecting this option, DrJava displays the debugger in its own separate window. - - + Detach Debugger (debugger.detach = + false) By default, the debugger + pane is displayed in DrJava's main window. By selecting this + option, DrJava displays the debugger in its own separate + window. - -
+
-
- Key Bindings - Most menu items in DrJava have configurable keyboard shortcuts, along with several other navigational commands (such as moving to the beginning or end of a line). All such options are displayed on the Key Bindings panel in the Preferences window, along with their current value. Clicking on the value displays a window which allows the user to type a new key, showing any conflict with an existing key if there is one. Users may bind multiple keys to a single action as long as there are no conflicts and may add or remove key bindings as desired. (We recommend editing these options in the Preferences window.) +
Key Bindings Most + menu items in DrJava have configurable keyboard shortcuts, along + with several other navigational commands (such as moving to the + beginning or end of a line). All such options are displayed on the + Key Bindings panel in the Preferences window, along with their + current value. Clicking on the value displays a window which + allows the user to type a new key, showing any conflict with an + existing key if there is one. Users may bind multiple keys to a + single action as long as there are no conflicts and may add or + remove key bindings as desired. (We recommend editing these + options in the Preferences window.)
-
- Compiler Options - Configurable options relating to compiling source code in DrJava. Note that Compiler Warnings are not shown when compiling any Java Language Level files. Also note that the Compiler Warnings options are all passed using the "-Xlint:" flag, which is a non-standard option and may not work with all implementations of the JDK. +
Compiler Options + Configurable options relating to compiling source code in DrJava. + Note that Compiler Warnings are not shown when compiling any Java + Language Level files. Also note that the Compiler Warnings options + are all passed using the "-Xlint:" flag, which is a non-standard + option and may not work with all implementations of the JDK. - - Unchecked Warnings (show.unchecked.warnings = true) - - Passes the "-Xlint:unchecked" warning to javac. This will give more detail for unchecked conversion warnings that are mandated by the Java Language Specification. - - - - - Deprecation Warnings (show.deprecation.warnings = true) - - Passes the "-Xlint:deprecation" warning to javac. According to the JLS, this will show a description of each use or override of a deprecated member or class. - - - - - Path Warnings (show.path.warnings = false) - - Passes the "-Xlint:path" warning to javac. According to the JLS, this will warn about non-existent path (classpath, sourcepath, etc.) directories. - - - - - Serial Warnings (show.serial.warnings = false) - - Passes the "-Xlint:serial" warning to javac. According to the JLS, this will warn about missing serialVersionUID definitions on serializable classes. - - - - - Finally Warnings (show.finally.warnings = false) - - Passes the "-Xlint:finally" warning to javac. According to the JLS, this will warn about finally clauses that cannot complete normally. - - - - - Fall-through Warnings (show.fallthrough.warnings = false) - - Passes the "-Xlint:fallthrough" warning to javac. According to the JLS, this will check switch blocks for fall-through cases and provide a warning message for any that are found. Fall-through cases are cases in a switch block, other than the last case in the block, whose code does not include a break statement, allowing code execution to "fall through" from that case to the next case. - - - - - Compiler Preference (default.compiler.preference = No Preference) - - Controls which compiler DrJava should choose when it starts. If no preference is set, DrJava will choose the newest compiler it can find. - - - - -
+ Unchecked Warnings (show.unchecked.warnings = + true) Passes the + "-Xlint:unchecked" warning to javac. This will give more detail for + unchecked conversion warnings that are mandated by the Java + Language Specification. + + Deprecation Warnings (show.deprecation.warnings = + true) Passes the + "-Xlint:deprecation" warning to javac. According to the JLS, this + will show a description of each use or override of a deprecated + member or class. + + Path Warnings (show.path.warnings = + false) Passes the "-Xlint:path" + warning to javac. According to the JLS, this will warn about + non-existent path (classpath, sourcepath, etc.) directories. + + + Serial Warnings (show.serial.warnings = + false) Passes the "-Xlint:serial" + warning to javac. According to the JLS, this will warn about + missing serialVersionUID definitions on serializable + classes. + + Finally Warnings (show.finally.warnings = + false) Passes the + "-Xlint:finally" warning to javac. According to the JLS, this will + warn about finally clauses that cannot complete normally. + + + Fall-through Warnings (show.fallthrough.warnings + = false) Passes the + "-Xlint:fallthrough" warning to javac. According to the JLS, this + will check switch blocks for fall-through cases and provide a + warning message for any that are found. Fall-through cases are + cases in a switch block, other than the last case in the block, + whose code does not include a break statement, allowing code + execution to "fall through" from that case to the next case. + + + Compiler Preference (default.compiler.preference + = No Preference) Controls which + compiler DrJava should choose when it starts. If no preference is + set, DrJava will choose the newest compiler it can find. + + +
-
- Interactions Pane - Configurable options relating to interpreting code in the Interactions Pane. +
Interactions Pane + Configurable options relating to interpreting code in the + Interactions Pane. - - Size of Interactions History (history.max.size = 500) - - Specifies how many commands will be remembered in the history of the Interactions window. Previous commands can be recalled using the up and down arrow keys. - - - - - Enable the "Auto Import" Dialog (dialog.autoimport.enabled = true) - - When this option is enabled, DrJava will display a dialog to automatically import classes when a class name is interpreted but not known. After the class has been selected, DrJava will execute the appropriate "import" statement and re-execute the line that caused the dialog to appear. - - - - - Classes to Auto-Import (interactions.auto.import.classes = []) - - This option allows you to select classes and packages that should be imported automatically whenever the Interactions Pane is reset. List fully-qualified class names (e.g. java.util.ArrayList, or packages ending with a *, e.g. java.util.*). - - - - - Restore last working directory of the Interactions Pane on start up (sticky.interactions.dir = true) - - If this option is enabled, DrJava will restore the directory that was last used in the Interactions Pane. If it is disabled, DrJava will always use the value of the "user.home" property. - - - - - Smart Run Command (smart.run.for.applets.and.programs = true) - - If this option is enabled, DrJava will run applets and ACM Java Task Force Programs using the "Run" and "Run Project" buttons as well. These applets and ACM Java Task Force Programs do not need to have a main method to be run, as long as they are proper applets or ACM Java Task Force Programs. - - - - - Enforce access control (dynamicjava.access.control = disabled) - - This option controls the access control DrJava performs when class members are accessed. If the option is set to 'private and package only', then access control is used for all class members that are private or package private. If it is set to 'private only', then access control is used only for private members, and the other access levels can always be accessed. If it is set to 'disabled', all class members can be accessed, regardless of their access level. (Note: Currently, access control in DrJava's Interactions Pane has not been fully implemented; at most, access is checked for private and package private members; protected members can always be accessed.) - - - - - Require semicolon (dynamicjava.require.semicolon = false) - - If this option is enabled, then DrJava will require a semicolon at the end of statements in the Interactions Pane. - - - - - Require variable type (dynamicjava.require.variable.type = true) - - If this option is enabled, then DrJava will a variable type for variable declarations in the Interactions Pane (e.g. int i = 5). If it is disabled, DrJava will attempt to assign a variable type automatically (e.g. i = 5 to declare an int i). - - - - -
+ Size of Interactions History (history.max.size = + 500) Specifies how many commands + will be remembered in the history of the Interactions window. + Previous commands can be recalled using the up and down arrow + keys. + + Enable the "Auto Import" Dialog + (dialog.autoimport.enabled = true) + When this option is enabled, DrJava will display a dialog + to automatically import classes when a class name is interpreted + but not known. After the class has been selected, DrJava will + execute the appropriate "import" statement and re-execute the line + that caused the dialog to appear. + + + Classes to Auto-Import + (interactions.auto.import.classes = []) + This option allows you to select classes and packages + that should be imported automatically whenever the Interactions + Pane is reset. List fully-qualified class names (e.g. + java.util.ArrayList, or packages ending with a *, e.g. + java.util.*). + + Restore last working directory of the Interactions Pane + on start up (sticky.interactions.dir = true) + If this option is enabled, DrJava will restore the + directory that was last used in the Interactions Pane. If it is + disabled, DrJava will always use the value of the "user.home" + property. + + Smart Run Command + (smart.run.for.applets.and.programs = true) + If this option is enabled, DrJava will run applets and + ACM Java Task Force Programs using the "Run" and "Run Project" + buttons as well. These applets and ACM Java Task Force Programs do + not need to have a main method to be run, as long as they are + proper applets or ACM Java Task Force Programs. + + + Enforce access control + (dynamicjava.access.control = disabled) + This option controls the access control DrJava performs + when class members are accessed. If the option is set to 'private + and package only', then access control is used for all class + members that are private or package private. If it is set to + 'private only', then access control is used only for private + members, and the other access levels can always be accessed. If it + is set to 'disabled', all class members can be accessed, + regardless of their access level. (Note: Currently, access control + in DrJava's Interactions Pane has not been fully implemented; at + most, access is checked for private and package private members; + protected members can always be accessed.) + + + Require semicolon (dynamicjava.require.semicolon + = false) If this option is + enabled, then DrJava will require a semicolon at the end of + statements in the Interactions Pane. + + + Require variable type + (dynamicjava.require.variable.type = true) + If this option is enabled, then DrJava will a variable + type for variable declarations in the Interactions Pane (e.g. + int i = 5). If it is disabled, DrJava will + attempt to assign a variable type automatically (e.g. i + = 5 to declare an int + i). + +
-
- Debugger - All configurable options relating to the debugger. +
Debugger All + configurable options relating to the debugger. - - Sourcepath (debug.sourcepath = "") - - A list of directories on which to search for source files when stepping through code. The debugger will attempt to open files from these directories automatically when stepping. - - - - - Step Into Java Classes (debug.step.java = false) - - Whether to step into Java source files when stepping through a suspended method call. It is recommended to put the Java source (usually distributed with the JDK) on the Sourcepath if this option is selected. - - - - - Step into Interpreter Classes (debug.step.djava = false) - - Whether to step into DynamicJava source files when stepping through a suspended method call. DynamicJava is the Java interpreter used in the Interactions pane, and the source can be obtained from http://koala.ilog.fr/djava. Useful primarily when debugging DrJava itself. - - - - - Step into DrJava Classes (debug.step.drjava = false) - - Whether to step into DrJava source files when stepping through a suspended method call. Useful primarily when debugging DrJava itself. - - - - - Classes/Packages To Exclude (debug.step.exclude = "") - - Allows you to specify other classes/packages to step over. This should be a list with fully qualified names. To exclude a whole package, add packagename.* to the list. You might use this box to exclude instructor provided libraries, for example java.util.* . - - - - - Auto-Import after Breakpoint/Step (debug.auto.import = true) - - Automatically imports all classes and packages again that had been imported when the program was last suspended, i.e. before the breakpoint was hit or before the last step was taken. - - - - - Auto-Step Rate in ms (auto.step.rate = 1000) - - The delay interval at which Automatic Trace steps into every single line of code of the program. - - + Sourcepath (debug.sourcepath = + "") A list of directories on + which to search for source files when stepping through code. The + debugger will attempt to open files from these directories + automatically when stepping. + + Step Into Java Classes (debug.step.java = + false) Whether to step into Java + source files when stepping through a suspended method call. It is + recommended to put the Java source (usually distributed with the + JDK) on the Sourcepath if this option is selected. + + + Step into Interpreter Classes (debug.step.djava + = false) Whether to step into + DynamicJava source files when stepping through a suspended method + call. DynamicJava is the Java interpreter used in the + Interactions pane, and the source can be obtained from http://koala.ilog.fr/djava. + Useful primarily when debugging DrJava itself. + + + Step into DrJava Classes (debug.step.drjava = + false) Whether to step into + DrJava source files when stepping through a suspended method call. + Useful primarily when debugging DrJava itself. + + + Classes/Packages To Exclude (debug.step.exclude + = "") Allows you to specify + other classes/packages to step over. This should be a list with + fully qualified names. To exclude a whole package, add + packagename.* to the list. You might use + this box to exclude instructor provided libraries, for example + java.util.* . + + + Auto-Import after Breakpoint/Step + (debug.auto.import = true) + Automatically imports all classes and packages again that had + been imported when the program was last suspended, i.e. before the + breakpoint was hit or before the last step was taken. + + + Auto-Step Rate in ms (auto.step.rate = + 1000) The delay interval at + which Automatic Trace steps into every single line of code of the + program.
-
- Javadoc - All configurable options relating to generating Javadoc. +
Javadoc All + configurable options relating to generating Javadoc. - - Access Level (javadoc.access.level = "package") - - Specifies the lowest access level for fields and methods to include in the generated documentation. Legal values are "public", "protected", "package", and "private". - - - - - Java Version for Javadoc Links (javadoc.link.version = (JDK Version)) - - Specifies which URL to use when generating links to Java library classes. Legal values are "1.3", "1.4", and "none" if no links to Java library classes are desired. (This option defaults to the version of the user's JDK.) - This setting also controls which of the URLs below is used for the "Open Java API Javadoc" feature. - - - - - Javadoc 1.3 URL (javadoc.1.3.link = "http://java.sun.com/j2se/1.3/docs/api") - - The URL to use when generating links to JDK 1.3 library classes or opening the Javadoc pages for the Java API. - - - - - Javadoc 1.4 URL (javadoc.1.4.link = "http://java.sun.com/j2se/1.4/docs/api") - - The URL to use when generating links to JDK 1.4 library classes or opening the Javadoc pages for the Java API. - - - - - Javadoc 1.5 URL (javadoc.1.5.link = "http:/java.sun.com/j2se/1.5/docs/api") - - The URL to use when generating links to JDK 1.5 library classes or opening the Javadoc pages for the Java API. - - - - - Javadoc 1.6 URL (javadoc.1.6.link = "http://java.sun.com/javase/6/docs/api") - - The URL to use when generating links to JDK 1.6 library classes or opening the Javadoc pages for the Java API. - - - - - JUnit 3.8.2 URL (junit.3.8.2.link = "http://www.cs.rice.edu/~javaplt/javadoc/junit3.8.2") - - The URL to use when generating links to JUnit 3.8.2 library classes or opening the Javadoc pages for the Java API. - - - - - Additional Javadoc URLs (javadoc.additional.link = []) - - A list of URLs used to open Javadoc pages for user-specified libraries. Please enter the URL to the directory that contains the allclasses-frame.html file. For example, to open DrJava's Javadoc, enter http://drjava.org/javadoc/drjava. - - - - - Default Destination Directory (javadoc.destination = "") - - If a directory is specified, it will be used as the default when generating new documentation. - - - - - Custom Javadoc Parameters (javadoc.custom.params = "") - - Any custom parameters to pass to the Javadoc tool, separated by spaces. Use "javadoc -help" at a command line to view the available parameters. - - - - - Generate Javadoc From Source Roots (javadoc.from.roots = false) - - If this option is enabled, then Javadoc will not only search the current package and all subpackages for files, it will also search all "enclosing" packages (those at a higher level). - - - - -
+ Access Level (javadoc.access.level = + "package") Specifies the lowest + access level for fields and methods to include in the generated + documentation. Legal values are "public", "protected", "package", + and "private". + + Java Version for Javadoc Links + (javadoc.link.version = (JDK Version)) + Specifies which URL to use when generating links to Java + library classes. Legal values are "1.3", "1.4", and "none" if no + links to Java library classes are desired. (This option defaults + to the version of the user's JDK.) This setting also + controls which of the URLs below is used for the "Open Java API Javadoc" + feature. + + Javadoc 1.3 URL (javadoc.1.3.link = + "http://java.sun.com/j2se/1.3/docs/api") + The URL to use when generating links to JDK 1.3 library + classes or opening the Javadoc pages for the Java API. + + + Javadoc 1.4 URL (javadoc.1.4.link = + "http://java.sun.com/j2se/1.4/docs/api") + The URL to use when generating links to JDK 1.4 + library classes or opening the Javadoc pages for the Java + API. + + Javadoc 1.5 URL (javadoc.1.5.link = + "http:/java.sun.com/j2se/1.5/docs/api") + The URL to use when generating links to JDK 1.5 library + classes or opening the Javadoc pages for the Java API. + + + Javadoc 1.6 URL (javadoc.1.6.link = + "http://java.sun.com/javase/6/docs/api") + The URL to use when generating links to JDK 1.6 library + classes or opening the Javadoc pages for the Java API. + + + JUnit 3.8.2 URL (junit.3.8.2.link = + "http://www.cs.rice.edu/~javaplt/javadoc/junit3.8.2") + The URL to use when generating links to JUnit 3.8.2 + library classes or opening the Javadoc pages for the Java + API. + + Additional Javadoc URLs (javadoc.additional.link + = []) A list of URLs used to + open Javadoc pages for user-specified libraries. Please enter the + URL to the directory that contains the + allclasses-frame.html file. For example, to + open DrJava's Javadoc, enter http://drjava.org/javadoc/drjava. + + + Default Destination Directory + (javadoc.destination = "") + If a directory is specified, it will be used as the default when + generating new documentation. + + Custom Javadoc Parameters (javadoc.custom.params + = "") Any custom parameters to + pass to the Javadoc tool, separated by spaces. Use "javadoc + -help" at a command line to view the available parameters. + + + Generate Javadoc From Source Roots + (javadoc.from.roots = false) + If this option is enabled, then Javadoc will not only search the + current package and all subpackages for files, it will also search + all "enclosing" packages (those at a higher level). + + +
-
- Notifications - Configures how often DrJava notifies you for certain events. The notifications in this section can all be suppressed by clicking on a "Do not show this message again" checkbox (or similar) on the notification itself. +
Notifications + Configures how often DrJava notifies you for certain events. The + notifications in this section can all be suppressed by clicking on + a "Do not show this message again" checkbox (or similar) on the + notification itself. - - Prompt Before Quit (quit.prompt = true) - - Whether to display a confirmation message before DrJava quits. - - - - - Prompt Before Resetting Interactions Pane (interactions.reset.prompt = true) - - Whether to display a confirmation message before resetting the Interactions Pane. - - - - - Prompt if Interactions Pane Exits Unexpectedly (interactions.exit.prompt = true) - - Whether to display a message if the Interactions Pane is exited without the Reset button being clicked. - - - - - Prompt for Javadoc Destination (javadoc.prompt.for.destination = true) - - Whether to always display the destination selection dialog when starting Javadoc. - - - - - Prompt Before Cleaning Build Directory (prompt.before.clean = true) - - Whether to display a confirmation message before cleaning the build directory of a project. - - - - - Automatically Save Before Compiling (save.before.compile = false) - - Whether to automatically save all files each time a Compile command is chosen. - - - - - Automatically Compile Before Testing (compile.before.junit = false) - - Whether to automatically compile before running JUnit tests. - - - - - Automatically Save Before Generating Javadoc (save.before.javadoc = false) - - Whether to automatically save all files each time a Javadoc command is chosen. - - - - - Warn on Breakpoint Out of Sync (warn.breakpoint.out.of.sync = true) - - Whether to warn if setting a breakpoint in a source file that is not in sync with its class file. - - - - - Warn if Debugging Modified File (warn.debug.modified.file = true) - - Whether to warn if using the debugger on a file which has been modified since its last save. - - - - - Warn to Restart to Change Look and Feel (warn.change.laf = true) - - Whether to warn that changes to the Look and Feel do not take effect until after a restart. - - - - - Warn if File's Path Contains a '#' Symbol (warn.path.contains.pound = true) - - Whether DrJava should warn the user if the file being saved has a path that contains a '#' symbol. Users cannot use such files in the Interactions Pane because of a bug in Java. - - - - - Show a notification window when the first DrJava error occurs (dialog.drjava.error.popup.enabled = true) - - Whether to show a popup dialog when the first internal DrJava error occurs. If this option is not selected, DrJava will try to continue quietly and only display the "DrJava Errors" button (See DrJava Errors). - - - - - Warn if Compiz Detected (warn.if.compiz = true) - - Whether DrJava should warn the user if Compiz is -detected (see Compiz Detected dialog). DrJava suffers from an incompatibility between the Linux -window manager Compiz and Oracle's Swing Java GUI library. We, the -developers of DrJava, cannot do anything to fix this problem. We hope -that future versions of Java and Compiz will address the -incompatibility. In the meantime, we recommend that you disable Compiz -if you experience problems. We also suggest that you use the latest -versions of Compiz and Java, so you can benefit from possible bug -fixes made by Oracle and the Compiz developers. For more information, see -http://drjava.org/compiz/. - - - - - Delete language level class files (delete.ll.class.files = always) - - Whether Drjava should delete class files generated from Language Level source files (.dj0, .dj1, and .dj2) before compilation. This may be necessary to avoid problems with the Language Level facility. Selecting "always" will do this automatically without involving the user. Selecting "ask me" will display a notification window and let the user decide. Selecting "never" will not delete class files nor ask the user to do so. - - - - - Check for new versions (new.version.notification = stable and beta versions only) - - Whether Drjava should check if a newer version of DrJava exists. Setting this to "none (disabled)" will not check for newer versions. The other setting select what kind of versions will be considered, ranging from "stable versions only" to "weekly experimental builds". - - - - - Days between new version check (new.version.notification.days = 7) - - How many days have to pass before DrJava will look for a new version again. By default, DrJava will check every seven days.. - - - - -
+ Prompt Before Quit (quit.prompt = + true) Whether to display a + confirmation message before DrJava quits. + + + Prompt Before Resetting Interactions Pane + (interactions.reset.prompt = true) + Whether to display a confirmation message before + resetting the Interactions Pane. + + + Prompt if Interactions Pane Exits Unexpectedly + (interactions.exit.prompt = true) + Whether to display a message if the Interactions Pane is exited + without the Reset button being clicked. + + + Prompt for Javadoc Destination + (javadoc.prompt.for.destination = true) + Whether to always display the destination selection + dialog when starting Javadoc. + + Prompt Before Cleaning Build Directory + (prompt.before.clean = true) + Whether to display a confirmation message before cleaning the + build directory of a project. + + Automatically Save Before Compiling + (save.before.compile = false) + Whether to automatically save all files each time + a Compile command is chosen. + + + Automatically Compile Before Testing + (compile.before.junit = false) + Whether to automatically compile before running + JUnit tests. + + Automatically Save Before Generating Javadoc + (save.before.javadoc = false) + Whether to automatically save all files each time + a Javadoc command is chosen. + + + Warn on Breakpoint Out of Sync + (warn.breakpoint.out.of.sync = true) + Whether to warn if setting a breakpoint in a + source file that is not in sync with its class file. + + + Warn if Debugging Modified File + (warn.debug.modified.file = true) + Whether to warn if using the debugger on a file + which has been modified since its last save. + + + Warn to Restart to Change Look and Feel + (warn.change.laf = true) + Whether to warn that changes to the Look and Feel do not + take effect until after a restart. + + + Warn if File's Path Contains a '#' Symbol + (warn.path.contains.pound = true) + Whether DrJava should warn the user if the file + being saved has a path that contains a '#' symbol. Users + cannot use such files in the Interactions Pane because of a + bug in Java. + + Show a notification window when the first DrJava + error occurs (dialog.drjava.error.popup.enabled = + true) Whether to show a + popup dialog when the first internal DrJava error occurs. + If this option is not selected, DrJava will try to continue + quietly and only display the "DrJava Errors" button (See + DrJava Errors). + + + Warn if Compiz Detected (warn.if.compiz = + true) Whether DrJava + should warn the user if Compiz is detected (see Compiz Detected + dialog). DrJava suffers from an incompatibility between the + Linux window manager Compiz and Oracle's Swing Java GUI + library. We, the developers of DrJava, cannot do anything + to fix this problem. We hope that future versions of Java + and Compiz will address the incompatibility. In the + meantime, we recommend that you disable Compiz if you + experience problems. We also suggest that you use the + latest versions of Compiz and Java, so you can benefit from + possible bug fixes made by Oracle and the Compiz + developers. For more information, see http://drjava.org/compiz/. + + + Delete language level class files + (delete.ll.class.files = always) + Whether Drjava should delete class files generated + from Language Level source files (.dj0, .dj1, and .dj2) + before compilation. This may be necessary to avoid problems + with the Language Level facility. Selecting "always" will + do this automatically without involving the user. Selecting + "ask me" will display a notification window and let the + user decide. Selecting "never" will not delete class files + nor ask the user to do so. + + + Check for new versions + (new.version.notification = stable and beta versions + only) Whether Drjava + should check if a newer version of DrJava exists. Setting + this to "none (disabled)" will not check for newer + versions. The other setting select what kind of versions + will be considered, ranging from "stable versions only" to + "weekly experimental builds". + + + Days between new version check + (new.version.notification.days = 7) + How many days have to pass before DrJava will look + for a new version again. By default, DrJava will check + every seven days.. + +
-
- Miscellaneous - These are the remaining configurable options in DrJava. +
Miscellaneous These + are the remaining configurable options in DrJava. - - Indent Level (indent.level = 2) - - Sets how many spaces to use for each level of indenting. Note that tab characters are not allowed in DrJava. - - + Indent Level (indent.level = 2) + Sets how many spaces to use for each level of indenting. + Note that tab characters are not allowed in DrJava. + - - Recent Files List Size (recent.files.max.size = 5) - - Specifies how many recently used files to display in the File menu. - + Recent Files List Size (recent.files.max.size = + 5) Specifies how many recently + used files to display in the File menu. - - Size of Browser History (browser.history.max.size = 50) - - Specifies how many source code locations are stored in the browser history. - - + Size of Browser History + (browser.history.max.size = 50) + Specifies how many source code locations are stored in the + browser history. - - Automatically Close Block Comments (auto.close.comments = false) - - Whether to automatically insert the string designating the end of a multi-line comment after beginning one. - + Automatically Close Block Comments + (auto.close.comments = false) + Whether to automatically insert the string designating the end + of a multi-line comment after beginning one. - - Allow Assert Keyword in Java 1.4 (javac.allow.assert = false) - - Whether to support the assert keyword when compiling with a JDK 1.4 or later compiler. - + Allow Assert Keyword in Java 1.4 + (javac.allow.assert = false) + Whether to support the assert keyword when + compiling with a JDK 1.4 or later compiler. - - Keep Emacs-style Backup Files (files.backup = true) - - Whether DrJava should keep a backup copy of each file that the user modifies, saved with a "~" at the end of the filename. - - + Keep Emacs-style Backup Files + (files.backup = true) + Whether DrJava should keep a backup copy of each file + that the user modifies, saved with a "~" at the end of the + filename. - - Clear Console After Interactions Reset (reset.clear.console = true) - - Whether DrJava should clear the contents of the Console Tab each time the Interactions Pane is reset. - - + Clear Console After Interactions Reset + (reset.clear.console = true) + Whether DrJava should clear the contents of the Console Tab + each time the Interactions Pane is reset. + - - Require test classes in projects to end in "Test" (force.test.suffix = false) - - Whether to require that JUnit test classes in projects end in "Test". If this is enabled, classes that do not end in "Test" will not be considered JUnit tests when in project mode. - - - - - Put the focus in the definitions pane after find/replace (find.replace.focus.in.defpane = false) - - Whether to put the focus in the Definitions pane after using find/replace. If this option is not enabled, the focus will remain in the Find/Replace pane. - - - - - Forcefully Quit DrJava (drjava.use.force.quit = false) - - On some systems (namely tablet PCs), DrJava does not shut down properly when quit. Select this option to remedy this problem. - - - - - Enable Remote Control (remote.control.enabled = true) - - Java's "remote control" allows other applications to control certain aspects of DrJava, for example what file is displayed. This feature is also necessary if you want to double-click on a .java file to open the file in an existing instance of DrJava. - - - - - Remote Control Port (remote.control.port = 4444) - - Selects the port that Drjava uses for its remote control. - - - - - Follow File Delay (follow.file.delay = 300) - - Specifies the number of milliseconds that have to pass before DrJava will update a "Follow File" window again. - - - - - Maximum Lines in "Follow File" Window (follow.file.lines = 1000) - - Specifies the number of of lines that a "Follow File" window may contain. If a file has more than this many lines, only the end of the file will be displayed. - - - - -
+ Require test classes in projects to end in "Test" + (force.test.suffix = false) + Whether to require that JUnit test classes in projects end in + "Test". If this is enabled, classes that do not end in "Test" + will not be considered JUnit tests when in project mode. + + + Put the focus in the definitions pane after find/replace + (find.replace.focus.in.defpane = false) + Whether to put the focus in the Definitions pane after + using find/replace. If this option is not enabled, the focus will + remain in the Find/Replace pane. + + + Forcefully Quit DrJava (drjava.use.force.quit = + false) On some systems (namely + tablet PCs), DrJava does not shut down properly when quit. Select + this option to remedy this problem. + + + Enable Remote Control (remote.control.enabled = + true) Java's "remote control" + allows other applications to control certain aspects of DrJava, + for example what file is displayed. This feature is also + necessary if you want to double-click on a .java file to open the + file in an existing instance of DrJava. + + + Remote Control Port (remote.control.port = + 4444) Selects the port that + Drjava uses for its remote control. + + + Follow File Delay (follow.file.delay = + 300) Specifies the number of + milliseconds that have to pass before DrJava will update a + "Follow File" window again. + + Maximum Lines in "Follow File" Window + (follow.file.lines = 1000) + Specifies the number of of lines that a "Follow File" window + may contain. If a file has more than this many lines, only the + end of the file will be displayed. + + +
-
- File Types - Configurable options for file types. Note that the options here are only available on Windows, and only if the .exe file is used. - .drjava files are DrJava project files. .djapp files are DrJava add-ons. .java files are Java source files. +
File Types + Configurable options for file types. Note that the options here + are only available on Windows, and only if the .exe file is + used. .drjava files are DrJava project files. .djapp + files are DrJava add-ons. .java files are Java source files. - - Associate .drjava and .djapp Files with DrJava - - Set the file type associations so that double-clicking on .drjava and .djapp files in the Windows Explorer will open them in DrJava. - - - - - Remove .drjava and .djapp File Associations - - Remove the association of .drjava and .djapp files with DrJava. - - - - - Associate .java Files with DrJava - - Set the file type associations so that double-clicking on .java files in the Windows Explorer will open them in DrJava. - - - - - Remove .java File Associations - - Remove the association of .java files with DrJava. - - - - - Automatically assign .java, .drjava and .djapp Files to DrJava (file.ext.registration = ask me at startup) - - Specifies whether Drjava should automatically associate .java, .drjava and .djapp files with DrJava so those files are opened with DrJava when double-clicked. When set to the default, "ask me at startup", DrJava will check at startup if those associations exist, and if not, present a dialog allowing the user to set the file associations (see Set File Associations dialog). Setting this option to "always" will set the file associations automatically at startup without user interaction. Setting it to "never" will not change file associations nor ask the user. - - - + Associate .drjava and .djapp Files with DrJava + Set the file type associations so that double-clicking on + .drjava and .djapp files in the Windows Explorer will open them in + DrJava. + + Remove .drjava and .djapp File Associations + Remove the association of .drjava and .djapp files with + DrJava. + + Associate .java Files with DrJava + Set the file type associations so that double-clicking on .java + files in the Windows Explorer will open them in DrJava. + + + Remove .java File Associations + Remove the association of .java files with DrJava. + + + Automatically assign .java, .drjava and .djapp Files to + DrJava (file.ext.registration = ask me at + startup) Specifies whether + Drjava should automatically associate .java, .drjava and .djapp + files with DrJava so those files are opened with DrJava when + double-clicked. When set to the default, "ask me at startup", + DrJava will check at startup if those associations exist, and if + not, present a dialog allowing the user to set the file + associations (see Set File + Associations dialog). Setting this option to "always" + will set the file associations automatically at startup without + user interaction. Setting it to "never" will not change file + associations nor ask the user. +
-
- JVMs - Configurable options for the two Java Virtual Machines (JVMs) that DrJava uses. +
JVMs Configurable + options for the two Java Virtual Machines (JVMs) that DrJava + uses. - - Maximum Heap Size for Main JVM in MB (master.jvm.xmx = default) - - Specifies how many megabytes of memory Java should use for the Main JVM (the main part of DrJava including the editor and compiler). The "default" setting leaves this up to Java. If you experience "Out of memory" errors, set this to a value that is larger than 64 MB (default in Java 5) but smaller than the amount of physical memory you have. If it is still too small, choose the next bigger setting. Note: You have to restart DrJava for changes to become effective. - - + Maximum Heap Size for Main JVM in MB + (master.jvm.xmx = default) + Specifies how many megabytes of memory Java should use for the + Main JVM (the main part of DrJava including the editor and + compiler). The "default" setting leaves this up to Java. If you + experience "Out of memory" errors, set this to a value that is + larger than 64 MB (default in Java 5) but smaller than the amount + of physical memory you have. If it is still too small, choose the + next bigger setting. Note: You have to restart DrJava for changes + to become effective. - - JVM Args for Main JVM (master.jvm.args = "") - - Specifies the JVM arguments that should be used for DrJava's Main JVM, other than the maximum heap size (-Xmx), which is controlled using the option above. Note: You have to restart DrJava for changes to become effective. - - - - - Maximum Heap Size for Interactions JVM in MB (slave.jvm.xmx = default) - - Specifies how many megabytes of memory Java should use for the Interactions JVM (used to interpret code in the Interactions Pane and to run programs developed in DrJava). The "default" setting leaves this up to Java. If you experience "Out of memory" errors, set this to a value that is larger than 64 MB (default in Java 5) but smaller than the amount of physical memory you have. If it is still too small, choose the next bigger setting. Note: You have to reset the Interactions Pane for changes to become effective. - - + JVM Args for Main JVM (master.jvm.args = + "") Specifies the JVM arguments + that should be used for DrJava's Main JVM, other than the maximum + heap size (-Xmx), which is controlled using the option above. + Note: You have to restart DrJava for changes to become + effective. + + Maximum Heap Size for Interactions JVM in MB + (slave.jvm.xmx = default) + Specifies how many megabytes of memory Java should use for the + Interactions JVM (used to interpret code in the Interactions Pane + and to run programs developed in DrJava). The "default" setting + leaves this up to Java. If you experience "Out of memory" errors, + set this to a value that is larger than 64 MB (default in Java 5) + but smaller than the amount of physical memory you have. If it is + still too small, choose the next bigger setting. Note: You have to + reset the Interactions Pane for changes to become + effective. - - JVM Args for Interactions JVM (slave.jvm.args = "") - - Specifies the JVM arguments that should be used for DrJava's Interactions JVM, other than the maximum heap size (-Xmx), which is controlled using the option above. Note: You have to reset the Interactions Pane for changes to become effective. - - - + JVM Args for Interactions JVM (slave.jvm.args = + "") Specifies the JVM arguments + that should be used for DrJava's Interactions JVM, other than the + maximum heap size (-Xmx), which is controlled using the option + above. Note: You have to reset the Interactions Pane for changes + to become effective. +
@@ -2351,147 +3058,179 @@ url="http://drjava.org/compiz/">http://drjava.org/compiz/. - - DrJava Errors - Even though we try hard, it is an unfortunate reality that DrJava contains errors. This appendix describes how DrJava will most likely react in case of an error, and how you can help improve DrJava if you encounter an error. - - How DrJava Reacts - When an internal DrJava error occurs, DrJava puts information about the error in a list and displays a "DrJava Errors" toolbar button that is normally hidden. You can view this list by clicking on that button or by selecting the "DrJava Errors" command in the Help menu. - In the "DrJava Errors" dialog, you can use the "Previous" and "Next" buttons to browse the list of errors, or press the "Copy This Error" button to copy the information about the currently displayed error to the clipboard. This information is useful to us in finding the cause of the error. The "Dismiss" button clears the list of errors, hides the "DrJava Errors" button, and closes the window. The "Close" button leaves the list as it is and only closes the window. - Optionally, DrJava may also display a popup notification window when the first error occurs. You may disable this popup under "Notifications" in the Preferences window (see Configuring DrJava). In most cases, an internal DrJava error will not be fatal, and most likely you will be able to continue working even without restarting DrJava. Therefore, DrJava does not display this popup for every error, but only when the list of errors is empty, and then an error occurs. This is to inform you that DrJava might be unstable now. - The popup window contains a "Close" button to close the window and continue working, and a "More Information" button that will open up the "DrJava Errors" dialog. It also provides a checkbox labeled "Keep showing this notification" that allows you to disable the popup; disabling this checkbox does the same as disabling the "Show a notification window when the first DrJava error occurs" option in the Preferences window (see Configuring DrJava). - - Submitting a Bug Report - If you encounter an error, we would be thrilled if you helped us improve DrJava by submitting a bug report on our SourceForge site at http://sourceforge.net/projects/drjava/ + DrJava Errors Even though + we try hard, it is an unfortunate reality that DrJava contains + errors. This appendix describes how DrJava will most likely react in + case of an error, and how you can help improve DrJava if you + encounter an error. + + How DrJava Reacts When an internal DrJava + error occurs, DrJava puts information about the error in a list and + displays a "DrJava Errors" toolbar button that is normally hidden. + You can view this list by clicking on that button or by selecting + the "DrJava Errors" command in the Help menu. + In the "DrJava Errors" dialog, you can use the "Previous" and "Next" + buttons to browse the list of errors, or press the "Copy This Error" + button to copy the information about the currently displayed error to + the clipboard. This information is useful to us in finding the cause of + the error. The "Dismiss" button clears the list of errors, hides the + "DrJava Errors" button, and closes the window. The "Close" button + leaves the list as it is and only closes the window. + Optionally, DrJava may also display a popup notification window when + the first error occurs. You may disable this popup under + "Notifications" in the Preferences window (see Configuring DrJava). In most cases, + an internal DrJava error will not be fatal, and most likely you will be + able to continue working even without restarting DrJava. Therefore, + DrJava does not display this popup for every error, but only when the + list of errors is empty, and then an error occurs. This is to inform + you that DrJava might be unstable now. The popup window + contains a "Close" button to close the window and continue working, and + a "More Information" button that will open up the "DrJava Errors" + dialog. It also provides a checkbox labeled "Keep showing this + notification" that allows you to disable the popup; disabling this + checkbox does the same as disabling the "Show a notification window + when the first DrJava error occurs" option in the Preferences window + (see Configuring DrJava). + + Submitting a Bug Report If you encounter + an error, we would be thrilled if you helped us improve DrJava by + submitting a bug report on our SourceForge site at http://sourceforge.net/projects/drjava/ To submit a bug report, please follow these instructions: - - Point your favorite browser to the URL above. - Click on the link labeled "Bugs" (it's in the long row of links: "Summary | Admin | Home Page | Tracker | Bugs | ..."). - Optional: If you have the time, please browse through the list of bugs to see if the error you encountered has already been reported. - Click on the link labeled "Submit New" (it's on the left, below the long row of links). - Optional: If you have a SourceForge account, please log in before submitting the bug report. This is not necessary, but it enables us to communicate with you if we need more information. - Please enter a short description in the "Summary" field, and a more detailed description that includes the information from the "DrJava Errors" window in the "Detailed Description" field. Try to be as specific as you can. Here's a list of questions you might want to consider in your description: - - What operating system are you using? - What version of the Java JDK are you using (1.5, 6, etc.)? Do you have multiple versions of the JDK (or maybe the JRE) installed? - Did you have a project open, or where you using just a bunch of files not part of a project? - What were you doing just before the error occurred? Were you compiling, saving a file, debugging, using find/replace, etc.? - What happened after the error occurred? Could you continue with your work, or was it so bad that you had to quit DrJava? - - - Press the "Submit" button on the bottom of the page - + Point your favorite browser to the URL + above. Click on the link + labeled "Bugs" (it's in the long row of links: "Summary | Admin + | Home Page | Tracker | Bugs | ..."). + Optional: If you have the time, please browse through + the list of bugs to see if the error you encountered has already + been reported. Click on the + link labeled "Submit New" (it's on the left, below the long row + of links). Optional: If you + have a SourceForge account, please log in before submitting the + bug report. This is not necessary, but it enables us to + communicate with you if we need more + information. Please enter a + short description in the "Summary" field, and a more detailed + description that includes the information from the "DrJava + Errors" window in the "Detailed Description" field. Try to be as + specific as you can. Here's a list of questions you might want + to consider in your description: + What operating system are you + using? What version of + the Java JDK are you using (1.5, 6, etc.)? Do you have + multiple versions of the JDK (or maybe the JRE) + installed? Did you + have a project open, or where you using just a bunch of + files not part of a project? + What were you doing just before the error + occurred? Were you compiling, saving a file, debugging, + using find/replace, etc.? + What happened after the error occurred? Could + you continue with your work, or was it so bad that you + had to quit DrJava? + Press the "Submit" button on the bottom of + the page That's it! Thank you for helping us make DrJava better! - - Indenting Files from the Command Line - DrJava has a very useful indenting algorithm, but indenting several large files can be a time consuming process. Because of this, DrJava provides a command line interface to its indenter that can be run on a series of files. -
- Running the Command Line Indenter - Use the following command at a command prompt to run the indenter on a series of files. - - - java -classpath drjava-DATE-TIME.jar edu.rice.cs.drjava.IndentFiles - -indent N - filename.java - - Replace DATE-TIME with the appropriate value for your DrJava file. The "-indent" argument is optional, where N is the number of spaces to use for an indentation level. - -
-
- + Indenting Files from the Command + Line DrJava has a very useful indenting algorithm, but + indenting several large files can be a time consuming process. + Because of this, DrJava provides a command line interface to its + indenter that can be run on a series of files.
Running the Command Line + Indenter Use the following command at a command + prompt to run the indenter on a series of files. + + java -classpath drjava-DATE-TIME.jar + edu.rice.cs.drjava.IndentFiles -indent N filename.java Replace + DATE-TIME with the appropriate value for your DrJava file. The + "-indent" argument is optional, where N is the number of spaces to + use for an indentation level. + +
diff --git a/drjava.jar b/drjava.jar new file mode 100644 index 000000000..d78e4ee65 Binary files /dev/null and b/drjava.jar differ diff --git a/drjava/.gitignore b/drjava/.gitignore index 4c8e5864d..794f549de 100644 --- a/drjava/.gitignore +++ b/drjava/.gitignore @@ -1,3 +1,4 @@ drjava.jar classes/ - +arch/ +docs/ diff --git a/drjava/README b/drjava/README index cce7cc4a1..518e8f862 100644 --- a/drjava/README +++ b/drjava/README @@ -18,15 +18,15 @@ The following guide presumes that you already have the following software systems installed on your system and accessible via your shell search path: -* Java 5.0 or 6.0 SDK, -* subversion (svn) 1.4 or above, and -* ant 1.7 or above. +* Java 8.0 SDK, +* ant 1.7 or above, and +* Git (git) 2.7.4 or above. If not, follow the instructions at http://www.drjava.org/devdocs/ for setting up a DrJava development environment. 1) Make a directory to be the top-level container for you drjava code - tree. I recommend "dj". + tree. I recommend "dj" or "drjava-top. 2) Descend into this new directory by typing the command @@ -34,7 +34,13 @@ setting up a DrJava development environment. 3) Download the drjava source code base by typing the command - svn co https://drjava.svn.sourceforge.net/svnroot/drjava/trunk/drjava + git clone https://github.com/DrJavaAtRice/drjava.git + + You can grab the URL (beginning with "https") at + + https://github.com/DrJavaAtRice/drjava + + and clicking on the green button labeled "Clone or download". 4) After this download completes, descend into the root directory of the dowloaded code base by typing the command @@ -55,3 +61,12 @@ entering the command If you encounter any problems, consult the Developer Docs at drjava.org by visiting http://www.drjava.org/devdocs/. + +You can run the unit tests by entering the command + + ant test + +To delete all compiled and unjarred class files (from jar files in +drjava/lib and drjava/lib/buildlib), enter the command + + ant clean diff --git a/drjava/build.xml b/drjava/build.xml index cd3c6d276..8e72d38f9 100644 --- a/drjava/build.xml +++ b/drjava/build.xml @@ -8,9 +8,9 @@ - + @@ -37,8 +37,6 @@ - - @@ -63,29 +61,18 @@ - - - + + + + - - - - - - - + + + + + @@ -101,8 +88,6 @@ - - @@ -157,7 +142,6 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -219,10 +257,10 @@ - - + - - + @@ -274,14 +311,14 @@ - - + @@ -348,39 +385,38 @@ Testing Targets *************** --> - - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -460,11 +496,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - @@ -485,12 +562,12 @@ - + - + @@ -499,6 +576,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -534,13 +649,6 @@ - - - - - - @@ -567,19 +675,12 @@ + description="Run the jar file under Java 8 (after building it)"> - - - - - - @@ -596,7 +697,6 @@ - @@ -664,16 +764,17 @@ - - - - - + + + + + + - @@ -694,7 +795,7 @@ - + @@ -707,14 +808,16 @@ Clean Targets ************* --> - + - + + + @@ -761,13 +864,6 @@ - - - - - - - @@ -820,31 +916,28 @@ - + + - - - - - - - - - - - - - - - - - - + + + + + + + @@ -906,8 +999,7 @@ - + @@ -1033,18 +1125,17 @@ - - + + - - + @@ -1082,70 +1173,34 @@ - - + + + - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - - - - + - - @@ -1210,7 +1265,6 @@ value="${ant.project.name}${tag-append}-${DSTAMP}-${TSTAMP}"/> - @@ -1252,54 +1306,5 @@ --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/drjava/build_old.xml b/drjava/build_old.xml new file mode 100644 index 000000000..37829a408 --- /dev/null +++ b/drjava/build_old.xml @@ -0,0 +1,1014 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/drjava/extlib/cldrdata.jar b/drjava/extlib/cldrdata.jar new file mode 100644 index 000000000..e5191fab2 Binary files /dev/null and b/drjava/extlib/cldrdata.jar differ diff --git a/drjava/extlib/dnsns.jar b/drjava/extlib/dnsns.jar new file mode 100644 index 000000000..e9174da44 Binary files /dev/null and b/drjava/extlib/dnsns.jar differ diff --git a/drjava/extlib/icedtea-sound.jar b/drjava/extlib/icedtea-sound.jar new file mode 100644 index 000000000..97da2257b Binary files /dev/null and b/drjava/extlib/icedtea-sound.jar differ diff --git a/drjava/extlib/jaccess.jar b/drjava/extlib/jaccess.jar new file mode 100644 index 000000000..846da5794 Binary files /dev/null and b/drjava/extlib/jaccess.jar differ diff --git a/drjava/extlib/java-atk-wrapper.jar b/drjava/extlib/java-atk-wrapper.jar new file mode 120000 index 000000000..d0b7bd0b2 --- /dev/null +++ b/drjava/extlib/java-atk-wrapper.jar @@ -0,0 +1 @@ +../../../../../../share/java/java-atk-wrapper.jar \ No newline at end of file diff --git a/drjava/extlib/libatk-wrapper.so b/drjava/extlib/libatk-wrapper.so new file mode 120000 index 000000000..fed87c67c --- /dev/null +++ b/drjava/extlib/libatk-wrapper.so @@ -0,0 +1 @@ +../../../../../x86_64-linux-gnu/jni/libatk-wrapper.so \ No newline at end of file diff --git a/drjava/extlib/localedata.jar b/drjava/extlib/localedata.jar new file mode 100644 index 000000000..7fc65a096 Binary files /dev/null and b/drjava/extlib/localedata.jar differ diff --git a/drjava/extlib/nashorn.jar b/drjava/extlib/nashorn.jar new file mode 100644 index 000000000..71df18d9c Binary files /dev/null and b/drjava/extlib/nashorn.jar differ diff --git a/drjava/extlib/rt.jar b/drjava/extlib/rt.jar new file mode 100644 index 000000000..186774f81 Binary files /dev/null and b/drjava/extlib/rt.jar differ diff --git a/drjava/extlib/sunec.jar b/drjava/extlib/sunec.jar new file mode 100644 index 000000000..90812e59c Binary files /dev/null and b/drjava/extlib/sunec.jar differ diff --git a/drjava/extlib/sunjce_provider.jar b/drjava/extlib/sunjce_provider.jar new file mode 100644 index 000000000..a7b89cada Binary files /dev/null and b/drjava/extlib/sunjce_provider.jar differ diff --git a/drjava/extlib/sunpkcs11.jar b/drjava/extlib/sunpkcs11.jar new file mode 100644 index 000000000..d0dc4d992 Binary files /dev/null and b/drjava/extlib/sunpkcs11.jar differ diff --git a/drjava/extlib/tools.jar b/drjava/extlib/tools.jar new file mode 100644 index 000000000..f3a8ac5ff Binary files /dev/null and b/drjava/extlib/tools.jar differ diff --git a/drjava/extlib/zipfs.jar b/drjava/extlib/zipfs.jar new file mode 100644 index 000000000..d0a9c5fca Binary files /dev/null and b/drjava/extlib/zipfs.jar differ diff --git a/drjava/lib/.gitignore b/drjava/lib/.gitignore new file mode 100644 index 000000000..168939870 --- /dev/null +++ b/drjava/lib/.gitignore @@ -0,0 +1 @@ +arch diff --git a/drjava/lib/asm-9.6.jar b/drjava/lib/asm-9.6.jar new file mode 100644 index 000000000..cc1c2cd8e Binary files /dev/null and b/drjava/lib/asm-9.6.jar differ diff --git a/drjava/lib/asm-all-5.0.1.jar b/drjava/lib/asm-all-5.0.1.jar deleted file mode 100644 index 59b27bf81..000000000 Binary files a/drjava/lib/asm-all-5.0.1.jar and /dev/null differ diff --git a/drjava/lib/asm-commons-9.6.jar b/drjava/lib/asm-commons-9.6.jar new file mode 100644 index 000000000..75f3bad86 Binary files /dev/null and b/drjava/lib/asm-commons-9.6.jar differ diff --git a/drjava/lib/asm-tree-9.6.jar b/drjava/lib/asm-tree-9.6.jar new file mode 100644 index 000000000..9fe527587 Binary files /dev/null and b/drjava/lib/asm-tree-9.6.jar differ diff --git a/drjava/lib/buildlib/ant-junit.jar b/drjava/lib/buildlib/ant-junit.jar new file mode 100644 index 000000000..5e142645d Binary files /dev/null and b/drjava/lib/buildlib/ant-junit.jar differ diff --git a/drjava/lib/buildlib/appbundler-1.0.jar b/drjava/lib/buildlib/appbundler-1.0.jar new file mode 100644 index 000000000..ef30f1cb4 Binary files /dev/null and b/drjava/lib/buildlib/appbundler-1.0.jar differ diff --git a/drjava/lib/buildlib/asm-commons-9.6.jar b/drjava/lib/buildlib/asm-commons-9.6.jar new file mode 100644 index 000000000..75f3bad86 Binary files /dev/null and b/drjava/lib/buildlib/asm-commons-9.6.jar differ diff --git a/drjava/lib/buildlib/asm-debug-all-5.0.2.jar b/drjava/lib/buildlib/asm-debug-all-5.0.2.jar new file mode 100644 index 000000000..834c9d09a Binary files /dev/null and b/drjava/lib/buildlib/asm-debug-all-5.0.2.jar differ diff --git a/drjava/lib/buildlib/bcel-6.0-SNAPSHOT.jar b/drjava/lib/buildlib/bcel-6.0-SNAPSHOT.jar new file mode 100644 index 000000000..11a974b28 Binary files /dev/null and b/drjava/lib/buildlib/bcel-6.0-SNAPSHOT.jar differ diff --git a/drjava/lib/buildlib/commons-lang-2.6.jar b/drjava/lib/buildlib/commons-lang-2.6.jar new file mode 100644 index 000000000..98467d3a6 Binary files /dev/null and b/drjava/lib/buildlib/commons-lang-2.6.jar differ diff --git a/drjava/lib/buildlib/concjunitrt.jar b/drjava/lib/buildlib/concjunitrt.jar deleted file mode 100644 index 8e4b33865..000000000 Binary files a/drjava/lib/buildlib/concjunitrt.jar and /dev/null differ diff --git a/drjava/lib/buildlib/concutest-junit-4.7-withrt-nodep.jar b/drjava/lib/buildlib/concutest-junit-4.7-withrt-nodep.jar deleted file mode 100644 index 9c10dade4..000000000 Binary files a/drjava/lib/buildlib/concutest-junit-4.7-withrt-nodep.jar and /dev/null differ diff --git a/drjava/lib/buildlib/dom4j-1.6.1.jar b/drjava/lib/buildlib/dom4j-1.6.1.jar new file mode 100644 index 000000000..c8c4dbb92 Binary files /dev/null and b/drjava/lib/buildlib/dom4j-1.6.1.jar differ diff --git a/drjava/lib/buildlib/findbugs-ant.jar b/drjava/lib/buildlib/findbugs-ant.jar index 5e917ba50..c2ad778a6 100644 Binary files a/drjava/lib/buildlib/findbugs-ant.jar and b/drjava/lib/buildlib/findbugs-ant.jar differ diff --git a/drjava/lib/buildlib/findbugs.jar b/drjava/lib/buildlib/findbugs.jar new file mode 100644 index 000000000..b86140266 Binary files /dev/null and b/drjava/lib/buildlib/findbugs.jar differ diff --git a/drjava/lib/buildlib/hamcrest-core.jar b/drjava/lib/buildlib/hamcrest-core.jar new file mode 100644 index 000000000..9d5fe16e3 Binary files /dev/null and b/drjava/lib/buildlib/hamcrest-core.jar differ diff --git a/drjava/lib/buildlib/jFormatString.jar b/drjava/lib/buildlib/jFormatString.jar new file mode 100644 index 000000000..bdcb8466b Binary files /dev/null and b/drjava/lib/buildlib/jFormatString.jar differ diff --git a/drjava/lib/buildlib/jacocoagent.jar b/drjava/lib/buildlib/jacocoagent.jar new file mode 100644 index 000000000..9eedac24b Binary files /dev/null and b/drjava/lib/buildlib/jacocoagent.jar differ diff --git a/drjava/lib/buildlib/jacocoant.jar b/drjava/lib/buildlib/jacocoant.jar new file mode 100644 index 000000000..38c956372 Binary files /dev/null and b/drjava/lib/buildlib/jacocoant.jar differ diff --git a/drjava/lib/buildlib/jarbundler-2.3.1.jar b/drjava/lib/buildlib/jarbundler-2.3.1.jar new file mode 100644 index 000000000..c92224389 Binary files /dev/null and b/drjava/lib/buildlib/jarbundler-2.3.1.jar differ diff --git a/drjava/lib/buildlib/jarbundler-core-3.3.0.jar b/drjava/lib/buildlib/jarbundler-core-3.3.0.jar new file mode 100644 index 000000000..f31c4783a Binary files /dev/null and b/drjava/lib/buildlib/jarbundler-core-3.3.0.jar differ diff --git a/drjava/lib/buildlib/jaxen-1.1.6.jar b/drjava/lib/buildlib/jaxen-1.1.6.jar new file mode 100644 index 000000000..52f47a4f4 Binary files /dev/null and b/drjava/lib/buildlib/jaxen-1.1.6.jar differ diff --git a/drjava/lib/buildlib/jsr305.jar b/drjava/lib/buildlib/jsr305.jar new file mode 100644 index 000000000..cc39b7383 Binary files /dev/null and b/drjava/lib/buildlib/jsr305.jar differ diff --git a/drjava/lib/buildlib/junit.jar b/drjava/lib/buildlib/junit.jar index c8f711d05..3a7fc266c 100644 Binary files a/drjava/lib/buildlib/junit.jar and b/drjava/lib/buildlib/junit.jar differ diff --git a/drjava/lib/concutest-junit-4.7-withrt-nodep.jar b/drjava/lib/concutest-junit-4.7-withrt-nodep.jar deleted file mode 100644 index 9c10dade4..000000000 Binary files a/drjava/lib/concutest-junit-4.7-withrt-nodep.jar and /dev/null differ diff --git a/drjava/lib/dynamicjava-base.jar b/drjava/lib/dynamicjava-base.jar index 97dd9803c..90cf1d6c4 100644 Binary files a/drjava/lib/dynamicjava-base.jar and b/drjava/lib/dynamicjava-base.jar differ diff --git a/drjava/lib/ecj-4.5.1.jar b/drjava/lib/ecj-4.5.1.jar deleted file mode 100644 index f2aad99d8..000000000 Binary files a/drjava/lib/ecj-4.5.1.jar and /dev/null differ diff --git a/drjava/lib/hamcrest-2.2.jar b/drjava/lib/hamcrest-2.2.jar new file mode 100644 index 000000000..71065788d Binary files /dev/null and b/drjava/lib/hamcrest-2.2.jar differ diff --git a/drjava/lib/jacocoant.jar b/drjava/lib/jacocoant.jar deleted file mode 100644 index 07ec7bf85..000000000 Binary files a/drjava/lib/jacocoant.jar and /dev/null differ diff --git a/drjava/lib/javalanglevels-base.jar b/drjava/lib/javalanglevels-base.jar index 1a8249cfa..6b01892cc 100644 Binary files a/drjava/lib/javalanglevels-base.jar and b/drjava/lib/javalanglevels-base.jar differ diff --git a/drjava/lib/junit.jar b/drjava/lib/junit.jar new file mode 100644 index 000000000..6da55d8b8 Binary files /dev/null and b/drjava/lib/junit.jar differ diff --git a/drjava/lib/org.jacoco.core-0.7.3.201409180205.jar b/drjava/lib/org.jacoco.core-0.7.3.201409180205.jar deleted file mode 100644 index 1d07e181c..000000000 Binary files a/drjava/lib/org.jacoco.core-0.7.3.201409180205.jar and /dev/null differ diff --git a/drjava/lib/org.jacoco.core-0.8.11.202310140853.jar b/drjava/lib/org.jacoco.core-0.8.11.202310140853.jar new file mode 100644 index 000000000..732e29681 Binary files /dev/null and b/drjava/lib/org.jacoco.core-0.8.11.202310140853.jar differ diff --git a/drjava/lib/org.jacoco.report-0.7.3.201409180205.jar b/drjava/lib/org.jacoco.report-0.7.3.201409180205.jar deleted file mode 100644 index 7d7e26326..000000000 Binary files a/drjava/lib/org.jacoco.report-0.7.3.201409180205.jar and /dev/null differ diff --git a/drjava/lib/org.jacoco.report-0.8.11.202310140853.jar b/drjava/lib/org.jacoco.report-0.8.11.202310140853.jar new file mode 100644 index 000000000..e7a744062 Binary files /dev/null and b/drjava/lib/org.jacoco.report-0.8.11.202310140853.jar differ diff --git a/drjava/lib/platform.jar b/drjava/lib/platform.jar index 9c3c2c56f..610ab4f40 100644 Binary files a/drjava/lib/platform.jar and b/drjava/lib/platform.jar differ diff --git a/drjava/lib/plt.jar b/drjava/lib/plt.jar index b9199c6ea..b2f2d185a 100644 Binary files a/drjava/lib/plt.jar and b/drjava/lib/plt.jar differ diff --git a/drjava/packaging/mac/DrJava.app/Contents/Info.plist b/drjava/packaging/mac/DrJava.app/Contents/Info.plist deleted file mode 100644 index fbc029899..000000000 --- a/drjava/packaging/mac/DrJava.app/Contents/Info.plist +++ /dev/null @@ -1,73 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - DrJava - CFBundleIconFile - DrJava.icns - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - DrJava - CFBundleIdentifier - edu.rice.cs.drjava.DrJava - CFBundlePackageType - APPL - CFBundleShortVersionString - @VERSION@ - CFBundleSignature - DrJa - Java - - ClassPath - $JAVAROOT/drjava.jar - JVMVersion - 1.5+ - MainClass - edu.rice.cs.drjava.DrJava - Properties - - apple.laf.useScreenMenuBar - true - edu.rice.cs.drjava.icon - $APP_PACKAGE/Contents/Resources/DrJava.icns - - - CFBundleDocumentTypes - - - CFBundleTypeExtensions - - drjava - - CFBundleTypeName - DrJava Project File - CFBundleTypeRole - Editor - - - CFBundleTypeExtensions - - java - - CFBundleTypeName - Java Source File - CFBundleTypeRole - Editor - - - CFBundleTypeExtensions - - djapp - - CFBundleTypeName - DrJava Add-On File - CFBundleTypeRole - Editor - - - - diff --git a/drjava/packaging/mac/DrJava.app/Contents/MacOS/DrJava b/drjava/packaging/mac/DrJava.app/Contents/MacOS/DrJava deleted file mode 100755 index 985f0a213..000000000 Binary files a/drjava/packaging/mac/DrJava.app/Contents/MacOS/DrJava and /dev/null differ diff --git a/drjava/packaging/mac/DrJava.app/Contents/PkgInfo b/drjava/packaging/mac/DrJava.app/Contents/PkgInfo deleted file mode 100644 index 22a282c4c..000000000 --- a/drjava/packaging/mac/DrJava.app/Contents/PkgInfo +++ /dev/null @@ -1 +0,0 @@ -APPLDrJa \ No newline at end of file diff --git a/drjava/packaging/mac/DrJava.app/Contents/Resources/Java/DrJava.jar-goes-here b/drjava/packaging/mac/DrJava.app/Contents/Resources/Java/DrJava.jar-goes-here deleted file mode 100644 index e69de29bb..000000000 diff --git a/drjava/packaging/mac/DrJava.app/Contents/Resources/DrJava.icns b/drjava/packaging/mac/DrJava.icns similarity index 100% rename from drjava/packaging/mac/DrJava.app/Contents/Resources/DrJava.icns rename to drjava/packaging/mac/DrJava.icns diff --git a/drjava/src/edu/rice/cs/drjava/CommandLineTest.java b/drjava/src/edu/rice/cs/drjava/CommandLineTest.java index a2524f058..254da4c1e 100644 --- a/drjava/src/edu/rice/cs/drjava/CommandLineTest.java +++ b/drjava/src/edu/rice/cs/drjava/CommandLineTest.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; import javax.swing.text.BadLocationException; @@ -42,6 +34,7 @@ import java.io.IOException; import java.util.List; +import edu.rice.cs.drjava.DrJavaTestCase; import edu.rice.cs.drjava.model.OpenDefinitionsDocument; import edu.rice.cs.drjava.model.definitions.InvalidPackageException; import edu.rice.cs.drjava.ui.MainFrame; @@ -50,9 +43,10 @@ import edu.rice.cs.util.StringOps; import edu.rice.cs.util.swing.Utilities; -/** * Tests opening/creating files specified as command line arguments. - * @version $Id$ - */ +/** Tests opening/creating files specified as command line arguments. Does not use MultiThreadedTestCase because + * all JUnit assertXXX calls run in the main test thread. + * @version $Id$ + */ public final class CommandLineTest extends DrJavaTestCase { /** File separator, i.e. '/' or '\\'. */ private static final char FS = File.separatorChar; @@ -86,7 +80,6 @@ public final class CommandLineTest extends DrJavaTestCase { private volatile String f8_name; private volatile String f8_contents; - /** Files that do not exist (constructor deletes them), and their filenames. */ private volatile File nof1; private volatile File nof2; @@ -110,7 +103,6 @@ public final class CommandLineTest extends DrJavaTestCase { public void setUp() throws Exception { super.setUp(); -// _log.log("INVOKing DrJava._initConfig() for " + this); // Perform Swing initialization in event thread because the event thread is already running Utilities.invokeAndWait(new Runnable() { public void run() { diff --git a/drjava/src/edu/rice/cs/drjava/ConfigFileTest.java b/drjava/src/edu/rice/cs/drjava/ConfigFileTest.java index 821532061..9eca65761 100644 --- a/drjava/src/edu/rice/cs/drjava/ConfigFileTest.java +++ b/drjava/src/edu/rice/cs/drjava/ConfigFileTest.java @@ -1,43 +1,36 @@ /*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; import edu.rice.cs.drjava.config.FileConfiguration; import edu.rice.cs.drjava.config.OptionConstants; +import edu.rice.cs.drjava.DrJavaTestCase; import edu.rice.cs.util.swing.Utilities; import edu.rice.cs.plt.io.IOUtil; diff --git a/drjava/src/edu/rice/cs/drjava/DependenciesTest.java b/drjava/src/edu/rice/cs/drjava/DependenciesTest.java index 5a255b42d..700be1757 100644 --- a/drjava/src/edu/rice/cs/drjava/DependenciesTest.java +++ b/drjava/src/edu/rice/cs/drjava/DependenciesTest.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; import junit.framework.*; +import edu.rice.cs.drjava.DrJavaTestCase; /** Test that ensures all external dependencies are met! * @version $Id$ diff --git a/drjava/src/edu/rice/cs/drjava/DrJava.java b/drjava/src/edu/rice/cs/drjava/DrJava.java index a14e265d7..06ea49062 100644 --- a/drjava/src/edu/rice/cs/drjava/DrJava.java +++ b/drjava/src/edu/rice/cs/drjava/DrJava.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; import static edu.rice.cs.drjava.config.OptionConstants.*; @@ -554,7 +546,7 @@ protected static void _saveConfig() { // String selectedVersion = _getToolsJarVersion(selectedFile); // // final String[] text; -// if (selectedVersion==null) { +// if (selectedVersion == null) { // text = new String[] { // "The file you chose did not appear to be the correct 'tools.jar'", // "that is compatible with the version of Java that is used to", diff --git a/drjava/src/edu/rice/cs/drjava/DrJavaRestart.java b/drjava/src/edu/rice/cs/drjava/DrJavaRestart.java index c98405219..f597f58e2 100644 --- a/drjava/src/edu/rice/cs/drjava/DrJavaRestart.java +++ b/drjava/src/edu/rice/cs/drjava/DrJavaRestart.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; import edu.rice.cs.plt.concurrent.JVMBuilder; diff --git a/drjava/src/edu/rice/cs/drjava/DrJavaRoot.java b/drjava/src/edu/rice/cs/drjava/DrJavaRoot.java index c88562058..16526258b 100644 --- a/drjava/src/edu/rice/cs/drjava/DrJavaRoot.java +++ b/drjava/src/edu/rice/cs/drjava/DrJavaRoot.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; import java.awt.EventQueue; @@ -69,7 +61,7 @@ import static edu.rice.cs.plt.debug.DebugUtil.debug; /** Main class for DrJava. - * @version $Id: DrJavaRoot.java 5611 2012-07-25 15:03:33Z rcartwright $ + * @version $Id$ */ public class DrJavaRoot { /** Class to probe to see if the debugger is available */ @@ -134,7 +126,7 @@ public static void main(final String[] args) { PlasticLookAndFeel.setPlasticTheme(theme); PlasticLookAndFeel.setTabStyle(PlasticLookAndFeel.TAB_STYLE_METAL_VALUE); com.jgoodies.looks.Options.setPopupDropShadowEnabled(true); - if(! configLAFName.equals(currLAFName)) UIManager.setLookAndFeel(configLAFName); + if (! configLAFName.equals(currLAFName)) UIManager.setLookAndFeel(configLAFName); } catch(NoSuchMethodException nsmex) { JOptionPane.showMessageDialog(null, failureMessage, failureTitle, JOptionPane.ERROR_MESSAGE); } catch(SecurityException sex) { @@ -268,7 +260,7 @@ private static void _openCommandLineFiles(final MainFrame mf, String[] filesToOp }; try { if (isProjectFile) mf.openProject(command); - else if (currFileName.endsWith(OptionConstants.EXTPROCESS_FILE_EXTENSION)) MainFrame.openExtProcessFile(file); +// else if (currFileName.endsWith(OptionConstants.EXTPROCESS_FILE_EXTENSION)) MainFrame.openExtProcessFile(file); else { if (jump && (lineNo >= 0)) { /* if a line number has been specified, open the file using MainFrame.open and jump to lineNo using diff --git a/drjava/src/edu/rice/cs/drjava/DrJavaTestCase.java b/drjava/src/edu/rice/cs/drjava/DrJavaTestCase.java index 9b3e50077..e78079430 100644 --- a/drjava/src/edu/rice/cs/drjava/DrJavaTestCase.java +++ b/drjava/src/edu/rice/cs/drjava/DrJavaTestCase.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; import javax.swing.text.BadLocationException; @@ -52,7 +44,9 @@ */ public class DrJavaTestCase extends TestCase { /** Create a new DrJava test case. */ - public DrJavaTestCase() { super(); } + + /** Normal default constructor; required because unary constructor is declared below. */ + public DrJavaTestCase() { super(); } /** Create a new DrJava test case. * @param name name of the test case @@ -97,9 +91,9 @@ protected void setConfigSetting(final Option op, final T value) { } /** Clears the text of the _doc field and sets it to the given string. - * @param doc the document whose text should be set to "text" - * @param text the text to set - */ + * @param doc the document whose text should be set to "text" + * @param text the text to set + */ protected static final void setDocText(final AbstractDJDocument doc, final String text) { Utilities.invokeAndWait(new Runnable() { public void run() { diff --git a/drjava/src/edu/rice/cs/drjava/IndentFiles.java b/drjava/src/edu/rice/cs/drjava/IndentFiles.java index cdbc8abfa..6545e0cd6 100644 --- a/drjava/src/edu/rice/cs/drjava/IndentFiles.java +++ b/drjava/src/edu/rice/cs/drjava/IndentFiles.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; import java.io.*; diff --git a/drjava/src/edu/rice/cs/drjava/MainController.java b/drjava/src/edu/rice/cs/drjava/MainController.java index 08cd32b35..1132a3de4 100644 --- a/drjava/src/edu/rice/cs/drjava/MainController.java +++ b/drjava/src/edu/rice/cs/drjava/MainController.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; /** Main controller class for DrJava. This class sets up all of the appropriate cross-references between components at diff --git a/drjava/src/edu/rice/cs/drjava/RemoteControlClient.java b/drjava/src/edu/rice/cs/drjava/RemoteControlClient.java index b909205f7..3d24c553f 100644 --- a/drjava/src/edu/rice/cs/drjava/RemoteControlClient.java +++ b/drjava/src/edu/rice/cs/drjava/RemoteControlClient.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; import java.io.*; diff --git a/drjava/src/edu/rice/cs/drjava/RemoteControlServer.java b/drjava/src/edu/rice/cs/drjava/RemoteControlServer.java index 66878eb80..e66b30f90 100644 --- a/drjava/src/edu/rice/cs/drjava/RemoteControlServer.java +++ b/drjava/src/edu/rice/cs/drjava/RemoteControlServer.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; import edu.rice.cs.drjava.ui.MainFrame; diff --git a/drjava/src/edu/rice/cs/drjava/config/BinaryOpProperty.java b/drjava/src/edu/rice/cs/drjava/config/BinaryOpProperty.java index 88afefaa3..97485eacd 100644 --- a/drjava/src/edu/rice/cs/drjava/config/BinaryOpProperty.java +++ b/drjava/src/edu/rice/cs/drjava/config/BinaryOpProperty.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*/ diff --git a/drjava/src/edu/rice/cs/drjava/config/BooleanOption.java b/drjava/src/edu/rice/cs/drjava/config/BooleanOption.java index ffdae16f3..99f3e651e 100644 --- a/drjava/src/edu/rice/cs/drjava/config/BooleanOption.java +++ b/drjava/src/edu/rice/cs/drjava/config/BooleanOption.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*/ diff --git a/drjava/src/edu/rice/cs/drjava/config/BooleanOptionTest.java b/drjava/src/edu/rice/cs/drjava/config/BooleanOptionTest.java index 80e84d75a..c09541d10 100644 --- a/drjava/src/edu/rice/cs/drjava/config/BooleanOptionTest.java +++ b/drjava/src/edu/rice/cs/drjava/config/BooleanOptionTest.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*/ @@ -42,14 +35,11 @@ * the proper functionality of the class BooleanOption. * @version $Id$ */ -public final class BooleanOptionTest extends DrJavaTestCase -{ - /** @param name The name of this test case. - */ +public final class BooleanOptionTest extends DrJavaTestCase { + /** @param name The name of this test case. */ public BooleanOptionTest(String name) { super(name); } - public void testGetName() - { + public void testGetName() { BooleanOption bo1 = new BooleanOption("enable JUnit",null); BooleanOption bo2 = new BooleanOption("use menu icons",null); @@ -57,8 +47,7 @@ public void testGetName() assertEquals("use menu icons", bo2.getName()); } - public void testParse() - { + public void testParse() { BooleanOption bo = new BooleanOption("enable JUnit",null); assertEquals(Boolean.TRUE, bo.parse("true")); @@ -72,8 +61,7 @@ public void testParse() catch (OptionParseException e) { } } - public void testFormat() - { + public void testFormat() { BooleanOption bo1 = new BooleanOption("max_files",null); BooleanOption bo2 = new BooleanOption("indent_size",null); diff --git a/drjava/src/edu/rice/cs/drjava/config/ClassPathOption.java b/drjava/src/edu/rice/cs/drjava/config/ClassPathOption.java index 82e04fd92..029d1aeef 100644 --- a/drjava/src/edu/rice/cs/drjava/config/ClassPathOption.java +++ b/drjava/src/edu/rice/cs/drjava/config/ClassPathOption.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*/ diff --git a/drjava/src/edu/rice/cs/drjava/config/ColorOption.java b/drjava/src/edu/rice/cs/drjava/config/ColorOption.java index c54a52b31..8d96dcc28 100644 --- a/drjava/src/edu/rice/cs/drjava/config/ColorOption.java +++ b/drjava/src/edu/rice/cs/drjava/config/ColorOption.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*/ diff --git a/drjava/src/edu/rice/cs/drjava/config/ColorOptionTest.java b/drjava/src/edu/rice/cs/drjava/config/ColorOptionTest.java index 8e9211f44..d71642bb6 100644 --- a/drjava/src/edu/rice/cs/drjava/config/ColorOptionTest.java +++ b/drjava/src/edu/rice/cs/drjava/config/ColorOptionTest.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*/ diff --git a/drjava/src/edu/rice/cs/drjava/config/ConfigOptionListeners.java b/drjava/src/edu/rice/cs/drjava/config/ConfigOptionListeners.java index 6fe7cd8f5..3d84868e0 100644 --- a/drjava/src/edu/rice/cs/drjava/config/ConfigOptionListeners.java +++ b/drjava/src/edu/rice/cs/drjava/config/ConfigOptionListeners.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*/ @@ -512,7 +505,7 @@ public static void sanitizeJavadocCustomParams(JFrame parent, String[] params = value.split("(-private|-protected|-package|-public)"); sb = new StringBuilder(); for(int i = 0; i < params.length; i++) { - if(!params[i].trim().equals("")) { sb.append(params[i].trim()); sb.append(' '); } + if (!params[i].trim().equals("")) { sb.append(params[i].trim()); sb.append(' '); } } DrJava.getConfig().setSetting(JAVADOC_CUSTOM_PARAMS, sb.toString().trim()); } diff --git a/drjava/src/edu/rice/cs/drjava/config/ConfigProperty.java b/drjava/src/edu/rice/cs/drjava/config/ConfigProperty.java index 4a9be6810..a7b4a1cf9 100644 --- a/drjava/src/edu/rice/cs/drjava/config/ConfigProperty.java +++ b/drjava/src/edu/rice/cs/drjava/config/ConfigProperty.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*/ diff --git a/drjava/src/edu/rice/cs/drjava/config/Configuration.java b/drjava/src/edu/rice/cs/drjava/config/Configuration.java index 48b3e2c47..5b611a928 100644 --- a/drjava/src/edu/rice/cs/drjava/config/Configuration.java +++ b/drjava/src/edu/rice/cs/drjava/config/Configuration.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.config; import java.io.StringWriter; @@ -75,24 +67,24 @@ public T setSetting(final Option op, final T value) { } /** Gets the current value of the given Option. - * @param type of the option - * @param op option to get - * @return the value for the option - */ + * @param type of the option + * @param op option to get + * @return the value for the option + */ public T getSetting(Option op) { return map.getOption(op); } /** By default, all options are editable. - * @param type of the option - * @param op option to check editability of - * @return true if op is editable, false otherwise - */ + * @param type of the option + * @param op option to check editability of + * @return true if op is editable, false otherwise + */ public boolean isEditable(Option op) { return true; } /** Adds an OptionListener to the given Option, to be notified each time the option changes. - * @param type of the option - * @param op Option to listen for changes on - * @param l OptionListener wishing to listen - */ + * @param type of the option + * @param op Option to listen for changes on + * @param l OptionListener wishing to listen + */ public void addOptionListener(Option op, OptionListener l) { op.addListener(this,l); } /** Removes an OptionListener from an Option to which it was listening. diff --git a/drjava/src/edu/rice/cs/drjava/config/ConstantProperty.java b/drjava/src/edu/rice/cs/drjava/config/ConstantProperty.java index a5134ed92..fda8aceae 100644 --- a/drjava/src/edu/rice/cs/drjava/config/ConstantProperty.java +++ b/drjava/src/edu/rice/cs/drjava/config/ConstantProperty.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.config; import java.util.HashSet; diff --git a/drjava/src/edu/rice/cs/drjava/config/DefaultOptionMap.java b/drjava/src/edu/rice/cs/drjava/config/DefaultOptionMap.java index 415fc1cac..5f1b4c566 100644 --- a/drjava/src/edu/rice/cs/drjava/config/DefaultOptionMap.java +++ b/drjava/src/edu/rice/cs/drjava/config/DefaultOptionMap.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.config; import java.util.Vector; import edu.rice.cs.plt.iter.IterUtil; diff --git a/drjava/src/edu/rice/cs/drjava/config/DrJavaActionProperty.java b/drjava/src/edu/rice/cs/drjava/config/DrJavaActionProperty.java index 1aa537263..08aa649be 100644 --- a/drjava/src/edu/rice/cs/drjava/config/DrJavaActionProperty.java +++ b/drjava/src/edu/rice/cs/drjava/config/DrJavaActionProperty.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.config; /** Class representing actions that are executed as side effect of command line diff --git a/drjava/src/edu/rice/cs/drjava/config/DrJavaProperty.java b/drjava/src/edu/rice/cs/drjava/config/DrJavaProperty.java index 063f29863..a4ad3bc8a 100644 --- a/drjava/src/edu/rice/cs/drjava/config/DrJavaProperty.java +++ b/drjava/src/edu/rice/cs/drjava/config/DrJavaProperty.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.config; import java.util.Set; @@ -44,8 +36,8 @@ import edu.rice.cs.plt.lambda.Lambda; /** Class representing values that can be inserted as variables in external processes. - * @version $Id$ - */ + * @version $Id$ + */ public abstract class DrJavaProperty implements Cloneable { /** Whether the invalidation listening mechanism has been deactivated due to an error. */ public volatile boolean DEACTIVATED_DUE_TO_ERROR = false; @@ -65,9 +57,9 @@ public abstract class DrJavaProperty implements Cloneable { protected Set _listening = new HashSet(); /** Create a property. - * @param name the name of the property - * @param help the help page for this property - */ + * @param name the name of the property + * @param help the help page for this property + */ public DrJavaProperty(String name, String help) { if (name == null) { throw new IllegalArgumentException("DrJavaProperty name is null"); } _name = name; @@ -76,10 +68,10 @@ public DrJavaProperty(String name, String help) { } /** Create a property. - * @param name the name of the property - * @param value the value of the property - * @param help the help page for this property - */ + * @param name the name of the property + * @param value the value of the property + * @param help the help page for this property + */ public DrJavaProperty(String name, String value, String help) { this(name, help); if (value == null) { throw new IllegalArgumentException("DrJavaProperty value is null"); } @@ -92,8 +84,8 @@ public DrJavaProperty(String name, String value, String help) { public String getName() { return _name; } /** @param pm PropertyMaps used for substitution when replacing variables - * @return the value of the property. If it is not current, update first. - */ + * @return the value of the property. If it is not current, update first. + */ public String getCurrent(PropertyMaps pm) { if (!isCurrent()) { update(pm); @@ -142,9 +134,9 @@ public void setAttributes(HashMap attrs, Lambda re } /** @param key name of the attribute - * @return the specified attribute's value - * @throws IllegalArgumentException if attribute with specified key does not already exist in table - */ + * @return the specified attribute's value + * @throws IllegalArgumentException if attribute with specified key does not already exist in table + */ public String getAttribute(String key) { if (!_attributes.containsKey(key)) { throw new IllegalArgumentException("Attribute " + key + " not known to property " + _name); @@ -187,10 +179,8 @@ public DrJavaProperty listenToInvalidatesOf(DrJavaProperty other) { /** @return true if the specified property is equal to this one. */ public boolean equals(Object other) { if (other == null || other.getClass() != this.getClass()) return false; - DrJavaProperty o = (DrJavaProperty) other; return _name.equals(o._name); - } /** @return the hash code. name is never mutated remains constant, so its hash code can be used. */ diff --git a/drjava/src/edu/rice/cs/drjava/config/DrJavaPropertySetup.java b/drjava/src/edu/rice/cs/drjava/config/DrJavaPropertySetup.java index ebb4a48d3..2f0d142da 100644 --- a/drjava/src/edu/rice/cs/drjava/config/DrJavaPropertySetup.java +++ b/drjava/src/edu/rice/cs/drjava/config/DrJavaPropertySetup.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.config; import edu.rice.cs.util.StringOps; diff --git a/drjava/src/edu/rice/cs/drjava/config/DrJavaPropertySetupTest.java b/drjava/src/edu/rice/cs/drjava/config/DrJavaPropertySetupTest.java index 7490a7ced..1556b435b 100644 --- a/drjava/src/edu/rice/cs/drjava/config/DrJavaPropertySetupTest.java +++ b/drjava/src/edu/rice/cs/drjava/config/DrJavaPropertySetupTest.java @@ -1,6 +1,6 @@ /*BEGIN_COPYRIGHT_BLOCK * - * Copyright (c) 2001-2010, JavaPLT group at Rice University (javaplt@rice.edu) + * Copyright (c) 2001-2019, JavaPLT group at Rice University (javaplt@rice.edu) * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -36,7 +36,7 @@ package edu.rice.cs.drjava.config; -import edu.rice.cs.drjava.model.MultiThreadedTestCase; +import edu.rice.cs.drjava.DrJavaTestCase; import edu.rice.cs.drjava.DrJava; import edu.rice.cs.util.*; @@ -46,7 +46,7 @@ /** * Tests for the variables and language constructs that can be used in external processes. * @author Mathias Ricken */ -public class DrJavaPropertySetupTest extends MultiThreadedTestCase { +public class DrJavaPropertySetupTest extends DrJavaTestCase { public final String PS = File.pathSeparator; // path separator public final String FS = File.separator; // path separator public final String TMPDIR = System.getProperty("java.io.tmpdir")+ @@ -949,8 +949,8 @@ public void testMisc() throws CloneNotSupportedException { // process.separator p = pm.getProperty("Config","process.separator"); - // enclosing.djapp.file - p = pm.getProperty("Misc","enclosing.djapp.file"); +// // enclosing.djapp.file +// p = pm.getProperty("Misc","enclosing.djapp.file"); // drjava.file // during testing, this is the classes/base directory diff --git a/drjava/src/edu/rice/cs/drjava/config/EagerProperty.java b/drjava/src/edu/rice/cs/drjava/config/EagerProperty.java index ed81bf71b..797554009 100644 --- a/drjava/src/edu/rice/cs/drjava/config/EagerProperty.java +++ b/drjava/src/edu/rice/cs/drjava/config/EagerProperty.java @@ -1,59 +1,51 @@ /*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.config; /** Class representing values that are eagerly computed, so they are never stale. - * @version $Id$ - */ + * @version $Id$ + */ public abstract class EagerProperty extends DrJavaProperty { /** Create a property. - * @param name the name of the property - * @param help the help page for this property - */ + * @param name the name of the property + * @param help the help page for this property + */ public EagerProperty(String name, String help) { super(name, help); } /** Create a property. - * @param name the name of the property - * @param value the value of the property - * @param help the help page for this property - */ + * @param name the name of the property + * @param value the value of the property + * @param help the help page for this property + */ public EagerProperty(String name, String value, String help) { super(name, value, help); } diff --git a/drjava/src/edu/rice/cs/drjava/config/FileConfiguration.java b/drjava/src/edu/rice/cs/drjava/config/FileConfiguration.java index c55e7bb2a..d57ce778d 100644 --- a/drjava/src/edu/rice/cs/drjava/config/FileConfiguration.java +++ b/drjava/src/edu/rice/cs/drjava/config/FileConfiguration.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.config; import java.io.*; import edu.rice.cs.util.FileOps; diff --git a/drjava/src/edu/rice/cs/drjava/config/FileListProperty.java b/drjava/src/edu/rice/cs/drjava/config/FileListProperty.java index efd092505..7f82a9fde 100644 --- a/drjava/src/edu/rice/cs/drjava/config/FileListProperty.java +++ b/drjava/src/edu/rice/cs/drjava/config/FileListProperty.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.config; import edu.rice.cs.util.FileOps; diff --git a/drjava/src/edu/rice/cs/drjava/config/FileOption.java b/drjava/src/edu/rice/cs/drjava/config/FileOption.java index 311f0e811..526f93a31 100644 --- a/drjava/src/edu/rice/cs/drjava/config/FileOption.java +++ b/drjava/src/edu/rice/cs/drjava/config/FileOption.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.config; import java.io.*; diff --git a/drjava/src/edu/rice/cs/drjava/config/FileProperty.java b/drjava/src/edu/rice/cs/drjava/config/FileProperty.java index 8eae116a4..bd490803a 100644 --- a/drjava/src/edu/rice/cs/drjava/config/FileProperty.java +++ b/drjava/src/edu/rice/cs/drjava/config/FileProperty.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.config; import edu.rice.cs.plt.lambda.Thunk; diff --git a/drjava/src/edu/rice/cs/drjava/config/FontOption.java b/drjava/src/edu/rice/cs/drjava/config/FontOption.java index 97d7460bf..4b5f348b5 100644 --- a/drjava/src/edu/rice/cs/drjava/config/FontOption.java +++ b/drjava/src/edu/rice/cs/drjava/config/FontOption.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.config; import java.awt.Font; diff --git a/drjava/src/edu/rice/cs/drjava/config/FontOptionTest.java b/drjava/src/edu/rice/cs/drjava/config/FontOptionTest.java index d24d9fa27..3533ac6cb 100644 --- a/drjava/src/edu/rice/cs/drjava/config/FontOptionTest.java +++ b/drjava/src/edu/rice/cs/drjava/config/FontOptionTest.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.config; import edu.rice.cs.drjava.DrJavaTestCase; diff --git a/drjava/src/edu/rice/cs/drjava/config/ForcedChoiceOption.java b/drjava/src/edu/rice/cs/drjava/config/ForcedChoiceOption.java index 32f6e3b51..e552a66d0 100644 --- a/drjava/src/edu/rice/cs/drjava/config/ForcedChoiceOption.java +++ b/drjava/src/edu/rice/cs/drjava/config/ForcedChoiceOption.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.config; import java.util.Arrays; import java.util.Collection; diff --git a/drjava/src/edu/rice/cs/drjava/config/ForcedChoiceOptionTest.java b/drjava/src/edu/rice/cs/drjava/config/ForcedChoiceOptionTest.java index 20d7abf13..d1bed0778 100644 --- a/drjava/src/edu/rice/cs/drjava/config/ForcedChoiceOptionTest.java +++ b/drjava/src/edu/rice/cs/drjava/config/ForcedChoiceOptionTest.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.config; import edu.rice.cs.drjava.DrJavaTestCase; diff --git a/drjava/src/edu/rice/cs/drjava/config/FormatStrategy.java b/drjava/src/edu/rice/cs/drjava/config/FormatStrategy.java index b1682e998..0de2fae60 100644 --- a/drjava/src/edu/rice/cs/drjava/config/FormatStrategy.java +++ b/drjava/src/edu/rice/cs/drjava/config/FormatStrategy.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.config; /** The sheer ability to format something of type T to a String. The inverse of ParseStrategy. */ diff --git a/drjava/src/edu/rice/cs/drjava/config/IntegerOption.java b/drjava/src/edu/rice/cs/drjava/config/IntegerOption.java index 8d0c78f6f..5765132a2 100644 --- a/drjava/src/edu/rice/cs/drjava/config/IntegerOption.java +++ b/drjava/src/edu/rice/cs/drjava/config/IntegerOption.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.config; /** Class defining all configuration options with values of type Integer. diff --git a/drjava/src/edu/rice/cs/drjava/config/IntegerOptionTest.java b/drjava/src/edu/rice/cs/drjava/config/IntegerOptionTest.java index 1ac764dbb..fd511f301 100644 --- a/drjava/src/edu/rice/cs/drjava/config/IntegerOptionTest.java +++ b/drjava/src/edu/rice/cs/drjava/config/IntegerOptionTest.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.config; import edu.rice.cs.drjava.DrJavaTestCase; diff --git a/drjava/src/edu/rice/cs/drjava/config/JavaSystemProperty.java b/drjava/src/edu/rice/cs/drjava/config/JavaSystemProperty.java index 6feb28227..c3217283f 100644 --- a/drjava/src/edu/rice/cs/drjava/config/JavaSystemProperty.java +++ b/drjava/src/edu/rice/cs/drjava/config/JavaSystemProperty.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.config; /** Class representing values from the Java System properties that can be inserted as variables in external processes. diff --git a/drjava/src/edu/rice/cs/drjava/config/KeyStrokeOption.java b/drjava/src/edu/rice/cs/drjava/config/KeyStrokeOption.java index 02769493a..d4f911385 100644 --- a/drjava/src/edu/rice/cs/drjava/config/KeyStrokeOption.java +++ b/drjava/src/edu/rice/cs/drjava/config/KeyStrokeOption.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.config; import edu.rice.cs.drjava.platform.PlatformFactory; diff --git a/drjava/src/edu/rice/cs/drjava/config/KeyStrokeOptionTest.java b/drjava/src/edu/rice/cs/drjava/config/KeyStrokeOptionTest.java index 1bf0d28f5..f3f7e2903 100644 --- a/drjava/src/edu/rice/cs/drjava/config/KeyStrokeOptionTest.java +++ b/drjava/src/edu/rice/cs/drjava/config/KeyStrokeOptionTest.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.config; import edu.rice.cs.drjava.DrJavaTestCase; diff --git a/drjava/src/edu/rice/cs/drjava/config/LongOption.java b/drjava/src/edu/rice/cs/drjava/config/LongOption.java index b2fe9298b..d69601de3 100644 --- a/drjava/src/edu/rice/cs/drjava/config/LongOption.java +++ b/drjava/src/edu/rice/cs/drjava/config/LongOption.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.config; /** Class defining all configuration options with values of type Long. diff --git a/drjava/src/edu/rice/cs/drjava/config/LongOptionTest.java b/drjava/src/edu/rice/cs/drjava/config/LongOptionTest.java index 660341da2..6b5eec551 100644 --- a/drjava/src/edu/rice/cs/drjava/config/LongOptionTest.java +++ b/drjava/src/edu/rice/cs/drjava/config/LongOptionTest.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.config; import edu.rice.cs.drjava.DrJavaTestCase; diff --git a/drjava/src/edu/rice/cs/drjava/config/MutableFileProperty.java b/drjava/src/edu/rice/cs/drjava/config/MutableFileProperty.java index 114086a59..254ddc402 100644 --- a/drjava/src/edu/rice/cs/drjava/config/MutableFileProperty.java +++ b/drjava/src/edu/rice/cs/drjava/config/MutableFileProperty.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.config; import edu.rice.cs.plt.lambda.Thunk; diff --git a/drjava/src/edu/rice/cs/drjava/config/NonNegativeIntegerOption.java b/drjava/src/edu/rice/cs/drjava/config/NonNegativeIntegerOption.java index 88c393bda..581a9c6ec 100644 --- a/drjava/src/edu/rice/cs/drjava/config/NonNegativeIntegerOption.java +++ b/drjava/src/edu/rice/cs/drjava/config/NonNegativeIntegerOption.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.config; /** Class defining all configuration options with values of type NonNegativeInteger. diff --git a/drjava/src/edu/rice/cs/drjava/config/NonNegativeIntegerOptionTest.java b/drjava/src/edu/rice/cs/drjava/config/NonNegativeIntegerOptionTest.java index 30e449faf..2b3624fdf 100644 --- a/drjava/src/edu/rice/cs/drjava/config/NonNegativeIntegerOptionTest.java +++ b/drjava/src/edu/rice/cs/drjava/config/NonNegativeIntegerOptionTest.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.config; import edu.rice.cs.drjava.DrJavaTestCase; diff --git a/drjava/src/edu/rice/cs/drjava/config/Option.java b/drjava/src/edu/rice/cs/drjava/config/Option.java index ffe9d1f00..45dfc3694 100644 --- a/drjava/src/edu/rice/cs/drjava/config/Option.java +++ b/drjava/src/edu/rice/cs/drjava/config/Option.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.config; import edu.rice.cs.util.swing.Utilities; diff --git a/drjava/src/edu/rice/cs/drjava/config/OptionConstants.java b/drjava/src/edu/rice/cs/drjava/config/OptionConstants.java index e7b3ece76..2ba932770 100644 --- a/drjava/src/edu/rice/cs/drjava/config/OptionConstants.java +++ b/drjava/src/edu/rice/cs/drjava/config/OptionConstants.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.config; import java.io.File; @@ -87,8 +79,8 @@ public interface OptionConstants { /** The alternative extension for a DrJava project file */ public static final String PROJECT_FILE_EXTENSION2 = ".xml"; - /** The extension for stand-alone DrJava external process file. */ - public static final String EXTPROCESS_FILE_EXTENSION = ".djapp"; +// /** The extension for stand-alone DrJava external process file. */ +// public static final String EXTPROCESS_FILE_EXTENSION = ".djapp"; /** The extension for a Java source file */ public static final String JAVA_FILE_EXTENSION = ".java"; @@ -111,6 +103,8 @@ public interface OptionConstants { public static final int INTERMEDIATE_LEVEL = 2; public static final int ADVANCED_LEVEL = 3; public static final int FUNCTIONAL_JAVA_LEVEL = 4; + + /** LANGUAGE_LEVEL_EXTENSIONS includes legacy support for .dj0, .dj1, .dj2 files */ public static final String[] LANGUAGE_LEVEL_EXTENSIONS = new String[] { JAVA_FILE_EXTENSION, // = .java, do not include the dot OLD_DJ0_FILE_EXTENSION, // = .dj0 @@ -118,8 +112,8 @@ public interface OptionConstants { OLD_DJ2_FILE_EXTENSION, // = .dj2 DJ_FILE_EXTENSION }; // = .dj - /** The configuration XML file that DrJava looks for inside a .djapp file */ - public static final String EXTPROCESS_FILE_NAME_INSIDE_JAR = "process" + EXTPROCESS_FILE_EXTENSION; +// /** The configuration XML file that DrJava looks for inside a .djapp file */ +// public static final String EXTPROCESS_FILE_NAME_INSIDE_JAR = "process" + EXTPROCESS_FILE_EXTENSION; /** The extension for a text file */ public static final String TEXT_FILE_EXTENSION = ".txt"; @@ -242,8 +236,8 @@ public static Font getDefaultLineNumberFont() { else return Font.decode("Monospaced-12"); } public static Font getDefaultDocListFont() { - if (PlatformFactory.ONLY.isMacPlatform()) return Font.decode("Monaco-10"); - else return Font.decode("Monospaced-10"); + /* if (PlatformFactory.ONLY.isMacPlatform()) return Font.decode("Monaco-10"); + else */ return Font.decode("dialog-10"); } } @@ -255,7 +249,8 @@ public static Font getDefaultDocListFont() { public static final FontOption FONT_DOCLIST = new FontOption("font.doclist", DefaultFont.getDefaultDocListFont()); /** ToolBar buttons */ - public static final FontOption FONT_TOOLBAR = new FontOption("font.toolbar", Font.decode("dialog-10")); + public static final FontOption FONT_TOOLBAR = new FontOption("font.toolbar", Font.decode("dialog-12")); + public static final FontOption FONT_MENUBAR = new FontOption("font.menu", Font.decode("dialog-12")); /** Whether to draw anti-aliased text. (Slightly slower.) */ public static final BooleanOption TEXT_ANTIALIAS = new BooleanOption("text.antialias", Boolean.TRUE); @@ -308,7 +303,9 @@ static class LookAndFeels { /** @return the look-and-feel class name to use by default */ public static String getDefaultLookAndFeel() { if (PlatformFactory.ONLY.isMacPlatform()) - return UIManager.getSystemLookAndFeelClassName(); // Mac: Let the system decide. + return "javax.swing.plaf.nimbus.NimbusLookAndFeel"; + // TODO: fix this up to work with the proper look and feel -> Mac was causing problems +// return UIManager.getSystemLookAndFeelClassName(); // Mac: Let the system decide. else // Set CrossPlatform "Nimbus" LookAndFeel try { for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) @@ -325,7 +322,7 @@ public static String getDefaultLookAndFeel() { * @return the list of available look-and-feel classnames */ public static ArrayList getLookAndFeels() { - if(! _registered && ! PlatformFactory.ONLY.isMacPlatform()) { + if (! _registered && ! PlatformFactory.ONLY.isMacPlatform()) { for(String[] newLaf : _registerLAFs) { try { Class.forName(newLaf[1]); @@ -1250,17 +1247,16 @@ public static ArrayList evaluate() { static final String JAVADOC_1_3_TEXT = "1.3"; // deprecated static final String JAVADOC_1_4_TEXT = "1.4"; // deprecated static final String JAVADOC_1_5_TEXT = "1.5"; // deprecated - static final String JAVADOC_1_6_TEXT = "1.6"; - static final String JAVADOC_1_7_TEXT = "1.7"; + static final String JAVADOC_1_6_TEXT = "1.6"; + static final String JAVADOC_1_7_TEXT = "1.7"; static final String JAVADOC_1_8_TEXT = "1.8"; static final String JAVADOC_AUTO_TEXT = "use compiler version"; // for "Open Java API Javadoc" - static final String[] linkChoices = new String[]{ - JAVADOC_NONE_TEXT, JAVADOC_1_6_TEXT, JAVADOC_1_7_TEXT, JAVADOC_1_8_TEXT }; + static final String[] linkChoices = + new String[]{ JAVADOC_NONE_TEXT, JAVADOC_1_6_TEXT, JAVADOC_1_7_TEXT, JAVADOC_1_8_TEXT }; static final ArrayList linkVersionChoices = new ArrayList(Arrays.asList(linkChoices)); - static final String[] linkDeprecated = new String[]{ - JAVADOC_1_3_TEXT, JAVADOC_1_4_TEXT, JAVADOC_1_5_TEXT }; + static final String[] linkDeprecated = new String[]{JAVADOC_1_3_TEXT, JAVADOC_1_4_TEXT, JAVADOC_1_5_TEXT}; static final ArrayList linkVersionDeprecated = new ArrayList(Arrays.asList(linkDeprecated)); public static final StringOption JAVADOC_1_6_LINK = @@ -1278,20 +1274,20 @@ public static ArrayList evaluate() { JAVADOC_1_8_TEXT)), linkVersionChoices, linkVersionDeprecated); - static final String[] apiJavadocChoices = new String[] { - JAVADOC_1_6_TEXT, JAVADOC_1_7_TEXT, JAVADOC_1_8_TEXT, JAVADOC_AUTO_TEXT}; + static final String[] apiJavadocChoices = new String[] {JAVADOC_1_6_TEXT, JAVADOC_1_7_TEXT, JAVADOC_1_8_TEXT, JAVADOC_AUTO_TEXT}; static final ArrayList apiJavadocVersionChoices = new ArrayList(Arrays.asList(apiJavadocChoices)); - static final String[] apiJavadocDeprecated = new String[] { - JAVADOC_1_3_TEXT, JAVADOC_1_4_TEXT, JAVADOC_1_5_TEXT}; // deprecated, will be changed to JAVADOC_AUTO_TEXT + static final String[] apiJavadocDeprecated = + new String[] { JAVADOC_1_3_TEXT, JAVADOC_1_4_TEXT, JAVADOC_1_5_TEXT, }; // deprecated (changed to JAVADOC_AUTO_TEXT) - static final ArrayList apiJavadocVersionDeprecated = new ArrayList(Arrays.asList(apiJavadocDeprecated)); + static final ArrayList apiJavadocVersionDeprecated = + new ArrayList(Arrays.asList(apiJavadocDeprecated)); /** The version of Java to use for the "Open Java API Javadoc" feature. */ public static final ForcedChoiceOption JAVADOC_API_REF_VERSION = - new ForcedChoiceOption("javadoc.api.ref.version", JAVADOC_AUTO_TEXT, - apiJavadocVersionChoices, apiJavadocVersionDeprecated); + new ForcedChoiceOption("javadoc.api.ref.version", JAVADOC_AUTO_TEXT, apiJavadocVersionChoices, + apiJavadocVersionDeprecated); /** URL for JUnit javadocs. */ public static final StringOption JUNIT_LINK = @@ -1663,19 +1659,18 @@ public static ArrayList evaluate() { public static final BooleanOption DIALOG_OPENJAVADOC_STORE_POSITION = new BooleanOption("dialog.openjavadoc.store.position", Boolean.TRUE); - /** The last state of the "Auto Import" dialog. */ - public static final StringOption DIALOG_AUTOIMPORT_STATE = new StringOption("dialog.autoimport.state", "default"); - - /** Whether to save and restore window size and position at startUp/shutdown. */ - public static final BooleanOption DIALOG_AUTOIMPORT_STORE_POSITION = - new BooleanOption("dialog.autoimport.store.position", Boolean.TRUE); +// /** The last state of the "Auto Import" dialog. */ +// public static final StringOption DIALOG_AUTOIMPORT_STATE = new StringOption("dialog.autoimport.state", "default"); +// +// /** Whether to save and restore window size and position at startUp/shutdown. */ +// public static final BooleanOption DIALOG_AUTOIMPORT_STORE_POSITION = +// new BooleanOption("dialog.autoimport.store.position", Boolean.TRUE); /** Number of entries in the browser history (0 for unlimited). */ public static final NonNegativeIntegerOption BROWSER_HISTORY_MAX_SIZE = - new NonNegativeIntegerOption("browser.history.max.size", Integer.valueOf(50)); + new NonNegativeIntegerOption("browser.history.max.size", 10000); // exploting autoboxing - /** Whether to also list files with fully qualified paths. - */ + /** Whether to also list files with fully qualified paths. */ public static final BooleanOption DIALOG_GOTOFILE_FULLY_QUALIFIED = new BooleanOption("dialog.gotofile.fully.qualified", Boolean.FALSE); @@ -1766,10 +1761,10 @@ public static ArrayList evaluate() { public static final BooleanOption DRJAVA_USE_FORCE_QUIT = new BooleanOption("drjava.use.force.quit", Boolean.FALSE); - /** Whether to display the "Auto Import" dialog when an undefined class - * is encountered in the Interactions Pane. */ - public static final BooleanOption DIALOG_AUTOIMPORT_ENABLED = - new BooleanOption("dialog.autoimport.enabled", Boolean.TRUE); +// /** Whether to display the "Auto Import" dialog when an undefined class +// * is encountered in the Interactions Pane. */ +// public static final BooleanOption DIALOG_AUTOIMPORT_ENABLED = +// new BooleanOption("dialog.autoimport.enabled", Boolean.TRUE); /** Delay for following files. */ public static final NonNegativeIntegerOption FOLLOW_FILE_DELAY = @@ -1804,11 +1799,11 @@ public static ArrayList evaluate() { new StringOption("",""), new Vector()); - /** The script file (or "" if none) of saved external processes. */ - public static final VectorOption EXTERNAL_SAVED_ENCLOSING_DJAPP_FILES = - new VectorOption(EXTERNAL_SAVED_PREFIX + "enclosingdjappfiles", - new StringOption("",""), - new Vector()); +// /** The script file (or "" if none) of saved external processes. */ +// public static final VectorOption EXTERNAL_SAVED_ENCLOSING_DJAPP_FILES = +// new VectorOption(EXTERNAL_SAVED_PREFIX + "enclosingdjappfiles", +// new StringOption("",""), +// new Vector()); /** Notification of new versions. */ public static final ArrayList NEW_VERSION_NOTIFICATION_CHOICES = diff --git a/drjava/src/edu/rice/cs/drjava/config/OptionEvent.java b/drjava/src/edu/rice/cs/drjava/config/OptionEvent.java index 1fdc011e6..e93eae9ce 100644 --- a/drjava/src/edu/rice/cs/drjava/config/OptionEvent.java +++ b/drjava/src/edu/rice/cs/drjava/config/OptionEvent.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.config; /** @version $Id$ */ diff --git a/drjava/src/edu/rice/cs/drjava/config/OptionListener.java b/drjava/src/edu/rice/cs/drjava/config/OptionListener.java index bc88c182d..55492eb54 100644 --- a/drjava/src/edu/rice/cs/drjava/config/OptionListener.java +++ b/drjava/src/edu/rice/cs/drjava/config/OptionListener.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.config; /** @version $Id$ */ diff --git a/drjava/src/edu/rice/cs/drjava/config/OptionMap.java b/drjava/src/edu/rice/cs/drjava/config/OptionMap.java index 90be9c7db..05ec2b33b 100644 --- a/drjava/src/edu/rice/cs/drjava/config/OptionMap.java +++ b/drjava/src/edu/rice/cs/drjava/config/OptionMap.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.config; public interface OptionMap { diff --git a/drjava/src/edu/rice/cs/drjava/config/OptionMapLoader.java b/drjava/src/edu/rice/cs/drjava/config/OptionMapLoader.java index 02c0878a8..1390b57b7 100644 --- a/drjava/src/edu/rice/cs/drjava/config/OptionMapLoader.java +++ b/drjava/src/edu/rice/cs/drjava/config/OptionMapLoader.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.config; import edu.rice.cs.util.UnexpectedException; diff --git a/drjava/src/edu/rice/cs/drjava/config/OptionMapLoaderTest.java b/drjava/src/edu/rice/cs/drjava/config/OptionMapLoaderTest.java index 625664198..468bdfb18 100644 --- a/drjava/src/edu/rice/cs/drjava/config/OptionMapLoaderTest.java +++ b/drjava/src/edu/rice/cs/drjava/config/OptionMapLoaderTest.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.config; import java.io.*; diff --git a/drjava/src/edu/rice/cs/drjava/config/OptionParseException.java b/drjava/src/edu/rice/cs/drjava/config/OptionParseException.java index e03ceb243..ff0a2715c 100644 --- a/drjava/src/edu/rice/cs/drjava/config/OptionParseException.java +++ b/drjava/src/edu/rice/cs/drjava/config/OptionParseException.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.config; /** Exception indicating that an OptionParser could not parse the specified value for a given configurable option. diff --git a/drjava/src/edu/rice/cs/drjava/config/OptionParser.java b/drjava/src/edu/rice/cs/drjava/config/OptionParser.java index 35c75a44b..f0d67233d 100644 --- a/drjava/src/edu/rice/cs/drjava/config/OptionParser.java +++ b/drjava/src/edu/rice/cs/drjava/config/OptionParser.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.config; import java.util.HashMap; diff --git a/drjava/src/edu/rice/cs/drjava/config/ParseStrategy.java b/drjava/src/edu/rice/cs/drjava/config/ParseStrategy.java index 18d0485c7..844ddaf4e 100644 --- a/drjava/src/edu/rice/cs/drjava/config/ParseStrategy.java +++ b/drjava/src/edu/rice/cs/drjava/config/ParseStrategy.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.config; /** The sheer ability to parse a String into something of type T. The inverse of FormatStrategy. */ diff --git a/drjava/src/edu/rice/cs/drjava/config/PropertyMaps.java b/drjava/src/edu/rice/cs/drjava/config/PropertyMaps.java index 16aa8b648..28126bedf 100644 --- a/drjava/src/edu/rice/cs/drjava/config/PropertyMaps.java +++ b/drjava/src/edu/rice/cs/drjava/config/PropertyMaps.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.config; import edu.rice.cs.drjava.DrJava; diff --git a/drjava/src/edu/rice/cs/drjava/config/QuaternaryOpProperty.java b/drjava/src/edu/rice/cs/drjava/config/QuaternaryOpProperty.java index 24a0fd7af..d49b097f7 100644 --- a/drjava/src/edu/rice/cs/drjava/config/QuaternaryOpProperty.java +++ b/drjava/src/edu/rice/cs/drjava/config/QuaternaryOpProperty.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.config; import edu.rice.cs.plt.lambda.Lambda4; diff --git a/drjava/src/edu/rice/cs/drjava/config/RecursiveFileListProperty.java b/drjava/src/edu/rice/cs/drjava/config/RecursiveFileListProperty.java index def016345..0ef3e59f6 100644 --- a/drjava/src/edu/rice/cs/drjava/config/RecursiveFileListProperty.java +++ b/drjava/src/edu/rice/cs/drjava/config/RecursiveFileListProperty.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.config; import java.util.HashSet; diff --git a/drjava/src/edu/rice/cs/drjava/config/RecursiveFileListPropertyTest.java b/drjava/src/edu/rice/cs/drjava/config/RecursiveFileListPropertyTest.java index 63d656e93..fcf766146 100644 --- a/drjava/src/edu/rice/cs/drjava/config/RecursiveFileListPropertyTest.java +++ b/drjava/src/edu/rice/cs/drjava/config/RecursiveFileListPropertyTest.java @@ -1,7 +1,7 @@ package edu.rice.cs.drjava.config; import junit.framework.TestCase; -import junit.framework.Assert; +import org.junit.Assert; import java.io.File; import java.io.FileFilter; diff --git a/drjava/src/edu/rice/cs/drjava/config/ResourceBundleConfiguration.java b/drjava/src/edu/rice/cs/drjava/config/ResourceBundleConfiguration.java index 521bb425e..79b1d5de6 100644 --- a/drjava/src/edu/rice/cs/drjava/config/ResourceBundleConfiguration.java +++ b/drjava/src/edu/rice/cs/drjava/config/ResourceBundleConfiguration.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.config; import java.util.ResourceBundle; @@ -65,7 +57,7 @@ public ResourceBundleConfiguration(String resourceBundleName, FileConfiguration _shadowed = shadowed; map = new OptionMap() { public T getOption(OptionParser o) { - if (o==null) return _shadowed.getOptionMap().getOption(o); + if (o == null) return _shadowed.getOptionMap().getOption(o); try { String str = _bundle.getString(o.getName()); return o.parse(str); // defined in resource bundle @@ -89,7 +81,7 @@ public T setOption(Option o, T val) { } public String getString(OptionParser o) { - if (o==null) return _shadowed.getOptionMap().getString(o); + if (o == null) return _shadowed.getOptionMap().getString(o); try { String str = _bundle.getString(o.getName()); return str; // defined in resource bundle @@ -101,7 +93,7 @@ public String getString(OptionParser o) { } public void setString(OptionParser o, String s) { - if (o==null) _shadowed.getOptionMap().setString(o, s); + if (o == null) _shadowed.getOptionMap().setString(o, s); try { _bundle.getString(o.getName()); return; // defined in resource bundle, can't be set @@ -113,7 +105,7 @@ public void setString(OptionParser o, String s) { } public T removeOption(OptionParser o) { - if (o==null) return _shadowed.getOptionMap().removeOption(o); + if (o == null) return _shadowed.getOptionMap().removeOption(o); try { _bundle.getString(o.getName()); return null; // defined in resource bundle, can't be removed @@ -143,7 +135,7 @@ public Iterable> keys() { * @param value New value for the option */ public T setSetting(final Option op, final T value) { - if (op==null) return _shadowed.setSetting(op, value); + if (op == null) return _shadowed.setSetting(op, value); try { _bundle.getString(op.getName()); return null; // defined in resource bundle, can't be set @@ -156,7 +148,7 @@ public T setSetting(final Option op, final T value) { /** Gets the current value of the given Option. */ public T getSetting(Option op) { - if (op==null) return _shadowed.getSetting(op); + if (op == null) return _shadowed.getSetting(op); try { String str = _bundle.getString(op.getName()); return op.parse(str); // defined in resource bundle @@ -169,7 +161,7 @@ public T getSetting(Option op) { /** Return true if the option is editable. If it was defined in the resource bundle, it is not editable. */ public boolean isEditable(Option op) { - if (op==null) return _shadowed.isEditable(op); + if (op == null) return _shadowed.isEditable(op); try { _bundle.getString(op.getName()); return false; // defined, not editable diff --git a/drjava/src/edu/rice/cs/drjava/config/SavableConfiguration.java b/drjava/src/edu/rice/cs/drjava/config/SavableConfiguration.java index 7ce289775..45ffd89d1 100644 --- a/drjava/src/edu/rice/cs/drjava/config/SavableConfiguration.java +++ b/drjava/src/edu/rice/cs/drjava/config/SavableConfiguration.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.config; import java.io.*; diff --git a/drjava/src/edu/rice/cs/drjava/config/SavableConfigurationTest.java b/drjava/src/edu/rice/cs/drjava/config/SavableConfigurationTest.java index b65ea8fc9..9b02f438c 100644 --- a/drjava/src/edu/rice/cs/drjava/config/SavableConfigurationTest.java +++ b/drjava/src/edu/rice/cs/drjava/config/SavableConfigurationTest.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.config; import edu.rice.cs.drjava.DrJavaTestCase; diff --git a/drjava/src/edu/rice/cs/drjava/config/StringOption.java b/drjava/src/edu/rice/cs/drjava/config/StringOption.java index c0cdf769d..d860cf842 100644 --- a/drjava/src/edu/rice/cs/drjava/config/StringOption.java +++ b/drjava/src/edu/rice/cs/drjava/config/StringOption.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.config; /** Class representing all configuration options with values of type String. diff --git a/drjava/src/edu/rice/cs/drjava/config/StringOptionTest.java b/drjava/src/edu/rice/cs/drjava/config/StringOptionTest.java index 71f152489..0619c73e3 100644 --- a/drjava/src/edu/rice/cs/drjava/config/StringOptionTest.java +++ b/drjava/src/edu/rice/cs/drjava/config/StringOptionTest.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.config; import edu.rice.cs.drjava.DrJavaTestCase; diff --git a/drjava/src/edu/rice/cs/drjava/config/TernaryOpProperty.java b/drjava/src/edu/rice/cs/drjava/config/TernaryOpProperty.java index 6b3b18bc6..63ad16bb3 100644 --- a/drjava/src/edu/rice/cs/drjava/config/TernaryOpProperty.java +++ b/drjava/src/edu/rice/cs/drjava/config/TernaryOpProperty.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.config; import edu.rice.cs.plt.lambda.Lambda3; diff --git a/drjava/src/edu/rice/cs/drjava/config/UnaryOpProperty.java b/drjava/src/edu/rice/cs/drjava/config/UnaryOpProperty.java index 528ffce56..e772b5593 100644 --- a/drjava/src/edu/rice/cs/drjava/config/UnaryOpProperty.java +++ b/drjava/src/edu/rice/cs/drjava/config/UnaryOpProperty.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.config; import edu.rice.cs.plt.lambda.Lambda; diff --git a/drjava/src/edu/rice/cs/drjava/config/VariableProperty.java b/drjava/src/edu/rice/cs/drjava/config/VariableProperty.java index 1d2f4647a..774fc370e 100644 --- a/drjava/src/edu/rice/cs/drjava/config/VariableProperty.java +++ b/drjava/src/edu/rice/cs/drjava/config/VariableProperty.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.config; /** Class representing user-defined variables that can be inserted as variables in external processes. diff --git a/drjava/src/edu/rice/cs/drjava/config/VectorOption.java b/drjava/src/edu/rice/cs/drjava/config/VectorOption.java index b043083b0..3a32ea7bb 100644 --- a/drjava/src/edu/rice/cs/drjava/config/VectorOption.java +++ b/drjava/src/edu/rice/cs/drjava/config/VectorOption.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.config; import java.util.Vector; diff --git a/drjava/src/edu/rice/cs/drjava/config/VectorOptionTest.java b/drjava/src/edu/rice/cs/drjava/config/VectorOptionTest.java index b56ad6523..39422e45f 100644 --- a/drjava/src/edu/rice/cs/drjava/config/VectorOptionTest.java +++ b/drjava/src/edu/rice/cs/drjava/config/VectorOptionTest.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.config; import edu.rice.cs.drjava.DrJavaTestCase; diff --git a/drjava/src/edu/rice/cs/drjava/model/AbstractDJDocument.java b/drjava/src/edu/rice/cs/drjava/model/AbstractDJDocument.java index 8b5814d89..cc3e9b19c 100644 --- a/drjava/src/edu/rice/cs/drjava/model/AbstractDJDocument.java +++ b/drjava/src/edu/rice/cs/drjava/model/AbstractDJDocument.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; @@ -93,8 +85,8 @@ public abstract class AbstractDJDocument extends SwingDocument implements DJDocu /** A set of normal endings for lines. */ protected static final HashSet _normEndings = _makeNormEndings(); /** A set of Java keywords. */ - protected final HashSet _keywords = new HashSet - (edu.rice.cs.drjava.model.compiler.JavacCompiler.JAVA_KEYWORDS); + protected final HashSet _keywords = + new HashSet(edu.rice.cs.drjava.model.compiler.JavacCompiler.JAVA_KEYWORDS); /** A set of Java primitive types. */ protected static final HashSet _primTypes = _makePrimTypes(); /** The default indent setting. */ @@ -110,9 +102,6 @@ public abstract class AbstractDJDocument extends SwingDocument implements DJDocu /*-------- FIELDS ----------*/ -// /** Whether a block indent operation is in progress on this document. */ -// private volatile boolean _indentInProgress = false; - /** The reduced model of the document (stored in field _reduced) handles most of the document logic and keeps * track of state. This field together with _currentLocation function as a virtual object for purposes of * synchronization. All operations that access or modify this virtual object should be synchronized on _reduced. @@ -143,22 +132,18 @@ public abstract class AbstractDJDocument extends SwingDocument implements DJDocu /*-------- CONSTRUCTORS --------*/ /** Constructor used in super calls from DefinitionsDocument and InteractionsDJDocument. */ - protected AbstractDJDocument() { - this(new Indenter(DrJava.getConfig().getSetting(INDENT_INC).intValue())); - } + protected AbstractDJDocument() { this(new Indenter(DrJava.getConfig().getSetting(INDENT_INC).intValue())); } /** Constructor used from anonymous test classes. * @param indentLevel the indentation level */ - protected AbstractDJDocument(int indentLevel) { - this(new Indenter(indentLevel)); - } + protected AbstractDJDocument(int indentLevel) { this(new Indenter(indentLevel)); } /** Constructor used to build a new document with an existing indenter. - * Used in tests and super calls from DefinitionsDocument and - * interactions documents. - * @param indenter the indenter to use for this document - */ + * Used in tests and super calls from DefinitionsDocument and + * interactions documents. + * @param indenter the indenter to use for this document + */ protected AbstractDJDocument(Indenter indenter) { _indenter = indenter; _queryCache = null; @@ -1062,7 +1047,7 @@ private void _indentBlock(final int start, final int end, Indenter.IndentReason final Position endPos = this.createUnwrappedPosition(end); // Iterate, line by line, until we get to/past the end int walker = start; -// _indentInProgress = true; + while (walker < endPos.getOffset()) { setCurrentLocation(walker); // Keep pointer to walker position that will stay current regardless of how indentLine changes things @@ -1082,7 +1067,6 @@ private void _indentBlock(final int start, final int end, Indenter.IndentReason // Adding 1 makes us point to the first character AFTER the next newline. We don't actually move the // location yet. That happens at the top of the loop, after we check if we're past the end. walker += _reduced.getDistToNextNewline() + 1; -// _indentInProgress = false; } // disable the query cache diff --git a/drjava/src/edu/rice/cs/drjava/model/AbstractDJDocumentTest.java b/drjava/src/edu/rice/cs/drjava/model/AbstractDJDocumentTest.java index a22fb866b..bf9087d63 100644 --- a/drjava/src/edu/rice/cs/drjava/model/AbstractDJDocumentTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/AbstractDJDocumentTest.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/AbstractGlobalModel.java b/drjava/src/edu/rice/cs/drjava/model/AbstractGlobalModel.java index 9738ae53d..6f9ffdb70 100644 --- a/drjava/src/edu/rice/cs/drjava/model/AbstractGlobalModel.java +++ b/drjava/src/edu/rice/cs/drjava/model/AbstractGlobalModel.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.awt.Color; import java.awt.Container; @@ -160,7 +152,7 @@ /** In simple terms, a DefaultGlobalModel without an interpreter, compiler, junit testing, debugger or javadoc. * Hence, it only has only document handling functionality - * @version $Id: AbstractGlobalModel.java 5553 2012-05-01 17:28:45Z rcartwright $ + * @version $Id$ */ public class AbstractGlobalModel implements SingleDisplayModel, OptionConstants, DocumentIterator { @@ -308,15 +300,11 @@ private void _init() { final NodeDataVisitor _gainVisitor = new NodeDataVisitor() { public Boolean itemCase(OpenDefinitionsDocument doc, Object... p) { - _setActiveDoc(doc); // sets _activeDocument, the shadow copy of the active document -// addToBrowserHistory(); - + _setActiveDoc(doc); // sets _activeDocument, the shadow copy of the active document // Utilities.showDebug("Setting the active doc done"); final File oldDir = _activeDirectory; // _activeDirectory can be null final File dir = doc.getParentDirectory(); // dir can be null if (dir != null && ! dir.equals(oldDir)) { - /* If the file is in External or Auxiliary Files then then we do not want to change our project directory - * to something outside the project. ?? */ _activeDirectory = dir; _notifier.currentDirectoryChanged(_activeDirectory); } @@ -376,7 +364,8 @@ public void optionChanged(OptionEvent oce) { // ----- STATE ----- - /** Specifies the state of the navigator pane. The global model delegates the compileAll command to the _state. + /** Specifies the state of the navigator pane. + * The global model delegates the compileAll command to the _state. * FileGroupingState synchronization is handled by the compilerModel (??). */ protected volatile FileGroupingState _state; @@ -746,7 +735,7 @@ public void remAuxFile(File file) { } public void addExcludedFile(File f) { - if(f == null) return; + if (f == null) return; if (isAlreadyOpen(f)) return; // can't add files to the black list that are currently open synchronized(_exclFiles) { if (_exclFiles.add(f)) setProjectChanged(true); @@ -757,7 +746,7 @@ public void removeExcludedFile(File f) { synchronized(_exclFiles) { for(int i = 0;i < _exclFiles.size();i++) { try { - if(_exclFiles.get(i).getCanonicalPath().equals(f.getCanonicalPath())) { + if (_exclFiles.get(i).getCanonicalPath().equals(f.getCanonicalPath())) { _exclFiles.remove(i); setProjectChanged(true); } @@ -770,7 +759,7 @@ public void removeExcludedFile(File f) { public File[] getExclFiles() { return _exclFiles.toArray(new File[_exclFiles.size()]); } public void setExcludedFiles(File[] fs) { - if(fs == null) return; + if (fs == null) return; synchronized(_exclFiles) { _exclFiles.clear(); for(File f: fs) { addExcludedFile(f); } @@ -1002,10 +991,10 @@ public File getWorkingDirectory() { return prefWorkDir; } - // otherwise determine the working directory based on the source root + // otherwise determine the working directory based on the source root of current document File file = FileOps.NULL_FILE; try { - file = getActiveDocument().getSourceRoot(); // source root of the current document + file = getActiveDocument().getSourceRoot(); } catch(InvalidPackageException ipe) { file = FileOps.NULL_FILE; } if ((file != null) && (file != FileOps.NULL_FILE)) { @@ -1256,37 +1245,33 @@ public OpenDefinitionsDocument newTestCase(String name, boolean makeSetUp, boole final StringBuilder buf = new StringBuilder(); if (! elementary) buf.append("import junit.framework.TestCase;\n\n"); - buf.append("/**\n"); - buf.append("* A JUnit test case class.\n"); - buf.append("* Every method starting with the word \"test\" will be called when running\n"); - buf.append("* the test with JUnit.\n"); - buf.append("*/\n"); + buf.append("/** A JUnit test case class.\n"); + buf.append(" * Every method starting with the word \"test\" will be called when running\n"); + buf.append(" * the test with JUnit.\n"); + buf.append(" */\n"); if (! elementary) buf.append("public "); buf.append("class "); buf.append(name); buf.append(" extends TestCase {\n\n"); if (makeSetUp) { - buf.append("/**\n"); - buf.append("* This method is called before each test method, to perform any common\n"); - buf.append("* setup if necessary.\n"); - buf.append("*/\n"); + buf.append("/** This method is called before each test method, to perform any common\n"); + buf.append(" * setup if necessary.\n"); + buf.append(" */\n"); if (! elementary) buf.append("public "); buf.append("void setUp() throws Exception {\n}\n\n"); } if (makeTearDown) { - buf.append("/**\n"); - buf.append("* This method is called after each test method, to perform any common\n"); - buf.append("* clean-up if necessary.\n"); - buf.append("*/\n"); + buf.append("/** This method is called after each test method, to perform any common\n"); + buf.append(" * clean-up if necessary.\n"); + buf.append(" */\n"); if (! elementary) buf.append("public "); buf.append("void tearDown() throws Exception {\n}\n\n"); } - buf.append("/**\n"); - buf.append("* A test method.\n"); - buf.append("* (Replace \"X\" with a name describing the test. You may write as\n"); - buf.append ("* many \"testSomething\" methods in this class as you wish, and each\n"); - buf.append("* one will be called when running JUnit over this class.)\n"); - buf.append("*/\n"); + buf.append("/** A test method.\n"); + buf.append(" * (Replace \"X\" with a name describing the test. You may write as\n"); + buf.append(" * many \"testSomething\" methods in this class as you wish, and each\n"); + buf.append(" * one will be called when running JUnit over this class.)\n"); + buf.append(" */\n"); if (! elementary) buf.append("public "); buf.append("void testX() {\n}\n\n"); buf.append("}\n"); @@ -1310,18 +1295,16 @@ public OpenDefinitionsDocument newTestCase(String name, boolean makeSetUp, boole //---------------------- Specified by ILoadDocuments ----------------------// - /** Open a file and add it to the pool of definitions documents. The provided - * file selector chooses a file, and on a successful open, the fileOpened() - * event is fired. This method also checks if there was previously a single - * unchanged, untitled document open, and if so, closes it after a - * successful opening. - * - * @param com a command pattern command that selects what file to open - * @return The open document, or null if unsuccessful - * @exception IOException if an IO operation fails - * @exception OperationCanceledException if the open was canceled - * @exception AlreadyOpenException if the file is already open - */ + /** Open a file and add it to the pool of definitions documents. The provided file selector chooses a file, and on a + * successful open, the fileOpened() event is fired. This method also checks if there was previously a single + * unchanged, untitled document open, and if so, closes it after a successful opening. + * + * @param com a command pattern command that selects what file to open + * @return The open document, or null if unsuccessful + * @exception IOException if an IO operation fails + * @exception OperationCanceledException if the open was canceled + * @exception AlreadyOpenException if the file is already open + */ public OpenDefinitionsDocument openFile(FileOpenSelector com) throws IOException, OperationCanceledException, AlreadyOpenException { // Close an untitled, unchanged document if it is the only one open @@ -1332,7 +1315,7 @@ public OpenDefinitionsDocument openFile(FileOpenSelector com) throws OpenDefinitionsDocument openedDoc = openFileHelper(com); if (closeUntitled) closeFileHelper(oldDoc); // Utilities.showDebug("DrJava has opened" + openedDoc + " and is setting it active"); -// addToBrowserHistory(); + addToBrowserHistory(); setActiveDocument(openedDoc); setProjectChanged(true); // Utilities.showDebug("active doc set; openFile returning"); @@ -1375,7 +1358,6 @@ public OpenDefinitionsDocument[] openFiles(FileOpenSelector com) OpenDefinitionsDocument[] openedDocs = openFilesHelper(com); if (openedDocs.length > 0) { if (closeUntitled) closeFileHelper(oldDoc); -// addToBrowserHistory(); setActiveDocument(openedDocs[0]); } return openedDocs; @@ -1419,7 +1401,7 @@ private OpenDefinitionsDocument[] _openFiles(File[] files) //always return last opened Doc retDocs.add(d); filesOpened.add(d); - if(_state.isExcludedFile(f)) + if (_state.isExcludedFile(f)) _state.removeExcludedFile(f); } catch (AlreadyOpenException aoe) { @@ -1458,7 +1440,7 @@ public void openFolder(File dir, boolean rec, String ext) debug.logStart(); final File[] sfiles = getFilesInFolder(dir, rec, ext); - if(sfiles == null) return; + if (sfiles == null) return; openFiles(new FileOpenSelector() { public File[] getFiles() { return sfiles; } }); if (sfiles.length > 0 && _state.inProjectPath(dir)) setProjectChanged(true); @@ -1469,7 +1451,7 @@ public void openFolder(File dir, boolean rec, String ext) /** @return the file extension for the "Open Folder..." command for the currently selected compiler. */ public String getOpenAllFilesInFolderExtension() { CompilerModel cm = getCompilerModel(); - if (cm==null) { + if (cm == null) { return OptionConstants.LANGUAGE_LEVEL_EXTENSIONS[DrJava.getConfig().getSetting(LANGUAGE_LEVEL)]; } else { @@ -1517,7 +1499,7 @@ public File[] getNewFilesInProject() { ArrayList files = new ArrayList(); File projRoot = _state.getProjectRoot(); - if(projRoot == null) + if (projRoot == null) return null; File[] allFiles; try { @@ -1527,7 +1509,7 @@ public File[] getNewFilesInProject() { catch(AlreadyOpenException e) { return null; } for(File f : allFiles) { - if(!isAlreadyOpen(f) && !_state.isExcludedFile(f)) { + if (!isAlreadyOpen(f) && !_state.isExcludedFile(f)) { files.add(f); } } @@ -1564,14 +1546,14 @@ protected void saveAllFilesHelper(FileSaveSelector com) throws IOException { boolean isProjActive = isProjectActive(); List docsToWrite = getOpenDefinitionsDocuments(); - while(docsToWrite.size() > 0) { + while (docsToWrite.size() > 0) { ArrayList readOnlyDocs = new ArrayList(); for (final OpenDefinitionsDocument doc: docsToWrite) { // getOpen... makes a copy // do not force Untitled document to be saved if projectActive() or unmodified if (doc.isUntitled() && (isProjActive || ! doc.isModifiedSinceSave())) continue; try { final File docFile = doc.getFile(); - if (docFile == null || !docFile.exists() || docFile.canWrite()) { + if (docFile == null || ! docFile.exists() || docFile.canWrite()) { // file is writable, save aboutToSaveFromSaveAll(doc); doc.saveFile(com); @@ -1698,11 +1680,11 @@ else if (doc.isAuxiliaryFile()) { // add build directory File bd = getBuildDirectory(); - if (bd != FileOps.NULL_FILE) builder.setBuildDirectory(bd); + if (bd != FileOps.NULL_FILE && bd != null) builder.setBuildDirectory(bd); // add working directory File wd = getWorkingDirectory(); // the value of the working directory to be stored in the project - if (wd != FileOps.NULL_FILE) builder.setWorkingDirectory(wd); + if (wd != FileOps.NULL_FILE && wd != null) builder.setWorkingDirectory(wd); // add jar main class String mainClass = getMainClass(); @@ -1751,7 +1733,7 @@ else if (doc.isAuxiliaryFile()) { */ public void saveProject(File file, HashMap info) throws IOException { // if file is read-only, ask if it should be made writable - if (file.exists() && !file.canWrite()) { + if (file.exists() && ! file.canWrite()) { File[] res = _notifier.filesReadOnly(new File[] {file}); for(File roFile: res) { FileOps.makeWritable(roFile); @@ -1763,11 +1745,6 @@ public void saveProject(File file, HashMap(); -// for (File f: builder.getAuxiliaryFiles()) { _auxiliaryFiles.add(f); } -// } - setFileGroupingState(makeProjectFileGroupingState(builder.getProjectRoot(), builder.getMainClass(), builder.getBuildDirectory(), builder.getWorkingDirectory(), file, builder.getSourceFiles(), builder.getAuxiliaryFiles(), @@ -1812,24 +1789,22 @@ public void reloadProject(File file, HashMap projFiles = new ArrayList(); DocFile active = null; @@ -2011,16 +1986,16 @@ public boolean accept(OpenDefinitionsDocument d) { public void autoRefreshProject() { openNewFilesInProject(); } /** Performs any needed operations on the model after project files have been - * closed. This method is not responsible for closing any files; both the - * files in the project and the project file have already been closed (by - * MainFrame._closeProject()). Resets interations unless suppressReset is - * true, which only happens when DrJava is quitting. - * - * @param suppressReset false if we want to reset the interactions pane; true otherwise - */ + * closed. This method is not responsible for closing any files; both the + * files in the project and the project file have already been closed (by + * MainFrame._closeProject()). Resets interations unless suppressReset is + * true, which only happens when DrJava is quitting. + * + * @param suppressReset false if we want to reset the interactions pane; true otherwise + */ public void closeProject(boolean suppressReset) { - setDocumentNavigator(new AWTContainerNavigatorFactory(). - makeListNavigator(getDocumentNavigator())); + IDocumentNavigator nav = getDocumentNavigator(); + setDocumentNavigator(new AWTContainerNavigatorFactory().makeListNavigator(nav)); setFileGroupingState(makeFlatFileGroupingState()); // remove previous listeners @@ -2336,7 +2311,7 @@ private OpenDefinitionsDocument getNextDocHelper(OpenDefinitionsDocument nextdoc // Note: verifyExists prompts user for location of the file if it is not found int rc = JOptionPane.showConfirmDialog(frame, "Files not found, continue to next document?", "Continue?", JOptionPane.YES_NO_OPTION); - if(rc==JOptionPane.NO_OPTION) + if (rc==JOptionPane.NO_OPTION) return null; // cannot find nextdoc; move on to next document return getNextDocument(nextdoc, frame); @@ -2690,19 +2665,15 @@ private File _getSourceFileFromPath(String fileName, File path) { } /** Add the current location to the browser history. Only runs in event thread. Assumes that doc is not null. */ - public void addToBrowserHistory() { - addToBrowserHistory(false); - } + public void addToBrowserHistory() { addToBrowserHistory(false); } - /** Add the current location to the browser history. Only runs in event thread. Assumes that doc is not null. + /** Add the current location (point region) to browser history. Only runs in event thread. Assumes doc is not null. * @param before true if the location should be inserted before the current region */ public void addToBrowserHistory(boolean before) { - assert EventQueue.isDispatchThread(); -// edu.rice.cs.drjava.ui.MainFrame.MFLOG.log("addToBrowserHistory()"); + _log.log("AbstractGlobalModel.addToBrowserHistory(" + before + ") called"); _notifier.updateCurrentLocationInDoc(); -// edu.rice.cs.drjava.ui.MainFrame.MFLOG.log("addToBrowserHistory: after updateCurrentLocationInDoc"); final OpenDefinitionsDocument doc = getActiveDocument(); -// assert doc != null && EventQueue.isDispatchThread(); + assert (doc != null && EventQueue.isDispatchThread()) || Utilities.TEST_MODE; Position startPos = null; Position endPos = null; @@ -2713,15 +2684,9 @@ public void addToBrowserHistory(boolean before) { } catch (BadLocationException ble) { throw new UnexpectedException(ble); } -// edu.rice.cs.drjava.ui.MainFrame.MFLOG.log("addToBrowserHistory: startPos = "+startPos.getOffset()); BrowserDocumentRegion r = new BrowserDocumentRegion(doc, startPos, endPos); - if (before) { - _browserHistoryManager.addBrowserRegionBefore(r, _notifier); - } - else { - _browserHistoryManager.addBrowserRegion(r, _notifier); - } -// edu.rice.cs.drjava.ui.MainFrame.MFLOG.log("addToBrowserHistory: "+_browserHistoryManager); + if (before) _browserHistoryManager.addBrowserRegionBefore(r, _notifier); + else _browserHistoryManager.addBrowserRegion(r, _notifier); } /** throws an UnsupportedOperationException */ @@ -2742,7 +2707,7 @@ public void updateSyntaxHighlighting() { /** A wrapper around a DefinitionsDocument or potential DefinitionsDocument (if it has been kicked out of the cache) * The GlobalModel interacts with DefinitionsDocuments through this wrapper.
- * This call was formerly called the DefinitionsDocumentHandler but was renamed (2004-Jun-8) to be more + * This class was formerly called the DefinitionsDocumentHandler but was renamed (2004-Jun-8) to be more * descriptive/intuitive. * * Note that this class has a natural ordering based on hashCode (with LexiName as a tiebreaker) that determines a @@ -2776,10 +2741,10 @@ class ConcreteOpenDefDoc implements OpenDefinitionsDocument { * project, this information is extracted from the project file eliminating the need to read every document file. * For non-project files, it is extracted from the text of the file. If there is an error, it is left as "". */ - protected volatile String _packageName = ""; + private volatile String _packageName = ""; /** The fully qualified name of the class with '.' converted to ' ' so that alphabetic ordering works properly. */ - protected volatile String _lexiName = ""; + private volatile String _lexiName = ""; private volatile DCacheAdapter _cacheAdapter; @@ -3495,11 +3460,10 @@ public boolean checkIfClassFileInSync() { } } - /** Returns the class file for this source document by searching the source - * roots of open documents, the system classpath, and the - * "extra.classpath ". Returns NULL_FILE if the class file could not be found. - * @return the class file for this source document - */ + /** Returns the class file for this source document by searching the source roots of open documents, the system + * classpath, and the "extra.classpath ". Returns NULL_FILE if the class file could not be found. + * @return the class file for this source document + */ private File _locateClassFile() { // TODO: define in terms of GlobalModel.getClassPath() @@ -3511,40 +3475,44 @@ private File _locateClassFile() { _log.log("_locateClassFile() failed for " + this + " because getQualifedClassName returned ClassNotFound"); return FileOps.NULL_FILE; /* No source class name */ } -// _log.log("In _locateClassFile, className = " + className); + _log.log("In _locateClassFile, className = " + className); String ps = System.getProperty("file.separator"); // replace periods with the System's file separator className = StringOps.replace(className, ".", ps); String fileName = className + ".class"; -// _log.log("In _locateClassFile, classfileName = " + fileName); + _log.log("In _locateClassFile, classfileName = " + fileName); // Check source root set (open files) ArrayList roots = new ArrayList(); -// _log.log("build directory = " + getBuildDirectory()); + File bd = getBuildDirectory(); - if (getBuildDirectory() != FileOps.NULL_FILE) roots.add(getBuildDirectory()); + _log.log("build directory = " + bd); - // Add the current document to the beginning of the roots list + // Place the build directory at the front of the roots list + if (bd != FileOps.NULL_FILE) roots.add(getBuildDirectory()); + + // Add the current document to the end (formerly beginning) of the roots list; in the command line class file + // layout, class files reside in same directory as corresponding source files. try { File root = getSourceRoot(); -// _log.log("Directory " + root + " added to list of source roots"); - roots.add(root); + _log.log("Directory " + root + " added to list of class file roots"); + if (! roots.contains(root)) roots.add(root); } catch (InvalidPackageException ipe) { try { -// _log.log(this + " has no source root, using parent directory instead"); + _log.log(this + " has no source root, using parent directory of this source document instead"); File root = getFile().getParentFile(); if (root != FileOps.NULL_FILE) { roots.add(root); -// _log.log("Added parent directory " + root + " to list of source roots"); + _log.log("Added parent directory " + root + " to list of class file roots"); } } catch(NullPointerException e) { throw new UnexpectedException(e); } catch(FileMovedException fme) { // Moved, but we'll add the old file to the set anyway - _log.log("File for " + this + "has moved; adding parent directory to list of roots"); + _log.log("File for " + this + "has moved; adding parent directory of this source document instead"); File root = fme.getFile().getParentFile(); if (root != FileOps.NULL_FILE) roots.add(root); } @@ -3552,11 +3520,11 @@ private File _locateClassFile() { File classFile = findFileInPaths(fileName, roots); if (classFile != FileOps.NULL_FILE) { -// _log.log("Found source file " + classFile + " for " + this); + _log.log("Found class file " + classFile + " for " + this); return classFile; } -// _log.log(this + " not found on path of source roots"); + _log.log(fileName + " not found on list of class file roots"); // Class not on source root set, check system classpath classFile = findFileInPaths(fileName, ReflectUtil.SYSTEM_CLASS_PATH); @@ -3669,8 +3637,6 @@ public void setCurrentLocation(int location) { /** Get the location of the cursor in the definitions according to the definitions document. */ public int getCurrentLocation() { return getDocument().getCurrentLocation(); } -// public boolean indentInProgress() { return getDocument().indentInProgress(); } - /** @return the caret position as set by the view. */ public int getCaretPosition() { return _caretPosition; } @@ -3813,13 +3779,15 @@ public void insertString(int offset, String str, AttributeSet a) throws BadLocat /** Decorator pattern for the definitions document. */ public CompoundUndoManager getUndoManager() { return getDocument().getUndoManager(); } - /** Gets start of line containing pos. */ + /** Gets start of line containing pos. NOTE: this method could be optimized to avoid concretizing a virtual + * document. */ public int _getLineStartPos(int pos) { DefinitionsDocument doc = getDocument(); return doc._getLineStartPos(pos); } - /** Gets end of line containing pos (line includes closing '\n'). */ + /** Gets end of line containing pos (line includes closing '\n'). NOTE: this method could be optimized to avoid + * concretizing a virtual document.*/ public int _getLineEndPos(int pos) { DefinitionsDocument doc = getDocument(); return doc._getLineEndPos(pos); diff --git a/drjava/src/edu/rice/cs/drjava/model/AlreadyOpenException.java b/drjava/src/edu/rice/cs/drjava/model/AlreadyOpenException.java index 17411e330..edfb5381d 100644 --- a/drjava/src/edu/rice/cs/drjava/model/AlreadyOpenException.java +++ b/drjava/src/edu/rice/cs/drjava/model/AlreadyOpenException.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.util.UnexpectedException; diff --git a/drjava/src/edu/rice/cs/drjava/model/BrowserDocumentRegion.java b/drjava/src/edu/rice/cs/drjava/model/BrowserDocumentRegion.java index 6e79bdbcd..0715b39f0 100644 --- a/drjava/src/edu/rice/cs/drjava/model/BrowserDocumentRegion.java +++ b/drjava/src/edu/rice/cs/drjava/model/BrowserDocumentRegion.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/BrowserHistoryManager.java b/drjava/src/edu/rice/cs/drjava/model/BrowserHistoryManager.java index 3632236b3..5a224f672 100644 --- a/drjava/src/edu/rice/cs/drjava/model/BrowserHistoryManager.java +++ b/drjava/src/edu/rice/cs/drjava/model/BrowserHistoryManager.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*/ @@ -45,10 +38,16 @@ /** Browser history manager for the entire model. Follows readers/writers locking protocol of EventNotifier. */ public class BrowserHistoryManager extends EventNotifier> { + /** Two regions are similar if they are in the same document and not more than DIFF_THRESHOLD lines apart. */ public static final int DIFF_THRESHOLD = 0; - /** List of regions. */ + /** List of regions. _pastRegions is a stack of the past regions (browse backward) with current region on top. + * _futureRegions is a stack of the future (browse forward) regions to be explored when the + * current region "pointer" is advanced. The top element of this stack is the first + * future region. + * Both lists can be empty before any document is viewed. ?? */ + private volatile ArrayDeque _pastRegions = new ArrayDeque(); private volatile ArrayDeque _futureRegions = new ArrayDeque(); @@ -62,15 +61,16 @@ public class BrowserHistoryManager extends EventNotifier 0) { - int size = _pastRegions.size() + _futureRegions.size(); - int diff = size - _maxSize; - for (int i = 0; i < diff; ++i) { - // always remove the element farthest away from the larger stack - remove(((_pastRegions.size()>_futureRegions.size())?_pastRegions:_futureRegions).getFirst()); - } + // Do nothing if maxsize is non-positive (typically zero) + if (_maxSize <= 0) return; + int size = _pastRegions.size() + _futureRegions.size(); + int diff = size - _maxSize; + for (int i = 0; i < diff; ++i) { + // always remove the element farthest away in the larger stack + ArrayDeque targetStack = + (_pastRegions.size() > _futureRegions.size()) ? _pastRegions : _futureRegions; + if (! targetStack.isEmpty()) removeLast(targetStack); } } - /** Remove the given StaticDocumentRegion from the manager. - * @param r the StaticDocumentRegion to be removed. + /** Remove the last region from the given stack and clean up. + * @param stack the non-empty ArrayDeque to be shrunk. + */ + public void removeLast(final ArrayDeque stack) { + assert ! stack.isEmpty(); + final BrowserDocumentRegion r = stack.getLast(); // r is region to be removed + stack.removeLast(); // removes r from stack + + OpenDefinitionsDocument doc = r.getDocument(); + doc.removeBrowserRegion(r); // removes r from its corresponding document + + // Notify listeners of this event + Utilities.invokeLater(new Runnable() { + public void run() { + _lock.startRead(); + try { for (RegionManagerListener l: _listeners) { l.regionRemoved(r); } } + finally { _lock.endRead(); } + } + }); + } + + /** Remove the given BrowserDocumentRegion from the manager and clean up. + * @param r the BrowserDocumentRegion to be removed. */ - public /* synchronized */ void remove(final BrowserDocumentRegion r) { + public void remove(final BrowserDocumentRegion r) { OpenDefinitionsDocument doc = r.getDocument(); if (!_pastRegions.remove(r)) _futureRegions.remove(r); + doc.removeBrowserRegion(r); + // Notify listeners of this event Utilities.invokeLater(new Runnable() { public void run() { @@ -161,55 +187,51 @@ public RegionSet getRegions() { return rs; } - /** Tells the manager to remove all regions. */ - public /* synchronized */ void clearBrowserRegions() { - while(_pastRegions.size()+_futureRegions.size() > 0) { - remove(((_pastRegions.size()>_futureRegions.size())?_pastRegions:_futureRegions).getFirst()); - } + /** Tells the manager to remove all regions from past and future stacks. */ + public void clearBrowserRegions() { + if (_futureRegions != null) while (! _futureRegions.isEmpty()) removeLast(_futureRegions); + if (_pastRegions != null) while (! _pastRegions.isEmpty()) removeLast(_pastRegions); } /** @return the current region or null if none selected */ - public BrowserDocumentRegion getCurrentRegion() { - if (_pastRegions.isEmpty()) return null; - return _pastRegions.peek(); - } + public BrowserDocumentRegion getCurrentRegion() { return _pastRegions.peek(); } // peek() returns null on empty - /** @return true if the current region is the first in the list, i.e. prevCurrentRegion is without effect */ - public /* synchronized */ boolean isCurrentRegionFirst() { return (_pastRegions.size() < 2); } + /** @return true if the current region is null or the first in _pastRegions, i.e., prevCurrentRegion is without effect */ + public boolean isCurrentRegionFirst() { return (_pastRegions.size() <= 1); } - /** @return true if the current region is the last in the list, i.e. nextCurrentRegion is without effect */ - public /* synchronized */ boolean isCurrentRegionLast() { return (_futureRegions.size() < 1); } + /** @return true if the current region is the last in the list, i.e., nextCurrentRegion is without effect */ + public boolean isCurrentRegionLast() { return (_futureRegions.isEmpty()); } - /** Make the region that is more recent the current region. - * @param notifier a GlobalEventNotifier - * @return new current region - */ - public /* synchronized */ BrowserDocumentRegion nextCurrentRegion(final GlobalEventNotifier notifier) { - if (isCurrentRegionLast()) return null; - _pastRegions.push(_futureRegions.pop()); + /** Move the region cursor forward. + * @param notifier a GlobalEventNotifier + * @return new current region + */ + public BrowserDocumentRegion nextCurrentRegion(final GlobalEventNotifier notifier) { + if (isCurrentRegionLast()) return null; // currentRegion may be null + BrowserDocumentRegion r = _futureRegions.pop(); // pre: _futureRegions has at least 1 element + _pastRegions.push(r); // post: _pastRegions has at least two elements notifier.browserChanged(); - return _pastRegions.peek(); + return r; } - /** Make the region that is less recent the current region. - * @return new current region - * @param notifier a GlobalEventNotifier - */ - public /* synchronized */ BrowserDocumentRegion prevCurrentRegion(final GlobalEventNotifier notifier) { - if (isCurrentRegionFirst()) return null; - _futureRegions.push(_pastRegions.pop()); + /** Move the region cursor backward if possible + * @return new current region + * @param notifier a GlobalEventNotifier + */ + public BrowserDocumentRegion prevCurrentRegion(final GlobalEventNotifier notifier) { + if (isCurrentRegionFirst()) return null; // currentRegion may be null + BrowserDocumentRegion r = _pastRegions.pop(); // post: _pastRegions has at least 1 element + _futureRegions.push(r); // post: _futureRegions has at least 1 element notifier.browserChanged(); - return _pastRegions.peek(); + return _pastRegions.getFirst(); // ! _pastRegions.isEmpty() } /** Set the maximum number of regions that can be stored in this manager. * @param size maximum number of regions, or 0 if no maximum */ - public /* synchronized */ void setMaximumSize(int size) { + public void setMaximumSize(int size) { _maxSize = size; - - // remove regions if necessary - shrinkManager(); + shrinkManager(); // remove regions if necessary } /** @return the maximum number of regions that can be stored in this manager. */ diff --git a/drjava/src/edu/rice/cs/drjava/model/ClassAndInterfaceFinder.java b/drjava/src/edu/rice/cs/drjava/model/ClassAndInterfaceFinder.java index 4cb860231..89d9d1371 100644 --- a/drjava/src/edu/rice/cs/drjava/model/ClassAndInterfaceFinder.java +++ b/drjava/src/edu/rice/cs/drjava/model/ClassAndInterfaceFinder.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/ClassAndInterfaceFinderTest.java b/drjava/src/edu/rice/cs/drjava/model/ClassAndInterfaceFinderTest.java index 6eaea59c1..86e7e95ee 100644 --- a/drjava/src/edu/rice/cs/drjava/model/ClassAndInterfaceFinderTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/ClassAndInterfaceFinderTest.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 edu.rice.cs.drjava.DrJavaTestCase; import java.io.Reader; diff --git a/drjava/src/edu/rice/cs/drjava/model/ClipboardHistoryModel.java b/drjava/src/edu/rice/cs/drjava/model/ClipboardHistoryModel.java index 5ab5211cc..4e77dccf7 100644 --- a/drjava/src/edu/rice/cs/drjava/model/ClipboardHistoryModel.java +++ b/drjava/src/edu/rice/cs/drjava/model/ClipboardHistoryModel.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/ClipboardHistoryModelTest.java b/drjava/src/edu/rice/cs/drjava/model/ClipboardHistoryModelTest.java index 295eac031..c40fd4a89 100644 --- a/drjava/src/edu/rice/cs/drjava/model/ClipboardHistoryModelTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/ClipboardHistoryModelTest.java @@ -1,7 +1,7 @@ package edu.rice.cs.drjava.model; import junit.framework.TestCase; -import junit.framework.Assert; +import org.junit.Assert; import java.util.List; diff --git a/drjava/src/edu/rice/cs/drjava/model/ConcreteRegionManager.java b/drjava/src/edu/rice/cs/drjava/model/ConcreteRegionManager.java index 229521453..cf19b439c 100644 --- a/drjava/src/edu/rice/cs/drjava/model/ConcreteRegionManager.java +++ b/drjava/src/edu/rice/cs/drjava/model/ConcreteRegionManager.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.awt.EventQueue; import java.io.File; @@ -61,9 +53,7 @@ public class ConcreteRegionManager extends EventNotifier> implements RegionManager { - /** Whether or not this manager should be notified if the underlying - * RegionSet detects a change in the underlying document. - */ + /** Whether this manager should be notified if the underlying RegionSet detects a change in the underlying document. */ private boolean _notifyOnSetChange = false; /** Mapping of documents to collections of regions. Primitive operations are thread safe. */ @@ -273,29 +263,23 @@ public Pair getRegionInterval(OpenDefinitionsDocument odd, int offset) { // return match; // last region in revHead was the best match // } - /** Returns the set of regions in the given document that overlap the - * specified interval [startOffset, endOffset), including degenerate - * regions [offset, offset) where [offset, offset] is a subset of - * (startOffset, endOffset). - * - * Assumes that all regions in the document are disjoint. Note: degenerate - * empty regions with form [offset, offset) vacuously satisfy this property. - * Only executes in the event thread. - * - * Note: this method could be implemented more cleanly using a - * revserseIterator on the headSet containing all regions preceding or - * equal to the selection. but this functionality was not added to TreeSet - * until Java 6.0. - * - * @param odd the document - * @param startOffset the left end of the specified interval - * @param endOffset the right end of the specified interval - * @return the {@code Collection} of regions overlapping the interval. - */ - public Collection getRegionsOverlapping(OpenDefinitionsDocument odd, - int startOffset, int endOffset) { + /** Returns the set of regions in the given document that overlap the specified interval [startOffset, endOffset), + * including degenerate regions [offset, offset) where [offset, offset] is a subset of (startOffset, endOffset). + * + * Assumes that all regions in the document are disjoint. Note: degenerate empty regions with form [offset, offset) + * vacuously satisfy this property. Only executes in the event thread. + * + * Note: this method could be implemented more cleanly using a revserseIterator on the headSet containing all regions + * preceding or equal to the selection. but this functionality was not added to TreeSet until Java 6.0. + * + * @param odd the document + * @param startOffset the left end of the specified interval + * @param endOffset the right end of the specified interval + * @return the {@code Collection} of regions overlapping the interval. + */ + public Collection getRegionsOverlapping(OpenDefinitionsDocument odd, int startOffset, int endOffset) { - /* */ assert Utilities.TEST_MODE || EventQueue.isDispatchThread(); + assert Utilities.TEST_MODE || EventQueue.isDispatchThread(); LinkedList result = new LinkedList(); if (startOffset == endOffset) return result; @@ -328,14 +312,10 @@ public void addRegion(final R region) { _documents.add(odd); docRegions = new RegionSet(); - /* - * If this wants to be notified on changes, then the RegionSet needs a - * reference to this so that it knows *who* to notify. - */ - if (this._notifyOnSetChange) { - @SuppressWarnings("unchecked") - ConcreteRegionManager thisRef = - (ConcreteRegionManager)this; + /* The RegionSet needs a reference to 'this' so 'this' is notified on changes. */ + if (this._notifyOnSetChange) { + @SuppressWarnings("unchecked") // What an ugly hack; the elements in ConcreteRegionManager have type R + ConcreteRegionManager thisRef = (ConcreteRegionManager)this; docRegions.setManager(thisRef); } @@ -432,16 +412,14 @@ public ArrayList getRegions() { return regions; } - /** @return all regions, in the form of DummyDocumentRegions */ + /** @return all regions, in the form of IRegions */ public ArrayList getFileRegions() { ArrayList regions = new ArrayList(); 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 tools = findLibraries(); + Iterable 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> 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> 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> map) private static void addIfFile(File f, JDKDescriptor c, Map> 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> 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 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 compile(List files, List /** @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 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 compile(List files, List classPath, + List sourcePath, File destination, + List 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 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 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 compile(List files, 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 pair = _model.getInteractionsModel().getVariableToString(name); - // System.out.println("pair==null? "+(pair==null)); + // System.out.println("pair == null? "+(pair == null)); val = pair.first(); type = pair.second(); @@ -1825,9 +1814,16 @@ private void _copyVariablesFromInterpreter() throws DebugException { } if ((val != null) && (!oldVal.equals(val))) { - try { _runningThread.frame(0).setValue(var, val); } - catch (InvalidTypeException e) { error.log("Can't set variable", e); } - catch (ClassNotLoadedException e) { error.log("Can't set variable", e); } + /* The following test was added after a NullPointerException was thrown with line coordinate = 1833 (after + * compensating for additonal comment lines). */ + if (_runningThread != null) { + try { _runningThread.frame(0).setValue(var, val); } + /* The (error != null) tests were added to work around NullPointerExceptions when either _runningThread + * or error is null. The latter appears impossible based on the static initialization block in DebugUtil + * and the definition of VoidLog.INSTANCE, so _runningThread is presumably null. */ + catch (InvalidTypeException e) { if (error != null) error.log("Can't set variable", e); } + catch (ClassNotLoadedException e) { if (error != null) error.log("Can't set variable", e); } + } } } catch (ClassNotLoadedException e) { /* just ignore -- val must be null anyway */ } diff --git a/drjava/src/edu/rice/cs/drjava/model/debug/jpda/JPDAStackData.java b/drjava/src/edu/rice/cs/drjava/model/debug/jpda/JPDAStackData.java index 1f5514bdb..60728aee6 100644 --- a/drjava/src/edu/rice/cs/drjava/model/debug/jpda/JPDAStackData.java +++ b/drjava/src/edu/rice/cs/drjava/model/debug/jpda/JPDAStackData.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.StackFrame; diff --git a/drjava/src/edu/rice/cs/drjava/model/debug/jpda/JPDAThreadData.java b/drjava/src/edu/rice/cs/drjava/model/debug/jpda/JPDAThreadData.java index a54becc6d..3d078e2a5 100644 --- a/drjava/src/edu/rice/cs/drjava/model/debug/jpda/JPDAThreadData.java +++ b/drjava/src/edu/rice/cs/drjava/model/debug/jpda/JPDAThreadData.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/PendingRequestManager.java b/drjava/src/edu/rice/cs/drjava/model/debug/jpda/PendingRequestManager.java index 9e598c5a6..4a6f1710c 100644 --- a/drjava/src/edu/rice/cs/drjava/model/debug/jpda/PendingRequestManager.java +++ b/drjava/src/edu/rice/cs/drjava/model/debug/jpda/PendingRequestManager.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/Step.java b/drjava/src/edu/rice/cs/drjava/model/debug/jpda/Step.java index 5d7987f90..a0c997664 100644 --- a/drjava/src/edu/rice/cs/drjava/model/debug/jpda/Step.java +++ b/drjava/src/edu/rice/cs/drjava/model/debug/jpda/Step.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.DrJava; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/ClassNameNotFoundException.java b/drjava/src/edu/rice/cs/drjava/model/definitions/ClassNameNotFoundException.java index a3c267aa2..5b5f64f87 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/ClassNameNotFoundException.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/ClassNameNotFoundException.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.definitions; /** * Exception indicating that a class name could not be found in diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/ColoringGlyphPainter.java b/drjava/src/edu/rice/cs/drjava/model/definitions/ColoringGlyphPainter.java index d5d1ab6dc..eeebac5c3 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/ColoringGlyphPainter.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/ColoringGlyphPainter.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.definitions; import javax.swing.text.*; @@ -191,7 +183,7 @@ public Shape modelToView(GlyphView v, int pos, Position.Bias bias, Shape a) thro TabExpander expander = v.getTabExpander(); Segment text; - if(pos == end) { + if (pos == end) { // The caller of this is left to right and borders a right to // left view, return our end location. return new Rectangle(alloc.x + alloc.width, alloc.y, 0, @@ -227,7 +219,7 @@ public int viewToModel(GlyphView v, float x, float y, Shape a, Position.Bias[] b int offs = Utilities.getTabbedTextOffset(text, _metrics, alloc.x, (int) x, expander, start); int retValue = start + offs; - if(retValue == end) { + if (retValue == end) { // No need to return backward bias as GlyphPainter1 is used for // ltr text only. retValue--; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/ColoringView.java b/drjava/src/edu/rice/cs/drjava/model/definitions/ColoringView.java index f64f5eb10..3c245433e 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/ColoringView.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/ColoringView.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.definitions; import javax.swing.text.*; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/CommentTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/CommentTest.java index b36a5c139..ad639bc41 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/CommentTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/CommentTest.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.definitions; import edu.rice.cs.drjava.DrJava; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/CompoundUndoManager.java b/drjava/src/edu/rice/cs/drjava/model/definitions/CompoundUndoManager.java index f8c715c2e..3af5359a0 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/CompoundUndoManager.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/CompoundUndoManager.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.definitions; import java.awt.EventQueue; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/DefinitionsDocument.java b/drjava/src/edu/rice/cs/drjava/model/definitions/DefinitionsDocument.java index fd71b8315..dcd838409 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/DefinitionsDocument.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/DefinitionsDocument.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.definitions; import java.awt.EventQueue; @@ -1256,7 +1248,7 @@ public Position createPosition(final int offset) throws BadLocationException { return wp; } - /** Remove all positions that have been garbage-collected from the list of positions, then return a weakly-linked + /** Remove all positions that have been garbage-collected from the list of positions, then returns a weakly-linked * hashmap with positions and their current offsets. * @return list of weak references to all positions that have been created and that have not been garbage-collected yet. */ @@ -1267,10 +1259,11 @@ public WeakHashMap getWrappedPositionOffsets() { WeakHashMap ret = new WeakHashMap(_wrappedPosList.size()); for (WeakReference wr: _wrappedPosList) { - if (wr.get() != null) { + WrappedPosition ref = wr.get(); // factored out of loop body that was unsafe because GC could happen! + if (ref != null) { // hasn't been garbage-collected yet newList.add(wr); - ret.put(wr.get(), wr.get().getOffset()); + ret.put(ref, ref.getOffset()); } } _wrappedPosList.clear(); @@ -1279,11 +1272,10 @@ public WeakHashMap getWrappedPositionOffsets() { } } - /** Re-create the wrapped positions in the hashmap, update the wrapped - * position, and add them to the list. - * @param whm weakly-linked hashmap of wrapped positions and their offsets - * @throws BadLocationException if attempts to reference an invalid location - */ + /** Re-create the wrapped positions in the hashmap, update the wrapped position, and add them to the list. + * @param whm weakly-linked hashmap of wrapped positions and their offsets + * @throws BadLocationException if attempts to reference an invalid location + */ public void setWrappedPositionOffsets(WeakHashMap whm) throws BadLocationException { synchronized(_wrappedPosListLock) { if (_wrappedPosList == null) { _wrappedPosList = new LinkedList>(); } diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/DefinitionsDocumentTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/DefinitionsDocumentTest.java index c282e4809..cd2dccb22 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/DefinitionsDocumentTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/DefinitionsDocumentTest.java @@ -1,43 +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.definitions; import edu.rice.cs.drjava.DrJava; -import edu.rice.cs.drjava.DrJavaTestCase; +import edu.rice.cs.drjava.model.MultiThreadedTestCase; import edu.rice.cs.drjava.config.OptionConstants; import edu.rice.cs.drjava.model.GlobalEventNotifier; import edu.rice.cs.drjava.model.definitions.reducedmodel.BraceReduction; @@ -55,7 +47,7 @@ /** Tests the functionality of the definitions document. * @version $Id$ */ -public final class DefinitionsDocumentTest extends DrJavaTestCase implements ReducedModelStates { +public final class DefinitionsDocumentTest extends MultiThreadedTestCase implements ReducedModelStates { private DefinitionsDocument _doc; private GlobalEventNotifier _notifier; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/DefinitionsEditorKit.java b/drjava/src/edu/rice/cs/drjava/model/definitions/DefinitionsEditorKit.java index a63185591..1306b2c34 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/DefinitionsEditorKit.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/DefinitionsEditorKit.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.definitions; import edu.rice.cs.drjava.ui.AbstractDJPane; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/DocumentClosedListener.java b/drjava/src/edu/rice/cs/drjava/model/definitions/DocumentClosedListener.java index c5ddfdac6..6c52ee9d3 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/DocumentClosedListener.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/DocumentClosedListener.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.definitions; /** This listener can be added to DefinitionsDocuments, and will be fired when the document is closing. */ diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/DocumentUIListener.java b/drjava/src/edu/rice/cs/drjava/model/definitions/DocumentUIListener.java index 4e9cb06a5..326b5accf 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/DocumentUIListener.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/DocumentUIListener.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.definitions; import javax.swing.event.DocumentListener; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/IndentHelperTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/IndentHelperTest.java index b3662a6c5..9933b458d 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/IndentHelperTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/IndentHelperTest.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.definitions; import javax.swing.text.BadLocationException; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/IndentTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/IndentTest.java index a48b84f82..815d888d1 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/IndentTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/IndentTest.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.definitions; import junit.framework.*; @@ -1111,7 +1103,7 @@ public void testNestedIfInSwitch() throws BadLocationException { "switch(cond) {\n" + "case 1:\n" + "object.doStuff();\n" + - "if(object.hasDoneStuff()) {\n" + + "if (object.hasDoneStuff()) {\n" + "thingy.doOtherStuff();\n" + "lion.roar(\"raaargh\");\n" + "}\n" + @@ -1122,7 +1114,7 @@ public void testNestedIfInSwitch() throws BadLocationException { "switch(cond) {\n" + " case 1:\n" + " object.doStuff();\n" + - " if(object.hasDoneStuff()) {\n" + + " if (object.hasDoneStuff()) {\n" + " thingy.doOtherStuff();\n" + " lion.roar(\"raaargh\");\n" + " }\n" + @@ -1325,7 +1317,7 @@ public void testAnnotationsAfterDefinition() throws BadLocationException { // "case 2:\n" + // "break;\n" + // "case 3:\n" + -// "if(owner.command() == ROLL_OVER) {\n" + +// "if (owner.command() == ROLL_OVER) {\n" + // "dog.rollOver();\n" + // "}\n" + // "break;\n" + @@ -1336,7 +1328,7 @@ public void testAnnotationsAfterDefinition() throws BadLocationException { // " case 2:\n" + // " break;\n" + // " case 3:\n" + -// " if(owner.command() == ROLL_OVER) {\n" + +// " if (owner.command() == ROLL_OVER) {\n" + // " dog.rollOver();\n" + // " }\n" + // " break;\n" + diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/InvalidPackageException.java b/drjava/src/edu/rice/cs/drjava/model/definitions/InvalidPackageException.java index 58bae6b09..724d90d53 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/InvalidPackageException.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/InvalidPackageException.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.definitions; /** * An exception thrown by DefinitionsDocument.getPackageName() when the diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/NoSuchDocumentException.java b/drjava/src/edu/rice/cs/drjava/model/definitions/NoSuchDocumentException.java index c69ba052f..e0c29db36 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/NoSuchDocumentException.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/NoSuchDocumentException.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.definitions; /** * This exception is to be thrown when an OpenDefinitionsDocument diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionBracePlus.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionBracePlus.java index e343ada95..165e41cf8 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionBracePlus.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionBracePlus.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.definitions.indent; import edu.rice.cs.drjava.model.AbstractDJDocument; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionBracePlusTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionBracePlusTest.java index f51457370..aadb2acce 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionBracePlusTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionBracePlusTest.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.definitions.indent; import javax.swing.text.BadLocationException; @@ -74,7 +66,7 @@ public void testNoSuffix() throws BadLocationException { } - public void xtestSpaceSuffix() throws BadLocationException { + public void testSpaceSuffix() throws BadLocationException { _action = new ActionBracePlus(1); // (2) diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionDoNothing.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionDoNothing.java index 245b338c2..b18f1fb21 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionDoNothing.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionDoNothing.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.definitions.indent; import edu.rice.cs.drjava.model.AbstractDJDocument; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionDoNothingTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionDoNothingTest.java index 367331b3d..f5733a334 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionDoNothingTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionDoNothingTest.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.definitions.indent; import javax.swing.text.BadLocationException; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartCurrStmtPlus.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartCurrStmtPlus.java index 7457928c4..2d2a405ce 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartCurrStmtPlus.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartCurrStmtPlus.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.definitions.indent; import edu.rice.cs.drjava.model.AbstractDJDocument; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevLinePlus.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevLinePlus.java index c9ac502e0..9a41b5a24 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevLinePlus.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevLinePlus.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.definitions.indent; import javax.swing.text.*; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevLinePlusMultiline.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevLinePlusMultiline.java index aabb2f6c5..056219777 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevLinePlusMultiline.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevLinePlusMultiline.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.definitions.indent; import javax.swing.text.*; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevLinePlusMultilinePreserve.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevLinePlusMultilinePreserve.java index 7b1f12175..dd6dc8d3c 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevLinePlusMultilinePreserve.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevLinePlusMultilinePreserve.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.definitions.indent; import javax.swing.text.*; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevLinePlusMultilinePreserveTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevLinePlusMultilinePreserveTest.java index 02ca90c85..9f8844dc5 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevLinePlusMultilinePreserveTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevLinePlusMultilinePreserveTest.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.definitions.indent; import javax.swing.text.BadLocationException; @@ -48,27 +40,27 @@ public class ActionStartPrevLinePlusMultilinePreserveTest extends IndentRulesTestCase { /** A factory method that constructs the specified instance of IndentRuleAction. - * @param suffices the new lines to be added - * @param cursorLine the line on which to place the cursor - * @param cursorPos the position at which to place the cursor - * @param psrvLine the line in suffices on which to place the preserved text - * @param psrvPos the position at which to place the preserved text - * @return a new ActinoStartPrevLinePlusMultilinePreserve object - * @see ActionStartPrevLinePlusMultilinePreserve#ActionStartPrevLinePlusMultilinePreserve(String[], int, int, int, int) - */ + * @param suffices the new lines to be added + * @param cursorLine the line on which to place the cursor + * @param cursorPos the position at which to place the cursor + * @param psrvLine the line in suffices on which to place the preserved text + * @param psrvPos the position at which to place the preserved text + * @return a new ActinoStartPrevLinePlusMultilinePreserve object + * @see ActionStartPrevLinePlusMultilinePreserve#ActionStartPrevLinePlusMultilinePreserve(String[], int, int, int, int) + */ private IndentRuleAction makeAction(String[] suffices, int cursorLine, int cursorPos, int psrvLine, int psrvPos) { return new ActionStartPrevLinePlusMultilinePreserve(suffices, cursorLine, cursorPos, psrvLine, psrvPos); } /** This method abstracts the common behavior in subsequent tests. - * @param start The text that should be in the document at time rule is called - * @param loc the location of the cursor when rule is called - * @param endLoc the expected final size of the document - * @param finish the text string that remaining after the rule is called - * @throws BadLocationException if attempts to reference an invalid location - */ - public void helperCommentTest(String start, int loc, int endLoc, String finish) throws BadLocationException { - _setDocText(start); + * @param text The text that should be in the document at time rule is called + * @param loc the location of the cursor when rule is called + * @param endLoc the expected final size of the document + * @param finish the text string that remaining after the rule is called + * @throws BadLocationException if attempts to reference an invalid location + */ + public void helperCommentTest(String text, int loc, int endLoc, String finish) throws BadLocationException { + _setDocText(text); _doc.setCurrentLocation(loc); makeAction(new String[]{" * \n", " */"},0,3,0,3).testIndentLine(_doc, Indenter.IndentReason.ENTER_KEY_PRESS); assertEquals(endLoc, _doc.getCurrentLocation()); @@ -159,17 +151,18 @@ public void test8() throws BadLocationException { "/* ABC \n * */\n */"); } + // This test has been excluded because it breaks and it is unintelligible. public void xtest9() throws BadLocationException { ///**| // * Text // */ //--------------------------------- ///**// * | -// * Text -// */ - helperCommentTest("/**\n * Text\n */", +// * Text +// */ + helperCommentTest("/**\n * Text\n */", 4, 7, - "/**\n * \n * Text\n */"); + "/**\n * Text\n */"); } public void test10() throws BadLocationException { diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevLinePlusTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevLinePlusTest.java index 1a21e7ed6..44c91b3ad 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevLinePlusTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevLinePlusTest.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.definitions.indent; /** Tests ActionStartPrevLinePlus(String) diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevStmtPlus.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevStmtPlus.java index 6067c7696..84089649e 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevStmtPlus.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevStmtPlus.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.definitions.indent; import edu.rice.cs.drjava.model.AbstractDJDocument; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevStmtPlusTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevStmtPlusTest.java index beb7e752c..92bc44956 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevStmtPlusTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartPrevStmtPlusTest.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.definitions.indent; import javax.swing.text.BadLocationException; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartStmtOfBracePlus.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartStmtOfBracePlus.java index e2c96e3e2..cde02acca 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartStmtOfBracePlus.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartStmtOfBracePlus.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.definitions.indent; import edu.rice.cs.drjava.model.AbstractDJDocument; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartStmtOfBracePlusTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartStmtOfBracePlusTest.java index a02a18fda..0f5023b02 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartStmtOfBracePlusTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/ActionStartStmtOfBracePlusTest.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.definitions.indent; import javax.swing.text.BadLocationException; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/IndentRule.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/IndentRule.java index 9b7cfda48..1573fd704 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/IndentRule.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/IndentRule.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.definitions.indent; import edu.rice.cs.drjava.model.AbstractDJDocument; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/IndentRuleAction.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/IndentRuleAction.java index f79934ecb..90b474284 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/IndentRuleAction.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/IndentRuleAction.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.definitions.indent; /** * A leaf node in the decision tree for the indentation system. diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/IndentRuleQuestion.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/IndentRuleQuestion.java index 2ff567192..2960024ed 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/IndentRuleQuestion.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/IndentRuleQuestion.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.definitions.indent; import edu.rice.cs.drjava.model.AbstractDJDocument; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/IndentRuleWithTrace.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/IndentRuleWithTrace.java index 17c39d2cd..ac5ee73fb 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/IndentRuleWithTrace.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/IndentRuleWithTrace.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.definitions.indent; import edu.rice.cs.drjava.model.AbstractDJDocument; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/IndentRuleWithTraceTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/IndentRuleWithTraceTest.java index d29613a16..df48cf161 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/IndentRuleWithTraceTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/IndentRuleWithTraceTest.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.definitions.indent; import java.util.ArrayList; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/IndentRulesTestCase.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/IndentRulesTestCase.java index 41f653c6a..10db56ce2 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/IndentRulesTestCase.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/IndentRulesTestCase.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.definitions.indent; import edu.rice.cs.drjava.DrJavaTestCase; @@ -94,7 +86,7 @@ protected final void _setDocText(String text) throws BadLocationException { * protected final void _setIndentSize(int size) { _indent = ""; - for (int i=0; i < size; i++) { + for (int i = 0; i < size; i++) { _indent = _indent + " "; } }*/ @@ -111,7 +103,7 @@ protected final int _getIndentSize() { * protected String _getIndentString(int numLevels) { String indent = ""; - for (int i=0; i < numLevels; i++) { + for (int i = 0; i < numLevels; i++) { indent += _indent; } return indent; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/Indenter.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/Indenter.java index 22c02ce1f..493349426 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/Indenter.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/Indenter.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.definitions.indent; import edu.rice.cs.drjava.model.AbstractDJDocument; @@ -41,7 +33,7 @@ import edu.rice.cs.drjava.config.OptionConstants; /** Singleton class to construct and use the indentation decision tree. - * @version $Id: Indenter.java 5677 2012-08-17 11:09:48Z rcartwright $ + * @version $Id$ */ public class Indenter { @@ -77,16 +69,19 @@ public void buildTree(int indentLevel) { char[] indent = new char[indentLevel]; java.util.Arrays.fill(indent,' '); - boolean autoCloseComments = false; - try { autoCloseComments = DrJava.getConfig().getSetting(OptionConstants.AUTO_CLOSE_COMMENTS).booleanValue(); } - catch(Exception e) { /* ignore */ } // some unit tests produce NullPointer exceptions in preceding line + /* The following block of text was revised on 19 Jun 2017 to eliminate the (blanket) catching of exceptions + * in the binding of autoCloseComments. All unit tests currently pass at this point. */ +// boolean autoCloseComments = false; + boolean autoCloseComments = DrJava.getConfig().getSetting(OptionConstants.AUTO_CLOSE_COMMENTS).booleanValue(); +// try { autoCloseComments = DrJava.getConfig().getSetting(OptionConstants.AUTO_CLOSE_COMMENTS).booleanValue(); } +// catch(Exception e) { /* ignore */ } // some unit tests produce NullPointer exceptions in preceding line IndentRule // Main tree rule60 = new ActionStartPrevLinePlus(""), rule37 = new ActionStartCurrStmtPlus(indentLevel), rule36 = new ActionStartStmtOfBracePlus(indentLevel), - // the following two rules should be inserted after the instantiated classed have been implemented + // the following two rules should be inserted after the instantiated classes have been implemented // rule40 = new ActionStartOfAnonInnerClass(indentLevel), // rule35 = new QuestionAnonInnerClassPrefix(rule40, rule36); rule34 = new QuestionExistsCharInStmt('?', ':', rule37, rule36), diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionBraceIsCurly.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionBraceIsCurly.java index 4ebdef7c8..0c08c54a2 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionBraceIsCurly.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionBraceIsCurly.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.definitions.indent; import edu.rice.cs.drjava.model.AbstractDJDocument; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionBraceIsCurlyTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionBraceIsCurlyTest.java index 1747b2210..695650a0c 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionBraceIsCurlyTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionBraceIsCurlyTest.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.definitions.indent; import javax.swing.text.BadLocationException; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionBraceIsParenOrBracket.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionBraceIsParenOrBracket.java index 38d8279b7..c07d4f6bf 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionBraceIsParenOrBracket.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionBraceIsParenOrBracket.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.definitions.indent; import edu.rice.cs.drjava.model.AbstractDJDocument; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionBraceIsParenOrBracketTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionBraceIsParenOrBracketTest.java index fda4b2fcf..8e4344b32 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionBraceIsParenOrBracketTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionBraceIsParenOrBracketTest.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.definitions.indent; import javax.swing.text.BadLocationException; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineEmpty.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineEmpty.java index e12f85aff..de78b865c 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineEmpty.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineEmpty.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.definitions.indent; import edu.rice.cs.drjava.model.AbstractDJDocument; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineEmptyOrEnterPress.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineEmptyOrEnterPress.java index b0a0be2cd..6ef4380aa 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineEmptyOrEnterPress.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineEmptyOrEnterPress.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.definitions.indent; import edu.rice.cs.drjava.model.AbstractDJDocument; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineEmptyOrEnterPressTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineEmptyOrEnterPressTest.java index ad95f4c8c..e33a3907b 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineEmptyOrEnterPressTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineEmptyOrEnterPressTest.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.definitions.indent; /** * Tests whether the current line is empty. diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineIsWingComment.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineIsWingComment.java index e399879ed..63ac77ef5 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineIsWingComment.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineIsWingComment.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.definitions.indent; import javax.swing.text.BadLocationException; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineIsWingCommentTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineIsWingCommentTest.java index 0d8f5f89b..3694c0cd3 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineIsWingCommentTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineIsWingCommentTest.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.definitions.indent; /** Tests visitor class that determines whether the current line is a wing comment. diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineStartsWith.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineStartsWith.java index 5efed4ffc..36d3993f6 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineStartsWith.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineStartsWith.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.definitions.indent; import javax.swing.text.*; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineStartsWithSkipComments.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineStartsWithSkipComments.java index f00d2bca0..6abd5173f 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineStartsWithSkipComments.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineStartsWithSkipComments.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.definitions.indent; import edu.rice.cs.drjava.model.AbstractDJDocument; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineStartsWithSkipCommentsTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineStartsWithSkipCommentsTest.java index 0a9beb93f..288cb94c4 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineStartsWithSkipCommentsTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineStartsWithSkipCommentsTest.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.definitions.indent; import javax.swing.text.BadLocationException; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineStartsWithTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineStartsWithTest.java index 6782d5207..710dcbd4c 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineStartsWithTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionCurrLineStartsWithTest.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.definitions.indent; import javax.swing.text.BadLocationException; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionExistsCharInPrevStmt.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionExistsCharInPrevStmt.java index c7f5d3637..0d3fd84e8 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionExistsCharInPrevStmt.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionExistsCharInPrevStmt.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.definitions.indent; import javax.swing.text.BadLocationException; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionExistsCharInStmt.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionExistsCharInStmt.java index 6abf5e47d..508508552 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionExistsCharInStmt.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionExistsCharInStmt.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.definitions.indent; import edu.rice.cs.drjava.model.AbstractDJDocument; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionExistsCharInStmtTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionExistsCharInStmtTest.java index 82e6fe96c..4846c3d37 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionExistsCharInStmtTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionExistsCharInStmtTest.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.definitions.indent; import javax.swing.text.BadLocationException; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionFollowedByStar.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionFollowedByStar.java index 029d00937..274f66df2 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionFollowedByStar.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionFollowedByStar.java @@ -1,74 +1,68 @@ /*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 is not currently used. */ -package edu.rice.cs.drjava.model.definitions.indent; - -import javax.swing.text.*; -import edu.rice.cs.util.UnexpectedException; - -import edu.rice.cs.drjava.model.AbstractDJDocument; - -/** Question rule in the indentation decision tree. Determines if the - * next non-whitespace character is a star '*'. This is useful for determining - * if we are at the beginning of a previously ill-formed block comment. - *

- * Does not work if character being searched for is a '/' or a '*' - * - * @version $Id$ - */ -public class QuestionFollowedByStar extends IndentRuleQuestion { - - /** Constructs a new rule which determines if the current position is - * immediately followed by a star '*'. - * @param yesRule Rule to use if this rule holds - * @param noRule Rule to use if this rule does not hold - */ - public QuestionFollowedByStar(IndentRule yesRule, IndentRule noRule) { super(yesRule, noRule); } - - /** Determines if the next non WS character is '*'. Does not search in quotes or comments.

- * Does not work if character being searched for is a '/' or a '*' - * @param doc AbstractDJDocument containing the line to be indented. - * @return true if this node's rule holds. - */ - boolean applyRule(AbstractDJDocument doc, Indenter.IndentReason reason) { - try { - int charPos = doc.getFirstNonWSCharPos(doc.getCurrentLocation(), true); - return (charPos != -1) && doc.getText(charPos, 1).equals("*"); - } - catch (BadLocationException ble) { throw new UnexpectedException(ble); } - } -} - +//package edu.rice.cs.drjava.model.definitions.indent; +// +//import javax.swing.text.*; +//import edu.rice.cs.util.UnexpectedException; +// +//import edu.rice.cs.drjava.model.AbstractDJDocument; +// +///** Question rule in the indentation decision tree. Determines if the +// * next non-whitespace character is a star '*'. This is useful for determining +// * if we are at the beginning of a previously ill-formed block comment. +// *

+// * Does not work if character being searched for is a '/' or a '*' +// * +// * @version $Id$ +// */ +//public class QuestionFollowedByStar extends IndentRuleQuestion { +// +// /** Constructs a new rule which determines if the current position is +// * immediately followed by a star '*'. +// * @param yesRule Rule to use if this rule holds +// * @param noRule Rule to use if this rule does not hold +// */ +// public QuestionFollowedByStar(IndentRule yesRule, IndentRule noRule) { super(yesRule, noRule); } +// +// /** Determines if the next non WS character is '*'. Does not search in quotes or comments.

+// * Does not work if character being searched for is a '/' or a '*' +// * @param doc AbstractDJDocument containing the line to be indented. +// * @return true if this node's rule holds. +// */ +// boolean applyRule(AbstractDJDocument doc, Indenter.IndentReason reason) { +// try { +// int charPos = doc.getFirstNonWSCharPos(doc.getCurrentLocation(), true); +// return (charPos != -1) && doc.getText(charPos, 1).equals("*"); +// } +// catch (BadLocationException ble) { throw new UnexpectedException(ble); } +// } +//} +// diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionHasCharPrecedingOpenBrace.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionHasCharPrecedingOpenBrace.java index ffb3ba6af..e20c3ea41 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionHasCharPrecedingOpenBrace.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionHasCharPrecedingOpenBrace.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.definitions.indent; import edu.rice.cs.drjava.model.AbstractDJDocument; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionHasCharPrecedingOpenBraceTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionHasCharPrecedingOpenBraceTest.java index d0d11474e..a6c2cb938 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionHasCharPrecedingOpenBraceTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionHasCharPrecedingOpenBraceTest.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.definitions.indent; import javax.swing.text.BadLocationException; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionInsideComment.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionInsideComment.java index 1fa2f0b4f..380226c3e 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionInsideComment.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionInsideComment.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.definitions.indent; import edu.rice.cs.drjava.model.AbstractDJDocument; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionInsideCommentTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionInsideCommentTest.java index 986a32c16..d3532e192 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionInsideCommentTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionInsideCommentTest.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.definitions.indent; /** * Tests whether start of line is within a multiline comment. diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionLineContains.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionLineContains.java index 56f70394b..31a0f975f 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionLineContains.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionLineContains.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.definitions.indent; import edu.rice.cs.drjava.model.AbstractDJDocument; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionLineContainsTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionLineContainsTest.java index 3d47ec98e..c5808817d 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionLineContainsTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionLineContainsTest.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.definitions.indent; import javax.swing.text.BadLocationException; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionNewParenPhrase.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionNewParenPhrase.java index 5e5cbec7a..cb875b401 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionNewParenPhrase.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionNewParenPhrase.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.definitions.indent; import javax.swing.text.*; @@ -45,7 +37,7 @@ * parenthesized expression. Specifically, this rule determines if the previous line ends in a comma, semicolon, * open paren, or open bracket. Note that whitespace, blank lines, and comments are disregarded. * - * @version $Id: QuestionNewParenPhrase.java 5611 2012-07-25 15:03:33Z rcartwright $ + * @version $Id$ */ public class QuestionNewParenPhrase extends IndentRuleQuestion { diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionNewParenPhraseTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionNewParenPhraseTest.java index e2d94b3f3..1d1669ef0 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionNewParenPhraseTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionNewParenPhraseTest.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.definitions.indent; import javax.swing.text.BadLocationException; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionPrevLineStartsComment.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionPrevLineStartsComment.java index 00b715ee2..b80b46b4c 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionPrevLineStartsComment.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionPrevLineStartsComment.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.definitions.indent; import edu.rice.cs.drjava.model.AbstractDJDocument; @@ -42,7 +34,7 @@ /** Given the start of the current line is inside a block comment, asks * whether the comment begins on the "previous line," ignoring white space. * - * @version $Id: QuestionPrevLineStartsComment.java 5175 2010-01-20 08:46:32Z mgricken $ + * @version $Id$ */ class QuestionPrevLineStartsComment extends IndentRuleQuestion { diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionPrevLineStartsCommentTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionPrevLineStartsCommentTest.java index 8d43949e4..1851fea0e 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionPrevLineStartsCommentTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionPrevLineStartsCommentTest.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.definitions.indent; /** Tests whether the previous line starts the comment containing the cursor. diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionPrevLineStartsJavaDocWithText.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionPrevLineStartsJavaDocWithText.java index 60d968d0a..75fd6a355 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionPrevLineStartsJavaDocWithText.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionPrevLineStartsJavaDocWithText.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.definitions.indent; import javax.swing.text.*; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionPrevLineStartsWith.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionPrevLineStartsWith.java index d5aacaa40..3bd7a23fb 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionPrevLineStartsWith.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionPrevLineStartsWith.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.definitions.indent; import javax.swing.text.*; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionPrevLineStartsWithTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionPrevLineStartsWithTest.java index fa0de19ce..9909d6478 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionPrevLineStartsWithTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionPrevLineStartsWithTest.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.definitions.indent; import javax.swing.text.BadLocationException; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionStartAfterOpenBrace.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionStartAfterOpenBrace.java index d4bd4b3be..28682ff9e 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionStartAfterOpenBrace.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionStartAfterOpenBrace.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.definitions.indent; import javax.swing.text.BadLocationException; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionStartAfterOpenBraceTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionStartAfterOpenBraceTest.java index ede041d6d..99e62beb5 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionStartAfterOpenBraceTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionStartAfterOpenBraceTest.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.definitions.indent; import javax.swing.text.BadLocationException; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionStartingNewStmt.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionStartingNewStmt.java index 7ade22d9f..afcf89b16 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionStartingNewStmt.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionStartingNewStmt.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.definitions.indent; import javax.swing.text.BadLocationException; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionStartingNewStmtTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionStartingNewStmtTest.java index 9a2825f76..663e15324 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionStartingNewStmtTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/indent/QuestionStartingNewStmtTest.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.definitions.indent; import javax.swing.text.BadLocationException; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/AbstractReducedModel.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/AbstractReducedModel.java index c96d2ff6c..b0bdb8338 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/AbstractReducedModel.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/AbstractReducedModel.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.definitions.reducedmodel; /** A refactoring of the common code between ReducedModelComment and ReducedModelBrace. Both of the refactored classes diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BackSlashTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BackSlashTest.java index 3440e1a48..f07472f06 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BackSlashTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BackSlashTest.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.definitions.reducedmodel; import junit.framework.*; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/Brace.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/Brace.java index b3baf46d8..f050716a6 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/Brace.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/Brace.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.definitions.reducedmodel; /** This class acts as the representation of a brace in the reduced view. It also includes information about the gap diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceException.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceException.java index ef67d31db..95f1769cd 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceException.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceException.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*/ - /** An exception class used by methods in this class. */ package edu.rice.cs.drjava.model.definitions.reducedmodel; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceInfo.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceInfo.java index 351a8dd06..05bb5bcae 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceInfo.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceInfo.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.definitions.reducedmodel; /** Indent information block. diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceInfoTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceInfoTest.java index 11e0767cd..6f358d9fc 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceInfoTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceInfoTest.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.definitions.reducedmodel; import edu.rice.cs.drjava.DrJavaTestCase; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceReduction.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceReduction.java index d819ee9d7..9da6d8264 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceReduction.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceReduction.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.definitions.reducedmodel; import java.util.ArrayList; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceReductionTestCase.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceReductionTestCase.java index 2eabdf46f..90304c14a 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceReductionTestCase.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceReductionTestCase.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.definitions.reducedmodel; import edu.rice.cs.drjava.DrJavaTestCase; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceTest.java index 581757322..193df219c 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/BraceTest.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.definitions.reducedmodel; import junit.framework.*; @@ -150,10 +142,10 @@ public void testIsMatch() { } public void testSetTypeFalse() { - try{ + try { lparen.setType("a"); fail("Expected BraceException"); - }catch(BraceException b){ }; + } catch(BraceException b){ }; } public void testIsSlashStar() { @@ -166,17 +158,17 @@ public void testIsSlashStar() { } public void testGrowFail() { - try{ + try { lparen.grow(5); fail("Expected BraceException"); - }catch(BraceException b){ }; + } catch(BraceException b){ }; } public void testShrinkFail() { - try{ + try { lparen.shrink(5); fail("Expected BraceException"); - }catch(BraceException b){ }; + } catch(BraceException b){ }; } } diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/Free.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/Free.java index 94b72f06b..28b426548 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/Free.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/Free.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.definitions.reducedmodel; import static edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedModelStates.*; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/Gap.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/Gap.java index 20b1b15ab..78dfb5008 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/Gap.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/Gap.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.definitions.reducedmodel; /** A subclass of ReducedToken that represents sequences of non-special characters. diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/GapTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/GapTest.java index c5944f28a..cf4ae6134 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/GapTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/GapTest.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.definitions.reducedmodel; import edu.rice.cs.drjava.DrJavaTestCase; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/HighlightStatus.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/HighlightStatus.java index c8fdf84fc..05085819c 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/HighlightStatus.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/HighlightStatus.java @@ -1,43 +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.definitions.reducedmodel; /** A block that represents information about the highlighting status of a particular section in the document. - * @version $Id: HighlightStatus.java 5175 2010-01-20 08:46:32Z mgricken $ + * @version $Id$ */ public class HighlightStatus { public static final int NORMAL = 0; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/IndentInfo.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/IndentInfo.java index 91125d9b5..a7268357a 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/IndentInfo.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/IndentInfo.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.definitions.reducedmodel; /** Indent information block. diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/InsideBlockComment.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/InsideBlockComment.java index ff7427651..f5b166d9b 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/InsideBlockComment.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/InsideBlockComment.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.definitions.reducedmodel; import static edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedModelStates.*; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/InsideDoubleQuote.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/InsideDoubleQuote.java index e20fd27f4..fd8d1c57e 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/InsideDoubleQuote.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/InsideDoubleQuote.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.definitions.reducedmodel; import static edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedModelStates.*; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/InsideLineComment.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/InsideLineComment.java index d297bad79..2edc4f317 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/InsideLineComment.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/InsideLineComment.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.definitions.reducedmodel; import static edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedModelStates.*; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/InsideSingleQuote.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/InsideSingleQuote.java index b1ffc7d37..5bfc8a17e 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/InsideSingleQuote.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/InsideSingleQuote.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.definitions.reducedmodel; import static edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedModelStates.*; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/MixedQuoteTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/MixedQuoteTest.java index 09fe71865..caceaa27c 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/MixedQuoteTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/MixedQuoteTest.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.definitions.reducedmodel; import junit.framework.*; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ModelList.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ModelList.java index d02fe7bc3..d5c17d25d 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ModelList.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ModelList.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.definitions.reducedmodel; import edu.rice.cs.plt.collect.WeakHashSet; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ModelListTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ModelListTest.java index 3f86a7369..f85240118 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ModelListTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ModelListTest.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.definitions.reducedmodel; import edu.rice.cs.drjava.DrJavaTestCase; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelBrace.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelBrace.java index c8c9142dc..8bbcb758c 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelBrace.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelBrace.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.definitions.reducedmodel; import java.util.Stack; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelComment.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelComment.java index ec4747666..bfbfc2291 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelComment.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelComment.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.definitions.reducedmodel; /** Keeps track of newlines, comment blocks, and single and double-quoted strings. This reduced sub-model is used for diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelControl.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelControl.java index 2c1981466..e7470b612 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelControl.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelControl.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.definitions.reducedmodel; import java.util.ArrayList; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelDeleteTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelDeleteTest.java index e769149d3..7368923e3 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelDeleteTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelDeleteTest.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.definitions.reducedmodel; /** * Test the delete functionality of the reduced model. diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelState.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelState.java index 83a586862..7c5296cb4 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelState.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelState.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.definitions.reducedmodel; import static edu.rice.cs.drjava.model.definitions.reducedmodel.ReducedModelStates.*; diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelStates.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelStates.java index 70f7562df..e30a05fa6 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelStates.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelStates.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.definitions.reducedmodel; /** This interface contains the various constants used by the reduced model to represent the states of various blocks diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelTest.java index 9c073c315..74667f237 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelTest.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.definitions.reducedmodel; /** Tests insertion and move and other non-delete functionality of the reduced model. diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedToken.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedToken.java index 84e1b2f68..3a9608858 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedToken.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedToken.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.definitions.reducedmodel; /** The representation of document text in the reduced model. ReducedToken :: = Brace | Gap diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/SingleQuoteTest.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/SingleQuoteTest.java index 4e9df0bd8..295116098 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/SingleQuoteTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/SingleQuoteTest.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.definitions.reducedmodel; /** * Tests the interaction between quotes and backslashes. diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/Stutter.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/Stutter.java index e87c4eb8c..8569f79af 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/Stutter.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/Stutter.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.definitions.reducedmodel; /** * This class represents a special state, passed by some methods that return diff --git a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/TokenList.java b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/TokenList.java index 089485ae4..ed1aa1626 100644 --- a/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/TokenList.java +++ b/drjava/src/edu/rice/cs/drjava/model/definitions/reducedmodel/TokenList.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.definitions.reducedmodel; /** A list of reduced model tokens. Uses ModelList as its base. diff --git a/drjava/src/edu/rice/cs/drjava/model/javadoc/DefaultJavadocModel.java b/drjava/src/edu/rice/cs/drjava/model/javadoc/DefaultJavadocModel.java index 048cdac79..17f40ac73 100644 --- a/drjava/src/edu/rice/cs/drjava/model/javadoc/DefaultJavadocModel.java +++ b/drjava/src/edu/rice/cs/drjava/model/javadoc/DefaultJavadocModel.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.javadoc; import java.io.File; diff --git a/drjava/src/edu/rice/cs/drjava/model/javadoc/JavadocEventNotifier.java b/drjava/src/edu/rice/cs/drjava/model/javadoc/JavadocEventNotifier.java index b01aa2fae..fb957c5df 100644 --- a/drjava/src/edu/rice/cs/drjava/model/javadoc/JavadocEventNotifier.java +++ b/drjava/src/edu/rice/cs/drjava/model/javadoc/JavadocEventNotifier.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.javadoc; import java.io.File; @@ -71,8 +63,7 @@ * * @version $Id$ */ -class JavadocEventNotifier extends EventNotifier - implements JavadocListener { +class JavadocEventNotifier extends EventNotifier implements JavadocListener { /** Called after Javadoc is started by the GlobalModel. */ public void javadocStarted() { diff --git a/drjava/src/edu/rice/cs/drjava/model/javadoc/JavadocException.java b/drjava/src/edu/rice/cs/drjava/model/javadoc/JavadocException.java index ea38a5038..4a675866a 100644 --- a/drjava/src/edu/rice/cs/drjava/model/javadoc/JavadocException.java +++ b/drjava/src/edu/rice/cs/drjava/model/javadoc/JavadocException.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.javadoc; /** * Indicates that an error has occured while attempting to create javadoc. diff --git a/drjava/src/edu/rice/cs/drjava/model/javadoc/JavadocListener.java b/drjava/src/edu/rice/cs/drjava/model/javadoc/JavadocListener.java index 124cf5bb1..4c3720c6d 100644 --- a/drjava/src/edu/rice/cs/drjava/model/javadoc/JavadocListener.java +++ b/drjava/src/edu/rice/cs/drjava/model/javadoc/JavadocListener.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.javadoc; import java.io.File; diff --git a/drjava/src/edu/rice/cs/drjava/model/javadoc/JavadocModel.java b/drjava/src/edu/rice/cs/drjava/model/javadoc/JavadocModel.java index 1a9a41079..96b09879e 100644 --- a/drjava/src/edu/rice/cs/drjava/model/javadoc/JavadocModel.java +++ b/drjava/src/edu/rice/cs/drjava/model/javadoc/JavadocModel.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.javadoc; import java.io.File; diff --git a/drjava/src/edu/rice/cs/drjava/model/javadoc/JavadocModelTest.java b/drjava/src/edu/rice/cs/drjava/model/javadoc/JavadocModelTest.java index 3178edaaf..cfc6413e4 100644 --- a/drjava/src/edu/rice/cs/drjava/model/javadoc/JavadocModelTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/javadoc/JavadocModelTest.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.javadoc; import edu.rice.cs.drjava.DrJavaTestCase; diff --git a/drjava/src/edu/rice/cs/drjava/model/javadoc/NoJavadocAvailable.java b/drjava/src/edu/rice/cs/drjava/model/javadoc/NoJavadocAvailable.java index b4742331b..75fa60f59 100644 --- a/drjava/src/edu/rice/cs/drjava/model/javadoc/NoJavadocAvailable.java +++ b/drjava/src/edu/rice/cs/drjava/model/javadoc/NoJavadocAvailable.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.javadoc; import java.io.File; diff --git a/drjava/src/edu/rice/cs/drjava/model/junit/ConcJUnitUtils.java b/drjava/src/edu/rice/cs/drjava/model/junit/ConcJUnitUtils.java index 228104fc4..3f9707a7e 100644 --- a/drjava/src/edu/rice/cs/drjava/model/junit/ConcJUnitUtils.java +++ b/drjava/src/edu/rice/cs/drjava/model/junit/ConcJUnitUtils.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.junit; import java.io.*; @@ -59,27 +51,17 @@ public class ConcJUnitUtils { * @param checkFilesInJar file names that should be in the jar file * @return true if f is a jar file and the files are in the jar */ protected static boolean isValidJarFile(final File f, String... checkFilesInJar) { - if ((f==null) || (FileOps.NULL_FILE.equals(f)) || (!f.exists())) return false; + if ((f == null) || (FileOps.NULL_FILE.equals(f)) || (!f.exists())) return false; JarFile jf = null; try { jf = new JarFile(f); for(String s: checkFilesInJar) { JarEntry je = jf.getJarEntry(s); - if (je==null) return false; + if (je == null) return false; } return true; - // we already have a JUnit version 4.4 as junit.jar - // running junit.runner.Version to get the version string - // isn't a valid criterion for compatibility -// JVMBuilder jvmb = JVMBuilder.DEFAULT.classPath(f); -// Process p = jvmb.start("junit.runner.Version"); -// BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream())); -// String line = br.readLine(); -// try { -// p.waitFor(); -// } -// catch(InterruptedException ie) { return false; } -// return "3.8.2".equals(line); + // we already have JUnit version 4.4+ as junit.jar. Running junit.runner.Version to get the version string + // isn't a valid criterion for compatibility; } catch(IOException ioe) { return false; } finally { @@ -94,9 +76,7 @@ protected static boolean isValidJarFile(final File f, String... checkFilesInJar) * @param f file to check * @return true if f is a valid junit.jar file */ public static boolean isValidJUnitFile(final File f) { - return isValidJarFile(f, - "junit/framework/Test.class", - "junit/runner/Version.class"); + return isValidJarFile(f, "junit/framework/Test.class", "junit/runner/Version.class"); } /** Check if the file is a valid concutest-junit-xxx-withrt.jar file. @@ -133,10 +113,10 @@ public static boolean isCompatibleRTConcJUnitFile(final File f) { JarFile jf = new JarFile(f); try { Manifest mf = jf.getManifest(); - if (mf==null) return false; + if (mf == null) return false; String vendor = mf.getMainAttributes().getValue("Edu-Rice-Cs-CUnit-JavaVersion-Vendor"); String version = mf.getMainAttributes().getValue("Edu-Rice-Cs-CUnit-JavaVersion"); - if ((vendor==null) || (version==null)) return false; + if ((vendor == null) || (version == null)) return false; return (vendor.equals(edu.rice.cs.plt.reflect.JavaVersion.CURRENT_FULL.vendor().toString()) && version.equals(edu.rice.cs.plt.reflect.JavaVersion.CURRENT_FULL.toString())); } @@ -296,8 +276,7 @@ public void run() { }); public Object construct() { _processIncrementer.start(); - _success = edu.rice.cs.drjava.model.junit.ConcJUnitUtils. - generateRTConcJUnitJarFile(targetFile, concJUnitJarFile, tmpDir); + _success = generateRTConcJUnitJarFile(targetFile, concJUnitJarFile, tmpDir); return null; } diff --git a/drjava/src/edu/rice/cs/drjava/model/junit/DefaultJUnitModel.java b/drjava/src/edu/rice/cs/drjava/model/junit/DefaultJUnitModel.java index c442829c5..d2cb78d3d 100644 --- a/drjava/src/edu/rice/cs/drjava/model/junit/DefaultJUnitModel.java +++ b/drjava/src/edu/rice/cs/drjava/model/junit/DefaultJUnitModel.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 @@ -11,7 +11,7 @@ * 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 +h * 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 @@ -44,14 +44,17 @@ import java.util.List; import java.util.LinkedList; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.Set; import edu.rice.cs.drjava.config.BooleanOption; -import edu.rice.cs.drjava.model.GlobalModel; +import edu.rice.cs.drjava.model.DrJavaFileUtils; import edu.rice.cs.drjava.model.FileMovedException; +import edu.rice.cs.drjava.model.FindReplaceMachine; +import edu.rice.cs.drjava.model.FindResult; import edu.rice.cs.drjava.model.OpenDefinitionsDocument; -import edu.rice.cs.drjava.model.DrJavaFileUtils; +import edu.rice.cs.drjava.model.SingleDisplayModel; import edu.rice.cs.drjava.model.repl.newjvm.MainJVM; import edu.rice.cs.drjava.model.compiler.CompilerModel; import edu.rice.cs.drjava.model.compiler.CompilerListener; @@ -85,7 +88,7 @@ public class DefaultJUnitModel implements JUnitModel, JUnitModelCallback { private CoverageMetadata coverageMetadata = new CoverageMetadata(false, ""); /** log for use in debugging */ - private static Log _log = new Log("DefaultJUnitModel.txt", false); + private static Log _log = new Log("GlobalModel.txt", false); /** Manages listeners to this model. */ private final JUnitEventNotifier _notifier = new JUnitEventNotifier(); @@ -101,7 +104,7 @@ public class DefaultJUnitModel implements JUnitModel, JUnitModelCallback { private final CompilerModel _compilerModel; /** The global model to which the JUnitModel belongs */ - private final GlobalModel _model; + private final SingleDisplayModel _model; /** The error model containing all current JUnit errors. */ private volatile JUnitErrorModel _junitErrorModel; @@ -122,7 +125,7 @@ public class DefaultJUnitModel implements JUnitModel, JUnitModelCallback { * @param compilerModel the CompilerModel, used only as a lock to prevent simultaneous test and compile * @param model used only for getSourceFile */ - public DefaultJUnitModel(MainJVM jvm, CompilerModel compilerModel, GlobalModel model) { + public DefaultJUnitModel(MainJVM jvm, CompilerModel compilerModel, SingleDisplayModel model) { _jvm = jvm; _compilerModel = compilerModel; _model = model; @@ -142,7 +145,7 @@ public void setCoverage(boolean coverage, String outdirPath) { //------------------------ Simple Predicates ------------------------------// public boolean isTestInProgress() { return _testInProgress; } - public JUnitResultTuple getLastResult() { + public JUnitResultTuple getFinalResult() { return new JUnitResultTuple(false, null); // @rebecca TODO: why does this result in not finding any test classes? //return this._jvm.getLastJUnitResult(); @@ -191,39 +194,20 @@ public void junitProject() { junitOpenDefDocs(lod, true); } -// /** Forwards the classnames and files to the test manager to test all of them; does not notify -// * since we don't have ODD's to send out with the notification of junit start. -// * @param qualifiedClassnames a list of all the qualified class names to test. -// * @param files a list of their source files in the same order as qualified class names. -// */ -// public void junitClasses(List qualifiedClassnames, List files) { -// Utilities.showDebug("junitClasses(" + qualifiedClassnames + ", " + files); -// synchronized(_compilerModel.getCompilerLock()) { -// -// // Check _testInProgress -// if (_testInProgress) return; -// -// List testClasses; -// try { testClasses = _jvm.findTestClasses(qualifiedClassnames, files); } -// catch(IOException e) { throw new UnexpectedException(e); } -// -//// System.err.println("Found test classes: " + testClasses); -// -// if (testClasses.isEmpty()) { -// nonTestCase(true); -// return; -// } -// _notifier.junitClassesStarted(); -// _testInProgress = true; -// try { _jvm.runTestSuite(); } -// catch(Exception e) { -//// System.err.println("Threw exception " + e); -// _notifier.junitEnded(); -// _testInProgress = false; -// throw new UnexpectedException(e); -// } -// } -// } + /** Determines if className appears as an identifier in the open documents. */ + private boolean appearsInSourceText(String className, FindReplaceMachine frm) { + _log.log("***appearsInSourceText(" + className + ", " + frm + ")"); + OpenDefinitionsDocument doc = _model.getActiveDocument(); + frm.setDocument(doc); + frm.setFirstDoc(doc); + frm.setPosition(doc.getCurrentLocation()); + frm.setFindWord(className); + frm.setIgnoreCommentsAndStrings(true); + frm.setSearchAllDocuments(true); + FindResult match = frm.findNext(); + _log.log("Matching result = " + match); + return (match.getFoundOffset() != -1); + } public void junitDocs(List lod) { junitOpenDefDocs(lod, true); } @@ -248,12 +232,11 @@ public void junit(OpenDefinitionsDocument doc) throws ClassNotFoundException, IO debug.logEnd("junit(doc)"); } - /** Ensures that all documents have been compiled since their last - * modification and then delegates the actual testing to - * _rawJUnitOpenTestDocs. - * @param lod list of open documents - * @param allTests true if all tests are to be run - */ + /** Ensures that all documents have been compiled since their last modification and then delegates the actual testing to + * _rawJUnitOpenTestDocs. + * @param lod list of open documents + * @param allTests true if all tests are to be run + */ private void junitOpenDefDocs(final List lod, final boolean allTests) { // If a test is running, don't start another one. @@ -315,14 +298,12 @@ private void junitOpenDefDocs(final List lod, final boo else _rawJUnitOpenDefDocs(lod, allTests); } - /** Runs all TestCases in the document list lod; assumes all documents have - * been compiled. It finds the TestCase classes by searching the build - * directories for the documents. Note: caller must respond to thrown - * exceptions by invoking _junitUnitInterrupted (to run hourglassOff() and - * reset the unit testing UI). - * @param lod list of open documents - * @param allTests true if all tests are to be run - */ + /** Runs all TestCases in the document list lod; assumes all documents have been compiled. It finds the TestCase + * classes by searching the build directories for the class files. Note: caller must respond to thrown exceptions by + * invoking _junitUnitInterrupted (to run hourglassOff() and resetting the unit testing UI). + * @param lod list of open documents + * @param allTests true if all tests are to be run + */ private void _rawJUnitOpenDefDocs(List lod, final boolean allTests) { File buildDir = _model.getBuildDirectory(); @@ -343,7 +324,7 @@ private void _rawJUnitOpenDefDocs(List lod, final boole for (OpenDefinitionsDocument doc: lod) /* for all nonEmpty documents in lod */ { if (doc.isSourceFile()) { // excludes Untitled documents and open non-source files try { -// System.err.println("Processing " + doc); + _log.log("Processing " + doc); File sourceRoot = doc.getSourceRoot(); // may throw an InvalidPackageException // doc has valid package name; add it to list of open java source doc files @@ -363,20 +344,19 @@ private void _rawJUnitOpenDefDocs(List lod, final boole if (! classDirsAndRoots.containsKey(classFileDir)) { classDirsAndRoots.put(classFileDir, sourceDir); -// System.err.println("Adding " + classFileDir + " with source root " + sourceRoot + -// " to list of class directories"); + _log.log("Adding " + classFileDir + " with source root " + sourceRoot + " to list of class directories"); } } catch (InvalidPackageException e) { /* Skip the file, since it doesn't have a valid package */ } } } -// System.err.println("classDirs = " + classDirsAndRoots.keySet()); + _log.log("classDirs = " + classDirsAndRoots.keySet()); /** set of dirs potentially containing test classes */ Set classDirs = classDirsAndRoots.keySet(); - //System.err.println("openDocFiles = " + openDocFiles); + _log.log("openDocFiles = " + openDocFiles); /* Names of test classes. */ final ArrayList classNames = new ArrayList(); @@ -384,49 +364,55 @@ private void _rawJUnitOpenDefDocs(List lod, final boole /* Source files corresonding to potential test class files */ final ArrayList files = new ArrayList(); + /* Flag indicating if project is open */ + final boolean isProject = _model.isProjectActive(); + + /* Set up FindReplaceMachine to search open definitions documents. */ + final FindReplaceMachine frm = new FindReplaceMachine(_model, _model.getDocumentIterator(), null); + try { for (File dir: classDirs) { // foreach class file directory -// System.err.println("Examining directory " + dir); + _log.log("Examining directory " + dir); File[] listing = dir.listFiles(); -// System.err.println("Directory contains the files: " + Arrays.asList(listing)); + _log.log("Directory contains the files: " + Arrays.asList(listing)); if (listing != null) { // listFiles may return null if there's an IO error for (File entry : listing) { /* for each class file in the build directory */ - //System.err.println("Examining file " + entry); + _log.log("Examining file " + entry); /* ignore non-class files */ - String name = entry.getName(); + final String name = entry.getName(); if (! name.endsWith(".class")) continue; + final String noExtName = name.substring(0, name.length() - 6); // remove ".class" from name + final int indexOfLastDot = noExtName.lastIndexOf('.'); + final String simpleClassName = noExtName.substring(indexOfLastDot + 1); + _log.log("Simple class name is " + simpleClassName); + /* Ignore class names that do not end in "Test" if FORCE_TEST_SUFFIX option is set */ - String noExtName = ""; - if (_forceTestSuffix) { - noExtName = name.substring(0, name.length() - 6); // remove ".class" from name - int indexOfLastDot = noExtName.lastIndexOf('.'); - String simpleClassName = noExtName.substring(indexOfLastDot + 1); -// System.err.println("Simple class name is " + simpleClassName); - if (/*isProject &&*/ ! simpleClassName.endsWith("Test")) continue; - } + if (_forceTestSuffix && ! simpleClassName.endsWith("Test")) continue; /* ignore entries that do not correspond to files? Can this happen? */ if (! entry.isFile()) continue; + /* In flat file mode, ignore files that are not named in a source document. */ + if (! isProject && ! appearsInSourceText(simpleClassName, frm)) continue; + _log.log("isProject = " + isProject + "; name = " + name); + // Add this class and the corrresponding source file to classNames and files, respectively. // Finding the source file is non-trivial because it may be a language-levels file try { final Box className = new SimpleBox(); final Box sourceName = new SimpleBox(); - new ClassReader(IOUtil.toByteArray(entry)).accept(new ClassVisitor(Opcodes.ASM4) { + new ClassReader(IOUtil.toByteArray(entry)).accept(new ClassVisitor(Opcodes.ASM7) { public void visit(int version, int access, String name, String sig, String sup, String[] inters) { className.set(name.replace('/', '.')); } - public void visitSource(String source, String debug) { - sourceName.set(source); - } + public void visitSource(String source, String debug) { sourceName.set(source); } public void visitOuterClass(String owner, String name, String desc) { } public AnnotationVisitor visitAnnotation(String desc, boolean visible) { return null; } public void visitAttribute(Attribute attr) { } @@ -469,7 +455,7 @@ else if (openDocFiles.contains(strippedName + OptionConstants.OLD_DJ2_FILE_EXTEN File sourceFile = new File(sourceFileName); classNames.add(className.value()); files.add(sourceFile); - _log.log("Class " + className + "added to classNames. File " + sourceFileName + " added to files."); + _log.log("Class " + className + " added to classNames. File " + sourceFileName + " added to files."); } catch(IOException e) { /* ignore it; can't read class file */ } } @@ -590,23 +576,17 @@ public void nonTestCase(final boolean isTestAll, boolean didCompileFail) { /** Called to indicate that an illegal class file was encountered * @param e the ClassFileObject describing the error. */ - public void classFileError(final ClassFileError e) { - Utilities.invokeLater(new Runnable() { public void run() {_notifier.classFileError(e); } }); - } + public void classFileError(final ClassFileError e) { _notifier.classFileError(e); } /** Called to indicate that a suite of tests has started running. * @param numTests The number of tests in the suite to be run. */ - public void testSuiteStarted(final int numTests) { - Utilities.invokeLater(new Runnable() { public void run() { _notifier.junitSuiteStarted(numTests); } }); - } + public void testSuiteStarted(final int numTests) { _notifier.junitSuiteStarted(numTests); } /** Called when a particular test is started. * @param testName The name of the test being started. */ - public void testStarted(final String testName) { - Utilities.invokeLater(new Runnable() { public void run() { _notifier.junitTestStarted(testName); } }); - } + public void testStarted(final String testName) { _notifier.junitTestStarted(testName); } /** Called when a particular test has ended. * @param testName The name of the test that has ended. @@ -614,9 +594,7 @@ public void testStarted(final String testName) { * @param causedError If not successful, whether the test caused an error or simply failed. */ public void testEnded(final String testName, final boolean wasSuccessful, final boolean causedError) { - EventQueue.invokeLater(new Runnable() { - public void run() { _notifier.junitTestEnded(testName, wasSuccessful, causedError); } - }); + _notifier.junitTestEnded(testName, wasSuccessful, causedError); } /** Called when a full suite of tests has finished running. Does not necessarily run in event thread. @@ -624,27 +602,25 @@ public void testEnded(final String testName, final boolean wasSuccessful, final */ public void testSuiteEnded(final JUnitError[] errors) { // new ScrollableDialog(null, "DefaultJUnitModel.testSuiteEnded(...) called", "", "").show(); - Utilities.invokeLater(new Runnable() { public void run() { - List files = new ArrayList(); - for(OpenDefinitionsDocument odd: _model.getLLOpenDefinitionsDocuments()) { files.add(odd.getRawFile()); } + List files = new ArrayList(); + for(OpenDefinitionsDocument odd: _model.getLLOpenDefinitionsDocuments()) { files.add(odd.getRawFile()); } // Utilities.show("errors.length = " + errors.length + " files = " + files); - for(JUnitError e: errors){ - try { - e.setStackTrace(_compilerModel.getLLSTM().replaceStackTrace(e.stackTrace(),files)); - } catch(Exception ex) { DrJavaErrorHandler.record(ex); } - File f = e.file(); - if ((f != null) && (DrJavaFileUtils.isLLFile(f))) { - String dn = DrJavaFileUtils.getJavaForLLFile(f.getName()); - StackTraceElement ste = new StackTraceElement(e.className(), "", dn, e.lineNumber()); - ste = _compilerModel.getLLSTM().replaceStackTraceElement(ste, f); - e.setLineNumber(ste.getLineNumber()); - } + for(JUnitError e: errors) { + try { + e.setStackTrace(_compilerModel.getLLSTM().replaceStackTrace(e.stackTrace(),files)); + } catch(Exception ex) { DrJavaErrorHandler.record(ex); } + File f = e.file(); + if ((f != null) && (DrJavaFileUtils.isLLFile(f))) { + String dn = DrJavaFileUtils.getJavaForLLFile(f.getName()); + StackTraceElement ste = new StackTraceElement(e.className(), "", dn, e.lineNumber()); + ste = _compilerModel.getLLSTM().replaceStackTraceElement(ste, f); + e.setLineNumber(ste.getLineNumber()); } - _junitErrorModel = new JUnitErrorModel(errors, _model, true); - _notifyJUnitEnded(); - _testInProgress = false; + } + _junitErrorModel = new JUnitErrorModel(errors, _model, true); + _notifyJUnitEnded(); + _testInProgress = false; // new ScrollableDialog(null, "DefaultJUnitModel.testSuiteEnded(...) finished", "", "").show(); - }}); } @@ -660,7 +636,7 @@ public File getFileForClassName(String className) { /** Returns the current classpath in use by the JUnit JVM. */ public Iterable getClassPath() { return _jvm.getClassPath().unwrap(IterUtil.empty()); } - /** Called when the JVM used for unit tests has registered. Does not necessarily run in even thread. */ + /** Called when the JVM used for unit tests has registered. Does not necessarily run in event thread. */ public void junitJVMReady() { Utilities.invokeLater(new Runnable() { public void run() { if (! _testInProgress) return; diff --git a/drjava/src/edu/rice/cs/drjava/model/junit/JUnitError.java b/drjava/src/edu/rice/cs/drjava/model/junit/JUnitError.java index aa5ad7502..86ec75bc6 100644 --- a/drjava/src/edu/rice/cs/drjava/model/junit/JUnitError.java +++ b/drjava/src/edu/rice/cs/drjava/model/junit/JUnitError.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.junit; import edu.rice.cs.drjava.model.DJError; @@ -77,7 +69,7 @@ public JUnitError(File file, int lineNumber, int startColumn, String message, bo * @param test the name of the test that failed */ public JUnitError(String message, boolean isWarning, String test) { - this(null, -1, -1, message, isWarning, test, "", "No associated stack trace", new StackTraceElement[0]); + this(null, -1, -1, message, isWarning, test, "", "Internal DrJava JUnitError", Thread.currentThread().getStackTrace()); } /** Gets the test name diff --git a/drjava/src/edu/rice/cs/drjava/model/junit/JUnitErrorModel.java b/drjava/src/edu/rice/cs/drjava/model/junit/JUnitErrorModel.java index 23295b713..2522f87a8 100644 --- a/drjava/src/edu/rice/cs/drjava/model/junit/JUnitErrorModel.java +++ b/drjava/src/edu/rice/cs/drjava/model/junit/JUnitErrorModel.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.junit; import edu.rice.cs.drjava.model.GlobalModel; diff --git a/drjava/src/edu/rice/cs/drjava/model/junit/JUnitErrorModelTest.java b/drjava/src/edu/rice/cs/drjava/model/junit/JUnitErrorModelTest.java index e67f067b3..d74ac1c1b 100644 --- a/drjava/src/edu/rice/cs/drjava/model/junit/JUnitErrorModelTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/junit/JUnitErrorModelTest.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.junit; import edu.rice.cs.drjava.model.GlobalModelTestCase; @@ -210,25 +202,17 @@ public void run() { // Wait until events triggered by running unit tests have cleared ? (should be done by code above) // Utilities.clearEventQueue(); - _log.log("Event queue cleared"); +// _log.log("Event queue cleared"); _m = _model.getJUnitModel().getJUnitErrorModel(); - //JUnitError[] errorsWithPositions = _m.getErrorsWithPositions(); - //JUnitError[] errorsWithoutPositions = _m.getErrorsWithoutPositions(); - //assertTrue("testResults should not be null", testResults != null); - assertEquals("the test results should have one error and one failure " + _m.getNumErrors(), 2, _m.getNumErrors()); - assertEquals("test case has one error reported" + _m.getError(0).message(), _m.getError(0).isWarning(), false); - assertEquals("test case has one failure reported" + _m.getError(1).message(), _m.getError(1).isWarning(), true); //_model.setResetAfterCompile(true); //final TestResult testResults = doc.startJUnit(); _log.log("testErrorArrayInOrder complete"); - //_m = new JUnitErrorModel(doc.getDocument(), "MonkeyTestFail", testResults); - debug.logEnd(); } /** Tests that a VerifyError is reported as an error, rather than diff --git a/drjava/src/edu/rice/cs/drjava/model/junit/JUnitEventNotifier.java b/drjava/src/edu/rice/cs/drjava/model/junit/JUnitEventNotifier.java index 15117791f..8214c438a 100644 --- a/drjava/src/edu/rice/cs/drjava/model/junit/JUnitEventNotifier.java +++ b/drjava/src/edu/rice/cs/drjava/model/junit/JUnitEventNotifier.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.junit; import edu.rice.cs.drjava.model.EventNotifier; diff --git a/drjava/src/edu/rice/cs/drjava/model/junit/JUnitListener.java b/drjava/src/edu/rice/cs/drjava/model/junit/JUnitListener.java index a3810fdb6..a36444584 100644 --- a/drjava/src/edu/rice/cs/drjava/model/junit/JUnitListener.java +++ b/drjava/src/edu/rice/cs/drjava/model/junit/JUnitListener.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.junit; import edu.rice.cs.drjava.model.compiler.CompilerListener; diff --git a/drjava/src/edu/rice/cs/drjava/model/junit/JUnitModel.java b/drjava/src/edu/rice/cs/drjava/model/junit/JUnitModel.java index c662158af..364881d57 100644 --- a/drjava/src/edu/rice/cs/drjava/model/junit/JUnitModel.java +++ b/drjava/src/edu/rice/cs/drjava/model/junit/JUnitModel.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.junit; import java.io.IOException; @@ -46,16 +38,16 @@ public interface JUnitModel { //-------------------------- Field Setters --------------------------------// /** @param c true if a coverage report is desired; false otherwise - * @param p value to set the outdir path to - */ + * @param p value to set the outdir path to + */ public void setCoverage(boolean c, String p); /** Set the forceTestSuffix flag that forces class names in projects to end in "Test - * @param b true if call names are to be forced to end in "Test", false otherwise - */ + * @param b true if call names are to be forced to end in "Test", false otherwise + */ public void setForceTestSuffix(boolean b); - public JUnitResultTuple getLastResult(); + public JUnitResultTuple getFinalResult(); public boolean getCoverage(); //-------------------------- Listener Management --------------------------// diff --git a/drjava/src/edu/rice/cs/drjava/model/junit/JUnitModelCallback.java b/drjava/src/edu/rice/cs/drjava/model/junit/JUnitModelCallback.java index 7dca33e24..8d6f604bb 100644 --- a/drjava/src/edu/rice/cs/drjava/model/junit/JUnitModelCallback.java +++ b/drjava/src/edu/rice/cs/drjava/model/junit/JUnitModelCallback.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.junit; import java.io.File; diff --git a/drjava/src/edu/rice/cs/drjava/model/junit/JUnitTestManager.java b/drjava/src/edu/rice/cs/drjava/model/junit/JUnitTestManager.java index 2fa4fbba0..fb59c6f40 100644 --- a/drjava/src/edu/rice/cs/drjava/model/junit/JUnitTestManager.java +++ b/drjava/src/edu/rice/cs/drjava/model/junit/JUnitTestManager.java @@ -1,94 +1,102 @@ /*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.junit; -import junit.framework.*; - import java.io.File; -import java.io.FileInputStream; -import java.io.PrintWriter; -import java.io.StringWriter; +import java.io.InputStream; -import java.util.Enumeration; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLClassLoader; + +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; + +import java.util.ArrayList; +import java.util.LinkedList; import java.util.List; import java.util.Map; -import java.util.ArrayList; +import java.util.Enumeration; +import java.util.Arrays; + +import edu.rice.cs.drjava.model.coverage.CoverageMetadata; +import edu.rice.cs.drjava.model.coverage.ReportGenerator; + +import edu.rice.cs.drjava.model.repl.newjvm.ClassPathManager; import edu.rice.cs.util.Log; +import edu.rice.cs.util.UnexpectedException; import edu.rice.cs.util.classloader.ClassFileError; + import edu.rice.cs.plt.io.IOUtil; -import edu.rice.cs.plt.lambda.Lambda; import edu.rice.cs.plt.tuple.Pair; import edu.rice.cs.plt.iter.IterUtil; -import edu.rice.cs.plt.reflect.ShadowingClassLoader; -import java.lang.reflect.Modifier; +import edu.rice.cs.drjava.model.coverage.JacocoClassLoader; +import edu.rice.cs.plt.reflect.EmptyClassLoader; -import static edu.rice.cs.plt.debug.DebugUtil.debug; import static edu.rice.cs.plt.debug.DebugUtil.error; -import edu.rice.cs.drjava.model.compiler.LanguageLevelStackTraceMapper; +import junit.framework.JUnit4TestAdapter; + +import junit.framework.AssertionFailedError; + +import junit.framework.Test; +import junit.framework.TestResult; +import junit.framework.TestSuite; +import junit.framework.TestFailure; +import junit.framework.JUnit4TestCaseFacade; import org.jacoco.core.analysis.Analyzer; import org.jacoco.core.analysis.CoverageBuilder; import org.jacoco.core.analysis.IBundleCoverage; import org.jacoco.core.data.ExecutionDataStore; import org.jacoco.core.data.SessionInfoStore; + import org.jacoco.core.instr.Instrumenter; import org.jacoco.core.runtime.IRuntime; import org.jacoco.core.runtime.LoggerRuntime; import org.jacoco.core.runtime.RuntimeData; -import edu.rice.cs.drjava.model.coverage.*; - -import edu.rice.cs.util.UnexpectedException; /** Runs in the InterpreterJVM. Runs tests given a classname and formats the results into a (serializable) array of * JUnitError that can be passed back to the MainJVM. * @version $Id$ */ public class JUnitTestManager { - - protected static final Log _log = new Log("JUnitTestManager.txt", false); + + protected static final Log _log = new Log("GlobalModel.txt", false); /** The interface to the master JVM via RMI. */ private final JUnitModelCallback _jmc; /** A factory producing a ClassLoader for tests with the given parent */ - private final Lambda _loaderFactory; + private final ClassPathManager _classPathManager; /** The current testRunner; initially null. Each test suite requires a new runner. */ private JUnitTestRunner _testRunner; @@ -99,109 +107,100 @@ public class JUnitTestManager { /** The accumulated list of names of TestCase classes; null if no test is pending. */ private List _testClassNames = null; + /** The accumulated list of names of nonTestCase classes. */ + private List _nonTestClassNames = null; + /** The list of files corresponding to testClassNames; null if no test is pending. */ private List _testFiles = null; - // For JaCoCo - private String coverageOutdir = null; - private IRuntime runtime = null; - private RuntimeData myData = null; - private List classNames = null; - private List files = null; - private JUnitResultTuple lastResult = new JUnitResultTuple(false, null); - + // Create and initialize fields for JaCoCo + private String _coverageOutdir = null; + private IRuntime _runtime = null; + private RuntimeData _myData = null; + private JUnitResultTuple _finalResult = new JUnitResultTuple(false, null); + /** Standard constructor - * @param jmc a JUnitModelCallback - * @param loaderFactory factory to create class loaders - */ - public JUnitTestManager(JUnitModelCallback jmc, Lambda loaderFactory) { + * @param jmc a JUnitModelCallback + * @param loaderFactory factory to create class loaders + */ + public JUnitTestManager(JUnitModelCallback jmc, ClassPathManager loaderFactory) { _jmc = jmc; - _loaderFactory = loaderFactory; + _classPathManager = loaderFactory; } - + /** @return result of the last JUnit run */ - public JUnitResultTuple getLastResult() { - return this.lastResult; + public JUnitResultTuple getFinalResult() { return _finalResult; } + + /** Used to load class files in the analysis phase of code coverage + * @return URLClassLoader with DrJava classpath + */ + private URLClassLoader newURLLoader() { + List urls = new LinkedList(); + for (File f : _classPathManager.getClassPath()) { + try { urls.add(f.toURI().toURL()); } + catch (IllegalArgumentException e) { error.log(e); } + catch (MalformedURLException e) { error.log(e); } + // just skip the path element if there's an error + } + return new URLClassLoader(urls.toArray(new URL[urls.size()]), EmptyClassLoader.INSTANCE); } /** Find the test classes among the given classNames and accumulate them in - * TestSuite for junit. Returns null if a test suite is already pending. - * @param classNames the (fully qualified) class names that are test class candidates - * @param Java File objects for the source files corresponding to classNames - * @param coverageMetadata metadata to be used to generate the coverage report - * @return list of test class names - */ - public List findTestClasses(final List classNames, - final List files, CoverageMetadata coverageMetadata) { - + * TestSuite for junit. Returns null if a test suite is already pending. + * @param classNames the (fully qualified) class names that are test class candidates + * @param files Java File objects for the source files corresponding to classNames + * @param coverageMetadata metadata to be used to generate the coverage report + * @return list of test class names + */ + @SuppressWarnings({"unchecked","rawtypes"}) + public List findTestClasses(final List classNames, final List files, + final CoverageMetadata coverageMetadata) { + + _log.log("findTestClasses(" + classNames + ", " + files + ", " + coverageMetadata + ") called"); boolean doCoverage = coverageMetadata.getFlag(); - + // Set up the loader + final ClassLoader defaultLoader = JUnitTestManager.class.getClassLoader(); final ClassLoader loader; - if (!doCoverage) { - loader = JUnitTestManager.class.getClassLoader(); - } else { - - // JaCoCo: Create instrumented versions of class files. - this.coverageOutdir = coverageMetadata.getOutdirPath(); - this.runtime = new LoggerRuntime(); - this.myData = new RuntimeData(); - this.classNames = classNames; - this.files = files; - final ArrayList instrumenteds = new ArrayList(); - - // The Instrumenter creates a modified version of our test target class - // that contains additional probes for execution data recording: - for (int i = 0 ; i< files.size() ; i++) { - - // Instrument the i-th file - try { - final Instrumenter instr = new Instrumenter(this.runtime); - final byte[] instrumented = instr.instrument( - new FileInputStream(files.get(i).getCanonicalPath(). - replace(".java", ".class")), classNames.get(i)); - String[] pathParts = files.get(i).getAbsolutePath().split("/"); - instrumenteds.add(instrumented); - - } catch (Exception e) { - StringWriter stackTrace = new StringWriter(); - e.printStackTrace(new PrintWriter(stackTrace)); - //Utilities.show("Exception during instrumentation: " + stackTrace.toString()); - } - } - - loader = new MemoryClassLoader(); - for (int i = 0; i < classNames.size(); i++) { - ((MemoryClassLoader)loader).addDefinition(classNames.get(i), instrumenteds.get(i)); - } - - try { - this.runtime.startup(myData); - } catch (Exception e) { - throw new UnexpectedException(e); - } + if (! doCoverage) loader = _classPathManager.value(defaultLoader); + else { + // create a Jacoco runtime, output directory, report descriptors, and loader + _coverageOutdir = coverageMetadata.getOutdirPath(); + _runtime = new LoggerRuntime(); + _myData = new RuntimeData(); + loader = new JacocoClassLoader(_classPathManager.getClassPath(), new Instrumenter(_runtime), defaultLoader); + try { _runtime.startup(_myData); } + catch (Exception e) { + _log.log("In code coverage startup, throwing the wrapped exception " + e); + throw new UnexpectedException(e); + } } - -// debug.logStart(new String[]{"classNames", "files"}, classNames, files); - _log.log("findTestClasses(" + classNames + ", " + files + ")"); if (_testClassNames != null && ! _testClassNames.isEmpty()) throw new IllegalStateException("Test suite is still pending!"); + _log.log("Preparing to run test cases"); _testRunner = makeRunner(loader); - _testClassNames = new ArrayList(); + _testClassNames = new ArrayList(classNames.size()); _testFiles = new ArrayList(); + _nonTestClassNames = new ArrayList(classNames.size()); _suite = new TestSuite(); - + + // Assemble test suite (as _suite) and return list of test class names for (Pair pair : IterUtil.zip(classNames, files)) { String cName = pair.first(); try { Class possibleTest = _testRunner.loadPossibleTest(cName); + _log.log("Exploring possibleTest " + possibleTest); if (_isJUnitTest(possibleTest)) { _testClassNames.add(cName); _testFiles.add(pair.second()); - _suite.addTest(new JUnit4TestAdapter(possibleTest)); + _suite.addTest(new JUnit4TestAdapter(possibleTest)); + _log.log("Adding test " + possibleTest + " to test suite"); + } else { // cName is a program class that is not a test class + _nonTestClassNames.add(cName); + _log.log("adding " + cName + " to nonTestClassNames"); } } catch (ClassNotFoundException e) { error.log(e); } @@ -213,8 +212,9 @@ public List findTestClasses(final List classNames, } // debug.logEnd("result", _testClassNames); + _log.log("accumulated non test class names: " + _nonTestClassNames); _log.log("returning: " + _testClassNames); - + return _testClassNames; } @@ -222,102 +222,118 @@ public List findTestClasses(final List classNames, * so no need for explicit synchronization. * @return false if no test suite (even an empty one) has been set up */ - public /* synchronized */ boolean runTestSuite() { - + public boolean runTestSuite() { + _log.log("runTestSuite() called"); if (_testClassNames == null || _testClassNames.isEmpty()) { - this.lastResult = new JUnitResultTuple(false, null); - return false; + _finalResult = new JUnitResultTuple(false, null); + return false; } Map> lineColors = null; - this.lastResult = new JUnitResultTuple(true, null); - -// Utilities.show("runTestSuite() in SlaveJVM called"); + _finalResult = new JUnitResultTuple(true, null); + +// _log.log("runTestSuite() in SlaveJVM called"); + /* Declare fault array for amalgamating errors and failures */ + JUnitError[] faults = new JUnitError[0]; try { -// System.err.println("Calling _testRunner.runSuite(...)"); + _log.log("Calling _testRunner.runSuite(" + _suite + ")"); TestResult result = _testRunner.runSuite(_suite); - JUnitError[] errors = new JUnitError[result.errorCount() + result.failureCount()]; - Enumeration failures = result.failures(); - Enumeration errEnum = result.errors(); + /* A fault is either an error or a failure. */ + int faultCount = result.errorCount() + result.failureCount(); - int i = 0; - - while (errEnum.hasMoreElements()) { - TestFailure tErr = errEnum.nextElement(); - errors[i] = _makeJUnitError(tErr, _testClassNames, true, _testFiles); - i++; - } - - while (failures.hasMoreElements()) { - TestFailure tFail = failures.nextElement(); - errors[i] = _makeJUnitError(tFail, _testClassNames, false, _testFiles); - i++; + if (faultCount > 0) { + + /* NOTE: TestFailure, a JUnit class, is misnamed; it should have been called TestFault with TestFailure + * and TestError as disjoint subtypes (e.g., classes) */ + faults = new JUnitError[faultCount]; + Enumeration failures = result.failures(); + Enumeration errors = result.errors(); + + int i = 0; + + // faults should be called faults! and makeJUnitError should be makeJUnitFault! + while (errors.hasMoreElements()) { + TestFailure error = errors.nextElement(); + faults[i] = _makeJUnitError(error, _testClassNames, true, _testFiles); + i++; + } + + while (failures.hasMoreElements()) { + TestFailure failure = failures.nextElement(); + faults[i] = _makeJUnitError(failure, _testClassNames, false, _testFiles); + i++; + } } - - _reset(); - _jmc.testSuiteEnded(errors); - if (this.runtime != null) { /* doCoverage was true */ + _log.log("Testing doCoverage"); + + if (_runtime != null) { /* doCoverage was true */ + _log.log("Analyzing coverage data for " + _nonTestClassNames); /* Collect session info (including which code was executed) */ - final ExecutionDataStore executionData = new ExecutionDataStore(); + final ExecutionDataStore _executionDataStore = new ExecutionDataStore(); final SessionInfoStore sessionInfos = new SessionInfoStore(); - myData.collect(executionData, sessionInfos, false); - this.runtime.shutdown(); - - /** * Together with the original class definitions we can calculate - * coverage information - */ + _myData.collect(_executionDataStore, sessionInfos, false); + _log.log("Collected coverage information"); + _runtime.shutdown(); + + /** Together with the original class definitions we can calculate coverage information. */ final CoverageBuilder coverageBuilder = new CoverageBuilder(); - final Analyzer analyzer = new Analyzer(executionData, coverageBuilder); - + final Analyzer analyzer = new Analyzer(_executionDataStore, coverageBuilder); + URLClassLoader urlCL = newURLLoader(); + + String cName = null; try { - for (int j = 0; j < classNames.size(); j++) { - analyzer.analyzeClass( - new FileInputStream(this.files.get(j).getCanonicalPath(). - replace(".java", ".class")), this.classNames.get(j)); - } - - /** * Run the structure analyzer on a single class folder to build up - * the coverage model. The process would be similar if the classes - * were in a jar file; typically you would create a bundle for each - * class folder and each jar you want in your report. If you have - * more than one bundle you will need to add a grouping node to your - * report - */ - final IBundleCoverage bundleCoverage = coverageBuilder.getBundle( - this.files.get(0).getParentFile().getName()); - ReportGenerator rg = new ReportGenerator(this.coverageOutdir, - coverageBuilder); - rg.createReport(bundleCoverage, executionData, - sessionInfos, this.files.get(0).getParentFile()); - lineColors = rg.getAllLineColors(); - this.lastResult = new JUnitResultTuple(true, lineColors); - - } catch (Exception e) { - StringWriter stackTrace = new StringWriter(); - e.printStackTrace(new PrintWriter(stackTrace)); - //Utilities.show(stackTrace.toString()); + for (int j = 0; j < _nonTestClassNames.size(); j++) { + cName = _nonTestClassNames.get(j); + InputStream is = urlCL.getResource(cName + ".class").openStream(); + _log.log("Constructed InputStream " + is + " for class " + cName); + analyzer.analyzeClass(is, cName); + } + } catch(Exception e) { + throw new UnexpectedException(e, "Coverage analysis threw this exception while processing class " + cName); } - - /* Reset the runtime */ - this.runtime = null; + + /* Run the structure analyzer on the project source folder to build up the coverage model. In flat file + * mode, only the first source directory (if there are multiple source directories) is analyzed. TODO: + * extend this analysis to all source directories for the open classes in flat file mode. + */ + + _log.log("Generating test coverage"); + IBundleCoverage bundleCoverage = coverageBuilder.getBundle("Coverage Summary"); + ReportGenerator rg = new ReportGenerator(_coverageOutdir, coverageBuilder); + _log.log("Determining project root"); + _log.log("getProjectCP() = " + _classPathManager.getProjectFilesCP()); + File f = _classPathManager.getProjectFilesCP().iterator().next(); + if (! f.exists()) _log.log("****** Project root does not exist!"); + _log.log("Creating coverage report for code base rooted at " + f); + rg.createReport(bundleCoverage, _executionDataStore, sessionInfos, f); + lineColors = rg.getAllLineColors(); + _finalResult = new JUnitResultTuple(true, lineColors); + + } else { + _log.log("runtime was null"); } + /* Reset the runtime */ + _runtime = null; + _reset(); + _jmc.testSuiteEnded(faults); } - + catch (Exception e) { - JUnitError[] errors = new JUnitError[1]; - errors[0] = new JUnitError(null, -1, -1, e.getMessage(), false, "", "", e.toString(), e.getStackTrace()); + faults = new JUnitError[] { + new JUnitError(null, -1, -1, e.getMessage(), false, "", "", e.toString(), e.getStackTrace()) + }; + _log.log("Slave JVM: testSuite ended with faults:" + Arrays.toString(faults)); _reset(); - _jmc.testSuiteEnded(errors); -// new ScrollableDialog(null, "Slave JVM: testSuite ended with errors", "", Arrays.toString(errors)).show(); + _jmc.testSuiteEnded(faults); } - + _log.log("Exiting runTestSuite()"); - return this.lastResult.getRetval(); + return _finalResult.getRetval(); } private void _reset() { @@ -327,19 +343,24 @@ private void _reset() { _log.log("test manager state reset"); } - - - /** Determines if the given class is a junit Test. + /** Determines if the given class is a junit Test. This determination is not completely accurate. Any method that is + * annotated with a property corresponding to org.junit.Test.class is classified as a test metthod. Hence the + * annotation @ignore is not recognized. * @param c the class to check * @return true iff the given class is an instance of junit.framework.Test */ private boolean _isJUnitTest(Class c) { - - boolean result = (Test.class.isAssignableFrom(c) && !Modifier.isAbstract(c.getModifiers()) && !Modifier.isInterface(c.getModifiers()) || - (new JUnit4TestAdapter(c).getTests().size()>0)) && !new JUnit4TestAdapter(c).getTests().get(0).toString().contains("initializationError") - ; //had to add specific check for initializationError. Is there a better way of checking if a class contains a test? - debug.logValues(new String[]{"c", "isJUnitTest(c)"}, c, result); - return result; + _log.log("Testing class " + c + " to determine if it is a JUnit test class"); + + // test first for JUnit 4 annotated test methods + for (Method method : c.getDeclaredMethods()) { + if (method.isAnnotationPresent(org.junit.Test.class)) return true; + }; + // now test for conventional JUnit 3 test classes (which must extend org.junit.Test.class + boolean isAbstract = Modifier.isAbstract(c.getModifiers()); + boolean isInterface = Modifier.isInterface(c.getModifiers()); + if (isAbstract || isInterface) return false; + return (Test.class.isAssignableFrom(c)); } /** Constructs a new JUnitError from a TestFailure @@ -351,12 +372,10 @@ private boolean _isJUnitTest(Class c) { */ private JUnitError _makeJUnitError(TestFailure failure, List classNames, boolean isError, List files) { -// Utilities.show("_makeJUnitError called with failure " + failure + " failedTest = " + failure.failedTest()); +// _log.log("_makeJUnitError called with failure " + failure + " failedTest = " + failure.failedTest()); Test failedTest = failure.failedTest(); String testName; - /*if (failedTest instanceof TestCase) testName = ((TestCase)failedTest).getName(); - else */ if(failedTest instanceof JUnit4TestCaseFacade) - { + if (failedTest instanceof JUnit4TestCaseFacade) { testName = ((JUnit4TestCaseFacade) failedTest).toString(); testName = testName.substring(0,testName.indexOf('(')); //shaves off the class from TestName string } @@ -374,9 +393,9 @@ private JUnitError _makeJUnitError(TestFailure failure, List classNames, else className = testString.substring(0, firstIndex-1); - + String classNameAndTest = className + "." + testName; -// Utilities.show("classNameAndTest = " + classNameAndTest); +// _log.log("classNameAndTest = " + classNameAndTest); String exception = failure.thrownException().toString(); StackTraceElement[] stackTrace = failure.thrownException().getStackTrace(); @@ -435,21 +454,22 @@ private JUnitError _makeJUnitError(TestFailure failure, List classNames, catch (NumberFormatException e) { lineNum = 0; } // may be native method } } - + if (lineNum < 0) { lineNum = _lineNumber(combined, classNameAndTest); } -// if (lineNum > -1) _errorsWithPos++; - +// if (lineNum > -1) _faultsWithPos++; + String message = (isError) ? failure.thrownException().toString(): failure.thrownException().getMessage(); - - boolean isFailure = (failure.thrownException() instanceof AssertionError || failure.thrownException() instanceof AssertionFailedError) && - !classNameAndTest.equals("junit.framework.TestSuite$1.warning"); + + boolean isFailure = (failure.thrownException() instanceof AssertionError || + failure.thrownException() instanceof AssertionFailedError) && + !classNameAndTest.equals("junit.framework.TestSuite$1.warning"); // for debugging -// try{ +// try { // File temp = File.createTempFile("asdf", "java", new File("/home/awulf")); // FileWriter writer = new FileWriter(temp); // writer.write("testString: " + testString + "\n"); @@ -483,16 +503,16 @@ private JUnitError _makeJUnitError(TestFailure failure, List classNames, } /** Parses the line number out of the stack trace in the given class name. - * @param sw stack trace - * @param classname class in which stack trace was generated - * @return the line number - */ + * @param sw stack trace + * @param classname class in which stack trace was generated + * @return the line number + */ private int _lineNumber(String sw, String classname) { // TODO: use stack trace elements to find line number int lineNum; int idxClassname = sw.indexOf(classname); if (idxClassname == -1) return -1; - + String theLine = sw.substring(idxClassname, sw.length()); theLine = theLine.substring(theLine.indexOf(classname), theLine.length()); @@ -508,10 +528,10 @@ private int _lineNumber(String sw, String classname) { return lineNum; } - /** @param current template for the runner's class loader - * @return a fresh JUnitTestRunner with its own class loader instance. - */ - private JUnitTestRunner makeRunner(ClassLoader current) { - return new JUnitTestRunner(_jmc, _loaderFactory.value(current)); + /** @param loader current template for the runner's class loader + * @return a fresh JUnitTestRunner with its own class loader instance. + */ + private JUnitTestRunner makeRunner(ClassLoader loader) { + return new JUnitTestRunner(_jmc, loader); } } diff --git a/drjava/src/edu/rice/cs/drjava/model/junit/JUnitTestRunner.java b/drjava/src/edu/rice/cs/drjava/model/junit/JUnitTestRunner.java index 6279f6ac2..b3a805c05 100644 --- a/drjava/src/edu/rice/cs/drjava/model/junit/JUnitTestRunner.java +++ b/drjava/src/edu/rice/cs/drjava/model/junit/JUnitTestRunner.java @@ -1,52 +1,48 @@ /*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.junit; import junit.runner.*; import junit.framework.*; +import edu.rice.cs.util.Log; import edu.rice.cs.util.UnexpectedException; -/** DrJava's own testrunner. It updates the document in the JUnit pane as error and failure events are fired. - * These methods run inan auxiliary thread. +/** Runs in the InterpreterJVM. It uses RMI calls to update the the JUnitPanel as test results are reported. Some methods are + * synchronized to maintain the consistency of local state. These methods run in an auxiliary thread. + * GUI actions must be transferred to the event handling thread (DispatchThread). * @version $Id$ */ public class JUnitTestRunner extends BaseTestRunner { + protected static final Log _log = new Log("JUnitTestManager.txt", false); + /** Receives updates on the test suite's progress. */ private JUnitModelCallback _jmc; @@ -89,7 +85,9 @@ public synchronized TestResult runSuite(TestSuite suite) { } public Class loadPossibleTest(String className) throws ClassNotFoundException { - return _loader.loadClass(className); + Class c =_loader.loadClass(className); + _log.log("Test class " + c + " loaded"); + return c; } @Override protected Class loadSuiteClass(String className) throws ClassNotFoundException { diff --git a/drjava/src/edu/rice/cs/drjava/model/print/DrJavaBook.java b/drjava/src/edu/rice/cs/drjava/model/print/DrJavaBook.java index e04e9a6ac..27d7fd6b0 100644 --- a/drjava/src/edu/rice/cs/drjava/model/print/DrJavaBook.java +++ b/drjava/src/edu/rice/cs/drjava/model/print/DrJavaBook.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.print; import java.util.*; @@ -43,12 +35,12 @@ import java.text.*; /** * The DrJavaBook class is DrJava's implementation of a Pageable object. It - * serves as the control class for printing, and is responsible for - * preparing the print job of previewing or printing given the String - * representation of the document. - * - * @version $Id$ - */ + * serves as the control class for printing, and is responsible for + * preparing the print job of previewing or printing given the String + * representation of the document. + * + * @version $Id$ + */ public class DrJavaBook implements Pageable { private ArrayList _pagePrinters; diff --git a/drjava/src/edu/rice/cs/drjava/model/print/DrJavaBookTest.java b/drjava/src/edu/rice/cs/drjava/model/print/DrJavaBookTest.java index 3198bf6dc..d5749a070 100644 --- a/drjava/src/edu/rice/cs/drjava/model/print/DrJavaBookTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/print/DrJavaBookTest.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.print; import edu.rice.cs.drjava.DrJavaTestCase; diff --git a/drjava/src/edu/rice/cs/drjava/model/print/PagePrinter.java b/drjava/src/edu/rice/cs/drjava/model/print/PagePrinter.java index bdf5785ee..2951ef990 100644 --- a/drjava/src/edu/rice/cs/drjava/model/print/PagePrinter.java +++ b/drjava/src/edu/rice/cs/drjava/model/print/PagePrinter.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.print; import java.util.*; diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/DefaultInteractionsModel.java b/drjava/src/edu/rice/cs/drjava/model/repl/DefaultInteractionsModel.java index 0c952eddc..56c23e21d 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/DefaultInteractionsModel.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/DefaultInteractionsModel.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.repl; import java.io.File; @@ -56,14 +48,14 @@ /** Interactions model which can notify GlobalModelListeners on events. * TODO: remove invokeLater wrappers here and enforce the policy that all of the listener methods must use them - * @version $Id: DefaultInteractionsModel.java 5544 2012-04-27 15:22:12Z rcartwright $ + * @version $Id$ */ public class DefaultInteractionsModel extends RMIInteractionsModel { /** Message to signal that input is required from the console. */ // public static final String INPUT_REQUIRED_MESSAGE = // "Please enter input in the Console tab." + _newLine; - public static final Log _log = new Log("InteractionsModel.txt", false); + public static final Log _log = new Log("GlobalModel.txt", false); /** The global model that includes this interactions model. Provides access to interpreter and console. */ protected final DefaultGlobalModel _model; @@ -153,9 +145,9 @@ public void run() { * This method may run outside the event thread. */ public void interpreterReady(File wd) { + _log.log("****In DefaultInteractionsModel, interpreterReady(" + wd + ") called, resetting interactionsClassPath"); _model.resetInteractionsClassPath(); // Done here rather than in the superclass because _model is available here. super.interpreterReady(wd); - _log.log("****Event: interpreterReady(" + wd +") called"); } /** In the event thread, notifies listeners that an interaction has started. */ diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/DummyInteractionsListener.java b/drjava/src/edu/rice/cs/drjava/model/repl/DummyInteractionsListener.java index f5c4196bd..30ed8a7c2 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/DummyInteractionsListener.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/DummyInteractionsListener.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.repl; import java.io.File; diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/History.java b/drjava/src/edu/rice/cs/drjava/model/repl/History.java index ba4ab8262..cc817ca9f 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/History.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/History.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.repl; import java.util.ArrayList; @@ -82,7 +74,7 @@ public class History implements OptionConstants, Serializable { public void optionChanged (OptionEvent oce) { int newSize = oce.value; // System.err.println("optionChanged called for historyOptionListener; newSize = " + newSize); - setMaxSize(newSize); + setMaximumSize(newSize); } public String toString() { return "HISTORY_MAX_SIZE OptionListener #" + hashCode(); } }; @@ -258,7 +250,7 @@ public void saveTo(OutputStream os) throws IOException { /** Changes the maximum number of interactions remembered by this History. * @param newSize New number of interactions to remember. */ - public void setMaxSize(int newSize) { + public void setMaximumSize(int newSize) { if (newSize < 0) newSize = 0; // Sanity check // Remove old elements if the new size is less than current size diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/HistoryTest.java b/drjava/src/edu/rice/cs/drjava/model/repl/HistoryTest.java index 8555a7145..1c9c3d487 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/HistoryTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/HistoryTest.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.repl; import edu.rice.cs.drjava.DrJava; @@ -151,11 +143,11 @@ public void testLiveUpdateOfHistoryMaxSize() { // Utilities.clearEventQueue(); assertEquals("History size should be 10", 10, _history.size()); - _history.setMaxSize(100); + _history.setMaximumSize(100); assertEquals("History size should still be 10", 10, _history.size()); - _history.setMaxSize(0); + _history.setMaximumSize(0); assertEquals("History size should be 0", 0, _history.size()); Utilities.invokeAndWait(new Runnable() { @@ -342,7 +334,7 @@ public void testMoveMethods() { catch(ArrayIndexOutOfBoundsException e) { } - try{ + try { his.moveNext("3"); fail("Should not have moved next, empty history"); } diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/InputListener.java b/drjava/src/edu/rice/cs/drjava/model/repl/InputListener.java index 054bedeae..de0c1255d 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/InputListener.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/InputListener.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.repl; /** Listens for input requests from System.in. diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsDJDocument.java b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsDJDocument.java index 13779d78a..86858fbfe 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsDJDocument.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsDJDocument.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.repl; import edu.rice.cs.drjava.model.AbstractDJDocument; @@ -83,7 +75,6 @@ public InteractionsDJDocument() { _notifier = new GlobalEventNotifier(); // so this isn't null } - public InteractionsDJDocument(GlobalEventNotifier notifier){ super(); _hasPrompt = false; @@ -236,11 +227,11 @@ public Pair, String>[] getStyles() { } /** Attempts to set the coloring on the graphics based upon the content of the styles list - * returns false if the point is not in the list. Only runs in event thread. - * @param point point - * @param g Graphics object - * @return true if coloring was set; false otherwise (e.g. if point was not in the list) - */ + * returns false if the point is not in the list. Only runs in event thread. + * @param point point + * @param g Graphics object + * @return true if coloring was set; false otherwise (e.g. if point was not in the list) + */ public boolean setColoring(int point, Graphics g) { synchronized(_stylesList) { for(Pair,String> p : _stylesList) { @@ -298,10 +289,10 @@ else if (p.second().equals(InteractionsDocument.CHARACTER_RETURN_STYLE)) { } /** Attempts to set the font on the graphics context based upon the styles - * held in the styles list. Only runs in event thread. - * @param point point - * @param g Graphics object - */ + * held in the styles list. Only runs in event thread. + * @param point point + * @param g Graphics object + */ public void setBoldFonts(int point, Graphics g) { synchronized(_stylesList) { for(Pair,String> p : _stylesList) { diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsDJDocumentTest.java b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsDJDocumentTest.java index 9622cdffa..a8518f235 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsDJDocumentTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsDJDocumentTest.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.repl; import edu.rice.cs.drjava.DrJavaTestCase; diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsDocument.java b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsDocument.java index f99493b7b..dd621e964 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsDocument.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsDocument.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.repl; import java.io.*; @@ -301,7 +293,7 @@ public void appendExceptionResult(String message, String styleName) { public void appendSyntaxErrorResult(String message, String interaction, int startRow, int startCol, int endRow, int endCol, String styleName) { try { - if (null == message || "null".equals(message)) message = ""; + if (message == null || message.equals("null")) message = ""; if (message.indexOf("Lexical error") != -1) { int i = message.lastIndexOf(':'); diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsDocumentTest.java b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsDocumentTest.java index 5b0b5b57d..6d5414d0e 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsDocumentTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsDocumentTest.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.repl; import edu.rice.cs.drjava.DrJavaTestCase; diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsEditorKit.java b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsEditorKit.java index e5eff276c..07ce79fd5 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsEditorKit.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsEditorKit.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.repl; import edu.rice.cs.drjava.model.definitions.ColoringGlyphPainter; diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsEventNotifier.java b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsEventNotifier.java index 620441ef4..26af5a5d3 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsEventNotifier.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsEventNotifier.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.repl; import java.io.File; diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsException.java b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsException.java index 500fb723e..f36ba29b8 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsException.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsException.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.repl; /** * Exception to signify that something went wrong during an interaction. diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsListener.java b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsListener.java index 1677cd79a..32d0b57fc 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsListener.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsListener.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.repl; import java.io.File; diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsModel.java b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsModel.java index e961bd2f7..62cdf2e1c 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsModel.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsModel.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.repl; import java.io.*; @@ -133,9 +125,6 @@ public abstract class InteractionsModel implements InteractionsModelCallback { protected volatile String _lastError = null; protected volatile String _secondToLastError = null; - /** Set of classes or packages to import again when a breakpoint is hit. */ - protected final HashSet _autoImportSet = new HashSet(); - /** Constructs an InteractionsModel. The InteractionsPane is created later by the InteractionsController. * As a result, the posting of a banner at the top of InteractionsDocument must be deferred * until after the InteracationsPane has been set up. @@ -211,35 +200,9 @@ public void run() { String text = _document.getCurrentInteraction(); String toEval = text.trim(); _prepareToInterpret(toEval); // Writes a newLine -// if (toEval.startsWith("java ")) toEval = _transformJavaCommand(toEval); -// else if (toEval.startsWith("applet ")) toEval = _transformAppletCommand(toEval); - + toEval = transformCommands(toEval); - if (DrJava.getConfig().getSetting(OptionConstants.DEBUG_AUTO_IMPORT).booleanValue() && - toEval.startsWith("import ")) { - // add the class or package after the import to the set of auto-imports - // NOTE: this only processes import statements until the first non-import statement or comment is reached - // Example: import java.io.File; import java.io.IOException // imports both File and IOException - // Example: import java.io.File; /* comment */ import java.io.IOException // imports only File - // Example: import java.io.File; File f; import java.io.IOException // imports only File - String line = toEval; - do { - line = line.substring("import ".length()); - String substr = line; - int endPos = 0; - while((endPos < substr.length()) && - ((Character.isJavaIdentifierPart(substr.charAt(endPos))) || - (substr.charAt(endPos) == '.') || - (substr.charAt(endPos) == '*'))) ++endPos; - substr = substr.substring(0,endPos); - _autoImportSet.add(substr); - - // remove substr from line - line = line.substring(substr.length()).trim(); - if (!line.startsWith(";")) break; - line = line.substring(1).trim(); - } while(line.startsWith("import ")); - } + _log.log("Preparing to interpret '" + toEval + "'"); final String evalText = toEval; @@ -254,32 +217,6 @@ public void run() { }); } - /** Executes import statements for the classes and packages in the auto-import set. */ - public void autoImport() { - java.util.Vector classes = DrJava.getConfig().getSetting(OptionConstants.INTERACTIONS_AUTO_IMPORT_CLASSES); - final StringBuilder sb = new StringBuilder(); - - for(String s: classes) { - if (s.length() > 0) { - sb.append("import "); - sb.append(s.trim()); - sb.append("; "); - } - } - if (DrJava.getConfig().getSetting(OptionConstants.DEBUG_AUTO_IMPORT).booleanValue()) { - for(String s: _autoImportSet) { - sb.append("import "); - sb.append(s); - sb.append("; "); - } - } - - if (sb.length() > 0) { - interpret(sb.toString()); - _document.insertBeforeLastPrompt("Auto-import: " + sb.toString() + "\n", InteractionsDocument.DEBUGGER_STYLE); - } - } - /** Performs pre-interpretation preparation of the interactions document and * notifies the view. Must run in the event thread for newline to be * inserted at proper time. Assumes that Write Lock is already held. @@ -318,20 +255,18 @@ private void _prepareToInterpret(String text) { public abstract Pair getVariableToString(String var); /** Resets the Java interpreter with working directory wd. - * @param wd the working directory to be set - * @param force true if reset is to be forced - */ + * @param wd the working directory to be set + * @param force true if reset is to be forced (restarting the slave JVM) + */ public final void resetInterpreter(File wd, boolean force) { _workingDirectory = wd; - _autoImportSet.clear(); // clear list when interpreter is reset _resetInterpreter(wd, force); } - /** Resets the Java interpreter. This should only be called from - * resetInterpreter, never directly. - * @param wd the working directory to be set - * @param force true if reset is to be forced - */ + /** Resets the Java interpreter. This should only be called from resetInterpreter, never directly. + * @param wd the working directory to be set + * @param force true if reset is to be forced + */ protected abstract void _resetInterpreter(File wd, boolean force); /** @return the working directory for the current interpreter. */ @@ -750,7 +685,7 @@ public void interpreterResetting() { if (! _waitingForFirstInterpreter) { Utilities.invokeLater(new Runnable() { public void run() { - _document.insertBeforeLastPrompt(" Resetting Interactions ...\n", InteractionsDocument.ERROR_STYLE); + _document.insertBeforeLastPrompt(" Resetting Interactions and Clearing Console ...\n", InteractionsDocument.ERROR_STYLE); _document.setInProgress(true); } }); @@ -896,22 +831,14 @@ private NoInputListener() { } public abstract ConsoleDocument getConsoleDocument(); /** @return the last error, or null if successful. */ - public String getLastError() { - return _lastError; - } + public String getLastError() { return _lastError; } /** @return the second to last error, or null if successful. */ - public String getSecondToLastError() { - return _secondToLastError; - } + public String getSecondToLastError() { return _secondToLastError; } /** Reset the information about the last and second to last error. */ - public void resetLastErrors() { - _lastError = _secondToLastError = null; - } + public void resetLastErrors() { _lastError = _secondToLastError = null; } /** @return the last history item and then removes it, or returns null if the history is empty. */ - public String removeLastFromHistory() { - return _document.removeLastFromHistory(); - } + public String removeLastFromHistory() { return _document.removeLastFromHistory(); } } diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsModelCallback.java b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsModelCallback.java index 1abd84d10..381224d1c 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsModelCallback.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsModelCallback.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.repl; import java.io.File; diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsModelErrorTest.java b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsModelErrorTest.java index e126c91bc..38e253c87 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsModelErrorTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsModelErrorTest.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.repl; import edu.rice.cs.drjava.model.*; @@ -56,7 +48,7 @@ import edu.rice.cs.drjava.model.GlobalModelTestCase; /** Tests errors in an InteractionsModel. - * @version $Id: InteractionsModelErrorTest.java 5236 2010-04-27 01:43:36Z mgricken $ + * @version $Id$ */ public final class InteractionsModelErrorTest extends GlobalModelTestCase { protected static final String UNARY_FUN_NON_PUBLIC_INTERFACE_TEXT = @@ -93,7 +85,7 @@ public InteractionsModelErrorTest() { super(); _classPathManager = new ClassPathManager(ReflectUtil.SYSTEM_CLASS_PATH); - _interpreterLoader = _classPathManager.makeClassLoader(null); + _interpreterLoader = _classPathManager.makeClassLoader(InterpreterJVM.class.getClassLoader()); // _interpreterOptions = Options.DEFAULT; _interpreterOptions = new InteractionsPaneOptions(); diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsModelTest.java b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsModelTest.java index 6f866bee6..356f3a187 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsModelTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsModelTest.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.repl; import edu.rice.cs.drjava.DrJavaTestCase; diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsPaneOptions.java b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsPaneOptions.java index 22b0514f2..6fc1a4d8b 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsPaneOptions.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsPaneOptions.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.repl; import edu.rice.cs.dynamicjava.Options; diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsScriptModel.java b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsScriptModel.java index 9ad6a618d..212daca8e 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsScriptModel.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/InteractionsScriptModel.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.repl; import java.awt.EventQueue; diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/InterpreterInterruptedException.java b/drjava/src/edu/rice/cs/drjava/model/repl/InterpreterInterruptedException.java index 2488239dc..286e15f01 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/InterpreterInterruptedException.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/InterpreterInterruptedException.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.repl; /** * Exception to signify that the interpreter was interrupted diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/JavaInterpreterTest.java b/drjava/src/edu/rice/cs/drjava/model/repl/JavaInterpreterTest.java index 40537ea17..bb759eb64 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/JavaInterpreterTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/JavaInterpreterTest.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.repl; import edu.rice.cs.drjava.model.repl.newjvm.*; @@ -71,7 +63,7 @@ protected void setUp() throws Exception { // _interpreter = new DynamicJavaAdapter(new ClassPathManager()); // testValue = false; _classPathManager = new ClassPathManager(ReflectUtil.SYSTEM_CLASS_PATH); - _interpreterLoader = _classPathManager.makeClassLoader(null); + _interpreterLoader = _classPathManager.makeClassLoader(InterpreterJVM.class.getClassLoader()); // _interpreterOptions = Options.DEFAULT; _interpreterOptions = new InteractionsPaneOptions(); diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/RMIInteractionsModel.java b/drjava/src/edu/rice/cs/drjava/model/repl/RMIInteractionsModel.java index 5e538dae2..040260f16 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/RMIInteractionsModel.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/RMIInteractionsModel.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.repl; import edu.rice.cs.drjava.model.repl.newjvm.*; diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/SimpleInteractionsModel.java b/drjava/src/edu/rice/cs/drjava/model/repl/SimpleInteractionsModel.java index 01a2ee1a8..569f0d709 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/SimpleInteractionsModel.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/SimpleInteractionsModel.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.repl; import java.io.File; diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/ClassPathManager.java b/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/ClassPathManager.java index ba406f78c..6f4a2ef3b 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/ClassPathManager.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/ClassPathManager.java @@ -1,54 +1,51 @@ /*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.repl.newjvm; import java.io.File; import java.util.LinkedList; import java.lang.ClassLoader; + import edu.rice.cs.plt.io.IOUtil; import edu.rice.cs.plt.iter.IterUtil; import edu.rice.cs.plt.lambda.Lambda; import edu.rice.cs.plt.reflect.PathClassLoader; -/** * Maintains a dynamic class path, allowing entries to be incrementally added in the appropriate - * place in the list. This class is used in the interpreter JVM, and may be accessed concurrently. - */ +import edu.rice.cs.util.Log; + +/** Maintains a dynamic class path, allowing entries to be incrementally added in the appropriate + * place in the list. This class is used in the interpreter JVM, and may be accessed concurrently. + */ public class ClassPathManager implements Lambda { + public static final Log _log = new Log("GlobalModel.txt", false); + // For thread safety, all accesses to these lists are synchronized on this, and when they are made available // to others (via getters or in the class loader), a snapshot is used. @@ -78,6 +75,7 @@ public ClassPathManager(Iterable builtInCP) { // lazily map the lists to their snapshots -- the snapshot code executes every time // _fullPath is traversed _fullPath = IterUtil.collapse(IterUtil.map(allPaths, _makeSafeSnapshot)); + _log.log("ClassPathManager created in new JVM with _fullPath = " + _fullPath); updateProperty(); } @@ -94,10 +92,9 @@ public Iterable value(Iterable arg) { } }; - /** Adds the entry to the front of the project classpath - * (this is the classpath specified in project properties) - * @param f the file to be added to the classpath - */ + /** Adds the entry to the front of the project classpath (this is the classpath specified in project properties) + * @param f the file to be added to the classpath + */ public synchronized void addProjectCP(File f) { _projectCP.addFirst(f); updateProperty(); } public synchronized Iterable getProjectCP() { return IterUtil.snapshot(_projectCP); } @@ -113,10 +110,9 @@ public synchronized void addBuildDirectoryCP(File f) { public synchronized Iterable getBuildDirectoryCP() { return IterUtil.snapshot(_buildCP); } - /** Adds the entry to the front of the project files classpath (this is the - * classpath for all open project files). - * @param f the file to be added to the classpath - */ + /** Adds the entry to the front of the project files classpath (this is the classpath for all open project files). + * @param f the file to be added to the classpath + */ public synchronized void addProjectFilesCP(File f) { _projectFilesCP.remove(f); // eliminate duplicates _projectFilesCP.addFirst(f); @@ -160,7 +156,7 @@ public synchronized ClassLoader makeClassLoader(ClassLoader parent) { return new PathClassLoader(parent, _fullPath); } - /** Lambda value method */ + /** Lambda value method. In DrJava usage, parent is often null. */ public ClassLoader value(ClassLoader parent) { return makeClassLoader(parent); } /** @return a dynamic view of the full class path. */ diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/InterpretResult.java b/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/InterpretResult.java index 177e8aabe..5ef2bde6e 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/InterpretResult.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/InterpretResult.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.repl.newjvm; import java.io.StringWriter; diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/InterpreterJVM.java b/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/InterpreterJVM.java index 96d90398f..81b11f1a8 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/InterpreterJVM.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/InterpreterJVM.java @@ -1,6 +1,6 @@ /*BEGIN_COPYRIGHT_BLOCK * - * Copyright (c) 2001-2015, 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 @@ -40,13 +40,14 @@ import java.io.*; import java.rmi.*; +import java.awt.EventQueue; // NOTE: Do NOT import/use the config framework in this class! // (This class runs in a different JVM, and will not share the config object) - -import edu.rice.cs.util.OutputStreamRedirector; import edu.rice.cs.util.InputStreamRedirector; +import edu.rice.cs.util.Log; +import edu.rice.cs.util.OutputStreamRedirector; import edu.rice.cs.util.UnexpectedException; import edu.rice.cs.util.classloader.ClassFileError; import edu.rice.cs.util.newjvm.*; @@ -69,8 +70,16 @@ import edu.rice.cs.dynamicjava.symbol.*; import edu.rice.cs.dynamicjava.symbol.type.Type; +//for JShell because dynamicJava does not have support for java9+ +import jdk.jshell.*; +import java.util.List; +import java.util.Locale; +import java.util.stream.Collectors; +import java.util.stream.StreamSupport; + // For Windows focus fix import javax.swing.JDialog; +import javax.tools.StandardLocation; import static edu.rice.cs.plt.debug.DebugUtil.debug; import static edu.rice.cs.plt.debug.DebugUtil.error; @@ -86,11 +95,13 @@ * @version $Id$ */ public class InterpreterJVM extends AbstractSlaveJVM implements InterpreterJVMRemoteI, JUnitModelCallback { + /** log for use in debugging */ + public static final Log _log = new Log("InterpreterJVM.txt", false); /** Singleton instance of this class. */ public static final InterpreterJVM ONLY = new InterpreterJVM(); - // As RMI can lead to parallel threads, all fields must be thread-safe. Collections are wrapped + // As RMI can lead to concurrent threads, all fields must be thread-safe. Collections are wrapped // in synchronized versions. private final InteractionsPaneOptions _interpreterOptions; @@ -98,11 +109,15 @@ public class InterpreterJVM extends AbstractSlaveJVM implements InterpreterJVMRe private final Interpreter _defaultInterpreter; private final Map _interpreters; private final Set _busyInterpreters; + private final JShell _js; // The following variable appears to be useless. // private final Map> _environments; private final ClassPathManager _classPathManager; private final ClassLoader _interpreterLoader; + private StringBuilder output_buf; + private StringBuilder input_buf; + private int num_input_braces; // Lock object for ensuring mutual exclusion on updates and compound accesses private final Object _stateLock = new Object(); @@ -110,15 +125,17 @@ public class InterpreterJVM extends AbstractSlaveJVM implements InterpreterJVMRe /** Responsible for running JUnit tests in this JVM. */ private final JUnitTestManager _junitTestManager; + /** Remote reference to the MainJVM class in DrJava's primary JVM. Assigned ONLY once. */ private volatile MainJVMRemoteI _mainJVM; - + /** Private constructor; use the singleton ONLY instance. */ private InterpreterJVM() { super("Reset Interactions Thread", "Poll DrJava Thread"); + /* Important singleton objects embedded in an InterpreterJVM */ _classPathManager = new ClassPathManager(ReflectUtil.SYSTEM_CLASS_PATH); - _interpreterLoader = _classPathManager.makeClassLoader(null); + _interpreterLoader = _classPathManager.makeClassLoader(InterpreterJVM.class.getClassLoader()); _junitTestManager = new JUnitTestManager(this, _classPathManager); // set the thread context class loader, this way NextGen and Mint can use the interpreter's class loader @@ -127,10 +144,35 @@ private InterpreterJVM() { // _interpreterOptions = Options.DEFAULT; _interpreterOptions = new InteractionsPaneOptions(); _defaultInterpreter = new Interpreter(_interpreterOptions, _interpreterLoader); +// _defaultInterpreter = _interpreters = new HashMap(); _busyInterpreters = new HashSet(); // _environments = new HashMap>(); _activeInterpreter = Pair.make("", _defaultInterpreter); + + // Create a StringBuilder to capture the JShell Output + output_buf = new StringBuilder(); + input_buf = new StringBuilder(); + num_input_braces = 0; + // Create a PrintStream that will write to our StringBuilder + PrintStream printStream = new PrintStream(new OutputStream() { + @Override + public void write(int b) { + output_buf.append((char) b); + } + }); + + try { + _js = JShell.builder() + .out(printStream) + .err(printStream) + .compilerOptions("-classpath", getClassPathString()) + .build(); + } catch(IllegalStateException e) { + //Potentially exit system or try to create a new JShell instance + System.err.println("JShell is not available in this environment"); + throw new RuntimeException(e); + } } /** Actions to perform when this JVM is started (through its superclass, AbstractSlaveJVM). Not synchronized @@ -149,11 +191,12 @@ protected String _getInput() { } } }); - - // redirect stdout + System.setOut(new PrintStream(new OutputStreamRedirector() { public void print(String s) { - try { _mainJVM.systemOutPrint(s); } + try { + _mainJVM.systemOutPrint(s); + } catch (RemoteException re) { error.log(re); throw new UnexpectedException("Main JVM can't be reached for output.\n" + re); @@ -218,7 +261,9 @@ private boolean isBusyInterpreter(Interpreter i) { * local state. * @param s Source code to interpret. */ - public InterpretResult interpret(String s) { return interpret(s, _activeInterpreter.second()); } + public InterpretResult interpret(String s) { + return interpret(s, _activeInterpreter.second()); + } /** Interprets the given string of source code with the given interpreter. The result is returned to * MainJVM via the interpretResult method. @@ -234,48 +279,98 @@ public InterpretResult interpret(String s, String name) { } return interpret(s, i); } - + + /** + * Interprets the given string of code with an instance of JShell and returns the result wrapped in a InterpretResult object + * Currently does NOT support differentiation between different types of results, only treats them as objects. + * Currently does NOT support printing of basic expressions, i.e. "2 + 2" will not print 4 (but it should) + * @param code - the code to be interpreted + * @return InterpretResult - the result of the interpretation + * @throws InterpreterException - in the case the JShell instance is not available or an error occurs during interpretation + */ + private InterpretResult interpretWithJShell(StringBuilder input_buf) throws InterpreterException { + InterpretResult res = null; + //TD set verbosity level so it doesn't freak out over things like semicolons + if (_js == null) { + //TODO create InterpretResultException here + return InterpretResult.exception(new EvaluatorException(new Throwable("An error has occured that has caused the Interpreter to not be available."))); + } + +// System.out.println("Evalulating: " + input_buf.toString()); + List events = _js.eval(input_buf.toString()); + //getting rid of new line character at the end + if (output_buf.length() > 0 && output_buf.charAt(output_buf.length() - 1) == '\n') { + output_buf.setLength(output_buf.length() - 1); + } + + boolean hasError = false; + + //TODO Jshell adds a lot of fluff to the output, try and only get the cause of the error + for (SnippetEvent e : events) { + if (e.status() == Snippet.Status.REJECTED) { + Diag diagnostics = _js.diagnostics(e.snippet()).collect(Collectors.toList()).get(0); + output_buf.append(diagnostics.getMessage(Locale.getDefault())); + res = InterpretResult.exception(new EvaluatorException(new Throwable(output_buf.toString()))); + hasError = true; + } else if (e.value() != null) { + output_buf.append(e.value()).append("\n"); + } + } + + if (!hasError && output_buf.length() > 0) { + // Remove the last newline character added + output_buf.setLength(output_buf.length() - 1); + res = InterpretResult.objectValue(output_buf.toString(), "JShellOutput"); + } + + if (res == null) { + //Setting InterpretResult as an object value rather than doing case work as JShell will internally keep track of state, bypassing need for us to do so + res = InterpretResult.objectValue(output_buf.toString(), "JShellOutput"); + } + + output_buf.setLength(0); + //clear input after setting multiple lines + input_buf.setLength(0); + return res; + } + private InterpretResult interpret(String input, Interpreter interpreter) { - debug.logStart("Interpret " + input); - +// System.out.println("Received input: " + input); boolean available = addBusyInterpreter(interpreter); if (! available) { debug.logEnd(); return InterpretResult.busy(); } - + // set the thread context class loader, this way NextGen and Mint can use the interpreter's class loader Thread.currentThread().setContextClassLoader(_interpreterLoader); // _interpreterLoader is final - - Option result = null; - try { result = interpreter.interpret(input); } + InterpretResult result = null; + + //Branching based on state of input_buffer to decide if we shoudl evalutate or not (i.e. when we are in a multi-line statement) + input_buf.append(input); + if (input.trim().endsWith("{")) { + num_input_braces += 1; + } + + if (num_input_braces > 0) { + if (input.endsWith("}")) { + num_input_braces -= 1; + } + } + + + try { + if (num_input_braces == 0) { + result = interpretWithJShell(input_buf); + } + } catch (InterpreterException e) { debug.logEnd(); return InterpretResult.exception(e); } catch (Throwable e) { debug.logEnd(); return InterpretResult.unexpectedException(e); } finally { removeBusyInterpreter(interpreter); } - - return result.apply(new OptionVisitor() { - public InterpretResult forNone() { return InterpretResult.noValue(); } - public InterpretResult forSome(Object obj) { - if (obj instanceof String) { debug.logEnd(); return InterpretResult.stringValue((String) obj); } - else if (obj instanceof Character) { debug.logEnd(); return InterpretResult.charValue((Character) obj); } - else if (obj instanceof Number) { debug.logEnd(); return InterpretResult.numberValue((Number) obj); } - else if (obj instanceof Boolean) { debug.logEnd(); return InterpretResult.booleanValue((Boolean) obj); } - else { - try { - String resultString = TextUtil.toString(obj); - String resultTypeStr = null; - if (obj!=null) { - Class c = obj.getClass(); - resultTypeStr = getClassName(c); - } - debug.logEnd(); - return InterpretResult.objectValue(resultString,resultTypeStr); - } - catch (Throwable t) { - // an exception occurred during toString - debug.logEnd(); - return InterpretResult.exception(new EvaluatorException(t)); - } - } - } - }); + + if (result == null) { + //TODO create something more robust here + return InterpretResult.noValue(); + } + + return result; } /** Gets the value of the variable with the given name in the current interpreter. @@ -294,7 +389,7 @@ public Object[] getVariableValue(String var) { } //public JUnitResultTuple getLastJUnitResult() { - // return this._junitTestManager.getLastResult(); + // return this._junitTestManager.getFinalResult(); //} /** Gets the value and type string of the variable with the given name in the current interpreter. @@ -538,7 +633,9 @@ public List findTestClasses(List classNames, * and does not involve mutable local state. * @return false if no test suite is cached; true otherwise */ - public boolean runTestSuite() throws RemoteException { return _junitTestManager.runTestSuite(); } + public boolean runTestSuite() throws RemoteException { + return _junitTestManager.runTestSuite(); + } /** Notifies Main JVM that JUnit has been invoked on a non TestCase class. Unsynchronized because it contains a * remote call and does not involve mutable local state. @@ -559,7 +656,7 @@ public void classFileError(ClassFileError e) { catch (RemoteException re) { error.log(re); } } - /** Notifies that a suite of tests has started running. Unsynchronized because it contains a remote call and does + /** Notifies the Main JVM that a suite of tests has started running. Unsynchronized because it contains a remote call and does * not involve mutable local state. * @param numTests The number of tests in the suite to be run. */ @@ -568,7 +665,7 @@ public void testSuiteStarted(int numTests) { catch (RemoteException re) { error.log(re); } } - /** Notifies that a particular test has started. Unsynchronized because it contains a remote call and does not + /** Notifies the Main JVM that a particular test has started. Unsynchronized because it contains a remote call and does not * involve mutable local state. * @param testName The name of the test being started. */ @@ -614,9 +711,16 @@ public void junitJVMReady() { } public void addBuildDirectoryClassPath(File f) { _classPathManager.addBuildDirectoryCP(f); } public void addProjectFilesClassPath(File f) { _classPathManager.addProjectFilesCP(f); } public void addExternalFilesClassPath(File f) { _classPathManager.addExternalFilesCP(f); } + public Iterable getClassPath() { // need to make a serializable snapshot return IterUtil.snapshot(_classPathManager.getClassPath()); } - + + private String getClassPathString() { + Iterable classPathFiles = _classPathManager.getClassPath(); + return StreamSupport.stream(Spliterators.spliteratorUnknownSize(classPathFiles.iterator(), 0), false) // Convert Iterable to Stream + .map(File::getAbsolutePath) + .collect(Collectors.joining(";")); + } } diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/InterpreterJVMRemoteI.java b/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/InterpreterJVMRemoteI.java index 98d0043ab..a58210516 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/InterpreterJVMRemoteI.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/InterpreterJVMRemoteI.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.repl.newjvm; import java.rmi.RemoteException; diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/MainJVM.java b/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/MainJVM.java index 521a74f20..5b0c29603 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/MainJVM.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/MainJVM.java @@ -1,44 +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.repl.newjvm; -import java.rmi.*; +import java.awt.EventQueue; import java.io.*; import java.net.SocketException; +import java.rmi.*; import java.util.List; import java.util.ArrayList; @@ -76,22 +69,22 @@ import static edu.rice.cs.plt.debug.DebugUtil.debug; -/** *

Manages a remote JVM. Includes methods for communication in both directions: MainJVMRemoteI - * provides callbacks allowing the remote JVM to access the model, and a variety of delegating - * methods wrap calls to the InterpreterJVMRemoteI methods, taking care of any RMI-related errors. - * In the case of errors, these interpreter-delegating methods communicate the failure via the - * return value. (Note that it is impossible to guarantee success of these methods -- the remote - * process may exit arbitrarily at any time -- and clients should behave gracefully when failures - * occur.)

- * - *

The current design is flawed: strictly speaking, two sequential interpreter-delegating calls to - * this object may communicate with different JVMs if the remote JVM happens to reset in - * the interim. A better design would return a separate object for interfacing with each unique remote - * JVM. In this way, clients would know that all calls to a certain object would be forwarded to - * the same remote JVM.

- * - * @version $Id$ - */ +/**

Manages a remote JVM. Includes methods for communication in both directions: MainJVMRemoteI + * provides callbacks allowing the remote JVM to access the model, and a variety of delegating + * methods wrap calls to the InterpreterJVMRemoteI methods, taking care of any RMI-related errors. + * In the case of errors, these interpreter-delegating methods communicate the failure via the + * return value. (Note that it is impossible to guarantee success of these methods -- the remote + * process may exit arbitrarily at any time -- and clients should behave gracefully when failures + * occur.)

+ * + *

The current design is flawed: strictly speaking, two sequential interpreter-delegating calls to + * this object may communicate with different JVMs if the remote JVM happens to reset in + * the interim. A better design would return a separate object for interfacing with each unique remote + * JVM. In this way, clients would know that all calls to a certain object would be forwarded to + * the same remote JVM.

+ * + * @version $Id$ + */ public class MainJVM extends AbstractMasterJVM implements MainJVMRemoteI { /** Number of slave startup failures allowed before aborting the startup process. */ @@ -402,7 +395,8 @@ public boolean addBuildDirectoryClassPath(File f) { InterpreterJVMRemoteI remote = _state.value().interpreter(false); if (remote == null) { return false; } try { remote.addBuildDirectoryClassPath(f); return true; } - catch (RemoteException e) { _handleRemoteException(e); return false; } + catch (RemoteException e) { /* ignore exception; it happens in test cases. */ + _handleRemoteException(e); return false; } } /** Blocks until the interpreter is connected. @@ -462,12 +456,12 @@ public boolean setPackageScope(String packageName) { } /** Sets up a JUnit test suite in the Interpreter JVM and finds which classes are really TestCase - * classes (by loading them). Blocks until the interpreter is connected and the operation completes. - * @param classNames the class names to run in a test - * @param files the associated file - * @param coverageMetadata metadata used to generate a coverage report - * @return the class names that are actually test cases - */ + * classes (by loading them). Blocks until the interpreter is connected and the operation completes. + * @param classNames the class names to run in a test + * @param files the associated file + * @param coverageMetadata metadata used to generate a coverage report + * @return the class names that are actually test cases + */ public Option> findTestClasses(List classNames, List files, CoverageMetadata coverageMetadata) { InterpreterJVMRemoteI remote = _state.value().interpreter(false); @@ -608,85 +602,89 @@ private void _doStartup() { List jvmArgs = new ArrayList(); - // ConcJUnit argument: -Xbootclasspath/p:rt.concjunit.jar - // ------------------------------------------------------ - // this section here loops if the rt.concjunit.jar file is - // being re-generated or the settings are changed - final CompletionMonitor cm = new CompletionMonitor(); - boolean repeat; - do { - repeat = false; - File junitLocation = DrJava.getConfig().getSetting(OptionConstants.JUNIT_LOCATION); - boolean javaVersion7 = JavaVersion.CURRENT.supports(JavaVersion.JAVA_7); - // ConcJUnit is available if (a) the built-in framework is used, or (b) the external - // framework is a valid ConcJUnit jar file, AND the compiler is not Java 7 or newer. - boolean concJUnitAvailable = - !javaVersion7 && - (!DrJava.getConfig().getSetting(OptionConstants.JUNIT_LOCATION_ENABLED) || - edu.rice.cs.drjava.model.junit.ConcJUnitUtils.isValidConcJUnitFile(junitLocation)); + /* ConcJUnit is no longer available because it has not been updated beyonnd Java 6 */ + +// // ConcJUnit argument: -Xbootclasspath/p:rt.concjunit.jar +// // ------------------------------------------------------ +// // this section here loops if the rt.concjunit.jar file is +// // being re-generated or the settings are changed +// final CompletionMonitor cm = new CompletionMonitor(); +// boolean repeat; +// do { +// repeat = false; +// File junitLocation = DrJava.getConfig().getSetting(OptionConstants.JUNIT_LOCATION); +// + +// boolean javaVersion7 = JavaVersion.CURRENT.supports(JavaVersion.JAVA_7); +// // ConcJUnit is available if (a) the built-in framework is used, or (b) the external +// // framework is a valid ConcJUnit jar file, AND the compiler is not Java 7 or newer. +// boolean concJUnitAvailable = +// !javaVersion7 && +// (!DrJava.getConfig().getSetting(OptionConstants.JUNIT_LOCATION_ENABLED) || +// edu.rice.cs.drjava.model.junit.ConcJUnitUtils.isValidConcJUnitFile(junitLocation)); - File rtLocation = DrJava.getConfig().getSetting(OptionConstants.RT_CONCJUNIT_LOCATION); - boolean rtLocationConfigured = - edu.rice.cs.drjava.model.junit.ConcJUnitUtils.isValidRTConcJUnitFile(rtLocation); +// File rtLocation = DrJava.getConfig().getSetting(OptionConstants.RT_CONCJUNIT_LOCATION); +// boolean rtLocationConfigured = +// edu.rice.cs.drjava.model.junit.ConcJUnitUtils.isValidRTConcJUnitFile(rtLocation); - if (DrJava.getConfig().getSetting(OptionConstants.CONCJUNIT_CHECKS_ENABLED). - equals(OptionConstants.ConcJUnitCheckChoices.ALL) && // "lucky" enabled - !rtLocationConfigured && // not valid - (rtLocation != null) && // not null - (!FileOps.NULL_FILE.equals(rtLocation)) && // not NULL_FILE - (rtLocation.exists())) { // but exists - // invalid file, clear setting - DrJava.getConfig().setSetting(OptionConstants.CONCJUNIT_CHECKS_ENABLED, - OptionConstants.ConcJUnitCheckChoices.NO_LUCKY); - rtLocationConfigured = false; - javax.swing.JOptionPane.showMessageDialog(null, - "The selected file is invalid and was disabled:\n"+rtLocation, - "Invalid ConcJUnit Runtime File", - javax.swing.JOptionPane.ERROR_MESSAGE); - } - if (concJUnitAvailable && // ConcJUnit available - rtLocationConfigured && // runtime configured - DrJava.getConfig().getSetting(OptionConstants.CONCJUNIT_CHECKS_ENABLED). - equals(OptionConstants.ConcJUnitCheckChoices.ALL)) { // and "lucky" enabled - try { - // NOTE: this is a work-around - // it seems like it's impossible to pass long file names here on Windows - // so we are using a clumsy method that determines the short file name - File shortF = FileOps.getShortFile(rtLocation); - - // check the JavaVersion of the rt.concjunit.jar file to make sure it is compatible - if (edu.rice.cs.drjava.model.junit.ConcJUnitUtils.isCompatibleRTConcJUnitFile(shortF)) { - // enabled, valid and compatible - // add the JVM argument - jvmArgs.add("-Xbootclasspath/p:"+shortF.getAbsolutePath().replace(File.separatorChar, '/')); - } - else { - // enabled, valid but incompatible - // ask to regenerate - repeat = true; // re-check settings - cm.reset(); - boolean attempted = edu.rice.cs.drjava.model.junit.ConcJUnitUtils. - showIncompatibleWantToRegenerateDialog(null, - new Runnable() { public void run() { cm.signal(); } }, // yes - new Runnable() { public void run() { cm.signal(); } }); // no - while(!cm.attemptEnsureSignaled()); // wait for dialog to finish - if (!attempted) { repeat = false; } - } - } - catch(IOException ioe) { - // we couldn't get the short file name (on Windows), disable "lucky" warnings - DrJava.getConfig().setSetting(OptionConstants.CONCJUNIT_CHECKS_ENABLED, - OptionConstants.ConcJUnitCheckChoices.NO_LUCKY); - rtLocationConfigured = false; - javax.swing.JOptionPane.showMessageDialog(null, - "There was a problem with the selected file, and it was disabled:\n"+rtLocation, - "Invalid ConcJUnit Runtime File", - javax.swing.JOptionPane.ERROR_MESSAGE); - } - } - } while(repeat); - // end of the section that may loop - // ------------------------------------------------------ +// if (DrJava.getConfig().getSetting(OptionConstants.CONCJUNIT_CHECKS_ENABLED). +// equals(OptionConstants.ConcJUnitCheckChoices.ALL) && // "lucky" enabled +// !rtLocationConfigured && // not valid +// (rtLocation != null) && // not null +// (!FileOps.NULL_FILE.equals(rtLocation)) && // not NULL_FILE +// (rtLocation.exists())) { // but exists +// // invalid file, clear setting +// DrJava.getConfig().setSetting(OptionConstants.CONCJUNIT_CHECKS_ENABLED, +// OptionConstants.ConcJUnitCheckChoices.NO_LUCKY); +// rtLocationConfigured = false; +// javax.swing.JOptionPane.showMessageDialog(null, +// "The selected file is invalid and was disabled:\n"+rtLocation, +// "Invalid ConcJUnit Runtime File", +// javax.swing.JOptionPane.ERROR_MESSAGE); +// } +// if (concJUnitAvailable && // ConcJUnit available +// rtLocationConfigured && // runtime configured +// DrJava.getConfig().getSetting(OptionConstants.CONCJUNIT_CHECKS_ENABLED). +// equals(OptionConstants.ConcJUnitCheckChoices.ALL)) { // and "lucky" enabled +// try { +// // NOTE: this is a work-around +// // it seems like it's impossible to pass long file names here on Windows +// // so we are using a clumsy method that determines the short file name +// File shortF = FileOps.getShortFile(rtLocation); +// +// // check the JavaVersion of the rt.concjunit.jar file to make sure it is compatible +// if (edu.rice.cs.drjava.model.junit.ConcJUnitUtils.isCompatibleRTConcJUnitFile(shortF)) { +// // enabled, valid and compatible +// // add the JVM argument +// jvmArgs.add("-Xbootclasspath/p:"+shortF.getAbsolutePath().replace(File.separatorChar, '/')); +// } +// else { +// // enabled, valid but incompatible +// // ask to regenerate +// repeat = true; // re-check settings +// cm.reset(); +// boolean attempted = edu.rice.cs.drjava.model.junit.ConcJUnitUtils. +// showIncompatibleWantToRegenerateDialog(null, +// new Runnable() { public void run() { cm.signal(); } }, // yes +// new Runnable() { public void run() { cm.signal(); } }); // no +// while(!cm.attemptEnsureSignaled()); // wait for dialog to finish +// if (!attempted) { repeat = false; } +// } +// } +// catch(IOException ioe) { +// // we couldn't get the short file name (on Windows), disable "lucky" warnings +// DrJava.getConfig().setSetting(OptionConstants.CONCJUNIT_CHECKS_ENABLED, +// OptionConstants.ConcJUnitCheckChoices.NO_LUCKY); +// rtLocationConfigured = false; +// javax.swing.JOptionPane.showMessageDialog(null, +// "There was a problem with the selected file, and it was disabled:\n"+rtLocation, +// "Invalid ConcJUnit Runtime File", +// javax.swing.JOptionPane.ERROR_MESSAGE); +// } +// } +// } while (repeat); +// // end of the section that may loop +// // ------------------------------------------------------ if (_allowAssertions) { jvmArgs.add("-ea"); } int debugPort = _getDebugPort(); @@ -723,49 +721,49 @@ private void _doStartup() { JVMBuilder jvmb = new JVMBuilder(_startupClassPath).directory(dir).jvmArguments(jvmArgs); - // extend classpath if JUnit/ConcJUnit location specified - File junitLocation = DrJava.getConfig().getSetting(OptionConstants.JUNIT_LOCATION); - boolean junitLocationConfigured = - (edu.rice.cs.drjava.model.junit.ConcJUnitUtils.isValidJUnitFile(junitLocation) || - edu.rice.cs.drjava.model.junit.ConcJUnitUtils.isValidConcJUnitFile(junitLocation)); - if (DrJava.getConfig().getSetting(OptionConstants.JUNIT_LOCATION_ENABLED) && // enabled - !junitLocationConfigured && // not valid - (junitLocation != null) && // not null - (!FileOps.NULL_FILE.equals(junitLocation)) && // not NULL_FILE - (junitLocation.exists())) { // but exists - // invalid file, clear setting - DrJava.getConfig().setSetting(OptionConstants.JUNIT_LOCATION_ENABLED, false); - junitLocationConfigured = false; - } - ArrayList extendedClassPath = new ArrayList(); - if (DrJava.getConfig().getSetting(OptionConstants.JUNIT_LOCATION_ENABLED) && - junitLocationConfigured) { - extendedClassPath.add(junitLocation); - } - for(File f: jvmb.classPath()) { extendedClassPath.add(f); } - jvmb = jvmb.classPath(edu.rice.cs.plt.iter.IterUtil.asSizedIterable(extendedClassPath)); +// // extend classpath if JUnit/ConcJUnit location specified +// File junitLocation = DrJava.getConfig().getSetting(OptionConstants.JUNIT_LOCATION); +// boolean junitLocationConfigured = +// (edu.rice.cs.drjava.model.junit.ConcJUnitUtils.isValidJUnitFile(junitLocation) || +// edu.rice.cs.drjava.model.junit.ConcJUnitUtils.isValidConcJUnitFile(junitLocation)); +// if (DrJava.getConfig().getSetting(OptionConstants.JUNIT_LOCATION_ENABLED) && // enabled +// !junitLocationConfigured && // not valid +// (junitLocation != null) && // not null +// (!FileOps.NULL_FILE.equals(junitLocation)) && // not NULL_FILE +// (junitLocation.exists())) { // but exists +// // invalid file, clear setting +// DrJava.getConfig().setSetting(OptionConstants.JUNIT_LOCATION_ENABLED, false); +// junitLocationConfigured = false; +// } +// ArrayList extendedClassPath = new ArrayList(); +// if (DrJava.getConfig().getSetting(OptionConstants.JUNIT_LOCATION_ENABLED) && +// junitLocationConfigured) { +// extendedClassPath.add(junitLocation); +// } +// for(File f: jvmb.classPath()) { extendedClassPath.add(f); } +// jvmb = jvmb.classPath(edu.rice.cs.plt.iter.IterUtil.asSizedIterable(extendedClassPath)); - // add Java properties controlling ConcJUnit - Map props = jvmb.propertiesCopy(); +// // add Java properties controlling ConcJUnit +// Map props = jvmb.propertiesCopy(); - // settings are mutually exclusive - boolean all = DrJava.getConfig().getSetting(OptionConstants.CONCJUNIT_CHECKS_ENABLED). - equals(OptionConstants.ConcJUnitCheckChoices.ALL); - boolean noLucky = DrJava.getConfig().getSetting(OptionConstants.CONCJUNIT_CHECKS_ENABLED). - equals(OptionConstants.ConcJUnitCheckChoices.NO_LUCKY); - boolean none = DrJava.getConfig().getSetting(OptionConstants.CONCJUNIT_CHECKS_ENABLED). - equals(OptionConstants.ConcJUnitCheckChoices.NONE); - // "threads" is enabled as long as the setting isn't NONE - props.put("edu.rice.cs.cunit.concJUnit.check.threads.enabled", - new Boolean(!none).toString()); - // "join" is enabled for ALL and NO_LUCKY - props.put("edu.rice.cs.cunit.concJUnit.check.join.enabled", - new Boolean(all || noLucky).toString()); - // "lucky" is enabled only for ALL - props.put("edu.rice.cs.cunit.concJUnit.check.lucky.enabled", - new Boolean(all).toString()); +// // settings are mutually exclusive +// boolean all = DrJava.getConfig().getSetting(OptionConstants.CONCJUNIT_CHECKS_ENABLED). +// equals(OptionConstants.ConcJUnitCheckChoices.ALL); +// boolean noLucky = DrJava.getConfig().getSetting(OptionConstants.CONCJUNIT_CHECKS_ENABLED). +// equals(OptionConstants.ConcJUnitCheckChoices.NO_LUCKY); +// boolean none = DrJava.getConfig().getSetting(OptionConstants.CONCJUNIT_CHECKS_ENABLED). +// equals(OptionConstants.ConcJUnitCheckChoices.NONE); +// // "threads" is enabled as long as the setting isn't NONE +// props.put("edu.rice.cs.cunit.concJUnit.check.threads.enabled", +// new Boolean(!none).toString()); +// // "join" is enabled for ALL and NO_LUCKY +// props.put("edu.rice.cs.cunit.concJUnit.check.join.enabled", +// new Boolean(all || noLucky).toString()); +// // "lucky" is enabled only for ALL +// props.put("edu.rice.cs.cunit.concJUnit.check.lucky.enabled", +// new Boolean(all).toString()); - jvmb = jvmb.properties(props); +// jvmb = jvmb.properties(props); invokeSlave(jvmb); } diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/MainJVMRemoteI.java b/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/MainJVMRemoteI.java index c9d28f6dc..6dff0e248 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/MainJVMRemoteI.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/MainJVMRemoteI.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.repl.newjvm; import java.io.File; @@ -42,8 +34,7 @@ import edu.rice.cs.drjava.model.junit.JUnitError; import edu.rice.cs.util.classloader.ClassFileError; -/** * This interface specifies the methods that the Main JVM exposes - * for the InterpreterJVM to call. +/** * This interface specifies the methods that the Main JVM exposes for the InterpreterJVM to call. * * @version $Id$ */ diff --git a/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/NewJVMTest.java b/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/NewJVMTest.java index e587eaf19..0c18fc0e0 100644 --- a/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/NewJVMTest.java +++ b/drjava/src/edu/rice/cs/drjava/model/repl/newjvm/NewJVMTest.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.repl.newjvm; import edu.rice.cs.drjava.DrJavaTestCase; @@ -54,30 +46,32 @@ /** Tests the functionality of the new JVM manager. * @version $Id$ */ -public final class NewJVMTest extends DrJavaTestCase { +public final class NewJVMTest extends DrJavaTestCase { private static final Log _log = new Log("MasterSlave.txt", false); private static volatile TestJVMExtension _jvm; - public NewJVMTest(String name) { super(name); } - - public static Test suite() { - TestSuite suite = new TestSuite(NewJVMTest.class); - TestSetup setup = new TestSetup(suite) { - protected void setUp() throws Exception { - super.setUp(); - _jvm = new TestJVMExtension(); - } - protected void tearDown() throws Exception { _jvm.dispose(); } - }; - - return setup; + public NewJVMTest(String name) throws RemoteException { + super(name); + _jvm = new TestJVMExtension(); } +// public static Test suite() { +// TestSuite suite = new TestSuite(NewJVMTest.class); +// TestSetup setup = new TestSetup(suite) { +// protected void setUp() throws Exception { +// super.setUp(); +// _jvm = new TestJVMExtension(); +// } +// protected void tearDown() throws Exception { _jvm.dispose(); } +// }; +// +// return setup; +// } + public void testPrintln() throws Throwable { - debug.logStart(); - _log.log("NewJVMTest.testPrintln executing"); + _log.log("$$$ NewJVMTest.testPrintln executing"); _jvm.resetFlags(); assertTrue(_jvm.interpret("System.err.print(\"err\");")); @@ -94,23 +88,21 @@ public void testPrintln() throws Throwable { assertEquals("system out buffer", "out", _jvm.outBuf()); assertEquals("void return flag", true, _jvm.voidReturnFlag()); - debug.logEnd(); + _log.log("$$$ NewJVMTest.testPrintln completed"); } public void testReturnConstant() throws Throwable { - debug.logStart(); - _log.log("NewJVMTest.testReturnConstant executing"); + _log.log("$$ NewJVMTest.testReturnConstant executing"); _jvm.resetFlags(); assertTrue(_jvm.interpret("5")); assertEquals("result", "5", _jvm.returnBuf()); - debug.logEnd(); + _log.log("$$$ NewJVMTest.testReturnConstant completed"); } public void testWorksAfterRestartConstant() throws Throwable { - debug.logStart(); - _log.log("NewJVMTest.testWorksAfterRestartConstant executing"); + _log.log("$$$ NewJVMTest.testWorksAfterRestartConstant executing"); // Check that a constant is returned _jvm.resetFlags(); @@ -125,24 +117,22 @@ public void testWorksAfterRestartConstant() throws Throwable { assertTrue(_jvm.interpret("4")); assertEquals("result", "4", _jvm.returnBuf()); - debug.logEnd(); + _log.log("$$$ NewJVMTest.testWorksAfterRestartConstant completed"); } public void testThrowRuntimeException() throws Throwable { - debug.logStart(); - _log.log("NewJVMTest.testThrowRuntimeException executing"); + _log.log("$$$ NewJVMTest.testThrowRuntimeException executing"); _jvm.resetFlags(); assertTrue(_jvm.interpret("throw new RuntimeException();")); assertTrue("exception message", _jvm.exceptionMsgBuf().startsWith("java.lang.RuntimeException")); - debug.logEnd(); + _log.log("$$$ NewJVMTest.testThrowRuntimeException completed"); } public void testToStringThrowsRuntimeException() throws Throwable { - debug.logStart(); - _log.log("NewJVMTest.testToStringThrowsRuntimeException executing"); + _log.log("$$$ NewJVMTest.testToStringThrowsRuntimeException executing"); _jvm.resetFlags(); assertTrue(_jvm.interpret("class A { public String toString() { throw new RuntimeException(); } };" + @@ -150,13 +140,13 @@ public void testToStringThrowsRuntimeException() throws Throwable { assertTrue("exception should have been thrown by toString", _jvm.exceptionMsgBuf() != null); - debug.logEnd(); + _log.log("$$$ NewJVMTest.testToStringThrowsRuntimeException completed"); } /** Ensure that switching to a non-existant interpreter throws an Exception. */ public void testSwitchToNonExistantInterpreter() { - debug.logStart(); + _log.log("$$$ NewJVMTest.testSwitchToNonExistantInterpreter executing"); try { _jvm.setActiveInterpreter("thisisabadname"); // System.err.println("outbuf: " + _jvm.outBuf); @@ -165,7 +155,7 @@ public void testSwitchToNonExistantInterpreter() { catch (IllegalArgumentException e) { // good, that's what should happen } - debug.logEnd(); + _log.log("$$$ NewJVMTest.testSwitchToNonExistantInterpreter completed"); } /** Ensure that MainJVM can correctly switch the active interpreter used by @@ -173,7 +163,7 @@ public void testSwitchToNonExistantInterpreter() { * @throws InterruptedException if execution was interrupted unexpectedly */ public void testSwitchActiveInterpreter() throws InterruptedException { - debug.logStart(); + _log.log("$$$ NewJVMTest.testSwitchActiveInterpreter executing"); assertTrue(_jvm.interpret("int x = 6;")); _jvm.addInterpreter("monkey"); @@ -203,8 +193,7 @@ public void testSwitchActiveInterpreter() throws InterruptedException { // _jvm.interpret("x + "); // assertTrue("syntax error was reported", // ! _jvm.syntaxErrorMsgBuf.equals("") ); -// } - debug.logEnd(); + _log.log("$$$ NewJVMTest.testSwitchActiveInterpreter executing"); } private static class TestJVMExtension extends MainJVM { diff --git a/drjava/src/edu/rice/cs/drjava/platform/DefaultPlatform.java b/drjava/src/edu/rice/cs/drjava/platform/DefaultPlatform.java index cf8d3ab4e..235cf5653 100644 --- a/drjava/src/edu/rice/cs/drjava/platform/DefaultPlatform.java +++ b/drjava/src/edu/rice/cs/drjava/platform/DefaultPlatform.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.platform; import edu.rice.cs.drjava.DrJava; @@ -218,15 +210,15 @@ public void setMnemonicAt(javax.swing.JTabbedPane obj, int tabIndex, int mnemoni /** @return true if file extensions can be registered and unregistered. */ public boolean canRegisterFileExtensions() { return false; } - /** Register .drjava and .djapp file extensions. + /** Register .drjava file extension. * @return true if registering succeeded */ public boolean registerDrJavaFileExtensions() { return false; } - /** Unregister .drjava and .djapp file extensions. + /** Unregister .drjava file extensions. * @return true if unregistering succeeded */ public boolean unregisterDrJavaFileExtensions() { return false; } - /** @return true if .drjava and .djapp file extensions are registered. */ + /** @return true if .drjava file extension is registered. */ public boolean areDrJavaFileExtensionsRegistered() { return false; } /** Register .java file extension. diff --git a/drjava/src/edu/rice/cs/drjava/platform/PlatformFactory.java b/drjava/src/edu/rice/cs/drjava/platform/PlatformFactory.java index 9fcff438b..2bdd1d35f 100644 --- a/drjava/src/edu/rice/cs/drjava/platform/PlatformFactory.java +++ b/drjava/src/edu/rice/cs/drjava/platform/PlatformFactory.java @@ -1,51 +1,42 @@ /*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.platform; -/** * Factory class for accessing the appropriate platform-specific implementation - * of the PlatformSupport interface. - * @version $Id$ - * @see PlatformSupport - */ +/** Factory class for accessing the appropriate platform-specific implementation of the PlatformSupport interface. + * @version $Id$ + * @see PlatformSupport + */ public class PlatformFactory { /** A platform-appropriate implementation of the PlatformSupport interface - * Singleton field populated by the static factory method. - */ + * Singleton field populated by the static factory method. + */ public static final PlatformSupport ONLY = getPlatformSupport(); /** Static factory method. @@ -55,8 +46,10 @@ private static PlatformSupport getPlatformSupport() { // Get OS name string; we expect one of "windows xp", "mac os x", etc. String os = System.getProperty("os.name").toLowerCase(); + String java_version = System.getProperty("java.version").toLowerCase(); - if (os.startsWith("mac os x")) return MacPlatform.ONLY; + if (os.startsWith("mac os x") && java_version.startsWith("1.")) return MacPlatformJava8.ONLY; + else if (os.startsWith("mac os x")) return MacPlatform.ONLY; else if (os.startsWith("windows")) return WindowsPlatform.ONLY; else return DefaultPlatform.ONLY; } diff --git a/drjava/src/edu/rice/cs/drjava/platform/PlatformSupport.java b/drjava/src/edu/rice/cs/drjava/platform/PlatformSupport.java index dd28b36bc..a945664b5 100644 --- a/drjava/src/edu/rice/cs/drjava/platform/PlatformSupport.java +++ b/drjava/src/edu/rice/cs/drjava/platform/PlatformSupport.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.platform; import javax.swing.Action; @@ -116,15 +108,15 @@ public interface PlatformSupport { /** @return true if file extensions can be registered and unregistered. */ public boolean canRegisterFileExtensions(); - /** Register .drjava and .djapp file extensions. + /** Register .drjava file extensions. * @return true if registering succeeded */ public boolean registerDrJavaFileExtensions(); - /** Unregister .drjava and .djapp file extensions. + /** Unregister .drjava file extensions. * @return true if unregistering succeeded */ public boolean unregisterDrJavaFileExtensions(); - /** @return true if .drjava and .djapp file extensions are registered. */ + /** @return true if .drjava file extensions are registered. */ public boolean areDrJavaFileExtensionsRegistered(); /** Register .java file extension. diff --git a/drjava/src/edu/rice/cs/drjava/project/DocFile.java b/drjava/src/edu/rice/cs/drjava/project/DocFile.java index ecda6e15a..ad27ed8e9 100644 --- a/drjava/src/edu/rice/cs/drjava/project/DocFile.java +++ b/drjava/src/edu/rice/cs/drjava/project/DocFile.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.project; import java.io.File; diff --git a/drjava/src/edu/rice/cs/drjava/project/DocumentInfoGetter.java b/drjava/src/edu/rice/cs/drjava/project/DocumentInfoGetter.java index 2a870e1ac..467ae4017 100644 --- a/drjava/src/edu/rice/cs/drjava/project/DocumentInfoGetter.java +++ b/drjava/src/edu/rice/cs/drjava/project/DocumentInfoGetter.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.project; import java.io.File; diff --git a/drjava/src/edu/rice/cs/drjava/project/MalformedProjectFileException.java b/drjava/src/edu/rice/cs/drjava/project/MalformedProjectFileException.java index ffad47470..0de931ade 100644 --- a/drjava/src/edu/rice/cs/drjava/project/MalformedProjectFileException.java +++ b/drjava/src/edu/rice/cs/drjava/project/MalformedProjectFileException.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.project; /** * The exception thrown when a project file which was being parsed did not conform to the expected structure. diff --git a/drjava/src/edu/rice/cs/drjava/project/ProjectFileIR.java b/drjava/src/edu/rice/cs/drjava/project/ProjectFileIR.java index 712be5874..be9accca0 100644 --- a/drjava/src/edu/rice/cs/drjava/project/ProjectFileIR.java +++ b/drjava/src/edu/rice/cs/drjava/project/ProjectFileIR.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.project; import java.io.*; diff --git a/drjava/src/edu/rice/cs/drjava/project/ProjectFileParser.java b/drjava/src/edu/rice/cs/drjava/project/ProjectFileParser.java index 182713c4a..7543108fc 100644 --- a/drjava/src/edu/rice/cs/drjava/project/ProjectFileParser.java +++ b/drjava/src/edu/rice/cs/drjava/project/ProjectFileParser.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.project; import java.io.File; @@ -138,8 +130,8 @@ else if (name.compareToIgnoreCase("proj-root-and-base") == 0) { // source file p _srcFileBase = root.getCanonicalPath(); }else if (name.compareToIgnoreCase("proj-manifest") == 0) { List sList = exp.getRest().accept(PathListVisitor.ONLY); - if(sList.size() > 1) throw new PrivateProjectException("Cannot have multiple manifests"); - if(sList.size() > 0) + if (sList.size() > 1) throw new PrivateProjectException("Cannot have multiple manifests"); + if (sList.size() > 0) pfir.setCustomManifest(sList.get(0)); } else if (name.compareToIgnoreCase("auxiliary") == 0) { @@ -168,16 +160,16 @@ else if (name.compareToIgnoreCase("classpaths") == 0) { pfir.setClassPaths(fList); } else if (name.compareToIgnoreCase("main-class") == 0) { - try{ + try { List fList = exp.getRest().accept(flv); - if(fList.size() == 1){ + if (fList.size() == 1){ String main = fList.get(0).getAbsolutePath(); pfir.setMainClass(main); return; } - }catch(Exception exc){ } + } catch(Exception exc){ } String mainClass = exp.getRest().accept(NameVisitor.ONLY); pfir.setMainClass(mainClass); diff --git a/drjava/src/edu/rice/cs/drjava/project/ProjectFileParserFacade.java b/drjava/src/edu/rice/cs/drjava/project/ProjectFileParserFacade.java index a9a9e167d..76400b190 100644 --- a/drjava/src/edu/rice/cs/drjava/project/ProjectFileParserFacade.java +++ b/drjava/src/edu/rice/cs/drjava/project/ProjectFileParserFacade.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.project; import java.io.*; @@ -99,19 +91,19 @@ protected ProjectFileIR fixup(ProjectFileIR pfir){ String version = pfir.getDrJavaVersion(); - if(version.equals("unknown")) + if (version.equals("unknown")) doFixup = true; - if(!doFixup){ + if (!doFixup){ int i = version.indexOf("-r"); - if(i == -1){ + if (i == -1){ doFixup = true; - }else{ - try{ - if(Integer.parseInt(version.substring(i+2).trim()) < 4782) + } else { + try { + if (Integer.parseInt(version.substring(i+2).trim()) < 4782) doFixup = true; - }catch(NumberFormatException e){ + } catch(NumberFormatException e){ doFixup = true; } } @@ -119,7 +111,7 @@ protected ProjectFileIR fixup(ProjectFileIR pfir){ LOG.log("DoFixup? " + doFixup); - if(!doFixup || pfir.getMainClass() == null) return pfir; + if (!doFixup || pfir.getMainClass() == null) return pfir; String mainClass = pfir.getMainClass(); @@ -128,11 +120,11 @@ protected ProjectFileIR fixup(ProjectFileIR pfir){ String qualifiedName = mainClass; //Strip off any leading slashes - if(qualifiedName.startsWith("" + File.separatorChar)) + if (qualifiedName.startsWith("" + File.separatorChar)) qualifiedName = qualifiedName.substring(1); //Remove the .java extension if it exists - if(qualifiedName.toLowerCase().endsWith(OptionConstants.JAVA_FILE_EXTENSION)) + if (qualifiedName.toLowerCase().endsWith(OptionConstants.JAVA_FILE_EXTENSION)) qualifiedName = qualifiedName.substring(0, qualifiedName.length() - OptionConstants.JAVA_FILE_EXTENSION.length()); diff --git a/drjava/src/edu/rice/cs/drjava/project/ProjectProfile.java b/drjava/src/edu/rice/cs/drjava/project/ProjectProfile.java index 8cabeef53..ef7641374 100644 --- a/drjava/src/edu/rice/cs/drjava/project/ProjectProfile.java +++ b/drjava/src/edu/rice/cs/drjava/project/ProjectProfile.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.project; import java.util.ArrayList; @@ -179,7 +171,7 @@ public File getMainClassContainingFile() { toMatch = toMatch.substring(0, toMatch.lastIndexOf(OptionConstants.JAVA_FILE_EXTENSION)); toMatch = toMatch.replace(File.separatorChar,'.'); - if(toMatch.endsWith(main)) + if (toMatch.endsWith(main)) return possibleContainers[i]; } @@ -309,7 +301,7 @@ public void write(OutputStream os) throws IOException { path = replace(path, File.separator, "/"); xc.set("drjava/project.work", path); - if(_manifest != null) { + if (_manifest != null) { String cleanManifest = TextUtil.xmlEscape(_manifest); xc.set("drjava/project.manifest", cleanManifest); @@ -342,7 +334,7 @@ public void write(OutputStream os) throws IOException { DocFile active = null; if (!_sourceFiles.isEmpty()) { for(DocFile df: _sourceFiles) { - if(df.isActive()) { + if (df.isActive()) { active = df; break; //Assert that there is only one active document in the project } @@ -361,10 +353,10 @@ public void write(OutputStream os) throws IOException { xc.set(".timestamp", s, f, true); String pkg = df.getPackage(); xc.set(".package", (pkg != null)?pkg:"", f, true); - xc.set("select.from", String.valueOf((pSel != null)?pSel.first():0), f, true); - xc.set("select.to", String.valueOf((pSel != null)?pSel.second():0), f, true); - xc.set("scroll.column", String.valueOf((pScr != null)?pScr.first():0), f, true); - xc.set("scroll.row", String.valueOf((pScr != null)?pScr.second():0), f, true); + xc.set("select.from", String.valueOf((pSel != null) ? pSel.first() : (Integer) 0), f, true); + xc.set("select.to", String.valueOf((pSel != null) ? pSel.second() : (Integer) 0), f, true); + xc.set("scroll.column", String.valueOf((pScr != null) ? pScr.first() : (Integer) 0), f, true); + xc.set("scroll.row", String.valueOf((pScr != null) ? pScr.second() : (Integer) 0), f, true); if (df==active) xc.set(".active", "true", f, true); } } @@ -372,7 +364,7 @@ public void write(OutputStream os) throws IOException { if (!_auxiliaryFiles.isEmpty()) { if (active == null) { for(DocFile df: _auxiliaryFiles) { - if(df.isActive()) { + if (df.isActive()) { active = df; break; //Assert that there is only one active document in the project } @@ -391,11 +383,11 @@ public void write(OutputStream os) throws IOException { xc.set(".name", path, f, true); xc.set(".timestamp", s, f, true); String pkg = df.getPackage(); - xc.set(".package", (pkg != null)?pkg:"", f, true); - xc.set("select.from", String.valueOf((pSel != null)?pSel.first():0), f, true); - xc.set("select.to", String.valueOf((pSel != null)?pSel.second():0), f, true); - xc.set("scroll.column", String.valueOf((pScr != null)?pScr.first():0), f, true); - xc.set("scroll.row", String.valueOf((pScr != null)?pScr.second():0), f, true); + xc.set(".package", (pkg != null) ? pkg:"", f, true); + xc.set("select.from", String.valueOf((pSel != null) ? pSel.first() : (Integer) 0), f, true); + xc.set("select.to", String.valueOf((pSel != null) ? pSel.second() : (Integer) 0), f, true); + xc.set("scroll.column", String.valueOf((pScr != null) ? pScr.first() : (Integer) 0), f, true); + xc.set("scroll.row", String.valueOf((pScr != null) ? pScr.second() : (Integer) 0), f, true); if (df==active) { xc.set(".active", "true", f, true); } } @@ -405,7 +397,7 @@ public void write(OutputStream os) throws IOException { if (!_excludedFiles.isEmpty()) { if (active == null) { for(DocFile df: _excludedFiles) { - if(df.isActive()) { + if (df.isActive()) { active = df; break; //Assert that there is only one active document in the project } @@ -424,11 +416,11 @@ public void write(OutputStream os) throws IOException { xc.set(".name", path, f, true); xc.set(".timestamp", s, f, true); String pkg = df.getPackage(); - xc.set(".package", (pkg != null)?pkg:"", f, true); - xc.set("select.from", String.valueOf((pSel != null)?pSel.first():0), f, true); - xc.set("select.to", String.valueOf((pSel != null)?pSel.second():0), f, true); - xc.set("scroll.column", String.valueOf((pScr != null)?pScr.first():0), f, true); - xc.set("scroll.row", String.valueOf((pScr != null)?pScr.second():0), f, true); + xc.set(".package", (pkg != null) ? pkg : "", f, true); + xc.set("select.from", String.valueOf((pSel != null) ? pSel.first():(Integer) 0), f, true); + xc.set("select.to", String.valueOf((pSel != null) ? pSel.second():(Integer) 0), f, true); + xc.set("scroll.column", String.valueOf((pScr != null) ? pScr.first():(Integer) 0), f, true); + xc.set("scroll.row", String.valueOf((pScr != null) ? pScr.second():(Integer) 0), f, true); if (df==active) { xc.set(".active", "true", f, true); } } @@ -444,7 +436,7 @@ public void write(OutputStream os) throws IOException { xc.createNode("drjava/project/classpath"); if (!_classPathFiles.isEmpty()) { for(AbsRelFile cp: _classPathFiles) { - path = cp.keepAbsolute()?cp.getAbsolutePath():FileOps.stringMakeRelativeTo(cp, _projectRoot); + path = cp.keepAbsolute() ? cp.getAbsolutePath():FileOps.stringMakeRelativeTo(cp, _projectRoot); path = replace(path, File.separator, "/"); Node f = xc.createNode("drjava/project/classpath/file", null, false); xc.set(".name", path, f, true); @@ -531,7 +523,7 @@ public void writeOld(Writer fw) throws IOException { fw.write(")"); //write the project manifest - if(_manifest != null){ + if (_manifest != null){ fw.write("\n(proj-manifest"); fw.write("\n" + _manifest); fw.write(")"); @@ -545,14 +537,14 @@ public void writeOld(Writer fw) throws IOException { fw.write("\n(source-files"); DocFile active = null; for(DocFile df: _sourceFiles) { - if(df.isActive()) { + if (df.isActive()) { active = df; fw.write("\n" + encodeDocFileRelative(df, " ")); break; //Assert that there is only one active document in the project } } for(DocFile df: _sourceFiles) { - if(df != active) + if (df != active) fw.write("\n" + encodeDocFileRelative(df, " ")); } fw.write(")"); // close the source expression diff --git a/drjava/src/edu/rice/cs/drjava/project/ProjectTest.java b/drjava/src/edu/rice/cs/drjava/project/ProjectTest.java index ed67a1ce1..d2d900ae2 100644 --- a/drjava/src/edu/rice/cs/drjava/project/ProjectTest.java +++ b/drjava/src/edu/rice/cs/drjava/project/ProjectTest.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.project; import edu.rice.cs.drjava.DrJavaTestCase; diff --git a/drjava/src/edu/rice/cs/drjava/project/XMLProjectFileParser.java b/drjava/src/edu/rice/cs/drjava/project/XMLProjectFileParser.java index fa00ffc40..45adee45b 100644 --- a/drjava/src/edu/rice/cs/drjava/project/XMLProjectFileParser.java +++ b/drjava/src/edu/rice/cs/drjava/project/XMLProjectFileParser.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.project; import java.io.*; @@ -138,11 +130,11 @@ public ProjectFileIR parse(File projFile) throws IOException, FileNotFoundExcept } catch(XMLConfigException e) { /* not present is ok too */ } - try{ + try { s = _xc.get(".manifest"); LOG.log("manifest = '" + s + "'"); pfir.setCustomManifest(TextUtil.xmlUnescape(s)); - }catch(XMLConfigException e) { /* not present is fine */ } + } catch(XMLConfigException e) { /* not present is fine */ } // read build dir try { diff --git a/drjava/src/edu/rice/cs/drjava/project/XMLProjectFileParserTest.java b/drjava/src/edu/rice/cs/drjava/project/XMLProjectFileParserTest.java index 42b613b29..bc178af3a 100644 --- a/drjava/src/edu/rice/cs/drjava/project/XMLProjectFileParserTest.java +++ b/drjava/src/edu/rice/cs/drjava/project/XMLProjectFileParserTest.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.project; import java.io.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/AbortablePanel.java b/drjava/src/edu/rice/cs/drjava/ui/AbortablePanel.java index 88c974935..0612f0c6e 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/AbortablePanel.java +++ b/drjava/src/edu/rice/cs/drjava/ui/AbortablePanel.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.ui; import javax.swing.*; @@ -123,12 +115,11 @@ protected void _close() { /** Update button state and text. Should be overridden if additional buttons are added besides "Go To", "Remove" and "Remove All". */ protected void updateButtons() { } - /** Creates the buttons for controlling the regions. Should be overridden. - * @return the newly-created buttons - */ - protected JComponent[] makeButtons() { - return new JComponent[0]; - } + /** Creates the buttons for controlling the regions. This definition is NOT an override since parent is TabbedPanel + * rather than RegionsTreePanel. + * @return the newly-created buttons + */ + protected JComponent[] makeButtons() { return new JComponent[0]; } /** Creates the buttons for controlling the regions. */ private void _setupButtonPanel() { diff --git a/drjava/src/edu/rice/cs/drjava/ui/AboutDialog.java b/drjava/src/edu/rice/cs/drjava/ui/AboutDialog.java index d3fce05b9..de431309d 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/AboutDialog.java +++ b/drjava/src/edu/rice/cs/drjava/ui/AboutDialog.java @@ -1,6 +1,6 @@ /*BEGIN_COPYRIGHT_BLOCK * - * Copyright (c) 2001-2010, JavaPLT group at Rice University (javaplt@rice.edu) + * Copyright (c) 2001-2019, JavaPLT group at Rice University (javaplt@rice.edu) * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -135,7 +135,7 @@ public void mouseClicked(MouseEvent e) { if (LICENSE != null) addTab(_tabs,"DrJava License",createTextScroller(LICENSE)); addTab(_tabs,"DynamicJava License",createTextScroller(DYADE_LICENSE)); - addTab(_tabs,"Eclipse License",createTextScroller(ECLIPSE_LICENSE)); +// addTab(_tabs,"Eclipse License",createTextScroller(ECLIPSE_LICENSE)); addTab(_tabs,"System Properties",createSysPropTab()); _propertiesTabIndex = _tabs.getTabCount()-1; cp.add(createBottomBar(),BorderLayout.SOUTH); @@ -331,7 +331,7 @@ public void actionPerformed(ActionEvent e) { } public static final String COPYRIGHT = - "Copyright (c) 2001-2010, JavaPLT group at Rice University (javaplt@rice.edu)\n" + + "Copyright (c) 2001-2019, JavaPLT group at Rice University (javaplt@rice.edu)\n" + "All rights reserved.\n\n" + "Redistribution and use in source and binary forms, with or without " + "modification, are permitted provided that the following conditions are met:\n" + @@ -373,212 +373,212 @@ public void actionPerformed(ActionEvent e) { " OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n" + "Except as contained in this notice, the name of Dyade shall not be used in advertising or otherwise" + " to promote the sale, use or other dealings in this Software without prior written authorization from Dyade."; - public static final String ECLIPSE_LICENSE = - "Eclipse Public License - v 1.0\n"+ - "\n" + - "THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE " + - "PUBLIC LICENSE (\"AGREEMENT\"). ANY USE, REPRODUCTION OR DISTRIBUTION " + - "OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.\n" + - "\n" + - "1. DEFINITIONS\n" + - "\n" + - "\"Contribution\" means:\n" + - "\n" + - "a) in the case of the initial Contributor, the initial code and documentation distributed " + - "under this Agreement, and\n" + - "\n" + - "b) in the case of each subsequent Contributor:\n" + - "\n" + - "i) changes to the Program, and\n" + - "\n" + - "ii) additions to the Program;\n" + - "\n" + - "where such changes and/or additions to the Program originate from and are distributed by " + - "that particular Contributor. A Contribution 'originates' from a Contributor if it was added " + - "to the Program by such Contributor itself or anyone acting on such Contributor's behalf. " + - "Contributions do not include additions to the Program which: (i) are separate modules of " + - "software distributed in conjunction with the Program under their own license agreement, " + - "and (ii) are not derivative works of the Program.\n" + - "\n" + - "\"Contributor\" means any person or entity that distributes the Program.\n" + - "\n" + - "\"Licensed Patents\" mean patent claims licensable by a Contributor which are necessarily " + - "infringed by the use or sale of its Contribution alone or when combined with the Program.\n" + - "\n" + - "\"Program\" means the Contributions distributed in accordance with this Agreement.\n" + - "\n" + - "\"Recipient\" means anyone who receives the Program under this Agreement, including all " + - "Contributors.\n" + - "\n" + - "2. GRANT OF RIGHTS\n" + - "\n" + - "a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a " + - "non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare " + - "derivative works of, publicly display, publicly perform, distribute and sublicense " + - "the Contribution of such Contributor, if any, and such derivative works, in source " + - "code and object code form.\n" + - "\n" + - "b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a " + - "non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, " + - "use, sell, offer to sell, import and otherwise transfer the Contribution of such " + - "Contributor, if any, in source code and object code form. This patent license shall " + - "apply to the combination of the Contribution and the Program if, at the time the " + - "Contribution is added by the Contributor, such addition of the Contribution causes " + - "such combination to be covered by the Licensed Patents. The patent license shall not " + - "apply to any other combinations which include the Contribution. No hardware per se " + - "is licensed hereunder.\n" + - "\n" + - "c) Recipient understands that although each Contributor grants the licenses to its " + - "Contributions set forth herein, no assurances are provided by any Contributor that " + - "the Program does not infringe the patent or other intellectual property rights of " + - "any other entity. Each Contributor disclaims any liability to Recipient for claims " + - "brought by any other entity based on infringement of intellectual property rights " + - "or otherwise. As a condition to exercising the rights and licenses granted hereunder, " + - "each Recipient hereby assumes sole responsibility to secure any other intellectual " + - "property rights needed, if any. For example, if a third party patent license is " + - "required to allow Recipient to distribute the Program, it is Recipient's responsibility " + - "to acquire that license before distributing the Program.\n" + - "\n" + - "d) Each Contributor represents that to its knowledge it has sufficient copyright " + - "rights in its Contribution, if any, to grant the copyright license set forth in " + - "this Agreement.\n" + - "\n" + - "3. REQUIREMENTS\n" + - "\n" + - "A Contributor may choose to distribute the Program in object code form under its " + - "own license agreement, provided that:\n" + - "\n" + - "a) it complies with the terms and conditions of this Agreement; and\n" + - "\n" + - "b) its license agreement:\n" + - "\n" + - "i) effectively disclaims on behalf of all Contributors all warranties and conditions, " + - "express and implied, including warranties or conditions of title and non-infringement, " + - "and implied warranties or conditions of merchantability and fitness for a particular " + - "purpose;\n" + - "\n" + - "ii) effectively excludes on behalf of all Contributors all liability for damages, " + - "including direct, indirect, special, incidental and consequential damages, such as " + - "lost profits;\n" + - "\n" + - "iii) states that any provisions which differ from this Agreement are offered by " + - "that Contributor alone and not by any other party; and\n" + - "\n" + - "iv) states that source code for the Program is available from such Contributor, and " + - "informs licensees how to obtain it in a reasonable manner on or through a medium " + - "customarily used for software exchange.\n" + - "\n" + - "When the Program is made available in source code form:\n" + - "\n" + - "a) it must be made available under this Agreement; and\n" + - "\n" + - "b) a copy of this Agreement must be included with each copy of the Program.\n" + - "\n" + - "Contributors may not remove or alter any copyright notices contained within the " + - "Program.\n" + - "\n" + - "Each Contributor must identify itself as the originator of its Contribution, if " + - "any, in a manner that reasonably allows subsequent Recipients to identify the " + - "originator of the Contribution.\n" + - "\n" + - "4. COMMERCIAL DISTRIBUTION\n" + - "\n" + - "Commercial distributors of software may accept certain responsibilities with " + - "respect to end users, business partners and the like. While this license is intended " + - "to facilitate the commercial use of the Program, the Contributor who includes the " + - "Program in a commercial product offering should do so in a manner which does not " + - "create potential liability for other Contributors. Therefore, if a Contributor " + - "includes the Program in a commercial product offering, such Contributor " + - "(\"Commercial Contributor\") hereby agrees to defend and indemnify every other " + - "Contributor (\"Indemnified Contributor\") against any losses, damages and costs " + - "(collectively \"Losses\") arising from claims, lawsuits and other legal actions " + - "brought by a third party against the Indemnified Contributor to the extent caused " + - "by the acts or omissions of such Commercial Contributor in connection with its " + - "distribution of the Program in a commercial product offering. The obligations in " + - "this section do not apply to any claims or Losses relating to any actual or " + - "alleged intellectual property infringement. In order to qualify, an Indemnified " + - "Contributor must: a) promptly notify the Commercial Contributor in writing of " + - "such claim, and b) allow the Commercial Contributor to control, and cooperate with " + - "the Commercial Contributor in, the defense and any related settlement negotiations. " + - "The Indemnified Contributor may participate in any such claim at its own expense.\n" + - "\n" + - "For example, a Contributor might include the Program in a commercial product " + - "offering, Product X. That Contributor is then a Commercial Contributor. If that " + - "Commercial Contributor then makes performance claims, or offers warranties related " + - "to Product X, those performance claims and warranties are such Commercial " + - "Contributor's responsibility alone. Under this section, the Commercial Contributor " + - "would have to defend claims against the other Contributors related to those " + - "performance claims and warranties, and if a court requires any other Contributor " + - "to pay any damages as a result, the Commercial Contributor must pay those damages.\n" + - "\n" + - "5. NO WARRANTY\n" + - "\n" + - "EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN " + - "\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR " + - "IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, " + - "NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each " + - "Recipient is solely responsible for determining the appropriateness of using and " + - "distributing the Program and assumes all risks associated with its exercise of " + - "rights under this Agreement , including but not limited to the risks and costs of " + - "program errors, compliance with applicable laws, damage to or loss of data, " + - "programs or equipment, and unavailability or interruption of operations.\n" + - "\n" + - "6. DISCLAIMER OF LIABILITY\n" + - "\n" + - "EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY " + - "CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, " + - "SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST " + - "PROFITS), 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 OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS " + - "GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n" + - "\n" + - "7. GENERAL\n" + - "\n" + - "If any provision of this Agreement is invalid or unenforceable under applicable " + - "law, it shall not affect the validity or enforceability of the remainder of the " + - "terms of this Agreement, and without further action by the parties hereto, such " + - "provision shall be reformed to the minimum extent necessary to make such " + - "provision valid and enforceable.\n" + - "\n" + - "If Recipient institutes patent litigation against any entity (including a " + - "cross-claim or counterclaim in a lawsuit) alleging that the Program itself " + - "(excluding combinations of the Program with other software or hardware) " + - "infringes such Recipient's patent(s), then such Recipient's rights granted " + - "under Section 2(b) shall terminate as of the date such litigation is filed.\n" + - "\n" + - "All Recipient's rights under this Agreement shall terminate if it fails to " + - "comply with any of the material terms or conditions of this Agreement and does " + - "not cure such failure in a reasonable period of time after becoming aware of " + - "such noncompliance. If all Recipient's rights under this Agreement terminate, " + - "Recipient agrees to cease use and distribution of the Program as soon as " + - "reasonably practicable. However, Recipient's obligations under this Agreement " + - "and any licenses granted by Recipient relating to the Program shall continue " + - "and survive.\n" + - "\n" + - "Everyone is permitted to copy and distribute copies of this Agreement, but " + - "in order to avoid inconsistency the Agreement is copyrighted and may only be " + - "modified in the following manner. The Agreement Steward reserves the right to " + - "publish new versions (including revisions) of this Agreement from time to " + - "time. No one other than the Agreement Steward has the right to modify this " + - "Agreement. The Eclipse Foundation is the initial Agreement Steward. The " + - "Eclipse Foundation may assign the responsibility to serve as the Agreement " + - "Steward to a suitable separate entity. Each new version of the Agreement " + - "will be given a distinguishing version number. The Program (including " + - "Contributions) may always be distributed subject to the version of the " + - "Agreement under which it was received. In addition, after a new version of " + - "the Agreement is published, Contributor may elect to distribute the Program " + - "(including its Contributions) under the new version. Except as expressly " + - "stated in Sections 2(a) and 2(b) above, Recipient receives no rights or " + - "licenses to the intellectual property of any Contributor under this Agreement, " + - "whether expressly, by implication, estoppel or otherwise. All rights in the " + - "Program not expressly granted under this Agreement are reserved.\n" + - "\n" + - "This Agreement is governed by the laws of the State of New York and the " + - "intellectual property laws of the United States of America. No party to this " + - "Agreement will bring a legal action under this Agreement more than one year " + - "after the cause of action arose. Each party waives its rights to a jury trial " + - "in any resulting litigation."; +// public static final String ECLIPSE_LICENSE = +// "Eclipse Public License - v 1.0\n"+ +// "\n" + +// "THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE " + +// "PUBLIC LICENSE (\"AGREEMENT\"). ANY USE, REPRODUCTION OR DISTRIBUTION " + +// "OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.\n" + +// "\n" + +// "1. DEFINITIONS\n" + +// "\n" + +// "\"Contribution\" means:\n" + +// "\n" + +// "a) in the case of the initial Contributor, the initial code and documentation distributed " + +// "under this Agreement, and\n" + +// "\n" + +// "b) in the case of each subsequent Contributor:\n" + +// "\n" + +// "i) changes to the Program, and\n" + +// "\n" + +// "ii) additions to the Program;\n" + +// "\n" + +// "where such changes and/or additions to the Program originate from and are distributed by " + +// "that particular Contributor. A Contribution 'originates' from a Contributor if it was added " + +// "to the Program by such Contributor itself or anyone acting on such Contributor's behalf. " + +// "Contributions do not include additions to the Program which: (i) are separate modules of " + +// "software distributed in conjunction with the Program under their own license agreement, " + +// "and (ii) are not derivative works of the Program.\n" + +// "\n" + +// "\"Contributor\" means any person or entity that distributes the Program.\n" + +// "\n" + +// "\"Licensed Patents\" mean patent claims licensable by a Contributor which are necessarily " + +// "infringed by the use or sale of its Contribution alone or when combined with the Program.\n" + +// "\n" + +// "\"Program\" means the Contributions distributed in accordance with this Agreement.\n" + +// "\n" + +// "\"Recipient\" means anyone who receives the Program under this Agreement, including all " + +// "Contributors.\n" + +// "\n" + +// "2. GRANT OF RIGHTS\n" + +// "\n" + +// "a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a " + +// "non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare " + +// "derivative works of, publicly display, publicly perform, distribute and sublicense " + +// "the Contribution of such Contributor, if any, and such derivative works, in source " + +// "code and object code form.\n" + +// "\n" + +// "b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a " + +// "non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, " + +// "use, sell, offer to sell, import and otherwise transfer the Contribution of such " + +// "Contributor, if any, in source code and object code form. This patent license shall " + +// "apply to the combination of the Contribution and the Program if, at the time the " + +// "Contribution is added by the Contributor, such addition of the Contribution causes " + +// "such combination to be covered by the Licensed Patents. The patent license shall not " + +// "apply to any other combinations which include the Contribution. No hardware per se " + +// "is licensed hereunder.\n" + +// "\n" + +// "c) Recipient understands that although each Contributor grants the licenses to its " + +// "Contributions set forth herein, no assurances are provided by any Contributor that " + +// "the Program does not infringe the patent or other intellectual property rights of " + +// "any other entity. Each Contributor disclaims any liability to Recipient for claims " + +// "brought by any other entity based on infringement of intellectual property rights " + +// "or otherwise. As a condition to exercising the rights and licenses granted hereunder, " + +// "each Recipient hereby assumes sole responsibility to secure any other intellectual " + +// "property rights needed, if any. For example, if a third party patent license is " + +// "required to allow Recipient to distribute the Program, it is Recipient's responsibility " + +// "to acquire that license before distributing the Program.\n" + +// "\n" + +// "d) Each Contributor represents that to its knowledge it has sufficient copyright " + +// "rights in its Contribution, if any, to grant the copyright license set forth in " + +// "this Agreement.\n" + +// "\n" + +// "3. REQUIREMENTS\n" + +// "\n" + +// "A Contributor may choose to distribute the Program in object code form under its " + +// "own license agreement, provided that:\n" + +// "\n" + +// "a) it complies with the terms and conditions of this Agreement; and\n" + +// "\n" + +// "b) its license agreement:\n" + +// "\n" + +// "i) effectively disclaims on behalf of all Contributors all warranties and conditions, " + +// "express and implied, including warranties or conditions of title and non-infringement, " + +// "and implied warranties or conditions of merchantability and fitness for a particular " + +// "purpose;\n" + +// "\n" + +// "ii) effectively excludes on behalf of all Contributors all liability for damages, " + +// "including direct, indirect, special, incidental and consequential damages, such as " + +// "lost profits;\n" + +// "\n" + +// "iii) states that any provisions which differ from this Agreement are offered by " + +// "that Contributor alone and not by any other party; and\n" + +// "\n" + +// "iv) states that source code for the Program is available from such Contributor, and " + +// "informs licensees how to obtain it in a reasonable manner on or through a medium " + +// "customarily used for software exchange.\n" + +// "\n" + +// "When the Program is made available in source code form:\n" + +// "\n" + +// "a) it must be made available under this Agreement; and\n" + +// "\n" + +// "b) a copy of this Agreement must be included with each copy of the Program.\n" + +// "\n" + +// "Contributors may not remove or alter any copyright notices contained within the " + +// "Program.\n" + +// "\n" + +// "Each Contributor must identify itself as the originator of its Contribution, if " + +// "any, in a manner that reasonably allows subsequent Recipients to identify the " + +// "originator of the Contribution.\n" + +// "\n" + +// "4. COMMERCIAL DISTRIBUTION\n" + +// "\n" + +// "Commercial distributors of software may accept certain responsibilities with " + +// "respect to end users, business partners and the like. While this license is intended " + +// "to facilitate the commercial use of the Program, the Contributor who includes the " + +// "Program in a commercial product offering should do so in a manner which does not " + +// "create potential liability for other Contributors. Therefore, if a Contributor " + +// "includes the Program in a commercial product offering, such Contributor " + +// "(\"Commercial Contributor\") hereby agrees to defend and indemnify every other " + +// "Contributor (\"Indemnified Contributor\") against any losses, damages and costs " + +// "(collectively \"Losses\") arising from claims, lawsuits and other legal actions " + +// "brought by a third party against the Indemnified Contributor to the extent caused " + +// "by the acts or omissions of such Commercial Contributor in connection with its " + +// "distribution of the Program in a commercial product offering. The obligations in " + +// "this section do not apply to any claims or Losses relating to any actual or " + +// "alleged intellectual property infringement. In order to qualify, an Indemnified " + +// "Contributor must: a) promptly notify the Commercial Contributor in writing of " + +// "such claim, and b) allow the Commercial Contributor to control, and cooperate with " + +// "the Commercial Contributor in, the defense and any related settlement negotiations. " + +// "The Indemnified Contributor may participate in any such claim at its own expense.\n" + +// "\n" + +// "For example, a Contributor might include the Program in a commercial product " + +// "offering, Product X. That Contributor is then a Commercial Contributor. If that " + +// "Commercial Contributor then makes performance claims, or offers warranties related " + +// "to Product X, those performance claims and warranties are such Commercial " + +// "Contributor's responsibility alone. Under this section, the Commercial Contributor " + +// "would have to defend claims against the other Contributors related to those " + +// "performance claims and warranties, and if a court requires any other Contributor " + +// "to pay any damages as a result, the Commercial Contributor must pay those damages.\n" + +// "\n" + +// "5. NO WARRANTY\n" + +// "\n" + +// "EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN " + +// "\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR " + +// "IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, " + +// "NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each " + +// "Recipient is solely responsible for determining the appropriateness of using and " + +// "distributing the Program and assumes all risks associated with its exercise of " + +// "rights under this Agreement , including but not limited to the risks and costs of " + +// "program errors, compliance with applicable laws, damage to or loss of data, " + +// "programs or equipment, and unavailability or interruption of operations.\n" + +// "\n" + +// "6. DISCLAIMER OF LIABILITY\n" + +// "\n" + +// "EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY " + +// "CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, " + +// "SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST " + +// "PROFITS), 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 OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS " + +// "GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n" + +// "\n" + +// "7. GENERAL\n" + +// "\n" + +// "If any provision of this Agreement is invalid or unenforceable under applicable " + +// "law, it shall not affect the validity or enforceability of the remainder of the " + +// "terms of this Agreement, and without further action by the parties hereto, such " + +// "provision shall be reformed to the minimum extent necessary to make such " + +// "provision valid and enforceable.\n" + +// "\n" + +// "If Recipient institutes patent litigation against any entity (including a " + +// "cross-claim or counterclaim in a lawsuit) alleging that the Program itself " + +// "(excluding combinations of the Program with other software or hardware) " + +// "infringes such Recipient's patent(s), then such Recipient's rights granted " + +// "under Section 2(b) shall terminate as of the date such litigation is filed.\n" + +// "\n" + +// "All Recipient's rights under this Agreement shall terminate if it fails to " + +// "comply with any of the material terms or conditions of this Agreement and does " + +// "not cure such failure in a reasonable period of time after becoming aware of " + +// "such noncompliance. If all Recipient's rights under this Agreement terminate, " + +// "Recipient agrees to cease use and distribution of the Program as soon as " + +// "reasonably practicable. However, Recipient's obligations under this Agreement " + +// "and any licenses granted by Recipient relating to the Program shall continue " + +// "and survive.\n" + +// "\n" + +// "Everyone is permitted to copy and distribute copies of this Agreement, but " + +// "in order to avoid inconsistency the Agreement is copyrighted and may only be " + +// "modified in the following manner. The Agreement Steward reserves the right to " + +// "publish new versions (including revisions) of this Agreement from time to " + +// "time. No one other than the Agreement Steward has the right to modify this " + +// "Agreement. The Eclipse Foundation is the initial Agreement Steward. The " + +// "Eclipse Foundation may assign the responsibility to serve as the Agreement " + +// "Steward to a suitable separate entity. Each new version of the Agreement " + +// "will be given a distinguishing version number. The Program (including " + +// "Contributions) may always be distributed subject to the version of the " + +// "Agreement under which it was received. In addition, after a new version of " + +// "the Agreement is published, Contributor may elect to distribute the Program " + +// "(including its Contributions) under the new version. Except as expressly " + +// "stated in Sections 2(a) and 2(b) above, Recipient receives no rights or " + +// "licenses to the intellectual property of any Contributor under this Agreement, " + +// "whether expressly, by implication, estoppel or otherwise. All rights in the " + +// "Program not expressly granted under this Agreement are reserved.\n" + +// "\n" + +// "This Agreement is governed by the laws of the State of New York and the " + +// "intellectual property laws of the United States of America. No party to this " + +// "Agreement will bring a legal action under this Agreement more than one year " + +// "after the cause of action arose. Each party waives its rights to a jury trial " + +// "in any resulting litigation."; public static final String INTRODUCTION = "DrJava is a pedagogic programming environment for Java, intended to help students focus more on program" + diff --git a/drjava/src/edu/rice/cs/drjava/ui/AbstractConsoleController.java b/drjava/src/edu/rice/cs/drjava/ui/AbstractConsoleController.java index 83baf0d65..04d7ccbc8 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/AbstractConsoleController.java +++ b/drjava/src/edu/rice/cs/drjava/ui/AbstractConsoleController.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.ui; import java.awt.EventQueue; @@ -56,7 +48,7 @@ /** Abstract class that hooks a Swing console/interactions document with its Swing pane. * TODO: move interactions specific functionality to InteractionsController by creating ConsoleDJDocument class - * @version $Id: AbstractConsoleController.java 5360 2010-08-13 22:36:42Z mgricken $ + * @version $Id$ */ public abstract class AbstractConsoleController /* implements Serializable */ { diff --git a/drjava/src/edu/rice/cs/drjava/ui/AbstractDJPane.java b/drjava/src/edu/rice/cs/drjava/ui/AbstractDJPane.java index aff21d17b..73594a49e 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/AbstractDJPane.java +++ b/drjava/src/edu/rice/cs/drjava/ui/AbstractDJPane.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.ui; import edu.rice.cs.drjava.DrJava; diff --git a/drjava/src/edu/rice/cs/drjava/ui/AutoCompletePopup.java b/drjava/src/edu/rice/cs/drjava/ui/AutoCompletePopup.java index 021e9f652..c83db9487 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/AutoCompletePopup.java +++ b/drjava/src/edu/rice/cs/drjava/ui/AutoCompletePopup.java @@ -2,40 +2,32 @@ /*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*/ - import java.awt.event.*; import java.awt.Component; import java.util.*; @@ -339,7 +331,7 @@ public String value(AutoCompletePopupEntry entry) { Iterator> actionIt = acceptedActions.iterator(); Iterator ksIt = actionKeyStrokes.iterator(); - for(int i=0; i runnable = actionIt.next(); final KeyStroke ks = ksIt.next(); diff --git a/drjava/src/edu/rice/cs/drjava/ui/BackgroundColorListener.java b/drjava/src/edu/rice/cs/drjava/ui/BackgroundColorListener.java index f04a3790a..e6dfbe1b9 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/BackgroundColorListener.java +++ b/drjava/src/edu/rice/cs/drjava/ui/BackgroundColorListener.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.ui; import java.awt.Component; diff --git a/drjava/src/edu/rice/cs/drjava/ui/BookmarksPanel.java b/drjava/src/edu/rice/cs/drjava/ui/BookmarksPanel.java index 72a4612af..95b51f6d1 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/BookmarksPanel.java +++ b/drjava/src/edu/rice/cs/drjava/ui/BookmarksPanel.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.ui; import java.util.ArrayList; diff --git a/drjava/src/edu/rice/cs/drjava/ui/BreakpointsPanel.java b/drjava/src/edu/rice/cs/drjava/ui/BreakpointsPanel.java index 741194e6e..917cc340c 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/BreakpointsPanel.java +++ b/drjava/src/edu/rice/cs/drjava/ui/BreakpointsPanel.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.ui; import java.util.ArrayList; @@ -101,8 +93,8 @@ public void regionChanged(final Breakpoint bp) { /** Action performed when the Enter key is pressed. Should be overridden. */ protected void performDefaultAction() { goToRegion(); } - /** Creates the buttons for controlling the regions. Should be overridden. */ - protected JComponent[] makeButtons() { + /** Creates the buttons for controlling the regions. */ + @Override protected JComponent[] makeButtons() { Action goToAction = new AbstractAction("Go to") { public void actionPerformed(ActionEvent ae) { goToRegion(); diff --git a/drjava/src/edu/rice/cs/drjava/ui/ClassPathFilter.java b/drjava/src/edu/rice/cs/drjava/ui/ClassPathFilter.java index e3d3c2b82..209026445 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/ClassPathFilter.java +++ b/drjava/src/edu/rice/cs/drjava/ui/ClassPathFilter.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.ui; import java.io.File; diff --git a/drjava/src/edu/rice/cs/drjava/ui/ClipboardHistoryFrame.java b/drjava/src/edu/rice/cs/drjava/ui/ClipboardHistoryFrame.java index 3c3b93995..7bd32be68 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/ClipboardHistoryFrame.java +++ b/drjava/src/edu/rice/cs/drjava/ui/ClipboardHistoryFrame.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.ui; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/CommonCloseButton.java b/drjava/src/edu/rice/cs/drjava/ui/CommonCloseButton.java index ac54ac9fb..0030a2f22 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/CommonCloseButton.java +++ b/drjava/src/edu/rice/cs/drjava/ui/CommonCloseButton.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.ui; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/CompilerErrorPanel.java b/drjava/src/edu/rice/cs/drjava/ui/CompilerErrorPanel.java index 526d2f901..42bf7bd5b 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/CompilerErrorPanel.java +++ b/drjava/src/edu/rice/cs/drjava/ui/CompilerErrorPanel.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.ui; import edu.rice.cs.drjava.DrJava; diff --git a/drjava/src/edu/rice/cs/drjava/ui/ConsoleController.java b/drjava/src/edu/rice/cs/drjava/ui/ConsoleController.java index 90f212eef..44f09df22 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/ConsoleController.java +++ b/drjava/src/edu/rice/cs/drjava/ui/ConsoleController.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.ui; import edu.rice.cs.drjava.model.repl.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/DebugPanel.java b/drjava/src/edu/rice/cs/drjava/ui/DebugPanel.java index fb29fff58..2cd98085d 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/DebugPanel.java +++ b/drjava/src/edu/rice/cs/drjava/ui/DebugPanel.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.ui; import java.util.ArrayList; @@ -511,7 +503,7 @@ private void _initPopup() { // JMenuItem threadRunningSuspend = new JMenuItem(); // Action suspendAction = new AbstractAction("Suspend Thread") { // public void actionPerformed(ActionEvent e) { -// try{ +// try { // _debugger.suspend(getSelectedThread()); // } // catch(DebugException exception) { @@ -652,7 +644,7 @@ public void updateButtons() { /**Sets the AutomaticTraceButton text as well as the Automatic Trace check box menu item under Debugger based on whether automatic trace is enabled or not*/ public void setAutomaticTraceButtonText() { - if(_model.getDebugger().isAutomaticTraceEnabled()) { + if (_model.getDebugger().isAutomaticTraceEnabled()) { _automaticTraceButton.setText("Disable Trace"); } else { diff --git a/drjava/src/edu/rice/cs/drjava/ui/DefinitionsPane.java b/drjava/src/edu/rice/cs/drjava/ui/DefinitionsPane.java index 8be7fb607..a87f19ea5 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/DefinitionsPane.java +++ b/drjava/src/edu/rice/cs/drjava/ui/DefinitionsPane.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.ui; import javax.swing.*; @@ -819,7 +811,7 @@ public void actionPerformed(ActionEvent ae) { commentLinesItem.addActionListener(new AbstractAction() { public void actionPerformed( ActionEvent ae) { _mainFrame.hourglassOn(); - try{ + try { updateCurrentLocationInDoc(); _commentLines(); } @@ -903,16 +895,10 @@ protected void _popupAction(MouseEvent e) { } /** Comments out the lines contained within the given selection. */ - private void _commentLines() { - _mainFrame.commentLines(); -// _doc.commentLinesInDefinitions(getSelectionStart(), getSelectionEnd()); - } + private void _commentLines() { _mainFrame.commentLines(); } /** Uncomments the lines contained within the given selection. */ - private void _uncommentLines() { - _mainFrame.uncommentLines(); -// _doc.uncommentLinesInDefinitions(getSelectionStart(), getSelectionEnd()); - } + private void _uncommentLines() { _mainFrame.uncommentLines(); } /** @return the undo action. */ public UndoAction getUndoAction() { return _undoAction; } diff --git a/drjava/src/edu/rice/cs/drjava/ui/DefinitionsPaneMemoryLeakTest.java b/drjava/src/edu/rice/cs/drjava/ui/DefinitionsPaneMemoryLeakTest.java index 146298669..bc394e064 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/DefinitionsPaneMemoryLeakTest.java +++ b/drjava/src/edu/rice/cs/drjava/ui/DefinitionsPaneMemoryLeakTest.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.ui; import edu.rice.cs.drjava.DrJava; @@ -49,7 +41,8 @@ import static org.netbeans.test.MemoryTestUtils.*; -/** Tests the Definitions Pane +/** Tests the Definitions Pane. The MultiThreadedTestCase frameworks ensures that runtime errors in auxiliary threads + * are detected. * @version $Id$ */ public final class DefinitionsPaneMemoryLeakTest extends MultiThreadedTestCase { @@ -119,7 +112,7 @@ private void runIsolatedDrJavaSession() throws InterruptedException, IOException OpenDefinitionsDocument[] d = new OpenDefinitionsDocument[PANE_COUNT]; DefinitionsPane[] p = new DefinitionsPane[PANE_COUNT]; - for(int i=0; i> wd = new ArrayList>(PANE_COUNT); List> wp = new ArrayList>(PANE_COUNT); - for(int i=0; i(d[i])); wp.add(new WeakReference(p[i])); } - // all the panes have a listener, so lets close all files + /* All the panes have a listener, so lets close all files */ // Utilities.show("Waiting to start"); - for(int i=0; i=DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_COUNT)) { + if (editIndex >= DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_COUNT)) { throw new IllegalArgumentException("Trying to edit saved external process that does not exist"); } final String cmdline = DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_CMDLINES).get(editIndex); final String workdir = DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_WORKDIRS).get(editIndex); - final String enclosingFile = - DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_ENCLOSING_DJAPP_FILES).get(editIndex); _commandLine.setText(cmdline); _commandWorkDirLine.setText(workdir); - _commandEnclosingFileLine.setText(enclosingFile); } initDone(); // call mandated by SwingFrame contract } @@ -243,9 +238,7 @@ public ExecuteExternalDialog(MainFrame mf, boolean editMode, int editIndex, Comp /** Create a dialog with the "Run" button. * @param mf the instance of mainframe to query into the project */ - public ExecuteExternalDialog(MainFrame mf) { - this(mf, false, -1, null); - } + public ExecuteExternalDialog(MainFrame mf) { this(mf, false, -1, null); } /** Build the dialog. */ private void initComponents() { @@ -253,7 +246,7 @@ private void initComponents() { _dirChooser.setDialogTitle("Select Work Directory"); _dirChooser.setApproveButtonText("Select"); _fileChooser = new FileChooser(null); - _fileChooser.setDialogTitle("Select Enclosing .djapp File"); +// _fileChooser.setDialogTitle("Select Enclosing .djapp File"); _fileChooser.setApproveButtonText("Select"); super.getContentPane().setLayout(new GridLayout(1,1)); @@ -482,45 +475,6 @@ public void keyTyped(KeyEvent e) { } gridbag.setConstraints(commandWorkDirLinePreviewSP, c); main.add(commandWorkDirLinePreviewSP); - // enclosing .djapp file - c.weightx = 0.0; - c.weighty = 0.0; - c.gridwidth = 1; - c.insets = labelInsets; - JLabel enclosingFileLabel = new JLabel("Enclosing .djapp file:"); - gridbag.setConstraints(enclosingFileLabel, c); - main.add(enclosingFileLabel); - - c.weightx = 1.0; - c.weighty = 8.0; - c.gridwidth = GridBagConstraints.RELATIVE; - c.insets = compInsets; - - _commandEnclosingFileLine = new JTextPane(); - // do not allow a newline - _commandEnclosingFileLine.addKeyListener(new KeyListener() { - public void keyPressed(KeyEvent e) { - if (e.getKeyCode() == KeyEvent.VK_ENTER) e.consume(); - else if (e.getKeyCode() == KeyEvent.VK_TAB) { - e.consume(); - if (e.isShiftDown()) _commandWorkDirLine.requestFocus(); - else { - _insertCommandButton.setEnabled(false); - if (_editMode) { - _saveCommandButton.requestFocus(); - } - else _runCommandButton.requestFocus(); - } - } - } - public void keyReleased(KeyEvent e) { } - public void keyTyped(KeyEvent e) { } - }); - JScrollPane commandEnclosingFileLineSP = new JScrollPane(_commandEnclosingFileLine); - commandEnclosingFileLineSP.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); - gridbag.setConstraints(commandEnclosingFileLineSP, c); - main.add(commandEnclosingFileLineSP); - c.weightx = 0.0; c.weighty = 0.0; c.gridwidth = GridBagConstraints.REMAINDER; @@ -631,36 +585,6 @@ public void update(DocumentEvent e) { _commandWorkDirLine.setText("${drjava.working.dir}"); _workDirDocumentListener.changedUpdate(null); - // update the preview of the actual enclosing .djapp file post substitution - _enclosingFileDocumentListener = new DocumentListener() { - public void update(DocumentEvent e) { - assert EventQueue.isDispatchThread(); - try { - // preview - _commandEnclosingFileLineDoc.remove(0,_commandEnclosingFileLineDoc.getLength()); - String text = StringOps.replaceVariables(_commandEnclosingFileLine.getText(), _props, PropertyMaps.GET_LAZY); - _commandEnclosingFileLineDoc.insertString(0, StringOps.unescapeFileName(text), null); - - // command line - colorVariables(_commandEnclosingFileLine, - _props, - this, - _commandLineCmdAS, - _varCommandLineCmdStyle, - _varErrorCommandLineCmdStyle); - } - catch(BadLocationException ble) { - _commandLinePreview.setText("Error: " + ble); - } - } - public void changedUpdate(DocumentEvent e) { update(e); } - public void insertUpdate(DocumentEvent e) { update(e); } - public void removeUpdate(DocumentEvent e) { update(e); } - }; - _commandEnclosingFileLine.getDocument().addDocumentListener(_enclosingFileDocumentListener); - _commandEnclosingFileLine.setText(""); - _enclosingFileDocumentListener.changedUpdate(null); - _lastCommandFocus = _commandLine; // do not allow preview to have focus _commandLine.addFocusListener(new FocusAdapter() { @@ -814,19 +738,15 @@ private void _cancel() { } // public static edu.rice.cs.util.Log LOG = new edu.rice.cs.util.Log("process.txt", false); - /** Run a command and return an external process panel. * @param name name of the process * @param cmdline the command line to execute, before evaluation * @param workdir the work directory, before evaluation - * @param enclosingFile the enclosing .djapp JAR file, or "" if not enclosed * @param pm PropertyMaps used for substitution when replacing variables * @return ExternalProcessPanel that displays the output of the process */ - public ExternalProcessPanel runCommand(String name, String cmdline, String workdir, - String enclosingFile, PropertyMaps pm) { - ((MutableFileProperty)pm.getProperty("enclosing.djapp.file")).setFile(enclosingFile.length() > 0? - new File(enclosingFile):null); + public ExternalProcessPanel runCommand(String name, String cmdline, String workdir, PropertyMaps pm) { + ProcessCreator pc = new GeneralProcessCreator(cmdline, workdir.trim(), pm); String label = "External"; if (!name.equals("")) { label += ": " + name; } @@ -845,16 +765,13 @@ public ExternalProcessPanel runCommand(String name, String cmdline, String workd /** Execute the command line. */ private void _runCommand() { - _mainFrame.updateStatusField("Executing external process..."); - GeneralProcessCreator.LOG.log("_runCommand(): ${enclosing.djapp.file} = " + _commandEnclosingFileLine.getText()); _mainFrame.removeModalWindowAdapter(this); if (_commandLinePreview.getText().length() > 0) { try { _props = PropertyMaps.TEMPLATE.clone(); PropertyMaps pm = _props.clone(); - runCommand("", _commandLine.getText(), _commandWorkDirLine.getText(), - _commandEnclosingFileLine.getText().trim(), pm); + runCommand("", _commandLine.getText(), _commandWorkDirLine.getText(), pm); } catch(CloneNotSupportedException e) { throw new edu.rice.cs.util.UnexpectedException(e); } } @@ -879,8 +796,7 @@ private void _saveCommand() { if (_cm != null) { _cm.signal(); } return; } - editInMenu(_editIndex, name, _commandLine.getText(), _commandWorkDirLine.getText(), - _commandEnclosingFileLine.getText()); + editInMenu(_editIndex, name, _commandLine.getText(), _commandWorkDirLine.getText()); } else { int count = DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_COUNT); @@ -894,7 +810,7 @@ private void _saveCommand() { if (_cm != null) { _cm.signal(); } return; } - addToMenu(name, _commandLine.getText(), _commandWorkDirLine.getText(), _commandEnclosingFileLine.getText()); + addToMenu(name, _commandLine.getText(), _commandWorkDirLine.getText()); } // Always apply and save settings @@ -907,18 +823,14 @@ private void _saveCommand() { * @param name process name * @param cmdline command line * @param workdir work directory - * @param enclosingFile the enclosing .djapp JAR file, or "" if not enclosed * @return number of processes in the menu */ - public static int addToMenu(String name, String cmdline, String workdir, String enclosingFile) { - GeneralProcessCreator.LOG.log("addToMenu(): enclosingFile = " + enclosingFile); + public static int addToMenu(String name, String cmdline, String workdir) { int count = DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_COUNT); ++count; final Vector names = DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_NAMES); final Vector cmdlines = DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_CMDLINES); final Vector workdirs = DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_WORKDIRS); - final Vector enclosingFiles = - DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_ENCLOSING_DJAPP_FILES); - + names.add(name); DrJava.getConfig().setSetting(OptionConstants.EXTERNAL_SAVED_NAMES,names); @@ -927,10 +839,6 @@ public static int addToMenu(String name, String cmdline, String workdir, String workdirs.add(workdir); DrJava.getConfig().setSetting(OptionConstants.EXTERNAL_SAVED_WORKDIRS,workdirs); - - enclosingFiles.add(enclosingFile); - DrJava.getConfig().setSetting(OptionConstants.EXTERNAL_SAVED_ENCLOSING_DJAPP_FILES,enclosingFiles); - DrJava.getConfig().setSetting(OptionConstants.EXTERNAL_SAVED_COUNT,count); return count; @@ -941,14 +849,11 @@ public static int addToMenu(String name, String cmdline, String workdir, String * @param name process name * @param cmdline command line * @param workdir work directory - * @param enclosingFile the enclosing .djapp JAR file, or "" if not enclosed */ - public static void editInMenu(int editIndex, String name, String cmdline, String workdir, String enclosingFile) { - GeneralProcessCreator.LOG.log("editInMenu(): enclosingFile = " + enclosingFile); + public static void editInMenu(int editIndex, String name, String cmdline, String workdir) { final Vector names = DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_NAMES); final Vector cmdlines = DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_CMDLINES); final Vector workdirs = DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_WORKDIRS); - final Vector enclosingFiles = DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_ENCLOSING_DJAPP_FILES); names.set(editIndex,name); DrJava.getConfig().setSetting(OptionConstants.EXTERNAL_SAVED_NAMES,names); @@ -958,9 +863,6 @@ public static void editInMenu(int editIndex, String name, String cmdline, String workdirs.set(editIndex,workdir); DrJava.getConfig().setSetting(OptionConstants.EXTERNAL_SAVED_WORKDIRS,workdirs); - - enclosingFiles.set(editIndex,enclosingFile); - DrJava.getConfig().setSetting(OptionConstants.EXTERNAL_SAVED_ENCLOSING_DJAPP_FILES,enclosingFiles); } /** Save process to file. @@ -970,15 +872,11 @@ public static void saveToFile(int index, File f) { final Vector names = DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_NAMES); final Vector cmdlines = DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_CMDLINES); final Vector workdirs = DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_WORKDIRS); - final Vector enclosingFiles = DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_ENCLOSING_DJAPP_FILES); XMLConfig xc = new XMLConfig(); -// System.out.println("saveToFile(" + index + ", " + f + ")"); -// System.out.println("\t" + names.get(index)); xc.set("drjava/extprocess/name", names.get(index)); xc.set("drjava/extprocess/cmdline", cmdlines.get(index)); xc.set("drjava/extprocess/workdir", workdirs.get(index)); - xc.set("drjava/extprocess/enlcosingfile", enclosingFiles.get(index)); xc.save(f); } diff --git a/drjava/src/edu/rice/cs/drjava/ui/ExternalProcessPanel.java b/drjava/src/edu/rice/cs/drjava/ui/ExternalProcessPanel.java index c7fffb80b..c76fd2e5c 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/ExternalProcessPanel.java +++ b/drjava/src/edu/rice/cs/drjava/ui/ExternalProcessPanel.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.ui; import java.awt.*; @@ -61,25 +53,25 @@ public class ExternalProcessPanel extends AbortablePanel { public final int BUFFER_SIZE = 10240; /** Number of buffer reads before the event thread is allowed to do something else. */ public final int BUFFER_READS_PER_TIMER = 5; - protected JTextArea _textArea; - protected ProcessCreator _pc = null; - protected Process _p = null; - protected InputStreamReader _is = null; - protected InputStreamReader _erris = null; - protected JButton _updateNowButton; - protected JButton _runAgainButton; - protected Thread _updateThread; - protected Thread _readThread; - protected Thread _deathThread; - protected StringBuilder _sb = new StringBuilder(); + protected volatile JTextArea _textArea; + protected volatile ProcessCreator _pc = null; + protected volatile Process _p = null; + protected volatile InputStreamReader _is = null; + protected volatile InputStreamReader _erris = null; + protected volatile JButton _updateNowButton; + protected volatile JButton _runAgainButton; + protected volatile Thread _updateThread; + protected volatile Thread _readThread; + protected volatile Thread _deathThread; + protected volatile StringBuilder _sb = new StringBuilder(); protected volatile int _changeCount = 0; - private char[] _buf = new char[BUFFER_SIZE]; - private int _red = -1; + private volatile char[] _buf = new char[BUFFER_SIZE]; + private volatile int _red = -1; private char[] _errbuf = new char[BUFFER_SIZE]; - private int _errred = -1; - private int _retVal; - private String _header; - protected CompletionMonitor _abortMonitor = new CompletionMonitor(); + private volatile int _errred = -1; + private volatile int _retVal; + private volatile String _header; + protected volatile CompletionMonitor _abortMonitor = new CompletionMonitor(); /** Constructs a new "process" panel to watch process output. * This is swing view class and hence should only be accessed from the event thread. @@ -437,8 +429,8 @@ protected void updateButtons() { _runAgainButton.setEnabled((_is == null) || (_erris == null) || (ended)); } - /** Creates the buttons for controlling the regions. Should be overridden. */ - protected JComponent[] makeButtons() { + /** Creates the buttons for controlling the regions. */ + @Override protected JComponent[] makeButtons() { _updateNowButton = new JButton("Update"); _updateNowButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { diff --git a/drjava/src/edu/rice/cs/drjava/ui/FindReplacePanel.java b/drjava/src/edu/rice/cs/drjava/ui/FindReplacePanel.java index 2c5138b26..ae8ff615b 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/FindReplacePanel.java +++ b/drjava/src/edu/rice/cs/drjava/ui/FindReplacePanel.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.ui; import java.awt.*; @@ -56,7 +48,7 @@ import edu.rice.cs.drjava.model.ClipboardHistoryModel; import edu.rice.cs.drjava.model.MovingDocumentRegion; import edu.rice.cs.drjava.model.RegionManager; -import edu.rice.cs.plt.lambda.Runnable1; +import edu.rice.cs.plt.lambda.Runnable1; // variant on Runnable with unary run method import edu.rice.cs.util.UnexpectedException; import edu.rice.cs.util.swing.BorderlessScrollPane; import edu.rice.cs.util.text.SwingDocument; @@ -79,62 +71,68 @@ class FindReplacePanel extends TabbedPanel implements ClipboardOwner { public static final char LEFT = '\u25FE'; public static final char RIGHT = '\u25FE'; - private JButton _findNextButton; - private JButton _findPreviousButton; - private JButton _findAllButton; - private JButton _replaceButton; - private JButton _replaceFindNextButton; - private JButton _replaceFindPreviousButton; - private JButton _replaceAllButton; + // Fields of FindReplacePanel + // Note: these fields are closed over in listeners (Runnables) so concurrent access is possible! + private final JButton _findNextButton; + private final JButton _findPreviousButton; + private final JButton _findAllButton; + private final JButton _replaceButton; + private final JButton _replaceFindNextButton; + private final JButton _replaceFindPreviousButton; + private final JButton _replaceAllButton; - private JTextPane _findField; - private JTextPane _replaceField; + private volatile JTextPane _findField; + private volatile JTextPane _replaceField; - private JLabel _findLabelBot; // Dynamically updated + private volatile JLabel _findLabelBot; // Dynamically updated - private JCheckBox _ignoreCommentsAndStrings; - private JCheckBox _matchCase; - private JCheckBox _searchAllDocuments; - private JCheckBox _matchWholeWord; - private JCheckBox _ignoreTestCases; - private JCheckBox _searchSelectionOnly; + /* The choice of fields names here is really obnoxious because this class is closely linked with FindReplaceMachine + * and the SAME field (property) names have completely different meanings in that class! */ + private volatile JCheckBox _ignoreCommentsAndStrings; + private volatile JCheckBox _matchCase; + private volatile JCheckBox _searchAllDocuments; + private volatile JCheckBox _matchWholeWord; + private volatile JCheckBox _ignoreTestCases; + private volatile JCheckBox _searchSelectionOnly; /* MainFrame _frame is inherited from TabbedPanel */ - private FindReplaceMachine _machine; - private SingleDisplayModel _model; - private DefinitionsPane _defPane = null; - private boolean _caretChanged; + private final FindReplaceMachine _machine; + private final SingleDisplayModel _model; + private volatile DefinitionsPane _defPane = null; + private volatile boolean _caretChanged; + + private volatile boolean _isFindReplaceActive = false; - private boolean _isFindReplaceActive = false; - public boolean isFindReplaceActive() {return _isFindReplaceActive;} + public boolean isFindReplaceActive() { return _isFindReplaceActive; } /** Listens for changes to the cursor position in order to reset the start position */ private CaretListener _caretListener = new CaretListener() { public void caretUpdate(CaretEvent e) { - + assert EventQueue.isDispatchThread(); -// Utilities.invokeLater(new Runnable() { -// public void run() { - _replaceAction.setEnabled(false); - _replaceFindNextAction.setEnabled(false); - _replaceFindPreviousAction.setEnabled(false); - _machine.positionChanged(); - _caretChanged = true; -// } -// }); + + _replaceAction.setEnabled(false); + _replaceFindNextAction.setEnabled(false); + _replaceFindPreviousAction.setEnabled(false); + _machine.positionChanged(); + _caretChanged = true; } }; /** The action performed when searching forwards */ - Action _findNextAction = new AbstractAction("Find Next") { + private Action _findNextAction = new AbstractAction("Find Next") { public void actionPerformed(ActionEvent e) { findNext(); } }; - Action _findPreviousAction = new AbstractAction("Find Previous") { + public Action getFindNextAction() { return _findNextAction; } + + private Action _findPreviousAction = new AbstractAction("Find Previous") { public void actionPerformed(ActionEvent e) { findPrevious(); } }; + public Action getFindPreviousAction() { return _findPreviousAction; } + private Action _findAllAction = new AbstractAction("Find All") { public void actionPerformed(final ActionEvent e) { _isFindReplaceActive = true; _findAll(); _isFindReplaceActive = false;} }; @@ -143,15 +141,15 @@ public void caretUpdate(CaretEvent e) { public void actionPerformed(ActionEvent e) { _doFind(); } }; - Action _replaceAction = new AbstractAction("Replace") { + private Action _replaceAction = new AbstractAction("Replace") { public void actionPerformed(ActionEvent e) { _replace(); } }; - Action _replaceFindNextAction = new AbstractAction("Replace/Find Next") { + private Action _replaceFindNextAction = new AbstractAction("Replace/Find Next") { public void actionPerformed(ActionEvent e) { _replaceFindNext(); } }; - Action _replaceFindPreviousAction = new AbstractAction("Replace/Find Previous") { + private Action _replaceFindPreviousAction = new AbstractAction("Replace/Find Previous") { public void actionPerformed(ActionEvent e) { _replaceFindPrevious(); }; }; @@ -195,7 +193,7 @@ public FindReplacePanel(MainFrame frame, SingleDisplayModel model) { super(frame, "Find/Replace"); _model = model; _machine = new FindReplaceMachine(_model, _model.getDocumentIterator(), frame); -// _updateMachine(); + _updateMachine(); /********* Button Initialization ********/ @@ -277,12 +275,12 @@ public FindReplacePanel(MainFrame frame, SingleDisplayModel model) { /******** Label Initializations ********/ // Create the Structure for the replace label - JLabel _replaceLabelTop = new JLabel("Replace", SwingConstants.RIGHT); - JLabel _replaceLabelBot = new JLabel("With", SwingConstants.RIGHT); + final JLabel _replaceLabelTop = new JLabel("Replace", SwingConstants.RIGHT); + final JLabel _replaceLabelBot = new JLabel("With", SwingConstants.RIGHT); - JPanel replaceLabelPanelTop = new JPanel(new BorderLayout(5,5)); - JPanel replaceLabelPanelBot = new JPanel(new BorderLayout(5,5)); - JPanel replaceLabelPanel = new JPanel(new GridLayout(2,1)); + final JPanel replaceLabelPanelTop = new JPanel(new BorderLayout(5,5)); + final JPanel replaceLabelPanelBot = new JPanel(new BorderLayout(5,5)); + final JPanel replaceLabelPanel = new JPanel(new GridLayout(2,1)); replaceLabelPanelTop.add(_replaceLabelTop, BorderLayout.SOUTH); replaceLabelPanelBot.add(_replaceLabelBot, BorderLayout.NORTH); @@ -337,7 +335,7 @@ public void itemStateChanged(ItemEvent e) { _searchAllDocuments.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { boolean isSelected = (e.getStateChange() == ItemEvent.SELECTED); - if(isSelected) + if (isSelected) _searchSelectionOnly.setSelected(false); _machine.setSearchAllDocuments(isSelected); DrJava.getConfig().setSetting(OptionConstants.FIND_ALL_DOCUMENTS, isSelected); @@ -352,7 +350,7 @@ public void itemStateChanged(ItemEvent e) { public void itemStateChanged(ItemEvent e) { boolean isSelected = (e.getStateChange() == ItemEvent.SELECTED); _machine.setSearchSelectionOnly(isSelected); - if(isSelected) { + if (isSelected) { _ignoreTestCases.setSelected(false); _searchAllDocuments.setSelected(false); _findNextAction.setEnabled(false); @@ -405,7 +403,7 @@ public void itemStateChanged(ItemEvent e) { _ignoreTestCases.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { boolean isSelected = (e.getStateChange() == ItemEvent.SELECTED); - if(isSelected) + if (isSelected) _searchSelectionOnly.setSelected(false); _machine.setIgnoreTestCases(isSelected); DrJava.getConfig().setSetting(OptionConstants.FIND_NO_TEST_CASES, isSelected); @@ -552,79 +550,77 @@ public boolean requestFocusInWindow() { /** Performs "find all" command. */ private void _findAll() { - // The following two line was moved to _findAll(...) so it is executed by FindResultsPanel._findAgain -// _machine.setSearchBackwards(false); _findLabelBot.setText("Next"); - String searchStr = _findField.getText(); - String title = searchStr; - OpenDefinitionsDocument startDoc = _defPane.getOpenDefDocument(); - boolean searchAll = _machine.getSearchAllDocuments(); - boolean searchSelectionOnly = _machine.getSearchSelectionOnly(); -// StringBuilder tabLabel = new StringBuilder("Find: "); -// if (title.length() <= 10) tabLabel.append(title); -// else tabLabel.append(title.substring(0,10)).append("..."); - String tabLabel = (title.length() <= 20) ? title : title.substring(0,20); - RegionManager rm = _model.createFindResultsManager(); + final String searchStr = _findField.getText(); + final String title = searchStr; + final OpenDefinitionsDocument startDoc = _defPane.getOpenDefDocument(); + final boolean searchAll = _machine.getSearchAllDocuments(); + final boolean searchSelectionOnly = _machine.getSearchSelectionOnly(); - MovingDocumentRegion region = new MovingDocumentRegion(startDoc, - _defPane.getSelectionStart(), _defPane.getSelectionEnd(), - startDoc._getLineStartPos(_defPane.getSelectionStart()), - startDoc._getLineEndPos(_defPane.getSelectionEnd())); + final String tabLabel = (title.length() <= 20) ? title : title.substring(0,20); + final RegionManager rm = _model.createFindResultsManager(); - final FindResultsPanel panel = _frame.createFindResultsPanel(rm, region, - tabLabel, searchStr, searchAll, searchSelectionOnly, _machine.getMatchCase(), - _machine.getMatchWholeWord(), _machine.getIgnoreCommentsAndStrings(), - _ignoreTestCases.isSelected(), - new WeakReference(startDoc), this); + final MovingDocumentRegion region = + new MovingDocumentRegion(startDoc, _defPane.getSelectionStart(), _defPane.getSelectionEnd(), + startDoc._getLineStartPos(_defPane.getSelectionStart()), + startDoc._getLineEndPos(_defPane.getSelectionEnd())); - findAll(searchStr, searchAll, searchSelectionOnly, _machine.getMatchCase(), - _machine.getMatchWholeWord(), _machine.getIgnoreCommentsAndStrings(), - _ignoreTestCases.isSelected(), startDoc, rm, region, panel); + final FindResultsPanel panel = + _frame.createFindResultsPanel(rm, region, tabLabel, searchStr, searchAll, searchSelectionOnly, _machine.getMatchCase(), + _machine.getMatchWholeWord(), _machine.getIgnoreCommentsAndStrings(), + _ignoreTestCases.isSelected(), new WeakReference(startDoc), this); - _model.refreshActiveDocument(); // Rationale: a giant findAll left the definitions pane is a strange state - panel.requestFocusInWindow(); - EventQueue.invokeLater(new Runnable() { public void run() { panel.getRegTree().scrollRowToVisible(0); } }); + findAll(searchStr, searchAll, searchSelectionOnly, _machine.getMatchCase(), _machine.getMatchWholeWord(), + _machine.getIgnoreCommentsAndStrings(), _ignoreTestCases.isSelected(), startDoc, rm, region, panel); + + _log.log("Refreshing active document after 'find all'"); + + EventQueue.invokeLater(new Runnable() { // execute these actions after all pending Runnables in the EventQueue + public void run() { + _model.refreshActiveDocument(); // Rationale: a giant findAll left the definitions pane is a strange state + if (panel.isEmpty()) { requestFocusInWindow(); }// selects _findField as focus } + else { + panel.requestFocusInWindow(); + panel.getRegTree().scrollRowToVisible(0); + } + }}); } /** Performs "find all" with the specified options. - * @param searchStr string to search for - * @param searchAll true if we should search all documents - * @param searchSelectionOnly true if we should search only the current selection - * @param matchCase true if search should be case-sensitive - * @param wholeWord true if we want to match the whole word - * @param noComments true if we want to ignore comments - * @param noTestCases true if we want to ignore test cases - * @param startDoc first document to search within - * @param rm a RegionManager - * @param region a MovingDocumentRegion - * @param panel panel in which to display search results - */ - public void findAll(String searchStr, final boolean searchAll, - final boolean searchSelectionOnly, final boolean matchCase, - final boolean wholeWord, final boolean noComments, - final boolean noTestCases, final OpenDefinitionsDocument startDoc, - final RegionManager rm, - final MovingDocumentRegion region, final FindResultsPanel panel) { + * @param searchStr string to search for + * @param searchAll true if we should search all documents + * @param searchSelectionOnly true if we should search only the current selection + * @param matchCase true if search should be case-sensitive + * @param wholeWord true if we want to match the whole word + * @param noComments true if we want to ignore comments + * @param noTestCases true if we want to ignore test cases + * @param startDoc first document to search within + * @param rm a RegionManager + * @param region a MovingDocumentRegion + * @param panel panel in which to display search results + */ + public void findAll(final String searchStr, final boolean searchAll, final boolean searchSelectionOnly, final boolean matchCase, + final boolean wholeWord, final boolean noComments, final boolean noTestCases, final OpenDefinitionsDocument startDoc, + final RegionManager rm, final MovingDocumentRegion region, final FindResultsPanel panel) { _machine.setSearchBackwards(false); - int searchLen = searchStr.length(); + final int searchLen = searchStr.length(); if (searchLen == 0) return; - _frame.setStatusMessage("Finding All"); - OpenDefinitionsDocument oldDoc = _machine.getDocument(); - OpenDefinitionsDocument oldFirstDoc = _machine.getFirstDoc(); - String oldFindWord = _machine.getFindWord(); - boolean oldSearchAll = _machine.getSearchAllDocuments(); - boolean oldSearchSelectionOnly = _machine.getSearchSelectionOnly(); - boolean oldMatchCase = _machine.getMatchCase(); - boolean oldWholeWord = _machine.getMatchWholeWord(); - boolean oldNoComments = _machine.getIgnoreCommentsAndStrings(); - boolean oldNoTestCases = _machine.getIgnoreTestCases(); - int oldPosition = _machine.getCurrentOffset(); - -// _updateMachine(); + final OpenDefinitionsDocument oldDoc = _machine.getDocument(); + final OpenDefinitionsDocument oldFirstDoc = _machine.getFirstDoc(); +// final String oldFindWord = _machine.getFindWord(); + final boolean oldSearchAll = _machine.getSearchAllDocuments(); + final boolean oldSearchSelectionOnly = _machine.getSearchSelectionOnly(); + final boolean oldMatchCase = _machine.getMatchCase(); + final boolean oldWholeWord = _machine.getMatchWholeWord(); + final boolean oldNoComments = _machine.getIgnoreCommentsAndStrings(); + final boolean oldNoTestCases = _machine.getIgnoreTestCases(); + final int oldPosition = _machine.getCurrentOffset(); + +// _updateMachine(); // in this method call, _defPane returned null in actual usage _machine.setDocument(startDoc); if (_machine.getFirstDoc() == null) _machine.setFirstDoc(startDoc); _machine.setSearchAllDocuments(searchAll); @@ -637,97 +633,192 @@ public void findAll(String searchStr, final boolean searchAll, _machine.setIgnoreTestCases(noTestCases); _machine.setFindWord(searchStr); - String replaceStr = _replaceField.getText(); + final String replaceStr = _replaceField.getText(); _machine.setReplaceWord(replaceStr); - _frame.clearStatusMessage(); final List results = new ArrayList(); + _frame.setStatusMessage("Finding All"); + repaint(); + _frame.hourglassOn(); + int count = 0; try { /* Accumulate all occurrences of searchStr in results. */ - final int count = _machine.processAll(new Runnable1() { - public void run(FindResult fr) { results.add(fr); } - }, region); - - _machine.setDocument(oldDoc); - _machine.setFirstDoc(oldFirstDoc); - _machine.setFindWord(oldFindWord); - _machine.setSearchAllDocuments(oldSearchAll); - _machine.setSearchSelectionOnly(oldSearchSelectionOnly); - _machine.setMatchCase(oldMatchCase); - if (oldWholeWord) { _machine.setMatchWholeWord(); } - else { _machine.setFindAnyOccurrence(); } - _machine.setIgnoreCommentsAndStrings(oldNoComments); - _machine.setIgnoreTestCases(oldNoTestCases); - _machine.setPosition(oldPosition); - - for (FindResult fr: results) { - - final OpenDefinitionsDocument doc = fr.getDocument(); - - if (_model.getActiveDocument() != doc) _model.setActiveDocument(doc); - else _model.refreshActiveDocument(); - - int end = fr.getFoundOffset(); - int start = end - searchLen; - int lineStart = doc._getLineStartPos(start); - int lineEnd = doc._getLineEndPos(end); - - rm.addRegion(new MovingDocumentRegion(doc, start, end, lineStart, lineEnd)); - } - -// EventQueue.invokeLater(new Runnable() { -// public void run() { - if (count > 0) _frame.showFindResultsPanel(panel); - else { - Toolkit.getDefaultToolkit().beep(); - panel.freeResources(); - } - _frame.setStatusMessage("Found " + count + " occurrence" + ((count == 1) ? "" : "s") + "."); -// } -// }); - - if (searchSelectionOnly) { - EventQueue.invokeLater(new Runnable() { public void run() { - if (_defPane != null) { - _defPane.requestFocusInWindow(); - _defPane.setSelectionStart(region.getStartOffset()); - _defPane.setSelectionEnd(region.getEndOffset()); - } - } }); - } + count = _machine.processAll(new Runnable1() { public void run(FindResult fr) { results.add(fr); }}, region); } finally { _frame.hourglassOff(); + _model.refreshActiveDocument(); + } + /* Restore state of FindReplaceMachine except for _findWord and _replaceWord. */ + _log.log("Restoring FindReplaceMachine"); + _machine.setDocument(oldDoc); + _machine.setFirstDoc(oldFirstDoc); +// _machine.setFindWord(oldFindWord); + _machine.setSearchAllDocuments(oldSearchAll); + _machine.setSearchSelectionOnly(oldSearchSelectionOnly); + _machine.setMatchCase(oldMatchCase); + if (oldWholeWord) { _machine.setMatchWholeWord(); } + else { _machine.setFindAnyOccurrence(); } + _machine.setIgnoreCommentsAndStrings(oldNoComments); + _machine.setIgnoreTestCases(oldNoTestCases); + _machine.setPosition(oldPosition); + +// System.out.println("Adding found regions to corresponding documents"); + for (FindResult fr: results) { + + final OpenDefinitionsDocument doc = fr.getDocument(); - // extracted from run() above because findAll occasionally left active document in inconsistent state - _model.setActiveDocument(startDoc); + final int end = fr.getFoundOffset(); + final int start = end - searchLen; + final int lineStart = doc._getLineStartPos(start); + final int lineEnd = doc._getLineEndPos(end); + + rm.addRegion(new MovingDocumentRegion(doc, start, end, lineStart, lineEnd)); } + + // show panel in tabbed pane unless it is empty + if (count > 0) _frame.showFindResultsPanel(panel); + else panel.freeResources(); + +// _model.refreshActiveDocument(); // force tabbed pane to show count for find command + + if (searchSelectionOnly) + EventQueue.invokeLater(new Runnable() { public void run() { + if (_defPane != null) { + _defPane.requestFocusInWindow(); + _defPane.setSelectionStart(region.getStartOffset()); + _defPane.setSelectionEnd(region.getEndOffset()); + } + } }); + _log.log("Completing findAll call"); + Toolkit.getDefaultToolkit().beep(); + _log.log("Updating status message to report number of matching occurrences"); + _frame.setStatusMessage("Found " + count + " occurrence" + ((count == 1) ? "" : "s") + "."); } /** Performs the "replace all" command. */ + private void _replaceAll() { - _frame.updateStatusField("Replacing All"); -// _updateMachine(); - _machine.setFindWord(_findField.getText()); - _machine.setReplaceWord(_replaceField.getText()); + + _findLabelBot.setText("Next"); + + final String searchStr = _findField.getText(); + final String replaceStr = _replaceField.getText(); + final String title = searchStr; + final OpenDefinitionsDocument startDoc = _defPane.getOpenDefDocument(); + final boolean searchAll = _machine.getSearchAllDocuments(); + final boolean searchSelectionOnly = _machine.getSearchSelectionOnly(); + final boolean matchCase = _machine.getMatchCase(); + final boolean wholeWord = _machine.getMatchWholeWord(); + final boolean noComments = _machine.getIgnoreCommentsAndStrings(); + final boolean noTestCases = _machine.getIgnoreTestCases(); + + final MovingDocumentRegion region = + new MovingDocumentRegion(startDoc, _defPane.getSelectionStart(), _defPane.getSelectionEnd(), + startDoc._getLineStartPos(_defPane.getSelectionStart()), + startDoc._getLineEndPos(_defPane.getSelectionEnd())); + + replaceAll(searchStr, replaceStr, searchAll, searchSelectionOnly, _machine.getMatchCase(), _machine.getMatchWholeWord(), + _machine.getIgnoreCommentsAndStrings(), _ignoreTestCases.isSelected(), startDoc, region); + } + + /** Performs the "replace all" with the specified options. + * @param searchStr string to search for + * @param replaceStr string to be used as replacement + * @param searchAll true if we should search all documents + * @param searchSelectionOnly true if we should search only the current selection + * @param matchCase true if search should be case-sensitive + * @param wholeWord true if we want to match the whole word + * @param noComments true if we want to ignore comments + * @param noTestCases true if we want to ignore test cases + * @param startDoc first document to search within + * @param region a MovingDocumentRegion + */ + public void replaceAll(final String searchStr, final String replaceStr, final boolean searchAll, final boolean searchSelectionOnly, + final boolean matchCase, final boolean wholeWord, final boolean noComments, final boolean noTestCases, + final OpenDefinitionsDocument startDoc, final MovingDocumentRegion region) { + + _machine.setSearchBackwards(false); - OpenDefinitionsDocument startDoc = _defPane.getOpenDefDocument(); - MovingDocumentRegion region = new MovingDocumentRegion(startDoc, - _defPane.getSelectionStart(), _defPane.getSelectionEnd(), - startDoc._getLineStartPos(_defPane.getSelectionStart()), - startDoc._getLineEndPos(_defPane.getSelectionEnd())); + final int searchLen = searchStr.length(); + if (searchLen == 0) return; + + final OpenDefinitionsDocument oldDoc = _machine.getDocument(); + final OpenDefinitionsDocument oldFirstDoc = _machine.getFirstDoc(); +// final String oldFindWord = _machine.getFindWord(); + final boolean oldSearchAll = _machine.getSearchAllDocuments(); + final boolean oldSearchSelectionOnly = _machine.getSearchSelectionOnly(); + final boolean oldMatchCase = _machine.getMatchCase(); + final boolean oldWholeWord = _machine.getMatchWholeWord(); + final boolean oldNoComments = _machine.getIgnoreCommentsAndStrings(); + final boolean oldNoTestCases = _machine.getIgnoreTestCases(); + final int oldPosition = _machine.getCurrentOffset(); + + _machine.setDocument(startDoc); + if (_machine.getFirstDoc() == null) _machine.setFirstDoc(startDoc); + _machine.setSearchAllDocuments(searchAll); + _machine.setSearchSelectionOnly(searchSelectionOnly); + _machine.setMatchCase(matchCase); + if (wholeWord) { _machine.setMatchWholeWord(); } + else { _machine.setFindAnyOccurrence(); } + _machine.setIgnoreCommentsAndStrings(noComments); + _machine.setPosition(startDoc.getCurrentLocation()); + _machine.setIgnoreTestCases(noTestCases); - _machine.setSelection(region); - _frame.clearStatusMessage(); - int count = _machine.replaceAll(); + _machine.setFindWord(searchStr); + _machine.setReplaceWord(replaceStr); + _log.log("In FindReplacePanel, setting _findWord (in FRM) to '" + searchStr + "' and _replaceWord to '" + replaceStr + "'"); + + _frame.setStatusMessage("Replacing All"); + repaint(); + + _frame.hourglassOn(); + int count = 0; + /* Code snippet to replace matched String (findWord) with replaceWord loaded into FindReplaceMachine. + * fr is ignored because the machine state implicitly contains this information. + * Aborts if an attempt is made to replace a string that does not match _findWord (searchStr). + */ + Runnable1 replaceMatchingString = new Runnable1() { + public void run(FindResult fr) { + boolean success =_machine.replaceCurrent(); + if (! success) throw new UnexpectedException("Replace All command aborted because current does not match search string"); + } + }; + try { + /* Replace all matching strings in region (which may be entire project). */ + count = _machine.processAll(replaceMatchingString, region); + } + finally { + _frame.hourglassOff(); + _model.refreshActiveDocument(); + } + + /* Restore state of FindReplaceMachine, except for _findWord and _replaceWord */ + _log.log("Restoring FindReplaceMachine"); + _machine.setDocument(oldDoc); + _machine.setFirstDoc(oldFirstDoc); +// _machine.setFindWord(oldFindWord); + _machine.setSearchAllDocuments(oldSearchAll); + _machine.setSearchSelectionOnly(oldSearchSelectionOnly); + _machine.setMatchCase(oldMatchCase); + if (oldWholeWord) { _machine.setMatchWholeWord(); } + else { _machine.setFindAnyOccurrence(); } + _machine.setIgnoreCommentsAndStrings(oldNoComments); + _machine.setIgnoreTestCases(oldNoTestCases); + _machine.setPosition(oldPosition); + Toolkit.getDefaultToolkit().beep(); _frame.setStatusMessage("Replaced " + count + " occurrence" + ((count == 1) ? "" : "s") + "."); _replaceAction.setEnabled(false); _replaceFindNextAction.setEnabled(false); _replaceFindPreviousAction.setEnabled(false); - _model.refreshActiveDocument(); // Rationale: a giant replaceAll left the definitions pane is a strange state + + _log.log("Refreshing active document after 'replace all'"); + _model.refreshActiveDocument(); // Rationale: a giant findAll left the definitions pane is a strange state + _findField.requestFocusInWindow(); +// EventQueue.invokeLater(new Runnable() { public void run() { panel.getRegTree().scrollRowToVisible(0); } }); } private void _replaceFindNext() { @@ -743,7 +834,7 @@ private void _replaceFindNext() { _frame.clearStatusMessage(); // _message.setText(""); // JL // replaces the occurrence at the current position - boolean replaced = _machine.replaceCurrent(); + final boolean replaced = _machine.replaceCurrent(); // and finds the next word if (replaced) { _selectFoundOrReplacedItem(replaceWord.length()); @@ -772,7 +863,7 @@ private void _replaceFindPrevious() { _frame.clearStatusMessage(); // replaces the occurrence at the current position - boolean replaced = _machine.replaceCurrent(); + final boolean replaced = _machine.replaceCurrent(); // and finds the previous word if (replaced) { _selectFoundOrReplacedItem(replaceWord.length()); @@ -812,14 +903,14 @@ void findPrevious() { private void _replace() { _frame.updateStatusField("Replacing"); -// _updateMachine(); + _updateMachine(); _machine.setFindWord(_findField.getText()); final String replaceWord = _replaceField.getText(); _machine.setReplaceWord(replaceWord); - _frame.clearStatusMessage(); +// _frame.clearStatusMessage(); // replaces the occurrence at the current position - boolean replaced = _machine.replaceCurrent(); + final boolean replaced = _machine.replaceCurrent(); if (replaced) _selectFoundOrReplacedItem(replaceWord.length()); _replaceAction.setEnabled(false); _replaceFindNextAction.setEnabled(false); @@ -831,6 +922,7 @@ private void _replace() { * @param defPane a DefinitionsPane */ void beginListeningTo(DefinitionsPane defPane) { +// System.out.println("beginListeningTo called!"); if (_defPane == null) { // removed so it doesn't give the pane focus when switching documents // requestFocusInWindow(); @@ -843,7 +935,7 @@ void beginListeningTo(DefinitionsPane defPane) { _machine.setFindWord(_findField.getText()); _machine.setReplaceWord(_replaceField.getText()); _frame.clearStatusMessage(); // _message.setText(""); // JL - if (! _machine.onMatch() || _findField.getText().equals("")) { + if (! _machine.onFindWordMatch() || _findField.getText().equals("")) { _replaceAction.setEnabled(false); _replaceFindNextAction.setEnabled(false); _replaceFindPreviousAction.setEnabled(false); @@ -866,6 +958,7 @@ void beginListeningTo(DefinitionsPane defPane) { /** Called from MainFrame upon closing this Dialog or changes in the active document. */ public void stopListening() { +// System.out.println("stopListening() called"); if (_defPane != null) { _defPane.removeCaretListener(_caretListener); _defPane = null; @@ -883,7 +976,7 @@ private void _doFind() { final String findWord = _findField.getText(); _machine.setFindWord(findWord); _machine.setReplaceWord(_replaceField.getText()); - _frame.clearStatusMessage(); // _message.setText(""); // JL + _frame.clearStatusMessage(); final boolean searchAll = _machine.getSearchAllDocuments(); // FindResult contains the document that the result was found in, offset to the next occurrence of @@ -891,7 +984,7 @@ private void _doFind() { // for the string. _frame.hourglassOn(); try { - FindResult fr = _machine.findNext(); + final FindResult fr = _machine.findNext(); OpenDefinitionsDocument matchDoc = fr.getDocument(); // OpenDefinitionsDocument matchDoc = _model.getODDForDocument(doc); OpenDefinitionsDocument openDoc = _defPane.getOpenDefDocument(); @@ -906,7 +999,7 @@ private void _doFind() { else _model.refreshActiveDocument(); // the unmodified active document may have been kicked out of the cache! } - if (fr.getWrapped() && ! searchAll) { + if (fr.isWrapped() && ! searchAll) { Toolkit.getDefaultToolkit().beep(); if (! _machine.isSearchBackwards()) _frame.setStatusMessage("Search wrapped to beginning."); else _frame.setStatusMessage("Search wrapped to end."); @@ -1000,12 +1093,10 @@ public void updateFirstDocInSearch() { // return stretcher; // } // -// /** Consider a parent container. Change its layout to GridBagLayout -// * with 2 columns, 2 rows. Consider them quadrants in a coordinate plain. -// * put the arguments in their corresponding quadrants, ignoring q3. -// */ -// private static void hookComponents(Container parent, JComponent q1, -// JComponent q2, JComponent q4) { +// /** Consider a parent container. Change its layout to GridBagLayout with 2 columns, 2 rows. Consider them +// * quadrants in a coordinate plain. Put the arguments in their corresponding quadrants, ignoring q3. +// */ +// private static void hookComponents(Container parent, JComponent q1, JComponent q2, JComponent q4) { // GridBagLayout gbl = new GridBagLayout(); // GridBagConstraints c = new GridBagConstraints(); // parent.setLayout(gbl); @@ -1033,12 +1124,13 @@ public void updateFirstDocInSearch() { /** Sets appropriate variables in the FindReplaceMachine if the caret has been changed. */ private void _updateMachine() { if (_caretChanged) { - OpenDefinitionsDocument doc = _model.getActiveDocument(); + final OpenDefinitionsDocument doc = _model.getActiveDocument(); _machine.setDocument(doc); if (_machine.getFirstDoc() == null) _machine.setFirstDoc(doc); -// _machine.setStart(_defPane.getCaretPosition()); - _machine.setPosition(_defPane.getCaretPosition()); - _caretChanged = false; + if (_defPane != null) { + _machine.setPosition(_defPane.getCaretPosition()); + _caretChanged = false; + } } } @@ -1060,8 +1152,8 @@ private void _updateMachine() { * @param length length of the found or replaced item */ private void _selectFoundOrReplacedItem(int length) { - int offset = _machine.getCurrentOffset(); - int from, to; + final int offset = _machine.getCurrentOffset(); + final int from, to; if (_machine.isSearchBackwards()) { from = offset + length; @@ -1146,10 +1238,10 @@ public void lostOwnership(Clipboard clipboard, Transferable contents) { Action cutAction = new DefaultEditorKit.CutAction() { public void actionPerformed(ActionEvent e) { if (e.getSource() instanceof JTextComponent) { - JTextComponent tc = (JTextComponent)e.getSource(); + final JTextComponent tc = (JTextComponent)e.getSource(); if (tc.getSelectedText() != null) { super.actionPerformed(e); - String s = edu.rice.cs.util.swing.Utilities.getClipboardSelection(FindReplacePanel.this); + final String s = edu.rice.cs.util.swing.Utilities.getClipboardSelection(FindReplacePanel.this); if (s != null && s.length() != 0){ ClipboardHistoryModel.singleton().put(s); } } } @@ -1160,10 +1252,10 @@ public void actionPerformed(ActionEvent e) { Action copyAction = new DefaultEditorKit.CopyAction() { public void actionPerformed(ActionEvent e) { if (e.getSource() instanceof JTextComponent) { - JTextComponent tc = (JTextComponent)e.getSource(); + final JTextComponent tc = (JTextComponent)e.getSource(); if (tc.getSelectedText() != null) { super.actionPerformed(e); - String s = edu.rice.cs.util.swing.Utilities.getClipboardSelection(FindReplacePanel.this); + final String s = edu.rice.cs.util.swing.Utilities.getClipboardSelection(FindReplacePanel.this); if (s != null && s.length() != 0) { ClipboardHistoryModel.singleton().put(s); } } } @@ -1175,22 +1267,33 @@ public void actionPerformed(ActionEvent e) { * @param searchString the string to check the region against * @return whether or not the text in r matches searchString */ - public boolean isMatch(MovingDocumentRegion r, String searchString) { - OpenDefinitionsDocument doc = r.getDocument(); - int startPos = r.getStartOffset(); - int endPos = r.getEndOffset(); + public boolean isSearchStringMatch(MovingDocumentRegion r, String searchString) { + final OpenDefinitionsDocument doc = r.getDocument(); + final int startPos = r.getStartOffset(); + final int endPos = r.getEndOffset(); - if ((endPos - startPos == searchString.length()) && (_machine != null)) { - _machine.setFindWord(searchString); - _machine.setDocument(doc); - _machine.setPosition(endPos); - return _machine.onMatch(); + if ((endPos - startPos == searchString.length()) && (_machine != null)) { /* preserves the state of the FRM! */ + /* save state of FRM */ + final String oldFindWord = _machine.getFindWord(); + final OpenDefinitionsDocument oldDoc = _machine.getDocument(); + final int oldPos = _machine.getCurrentOffset(); + + try { + _machine.setFindWord(searchString); + _machine.setDocument(doc); + _machine.setPosition(endPos); + return _machine.onFindWordMatch(); + } + finally { /* restore state of FRM */ + _machine.setFindWord(oldFindWord); + _machine.setDocument(oldDoc); + _machine.setPosition(oldPos); + } } - return false; } /*--------------------- METHODS FOR TESTING PURPOSES ONLY ---------------------*/ public DefinitionsPane getDefPane() { return _defPane; } - public JButton getFindNextButton() {return _findNextButton; } + public JButton getFindNextButton() { return _findNextButton; } } diff --git a/drjava/src/edu/rice/cs/drjava/ui/FindResultsPanel.java b/drjava/src/edu/rice/cs/drjava/ui/FindResultsPanel.java index ba8a53dd0..999971f6c 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/FindResultsPanel.java +++ b/drjava/src/edu/rice/cs/drjava/ui/FindResultsPanel.java @@ -1,6 +1,6 @@ /*BEGIN_COPYRIGHT_BLOCK * - * Copyright (c) 2001-2010, JavaPLT group at Rice University (javaplt@rice.edu) + * Copyright (c) 2001-2019, JavaPLT group at Rice University (javaplt@rice.edu) * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -53,21 +53,24 @@ import javax.swing.border.LineBorder; import javax.swing.border.MatteBorder; +import edu.rice.cs.drjava.DrJava; +import edu.rice.cs.drjava.config.Option; +import edu.rice.cs.drjava.config.OptionConstants; +import edu.rice.cs.drjava.config.OptionEvent; +import edu.rice.cs.drjava.config.OptionListener; import edu.rice.cs.drjava.model.MovingDocumentRegion; import edu.rice.cs.drjava.model.OpenDefinitionsDocument; import edu.rice.cs.drjava.model.RegionManager; import edu.rice.cs.drjava.model.RegionManagerListener; -import edu.rice.cs.drjava.config.*; -import edu.rice.cs.drjava.DrJava; import edu.rice.cs.plt.tuple.Pair; -import edu.rice.cs.drjava.config.OptionConstants; +import edu.rice.cs.util.swing.Utilities; /** Panel for displaying find results. This class is a swing class which should only be accessed from the event thread. * @version $Id$ */ public class FindResultsPanel extends RegionsTreePanel { - // The following field has been hoisted into RegionsTreePanel + /* The following field has been hoisted into RegionsTreePanel */ // protected final RegionManager _regionManager; private final String _searchString; private final boolean _searchAll; @@ -91,33 +94,31 @@ public class FindResultsPanel extends RegionsTreePanel { private final LinkedList, OptionListener>> _colorOptionListeners = new LinkedList, OptionListener>>(); - /** Constructs a new find results panel. This is swing class which should - * only be accessed from the event thread. - * @param frame the MainFrame - * @param regionManager the region manager associated with this panel - * @param region the region associated with this panel - * @param title for the panel - * @param searchString string that was searched for - * @param searchAll whether all files were searched - * @param searchSelectionOnly whether the selection within the document was searched - * @param matchCase whether the search was case-sensitive - * @param wholeWord whether the search was looking for a match on the whole word - * @param noComments whether the search ignored comments - * @param noTestCases whether the search ignored test cases - * @param doc weak reference to the document in which the search occurred (or started, if all documents were searched) - * @param findReplace the FindReplacePanel that created this FindResultsPanel - */ - public FindResultsPanel(MainFrame frame, - RegionManager regionManager, - MovingDocumentRegion region, String title, String searchString, - boolean searchAll, boolean searchSelectionOnly, boolean matchCase, - boolean wholeWord, boolean noComments, boolean noTestCases, - WeakReference doc, FindReplacePanel findReplace) { + /** Constructs a new find results panel. This is swing class which should only be accessed from the event thread. + * @param frame the MainFrame + * @param regionManager the region manager associated with this panel + * @param region the region associated with this panel + * @param title for the panel + * @param searchString string that was searched for + * @param searchAll whether all files were searched + * @param searchSelectionOnly whether the selection within the document was searched + * @param matchCase whether the search was case-sensitive + * @param wholeWord whether the search was looking for a match on the whole word + * @param noComments whether the search ignored comments + * @param noTestCases whether the search ignored test cases + * @param doc weak reference to the document in which the search occurred (or started, if all documents were searched) + * @param findReplacePanel the FindReplacePanel that created this FindResultsPanel + */ + public FindResultsPanel(final MainFrame frame, final RegionManager regionManager, + final MovingDocumentRegion region, final String title, final String searchString, + final boolean searchAll, final boolean searchSelectionOnly, final boolean matchCase, + final boolean wholeWord, final boolean noComments, final boolean noTestCases, + final WeakReference doc, final FindReplacePanel findReplacePanel) { super(frame, title, regionManager); // _regionManager is inherited from RegionsTreePanel - _region = region; + _region = region; _searchString = searchString; _searchAll = searchAll; _searchSelectionOnly = searchSelectionOnly; @@ -126,15 +127,17 @@ public FindResultsPanel(MainFrame frame, _noComments = noComments; _noTestCases = noTestCases; _doc = doc; - _findReplace = findReplace; + _findReplace = findReplacePanel; // set "Find Again" button tooltip - StringBuilder sb = new StringBuilder(); + final StringBuilder sb = new StringBuilder(); sb.append("Find '").append(title); - if (!title.equals(_searchString)) sb.append("..."); + if (! title.equals(_searchString)) sb.append("..."); sb.append("'"); + if (_searchAll) sb.append(" in all files"); else if (_searchSelectionOnly) sb.append(" only in original selection."); + sb.append("."); if (_matchCase) sb.append("
Case must match."); if (_wholeWord) sb.append("
Whole words only."); @@ -143,9 +146,6 @@ public FindResultsPanel(MainFrame frame, sb.append(""); _findAgainButton.setToolTipText(sb.toString()); - final FindReplacePanel findReplaceRef = findReplace; - final String searchStringRef = searchString; - // Similar (but NOT identical) code found in BookmarksPanel and BreakpointsPanel getRegionManager().addListener(new RegionManagerListener() { public void regionAdded(MovingDocumentRegion r) { addRegion(r); } @@ -153,9 +153,7 @@ public void regionChanged(MovingDocumentRegion r) { regionRemoved(r); /* Only re-add the region if it is still a match. */ - if (findReplaceRef.isMatch(r, searchStringRef)) { - regionAdded(r); - } + if (findReplacePanel.isSearchStringMatch(r, searchString)) { regionAdded(r); } } public void regionRemoved(MovingDocumentRegion r) { removeRegion(r); } }); @@ -167,10 +165,11 @@ public void regionChanged(MovingDocumentRegion r) { _colorOptionListeners.add(pair); DrJava.getConfig().addOptionListener(OptionConstants.FIND_RESULTS_COLORS[i], listener); } - } + } // end constructor class ColorComboRenderer extends JPanel implements ListCellRenderer { - private volatile Color _color = DrJava.getConfig().getSetting(OptionConstants.FIND_RESULTS_COLORS[_colorBox.getSelectedIndex()]); + private volatile Color _color = + DrJava.getConfig().getSetting(OptionConstants.FIND_RESULTS_COLORS[_colorBox.getSelectedIndex()]); private final DefaultListCellRenderer _defaultRenderer = new DefaultListCellRenderer(); private final Dimension _size = new Dimension(0, 20); private final CompoundBorder _compoundBorder = @@ -198,15 +197,16 @@ public Component getListCellRendererComponent(JList list, Color return renderer; } - public void paint(Graphics g) { + public void paint(final Graphics g) { setBackground(_color); setBorder(_compoundBorder); super.paint(g); } } - /** Creates the buttons for controlling the regions. Should be overridden. */ - protected JComponent[] makeButtons() { + /** Creates the buttons for controlling the regions. */ + @Override protected JComponent[] makeButtons() { + assert EventQueue.isDispatchThread() || Utilities.TEST_MODE; Action findAgainAction = new AbstractAction("Find Again") { public void actionPerformed(ActionEvent ae) { _findAgain(); } }; @@ -251,11 +251,11 @@ protected JComponent[] makeButtons() { _colorBox.setRenderer(new ColorComboRenderer()); _colorBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { - if (_lastIndex
A build directory must be specified in order to jar class files,
and the project needs to be compiled.
", SwingConstants.CENTER); + _cantJarClassesLabel = + new JLabel("
A build directory must be specified in order to jar class files,
" + + "and the project needs to be compiled.
", SwingConstants.CENTER); c.gridx = 0; c.anchor = GridBagConstraints.WEST; c.fill = GridBagConstraints.HORIZONTAL; @@ -534,7 +528,7 @@ protected void _chooseFile() { } super._chooseFile(); File chosen = getFileChooser().getSelectedFile(); // getSelectedFile() may return null - if((chosen != null) && !chosen.getAbsolutePath().startsWith(_rootFile.getAbsolutePath())) { + if ((chosen != null) && !chosen.getAbsolutePath().startsWith(_rootFile.getAbsolutePath())) { JOptionPane.showMessageDialog(JarOptionsDialog.this, "Main Class must be in Build Directory or one of its sub-directories.", "Unable to set Main Class", JOptionPane.ERROR_MESSAGE); @@ -703,7 +697,7 @@ public boolean accept(File f) { File[] files = dir.listFiles(allFilter); - if(files != null) { + if (files != null) { for(int i = 0; i < files.length; i++) { try { if (files[i].isDirectory()) { @@ -745,7 +739,7 @@ public boolean accept(File f) { for (int i = 0; i < files.length; i++) { LOG.log("\t\tfiles[" + i + "] = " + files[i]); - if(files[i] == null || !files[i].exists()) continue; + if (files[i] == null || !files[i].exists()) continue; try { if (files[i].isDirectory()) { @@ -807,7 +801,7 @@ public Object construct() { if (_makeExecutable.isSelected() || _customManifest.isSelected()) { ManifestWriter mw = new ManifestWriter(); - if(_makeExecutable.isSelected()) + if (_makeExecutable.isSelected()) mw.setMainClass(_mainClassField.getText()); else mw.setManifestContents(_customManifestText); @@ -821,29 +815,29 @@ public Object construct() { //If the project has a set build directory, start there. //Otherwise, start at project root File binRoot = _model.getBuildDirectory(); - if(binRoot == null || binRoot == FileOps.NULL_FILE || binRoot.toString().trim().length() == 0) + if (binRoot == null || binRoot == FileOps.NULL_FILE || binRoot.toString().trim().length() == 0) binRoot = _model.getProjectRoot(); - if(!_jarAll.isSelected()) + if (!_jarAll.isSelected()) jarBuildDirectory(binRoot, mainJar); //File.createTempFile will fail if the prefix provided is less than 3 characters long. //Not sure why we're using the build directory name here in the first place //But would rather not change it in the general case; just in case. String prefix = _model.getBuildDirectory().getName(); - if(prefix.length() < 3) + if (prefix.length() < 3) prefix = "drjava_tempSourceJar"; File sourceJarFile = File.createTempFile(prefix, ".jar"); - if(!_jarAll.isSelected()) { + if (!_jarAll.isSelected()) { JarBuilder sourceJar = new JarBuilder(sourceJarFile); jarSources(_model, sourceJar); sourceJar.close(); mainJar.addFile(sourceJarFile, "", "source.jar"); } - if(_jarAll.isSelected()) { + if (_jarAll.isSelected()) { LOG.log("jarAll"); LOG.log("binRoot=" + binRoot); LOG.log("root=" + _model.getProjectRoot()); @@ -851,7 +845,7 @@ public Object construct() { LOG.log("mainJar=" + mainJar); LOG.log("jarOut=" + jarOut); jarAll(_model.getProjectRoot(), mainJar, jarOut); - if(!_model.getProjectRoot().equals(binRoot)) + if (!_model.getProjectRoot().equals(binRoot)) LOG.log("jarBuildDirectory"); jarBuildDirectory(binRoot, mainJar); } @@ -863,14 +857,14 @@ else if (_jarClasses.isSelected()) { JarBuilder jb; if (_makeExecutable.isSelected() || _customManifest.isSelected()) { ManifestWriter mw = new ManifestWriter(); - if(_makeExecutable.isSelected()) + if (_makeExecutable.isSelected()) mw.setMainClass(_mainClassField.getText()); else mw.setManifestContents(_customManifestText); Manifest m = mw.getManifest(); - if(m != null) + if (m != null) jb = new JarBuilder(jarOut, m); else throw new IOException("Manifest is malformed"); @@ -881,7 +875,7 @@ else if (_jarClasses.isSelected()) { //If the project has a set build directory, start there. //Otherwise, start at project root File binRoot = _model.getBuildDirectory(); - if(binRoot == null || binRoot == FileOps.NULL_FILE || binRoot.toString().trim().length() == 0) + if (binRoot == null || binRoot == FileOps.NULL_FILE || binRoot.toString().trim().length() == 0) binRoot = _model.getProjectRoot(); jarBuildDirectory(binRoot, jb); @@ -957,14 +951,14 @@ public Object construct() { } else { ManifestWriter mw = new ManifestWriter(); - if(_makeExecutable.isSelected()) + if (_makeExecutable.isSelected()) mw.setMainClass(_mainClassField.getText()); else mw.setManifestContents(_customManifestText); Manifest m = mw.getManifest(); - if(m != null){ + if (m != null){ if (_exceptions.size() > 0) { ScrollableListDialog dialog = new ScrollableListDialog.Builder() .setOwner(JarOptionsDialog.this) @@ -1035,7 +1029,7 @@ private boolean _saveSettings() { String currentManifest = _model.getCustomManifest(); - if(currentManifest == null || !(currentManifest.equals(_customManifestText))){ + if (currentManifest == null || !(currentManifest.equals(_customManifestText))){ LOG.log("Updated Manifest on: " + _model); _model.setCustomManifest(_customManifestText); } diff --git a/drjava/src/edu/rice/cs/drjava/ui/JavaSourceFilter.java b/drjava/src/edu/rice/cs/drjava/ui/JavaSourceFilter.java index 0c6af2a9f..94a2f7cfc 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/JavaSourceFilter.java +++ b/drjava/src/edu/rice/cs/drjava/ui/JavaSourceFilter.java @@ -1,45 +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.ui; import java.io.File; import javax.swing.filechooser.FileFilter; import edu.rice.cs.drjava.DrJava; import edu.rice.cs.drjava.config.OptionConstants; +import edu.rice.cs.util.UnexpectedException; /** A file filter for files with extensions ".java" and ".dj?". Used in the file choosers for open and save. @@ -57,14 +50,16 @@ public boolean accept(File f) { switch (DrJava.getConfig().getSetting(OptionConstants.LANGUAGE_LEVEL)) { case (OptionConstants.FULL_JAVA): return (extension.equals(OptionConstants.JAVA_FILE_EXTENSION)); - case (OptionConstants.ELEMENTARY_LEVEL): - return extension.equals(OptionConstants.OLD_DJ0_FILE_EXTENSION); - case (OptionConstants.INTERMEDIATE_LEVEL): - return extension.equals(OptionConstants.OLD_DJ1_FILE_EXTENSION); - case (OptionConstants.ADVANCED_LEVEL): - return extension.equals(OptionConstants.OLD_DJ2_FILE_EXTENSION); +// case (OptionConstants.ELEMENTARY_LEVEL): +// return extension.equals(OptionConstants.OLD_DJ0_FILE_EXTENSION); +// case (OptionConstants.INTERMEDIATE_LEVEL): +// return extension.equals(OptionConstants.OLD_DJ1_FILE_EXTENSION); +// case (OptionConstants.ADVANCED_LEVEL): +// return extension.equals(OptionConstants.OLD_DJ2_FILE_EXTENSION); case (OptionConstants.FUNCTIONAL_JAVA_LEVEL): return extension.equals(OptionConstants.DJ_FILE_EXTENSION); + default: /* Should never happen */ throw + new UnexpectedException("LANGUAGE_LEVEL is " + DrJava.getConfig().getSetting(OptionConstants.LANGUAGE_LEVEL)); } } return false; diff --git a/drjava/src/edu/rice/cs/drjava/ui/JavadocDialog.java b/drjava/src/edu/rice/cs/drjava/ui/JavadocDialog.java index 6f8a097bd..5639c39d8 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/JavadocDialog.java +++ b/drjava/src/edu/rice/cs/drjava/ui/JavadocDialog.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.ui; import edu.rice.cs.util.swing.DirectorySelectorComponent; diff --git a/drjava/src/edu/rice/cs/drjava/ui/JavadocErrorPanel.java b/drjava/src/edu/rice/cs/drjava/ui/JavadocErrorPanel.java index f9c147b2a..b68b2395a 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/JavadocErrorPanel.java +++ b/drjava/src/edu/rice/cs/drjava/ui/JavadocErrorPanel.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.ui; import edu.rice.cs.drjava.model.SingleDisplayModel; diff --git a/drjava/src/edu/rice/cs/drjava/ui/JavadocFrame.java b/drjava/src/edu/rice/cs/drjava/ui/JavadocFrame.java index c2d0c6147..44a1d8fe8 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/JavadocFrame.java +++ b/drjava/src/edu/rice/cs/drjava/ui/JavadocFrame.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.ui; import javax.swing.event.HyperlinkListener; diff --git a/drjava/src/edu/rice/cs/drjava/ui/KeyBindingManager.java b/drjava/src/edu/rice/cs/drjava/ui/KeyBindingManager.java index 9982fbb54..156ce5d5d 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/KeyBindingManager.java +++ b/drjava/src/edu/rice/cs/drjava/ui/KeyBindingManager.java @@ -1,43 +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.ui; import edu.rice.cs.drjava.*; import edu.rice.cs.drjava.config.*; + +import java.awt.EventQueue; import javax.swing.*; import java.util.*; @@ -72,6 +66,7 @@ private KeyBindingManager() { } public Collection getKeyStrokeData() { return _actionToDataMap.values(); } public void put(VectorOption vkso, Action a, JMenuItem jmi, String name) { + assert (EventQueue.isDispatchThread()); Vector keys = DrJava.getConfig().getSetting(vkso); Vector retained = new Vector(); KeyStrokeData ksd = new KeyStrokeData(keys, a, jmi, name, vkso); diff --git a/drjava/src/edu/rice/cs/drjava/ui/LessPanel.java b/drjava/src/edu/rice/cs/drjava/ui/LessPanel.java index dd24ddfb7..47a1626ba 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/LessPanel.java +++ b/drjava/src/edu/rice/cs/drjava/ui/LessPanel.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.ui; import java.io.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/LineEnumRule.java b/drjava/src/edu/rice/cs/drjava/ui/LineEnumRule.java index f2f6bc5e7..51e55b288 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/LineEnumRule.java +++ b/drjava/src/edu/rice/cs/drjava/ui/LineEnumRule.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.ui; import java.awt.*; @@ -89,8 +81,8 @@ public Dimension getPreferredSize() { } /** Updates the row header's font information. - * Uses a custom config setting for this purpose. - */ + * Uses a custom config setting for this purpose. + */ public void updateFont() { _fm = _pane.getFontMetrics(_pane.getFont()); _newFont = _getLineNumFont(); diff --git a/drjava/src/edu/rice/cs/drjava/ui/MainFrame.java b/drjava/src/edu/rice/cs/drjava/ui/MainFrame.java index 6f6228554..e132cfeda 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/MainFrame.java +++ b/drjava/src/edu/rice/cs/drjava/ui/MainFrame.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.ui; import javax.swing.*; @@ -52,6 +44,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; +import java.util.Collections; +import java.util.Enumeration; import java.util.HashMap; import java.util.HashSet; import java.util.IdentityHashMap; @@ -101,7 +95,12 @@ import edu.rice.cs.plt.concurrent.JVMBuilder; import edu.rice.cs.plt.io.IOUtil; import edu.rice.cs.plt.iter.IterUtil; -import edu.rice.cs.plt.lambda.*; +//import edu.rice.cs.plt.lambda.*; +import edu.rice.cs.plt.lambda.DelayedThunk; +import edu.rice.cs.plt.lambda.Predicate; +import edu.rice.cs.plt.lambda.Runnable1; // variant on Runnable with unary run method +import edu.rice.cs.plt.lambda.Runnable3; // variant on Runnable with ternary run method +import edu.rice.cs.plt.lambda.Thunk; import edu.rice.cs.plt.reflect.JavaVersion; import edu.rice.cs.plt.tuple.Pair; import edu.rice.cs.util.classloader.ClassFileError; @@ -150,7 +149,7 @@ public class MainFrame extends SwingFrame implements ClipboardOwner, DropTargetL private volatile ModelListener _mainListener; /** Maps an OpenDefDoc to its JScrollPane. Why doesn't OpenDefDoc contain a defScrollPane field? */ - private HashMap _defScrollPanes; + private volatile HashMap _defScrollPanes; /** The currently displayed DefinitionsPane. */ private volatile DefinitionsPane _currentDefPane; @@ -231,6 +230,8 @@ public class MainFrame extends SwingFrame implements ClipboardOwner, DropTargetL private volatile JMenu _languageLevelMenu; private volatile JMenu _helpMenu; + private volatile ButtonGroup _languageLevelButtonGroup; + private volatile JMenu _debugMenu; private volatile JMenuItem _debuggerEnabledMenuItem; @@ -1120,21 +1121,21 @@ public void actionPerformed(ActionEvent e) { /** Show the coverage report dialogue */ private volatile AbstractAction _coverageAction = new AbstractAction("Code Coverage") { {}// _addGUIAvailabilityListener(this, // init - //GUIAvailabilityListener.ComponentType.INTERACTIONS);} + //GUIAvailabilityListener.ComponentType.INTERACTIONS);} public void actionPerformed(ActionEvent ae) { - if (!_model.hasOutOfSyncDocuments()) { - showCoverageFrame(); - } - else { - - CompilerListener coverage = new DummyCompilerListener() { - @Override public void compileAborted(Exception e) { + if (!_model.hasOutOfSyncDocuments()) { + showCoverageFrame(); + } + else { + + CompilerListener coverage = new DummyCompilerListener() { + @Override public void compileAborted(Exception e) { // gets called if there are modified files and the user chooses NOT to save the files // see bug report 2582488: Hangs If Testing Modified File, But Choose "No" for Saving final CompilerListener listenerThis = this; - _model.getCompilerModel().removeListener(listenerThis); - } + _model.getCompilerModel().removeListener(listenerThis); + } @Override public void compileEnded(File workDir, List excludedFiles) { final CompilerListener listenerThis = this; @@ -1152,14 +1153,14 @@ public void actionPerformed(ActionEvent ae) { }); } } + + + }; //end coverage listener - - }; //end coverage listener - - compileBeforeCodeCoverage(coverage); - - } //end else - } + compileBeforeCodeCoverage(coverage); + + } //end else + } }; public void showCoverageFrame() { @@ -1230,7 +1231,7 @@ public void actionPerformed(ActionEvent e) { _currentDefPane.endCompoundEdit(); // replaced line below for French keyboard fix // undoMan.endCompoundEdit(key); // French keyboard fix } - else if(_interactionsPane.hasFocus()){ + else if (_interactionsPane.hasFocus()){ _interactionsPane.endCompoundEdit(); super.actionPerformed(e); _interactionsPane.endCompoundEdit(); @@ -1721,74 +1722,76 @@ public void resetOpenJavadocDialogPosition() { } } - /** Initialize dialog if necessary. - * Should NOT be called in the event thread. ???*/ + /** Initialize dialog if necessary. Runs asynchronously so as not to block event handling thread. + * Binds _openJavaDocDialog. Should it be synchronized using a future? */ void initOpenJavadocDialog() { -// assert (!EventQueue.isDispatchThread()); - if (_openJavadocDialog == null) { - PredictiveInputFrame.InfoSupplier info = - new PredictiveInputFrame.InfoSupplier() { - public String value(JavaAPIListEntry entry) { - return entry.getFullString(); - } - }; - PredictiveInputFrame.CloseAction okAction = - new PredictiveInputFrame.CloseAction() { - public String getName() { return "OK"; } - public KeyStroke getKeyStroke() { return KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0); } - public String getToolTipText() { return null; } - public Object value(PredictiveInputFrame p) { - if (p.getItem() != null) PlatformFactory.ONLY.openURL(p.getItem().getURL()); - hourglassOff(); - return null; - } - }; - PredictiveInputFrame.CloseAction cancelAction = - new PredictiveInputFrame.CloseAction() { - public String getName() { return "Cancel"; } - public KeyStroke getKeyStroke() { return KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0); } - public String getToolTipText() { return null; } - public Object value(PredictiveInputFrame p) { - hourglassOff(); - return null; - } - }; - // Note: PredictiveInputModel.* is statically imported - ArrayList> strategies = new ArrayList>(); - strategies.add(new FragmentStrategy()); - strategies.add(new PrefixStrategy()); - strategies.add(new RegExStrategy()); - List> actions - = new ArrayList>(); - actions.add(okAction); - actions.add(cancelAction); - _openJavadocDialog = - new PredictiveInputFrame(MainFrame.this, - "Open Java API Javadoc Webpage", - true, // force - true, // ignore case - info, - strategies, - actions, 1, // cancel is action 1 - new JavaAPIListEntry("dummyJavadoc", "dummyJavadoc", null)) { - public void setOwnerEnabled(boolean b) { - if (b) hourglassOff(); - else hourglassOn(); + Executors.newSingleThreadExecutor().submit(new Runnable() { + public void run() { + if (_openJavadocDialog == null) { + PredictiveInputFrame.InfoSupplier info = + new PredictiveInputFrame.InfoSupplier() { + public String value(JavaAPIListEntry entry) { return entry.getFullString(); } + }; + + PredictiveInputFrame.CloseAction okAction = + new PredictiveInputFrame.CloseAction() { + public String getName() { return "OK"; } + public KeyStroke getKeyStroke() { return KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0); } + public String getToolTipText() { return null; } + public Object value(PredictiveInputFrame p) { + if (p.getItem() != null) PlatformFactory.ONLY.openURL(p.getItem().getURL()); + hourglassOff(); + return null; + } + }; + PredictiveInputFrame.CloseAction cancelAction = + new PredictiveInputFrame.CloseAction() { + public String getName() { return "Cancel"; } + public KeyStroke getKeyStroke() { return KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0); } + public String getToolTipText() { return null; } + public Object value(PredictiveInputFrame p) { + hourglassOff(); + return null; + } + }; + // Note: PredictiveInputModel.* is statically imported + ArrayList> strategies = new ArrayList>(); + strategies.add(new FragmentStrategy()); + strategies.add(new PrefixStrategy()); + strategies.add(new RegExStrategy()); + List> actions + = new ArrayList>(); + actions.add(okAction); + actions.add(cancelAction); + _openJavadocDialog = + new PredictiveInputFrame(MainFrame.this, + "Open Java API Javadoc Webpage", + true, // force + true, // ignore case + info, + strategies, + actions, 1, // cancel is action 1 + new JavaAPIListEntry("dummyJavadoc", "dummyJavadoc", null)) { + public void setOwnerEnabled(boolean b) { + if (b) hourglassOff(); + else hourglassOn(); + } + }; + // putting one dummy entry in the list; it will be changed later anyway + + if (DrJava.getConfig().getSetting(DIALOG_OPENJAVADOC_STORE_POSITION).booleanValue()) { + _openJavadocDialog.setFrameState(DrJava.getConfig().getSetting(DIALOG_OPENJAVADOC_STATE)); + } + generateJavaAPISet(); } - }; - // putting one dummy entry in the list; it will be changed later anyway - - if (DrJava.getConfig().getSetting(DIALOG_OPENJAVADOC_STORE_POSITION).booleanValue()) { - _openJavadocDialog.setFrameState(DrJava.getConfig().getSetting(DIALOG_OPENJAVADOC_STATE)); } - generateJavaAPISet(); - } + }); } /** Generate Java API class list. - * @param suffix the suffix to append to the API path - * @return the Java API class list - */ + * @param suffix the suffix to append to the API path + * @return the Java API class list + */ public static Set _generateJavaAPISet(String suffix) { URL url = MainFrame.class.getResource("/edu/rice/cs/drjava/docs/javaapi" + suffix); return _generateJavaAPISet(url); @@ -1867,8 +1870,8 @@ public Set getJavaAPISet() { return _javaAPISet; } - /** Generate Java API class list. */ - public void generateJavaAPISet() { + /** Generate Java API class list. Only called from an asynchronous thread. */ + private void generateJavaAPISet() { // should NOT be called in the event thread // otherwise the processing frame will not work correctly and the event thread will block // assert (!EventQueue.isDispatchThread()); // Why is this commented out??? @@ -1876,52 +1879,54 @@ public void generateJavaAPISet() { final ProcessingDialog pd = new ProcessingDialog(this, "Java API Classes", "Loading, please wait.", false); if (! EventQueue.isDispatchThread()) { pd.setVisible(true); } - // generate list - String linkVersion = DrJava.getConfig().getSetting(JAVADOC_API_REF_VERSION); - - // the string that will be ADDED to the beginning of the link to form the full URL - String base = ""; - // the string that will be REMOVED from the beginning of the link to form the fully-qualified class name - String stripPrefix = ""; + String suffix = "/allclasses-1.8.html"; + _javaAPISet.addAll(_generateJavaAPISet(suffix)); - // the HTML file name that contains all the links - String suffix = ""; - if (linkVersion.equals(JAVADOC_AUTO_TEXT)) { - // use the compiler's version of the Java API Javadoc - JavaVersion ver = _model.getCompilerModel().getActiveCompiler().version(); - if (ver == JavaVersion.JAVA_6) linkVersion = JAVADOC_1_6_TEXT; - else if (ver == JavaVersion.JAVA_7) linkVersion = JAVADOC_1_7_TEXT; - else if (ver == JavaVersion.JAVA_8) linkVersion = JAVADOC_1_8_TEXT; - else linkVersion = JAVADOC_1_8_TEXT; // default - } - if (linkVersion.equals(JAVADOC_1_6_TEXT)) { - // at one point, the links in the 1.6 Javadoc were absolute, and this is how we dealt with that - // base = ""; // links in 1.6 Javadoc are absolute, so nothing needs to be added to get an absolute URL - // // but we do need to strip the absolute part to get correct fully-qualified class names - // // and we take the default string here, not what the user entered, because the links in - // // our allclasses-1.6.html file go to the original Sun website. - // stripPrefix = JAVADOC_1_6_LINK.getDefaultString() + "/"; - base = DrJava.getConfig().getSetting(JAVADOC_1_6_LINK) + "/"; - stripPrefix = ""; // nothing needs to be stripped, links in 1.6 Javadoc are relative - suffix = "/allclasses-1.6.html"; - } - else if (linkVersion.equals(JAVADOC_1_7_TEXT)) { -// base = DrJava.getConfig().getSetting(JAVADOC_1_7_LINK) + "/"; -// stripPrefix = ""; // nothing needs to be stripped, links in 1.7 Javadoc are relative - suffix = "/allclasses-1.7.html"; - } - else if (linkVersion.equals(JAVADOC_1_8_TEXT)) { -// base = DrJava.getConfig().getSetting(JAVADOC_1_8_LINK) + "/"; -// stripPrefix = ""; // nothing needs to be stripped, links in 1.8 Javadoc are relative - suffix = "/allclasses-1.8.html"; - } - if (! suffix.equals("")) { - _javaAPISet.addAll(_generateJavaAPISet(suffix)); - } - else { - // no valid Javadoc URL - } + /* Legacy code supporting Java versions prior to Java 8 */ + // generate list +// String linkVersion = DrJava.getConfig().getSetting(JAVADOC_API_REF_VERSION); +// +//// // the string that will be ADDED to the beginning of the link to form the full URL +//// String base = ""; +//// +//// // the string that will be REMOVED from the beginning of the link to form the fully-qualified class name +//// String stripPrefix = ""; +// +// // the HTML file name that contains all the links +// String suffix = ""; +// if (linkVersion.equals(JAVADOC_AUTO_TEXT)) { +// // use the compiler's version of the Java API Javadoc +// JavaVersion ver = _model.getCompilerModel().getActiveCompiler().version(); +// if (ver == JavaVersion.JAVA_6) linkVersion = JAVADOC_1_6_TEXT; +// else if (ver == JavaVersion.JAVA_7) linkVersion = JAVADOC_1_7_TEXT; +// else if (ver == JavaVersion.JAVA_8) linkVersion = JAVADOC_1_8_TEXT; +// else linkVersion = JAVADOC_1_8_TEXT; // default +// } +// if (linkVersion.equals(JAVADOC_1_6_TEXT)) { +// // at one point, the links in the 1.6 Javadoc were absolute, and this is how we dealt with that +// // base = ""; // links in 1.6 Javadoc are absolute, so nothing needs to be added to get an absolute URL +// // // but we do need to strip the absolute part to get correct fully-qualified class names +// // // and we take the default string here, not what the user entered, because the links in +// // // our allclasses-1.6.html file go to the original Sun website. +// // base = DrJava.getConfig().getSetting(JAVADOC_1_6_LINK) + "/"; +// // stripPrefix = ""; // nothing needs to be stripped, links in 1.6 Javadoc are relative +// suffix = "/allclasses-1.6.html"; +// } +// else if (linkVersion.equals(JAVADOC_1_7_TEXT)) { +//// base = DrJava.getConfig().getSetting(JAVADOC_1_7_LINK) + "/"; +//// stripPrefix = ""; // nothing needs to be stripped, links in 1.7 Javadoc are relative +// suffix = "/allclasses-1.7.html"; +// } +// else if (linkVersion.equals(JAVADOC_1_8_TEXT)) { +//// base = DrJava.getConfig().getSetting(JAVADOC_1_8_LINK) + "/"; +//// stripPrefix = ""; // nothing needs to be stripped, links in 1.8 Javadoc are relative +// suffix = "/allclasses-1.8.html"; +// } +// if (! suffix.equals("")) _javaAPISet.addAll(_generateJavaAPISet(suffix)); +// else { +// // no valid Javadoc URL +// } // add JUnit Set junitAPIList = _generateJavaAPISet("/allclasses-concjunit4.7.html"); @@ -2097,7 +2102,7 @@ public void actionPerformed(ActionEvent ae){ /** Initialize the "Complete Word" dialog. */ private void initCompleteWordDialog() { - if (_completeWordDialog==null) { + if (_completeWordDialog == null) { _completeWordDialog = new AutoCompletePopup(this); } } @@ -2190,7 +2195,7 @@ public void actionPerformed(ActionEvent ae) { private final Action _commentLinesAction = new AbstractAction("Comment Line(s)") { public void actionPerformed(ActionEvent ae) { hourglassOn(); - try{ commentLines(); } + try { commentLines(); } finally{ hourglassOff(); } } }; @@ -2199,7 +2204,7 @@ public void actionPerformed(ActionEvent ae) { private final Action _uncommentLinesAction = new AbstractAction("Uncomment Line(s)") { public void actionPerformed(ActionEvent ae){ hourglassOn(); - try{ uncommentLines(); } + try { uncommentLines(); } finally{ hourglassOff(); } } }; @@ -2329,7 +2334,7 @@ public void saveTo(OutputStream os) throws IOException { }; /** Resets the Interactions pane. */ - private final Action _resetInteractionsAction = new AbstractAction("Reset Interactions") { + private final Action _resetInteractionsAction = new AbstractAction("Reset Interactions and Clear Console") { public void actionPerformed(ActionEvent ae) { if (! DrJava.getConfig().getSetting(INTERACTIONS_RESET_PROMPT).booleanValue()) { _doResetInteractions(); @@ -2354,11 +2359,12 @@ public void actionPerformed(ActionEvent ae) { private void _doResetInteractions() { _tabbedPane.setSelectedIndex(INTERACTIONS_TAB); - updateStatusField("Resetting Interactions"); + updateStatusField("Resetting Interactions and Clearing Console"); // Lots of work, so use another thread _interactionsPane.discardUndoEdits(); new Thread(new Runnable() { public void run() { + _model.resetConsole(); _model.resetInteractions(_model.getWorkingDirectory(), true); _closeSystemInAction.setEnabled(true); } @@ -2766,29 +2772,28 @@ public void toggleBookmark() { public void addToBrowserHistoryBefore() { _model.addToBrowserHistory(true); } /** Create a new find results tab. - * @param rm the region manager that will contain the regions - * @param region a MovingDocumentRegion - * @param title the title for the panel - * @param searchString string that was searched for - * @param searchAll whether all files were searched - * @param searchSelectionOnly whether only the selected file was searched - * @param matchCase whether matches must be case-sensitive - * @param wholeWord whether matches must be against the whole word - * @param noComments whether comments should be ignored - * @param noTestCases whether test cases should be ignored - * @param doc weak reference to document in which search occurred (or started, if all documents were searched) - * @param findReplace the FindReplacePanel that created this FindResultsPanel - * @return new find results tab. - */ + * @param rm the region manager that will contain the regions + * @param region a MovingDocumentRegion + * @param title the title for the panel + * @param searchString string that was searched for + * @param searchAll whether all files were searched + * @param searchSelectionOnly whether only the selected file was searched + * @param matchCase whether matches must be case-sensitive + * @param wholeWord whether matches must be against the whole word + * @param noComments whether comments should be ignored + * @param noTestCases whether test cases should be ignored + * @param doc weak reference to document in which search occurred (or started, if all documents were searched) + * @param findReplacePanel the FindReplacePanel that created this FindResultsPanel + * @return new find results tab. + */ public FindResultsPanel createFindResultsPanel(final RegionManager rm, - MovingDocumentRegion region, String title, String searchString, - boolean searchAll, boolean searchSelectionOnly, boolean matchCase, - boolean wholeWord, boolean noComments, boolean noTestCases, - WeakReference doc, FindReplacePanel findReplace) { - - final FindResultsPanel panel = new FindResultsPanel(this, rm, region, - title, searchString, searchAll, searchSelectionOnly, matchCase, - wholeWord, noComments, noTestCases, doc, findReplace); + final MovingDocumentRegion region, final String title, final String searchString, + final boolean searchAll, final boolean searchSelectionOnly, final boolean matchCase, + final boolean wholeWord, final boolean noComments, final boolean noTestCases, + final WeakReference doc, final FindReplacePanel findReplacePanel) { + + final FindResultsPanel panel = new FindResultsPanel(this, rm, region, title, searchString, searchAll, + searchSelectionOnly, matchCase, wholeWord, noComments, noTestCases, doc, findReplacePanel); final AbstractMap highlights = new IdentityHashMap(); @@ -2796,8 +2801,8 @@ public FindResultsPanel createFindResultsPanel(final RegionManager>(panel, highlights); _findResults.add(pair); - final FindReplacePanel findReplaceRef = findReplace; - final String searchStringRef = searchString; +// final FindReplacePanel findReplacePanel = findReplacePanel; +// final String searchStringRef = searchString; // hook highlighting listener to find results manager rm.addListener(new RegionManagerListener() { @@ -2814,9 +2819,7 @@ public void regionChanged(MovingDocumentRegion r) { regionRemoved(r); /* Only re-add region if it is still a match. */ - if (findReplaceRef.isMatch(r, searchStringRef)) { - regionAdded(r); - } + if (findReplacePanel.isSearchStringMatch(r, searchString)) { regionAdded(r); } } public void regionRemoved(MovingDocumentRegion r) { @@ -3137,7 +3140,6 @@ public void mouseExited(MouseEvent e) { } _djProjectIcon = MainFrame.getIcon("ProjectIcon.gif"); } - /** This manager is meant to retrieve the correct icons for the given filename. The only files recognized * are the files obviously listed below in the function (.java, .dj0, .dj1, .dj2, .dj). The icons that represent * each filetype are given into the managers constructor upon instantiation. This class is static since @@ -3192,8 +3194,6 @@ public Icon getIcon(File f) { */ private static class OddDisplayManager implements DisplayManager { private final Icon _star; -// private Icon _juPass; -// private Icon _juFail; private final FileDisplayManager _default; /** Standard constructor. @@ -3204,8 +3204,6 @@ private static class OddDisplayManager implements DisplayManager(); // reset auto-import list +// _autoImportClassSet = new HashSet(); // reset auto-import list if (_checkProjectClose()) { @@ -5788,14 +5792,14 @@ private boolean showCleanWarning() { /** List with entries for the complete dialog. */ HashSet _completeClassSet = new HashSet(); - /** List with entries for the auto-import dialog. */ - HashSet _autoImportClassSet = new HashSet(); +// /** List with entries for the auto-import dialog. */ +// HashSet _autoImportClassSet = new HashSet(); /** Scan the build directory for class files and update the auto-completion list. */ private void _scanClassFiles() { String trace = Arrays.toString(Thread.currentThread().getStackTrace()); - Utilities.show("#### _scanClassFiles() called with trace:\n" + trace); + _log.log("#### _scanClassFiles() called with trace:\n" + trace); Thread t = new Thread(new Runnable() { public void run() { File buildDir = _model.getBuildDirectory(); @@ -5843,7 +5847,7 @@ public void run() { } clearCompleteClassSet(); _completeClassSet.addAll(hs); - _autoImportClassSet = new HashSet(hs2); +// _autoImportClassSet = new HashSet(hs2); } }); t.setPriority(Thread.MIN_PRIORITY); @@ -6005,7 +6009,7 @@ void debuggerResume() throws DebugException { void debuggerAutomaticTrace() { _log.log("debuggerAutomaticTrace(): isDebuggerReady() = "+isDebuggerReady()); if (isDebuggerReady()) { - if(!_model.getDebugger().isAutomaticTraceEnabled()) { + if (!_model.getDebugger().isAutomaticTraceEnabled()) { enableAutomaticTrace(); } else { @@ -6640,11 +6644,11 @@ public void removeMenuBarInOtherFrame(JMenuBar menuBar) { _recentProjectManager.removeMirroredMenu(projectMenu); } - /** Sets up the components of the menu bar and links them to the private - * fields within MainFrame. This method serves to make the code more - * legible on the higher calling level, i.e., the constructor. - * @param menuBar menu bar to set up - */ + /** Sets up the components of the menu bar and links them to the private fields within MainFrame. This method serves + * to make the code more legible on the higher calling level, i.e., the constructor. It is package private because + * it is called in DetachedFrame.java. + * @param menuBar menu bar to set up + */ void _setUpMenuBar(JMenuBar menuBar) { int mask = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); _setUpMenuBar(menuBar, @@ -6655,6 +6659,7 @@ void _setUpMenuBar(JMenuBar menuBar) { void _setUpMenuBar(JMenuBar menuBar, JMenu fileMenu, JMenu editMenu, JMenu toolsMenu, JMenu projectMenu, JMenu debugMenu, JMenu languageLevelMenu, JMenu helpMenu) { + _updateMenuBars(); menuBar.add(fileMenu); menuBar.add(editMenu); menuBar.add(toolsMenu); @@ -6676,8 +6681,9 @@ void _setUpMenuBar(JMenuBar menuBar, JMenu fileMenu, JMenu editMenu, JMenu tools * @return the added menu item */ private JMenuItem _addMenuItem(JMenu menu, Action a, VectorOption opt, boolean updateKeyboardManager) { - JMenuItem item; - item = menu.add(a); + final Font menuFont = DrJava.getConfig().getSetting(FONT_MENUBAR); + JMenuItem item = menu.add(a); + item.setFont(menuFont); _setMenuShortcut(item, a, opt, updateKeyboardManager); return item; } @@ -6693,8 +6699,9 @@ private JMenuItem _addMenuItem(JMenu menu, Action a, VectorOption opt */ private JMenuItem _addMenuItem(JMenu menu, Action a, VectorOption opt, int index, boolean updateKeyboardManager) { - JMenuItem item; - item = menu.insert(a, index); + final Font menuFont = DrJava.getConfig().getSetting(FONT_MENUBAR); + JMenuItem item = menu.insert(a, index); + item.setFont(menuFont); _setMenuShortcut(item, a, opt, updateKeyboardManager); return item; } @@ -6718,6 +6725,14 @@ private void _setMenuShortcut(JMenuItem item, Action a, VectorOption } } + /** Creates a menu with specified name and appropriate font. */ + private JMenu _newJMenu(String name) { + final Font menuFont = DrJava.getConfig().getSetting(FONT_MENUBAR); + JMenu m = new JMenu(name); + m.setFont(menuFont); + return m; + } + /** Creates and returns a file menu. Side effects: sets values for _saveMenuItem. * @param mask the keystroke modifier to be used * @param updateKeyboardManager true if the keyboard manager should be @@ -6725,7 +6740,7 @@ private void _setMenuShortcut(JMenuItem item, Action a, VectorOption * @return the newly-setup file menu */ private JMenu _setUpFileMenu(int mask, boolean updateKeyboardManager) { - JMenu fileMenu = new JMenu("File"); + JMenu fileMenu = _newJMenu("File"); PlatformFactory.ONLY.setMnemonic(fileMenu,KeyEvent.VK_F); // New, open _addMenuItem(fileMenu, _newAction, KEY_NEW_FILE, updateKeyboardManager); @@ -6773,7 +6788,7 @@ private JMenu _setUpFileMenu(int mask, boolean updateKeyboardManager) { * @return the newly-setup edit menu */ private JMenu _setUpEditMenu(int mask, boolean updateKeyboardManager) { - JMenu editMenu = new JMenu("Edit"); + JMenu editMenu = _newJMenu("Edit"); PlatformFactory.ONLY.setMnemonic(editMenu,KeyEvent.VK_E); // Undo, redo final JMenuItem undoItem = _addMenuItem(editMenu, _undoAction, KEY_UNDO, updateKeyboardManager); @@ -6828,7 +6843,7 @@ public void propertyChange(PropertyChangeEvent evt) { editMenu.addSeparator(); // Go to - final JMenu goToMenu = new JMenu("Go To"); + final JMenu goToMenu = _newJMenu("Go To"); _addMenuItem(goToMenu, _gotoLineAction, KEY_GOTO_LINE, updateKeyboardManager); _addMenuItem(goToMenu, _gotoFileAction, KEY_GOTO_FILE, updateKeyboardManager); _addMenuItem(goToMenu, _gotoFileUnderCursorAction, KEY_GOTO_FILE_UNDER_CURSOR, updateKeyboardManager); @@ -6837,7 +6852,7 @@ public void propertyChange(PropertyChangeEvent evt) { editMenu.add(goToMenu); // Panes - final JMenu panesMenu = new JMenu("Tabbed Panes"); + final JMenu panesMenu = _newJMenu("Tabbed Panes"); _addMenuItem(panesMenu, _switchToPreviousPaneAction, KEY_PREVIOUS_PANE, updateKeyboardManager); _addMenuItem(panesMenu, _switchToNextPaneAction, KEY_NEXT_PANE, updateKeyboardManager); panesMenu.addSeparator(); @@ -6850,7 +6865,7 @@ public void propertyChange(PropertyChangeEvent evt) { _setMenuShortcut(tempDetachTabbedPanesMenuItem, _detachTabbedPanesAction, KEY_DETACH_TABBEDPANES, updateKeyboardManager); panesMenu.add(tempDetachTabbedPanesMenuItem); - if (_detachTabbedPanesMenuItem==null) { + if (_detachTabbedPanesMenuItem == null) { // assign the first time _detachTabbedPanesMenuItem = tempDetachTabbedPanesMenuItem; } @@ -6860,7 +6875,7 @@ public void propertyChange(PropertyChangeEvent evt) { _detachTabbedPanesMenuItem.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { JMenuItem temp = weakRef.get(); - if (temp!=null) { + if (temp != null) { temp.setSelected(_detachTabbedPanesMenuItem.isSelected()); } else { @@ -6881,6 +6896,52 @@ public void itemStateChanged(ItemEvent e) { return editMenu; } + /** Update the MainFrame and _tabbedPanes menu bars, following any change to FONT_MENUBAR (name, style, text) */ + private void _updateMenuBars() { + Font menuFont = DrJava.getConfig().getSetting(FONT_MENUBAR); + // _menuBar.setFont(menuFont); // does not work! Why? + _updateMenus(_menuBar.getComponents()); + + // Update ButtonGroup in LanguageLevels menu (which has RadioButton entries) + // Oracle has not extended Enumeration to support the Iterable trait; ugh + // So we convert it an ArrayList + + if (_languageLevelButtonGroup != null) { // _updateMenuBars is called during initialization + for (AbstractButton button: Collections.list(_languageLevelButtonGroup.getElements())) { + button.setFont(menuFont); + } + } + + _tabbedPane.setFont(menuFont); // sets the font for tab titles + + // set font within FindResultsPanels in _tabbedPane + Font tabbedFont = menuFont; + int count = _tabbedPane.getTabCount(); + for (int i = 0; i < count; i++) { + Component comp = _tabbedPane.getComponentAt(i); + if (comp instanceof FindResultsPanel) comp.setFont(tabbedFont); + } + } + + /** Update the fonts in the specified menus. */ + private static void _updateMenus(Component[] menus) { + final Font menuFont = DrJava.getConfig().getSetting(FONT_MENUBAR); + for (int i = 0; i < menus.length; i++) { + if (menus[i] instanceof JMenu) { + JMenu m = (JMenu) menus[i]; + m.setFont(menuFont); + Component[] menuItems = m.getComponents(); + for (int j = 0; j < menuItems.length; j++) { + if (menuItems[j] instanceof JMenuItem) { + Component mj = (JMenuItem) menuItems[j]; + mj.setFont(menuFont); + } + } + } + } + } + + /** Creates and returns a tools menu. * @param mask the keystroke modifier to be used * @param updateKeyboardManager true if the keyboard manager should be @@ -6888,7 +6949,7 @@ public void itemStateChanged(ItemEvent e) { * @return newly-created tools menu */ private JMenu _setUpToolsMenu(int mask, boolean updateKeyboardManager) { - final JMenu toolsMenu = new JMenu("Tools"); + final JMenu toolsMenu = _newJMenu("Tools"); PlatformFactory.ONLY.setMnemonic(toolsMenu,KeyEvent.VK_T); // Compile, Test, Javadoc @@ -6905,12 +6966,12 @@ private JMenu _setUpToolsMenu(int mask, boolean updateKeyboardManager) { _addMenuItem(toolsMenu, _resetInteractionsAction, KEY_RESET_INTERACTIONS, updateKeyboardManager); toolsMenu.addSeparator(); - // Code Coverage - _addMenuItem(toolsMenu, _coverageAction, KEY_CODE_COVERAGE, updateKeyboardManager); - toolsMenu.addSeparator(); + // Code Coverage + _addMenuItem(toolsMenu, _coverageAction, KEY_CODE_COVERAGE, updateKeyboardManager); + toolsMenu.addSeparator(); // Javadoc - final JMenu javadocMenu = new JMenu("Javadoc"); + final JMenu javadocMenu = _newJMenu("Javadoc"); _addMenuItem(javadocMenu, _javadocAllAction, KEY_JAVADOC_ALL, updateKeyboardManager); _addMenuItem(javadocMenu, _javadocCurrentAction, KEY_JAVADOC_CURRENT, updateKeyboardManager); javadocMenu.addSeparator(); @@ -6918,7 +6979,7 @@ private JMenu _setUpToolsMenu(int mask, boolean updateKeyboardManager) { _addMenuItem(javadocMenu, _openJavadocUnderCursorAction, KEY_OPEN_JAVADOC_UNDER_CURSOR, updateKeyboardManager); toolsMenu.add(javadocMenu); - final JMenu historyMenu = new JMenu("History"); + final JMenu historyMenu = _newJMenu("History"); _addMenuItem(historyMenu, _executeHistoryAction, KEY_EXECUTE_HISTORY, updateKeyboardManager); _addMenuItem(historyMenu, _loadHistoryScriptAction, KEY_LOAD_HISTORY_SCRIPT, updateKeyboardManager); _addMenuItem(historyMenu, _saveHistoryAction, KEY_SAVE_HISTORY, updateKeyboardManager); @@ -6926,7 +6987,7 @@ private JMenu _setUpToolsMenu(int mask, boolean updateKeyboardManager) { toolsMenu.add(historyMenu); // Interactions, console - final JMenu interMenu = new JMenu("Interactions & Console"); + final JMenu interMenu = _newJMenu("Interactions & Console"); _addMenuItem(interMenu, _saveInteractionsCopyAction, KEY_SAVE_INTERACTIONS_COPY, updateKeyboardManager); _addMenuItem(interMenu, _viewInteractionsClassPathAction, KEY_VIEW_INTERACTIONS_CLASSPATH, updateKeyboardManager); _addMenuItem(interMenu, _copyInteractionToDefinitionsAction, KEY_LIFT_CURRENT_INTERACTION, updateKeyboardManager); @@ -6941,7 +7002,7 @@ private JMenu _setUpToolsMenu(int mask, boolean updateKeyboardManager) { } toolsMenu.add(interMenu); - final JMenu extMenu = new JMenu("External Processes"); + final JMenu extMenu = _newJMenu("External Processes"); _addMenuItem(extMenu, _executeExternalProcessAction, KEY_EXEC_PROCESS, updateKeyboardManager); final JMenuItem execItem = extMenu.getItem(0); extMenu.addSeparator(); @@ -6952,17 +7013,17 @@ private JMenu _setUpToolsMenu(int mask, boolean updateKeyboardManager) { final int namesCount = DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_NAMES).size(); final int cmdlinesCount = DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_CMDLINES).size(); final int workdirsCount = DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_WORKDIRS).size(); - final int enclosingFileCount = - DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_ENCLOSING_DJAPP_FILES).size(); +// final int enclosingFileCount = +// DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_ENCLOSING_DJAPP_FILES).size(); if ((savedCount!=namesCount) || (savedCount!=cmdlinesCount) || - (savedCount!=workdirsCount) || - (savedCount!=enclosingFileCount)) { + (savedCount!=workdirsCount) /* || + (savedCount!=enclosingFileCount)*/) { DrJava.getConfig().setSetting(OptionConstants.EXTERNAL_SAVED_COUNT, 0); DrJava.getConfig().setSetting(OptionConstants.EXTERNAL_SAVED_NAMES, new Vector()); DrJava.getConfig().setSetting(OptionConstants.EXTERNAL_SAVED_CMDLINES, new Vector()); DrJava.getConfig().setSetting(OptionConstants.EXTERNAL_SAVED_WORKDIRS, new Vector()); - DrJava.getConfig().setSetting(OptionConstants.EXTERNAL_SAVED_ENCLOSING_DJAPP_FILES, new Vector()); +// DrJava.getConfig().setSetting(OptionConstants.EXTERNAL_SAVED_ENCLOSING_DJAPP_FILES, new Vector()); } OptionListener externalSavedCountListener = @@ -6976,22 +7037,22 @@ public void optionChanged(final OptionEvent oce) { final Vector names = DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_NAMES); final Vector cmdlines = DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_CMDLINES); final Vector workdirs = DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_WORKDIRS); - final Vector enclosingfiles = - DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_ENCLOSING_DJAPP_FILES); +// final Vector enclosingfiles = +// DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_ENCLOSING_DJAPP_FILES); - extMenu.insert(new AbstractAction(names.get(i)) { - public void actionPerformed(ActionEvent ae) { - try { - PropertyMaps pm = PropertyMaps.TEMPLATE.clone(); - String s = enclosingfiles.get(i).trim(); - ((MutableFileProperty) pm.getProperty("enclosing.djapp.file")). - setFile(s.length() > 0 ? new File(s) : null); - _executeExternalDialog. - runCommand(names.get(i),cmdlines.get(i),workdirs.get(i),enclosingfiles.get(i),pm); - } - catch(CloneNotSupportedException e) { throw new UnexpectedException(e); } - } - },i+2); +// extMenu.insert(new AbstractAction(names.get(i)) { +// public void actionPerformed(ActionEvent ae) { +// try { +// PropertyMaps pm = PropertyMaps.TEMPLATE.clone(); +// String s = enclosingfiles.get(i).trim(); +// ((MutableFileProperty) pm.getProperty("enclosing.djapp.file")). +// setFile(s.length() > 0 ? new File(s) : null); +// _executeExternalDialog. +// runCommand(names.get(i),cmdlines.get(i),workdirs.get(i),enclosingfiles.get(i),pm); +// } +// catch(CloneNotSupportedException e) { throw new UnexpectedException(e); } +// } +// },i+2); } if (oce.value > 0) { extMenu.addSeparator(); } extMenu.add(_editExternalProcessesAction); @@ -7002,7 +7063,7 @@ public void actionPerformed(ActionEvent ae) { externalSavedCountListener. optionChanged(new OptionEvent(OptionConstants.EXTERNAL_SAVED_COUNT, DrJava.getConfig().getSetting(OptionConstants.EXTERNAL_SAVED_COUNT))); - final JMenu advancedMenu = new JMenu("Advanced"); + final JMenu advancedMenu = _newJMenu("Advanced"); _addMenuItem(advancedMenu, _generateCustomDrJavaJarAction, KEY_GENERATE_CUSTOM_DRJAVA, updateKeyboardManager); _addMenuItem(advancedMenu, _newDrJavaInstanceAction, KEY_NEW_DRJAVA_INSTANCE, updateKeyboardManager); toolsMenu.add(advancedMenu); @@ -7048,7 +7109,7 @@ public void optionChanged(final OptionEvent oce) { * @return newly-created project menu */ private JMenu _setUpProjectMenu(int mask, boolean updateKeyboardManager) { - JMenu projectMenu = new JMenu("Project"); + JMenu projectMenu = _newJMenu("Project"); PlatformFactory.ONLY.setMnemonic(projectMenu,KeyEvent.VK_P); // New, open _addMenuItem(projectMenu, _newProjectAction, KEY_NEW_PROJECT, updateKeyboardManager); @@ -7085,14 +7146,14 @@ private JMenu _setUpProjectMenu(int mask, boolean updateKeyboardManager) { * @return newly-created debug menu */ private JMenu _setUpDebugMenu(int mask, boolean updateKeyboardManager) { - JMenu debugMenu = new JMenu("Debugger"); + JMenu debugMenu = _newJMenu("Debugger"); PlatformFactory.ONLY.setMnemonic(debugMenu,KeyEvent.VK_D); // Enable debugging item JMenuItem tempDebuggerEnabledMenuItem = MainFrameStatics.newCheckBoxMenuItem(_toggleDebuggerAction); tempDebuggerEnabledMenuItem.setSelected(false); _setMenuShortcut(tempDebuggerEnabledMenuItem, _toggleDebuggerAction, KEY_DEBUG_MODE_TOGGLE, updateKeyboardManager); debugMenu.add(tempDebuggerEnabledMenuItem); - if (_debuggerEnabledMenuItem==null) { + if (_debuggerEnabledMenuItem == null) { // assign the first time _debuggerEnabledMenuItem = tempDebuggerEnabledMenuItem; } @@ -7102,7 +7163,7 @@ private JMenu _setUpDebugMenu(int mask, boolean updateKeyboardManager) { _debuggerEnabledMenuItem.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { JMenuItem temp = weakRef.get(); - if (temp!=null) { + if (temp != null) { temp.setSelected(_debuggerEnabledMenuItem.isSelected()); } else { @@ -7132,7 +7193,7 @@ public void itemStateChanged(ItemEvent e) { _setMenuShortcut(tempAutomaticTraceMenuItem, _automaticTraceDebugAction, KEY_DEBUG_AUTOMATIC_TRACE, updateKeyboardManager); debugMenu.add(tempAutomaticTraceMenuItem); - if (_automaticTraceMenuItem==null) { + if (_automaticTraceMenuItem == null) { // assign the first time _automaticTraceMenuItem = tempAutomaticTraceMenuItem; } @@ -7142,7 +7203,7 @@ public void itemStateChanged(ItemEvent e) { _automaticTraceMenuItem.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { JMenuItem temp = weakRef.get(); - if (temp!=null) { + if (temp != null) { temp.setSelected(_automaticTraceMenuItem.isSelected()); } else { @@ -7158,7 +7219,7 @@ public void itemStateChanged(ItemEvent e) { tempDetachDebugFrameMenuItem.setSelected(DrJava.getConfig().getSetting(DETACH_DEBUGGER)); _setMenuShortcut(tempDetachDebugFrameMenuItem, _detachDebugFrameAction, KEY_DETACH_DEBUGGER, updateKeyboardManager); debugMenu.add(tempDetachDebugFrameMenuItem); - if (_detachDebugFrameMenuItem==null) { + if (_detachDebugFrameMenuItem == null) { // assign the first time _detachDebugFrameMenuItem = tempDetachDebugFrameMenuItem; } @@ -7168,7 +7229,7 @@ public void itemStateChanged(ItemEvent e) { _detachDebugFrameMenuItem.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { JMenuItem temp = weakRef.get(); - if (temp!=null) { + if (temp != null) { temp.setSelected(_detachDebugFrameMenuItem.isSelected()); } else { @@ -7207,15 +7268,16 @@ private void _setThreadDependentDebugMenuItems(boolean isSuspended) { } /** Creates and returns the language levels menu. - * @param mask the keystroke modifier to be used - * @param updateKeyboardManager true if the keyboard manager should be - * updated; pass true only for MainFrame! - * @return the newly-created language levels menu - */ + * @param mask the keystroke modifier to be used + * @param updateKeyboardManager true if the keyboard manager should be + * updated; pass true only for MainFrame! + * @return the newly-created language levels menu + */ private JMenu _setUpLanguageLevelMenu(int mask, boolean updateKeyboardManager) { - JMenu languageLevelMenu = new JMenu("Language Level"); + JMenu languageLevelMenu = _newJMenu("Language Level"); PlatformFactory.ONLY.setMnemonic(languageLevelMenu,KeyEvent.VK_L); ButtonGroup group = new ButtonGroup(); + _languageLevelButtonGroup = group; final Configuration config = DrJava.getConfig(); int currentLanguageLevel = config.getSetting(LANGUAGE_LEVEL); @@ -7275,7 +7337,7 @@ public void optionChanged(OptionEvent oce) { * @return the newly-created help menu */ private JMenu _setUpHelpMenu(int mask, boolean updateKeyboardManager) { - JMenu helpMenu = new JMenu("Help"); + JMenu helpMenu = _newJMenu("Help"); PlatformFactory.ONLY.setMnemonic(helpMenu,KeyEvent.VK_H); _addMenuItem(helpMenu, _helpAction, KEY_HELP, updateKeyboardManager); _addMenuItem(helpMenu, _quickStartAction, KEY_QUICKSTART, updateKeyboardManager); @@ -7291,9 +7353,9 @@ private JMenu _setUpHelpMenu(int mask, boolean updateKeyboardManager) { } /** Creates a toolbar button for undo and redo, which behave differently. - * @param a an Action - * @return the newly-created button - */ + * @param a an Action + * @return the newly-created button + */ JButton _createManualToolBarButton(Action a) { final JButton ret; Font buttonFont = DrJava.getConfig().getSetting(FONT_TOOLBAR); @@ -7327,11 +7389,11 @@ public void propertyChange(PropertyChangeEvent evt) { } /** Sets up all buttons for the toolbar except for undo and redo, which use - * _createManualToolBarButton. - * @param a Action of button to be added - * @return the newly-created toolbar button - */ - public JButton _createToolBarButton(Action a) { + * _createManualToolBarButton. + * @param a Action of button to be added + * @return the newly-created toolbar button + */ + private JButton _createToolBarButton(Action a) { boolean useText = DrJava.getConfig().getSetting(TOOLBAR_TEXT_ENABLED).booleanValue(); boolean useIcons = DrJava.getConfig().getSetting(TOOLBAR_ICONS_ENABLED).booleanValue(); Font buttonFont = DrJava.getConfig().getSetting(FONT_TOOLBAR); @@ -7345,11 +7407,11 @@ public JButton _createToolBarButton(Action a) { } /** Removes the button b from the toolbar and creates new button in its place. - * Only runs in the event thread. - * @param b button to be removed - * @param a Action of button to be added - * @return newly-created button - */ + * Only runs in the event thread. + * @param b button to be removed + * @param a Action of button to be added + * @return newly-created button + */ public JButton _updateToolBarButton(JButton b, Action a) { final JButton result = _createToolBarButton(a); @@ -7449,7 +7511,7 @@ public void optionChanged(final OptionEvent oce) { _fixToolBarHeights(); // Plastic-specific style hints - if(Utilities.isPlasticLaf()) { + if (Utilities.isPlasticLaf()) { _toolBar.putClientProperty("JToolBar.isRollover", Boolean.FALSE); _toolBar.putClientProperty(com.jgoodies.looks.Options.HEADER_STYLE_KEY, com.jgoodies.looks.HeaderStyle.BOTH); @@ -7465,7 +7527,7 @@ private void _updateToolBarVisible() { } /** Update the toolbar's buttons, following any change to TOOLBAR_ICONS_ENABLED, TOOLBAR_TEXT_ENABLED, or - * FONT_TOOLBAR (name, style, text) + * _newJMenu (name, style, text) */ private void _updateToolBarButtons() { _updateToolBarVisible(); @@ -7482,20 +7544,6 @@ private void _updateToolBarButtons() { JButton b = (JButton) buttons[i]; Action a = b.getAction(); - // Work-around for strange configuration of undo/redo buttons - /* - if (a == null) { - ActionListener[] al = b.getActionListeners(); // 1.4 only - - for (int j=0; j void executeAsyncTask(AsyncTask task, P param, boolean showPro new DJAsyncTaskLauncher().executeTask(task, param, showProgress, lockUI); } public void handleAlreadyOpenDocument(OpenDefinitionsDocument doc) { -// boolean docChanged = !doc.equals(_model.getActiveDocument()); -// if (docChanged) { addToBrowserHistory(); } // Always switch to doc _model.setActiveDocument(doc); -// // defer executing this code until after active document switch (if any) is complete -// EventQueue.invokeLater(new Runnable() { public void run() { addToBrowserHistory(); } }); - // Prompt to revert if modified if (doc.isModifiedSinceSave()) { String title = "Revert to Saved?"; @@ -9390,42 +9434,9 @@ public void interactionEnded() { final InteractionsModel im = _model.getInteractionsModel(); final String lastError = im.getLastError(); final FileConfiguration config = DrJava.getConfig(); - /* check for auto-import */ - if (config != null && config.getSetting(OptionConstants.DIALOG_AUTOIMPORT_ENABLED)) { - if (lastError != null) { - // the interaction ended and there was an error - // check that this error is different than the last one (second to last may be null): - final String secondToLastError = im.getSecondToLastError(); - if (secondToLastError != null || ! lastError.equals(secondToLastError)) { - // the preceding test aborts auto-importing if the same class comes up twice in a row - if (lastError.startsWith("Static Error: Undefined class '") && lastError.endsWith("'")) { - // it was an "undefined class" exception - // show auto-import dialog - String undefinedClassName = lastError.substring(lastError.indexOf('\'') + 1, lastError.lastIndexOf('\'')); -// _log.log("**** Showing Import Dialog for " + undefinedClassName); - _showAutoImportDialog(undefinedClassName); - } - else if (lastError.startsWith("Static Error: Undefined name '") && lastError.endsWith("'")) { - // it was an "undefined name" exception - String undefinedName = lastError.substring(lastError.indexOf('\'') + 1, lastError.lastIndexOf('\'')); - - if ((undefinedName.length() > 0) && - (Character.isUpperCase(undefinedName.charAt(0))) && - (undefinedName.indexOf('.') >= 0)) { - // the undefined name starts with a capital letter and contains a dot - // show auto-import dialog - String undefinedClassName = undefinedName.substring(0, undefinedName.indexOf('.')); -// _log.log("***** Showing Import Dialog for " + undefinedClassName); - _showAutoImportDialog(undefinedClassName); - } - } - else if (lastError.startsWith("java.lang.OutOfMemoryError")) { - askToIncreaseSlaveMaxHeap(); - } - } - } - } - else im.resetLastErrors(); // reset the last errors, so the dialog works again if it is re-enabled + + + im.resetLastErrors(); // reset the last errors, so the dialog works again if it is re-enabled _enableInteractionsPane(); _guiAvailabilityNotifier.available(GUIAvailabilityListener.ComponentType.INTERACTIONS); _interactionsPane.discardUndoEdits(); @@ -9537,7 +9548,7 @@ public void junitSuiteStarted(final int numTests) { public void junitTestStarted(final String name) { assert EventQueue.isDispatchThread(); - _junitPanel.getErrorListPane().testStarted(name); /* this does nothing! */ + _junitPanel.getErrorListPane().testStarted(name); /* passes test name to errorListPane */ } public void junitTestEnded(final String name, final boolean succeeded, final boolean causedError) { @@ -9558,7 +9569,7 @@ public void junitEnded() { public void run() { _junitPanel.reset(); if (_model.getJUnitModel().getCoverage()) { - _coverageFrame.displayReport(_model.getJUnitModel().getLastResult()); + _coverageFrame.displayReport(_model.getJUnitModel().getFinalResult()); } } }); @@ -9879,8 +9890,7 @@ public void classFileError(ClassFileError e) { assert EventQueue.isDispatchThread(); final String message = - "The class file for class " + e.getClassName() + " in source file " + e.getCanonicalPath() + - " cannot be loaded.\n " + "The class file for class " + e.getClassName() + " in source file " + e.getCanonicalPath() + " cannot be loaded.\n " + "When DrJava tries to load it, the following error is generated:\n" + e.getError(); JOptionPane.showMessageDialog(MainFrame.this, message, @@ -10054,8 +10064,6 @@ public void documentNotFound(OpenDefinitionsDocument d, File f) { // Interpret cancelled as "NO" } } -// The following line was commented out because it breaks when a user want to close but not save a deleted file -// else throw new DocumentClosedException(d,"Document in " + f + "closed unexpectedly"); // misnamed exception } public void browserChanged() { _configureBrowsing(); } @@ -10318,11 +10326,19 @@ public void optionChanged(OptionEvent oce) { } } - /** The OptionListener for FONT_TOOLBAR */ + /** The OptionListener for _newJMenu */ private class ToolBarFontOptionListener implements OptionListener { - public void optionChanged(OptionEvent oce) { _updateToolBarButtons(); } + public void optionChanged(OptionEvent oce) { + _updateToolBarButtons(); + } } + /** The OptionListener for FONT_MENUBAR */ + private class MenuBarFontOptionListener implements OptionListener { + public void optionChanged(OptionEvent oce) { + _updateMenuBars(); + } + } /** The OptionListener for DEFINITIONS_NORMAL_COLOR */ private class NormalColorOptionListener implements OptionListener { public void optionChanged(OptionEvent oce) { _updateNormalColor(); } @@ -10424,9 +10440,9 @@ public void drop(DropTargetDropEvent dropTargetDropEvent) { if (file.isFile() && (DrJavaFileUtils.isSourceFile(file) || file.getName().endsWith(".txt"))) { filteredFileList.add(file); } - else if (file.isFile() && file.getName().endsWith(OptionConstants.EXTPROCESS_FILE_EXTENSION)) { - openExtProcessFile(file); - } +// else if (file.isFile() && file.getName().endsWith(OptionConstants.EXTPROCESS_FILE_EXTENSION)) { +// openExtProcessFile(file); +// } } final File[] fileArray = filteredFileList.toArray(new File[filteredFileList.size()]); FileOpenSelector fs = new FileOpenSelector() { @@ -10449,48 +10465,48 @@ else if (file.isFile() && file.getName().endsWith(OptionConstants.EXTPROCESS_FIL } } - /** Open stand-alone external process file. - * @param file the file to be opened - */ - public static void openExtProcessFile(File file) { - try { - XMLConfig xc = new XMLConfig(file); - String name = xc.get("drjava/extprocess/name"); - ExecuteExternalDialog.addToMenu(name, xc.get("drjava/extprocess/cmdline"), - xc.get("drjava/extprocess/workdir"), ""); - JOptionPane.showMessageDialog(null, "The installation was successful for:\n"+name, - "Installation Successful", JOptionPane.INFORMATION_MESSAGE); - // We override the drjava/extprocess/enclosingfile and set it to the empty string "" - // because this external process did not come from a *.djapp file that was a JAR file. - } - catch(XMLConfigException xce) { - // this wasn't an XML file, try to treat it as a jar file - openExtProcessJarFile(file); - } - } +// /** Open stand-alone external process file. +// * @param file the file to be opened +// */ +// public static void openExtProcessFile(File file) { +// try { +// XMLConfig xc = new XMLConfig(file); +// String name = xc.get("drjava/extprocess/name"); +// ExecuteExternalDialog.addToMenu(name, xc.get("drjava/extprocess/cmdline"), +// xc.get("drjava/extprocess/workdir"), ""); +// JOptionPane.showMessageDialog(null, "The installation was successful for:\n"+name, +// "Installation Successful", JOptionPane.INFORMATION_MESSAGE); +// // We override the drjava/extprocess/enclosingfile and set it to the empty string "" +// // because this external process did not come from a *.djapp file that was a JAR file. +// } +// catch(XMLConfigException xce) { +// // this wasn't an XML file, try to treat it as a jar file +// openExtProcessJarFile(file); +// } +// } - /** Open external process file in a jar file. - * @param file the file to be opened - */ - public static void openExtProcessJarFile(File file) { - try { - JarFile jf = new JarFile(file); - JarEntry je = jf.getJarEntry(EXTPROCESS_FILE_NAME_INSIDE_JAR); - InputStream is = jf.getInputStream(je); - XMLConfig xc = new XMLConfig(is); - String name = xc.get("drjava/extprocess/name"); - ExecuteExternalDialog.addToMenu(name, xc.get("drjava/extprocess/cmdline"), - xc.get("drjava/extprocess/workdir"), file.getAbsolutePath()); - JOptionPane.showMessageDialog(null, "The installation was successful for:\n"+name, - "Installation Successful", JOptionPane.INFORMATION_MESSAGE); - // We override the drjava/extprocess/enclosingfile and set it to the file specified - // because this external process came from a *.djapp file that was a JAR file. - is.close(); - jf.close(); - } - catch(IOException ioe) { /* ignore drop */ } - catch(XMLConfigException xce) { /* ignore drop */ } - } +// /** Open external process file in a jar file. +// * @param file the file to be opened +// */ +// public static void openExtProcessJarFile(File file) { +// try { +// JarFile jf = new JarFile(file); +// JarEntry je = jf.getJarEntry(EXTPROCESS_FILE_NAME_INSIDE_JAR); +// InputStream is = jf.getInputStream(je); +// XMLConfig xc = new XMLConfig(is); +// String name = xc.get("drjava/extprocess/name"); +// ExecuteExternalDialog.addToMenu(name, xc.get("drjava/extprocess/cmdline"), +// xc.get("drjava/extprocess/workdir"), file.getAbsolutePath()); +// JOptionPane.showMessageDialog(null, "The installation was successful for:\n"+name, +// "Installation Successful", JOptionPane.INFORMATION_MESSAGE); +// // We override the drjava/extprocess/enclosingfile and set it to the file specified +// // because this external process came from a *.djapp file that was a JAR file. +// is.close(); +// jf.close(); +// } +// catch(IOException ioe) { /* ignore drop */ } +// catch(XMLConfigException xce) { /* ignore drop */ } +// } /** Convert a string with URIs to a list of files. * @param data string with URIs @@ -10518,10 +10534,10 @@ private static List textURIListToFileList(String data) { * @param lineNo line number to jump to, or -1 of not specified */ public void handleRemoteOpenFile(final File f, final int lineNo) { - if (f.getName().endsWith(OptionConstants.EXTPROCESS_FILE_EXTENSION)) { - openExtProcessFile(f); - } - else { +// if (f.getName().endsWith(OptionConstants.EXTPROCESS_FILE_EXTENSION)) { +// openExtProcessFile(f); +// } +// else { final FileOpenSelector openSelector = new FileOpenSelector() { public File[] getFiles() throws OperationCanceledException { return new File[] { f }; @@ -10548,175 +10564,7 @@ public void run() { } }); } - } - } - - /** Reset the position of the "Open Javadoc" dialog. */ - public void resetAutoImportDialogPosition() { - _initAutoImportDialog(); - _autoImportDialog.setFrameState("default"); - if (DrJava.getConfig().getSetting(DIALOG_AUTOIMPORT_STORE_POSITION).booleanValue()) { - DrJava.getConfig().setSetting(DIALOG_AUTOIMPORT_STATE, "default"); - } - } - - /** Initialize dialog if necessary. */ - private void _initAutoImportDialog() { - if (_autoImportDialog == null) { - _autoImportPackageCheckbox = new JCheckBox("Import Package"); - _autoImportPackageCheckbox.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { _autoImportDialog.resetFocus(); } - }); - PlatformFactory.ONLY.setMnemonic(_autoImportPackageCheckbox,'p'); - PredictiveInputFrame.InfoSupplier info = - new PredictiveInputFrame.InfoSupplier() { - public String value(JavaAPIListEntry entry) { // show full class name as information - return entry.getFullString(); - } - }; - PredictiveInputFrame.CloseAction okAction = - new PredictiveInputFrame.CloseAction() { - public String getName() { return "OK"; } - public KeyStroke getKeyStroke() { return KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0); } - public String getToolTipText() { return null; } - public Object value(PredictiveInputFrame p) { - String text; - if (p.getItem() != null) { // if a class was selected... - text = p.getItem().getFullString(); - } - else { // use the text that was entered - text = p.getText(); - } - if (_autoImportPackageCheckbox.isSelected()) { - int lastDot = text.lastIndexOf('.'); - if (lastDot > 0) text = text.substring(0, lastDot + 1) + "*"; - } - final InteractionsModel im = _model.getInteractionsModel(); - // Get the last line (the one that caused the error) and remove it from the history - String lastLine = im.removeLastFromHistory(); - // Import the selected class... - String importLine = "import " + text + "; // auto-import"; - // ... and try to do the last line again - final String code = importLine + ((lastLine != null) ? ("\n" + lastLine) : ""); - EventQueue.invokeLater(new Runnable() { - public void run() { // interpret with the added import - try { - im.append(code, ConsoleDocument.DEFAULT_STYLE); - im.interpretCurrentInteraction(); - } - finally { hourglassOff(); } - } - }); - return null; - } - }; - PredictiveInputFrame.CloseAction cancelAction = - new PredictiveInputFrame.CloseAction() { - public String getName() { return "Cancel"; } - public KeyStroke getKeyStroke() { return KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0); } - public String getToolTipText() { return null; } - public Object value(PredictiveInputFrame p) { - // if no class was selected, just reset the error information so the dialog box works next time - _model.getInteractionsModel().resetLastErrors(); - hourglassOff(); - return null; - } - }; - - ArrayList> strategies = - new ArrayList>(); - strategies.add(new FragmentStrategy()); - strategies.add(new PrefixStrategy()); - strategies.add(new RegExStrategy()); - List> actions - = new ArrayList>(); - actions.add(okAction); - actions.add(cancelAction); - _autoImportDialog = - new PredictiveInputFrame(MainFrame.this, "Auto Import Class", false, true, info, strategies, - actions, 1, new JavaAPIListEntry("dummyImport", "dummyImport", null)) - { - public void setOwnerEnabled(boolean b) { if (b) hourglassOff(); else hourglassOn(); } - protected JComponent[] makeOptions() { return new JComponent[] { _autoImportPackageCheckbox }; } - }; - // Put one dummy entry in the list; it will be changed later anyway - if (DrJava.getConfig().getSetting(DIALOG_AUTOIMPORT_STORE_POSITION).booleanValue()) { - _autoImportDialog.setFrameState(DrJava.getConfig().getSetting(DIALOG_AUTOIMPORT_STATE)); - } - generateJavaAPISet(); - } - } - - /** The "Auto Import" dialog instance. */ - PredictiveInputFrame _autoImportDialog = null; - JCheckBox _autoImportPackageCheckbox; - - /** Auto-imports a class selected by the user using this dialog - * @param s the string to show - */ - private void _showAutoImportDialog(final String s) { - hourglassOn(); - new Thread() { - public void run() { - // run this in a thread other than the main thread - final Set apiSet = getJavaAPISet(); -// _log.log("**** Initial API Set for Auto-import Dialog is: " + apiSet); - if (apiSet == null) { - hourglassOff(); - return; - } -// _log.log("***** apiSet has length " + apiSet.size()); - Utilities.invokeLater(new Runnable() { - public void run() { - // but now run this in the event thread again - List autoImportList = new ArrayList(apiSet); - if (DrJava.getConfig().getSetting(DIALOG_COMPLETE_SCAN_CLASS_FILES).booleanValue() && - _autoImportClassSet.size() > 0) { -// _log.log("Auto-import class set = " + _autoImportClassSet); - autoImportList.addAll(_autoImportClassSet); - } - else { - File projectRoot = _model.getProjectRoot(); - List docs = _model.getOpenDefinitionsDocuments(); - if (docs != null) { - for (OpenDefinitionsDocument d: docs) { - if (d.isUntitled()) continue; - try { - String rel = FileOps.stringMakeRelativeTo(d.getRawFile(), projectRoot); - String full = rel.replace(File.separatorChar, '.'); - - // TODO: What about Habanero Java extension? - for (String ext: DrJavaFileUtils.getSourceFileExtensions()) { - if (full.endsWith(ext)) { - full = full.substring(0, full.lastIndexOf(ext)); - break; - } - } - String simple = full; - if (simple.lastIndexOf('.') >= 0) simple = simple.substring(simple.lastIndexOf('.') + 1); - -// _log.log("**** Creating new JavaAPIEntry with simple name = " + simple + " and full name = " + full); - JavaAPIListEntry entry = new JavaAPIListEntry(simple, full, null); - if (! autoImportList.contains(entry)) { autoImportList.add(entry); } - } - catch(IOException ioe) { /* ignore, just don't add this one */ } - catch(SecurityException se) { /* ignore, just don't add this one */ } - } - } - } - PredictiveInputModel pim = - new PredictiveInputModel(true, new PrefixStrategy(), autoImportList); - pim.setMask(s); - _initAutoImportDialog(); -// int size = (autoImportList == null) ? -1 : autoImportList.size(); -// _log.log("***** Adding an autoImportList list of size: " + size); - _autoImportDialog.setModel(true, pim); // ignore case - _autoImportPackageCheckbox.setSelected(false); - _autoImportDialog.setVisible(true); - } - }); - } - }.start(); +// } } /** Follow a file. */ diff --git a/drjava/src/edu/rice/cs/drjava/ui/MainFrameStatics.java b/drjava/src/edu/rice/cs/drjava/ui/MainFrameStatics.java index cbeb9785d..b6a23852a 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/MainFrameStatics.java +++ b/drjava/src/edu/rice/cs/drjava/ui/MainFrameStatics.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.ui; import edu.rice.cs.util.swing.Utilities; diff --git a/drjava/src/edu/rice/cs/drjava/ui/MainFrameTest.java b/drjava/src/edu/rice/cs/drjava/ui/MainFrameTest.java index c00f10dfa..d277f4048 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/MainFrameTest.java +++ b/drjava/src/edu/rice/cs/drjava/ui/MainFrameTest.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.ui; import java.awt.Component; @@ -531,13 +523,13 @@ public File[] getFiles() { _log.log("testSaveButtonEnabled completed"); } - /** A Test to guarantee that the Dancing UI bug will not rear its ugly head again. - * Basically, add a component listener to the leftComponent of _docSplitPane and - * make certain its size does not change while compiling a class which depends on - * another class. - * @throws IOException if an IO operation fails - */ - public void testDancingUIFileOpened() throws IOException { + // This bug reappeared when switching from Oracle Java 8 to OpenJDK Java 8 + /** A Test to guarantee that the Dancing UI bug will not rear its ugly head again. Basically, add a component listener + * to the leftComponent of _docSplitPane and make certain its size does not change while compiling a class which + * depends on another class. + * @throws IOException if an IO operation fails + */ + public void xtestDancingUIFileOpened() throws IOException { //System.out.println("DEBUG: Entering messed up test"); /** Maybe this sequence of calls should be incorporated into one function createTestDir(), which would get * the username and create the temporary directory. Only sticky part is deciding where to put it, in FileOps @@ -661,13 +653,13 @@ public void run() { _log.log("testDancingUIFileOpened completed"); } - /** A Test to guarantee that the Dancing UI bug will not rear its ugly head - * again. Basically, add a component listener to the leftComponent of - * _docSplitPane and make certain its size does not change while closing an - * OpenDefinitionsDocument outside the event thread. - * @throws IOException if an IO operation fails - */ - public void testDancingUIFileClosed() throws IOException { + // This bug reappeared when swtiching from Oracle Java 8 to OpenJDK Java 8 + /** A Test to guarantee that the Dancing UI bug will not rear its ugly head again. Basically, add a component listener + * to the leftComponent of _docSplitPane and make certain its size does not change while closing an + * OpenDefinitionsDocument outside the event thread. + * @throws IOException if an IO operation fails + */ + public void xtestDancingUIFileClosed() throws IOException { /** Maybe this sequence of calls should be incorporated into one function createTestDir(), which would get the * username and create the temporary directory. Only sticky part is deciding where to put it, in FileOps maybe? */ diff --git a/drjava/src/edu/rice/cs/drjava/ui/NewJavaClassDialog.java b/drjava/src/edu/rice/cs/drjava/ui/NewJavaClassDialog.java index e9e900978..a92666965 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/NewJavaClassDialog.java +++ b/drjava/src/edu/rice/cs/drjava/ui/NewJavaClassDialog.java @@ -2,40 +2,32 @@ /*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*/ - import java.awt.event.*; import java.awt.Component; import java.awt.Container; @@ -75,7 +67,7 @@ public class NewJavaClassDialog extends SwingFrame { private final JButton _okButton; private final JButton _cancelButton; - private JPanel _mainPanel; + private final JPanel _mainPanel; private final JTextField _className = new JTextField(); private final JTextField _interfaces = new JTextField(); private final JTextField _superClass = new JTextField(); @@ -203,7 +195,7 @@ public void ok() { } if (_superClass.getText().length() != 0) { - if(!checkSuperClassName(_superClass.getText())) { + if (!checkSuperClassName(_superClass.getText())) { _errorMessage.setForeground(Color.RED); _errorMessage.setText("Enter correct superclass."); invalidate(); @@ -211,8 +203,8 @@ public void ok() { } } - if(_interfaces.getText().length() != 0) { - if(!checkInterfaceNames(_interfaces.getText())) { + if (_interfaces.getText().length() != 0) { + if (!checkInterfaceNames(_interfaces.getText())) { _errorMessage.setForeground(Color.RED); _errorMessage.setText("Enter correct interface names."); invalidate(); @@ -481,7 +473,7 @@ static boolean iterateListOfClassNames(String name) { static boolean checkInterfaceNames(String name) { if (name == null) return false; name = name.trim(); - if(name.length() != 0 && name.matches("([A-Za-z_][A-Za-z0-9_, \\.]*)")) { + if (name.length() != 0 && name.matches("([A-Za-z_][A-Za-z0-9_, \\.]*)")) { return iterateListOfClassNames(name); } else return false; @@ -498,9 +490,9 @@ static String getCapitalizedInterfacesNames(String name) { } static String getModifier(String modifier){ - if(modifier == null) + if (modifier == null) return ""; //return blank modifier - else if(modifier.equals("public") || modifier.equals("final") || modifier.equals("abstract")) + else if (modifier.equals("public") || modifier.equals("final") || modifier.equals("abstract")) return modifier+ " "; else return ""; //return blank modifier @@ -515,15 +507,15 @@ static String getClassDeclaration(String accessMod, String modifier, String name sb.append(getModifier(modifier)); } sb.append("class"); - if(name != null) { + if (name != null) { sb.append(' '); sb.append(getCapitalizedClassName(name)); } - if(superclass.length() != 0) { + if (superclass.length() != 0) { sb.append(" extends "); sb.append(getCapitalizedSuperClassName(superclass)); } - if(interfaces.length() != 0) { + if (interfaces.length() != 0) { sb.append(" implements "); sb.append(getCapitalizedInterfacesNames(interfaces)); } @@ -549,13 +541,13 @@ public static String getClassContent(String accessMod, String modifier, String c sb.append(" {\n"); sb.append("\n"); - if(classConstructor && !elementaryOrFunctionalJava) { + if (classConstructor && !elementaryOrFunctionalJava) { sb.append("public " + getCapitalizedClassName(className) + "() { \n"); sb.append("/* YOUR CONSTRUCTOR CODE HERE*/"); sb.append("\n}\n"); } - if(mainMethod && !elementaryOrFunctionalJava) { + if (mainMethod && !elementaryOrFunctionalJava) { sb.append("\n public static void main(String[] args) { \n\n"); sb.append("}\n\n"); } diff --git a/drjava/src/edu/rice/cs/drjava/ui/NewVersionPopup.java b/drjava/src/edu/rice/cs/drjava/ui/NewVersionPopup.java index 4b0d0014c..30c13d01e 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/NewVersionPopup.java +++ b/drjava/src/edu/rice/cs/drjava/ui/NewVersionPopup.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.ui; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/PreviewConsoleFrame.java b/drjava/src/edu/rice/cs/drjava/ui/PreviewConsoleFrame.java index 7a61bdd5b..addfb2e9e 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/PreviewConsoleFrame.java +++ b/drjava/src/edu/rice/cs/drjava/ui/PreviewConsoleFrame.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.ui; import java.awt.print.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/PreviewDefDocFrame.java b/drjava/src/edu/rice/cs/drjava/ui/PreviewDefDocFrame.java index bfb82b500..96c8abd8c 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/PreviewDefDocFrame.java +++ b/drjava/src/edu/rice/cs/drjava/ui/PreviewDefDocFrame.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.ui; import javax.swing.text.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/PreviewFrame.java b/drjava/src/edu/rice/cs/drjava/ui/PreviewFrame.java index 1000ca87d..f2dbb240e 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/PreviewFrame.java +++ b/drjava/src/edu/rice/cs/drjava/ui/PreviewFrame.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.ui; import javax.swing.*; @@ -148,11 +140,11 @@ public void actionPerformed(ActionEvent ae) { }; /** Contructs a new PreviewFrame using a parent model and a Pageable object - * print to show. Should only be called in event thread. - * @param model the parent model - * @param mainFrame the main frame - * @param interactions true if the document being previewed is an interactions document - */ + * print to show. Should only be called in event thread. + * @param model the parent model + * @param mainFrame the main frame + * @param interactions true if the document being previewed is an interactions document + */ public PreviewFrame(SingleDisplayModel model, MainFrame mainFrame, boolean interactions) throws IllegalStateException { super("Print Preview"); diff --git a/drjava/src/edu/rice/cs/drjava/ui/ProjectAdvancedPropertiesFrame.java b/drjava/src/edu/rice/cs/drjava/ui/ProjectAdvancedPropertiesFrame.java index ec6ce234a..52cd9fbca 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/ProjectAdvancedPropertiesFrame.java +++ b/drjava/src/edu/rice/cs/drjava/ui/ProjectAdvancedPropertiesFrame.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.ui; import java.awt.event.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/ProjectMenuTest.java b/drjava/src/edu/rice/cs/drjava/ui/ProjectMenuTest.java index 477a0966f..cee024884 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/ProjectMenuTest.java +++ b/drjava/src/edu/rice/cs/drjava/ui/ProjectMenuTest.java @@ -1,42 +1,34 @@ /*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.ui; -import edu.rice.cs.drjava.DrJavaTestCase; +import edu.rice.cs.drjava.model.MultiThreadedTestCase; import edu.rice.cs.drjava.model.OpenDefinitionsDocument; import edu.rice.cs.drjava.model.SingleDisplayModel; import edu.rice.cs.drjava.project.DocFile; @@ -55,8 +47,9 @@ import java.io.*; import java.util.List; -/** Test functions of Project Facility working through the main frame and model. */ -public final class ProjectMenuTest extends DrJavaTestCase { +/** Test functions of Project Facility working through the main frame and model. Must use MultiThreadedTestCase instead + * of DrJavaTestCase because some JUnit assertXXX statements are executed in the event dispatch thread. */ +public final class ProjectMenuTest extends MultiThreadedTestCase { private volatile MainFrame _frame; @@ -76,9 +69,9 @@ public final class ProjectMenuTest extends DrJavaTestCase { private volatile String _projFileText = null; - /** Invokes setUp() in MultiThreadedTestCase. Accessible from anonymous inner classes. - * @throws Exception if something goes wrong - */ + /** Invokes setUp() in DrJavaTestCase. This superclass is accessible from anonymous inner classes. + * @throws Exception if something goes wrong + */ private void superSetUp() throws Exception { super.setUp(); } /** Setup method for each JUnit test case in this Test class. diff --git a/drjava/src/edu/rice/cs/drjava/ui/ProjectPropertiesFrame.java b/drjava/src/edu/rice/cs/drjava/ui/ProjectPropertiesFrame.java index 39e1bd239..95841f337 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/ProjectPropertiesFrame.java +++ b/drjava/src/edu/rice/cs/drjava/ui/ProjectPropertiesFrame.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.ui; import java.awt.event.*; @@ -256,7 +248,7 @@ public boolean saveSettings() {//throws IOException { _model.setWorkingDirectory(wd); String mc = _mainDocumentSelector.getText(); - if(mc == null) mc = ""; + if (mc == null) mc = ""; _model.setMainClass(mc); Vector extras = _extraClassPathList.getValue(); // Vector mandated by interface to VectorFileOptionComponent @@ -308,7 +300,7 @@ private File _getMainFile() { /** @return the fully-qualified name of the main class in the project profile ("" if none is set) */ private String _getMainClass(){ String mainClass = _model.getMainClass(); - if(mainClass == null) return ""; + if (mainClass == null) return ""; return mainClass; } @@ -631,17 +623,17 @@ public Dimension getMaximumSize() { public void actionPerformed(ActionEvent e){ int ret = chooser.showOpenDialog(ProjectPropertiesFrame.this); - if(ret != JFileChooser.APPROVE_OPTION) + if (ret != JFileChooser.APPROVE_OPTION) return; File mainClass = chooser.getSelectedFile(); File sourceRoot = new File(_projRootSelector.getFileField().getText()); - if(sourceRoot == null || mainClass == null) + if (sourceRoot == null || mainClass == null) return; - if(!mainClass.getAbsolutePath().startsWith(sourceRoot.getAbsolutePath())){ + if (!mainClass.getAbsolutePath().startsWith(sourceRoot.getAbsolutePath())){ JOptionPane.showMessageDialog(ProjectPropertiesFrame.this, "Main Class must be in either Project Root or one of its sub-directories.", "Unable to set Main Class", JOptionPane.ERROR_MESSAGE); @@ -654,12 +646,12 @@ public void actionPerformed(ActionEvent e){ String qualifiedName = mainClass.getAbsolutePath().substring(sourceRoot.getAbsolutePath().length()); //Strip off any leading slashes - if(qualifiedName.startsWith("" + File.separatorChar)) + if (qualifiedName.startsWith("" + File.separatorChar)) qualifiedName = qualifiedName.substring(1); //Remove the .java extension if it exists // TODO: What about language level file extensions? What about Habanero Java extension? - if(qualifiedName.toLowerCase().endsWith(OptionConstants.JAVA_FILE_EXTENSION)) + if (qualifiedName.toLowerCase().endsWith(OptionConstants.JAVA_FILE_EXTENSION)) qualifiedName = qualifiedName.substring(0, qualifiedName.length() - 5); //Replace path seperators with java standard '.' package seperators. diff --git a/drjava/src/edu/rice/cs/drjava/ui/QuickStartFrame.java b/drjava/src/edu/rice/cs/drjava/ui/QuickStartFrame.java index ff421e14e..2a7215901 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/QuickStartFrame.java +++ b/drjava/src/edu/rice/cs/drjava/ui/QuickStartFrame.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.ui; import edu.rice.cs.drjava.platform.PlatformFactory; diff --git a/drjava/src/edu/rice/cs/drjava/ui/RecentDocFrame.java b/drjava/src/edu/rice/cs/drjava/ui/RecentDocFrame.java index 5342b1b6f..067416ba3 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/RecentDocFrame.java +++ b/drjava/src/edu/rice/cs/drjava/ui/RecentDocFrame.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.ui; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/RecentFileManager.java b/drjava/src/edu/rice/cs/drjava/ui/RecentFileManager.java index 5c9f80b64..2fe156baa 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/RecentFileManager.java +++ b/drjava/src/edu/rice/cs/drjava/ui/RecentFileManager.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.ui; import javax.swing.*; @@ -49,41 +41,40 @@ import edu.rice.cs.util.FileOpenSelector; -/** * Manages a list of the most recently used files to be displayed - * in the File menu. - * @version $Id$ - */ +/** Manages a list of the most recently used files to be displayed in the File menu. + * @version $Id$ + */ public class RecentFileManager implements OptionConstants { /** Position in the file menu where the entries start. */ - protected int _initPos; + protected volatile int _initPos; /** Position in the file menu for the next insert. */ - protected int _pos; + protected volatile int _pos; /** All of the recently used files in the list, in order. */ - protected Vector _recentFiles; + protected final Vector _recentFiles; /** The maximum number of files to display in the list. */ - protected int MAX = DrJava.getConfig().getSetting(RECENT_FILES_MAX_SIZE).intValue(); + protected volatile int MAX = DrJava.getConfig().getSetting(RECENT_FILES_MAX_SIZE).intValue(); /** The File menu containing the entries. */ - protected JMenu _fileMenu; + protected final JMenu _fileMenu; /** Other File menus to be kept synchronized to the original File menu. */ - protected HashSet _mirroredMenus = new HashSet(); + protected final HashSet _mirroredMenus = new HashSet(); /** The OptionConstant that should be used to retrieve the list of recent files. */ - protected VectorOption _settingConfigConstant; + protected final VectorOption _settingConfigConstant; /** An action that will be invoked when the file is clicked. */ - protected RecentFileAction _recentFileAction; + protected final RecentFileAction _recentFileAction; /** Creates a new RecentFileManager. - * @param pos Position in the file menu - * @param fileMenu File menu to add the entry to - * @param action action to be invoked when the file is clicked - * @param settingConfigConstant configuration info - */ + * @param pos Position in the file menu + * @param fileMenu File menu to add the entry to + * @param action action to be invoked when the file is clicked + * @param settingConfigConstant configuration info + */ public RecentFileManager(int pos, JMenu fileMenu, RecentFileAction action, VectorOption settingConfigConstant) { _initPos = _pos = pos; _fileMenu = fileMenu; @@ -107,7 +98,7 @@ public void addMirroredMenu(JMenu mirroredMenu) { if (_recentFiles.size()>0) { mirroredMenu.insertSeparator(_initPos); //one at top } - for(int i=0; i<_recentFiles.size(); ++i) { + for(int i = 0; i < _recentFiles.size(); ++i) { final File file = _recentFiles.get(i); final FileOpenSelector recentSelector = new FileOpenSelector() { public File[] getFiles() { return new File[] { file }; } @@ -150,8 +141,8 @@ public void saveRecentFiles() { } /** Updates the list after the given file has been opened. - * @param file the file being opened - */ + * @param file the file being opened + */ public void updateOpenFiles(final File file) { if (_recentFiles.size() == 0) { @@ -222,15 +213,15 @@ public void removeIfInList(File file) { } } - /** Trims the recent file list to the configured size and numbers the - * remaining files according to their position in the list - */ + /** Trims the recent file list to the configured size and numbers the remaining files according to their position in + * the list + */ public void numberItems() { int delPos = _recentFiles.size(); boolean wasEmpty = (delPos == 0); while (delPos > MAX) { _recentFiles.remove(delPos - 1); - _remove(_initPos+delPos); + _remove(_initPos + delPos); delPos = _recentFiles.size(); } @@ -240,6 +231,7 @@ public void numberItems() { public void run(JMenu fileMenu) { JMenuItem currItem = fileMenu.getItem(_initPos+fi+1); currItem.setText((fi+1) + ". " + _recentFiles.get(fi).getName()); + currItem.setFont(DrJava.getConfig().getSetting(FONT_MENUBAR)); } }); } diff --git a/drjava/src/edu/rice/cs/drjava/ui/RecentFileManagerTest.java b/drjava/src/edu/rice/cs/drjava/ui/RecentFileManagerTest.java index ac51bfd6a..a312f0598 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/RecentFileManagerTest.java +++ b/drjava/src/edu/rice/cs/drjava/ui/RecentFileManagerTest.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.ui; import edu.rice.cs.drjava.DrJavaTestCase; diff --git a/drjava/src/edu/rice/cs/drjava/ui/RegionsListPanel.java b/drjava/src/edu/rice/cs/drjava/ui/RegionsListPanel.java index 574a3255f..49c078173 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/RegionsListPanel.java +++ b/drjava/src/edu/rice/cs/drjava/ui/RegionsListPanel.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.ui; import java.util.ArrayList; diff --git a/drjava/src/edu/rice/cs/drjava/ui/RegionsTreePanel.java b/drjava/src/edu/rice/cs/drjava/ui/RegionsTreePanel.java index d6d06accb..140ad9719 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/RegionsTreePanel.java +++ b/drjava/src/edu/rice/cs/drjava/ui/RegionsTreePanel.java @@ -1,50 +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.ui; import java.awt.*; import java.awt.event.*; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.IdentityHashMap; -import java.util.Iterator; -import java.util.SortedSet; -import java.util.NoSuchElementException; +import java.util.*; +import java.util.stream.Collectors; +import java.util.stream.StreamSupport; import javax.swing.*; import javax.swing.event.*; @@ -67,6 +55,8 @@ * @version $Id$ */ public abstract class RegionsTreePanel extends TabbedPanel { + + // static _log field inherited from TabbedPanel protected volatile JPanel _leftPane; private volatile DefaultMutableTreeNode _rootNode; @@ -90,24 +80,13 @@ public abstract class RegionsTreePanel extends protected volatile JButton _nextButton; /** the region that was last selected (may be null). */ protected volatile R _lastSelectedRegion = null; - - -// /** Cached values from last region insertion. _cachedDoc is non-null iff the last added region occurred at the end of -// * the list of regions for its document. If _cachedDoc is null, the other cached values are invalid. */ -// protected OpenDefinitionsDocument _cachedDoc = null; -// protected DefaultMutableTreeNode _cachedDocNode = null; -// protected int _cachedRegionIndex = 0; -// protected int _cachedStartOffset = 0; - /** State pattern to improve performance when rapid changes are made. */ protected final IChangeState DEFAULT_STATE = new DefaultState(); // protected final IChangeState CHANGING_STATE = new ChangingState(); protected volatile IChangeState _changeState = DEFAULT_STATE; - /** A table mapping each document entered in this panel to its corresponding MutableTreeNode in _regTreeModel. */ protected volatile HashMap _docToTreeNode = new HashMap(); - /** A table mapping each region entered in this panel to its corresponding MutableTreeNode in _regTreeModel. */ protected volatile IdentityHashMap _regionToTreeNode = new IdentityHashMap(); @@ -486,7 +465,7 @@ public String getToolTipText() { /** Action performed when the Enter key is pressed. Should be overridden. */ protected void performDefaultAction() { } - /** Creates the buttons for controlling the regions. Should be overridden. + /** Creates the buttons for controlling the regions. Should be overridden in dervied classes. * @return the newly-created buttons */ protected JComponent[] makeButtons() { return new JComponent[0]; } @@ -613,7 +592,7 @@ protected void updateNextPreviousRegionButtons(R lastSelectedRegion) { if (_hasNextPrevButtons) { int count = _regionManager.getRegionCount(); if (count>0) { - if (_lastSelectedRegion==null) { + if (_lastSelectedRegion == null) { // nothing selected, but we have at least one region _prevButton.setEnabled(false); // no "prev" _nextButton.setEnabled(true); // "next" will go to the first region @@ -679,12 +658,12 @@ protected R getPrevRegionInTree(R r) { // +--doc2--+ // +---_lastSelectedRegion DefaultMutableTreeNode parent = (DefaultMutableTreeNode)regionNode.getParent(); - if (parent!=null) { + if (parent != null) { DefaultMutableTreeNode parentsPrevSibling = parent.getPreviousSibling(); - if (parentsPrevSibling!=null) { + if (parentsPrevSibling != null) { try { DefaultMutableTreeNode olderCousin = (DefaultMutableTreeNode)parentsPrevSibling.getLastChild(); - if (olderCousin!=null) { + if (olderCousin != null) { @SuppressWarnings("unchecked") RegionTreeUserObj userObject = (RegionTreeUserObj) olderCousin.getUserObject(); return userObject.region(); @@ -750,12 +729,12 @@ protected R getNextRegionInTree(R r) { // +--doc2--+ // +---youngerCousin DefaultMutableTreeNode parent = (DefaultMutableTreeNode)regionNode.getParent(); - if (parent!=null) { + if (parent != null) { DefaultMutableTreeNode parentsNextSibling = parent.getNextSibling(); - if (parentsNextSibling!=null) { + if (parentsNextSibling != null) { try { DefaultMutableTreeNode youngerCousin = (DefaultMutableTreeNode)parentsNextSibling.getFirstChild(); - if (youngerCousin!=null) { + if (youngerCousin != null) { @SuppressWarnings("unchecked") RegionTreeUserObj userObject = (RegionTreeUserObj) youngerCousin.getUserObject(); return userObject.region(); @@ -803,8 +782,15 @@ public void addRegion(final R r) { // } // else { @SuppressWarnings("unchecked") - Enumeration regionNodes = docNode.children(); - + Enumeration rawNodes = docNode.children(); + Iterator nodeIterator = StreamSupport.stream(Spliterators.spliteratorUnknownSize((Iterator) rawNodes, 0), false) + .map(node -> (DefaultMutableTreeNode) node) + .iterator(); + + Enumeration regionNodes = Collections.enumeration( + StreamSupport.stream(Spliterators.spliteratorUnknownSize(nodeIterator, 0), false) + .collect(Collectors.toList())); + // Create a new region node in this document node list, where regions are sorted by start offset. int startOffset = r.getStartOffset(); for (int index = 0; true ; index++) { // infinite loop incrementing index on each iteration @@ -882,7 +868,7 @@ public void removeRegion(final R r) { if ((_lastSelectedRegion!=null) && (_lastSelectedRegion.equals(r))) { // we need to change the _lastSelectedRegion R newLast = getPrevRegionInTree(_lastSelectedRegion); - if (newLast==null) newLast = getNextRegionInTree(_lastSelectedRegion); + if (newLast == null) newLast = getNextRegionInTree(_lastSelectedRegion); _lastSelectedRegion = newLast; if (_lastSelectedRegion!=null) { selectRegion(_lastSelectedRegion); @@ -931,6 +917,9 @@ protected void closeIfEmpty() { if (_regionManager.getDocuments().isEmpty()) _close(); // _regTreeModel.getChildCount(_regTreeModel.getRoot()) == 0 } + /** Return true if the tree is empty. */ + public boolean isEmpty() { return _regionManager.getDocuments().isEmpty(); } + // Reloads regions between starting and endRegion inclusive. Assumes startRegion, endRegion are in the same document. public void reload(R startRegion, R endRegion) { SortedSet tail = _regionManager.getTailSet(startRegion); diff --git a/drjava/src/edu/rice/cs/drjava/ui/ReverseHighlighter.java b/drjava/src/edu/rice/cs/drjava/ui/ReverseHighlighter.java index 8a56342c3..cdf2575f5 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/ReverseHighlighter.java +++ b/drjava/src/edu/rice/cs/drjava/ui/ReverseHighlighter.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.ui; import javax.swing.text.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/SimpleInteractionsWindow.java b/drjava/src/edu/rice/cs/drjava/ui/SimpleInteractionsWindow.java index f0ffec7df..15178aa6f 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/SimpleInteractionsWindow.java +++ b/drjava/src/edu/rice/cs/drjava/ui/SimpleInteractionsWindow.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.ui; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/SmartSourceFilter.java b/drjava/src/edu/rice/cs/drjava/ui/SmartSourceFilter.java index 079abe8b6..6df64d4ab 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/SmartSourceFilter.java +++ b/drjava/src/edu/rice/cs/drjava/ui/SmartSourceFilter.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.ui; import java.io.File; @@ -58,7 +50,7 @@ public boolean accept(File f) { // this is a ".java" file File parent = f.getParentFile(); - if (parent==null) { + if (parent == null) { // can't do the smart thing; but since this is a ".java" file, accept it return true; } diff --git a/drjava/src/edu/rice/cs/drjava/ui/SplashScreen.java b/drjava/src/edu/rice/cs/drjava/ui/SplashScreen.java index 6a1936d9c..e8720e6b6 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/SplashScreen.java +++ b/drjava/src/edu/rice/cs/drjava/ui/SplashScreen.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.ui; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/TabbedPanel.java b/drjava/src/edu/rice/cs/drjava/ui/TabbedPanel.java index 2c8129173..380eb59ff 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/TabbedPanel.java +++ b/drjava/src/edu/rice/cs/drjava/ui/TabbedPanel.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.ui; import javax.swing.*; @@ -41,6 +33,7 @@ import java.awt.*; import java.awt.dnd.*; import edu.rice.cs.drjava.DrJavaRoot; +import edu.rice.cs.util.Log; /** Extended by all panels that can dynamically be added or removed from the _tabbedPane in MainFrame. Provides a * boolean indicating if the panel is being displayed, and a close button. Attaches an action to the close button @@ -49,6 +42,8 @@ */ public abstract class TabbedPanel extends JPanel implements DropTargetListener { + public static Log _log = new Log("TabbedPanel", false); + /** indicates whether this tab is displayed in the tabbed pane. */ protected volatile boolean _displayed; /** button which removes this pane's tab. */ diff --git a/drjava/src/edu/rice/cs/drjava/ui/avail/AndGUIAvailabilityActionAdapter.java b/drjava/src/edu/rice/cs/drjava/ui/avail/AndGUIAvailabilityActionAdapter.java index 7b805a9f8..f55ed0382 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/avail/AndGUIAvailabilityActionAdapter.java +++ b/drjava/src/edu/rice/cs/drjava/ui/avail/AndGUIAvailabilityActionAdapter.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.ui.avail; import javax.swing.Action; diff --git a/drjava/src/edu/rice/cs/drjava/ui/avail/AndGUIAvailabilityComponentAdapter.java b/drjava/src/edu/rice/cs/drjava/ui/avail/AndGUIAvailabilityComponentAdapter.java index c19afc96f..1e8e87b6b 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/avail/AndGUIAvailabilityComponentAdapter.java +++ b/drjava/src/edu/rice/cs/drjava/ui/avail/AndGUIAvailabilityComponentAdapter.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.ui.avail; import java.awt.Component; diff --git a/drjava/src/edu/rice/cs/drjava/ui/avail/AndGUIAvailabilityListener.java b/drjava/src/edu/rice/cs/drjava/ui/avail/AndGUIAvailabilityListener.java index 49e77688d..3d5dc8b80 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/avail/AndGUIAvailabilityListener.java +++ b/drjava/src/edu/rice/cs/drjava/ui/avail/AndGUIAvailabilityListener.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.ui.avail; import java.util.HashSet; diff --git a/drjava/src/edu/rice/cs/drjava/ui/avail/DefaultGUIAvailabilityNotifier.java b/drjava/src/edu/rice/cs/drjava/ui/avail/DefaultGUIAvailabilityNotifier.java index ab6278fa4..76b72ba08 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/avail/DefaultGUIAvailabilityNotifier.java +++ b/drjava/src/edu/rice/cs/drjava/ui/avail/DefaultGUIAvailabilityNotifier.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.ui.avail; /** * Convenience methods for starting and finishing tasks that use multiple diff --git a/drjava/src/edu/rice/cs/drjava/ui/avail/GUIAvailabilityListener.java b/drjava/src/edu/rice/cs/drjava/ui/avail/GUIAvailabilityListener.java index 8daca7c6f..2474f739d 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/avail/GUIAvailabilityListener.java +++ b/drjava/src/edu/rice/cs/drjava/ui/avail/GUIAvailabilityListener.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.ui.avail; /** * An interface for responding to events that change GUI availability, diff --git a/drjava/src/edu/rice/cs/drjava/ui/avail/GUIAvailabilityNotifier.java b/drjava/src/edu/rice/cs/drjava/ui/avail/GUIAvailabilityNotifier.java index 9d520e223..d2c0caa1c 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/avail/GUIAvailabilityNotifier.java +++ b/drjava/src/edu/rice/cs/drjava/ui/avail/GUIAvailabilityNotifier.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.ui.avail; import edu.rice.cs.drjava.model.EventNotifier; @@ -42,15 +34,12 @@ /** * Keeps track of all listeners to GUI availability. *

* - * All methods in this class must use the synchronization methods - * provided by ReaderWriterLock. This ensures that multiple notifications - * (reads) can occur simultaneously, but only one thread can be adding - * or removing listeners (writing) at a time, and no reads can occur - * during a write. + * All methods in this class must use the synchronization methods provided by ReaderWriterLock. This ensures that + * multiple notifications (reads) can occur simultaneously, but only one thread can be adding or removing listeners + * (writes) at a time, and no reads can occur during a write. *

* - * No methods on this class should be synchronized using traditional - * Java synchronization! + * No methods on this class should be synchronized using traditional Java synchronization! *

* * @version $Id$ diff --git a/drjava/src/edu/rice/cs/drjava/ui/avail/OrGUIAvailabilityActionAdapter.java b/drjava/src/edu/rice/cs/drjava/ui/avail/OrGUIAvailabilityActionAdapter.java index ecbfaa381..da8478d38 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/avail/OrGUIAvailabilityActionAdapter.java +++ b/drjava/src/edu/rice/cs/drjava/ui/avail/OrGUIAvailabilityActionAdapter.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.ui.avail; import javax.swing.Action; diff --git a/drjava/src/edu/rice/cs/drjava/ui/avail/OrGUIAvailabilityComponentAdapter.java b/drjava/src/edu/rice/cs/drjava/ui/avail/OrGUIAvailabilityComponentAdapter.java index 6e9045fc2..5f358be08 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/avail/OrGUIAvailabilityComponentAdapter.java +++ b/drjava/src/edu/rice/cs/drjava/ui/avail/OrGUIAvailabilityComponentAdapter.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.ui.avail; import java.awt.Component; diff --git a/drjava/src/edu/rice/cs/drjava/ui/avail/OrGUIAvailabilityListener.java b/drjava/src/edu/rice/cs/drjava/ui/avail/OrGUIAvailabilityListener.java index 5e660a7d3..4ec7d0bf6 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/avail/OrGUIAvailabilityListener.java +++ b/drjava/src/edu/rice/cs/drjava/ui/avail/OrGUIAvailabilityListener.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.ui.avail; import java.util.HashSet; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/BooleanOptionComponent.java b/drjava/src/edu/rice/cs/drjava/ui/config/BooleanOptionComponent.java index 68c125cc8..889892024 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/BooleanOptionComponent.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/BooleanOptionComponent.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.ui.config; import java.awt.event.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/BooleanOptionComponentTest.java b/drjava/src/edu/rice/cs/drjava/ui/config/BooleanOptionComponentTest.java index 4154a7e04..0010ef66e 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/BooleanOptionComponentTest.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/BooleanOptionComponentTest.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.ui.config; import edu.rice.cs.drjava.DrJava; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/ButtonComponent.java b/drjava/src/edu/rice/cs/drjava/ui/config/ButtonComponent.java index 4d12feffc..f7bea78a2 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/ButtonComponent.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/ButtonComponent.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.ui.config; import java.awt.event.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/ColorOptionComponent.java b/drjava/src/edu/rice/cs/drjava/ui/config/ColorOptionComponent.java index a0007bc9b..76c183dab 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/ColorOptionComponent.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/ColorOptionComponent.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.ui.config; import java.awt.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/ColorOptionComponentTest.java b/drjava/src/edu/rice/cs/drjava/ui/config/ColorOptionComponentTest.java index 3346922fd..5400b27c0 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/ColorOptionComponentTest.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/ColorOptionComponentTest.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.ui.config; import edu.rice.cs.drjava.DrJava; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/ConfigDescriptions.java b/drjava/src/edu/rice/cs/drjava/ui/config/ConfigDescriptions.java index 746e9cc82..daa42ef04 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/ConfigDescriptions.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/ConfigDescriptions.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.ui.config; import java.util.HashMap; @@ -103,10 +95,10 @@ public static void add(Option o, String s, String l) { add(OptionConstants.DIALOG_COMPLETE_SCAN_CLASS_FILES, "

" + StringOps. - splitStringAtWordBoundaries("Scan Class Files After Each Compile for Auto-Completion and Auto-Import", + splitStringAtWordBoundaries("Scan Class Files After Each Compile for Auto-Completion", 40, "
", SEPS)+"

", "Whether to scan the class files after a compile to generate class names
"+ - "used for auto-completion and auto-import.
"+ + "used for auto-completion.
"+ "Enabling this option will slow compiles down."); add(OptionConstants.DIALOG_COMPLETE_JAVAAPI, @@ -123,24 +115,22 @@ public static void add(Option o, String s, String l) { "Right Margin Position", "The number of columns after which the right margin is displayed."); - add(OptionConstants.FONT_MAIN, "Main Font", - "The font used for most text in DrJava."); + add(OptionConstants.FONT_MAIN, "Main Font", "The font used for most text in DrJava."); add(OptionConstants.FONT_LINE_NUMBERS, "Line Numbers Font", "The font for displaying line numbers on the left side of
" + "the Definitions Pane if Show All Line Numbers is enabled.
" + "Cannot be displayed larger than the Main Font."); - add(OptionConstants.FONT_DOCLIST, "Document List Font", - "The font used in the list of open documents."); - add(OptionConstants.FONT_TOOLBAR, "ToolBar Font", - "The font used in the toolbar buttons."); - add(OptionConstants.TEXT_ANTIALIAS, "Use anti-aliased text", - "Whether to graphically smooth the text."); - - add(OptionConstants.DEFINITIONS_NORMAL_COLOR, "Normal Color", + add(OptionConstants.FONT_DOCLIST, "Document List Font", "The font used in the list of open documents."); + add(OptionConstants.FONT_MENUBAR, "MenuBar Font", "The font used in menus and tabbed pane labels."); + add(OptionConstants.FONT_TOOLBAR, "ToolBar Font", "The font used in the toolbar buttons."); + + add(OptionConstants.TEXT_ANTIALIAS, "Use anti-aliased text", "Whether to graphically smooth the text."); + + add(OptionConstants.DEFINITIONS_NORMAL_COLOR, "Normal Color", "The default color for text in the Definitions Pane."); add(OptionConstants.DEFINITIONS_KEYWORD_COLOR, "Keyword Color", "The color for Java keywords in the Definitions Pane."); - add(OptionConstants.DEFINITIONS_TYPE_COLOR, "Type Color", + add(OptionConstants.DEFINITIONS_TYPE_COLOR, "Type Color", "The color for classes and types in the Definitions Pane."); add(OptionConstants.DEFINITIONS_COMMENT_COLOR, "Comment Color", "The color for comments in the Definitions Pane."); @@ -207,9 +197,6 @@ public static void add(Option o, String s, String l) { add(OptionConstants.DIALOG_OPENJAVADOC_STORE_POSITION, "Save \"Open Javadoc\" Dialog Position", "Whether to save and restore the size and position of the \"Open Javadoc\" dialog."); - add(OptionConstants.DIALOG_AUTOIMPORT_STORE_POSITION, - "Save \"Auto Import\" Dialog Position", - "Whether to save and restore the size and position of the \"Auto Import\" dialog."); add(OptionConstants.DIALOG_EXTERNALPROCESS_STORE_POSITION, "Save \"Execute External Process\" Dialog Position", @@ -260,10 +247,6 @@ public static void add(Option o, String s, String l) { "Any classes that the debuggger should not step into.
" + "Should be a list of fully-qualified class names.
" + "To exclude a package, add packagename.* to the list."); - add(OptionConstants.DEBUG_AUTO_IMPORT, - "Auto-Import after Breakpoint/Step", - "Whether the Debugger should automatically import packages
"+ - "and classes again after a breakpoint or step."); add(OptionConstants.AUTO_STEP_RATE, "Auto-Step Rate in ms", @@ -353,7 +336,7 @@ public static void add(Option o, String s, String l) { // Prompt to change the language level extensions (.dj0/.dj1->.dj, .dj2->.java) add(OptionConstants.PROMPT_RENAME_LL_FILES, "Prompt to Rename Old Language Level Files When Saving", "Whether DrJava should prompt the user to rename old language level files.
"+ - "DrJava suggests to rename .dj0 and .dj1 files to .dj, and .dj2 files to .java."); + "DrJava suggests renaming .dj0 and .dj1 files as .dj files, and .dj2 files as .java files."); @@ -589,15 +572,6 @@ public static void add(Option o, String s, String l) { add(OptionConstants.HISTORY_MAX_SIZE, "Size of Interactions History", "The number of interactions to remember in the history."); - add(OptionConstants.DIALOG_AUTOIMPORT_ENABLED, - "Enable the \"Auto Import\" Dialog", - "Whether DrJava should open the \"Auto Import\" dialog when
"+ - "an undefined class is encountered in the Interactions Pane."); - add(OptionConstants.INTERACTIONS_AUTO_IMPORT_CLASSES, "Classes to Auto-Import", - "List of classes to auto-import every time the
"+ - "Interaction Pane is reset or started. Examples:

"+ - "java.io.File
"+ - "java.util.*"); add(OptionConstants.DYNAMICJAVA_ACCESS_CONTROL, "Enforce access control", diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/ConfigFrame.java b/drjava/src/edu/rice/cs/drjava/ui/config/ConfigFrame.java index 1fd9c9443..ef989cfab 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/ConfigFrame.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/ConfigFrame.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.ui.config; import javax.swing.*; @@ -51,6 +43,7 @@ import edu.rice.cs.drjava.DrJava; import edu.rice.cs.drjava.config.*; +import edu.rice.cs.drjava.model.junit.ConcJUnitUtils; import edu.rice.cs.drjava.ui.*; import edu.rice.cs.drjava.ui.KeyBindingManager.KeyStrokeData; import edu.rice.cs.drjava.platform.PlatformFactory; @@ -270,25 +263,17 @@ public void setUp() { } private void enableChangeListeners() { - DrJava.getConfig().addOptionListener(OptionConstants.JUNIT_LOCATION_ENABLED, - _junitLocationEnabledListener); - DrJava.getConfig().addOptionListener(OptionConstants.JUNIT_LOCATION, - _junitLocationListener); - DrJava.getConfig().addOptionListener(OptionConstants.CONCJUNIT_CHECKS_ENABLED, - _concJUnitChecksEnabledListener); - DrJava.getConfig().addOptionListener(OptionConstants.RT_CONCJUNIT_LOCATION, - _rtConcJUnitLocationListener); + DrJava.getConfig().addOptionListener(OptionConstants.JUNIT_LOCATION_ENABLED, _junitLocationEnabledListener); + DrJava.getConfig().addOptionListener(OptionConstants.JUNIT_LOCATION, _junitLocationListener); + DrJava.getConfig().addOptionListener(OptionConstants.CONCJUNIT_CHECKS_ENABLED, _concJUnitChecksEnabledListener); + DrJava.getConfig().addOptionListener(OptionConstants.RT_CONCJUNIT_LOCATION, _rtConcJUnitLocationListener); } private void disableChangeListeners() { - DrJava.getConfig().removeOptionListener(OptionConstants.JUNIT_LOCATION_ENABLED, - _junitLocationEnabledListener); - DrJava.getConfig().removeOptionListener(OptionConstants.JUNIT_LOCATION, - _junitLocationListener); - DrJava.getConfig().removeOptionListener(OptionConstants.CONCJUNIT_CHECKS_ENABLED, - _concJUnitChecksEnabledListener); - DrJava.getConfig().removeOptionListener(OptionConstants.RT_CONCJUNIT_LOCATION, - _rtConcJUnitLocationListener); + DrJava.getConfig().removeOptionListener(OptionConstants.JUNIT_LOCATION_ENABLED, _junitLocationEnabledListener); + DrJava.getConfig().removeOptionListener(OptionConstants.JUNIT_LOCATION, _junitLocationListener); + DrJava.getConfig().removeOptionListener(OptionConstants.CONCJUNIT_CHECKS_ENABLED, _concJUnitChecksEnabledListener); + DrJava.getConfig().removeOptionListener(OptionConstants.RT_CONCJUNIT_LOCATION, _rtConcJUnitLocationListener); } /** @return the current master working directory, or the user's current directory if none is set. */ @@ -534,12 +519,10 @@ private void _setupResourceLocPanel(ConfigPanel panel) { newFileOptionComponent(OptionConstants.BROWSER_FILE, _browserChooser); addOptionComponent(panel, browserLoc); - StringOptionComponent browserCommand = - newStringOptionComponent(OptionConstants.BROWSER_STRING); + StringOptionComponent browserCommand = newStringOptionComponent(OptionConstants.BROWSER_STRING); addOptionComponent(panel, browserCommand); - FileOptionComponent javacLoc = - newFileOptionComponent(OptionConstants.JAVAC_LOCATION, _fileOptionChooser); + FileOptionComponent javacLoc = newFileOptionComponent(OptionConstants.JAVAC_LOCATION, _fileOptionChooser); javacLoc.setFileFilter(ClassPathFilter.ONLY); addOptionComponent(panel, javacLoc); @@ -619,20 +602,21 @@ public Object value(Object oc) { } /** Add all of the components for the Font panel of the preferences window. - * @param panel ConfigPanel to be setup - */ + * @param panel ConfigPanel to be setup + */ private void _setupFontPanel(ConfigPanel panel) { addOptionComponent(panel, newFontOptionComponent(OptionConstants.FONT_MAIN)); addOptionComponent(panel, newFontOptionComponent(OptionConstants.FONT_LINE_NUMBERS)); addOptionComponent(panel, newFontOptionComponent(OptionConstants.FONT_DOCLIST)); + addOptionComponent(panel, newFontOptionComponent(OptionConstants.FONT_MENUBAR)); addOptionComponent(panel, newFontOptionComponent(OptionConstants.FONT_TOOLBAR)); addOptionComponent(panel, newBooleanOptionComponent(OptionConstants.TEXT_ANTIALIAS)); panel.displayComponents(); } - + /** Adds all of the components for the Color panel of the preferences window. - * @param panel ConfigPanel to be setup - */ + * @param panel ConfigPanel to be setup + */ private void _setupColorPanel(ConfigPanel panel) { addOptionComponent(panel, newColorOptionComponent(OptionConstants.DEFINITIONS_NORMAL_COLOR)); addOptionComponent(panel, newColorOptionComponent(OptionConstants.DEFINITIONS_KEYWORD_COLOR)); @@ -722,11 +706,11 @@ public void actionPerformed(ActionEvent e) { }, "Reset \"Open Javadoc\" Dialog Position and Size", this, "This resets the dialog position and size to its default values.")); addOptionComponent(panel, new LabelComponent(" ", this, true)); - addOptionComponent(panel, newBooleanOptionComponent(OptionConstants.DIALOG_AUTOIMPORT_STORE_POSITION, false) - .setEntireColumn(true)); - addOptionComponent(panel, new ButtonComponent(new ActionListener() { - public void actionPerformed(ActionEvent e) { _mainFrame.resetAutoImportDialogPosition(); } - }, "Reset \"Auto Import\" Dialog Position and Size", this, "This resets the dialog position and size to its default values.")); +// addOptionComponent(panel, newBooleanOptionComponent(OptionConstants.DIALOG_AUTOIMPORT_STORE_POSITION, false) +// .setEntireColumn(true)); +// addOptionComponent(panel, new ButtonComponent(new ActionListener() { +// public void actionPerformed(ActionEvent e) { _mainFrame.resetAutoImportDialogPosition(); } +// }, "Reset \"Auto Import\" Dialog Position and Size", this, "This resets the dialog position and size to its default values.")); addOptionComponent(panel, new LabelComponent(" ", this, true)); addOptionComponent(panel, @@ -1097,26 +1081,26 @@ private void _setupJVMsPanel(ConfigPanel panel) { */ private void _setupFileTypesPanel(ConfigPanel panel) { if (PlatformFactory.ONLY.canRegisterFileExtensions()) { - addOptionComponent(panel, new LabelComponent("Assign DrJava project files and DrJava extensions
"+ - "(with the extensions .drjava and .djapp) to DrJava.
"+ + addOptionComponent(panel, new LabelComponent("Assign DrJava project files"+ + "(with the extension .drjava) to DrJava.
"+ "When double-clicking on a .drjava file, DrJava will open it.", this, true)); panel.addComponent(new ButtonComponent(new ActionListener() { public void actionPerformed(ActionEvent e) { if (PlatformFactory.ONLY.registerDrJavaFileExtensions()) { JOptionPane.showMessageDialog(ConfigFrame.this, - "Successfully set .drjava and .djapp file associations.", + "Successfully set .drjava file associations.", "Success", JOptionPane.INFORMATION_MESSAGE); } else { JOptionPane.showMessageDialog(ConfigFrame.this, - "Could not set .drjava and .djapp file associations.", + "Could not set .drjava file associations.", "File Types Error", JOptionPane.ERROR_MESSAGE); } } - }, "Associate .drjava and .djapp Files with DrJava", this, "This associates .drjava and .djapp files with DrJava.")); + }, "Associate .drjava Files with DrJava", this, "This associates .drjava files with DrJava.")); addOptionComponent(panel, new LabelComponent(" ", this, true)); @@ -1124,18 +1108,18 @@ public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) { if (PlatformFactory.ONLY.unregisterDrJavaFileExtensions()) { JOptionPane.showMessageDialog(ConfigFrame.this, - "Successfully removed .drjava and .djapp file associations.", + "Successfully removed .drjava file associations.", "Success", JOptionPane.INFORMATION_MESSAGE); } else { JOptionPane.showMessageDialog(ConfigFrame.this, - "Could not remove .drjava and .djapp file associations.", + "Could not remove .drjava file associations.", "File Types Error", JOptionPane.ERROR_MESSAGE); } } - }, "Remove .drjava and .djapp File Associations", this, "This removes the association of .drjava and .djapp files with DrJava.")); + }, "Remove .drjava file associations", this, "This removes the association of .drjava with DrJava.")); addOptionComponent(panel, new LabelComponent(" ", this, true)); addOptionComponent(panel, new LabelComponent(" ", this, true)); @@ -1241,7 +1225,7 @@ private void _setupCompilerPanel(ConfigPanel panel) { */ ActionListener CPCActionListener = new ActionListener() { public void actionPerformed(ActionEvent e) { - if(!edu.rice.cs.drjava.DrJava.getConfig().getSetting(OptionConstants.DEFAULT_COMPILER_PREFERENCE).equals(CPC.getCurrentComboBoxValue())) { + if (!edu.rice.cs.drjava.DrJava.getConfig().getSetting(OptionConstants.DEFAULT_COMPILER_PREFERENCE).equals(CPC.getCurrentComboBoxValue())) { edu.rice.cs.drjava.DrJava.getConfig().setSetting(OptionConstants.DEFAULT_COMPILER_PREFERENCE,CPC.getCurrentComboBoxValue()); } } @@ -1296,33 +1280,6 @@ public Object value(Object oc) { addOptionComponent(panel, new LabelComponent(" ", this, true)); addOptionComponent(panel, newIntegerOptionComponent(OptionConstants.HISTORY_MAX_SIZE)); - addOptionComponent(panel, newBooleanOptionComponent(OptionConstants.DIALOG_AUTOIMPORT_ENABLED)); - VectorStringOptionComponent autoImportClasses = - new VectorStringOptionComponent(OptionConstants.INTERACTIONS_AUTO_IMPORT_CLASSES, - CONFIG_DESCRIPTIONS.get(OptionConstants.INTERACTIONS_AUTO_IMPORT_CLASSES), - this, - CONFIG_LONG_DESCRIPTIONS.get(OptionConstants.INTERACTIONS_AUTO_IMPORT_CLASSES)) { - protected boolean verify(String s) { - boolean result = true; - // verify that the string contains only Java identifier characters, dots and stars - for(int i = 0; i < s.length(); ++i) { - char ch = s.charAt(i); - if ((ch!='.') && (ch!='*') && (!Character.isJavaIdentifierPart(ch))) { - result = false; - break; - } - } - if (!result) { - JOptionPane.showMessageDialog(ConfigFrame.this, - "This is not a valid class name:\n"+ - s, - "Error Adding Class Name", - JOptionPane.ERROR_MESSAGE); - } - return result; - } - }; - addOptionComponent(panel, autoImportClasses); addOptionComponent(panel, new LabelComponent(" ", this, true)); addOptionComponent(panel, new LabelComponent(" ", this, true)); @@ -1347,8 +1304,7 @@ private void _setupJUnitPanel(ConfigPanel panel) { newFileOptionComponent(OptionConstants.JUNIT_LOCATION, new FileSelectorComponent(this, _jarChooser, 30, 10f) { public void setFileField(File file) { - if (edu.rice.cs.drjava.model.junit.ConcJUnitUtils.isValidJUnitFile(file) || - edu.rice.cs.drjava.model.junit.ConcJUnitUtils.isValidConcJUnitFile(file)) { + if (ConcJUnitUtils.isValidJUnitFile(file) || ConcJUnitUtils.isValidConcJUnitFile(file)) { super.setFileField(file); } else if (file.exists()) { // invalid JUnit/ConcJUnit file, but exists @@ -1375,8 +1331,7 @@ public boolean validateTextField() { return false; } else { - if (edu.rice.cs.drjava.model.junit.ConcJUnitUtils.isValidJUnitFile(newFile) || - edu.rice.cs.drjava.model.junit.ConcJUnitUtils.isValidConcJUnitFile(newFile) || + if (ConcJUnitUtils.isValidJUnitFile(newFile) || ConcJUnitUtils.isValidConcJUnitFile(newFile) || FileOps.NULL_FILE.equals(newFile)) { setFileField(newFile); return true; @@ -1398,8 +1353,8 @@ public boolean validateTextField() { addOptionComponent(panel, new LabelComponent(" ", this, true)); - boolean javaVersion7 = JavaVersion.CURRENT.supports(JavaVersion.JAVA_7); - if (!javaVersion7) { + boolean javaVersion8 = JavaVersion.CURRENT.supports(JavaVersion.JAVA_8); + if (!javaVersion8) { final ForcedChoiceOptionComponent concJUnitChecksEnabledComponent = newForcedChoiceOptionComponent(OptionConstants.CONCJUNIT_CHECKS_ENABLED); addOptionComponent(panel, concJUnitChecksEnabledComponent); @@ -1410,9 +1365,7 @@ public boolean validateTextField() { newFileOptionComponent(OptionConstants.RT_CONCJUNIT_LOCATION, new FileSelectorComponent(this, _jarChooser, 30, 10f) { public void setFileField(File file) { - if (edu.rice.cs.drjava.model.junit.ConcJUnitUtils.isValidRTConcJUnitFile(file)) { - super.setFileField(file); - } + if (ConcJUnitUtils.isValidRTConcJUnitFile(file)) { super.setFileField(file); } else if (file.exists()) { // invalid but exists JOptionPane.showMessageDialog(_parent, "The file '"+ file.getName() + "'\nis not a valid ConcJUnit Runtime file.", "Invalid ConcJUnit Runtime File", JOptionPane.ERROR_MESSAGE); @@ -1435,8 +1388,7 @@ public boolean validateTextField() { return false; } else { - if (edu.rice.cs.drjava.model.junit.ConcJUnitUtils.isValidRTConcJUnitFile(newFile) || - FileOps.NULL_FILE.equals(newFile)) { + if (ConcJUnitUtils.isValidRTConcJUnitFile(newFile) || FileOps.NULL_FILE.equals(newFile)) { setFileField(newFile); return true; } @@ -1458,17 +1410,15 @@ public void actionPerformed(ActionEvent e) { if (junitLocEnabled.getComponent().isSelected()) { concJUnitJarFile = junitLoc.getComponent().getFileFromField(); } - File rtFile = rtConcJUnitLoc.getComponent().getFileFromField(); - edu.rice.cs.drjava.model.junit.ConcJUnitUtils. - showGenerateRTConcJUnitJarFileDialog(ConfigFrame.this, - rtFile, - concJUnitJarFile, - new Runnable1() { - public void run(File targetFile) { - rtConcJUnitLoc.getComponent().setFileField(targetFile); - } - }, - new Runnable() { public void run() { } }); + final File rtFile = rtConcJUnitLoc.getComponent().getFileFromField(); + final Runnable1 setFileField = new Runnable1() { + public void run(File targetFile) { rtConcJUnitLoc.getComponent().setFileField(targetFile); } + }; + ConcJUnitUtils.showGenerateRTConcJUnitJarFileDialog(ConfigFrame.this, + rtFile, + concJUnitJarFile, + setFileField, + new Runnable() { public void run() { } }); } }; final ButtonComponent processRT = @@ -1479,8 +1429,7 @@ public void run(File targetFile) { OptionComponent.ChangeListener rtConcJUnitListener = new OptionComponent.ChangeListener() { public Object value(Object oc) { File f = junitLoc.getComponent().getFileFromField(); - boolean enabled = (!junitLocEnabled.getComponent().isSelected()) || - edu.rice.cs.drjava.model.junit.ConcJUnitUtils.isValidConcJUnitFile(f); + boolean enabled = (!junitLocEnabled.getComponent().isSelected()) || ConcJUnitUtils.isValidConcJUnitFile(f); rtConcJUnitLoc.getComponent().setEnabled(enabled); processRT.getComponent().setEnabled(enabled); concJUnitChecksEnabledComponent.getComponent().setEnabled(enabled); @@ -1511,12 +1460,12 @@ public Object value(Object oc) { File f = junitLoc.getComponent().getFileFromField(); String[] s = new String[] { " ", " ", " ", " " }; boolean isConcJUnit = true; - if ((!junitLocEnabled.getComponent().isSelected()) || (f==null) || FileOps.NULL_FILE.equals(f) || !f.exists()) { + if ((!junitLocEnabled.getComponent().isSelected()) || (f == null) || FileOps.NULL_FILE.equals(f) || !f.exists()) { s[0] = "DrJava uses the built-in ConcJUnit framework."; } else { String type = "ConcJUnit"; - if (!edu.rice.cs.drjava.model.junit.ConcJUnitUtils.isValidConcJUnitFile(f)) { + if (! ConcJUnitUtils.isValidConcJUnitFile(f)) { type = "JUnit"; isConcJUnit = false; } @@ -1541,8 +1490,8 @@ public Object value(Object oc) { if (concJUnitChecksEnabledComponent.getCurrentComboBoxValue(). equals(OptionConstants.ConcJUnitCheckChoices.ALL)) { File rtf = rtConcJUnitLoc.getComponent().getFileFromField(); - if ((rtf!=null) && !FileOps.NULL_FILE.equals(rtf) && rtf.exists() && - edu.rice.cs.drjava.model.junit.ConcJUnitUtils.isValidRTConcJUnitFile(rtf)) { + if ((rtf!=null) && !FileOps.NULL_FILE.equals(rtf) && rtf.exists() && + ConcJUnitUtils.isValidRTConcJUnitFile(rtf)) { s[3] = "Lucky checks are enabled."; } } diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/ConfigPanel.java b/drjava/src/edu/rice/cs/drjava/ui/config/ConfigPanel.java index 8fe7f17b6..3975a1e80 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/ConfigPanel.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/ConfigPanel.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.ui.config; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/DirectoryOptionComponent.java b/drjava/src/edu/rice/cs/drjava/ui/config/DirectoryOptionComponent.java index 70c7e2c52..c2418c080 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/DirectoryOptionComponent.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/DirectoryOptionComponent.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.ui.config; import java.io.File; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/FileOptionComponent.java b/drjava/src/edu/rice/cs/drjava/ui/config/FileOptionComponent.java index 7aa974db5..6e1dfa4f7 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/FileOptionComponent.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/FileOptionComponent.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.ui.config; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/FileOptionComponentTest.java b/drjava/src/edu/rice/cs/drjava/ui/config/FileOptionComponentTest.java index 697eadc58..fee13cdc1 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/FileOptionComponentTest.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/FileOptionComponentTest.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.ui.config; import edu.rice.cs.drjava.DrJava; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/FontOptionComponent.java b/drjava/src/edu/rice/cs/drjava/ui/config/FontOptionComponent.java index a7fb8c4a3..a38f6a5c4 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/FontOptionComponent.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/FontOptionComponent.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.ui.config; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/FontOptionComponentTest.java b/drjava/src/edu/rice/cs/drjava/ui/config/FontOptionComponentTest.java index a27f2f2a2..c8e2c57d0 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/FontOptionComponentTest.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/FontOptionComponentTest.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.ui.config; import edu.rice.cs.drjava.DrJava; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/ForcedChoiceOptionComponent.java b/drjava/src/edu/rice/cs/drjava/ui/config/ForcedChoiceOptionComponent.java index 20dcd76a1..4ded478bd 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/ForcedChoiceOptionComponent.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/ForcedChoiceOptionComponent.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.ui.config; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/ForcedChoiceOptionComponentTest.java b/drjava/src/edu/rice/cs/drjava/ui/config/ForcedChoiceOptionComponentTest.java index 7645a95c6..0b156ff16 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/ForcedChoiceOptionComponentTest.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/ForcedChoiceOptionComponentTest.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.ui.config; import edu.rice.cs.drjava.DrJava; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/IntegerOptionComponent.java b/drjava/src/edu/rice/cs/drjava/ui/config/IntegerOptionComponent.java index 901f70d88..09ce35ce2 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/IntegerOptionComponent.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/IntegerOptionComponent.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.ui.config; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/IntegerOptionComponentTest.java b/drjava/src/edu/rice/cs/drjava/ui/config/IntegerOptionComponentTest.java index e7fe72e9b..372113e9e 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/IntegerOptionComponentTest.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/IntegerOptionComponentTest.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.ui.config; import edu.rice.cs.drjava.DrJava; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/KeyStrokeOptionComponent.java b/drjava/src/edu/rice/cs/drjava/ui/config/KeyStrokeOptionComponent.java index 3a1999762..194ea4da6 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/KeyStrokeOptionComponent.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/KeyStrokeOptionComponent.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.ui.config; import edu.rice.cs.drjava.config.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/KeyStrokeOptionComponentTest.java b/drjava/src/edu/rice/cs/drjava/ui/config/KeyStrokeOptionComponentTest.java index 117566927..ade1bd6cb 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/KeyStrokeOptionComponentTest.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/KeyStrokeOptionComponentTest.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.ui.config; import edu.rice.cs.drjava.DrJava; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/LabelComponent.java b/drjava/src/edu/rice/cs/drjava/ui/config/LabelComponent.java index 8c82e81c7..c2a176cc2 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/LabelComponent.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/LabelComponent.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.ui.config; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/OptionComponent.java b/drjava/src/edu/rice/cs/drjava/ui/config/OptionComponent.java index e10dd1335..02ce0db9e 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/OptionComponent.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/OptionComponent.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.ui.config; import javax.swing.*; @@ -173,13 +165,9 @@ public static interface ChangeListener extends Lambda { } /** Notify all change listeners of a change. Notification performed in the event thread. */ protected void notifyChangeListeners() { assert _parent.duringInit() || Utilities.TEST_MODE || EventQueue.isDispatchThread(); -// Utilities.invokeLater(new Runnable() { -// public void run() { - // Make a copy of _changeListeners to prevent potential ConcurrentModificationException - ChangeListener[] listeners = _changeListeners.toArray(new ChangeListener[_changeListeners.size()]); + // Make a copy of _changeListeners to prevent potential ConcurrentModificationException + ChangeListener[] listeners = _changeListeners.toArray(new ChangeListener[_changeListeners.size()]); for (ChangeListener l: listeners) l.value(OptionComponent.this); -// } -// }); } /** List of change listeners. A volatile Vector is used here because a race involving operations on this field was diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/StringOptionComponent.java b/drjava/src/edu/rice/cs/drjava/ui/config/StringOptionComponent.java index 44aa05291..932b43759 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/StringOptionComponent.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/StringOptionComponent.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.ui.config; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/VectorAbsRelFileOptionComponent.java b/drjava/src/edu/rice/cs/drjava/ui/config/VectorAbsRelFileOptionComponent.java index f6d3781a8..fb7006f4d 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/VectorAbsRelFileOptionComponent.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/VectorAbsRelFileOptionComponent.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.ui.config; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/VectorClassnameOptionComponent.java b/drjava/src/edu/rice/cs/drjava/ui/config/VectorClassnameOptionComponent.java index 0b87e0cc9..c781b4150 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/VectorClassnameOptionComponent.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/VectorClassnameOptionComponent.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.ui.config; import java.awt.event.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/VectorFileOptionComponent.java b/drjava/src/edu/rice/cs/drjava/ui/config/VectorFileOptionComponent.java index 6302d34a8..c307d4a6a 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/VectorFileOptionComponent.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/VectorFileOptionComponent.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.ui.config; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/VectorFileOptionComponentTest.java b/drjava/src/edu/rice/cs/drjava/ui/config/VectorFileOptionComponentTest.java index c54738054..d33f24ed6 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/VectorFileOptionComponentTest.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/VectorFileOptionComponentTest.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.ui.config; import edu.rice.cs.drjava.DrJava; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/VectorKeyStrokeOptionComponent.java b/drjava/src/edu/rice/cs/drjava/ui/config/VectorKeyStrokeOptionComponent.java index dd1b0e413..40d44daa4 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/VectorKeyStrokeOptionComponent.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/VectorKeyStrokeOptionComponent.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.ui.config; import java.awt.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/VectorKeyStrokeOptionComponentTest.java b/drjava/src/edu/rice/cs/drjava/ui/config/VectorKeyStrokeOptionComponentTest.java index a95f0d4fc..8a41f70a9 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/VectorKeyStrokeOptionComponentTest.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/VectorKeyStrokeOptionComponentTest.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.ui.config; import edu.rice.cs.drjava.DrJava; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/VectorOptionComponent.java b/drjava/src/edu/rice/cs/drjava/ui/config/VectorOptionComponent.java index 11451cbf2..c41821217 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/VectorOptionComponent.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/VectorOptionComponent.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.ui.config; import edu.rice.cs.drjava.config.*; diff --git a/drjava/src/edu/rice/cs/drjava/ui/config/VectorStringOptionComponent.java b/drjava/src/edu/rice/cs/drjava/ui/config/VectorStringOptionComponent.java index 5c60644f3..7f3d1aabf 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/config/VectorStringOptionComponent.java +++ b/drjava/src/edu/rice/cs/drjava/ui/config/VectorStringOptionComponent.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.ui.config; diff --git a/drjava/src/edu/rice/cs/drjava/ui/coverage/CoverageFrame.java b/drjava/src/edu/rice/cs/drjava/ui/coverage/CoverageFrame.java index 08dc8da95..4f4744582 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/coverage/CoverageFrame.java +++ b/drjava/src/edu/rice/cs/drjava/ui/coverage/CoverageFrame.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 @@ -168,7 +168,7 @@ public void actionPerformed(ActionEvent e) { public void displayReport(JUnitResultTuple result) { /* Only display the result if testing was successful */ - //if (result.getRetval()) { + //if (result.getRetVal()) { if (_openHTMLBrowser.isSelected()) { String indexURL = _outputDirSelector.getFileFromField().getPath() + "/index.html"; diff --git a/drjava/src/edu/rice/cs/drjava/ui/predictive/PredictiveInputFrame.java b/drjava/src/edu/rice/cs/drjava/ui/predictive/PredictiveInputFrame.java index 558f3a767..fecfff1f0 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/predictive/PredictiveInputFrame.java +++ b/drjava/src/edu/rice/cs/drjava/ui/predictive/PredictiveInputFrame.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.ui.predictive; import javax.swing.*; @@ -241,7 +233,7 @@ public PredictiveInputFrame(SwingFrame owner, String title, boolean force, boole * @param cancelIndex cancel index * @param items varargs/array of items */ - @SafeVarargs + @SuppressWarnings({"unchecked", "varargs"}) // @SafeVarargs does not work here public PredictiveInputFrame(SwingFrame owner, String title, boolean force, boolean ignoreCase, InfoSupplier info, List> strategies, java.util.List> actions, int cancelIndex, T... items) { @@ -349,7 +341,7 @@ public void setCurrentItem(T item) { * @param ignoreCase true if case should be ignored * @param items varargs/array of items */ - @SafeVarargs + @SuppressWarnings({"unchecked", "varargs"}) // @SafeVarargs does not work here public final void setItems(boolean ignoreCase, T... items) { // Utilities.show("matching items in PIM set to: " + items); _pim = new PredictiveInputModel(ignoreCase, _currentStrategy, items); diff --git a/drjava/src/edu/rice/cs/drjava/ui/predictive/PredictiveInputModel.java b/drjava/src/edu/rice/cs/drjava/ui/predictive/PredictiveInputModel.java index adfb6ddad..1e35223af 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/predictive/PredictiveInputModel.java +++ b/drjava/src/edu/rice/cs/drjava/ui/predictive/PredictiveInputModel.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.ui.predictive; import java.util.Collection; diff --git a/drjava/src/edu/rice/cs/drjava/ui/predictive/PredictiveInputModelTest.java b/drjava/src/edu/rice/cs/drjava/ui/predictive/PredictiveInputModelTest.java index a8749d3f9..abb57a1bb 100644 --- a/drjava/src/edu/rice/cs/drjava/ui/predictive/PredictiveInputModelTest.java +++ b/drjava/src/edu/rice/cs/drjava/ui/predictive/PredictiveInputModelTest.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.ui.predictive; import edu.rice.cs.drjava.DrJavaTestCase; diff --git a/drjava/src/edu/rice/cs/util/AbsRelFile.java b/drjava/src/edu/rice/cs/util/AbsRelFile.java index 53b65f707..171896b73 100644 --- a/drjava/src/edu/rice/cs/util/AbsRelFile.java +++ b/drjava/src/edu/rice/cs/util/AbsRelFile.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.util; import java.io.*; diff --git a/drjava/src/edu/rice/cs/util/ArgumentTokenizer.java b/drjava/src/edu/rice/cs/util/ArgumentTokenizer.java index 097904c8e..d9ee01238 100644 --- a/drjava/src/edu/rice/cs/util/ArgumentTokenizer.java +++ b/drjava/src/edu/rice/cs/util/ArgumentTokenizer.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.util; import java.util.List; diff --git a/drjava/src/edu/rice/cs/util/ArgumentTokenizerTest.java b/drjava/src/edu/rice/cs/util/ArgumentTokenizerTest.java index a923c9670..d48ea7974 100644 --- a/drjava/src/edu/rice/cs/util/ArgumentTokenizerTest.java +++ b/drjava/src/edu/rice/cs/util/ArgumentTokenizerTest.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.util; import edu.rice.cs.drjava.DrJavaTestCase; diff --git a/drjava/src/edu/rice/cs/util/BalancingStreamTokenizer.java b/drjava/src/edu/rice/cs/util/BalancingStreamTokenizer.java index f4da344c4..f053a3cfa 100644 --- a/drjava/src/edu/rice/cs/util/BalancingStreamTokenizer.java +++ b/drjava/src/edu/rice/cs/util/BalancingStreamTokenizer.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.util; import java.io.Reader; diff --git a/drjava/src/edu/rice/cs/util/BalancingStreamTokenizerTest.java b/drjava/src/edu/rice/cs/util/BalancingStreamTokenizerTest.java index 9c4cdbed3..40bfdda68 100644 --- a/drjava/src/edu/rice/cs/util/BalancingStreamTokenizerTest.java +++ b/drjava/src/edu/rice/cs/util/BalancingStreamTokenizerTest.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.util; import junit.framework.TestCase; @@ -677,7 +669,7 @@ public void testAddQuotesRepeat() { public void testAddNewQuotes() throws IOException{ BalancingStreamTokenizer tok = make("abc ${def ghi 'abc#} 123\n456 ${abc def \"xxx '111# yyy\"} 789"); tok.defaultThreeQuoteDollarCurlySetup(); - try{ + try { tok.addQuotes("'","#"); } catch (Exception e) { } diff --git a/drjava/src/edu/rice/cs/util/DirectorySelector.java b/drjava/src/edu/rice/cs/util/DirectorySelector.java index 5fc59b415..cedb4042c 100644 --- a/drjava/src/edu/rice/cs/util/DirectorySelector.java +++ b/drjava/src/edu/rice/cs/util/DirectorySelector.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.util; import java.io.File; diff --git a/drjava/src/edu/rice/cs/util/FileOpenSelector.java b/drjava/src/edu/rice/cs/util/FileOpenSelector.java index b8d0b5554..3a29672e7 100644 --- a/drjava/src/edu/rice/cs/util/FileOpenSelector.java +++ b/drjava/src/edu/rice/cs/util/FileOpenSelector.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.util; import java.io.File; diff --git a/drjava/src/edu/rice/cs/util/FileOps.java b/drjava/src/edu/rice/cs/util/FileOps.java index d18e2deed..e22411751 100644 --- a/drjava/src/edu/rice/cs/util/FileOps.java +++ b/drjava/src/edu/rice/cs/util/FileOps.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.util; import java.io.*; @@ -459,7 +451,7 @@ public static String readFileAsSwingText(final File file) throws IOException { } finally { if (reader != null) reader.close(); } } - + /** Copies the text of one file into another. * @param source the file to be copied * @param dest the file to be copied to @@ -724,39 +716,28 @@ public static void saveFile(FileSaver fileSaver) throws IOException { if (makeBackup) { backup = fileSaver.getBackupFile(); if (! renameFile(file, backup)) { - throw new IOException("Save failed. Could not create backup file " - + backup.getAbsolutePath() + + throw new IOException("Save failed. Could not create backup file " + backup.getAbsolutePath() + "\nIt may be possible to save by disabling file backups\n"); } -// System.err.println("saveFile renamed " + file + " as " + backup); + _log.log("saveFile renamed " + file + " as " + backup); fileSaver.backupDone(); // Why? This action may have to be reversed if writing new file fails! // System.err.println("Contents: '" + IOUtil.toString(backup) + "'"); } -// ScrollableDialog sd2 = new ScrollableDialog(null, "backup done in FileOps.saveFile", "", ""); -// sd2.show(); - - // Create a temp file in the same directory as the file to be saved. - // From this point forward, enclose in try...finally so that we can clean - // up the temp file and restore the file from its backup. + /* Create a temp file in the same directory as the file to be saved. From this point forward, enclose in + * try ... finally ... construction so that we can clean up the temp file and restore the file from its backup. */ File parent = file.getParentFile(); File tempFile = File.createTempFile("drjava", ".temp", parent); -// System.err.println("tempfileName = " + tempFile + " for backup file " + backup); - -// ScrollableDialog sd3 = new ScrollableDialog(null, "temp file " + tempFile + "created in FileOps.saveFile", "", ""); -// sd3.show(); + _log.log("tempfileName = " + tempFile + " for backup file " + backup); try { - /* Now, write your output to the temp file, then rename it to the correct - name. This way, if writing fails in the middle, the old file is not - lost. */ + /* Now, write your output to the temp file, then rename it to the correct name. This way, if writing fails in the + * middle, the old file is not lost. */ FileOutputStream fos; try { - /* The next line will fail if we can't create the temp file. This may mean that - * the user does not have write permission on the directory the file they - * are editing is in. We may want to go ahead and try writing directly - * to the target file in this case - */ + /* The next line will fail if we can't create the temp file. This may mean that the user does not have write + * permission on the directory the file they are editing is in. We may want to go ahead and try writing directly + * to the target file in this case. */ fos = new FileOutputStream(tempFile); } catch (FileNotFoundException fnfe) { @@ -768,8 +749,8 @@ public static void saveFile(FileSaver fileSaver) throws IOException { } BufferedOutputStream bos = new BufferedOutputStream(fos); fileSaver.saveTo(bos); -// System.err.println(bos + " written"); -// System.err.println("Closing " + bos + " and " + fos); + _log.log(bos + " written"); + _log.log("Closing " + bos + " and " + fos); bos.close(); // fos.close(); @@ -850,17 +831,17 @@ public interface FileSaver { */ public abstract static class DefaultFileSaver implements FileSaver { - private File outputFile = FileOps.NULL_FILE; - private static Set filesNotNeedingBackup = new HashSet(); - private boolean backupsEnabled = DrJava.getConfig().getSetting(BACKUP_FILES); // uses the config default + private volatile File outputFile = FileOps.NULL_FILE; + private static volatile Set filesNotNeedingBackup = new HashSet(); + private volatile boolean backupsEnabled = DrJava.getConfig().getSetting(BACKUP_FILES); // uses the config default /** This field keeps track of whether or not outputFile has been resolved to its canonical name. */ - private boolean isCanonical = false; + private volatile boolean isCanonical = false; ///** Globally enables backups for any DefaultFileSaver that does not override the shouldBackup method. */ // public static void setBackupsEnabled(boolean isEnabled) { backupsEnabled = isEnabled; } - public DefaultFileSaver(File file){ outputFile = file.getAbsoluteFile(); } + public DefaultFileSaver(File file) { outputFile = file.getAbsoluteFile(); } public boolean continueWhenTempFileCreationFails() { return true; } @@ -1330,4 +1311,8 @@ public static File getDrJavaApplicationFile() { } return found.getAbsoluteFile(); } + + public static String classNameToClassFilename(String className) { + return className.replace('.', '/') + ".class"; + } } diff --git a/drjava/src/edu/rice/cs/util/FileOpsTest.java b/drjava/src/edu/rice/cs/util/FileOpsTest.java index 84fcbaba9..e25da3002 100644 --- a/drjava/src/edu/rice/cs/util/FileOpsTest.java +++ b/drjava/src/edu/rice/cs/util/FileOpsTest.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.util; import java.io.*; diff --git a/drjava/src/edu/rice/cs/util/GeneralProcessCreator.java b/drjava/src/edu/rice/cs/util/GeneralProcessCreator.java index 4d9e812aa..ba022a585 100644 --- a/drjava/src/edu/rice/cs/util/GeneralProcessCreator.java +++ b/drjava/src/edu/rice/cs/util/GeneralProcessCreator.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.util; import edu.rice.cs.drjava.config.PropertyMaps; diff --git a/drjava/src/edu/rice/cs/util/InputStreamRedirector.java b/drjava/src/edu/rice/cs/util/InputStreamRedirector.java index 4c782c318..26a78a04d 100644 --- a/drjava/src/edu/rice/cs/util/InputStreamRedirector.java +++ b/drjava/src/edu/rice/cs/util/InputStreamRedirector.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.util; import java.io.*; diff --git a/drjava/src/edu/rice/cs/util/IterableOps.java b/drjava/src/edu/rice/cs/util/IterableOps.java new file mode 100644 index 000000000..c1b68d7e5 --- /dev/null +++ b/drjava/src/edu/rice/cs/util/IterableOps.java @@ -0,0 +1,59 @@ +/* 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. + * + * END_COPYRIGHT_BLOCK */ + +package edu.rice.cs.util; + +import java.lang.reflect.Array; +import java.util.ArrayList; + +/** A class to provide some convenient Iterable operations as static methods. + * It's abstract to prevent (useless) instantiation, though it can be subclassed + * to provide convenient namespace importation of its methods. + */ +public abstract class IterableOps { + + /** Convert an Iterable to an array. + * + * @param iter Iterable object to be converted. + * @param Parameterized type of the iterable. + * @return the array NOTE: at compile time the type of the array is Object[]; can cause ClassCastException. + */ + @SuppressWarnings({"unchecked","rawtypes"}) + public static T[] toArray(Iterable iter, Class elemType) { + ArrayList al = (ArrayList) new ArrayList(); + + for (T elem : iter) { + al.add(elem); + } + + int size = al.size(); + T[] array = (T[]) Array.newInstance(elemType, size); + return al.toArray(array); + } +} \ No newline at end of file diff --git a/drjava/src/edu/rice/cs/util/JoinInputStream.java b/drjava/src/edu/rice/cs/util/JoinInputStream.java index c58c479af..ffaa765c4 100644 --- a/drjava/src/edu/rice/cs/util/JoinInputStream.java +++ b/drjava/src/edu/rice/cs/util/JoinInputStream.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*/ - // based on: //-< JoinInputStream.java >------------------------------------------*--------* // JSYNC Version 1.04 (c) 1998 GARRET * ? * diff --git a/drjava/src/edu/rice/cs/util/Log.java b/drjava/src/edu/rice/cs/util/Log.java index 316cf0cf3..14b9736de 100644 --- a/drjava/src/edu/rice/cs/util/Log.java +++ b/drjava/src/edu/rice/cs/util/Log.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.util; import java.io.*; @@ -87,7 +79,7 @@ protected void _init() { try { FileWriter w = new FileWriter(_file.getAbsolutePath(), true); _writer = new PrintWriter(w); - log("Log '" + _name + "' opened: " + DATE_FORMAT.format(new Date())); + log("Log '" + _name + "' opened: " + DATE_FORMAT.format(new Date()) + " with name " + _file.getAbsolutePath()); } catch (IOException ioe) { throw new RuntimeException("Could not create log: " + ioe); diff --git a/drjava/src/edu/rice/cs/util/LogTest.java b/drjava/src/edu/rice/cs/util/LogTest.java index e2504ed6e..efd62060d 100644 --- a/drjava/src/edu/rice/cs/util/LogTest.java +++ b/drjava/src/edu/rice/cs/util/LogTest.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.util; import java.io.FileReader; diff --git a/drjava/src/edu/rice/cs/util/MD5ChecksumProperties.java b/drjava/src/edu/rice/cs/util/MD5ChecksumProperties.java index c6b113e05..9e957deb3 100644 --- a/drjava/src/edu/rice/cs/util/MD5ChecksumProperties.java +++ b/drjava/src/edu/rice/cs/util/MD5ChecksumProperties.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.util; import java.io.*; @@ -98,7 +90,7 @@ public static byte[] getMD5(InputStream is) throws IOException { public static String getMD5String(InputStream is, OutputStream os) throws IOException { byte[] messageDigest = getMD5(is,os); StringBuilder hexString = new StringBuilder(); - for (int i=0;i". They can + /* The following two methods hide the fact that the name field of this file has the form "*NullFile". They can * be commented out for debugging purposes. */ public String toString() { return "(Untitled)"; } public String getName() { return "(Untitled)"; } diff --git a/drjava/src/edu/rice/cs/util/OperationCanceledException.java b/drjava/src/edu/rice/cs/util/OperationCanceledException.java index c3502c609..6b3ca1dac 100644 --- a/drjava/src/edu/rice/cs/util/OperationCanceledException.java +++ b/drjava/src/edu/rice/cs/util/OperationCanceledException.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.util; /** * Indicates that a GUI operation has been canceled, e.g., choosing diff --git a/drjava/src/edu/rice/cs/util/OutputStreamRedirector.java b/drjava/src/edu/rice/cs/util/OutputStreamRedirector.java index c4248ee0f..346d6d80f 100644 --- a/drjava/src/edu/rice/cs/util/OutputStreamRedirector.java +++ b/drjava/src/edu/rice/cs/util/OutputStreamRedirector.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.util; import java.io.*; diff --git a/drjava/src/edu/rice/cs/util/ProcessChain.java b/drjava/src/edu/rice/cs/util/ProcessChain.java index 050493e8c..bc7dc3df9 100644 --- a/drjava/src/edu/rice/cs/util/ProcessChain.java +++ b/drjava/src/edu/rice/cs/util/ProcessChain.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.util; import java.io.*; diff --git a/drjava/src/edu/rice/cs/util/ProcessCreator.java b/drjava/src/edu/rice/cs/util/ProcessCreator.java index b00b9e6e9..bd22c5c55 100644 --- a/drjava/src/edu/rice/cs/util/ProcessCreator.java +++ b/drjava/src/edu/rice/cs/util/ProcessCreator.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.util; import edu.rice.cs.drjava.config.PropertyMaps; diff --git a/drjava/src/edu/rice/cs/util/ProcessSequence.java b/drjava/src/edu/rice/cs/util/ProcessSequence.java index 50ff2af50..9c05368ca 100644 --- a/drjava/src/edu/rice/cs/util/ProcessSequence.java +++ b/drjava/src/edu/rice/cs/util/ProcessSequence.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.util; import java.io.*; diff --git a/drjava/src/edu/rice/cs/util/ReaderWriterLock.java b/drjava/src/edu/rice/cs/util/ReaderWriterLock.java index 3931ecc6c..82ff12bdc 100644 --- a/drjava/src/edu/rice/cs/util/ReaderWriterLock.java +++ b/drjava/src/edu/rice/cs/util/ReaderWriterLock.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.util; import java.util.LinkedList; diff --git a/drjava/src/edu/rice/cs/util/ReaderWriterLockTest.java b/drjava/src/edu/rice/cs/util/ReaderWriterLockTest.java index 1fb3cbf9b..d6a2bac46 100644 --- a/drjava/src/edu/rice/cs/util/ReaderWriterLockTest.java +++ b/drjava/src/edu/rice/cs/util/ReaderWriterLockTest.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.util; import edu.rice.cs.drjava.DrJavaTestCase; @@ -41,7 +33,8 @@ /** Attempts to test the correctness of the ReaderWriterLock class, which allows multiple reader and writer threads to * safely access a shared resource. (Multiple readers can be active at a time, but only one writer can be active, * during which time no readers can be active.) This can be difficult to test because there is little control over - * how the threads are actually scheduled. + * how the threads are actually scheduled. Extends DrJavaTestCase because all JUnit assertXXX calls are executed in + * the main test thread. * @version $Id$ */ public class ReaderWriterLockTest extends DrJavaTestCase { diff --git a/drjava/src/edu/rice/cs/util/RunnableEST.java b/drjava/src/edu/rice/cs/util/RunnableEST.java index 3288e60b1..3673cc0e3 100644 --- a/drjava/src/edu/rice/cs/util/RunnableEST.java +++ b/drjava/src/edu/rice/cs/util/RunnableEST.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.util; /** Runnable with extended stack trace. Catches all thrown exceptions and rethrows them diff --git a/drjava/src/edu/rice/cs/util/StreamRedirectException.java b/drjava/src/edu/rice/cs/util/StreamRedirectException.java index e4eea402e..88b762d31 100644 --- a/drjava/src/edu/rice/cs/util/StreamRedirectException.java +++ b/drjava/src/edu/rice/cs/util/StreamRedirectException.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.util; /** An exception that occurs while redirecting an output stream into an input stream. */ diff --git a/drjava/src/edu/rice/cs/util/StreamRedirectThread.java b/drjava/src/edu/rice/cs/util/StreamRedirectThread.java index 6d199d93b..0ef727cc6 100644 --- a/drjava/src/edu/rice/cs/util/StreamRedirectThread.java +++ b/drjava/src/edu/rice/cs/util/StreamRedirectThread.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.util; import java.io.*; diff --git a/drjava/src/edu/rice/cs/util/StreamRedirectorTest.java b/drjava/src/edu/rice/cs/util/StreamRedirectorTest.java index 2d863ffbd..71b1f9adf 100644 --- a/drjava/src/edu/rice/cs/util/StreamRedirectorTest.java +++ b/drjava/src/edu/rice/cs/util/StreamRedirectorTest.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.util; import edu.rice.cs.drjava.DrJavaTestCase; @@ -78,7 +62,7 @@ import java.io.IOException; import java.io.InputStreamReader; -/** * Test suite over InputStreamRedirector. +/** * Test suite over InputStreamRedirector. Extends DrJavaTestCase */ public class StreamRedirectorTest extends DrJavaTestCase { diff --git a/drjava/src/edu/rice/cs/util/StringOps.java b/drjava/src/edu/rice/cs/util/StringOps.java index 69e19d54c..0d3a2f16f 100644 --- a/drjava/src/edu/rice/cs/util/StringOps.java +++ b/drjava/src/edu/rice/cs/util/StringOps.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.util; import edu.rice.cs.plt.tuple.Pair; diff --git a/drjava/src/edu/rice/cs/util/StringOpsTest.java b/drjava/src/edu/rice/cs/util/StringOpsTest.java index fc3cbd753..9195d6ddc 100644 --- a/drjava/src/edu/rice/cs/util/StringOpsTest.java +++ b/drjava/src/edu/rice/cs/util/StringOpsTest.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.util; import edu.rice.cs.drjava.DrJavaTestCase; diff --git a/drjava/src/edu/rice/cs/util/UnexpectedException.java b/drjava/src/edu/rice/cs/util/UnexpectedException.java index 9bc6b52f3..04a818229 100644 --- a/drjava/src/edu/rice/cs/util/UnexpectedException.java +++ b/drjava/src/edu/rice/cs/util/UnexpectedException.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.util; import java.io.StringWriter; diff --git a/drjava/src/edu/rice/cs/util/XMLConfig.java b/drjava/src/edu/rice/cs/util/XMLConfig.java index ddb4922e4..81c320fa3 100644 --- a/drjava/src/edu/rice/cs/util/XMLConfig.java +++ b/drjava/src/edu/rice/cs/util/XMLConfig.java @@ -1,36 +1,29 @@ /*BEGIN_COPYRIGHT_BLOCK * - * Copyright (c) 2001-2010, JavaPLT group at Rice University (javaplt@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*/ @@ -80,8 +73,7 @@ public class XMLConfig { /** Node where this XMLConfig starts if delegation is used, or null. */ private Node _startNode = null; - /** Creates an empty configuration. - */ + /** Creates an empty configuration. */ public XMLConfig() { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); try { @@ -95,33 +87,31 @@ public XMLConfig() { } /** Creates a configuration from an input stream. - * @param is input stream - */ - public XMLConfig(InputStream is) { - init(new InputSource(is)); - } + * @param is input stream + */ + public XMLConfig(InputStream is) { init(new InputSource(is)); } /** Creates a configuration from a reader. - * @param r reader - */ - public XMLConfig(Reader r) { - init(new InputSource(r)); - } + * @param r reader + */ + public XMLConfig(Reader r) { init(new InputSource(r)); } /** Creates a configuration that is a part of another configuration, starting at the specified node. - * @param parent the configuration that contains this part - * @param node the node in the parent configuration where this part starts - */ + * @param parent the configuration that contains this part + * @param node the node in the parent configuration where this part starts + */ public XMLConfig(XMLConfig parent, Node node) { - if ((parent == null) || (node == null)) { throw new XMLConfigException("Error in ctor: parent or node is null"); } + if ((parent == null) || (node == null)) { + throw new XMLConfigException("Error in constructor: parent or node is null"); + } _parent = parent; _startNode = node; _document = null; } /** Initialize this XML configuration. - * @param is the XML input source - */ + * @param is the XML input source + */ private void init(InputSource is) { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = null; @@ -130,50 +120,37 @@ private void init(InputSource is) { _document = builder.parse(is); // NOTE: not 1.4 compatible -- _document.setXmlStandalone(true); } - catch(Exception e) { - throw new XMLConfigException("Error in ctor", e); - } + catch(Exception e) { throw new XMLConfigException("Error in DocumentBuilder construction", e); } _document.normalize(); } /** Creates a configuration from a file. - * @param f file - */ + * @param f file + */ public XMLConfig(File f) { - try { - init(new InputSource(new FileInputStream(f))); - } - catch(FileNotFoundException e) { - throw new XMLConfigException("Error in ctor", e); - } + try { init(new InputSource(new FileInputStream(f))); } + catch(FileNotFoundException e) { throw new XMLConfigException("Error in XMLConfig construction", e); } } /** Creates a configuration from a file name. - * @param filename file name - */ + * @param filename file name + */ public XMLConfig(String filename) { - try { - init(new InputSource(new FileInputStream(filename))); - } - catch(FileNotFoundException e) { - throw new XMLConfigException("Error in ctor", e); - } + try { init(new InputSource(new FileInputStream(filename))); } + catch(FileNotFoundException e) { throw new XMLConfigException("Error in XMLConfig construction", e); } } public boolean isDelegated() { return (_parent != null); } /** Saves configuration to an output stream - * @param os output stream - */ + * @param os output stream + */ public void save(OutputStream os) { if (isDelegated()) { _parent.save(os); return; } // Prepare the DOM document for writing Source source = new DOMSource(_document); - /* - // Prepare the output file - Result result = new StreamResult(os); - */ + // Write the DOM document to the file try { TransformerFactory tf = TransformerFactory.newInstance(); @@ -181,11 +158,6 @@ public void save(OutputStream os) { Transformer t = tf.newTransformer(); t.setOutputProperty(OutputKeys.INDENT, "yes"); t.transform(source, new StreamResult(new OutputStreamWriter(os, "utf-8"))); - /* - Transformer xformer = TransformerFactory.newInstance().newTransformer(); - xformer.setOutputProperty(OutputKeys.INDENT, "yes"); - xformer.transform(source, result); - */ } catch(TransformerException e) { throw new XMLConfigException("Error in save", e); @@ -196,8 +168,8 @@ public void save(OutputStream os) { } /** Saves configuration to a file. - * @param f file - */ + * @param f file + */ public void save(File f) { if (isDelegated()) { _parent.save(f); return; } FileOutputStream fos = null; @@ -217,8 +189,8 @@ public void save(File f) { } /** Saves configuration to a file specified by a file name. - * @param filename file name - */ + * @param filename file name + */ public void save(String filename) { save(new File(filename)); } @@ -226,9 +198,9 @@ public void save(String filename) { // ----- String ------ /** Returns the value as specified by the DOM path. - * @param path DOM path - * @return value. - */ + * @param path DOM path + * @return value. + */ public String get(String path) { List r = getMultiple(path); if (r.size() != 1) throw new XMLConfigException("Number of results != 1"); @@ -236,215 +208,173 @@ public String get(String path) { } /** Returns the value as specified by the DOM path. - * @param path DOM path - * @param root node where the search should start - * @return value. - */ + * @param path DOM path + * @param root node where the search should start + * @return value. + */ public String get(String path, Node root) { List r = getMultiple(path, root); if (r.size() != 1) throw new XMLConfigException("Number of results != 1"); return r.get(0); } - /** Returns the value as specified by the DOM path, or the default value if the value could not be found. - * @param path DOM path - * @param defaultVal default value in case value is not in DOM - * @return value. - */ + /** Returns the value as specified by the DOM path, or the default value if the value could not be found. + * @param path DOM path + * @param defaultVal default value in case value is not in DOM + * @return value. + */ public String get(String path, String defaultVal) { - try { - return get(path); - } - catch(XMLConfigException e) { - return defaultVal; - } + try { return get(path); } + catch(XMLConfigException e) { return defaultVal; } } /** Returns the value as specified by the DOM path, or the default value if the value could not be found. - * @param path DOM path - * @param root node where the search should start - * @param defaultVal default value in case value is not in DOM - * @return value. - */ + * @param path DOM path + * @param root node where the search should start + * @param defaultVal default value in case value is not in DOM + * @return value. + */ public String get(String path, Node root, String defaultVal) { - try { - return get(path, root); - } - catch(XMLConfigException e) { - return defaultVal; - } + try { return get(path, root); } + catch (XMLConfigException e) { return defaultVal; } } // ----- Integer ------ /** Returns the value as specified by the DOM path. - * @param path DOM path - * @return value. - * @throws IllegalArgumentException if the path is invalid - */ + * @param path DOM path + * @return value. + * @throws IllegalArgumentException if the path is invalid + */ public int getInt(String path) { List r = getMultiple(path); if (r.size() != 1) throw new XMLConfigException("Number of results != 1"); - try { - return Integer.valueOf(r.get(0)); - } + try { return Integer.valueOf(r.get(0)); } catch(NumberFormatException nfe) { throw new IllegalArgumentException("Not an integer value.", nfe); } } /** Returns the value as specified by the DOM path. - * @param path DOM path - * @param root node where the search should start - * @return value. - * @throws IllegalArgumentException if the path is invalid - */ + * @param path DOM path + * @param root node where the search should start + * @return value. + * @throws IllegalArgumentException if the path is invalid + */ public int getInt(String path, Node root) { List r = getMultiple(path, root); if (r.size() != 1) throw new XMLConfigException("Number of results != 1"); - try { - return Integer.valueOf(r.get(0)); - } + try { return Integer.valueOf(r.get(0)); } catch(NumberFormatException nfe) { throw new IllegalArgumentException("Not an integer value.", nfe); } } /** Returns the value as specified by the DOM path, or the default value if the value could not be found. - * @param path DOM path - * @param defaultVal default value in case value is not in DOM - * @return value. - * @throws IllegalArgumentException if the path is invalid - */ + * @param path DOM path + * @param defaultVal default value in case value is not in DOM + * @return value. + * @throws IllegalArgumentException if the path is invalid + */ public int getInt(String path, int defaultVal) { - try { - return getInt(path); - } - catch(XMLConfigException e) { - return defaultVal; - } + try { return getInt(path); } + catch(XMLConfigException e) { return defaultVal; } } /** Returns the value as specified by the DOM path, or the default value if the value could not be found. - * @param path DOM path - * @param root node where the search should start - * @param defaultVal default value in case value is not in DOM - * @return value. - * @throws IllegalArgumentException if the path is invalid - */ + * @param path DOM path + * @param root node where the search should start + * @param defaultVal default value in case value is not in DOM + * @return value. + * @throws IllegalArgumentException if the path is invalid + */ public int getInt(String path, Node root, int defaultVal) { - try { - return getInt(path, root); - } - catch(XMLConfigException e) { - return defaultVal; - } + try { return getInt(path, root); } + catch(XMLConfigException e) { return defaultVal; } } // ----- Boolean ------ /** Returns the value as specified by the DOM path. - * @param path DOM path - * @return value. - * @throws IllegalArgumentException if the path is invalid - */ + * @param path DOM path + * @return value. + * @throws IllegalArgumentException if the path is invalid + */ public boolean getBool(String path) { List r = getMultiple(path); if (r.size() != 1) throw new XMLConfigException("Number of results != 1"); String s = r.get(0).toLowerCase().trim(); - if ((s.equals("true")) || - (s.equals("yes")) || - (s.equals("on"))) return true; - if ((s.equals("false")) || - (s.equals("no")) || - (s.equals("off"))) return false; + if ((s.equals("true")) || (s.equals("yes")) || (s.equals("on"))) return true; + if ((s.equals("false")) || (s.equals("no")) || (s.equals("off"))) return false; throw new IllegalArgumentException("Not a Boolean vlaue."); } /** Returns the value as specified by the DOM path. - * @param path DOM path - * @param root node where the search should start - * @return value. - * @throws IllegalArgumentException if the path is invalid - */ + * @param path DOM path + * @param root node where the search should start + * @return value. + * @throws IllegalArgumentException if the path is invalid + */ public boolean getBool(String path, Node root) { List r = getMultiple(path, root); if (r.size() != 1) throw new XMLConfigException("Number of results != 1"); String s = r.get(0).toLowerCase().trim(); - if ((s.equals("true")) || - (s.equals("yes")) || - (s.equals("on"))) return true; - if ((s.equals("false")) || - (s.equals("no")) || - (s.equals("off"))) return false; + if ((s.equals("true")) || (s.equals("yes")) || (s.equals("on"))) return true; + if ((s.equals("false")) || (s.equals("no")) || (s.equals("off"))) return false; throw new IllegalArgumentException("Not a Boolean vlaue."); - } /** Returns the value as specified by the DOM path, or the default value if the value could not be found. - * @param path DOM path - * @param defaultVal default value in case value is not in DOM - * @return value. - * @throws IllegalArgumentException if the path is invalid - */ + * @param path DOM path + * @param defaultVal default value in case value is not in DOM + * @return value. + * @throws IllegalArgumentException if the path is invalid + */ public boolean getBool(String path, boolean defaultVal) { - try { - return getBool(path); - } - catch(XMLConfigException e) { - return defaultVal; - } + try { return getBool(path); } + catch(XMLConfigException e) { return defaultVal; } } /** Returns the value as specified by the DOM path, or the default value if the value could not be found. - * @param path DOM path - * @param root node where the search should start - * @param defaultVal default value in case value is not in DOM - * @return value. - * @throws IllegalArgumentException if the path is invalid - */ + * @param path DOM path + * @param root node where the search should start + * @param defaultVal default value in case value is not in DOM + * @return value. + * @throws IllegalArgumentException if the path is invalid + */ public boolean getBool(String path, Node root, boolean defaultVal) { - try { - return getBool(path, root); - } - catch(XMLConfigException e) { - return defaultVal; - } + try { return getBool(path, root); } + catch(XMLConfigException e) { return defaultVal; } } // ----- Other ----- /** Returns the value as specified by the DOM path. - * @param path DOM path - * @return list of values. - */ + * @param path DOM path + * @return list of values. + */ public List getMultiple(String path) { if (isDelegated()) { return getMultiple(path, _startNode); } - return getMultiple(path, _document); } /** Returns the value as specified by the DOM path. - * @param path DOM path - * @param root node where the search should start - * @return list of values. - */ + * @param path DOM path + * @param root node where the search should start + * @return list of values. + */ public List getMultiple(String path, Node root) { List accum = getNodes(path, root); List strings = new LinkedList(); for(Node n: accum) { - if (n instanceof Attr) { - strings.add(n.getNodeValue()); - } + if (n instanceof Attr) { strings.add(n.getNodeValue()); } else { Node child; String acc = ""; child = n.getFirstChild(); while(child != null) { - if (child.getNodeName().equals("#text")) { - acc += " " + child.getNodeValue(); - } - else if (child.getNodeName().equals("#comment")) { - // ignore - } + if (child.getNodeName().equals("#text")) { acc += " " + child.getNodeValue(); } + else if (child.getNodeName().equals("#comment")) { /* ignore */ } else { - throw new XMLConfigException("Node " + n.getNodeName() + " contained node " + child.getNodeName() + ", but should only contain #text and #comment."); + String text = "Node " + n.getNodeName() + " contained node " + child.getNodeName() + + ", but should only contain #text and #comment."; + throw new XMLConfigException(text); } child = child.getNextSibling(); } @@ -455,9 +385,9 @@ else if (child.getNodeName().equals("#comment")) { } /** Returns the nodes as specified by the DOM path. - * @param path DOM path - * @return list of nodes. - */ + * @param path DOM path + * @return list of nodes. + */ public List getNodes(String path) { if (isDelegated()) { return getNodes(path, _startNode); } @@ -465,10 +395,10 @@ public List getNodes(String path) { } /** Returns the nodes as specified by the DOM path. - * @param path DOM path - * @param root node where the search should start - * @return list of nodes. - */ + * @param path DOM path + * @param root node where the search should start + * @return list of nodes. + */ public List getNodes(String path, Node root) { List accum = new LinkedList(); getMultipleHelper(path, root, accum, false); @@ -476,23 +406,21 @@ public List getNodes(String path, Node root) { } /** Returns the value as specified by the DOM path. - * @param path DOM path - * @param n node where the search begins - * @param accum accumulator - * @param dotRead whether a dot has been read - */ + * @param path DOM path + * @param n node where the search begins + * @param accum accumulator + * @param dotRead whether a dot has been read + */ private void getMultipleHelper(String path, Node n, List accum, boolean dotRead) { int dotPos = path.indexOf('.'); boolean initialDot = (dotPos == 0); - if ((path.length() > 0) && (dotPos == -1) && (!path.endsWith("/"))) { - path = path + "/"; - } + if ((path.length() > 0) && (dotPos == -1) && (!path.endsWith("/"))) { path = path + "/"; } int slashPos = path.indexOf('/'); - if(dotPos != -1 && path.indexOf('.', dotPos+1) != -1) + if (dotPos != -1 && path.indexOf('.', dotPos+1) != -1) throw new XMLConfigException("An attribute cannot have subparts (foo.bar.fum and foo.bar/fum not allowed)"); - if(dotPos != -1 && path.indexOf('/', dotPos+1) != -1) + if (dotPos != -1 && path.indexOf('/', dotPos+1) != -1) throw new XMLConfigException("An attribute cannot have subparts (foo.bar.fum and foo.bar/fum not allowed)"); if (((slashPos > -1) || (dotPos > -1)) && !dotRead || initialDot) { @@ -519,13 +447,9 @@ private void getMultipleHelper(String path, Node n, List accum, boolean do Node child = n.getFirstChild(); if (nodeName.equals("*")) { while(child != null) { - if (!child.getNodeName().equals("#text") && !child.getNodeName().equals("#comment")) { - if (dotRead) { - getMultipleAddAttributesHelper(path, child, accum); - } - else { - getMultipleHelper(path, child, accum, false); - } + if (! child.getNodeName().equals("#text") && ! child.getNodeName().equals("#comment")) { + if (dotRead) { getMultipleAddAttributesHelper(path, child, accum); } + else { getMultipleHelper(path, child, accum, false); } } child = child.getNextSibling(); } @@ -572,10 +496,10 @@ private void getMultipleAddAttributesHelper(String path, Node n, List accu } /** Set the value of the node or attribute specified by the DOM path. - * @param path DOM path - * @param value node or attribute value - * @return the node that was created, or the parent node of the attribute if it was an attribute - */ + * @param path DOM path + * @param value node or attribute value + * @return the node that was created, or the parent node of the attribute if it was an attribute + */ public Node set(String path, String value) { if (isDelegated()) { return set(path, value, _startNode, true); } @@ -583,50 +507,43 @@ public Node set(String path, String value) { } /** Set the value of the node or attribute specified by the DOM path. - * @param path DOM path - * @param value node or attribute value - * @param overwrite whether to overwrite (true) or add (false) - * @return the node that was created, or the parent node of the attribute if it was an attribute - */ + * @param path DOM path + * @param value node or attribute value + * @param overwrite whether to overwrite (true) or add (false) + * @return the node that was created, or the parent node of the attribute if it was an attribute + */ public Node set(String path, String value, boolean overwrite) { if (isDelegated()) { return set(path, value, _startNode, overwrite); } return set(path, value, _document, overwrite); } - /** Set the value of the node or attribute specified by the DOM path. - * @param path DOM path - * @param value node or attribute value - * @param n node where the search should start - * @param overwrite whether to overwrite (true) or add (false) -- only applies for last node! - * @return the node that was created, or the parent node of the attribute if it was an attribute - */ + * @param path DOM path + * @param value node or attribute value + * @param n node where the search should start + * @param overwrite whether to overwrite (true) or add (false) -- only applies for last node! + * @return the node that was created, or the parent node of the attribute if it was an attribute + */ public Node set(String path, String value, Node n, boolean overwrite) { if (isDelegated()) { return _parent.set(path, value, n, overwrite); } int dotPos = path.lastIndexOf('.'); Node node; - if (dotPos == 0) { - node = n; - } - else { - node = createNode(path, n, overwrite); - } + if (dotPos == 0) { node = n; } + else { node = createNode(path, n, overwrite); } if (dotPos >= 0) { Element e = (Element)node; e.setAttribute(path.substring(dotPos+1),value); } - else { - node.appendChild(_document.createTextNode(value)); - } + else { node.appendChild(_document.createTextNode(value)); } return node; } /** Create the node specified by the DOM path. - * @param path DOM path - * @return the node that was created, or the parent node of the attribute if it was an attribute - */ + * @param path DOM path + * @return the node that was created, or the parent node of the attribute if it was an attribute + */ public Node createNode(String path) { if (isDelegated()) { return createNode(path, _startNode, true); } @@ -634,20 +551,20 @@ public Node createNode(String path) { } /** Create the node specified by the DOM path. - * @param path DOM path - * @param n node where the search should start, or null for the root - * @return the node that was created, or the parent node of the attribute if it was an attribute - */ + * @param path DOM path + * @param n node where the search should start, or null for the root + * @return the node that was created, or the parent node of the attribute if it was an attribute + */ public Node createNode(String path, Node n) { return createNode(path, n, true); } /** Create the node specified by the DOM path. - * @param path DOM path - * @param n node where the search should start, or null for the root - * @param overwrite whether to overwrite (true) or add (false) -- only applies for last node! - * @return the node that was created, or the parent node of the attribute if it was an attribute - */ + * @param path DOM path + * @param n node where the search should start, or null for the root + * @param overwrite whether to overwrite (true) or add (false) -- only applies for last node! + * @return the node that was created, or the parent node of the attribute if it was an attribute + */ public Node createNode(String path, Node n, boolean overwrite) { if (isDelegated()) { return _parent.createNode(path, n, overwrite); } @@ -658,8 +575,7 @@ public Node createNode(String path, Node n, boolean overwrite) { path = path.substring(path.indexOf('/')+1); child = n.getFirstChild(); while(child != null) { - if (child.getNodeName().equals(nodeName)) { - // found + if (child.getNodeName().equals(nodeName)) { // found n = child; break; } @@ -725,16 +641,14 @@ public Node createNode(String path, Node n, boolean overwrite) { } return n; } - else { - return child; - } + else { return child; } } } /** Returns a string representation of the object. - * @return a string representation of the object. - */ + * @return a string representation of the object. + */ public String toString() { ByteArrayOutputStream os = new ByteArrayOutputStream(); save(os); @@ -742,9 +656,9 @@ public String toString() { } /** Return the path of a node as it is used in XMLConfig. - * @param n node - * @return path - */ + * @param n node + * @return path + */ public static String getNodePath(Node n) { if (n == null) { return ""; } String path = ""; @@ -756,23 +670,15 @@ public static String getNodePath(Node n) { return path.substring(0,path.length()-1); } - /** Exception in XMLConfig methods. - */ + /** Exception in XMLConfig methods. */ public static class XMLConfigException extends RuntimeException { - public XMLConfigException() { - super(); - } + /* The following code looks like a repetition of inherited definitions, but constructors aren't inherited! */ + public XMLConfigException() { super(); } - public XMLConfigException(String message) { - super(message); - } + public XMLConfigException(String message) { super(message); } - public XMLConfigException(String message, Throwable cause) { - super(message, cause); - } + public XMLConfigException(String message, Throwable cause) { super(message, cause); } - public XMLConfigException(Throwable cause) { - super(cause); - } + public XMLConfigException(Throwable cause) { super(cause); } } } diff --git a/drjava/src/edu/rice/cs/util/XMLConfigTest.java b/drjava/src/edu/rice/cs/util/XMLConfigTest.java index 8db4ff15e..e5a089a0e 100644 --- a/drjava/src/edu/rice/cs/util/XMLConfigTest.java +++ b/drjava/src/edu/rice/cs/util/XMLConfigTest.java @@ -1,42 +1,35 @@ /*BEGIN_COPYRIGHT_BLOCK * - * Copyright (c) 2001-2010, JavaPLT group at Rice University (javaplt@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.util; -import junit.framework.Assert; +import org.junit.Assert; import junit.framework.TestCase; import org.w3c.dom.*; @@ -890,30 +883,30 @@ public void testGetInt() throws Exception { //Test for getInt(String path) int n = xc.getInt("concutest/name.value"); Assert.assertEquals("Found expected value", 5, n); - try{ + try { xc.getInt("concutest/class.name"); Assert.fail("Should have thrown exception"); } catch(IllegalArgumentException e){ } - try{ + try { xc.getInt("doesNotExitPath/subPath"); Assert.fail("Should have thrown exception"); - }catch(XMLConfig.XMLConfigException e){ } + } catch(XMLConfig.XMLConfigException e){ } //Test for getInt(String path, Node root) n = xc.getInt("name.value", xc.getNodes("concutest").get(0)); Assert.assertEquals("Found expected value", 5, n); - try{ + try { xc.getInt("class.name", xc.getNodes("concutest").get(0)); Assert.fail("Should have thrown exception"); } catch(IllegalArgumentException e){ } - try{ + try { xc.getInt("doesNotExitPath/subPath", xc.getNodes("concutest").get(0)); Assert.fail("Should have thrown exception"); - }catch(XMLConfig.XMLConfigException e){ } + } catch(XMLConfig.XMLConfigException e){ } //Test for getInt(String path, int default) n = xc.getInt("concutest/name.value", 10); @@ -956,20 +949,20 @@ public void testGetNodesExceptions() throws Exception{ + " \n" + "")); - try{ + try { xc.getNodes("somePath.attr.subAttr"); Assert.fail("Shouldn't be able to refer to sub attributes"); - }catch(XMLConfig.XMLConfigException e){ + } catch(XMLConfig.XMLConfigException e){ //Needs to be kept in sync with exception message on ~496:XMLConfig Assert.assertEquals("Didn't get expected exception message", "An attribute cannot have subparts (foo.bar.fum and foo.bar/fum not allowed)", e.getMessage()); } - try{ + try { xc.getNodes("somePath.attr/subAttr"); Assert.fail("Shouldn't be able to refer to a path relative to an attribute"); - }catch(XMLConfig.XMLConfigException e){ + } catch(XMLConfig.XMLConfigException e){ //Needs to be kept in sync with exception message on ~496:XMLConfig Assert.assertEquals("Didn't get expected exception message", "An attribute cannot have subparts (foo.bar.fum and foo.bar/fum not allowed)", @@ -991,7 +984,7 @@ public void testGetBool() throws Exception { Boolean b = xc.getBool("concutest/name.value") && !xc.getBool("concutest/thread.value") && xc.getBool("concutest/node.value") && !xc.getBool("concutest/dot.value"); Assert.assertTrue("Should be true",b); - try{ + try { xc.getBool("concutest/class.name"); Assert.fail("Should have thrown exception"); } @@ -1003,7 +996,7 @@ public void testGetBool() throws Exception { b = xc.getBool("name.value",root) && !xc.getBool("thread.value", root) && xc.getBool("node.value", root) && !xc.getBool("dot.value", root); Assert.assertTrue("Should be true",b); - try{ + try { xc.getBool("class.name", root); Assert.fail("Should have thrown exception"); } @@ -1075,11 +1068,11 @@ public void testSaveAndLoadConstructors() throws Exception{ + " \n" + "")); - try{ + try { char c = File.separatorChar; xc.save(new File("." + c + "does" + c + "not" + c + "exist" + c + "file.xml")); Assert.fail("Should not have succeeded in saving to non-existant path"); - }catch(XMLConfig.XMLConfigException e){ } + } catch(XMLConfig.XMLConfigException e){ } File saveTo = File.createTempFile("drjava_test", "xml"); xc.save(saveTo); @@ -1087,7 +1080,7 @@ public void testSaveAndLoadConstructors() throws Exception{ new XMLConfig(saveTo.getAbsolutePath()); - try{ + try { char c = File.separatorChar; new XMLConfig("." + c + "does" + c + "not" + c + "exist" + c + "file.xml"); Assert.fail("Should not succeed in load from non-existant file"); @@ -1117,13 +1110,13 @@ public void testNullParamsinConstructor() throws Exception{ Node nd = xc.getNodes("concutest").get(0); - try{ + try { new XMLConfig(null, nd); Assert.fail("Should not have been able to make new XMLConfig with null parent"); } catch(XMLConfig.XMLConfigException e){ } - try{ + try { new XMLConfig(xc, null); Assert.fail("Should not have been able to make ne XMLConfig with null node"); } @@ -1149,7 +1142,7 @@ public void testConstructorWithFileName() throws Exception{ File saveTo = File.createTempFile("drjava_test", "xml"); xc.save(saveTo); - try{ + try { new XMLConfig("badfileName"); } catch(XMLConfig.XMLConfigException e){ } diff --git a/drjava/src/edu/rice/cs/util/classloader/ClassFileError.java b/drjava/src/edu/rice/cs/util/classloader/ClassFileError.java index 309f55655..f06458c21 100644 --- a/drjava/src/edu/rice/cs/util/classloader/ClassFileError.java +++ b/drjava/src/edu/rice/cs/util/classloader/ClassFileError.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.util.classloader; + * END_COPYRIGHT_BLOCK*/package edu.rice.cs.util.classloader; public class ClassFileError extends LinkageError { /** Canonical path name for the offending file. */ diff --git a/drjava/src/edu/rice/cs/util/docnavigation/AWTContainerNavigatorFactory.java b/drjava/src/edu/rice/cs/util/docnavigation/AWTContainerNavigatorFactory.java index 0ea2cf348..4deda083d 100644 --- a/drjava/src/edu/rice/cs/util/docnavigation/AWTContainerNavigatorFactory.java +++ b/drjava/src/edu/rice/cs/util/docnavigation/AWTContainerNavigatorFactory.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.util.docnavigation; import edu.rice.cs.plt.tuple.Pair; diff --git a/drjava/src/edu/rice/cs/util/docnavigation/DummyINavigatorItem.java b/drjava/src/edu/rice/cs/util/docnavigation/DummyINavigatorItem.java index 67871fd16..094250875 100644 --- a/drjava/src/edu/rice/cs/util/docnavigation/DummyINavigatorItem.java +++ b/drjava/src/edu/rice/cs/util/docnavigation/DummyINavigatorItem.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.util.docnavigation; class DummyINavigatorItem implements INavigatorItem { diff --git a/drjava/src/edu/rice/cs/util/docnavigation/FileNode.java b/drjava/src/edu/rice/cs/util/docnavigation/FileNode.java index 1ba982ab1..61c281695 100644 --- a/drjava/src/edu/rice/cs/util/docnavigation/FileNode.java +++ b/drjava/src/edu/rice/cs/util/docnavigation/FileNode.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.util.docnavigation; import java.io.*; diff --git a/drjava/src/edu/rice/cs/util/docnavigation/GroupNode.java b/drjava/src/edu/rice/cs/util/docnavigation/GroupNode.java index 7ac97396f..be1c90465 100644 --- a/drjava/src/edu/rice/cs/util/docnavigation/GroupNode.java +++ b/drjava/src/edu/rice/cs/util/docnavigation/GroupNode.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.util.docnavigation; public class GroupNode extends StringNode { diff --git a/drjava/src/edu/rice/cs/util/docnavigation/GroupNotSelectedException.java b/drjava/src/edu/rice/cs/util/docnavigation/GroupNotSelectedException.java index 6471a36f1..169acdd48 100644 --- a/drjava/src/edu/rice/cs/util/docnavigation/GroupNotSelectedException.java +++ b/drjava/src/edu/rice/cs/util/docnavigation/GroupNotSelectedException.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.util.docnavigation; public class GroupNotSelectedException extends Exception{ diff --git a/drjava/src/edu/rice/cs/util/docnavigation/IAWTContainerNavigatorActor.java b/drjava/src/edu/rice/cs/util/docnavigation/IAWTContainerNavigatorActor.java index dce8b0611..46cfaf619 100644 --- a/drjava/src/edu/rice/cs/util/docnavigation/IAWTContainerNavigatorActor.java +++ b/drjava/src/edu/rice/cs/util/docnavigation/IAWTContainerNavigatorActor.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.util.docnavigation; import java.awt.*; diff --git a/drjava/src/edu/rice/cs/util/docnavigation/IDocumentAwareMouseListener.java b/drjava/src/edu/rice/cs/util/docnavigation/IDocumentAwareMouseListener.java index a3e4b440c..74152dae7 100644 --- a/drjava/src/edu/rice/cs/util/docnavigation/IDocumentAwareMouseListener.java +++ b/drjava/src/edu/rice/cs/util/docnavigation/IDocumentAwareMouseListener.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.util.docnavigation; import java.awt.event.*; diff --git a/drjava/src/edu/rice/cs/util/docnavigation/IDocumentNavigator.java b/drjava/src/edu/rice/cs/util/docnavigation/IDocumentNavigator.java index 590a62036..b56b350eb 100644 --- a/drjava/src/edu/rice/cs/util/docnavigation/IDocumentNavigator.java +++ b/drjava/src/edu/rice/cs/util/docnavigation/IDocumentNavigator.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.util.docnavigation; import java.io.File; diff --git a/drjava/src/edu/rice/cs/util/docnavigation/IDocumentNavigatorAlgo.java b/drjava/src/edu/rice/cs/util/docnavigation/IDocumentNavigatorAlgo.java index 8b7582d4c..2ee45d1cf 100644 --- a/drjava/src/edu/rice/cs/util/docnavigation/IDocumentNavigatorAlgo.java +++ b/drjava/src/edu/rice/cs/util/docnavigation/IDocumentNavigatorAlgo.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.util.docnavigation; /** * Visitor interface implemented by anything which wishes to visit an IDocumentNavigator diff --git a/drjava/src/edu/rice/cs/util/docnavigation/IDocumentNavigatorFactory.java b/drjava/src/edu/rice/cs/util/docnavigation/IDocumentNavigatorFactory.java index 71c1c2a37..8ade39679 100644 --- a/drjava/src/edu/rice/cs/util/docnavigation/IDocumentNavigatorFactory.java +++ b/drjava/src/edu/rice/cs/util/docnavigation/IDocumentNavigatorFactory.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.util.docnavigation; import edu.rice.cs.plt.tuple.Pair; import java.util.List; diff --git a/drjava/src/edu/rice/cs/util/docnavigation/INavigationListener.java b/drjava/src/edu/rice/cs/util/docnavigation/INavigationListener.java index 7d4aa8f6e..e4c00eec9 100644 --- a/drjava/src/edu/rice/cs/util/docnavigation/INavigationListener.java +++ b/drjava/src/edu/rice/cs/util/docnavigation/INavigationListener.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.util.docnavigation; /** A listener that runs when a document is selected in the navigator and when a document is deselected. The object diff --git a/drjava/src/edu/rice/cs/util/docnavigation/INavigatorItem.java b/drjava/src/edu/rice/cs/util/docnavigation/INavigatorItem.java index 6bb0387ee..5a1102471 100644 --- a/drjava/src/edu/rice/cs/util/docnavigation/INavigatorItem.java +++ b/drjava/src/edu/rice/cs/util/docnavigation/INavigatorItem.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.util.docnavigation; /** * INavigatorItem models (very abstractly) some entity that is diff --git a/drjava/src/edu/rice/cs/util/docnavigation/INavigatorItemFilter.java b/drjava/src/edu/rice/cs/util/docnavigation/INavigatorItemFilter.java index 88619d7cd..13677e1ca 100644 --- a/drjava/src/edu/rice/cs/util/docnavigation/INavigatorItemFilter.java +++ b/drjava/src/edu/rice/cs/util/docnavigation/INavigatorItemFilter.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.util.docnavigation; abstract public class INavigatorItemFilter { diff --git a/drjava/src/edu/rice/cs/util/docnavigation/InnerNode.java b/drjava/src/edu/rice/cs/util/docnavigation/InnerNode.java index 79a5fc9ae..fce741d41 100644 --- a/drjava/src/edu/rice/cs/util/docnavigation/InnerNode.java +++ b/drjava/src/edu/rice/cs/util/docnavigation/InnerNode.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.util.docnavigation; import javax.swing.tree.*; diff --git a/drjava/src/edu/rice/cs/util/docnavigation/JListNavigator.java b/drjava/src/edu/rice/cs/util/docnavigation/JListNavigator.java index fbc58ad3a..a03b084df 100644 --- a/drjava/src/edu/rice/cs/util/docnavigation/JListNavigator.java +++ b/drjava/src/edu/rice/cs/util/docnavigation/JListNavigator.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.util.docnavigation; import java.io.File; @@ -199,7 +191,7 @@ public ItemT removeDocument(ItemT doc) { synchronized(_model) { // System.err.println("removing from old list " + doc); int i = _model.indexOf(doc); - if( i == -1 ) + if ( i == -1 ) throw new IllegalArgumentException("Document " + doc + " not found in Document Navigator"); ItemT result = getFromModel(i); _model.remove(i); diff --git a/drjava/src/edu/rice/cs/util/docnavigation/JListSortNavigator.java b/drjava/src/edu/rice/cs/util/docnavigation/JListSortNavigator.java index 40e7aba6d..17bbddb3c 100644 --- a/drjava/src/edu/rice/cs/util/docnavigation/JListSortNavigator.java +++ b/drjava/src/edu/rice/cs/util/docnavigation/JListSortNavigator.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.util.docnavigation; import java.awt.dnd.*; diff --git a/drjava/src/edu/rice/cs/util/docnavigation/JListSortNavigatorTest.java b/drjava/src/edu/rice/cs/util/docnavigation/JListSortNavigatorTest.java index ed725dbce..8463bd75d 100644 --- a/drjava/src/edu/rice/cs/util/docnavigation/JListSortNavigatorTest.java +++ b/drjava/src/edu/rice/cs/util/docnavigation/JListSortNavigatorTest.java @@ -1,43 +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.util.docnavigation; -import edu.rice.cs.util.swing.Utilities; import edu.rice.cs.drjava.DrJavaTestCase; +import edu.rice.cs.util.swing.Utilities; import java.util.*; diff --git a/drjava/src/edu/rice/cs/util/docnavigation/JTreeSortNavigator.java b/drjava/src/edu/rice/cs/util/docnavigation/JTreeSortNavigator.java index 2b82480fe..ccca342f3 100644 --- a/drjava/src/edu/rice/cs/util/docnavigation/JTreeSortNavigator.java +++ b/drjava/src/edu/rice/cs/util/docnavigation/JTreeSortNavigator.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.util.docnavigation; import javax.swing.*; @@ -223,7 +215,7 @@ private void addTopLevelGroupToRoot(InnerNode parent) { int i; for (i = 0; i < num; i++) { TreeNode n = (TreeNode)_model.getChild(_model.getRoot(), i); - if(_roots.indexOf(n) > indexInRoots) break; + if (_roots.indexOf(n) > indexInRoots) break; } _model.insertNodeInto(parent, (MutableTreeNode)_model.getRoot(), i); } @@ -249,7 +241,7 @@ private void insertNodeSortedInto(LeafNode child, InnerNode par parentsKid = ((DefaultMutableTreeNode) parent.getChildAt(i)); if (parentsKid instanceof InnerNode) { // do nothing, it's a folder - } else if(parentsKid instanceof LeafNode) { + } else if (parentsKid instanceof LeafNode) { oldName = ((LeafNode)parentsKid).getData().getName(); if ((newName.toUpperCase().compareTo(oldName.toUpperCase()) < 0)) break; } else throw new IllegalStateException("found a node in navigator that is not an InnerNode or LeafNode"); @@ -854,7 +846,7 @@ public boolean isSelectedInGroup(ItemT i) { if (n == _model.getRoot()) return true; while (l.getParent() != _model.getRoot()) { - if(l.getParent() == n) return true; + if (l.getParent() == n) return true; l = l.getParent(); } } diff --git a/drjava/src/edu/rice/cs/util/docnavigation/JTreeSortNavigatorTest.java b/drjava/src/edu/rice/cs/util/docnavigation/JTreeSortNavigatorTest.java index b1343d7bf..ff57edc3b 100644 --- a/drjava/src/edu/rice/cs/util/docnavigation/JTreeSortNavigatorTest.java +++ b/drjava/src/edu/rice/cs/util/docnavigation/JTreeSortNavigatorTest.java @@ -1,41 +1,34 @@ /*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.util.docnavigation; +import edu.rice.cs.drjava.DrJavaTestCase; import edu.rice.cs.util.UnexpectedException; import edu.rice.cs.util.swing.Utilities; import edu.rice.cs.drjava.DrJavaTestCase; diff --git a/drjava/src/edu/rice/cs/util/docnavigation/LeafNode.java b/drjava/src/edu/rice/cs/util/docnavigation/LeafNode.java index dcda98f6c..071d95004 100644 --- a/drjava/src/edu/rice/cs/util/docnavigation/LeafNode.java +++ b/drjava/src/edu/rice/cs/util/docnavigation/LeafNode.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.util.docnavigation; import javax.swing.tree.*; diff --git a/drjava/src/edu/rice/cs/util/docnavigation/NodeData.java b/drjava/src/edu/rice/cs/util/docnavigation/NodeData.java index cf07cc574..83f4858e4 100644 --- a/drjava/src/edu/rice/cs/util/docnavigation/NodeData.java +++ b/drjava/src/edu/rice/cs/util/docnavigation/NodeData.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.util.docnavigation; /** Since the various nodes hold different types of data, this type extends TreeNodes to support diff --git a/drjava/src/edu/rice/cs/util/docnavigation/NodeDataVisitor.java b/drjava/src/edu/rice/cs/util/docnavigation/NodeDataVisitor.java index e653d6298..4bb04a462 100644 --- a/drjava/src/edu/rice/cs/util/docnavigation/NodeDataVisitor.java +++ b/drjava/src/edu/rice/cs/util/docnavigation/NodeDataVisitor.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.util.docnavigation; import java.io.File; diff --git a/drjava/src/edu/rice/cs/util/docnavigation/RootNode.java b/drjava/src/edu/rice/cs/util/docnavigation/RootNode.java index 92af72423..0a2c14ad5 100644 --- a/drjava/src/edu/rice/cs/util/docnavigation/RootNode.java +++ b/drjava/src/edu/rice/cs/util/docnavigation/RootNode.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.util.docnavigation; import javax.swing.tree.*; diff --git a/drjava/src/edu/rice/cs/util/docnavigation/StringNode.java b/drjava/src/edu/rice/cs/util/docnavigation/StringNode.java index cd2e64ae8..d5e1e25a1 100644 --- a/drjava/src/edu/rice/cs/util/docnavigation/StringNode.java +++ b/drjava/src/edu/rice/cs/util/docnavigation/StringNode.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.util.docnavigation; class StringNode extends InnerNode{ diff --git a/drjava/src/edu/rice/cs/util/jar/JarBuilder.java b/drjava/src/edu/rice/cs/util/jar/JarBuilder.java index 29ca8b99a..a0cccc9ce 100644 --- a/drjava/src/edu/rice/cs/util/jar/JarBuilder.java +++ b/drjava/src/edu/rice/cs/util/jar/JarBuilder.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.util.jar; import java.io.*; @@ -44,7 +36,7 @@ public class JarBuilder { private JarOutputStream _output; - /** Creates a file file without a manifest + /** Creates a jar file without a manifest * * @param file the file to write the jar to * @throws IOException thrown if the file cannot be opened for writing @@ -86,7 +78,7 @@ public JarBuilder(File jar, Manifest manifest) { */ private String makeName(String parent, String name) { String sep = "/"; // NOTE: This can be a '/' since it is a path in the jar file itself - if( parent.equals("") ) + if ( parent.equals("") ) return name; if (parent.endsWith(sep)) return parent + name; @@ -149,10 +141,10 @@ private boolean addDirectoryRecursiveHelper(File dir, String parent, byte[] buff File[] files = dir.listFiles(filter); BufferedInputStream origin = null; - if( files == null ) // listFiles may return null if there's an IO error + if ( files == null ) // listFiles may return null if there's an IO error return true; for (int i = 0; i < files.length; i++) { - if( files[i].isFile() ) { + if ( files[i].isFile() ) { origin = new BufferedInputStream(new FileInputStream(files[i]), 2048); JarEntry entry = new JarEntry(makeName(parent, files[i].getName())); @@ -164,7 +156,7 @@ private boolean addDirectoryRecursiveHelper(File dir, String parent, byte[] buff } origin.close(); } - else if( files[i].isDirectory() ) { + else if ( files[i].isDirectory() ) { addDirectoryRecursiveHelper(files[i], makeName(parent, files[i].getName()),buffer,filter); } } diff --git a/drjava/src/edu/rice/cs/util/jar/JarCreationTest.java b/drjava/src/edu/rice/cs/util/jar/JarCreationTest.java index cfe24e623..b98e9d86d 100644 --- a/drjava/src/edu/rice/cs/util/jar/JarCreationTest.java +++ b/drjava/src/edu/rice/cs/util/jar/JarCreationTest.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.util.jar; import edu.rice.cs.drjava.DrJavaTestCase; @@ -241,7 +233,7 @@ private void testArchive(File jar, Set fileNames) { catch (IOException e) { fail("couldn't open file"); } finally { - if( jarStream != null) + if ( jarStream != null) try { jarStream.close(); } diff --git a/drjava/src/edu/rice/cs/util/jar/ManifestWriter.java b/drjava/src/edu/rice/cs/util/jar/ManifestWriter.java index 8ed421677..1736e0dce 100644 --- a/drjava/src/edu/rice/cs/util/jar/ManifestWriter.java +++ b/drjava/src/edu/rice/cs/util/jar/ManifestWriter.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.util.jar; import edu.rice.cs.util.StringOps; @@ -88,7 +80,7 @@ protected InputStream getInputStream() { final StringBuilder sbuf = new StringBuilder(); sbuf.append(Attributes.Name.MANIFEST_VERSION.toString()); sbuf.append(": 1.0" + StringOps.EOL); - if( !_classPaths.isEmpty() ) { + if ( !_classPaths.isEmpty() ) { Iterator iter = _classPaths.iterator(); sbuf.append(Attributes.Name.CLASS_PATH.toString()); sbuf.append(":"); @@ -98,17 +90,17 @@ protected InputStream getInputStream() { } sbuf.append(StringOps.EOL); } - if( _mainClass != null ) { + if ( _mainClass != null ) { sbuf.append(Attributes.Name.MAIN_CLASS.toString()); sbuf.append(": "); sbuf.append(_mainClass); sbuf.append(StringOps.EOL); } - if(_rawManifest != null) { + if (_rawManifest != null) { sbuf.append(_rawManifest); - if(!_rawManifest.endsWith(StringOps.EOL)) + if (!_rawManifest.endsWith(StringOps.EOL)) sbuf.append(StringOps.EOL); } diff --git a/drjava/src/edu/rice/cs/util/newjvm/AbstractMasterJVM.java b/drjava/src/edu/rice/cs/util/newjvm/AbstractMasterJVM.java index fad9c1f02..4871f65ae 100644 --- a/drjava/src/edu/rice/cs/util/newjvm/AbstractMasterJVM.java +++ b/drjava/src/edu/rice/cs/util/newjvm/AbstractMasterJVM.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.util.newjvm; import java.rmi.NoSuchObjectException; @@ -42,6 +34,7 @@ import java.io.Serializable; import java.util.Map; +import edu.rice.cs.util.Log; import edu.rice.cs.util.UnexpectedException; import edu.rice.cs.plt.collect.CollectUtil; import edu.rice.cs.plt.concurrent.ConcurrentUtil; @@ -70,6 +63,9 @@ */ public abstract class AbstractMasterJVM implements MasterRemote { + /** Debugging log. */ + public static final Log _log = new Log("GlobalModel.txt", false); + /** Synchronization strategy: compare-and-swap guarantees that only one thread enters a STARTING, or * QUITTING, or DISPOSED state. After that, the only state transitions out of STARTING/QUITTING occur * in the same thread (or a single designated worker thread); all other threads must wait until the @@ -129,8 +125,8 @@ public MasterRemote value() { protected abstract void handleSlaveQuit(int status); /** Callback for when the slave JVM fails to either run or respond to {@link SlaveRemote#start}. - * @param e Exception that occurred during startup. - */ + * @param e Exception that occurred during startup. + */ protected abstract void handleSlaveWontStart(Exception e); /** Creates and starts the slave JVM. If the the slave is currently running, waits until it completes. @@ -251,3 +247,4 @@ public void checkStillAlive() { } } + \ No newline at end of file diff --git a/drjava/src/edu/rice/cs/util/newjvm/AbstractSlaveJVM.java b/drjava/src/edu/rice/cs/util/newjvm/AbstractSlaveJVM.java index 1935f2693..447209842 100644 --- a/drjava/src/edu/rice/cs/util/newjvm/AbstractSlaveJVM.java +++ b/drjava/src/edu/rice/cs/util/newjvm/AbstractSlaveJVM.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.util.newjvm; import edu.rice.cs.plt.concurrent.ConcurrentUtil; @@ -80,13 +72,12 @@ public void run() { }.start(); } - /** Initializes the Slave JVM including starting background thread to - * periodically poll the master JVM and automatically quit if it's dead. - * Synchronized to prevent other method invocations from proceeding before - * startup is complete. - * @param master link to the master JVM - * @throws RemoteException if communication over RMI fails - */ + /** Initializes the Slave JVM including starting background thread to periodically poll the master JVM and + * automatically quit if it's dead. Synchronized to prevent other method invocations from proceeding before + * startup is complete. + * @param master link to the master JVM + * @throws RemoteException if communication over RMI fails + */ public final synchronized void start(final MasterRemote master) throws RemoteException { if (_started) { throw new IllegalArgumentException("start() has already been invoked"); } master.checkStillAlive(); // verify that two-way communication works; may throw RemoteException @@ -97,8 +88,8 @@ public void run() { ConcurrentUtil.sleep(CHECK_MAIN_VM_ALIVE_SECONDS*1000); try { master.checkStillAlive(); } catch (RemoteException e) { - // TODO: This should always be an exceptional situation, but for now - // many tests abandon the slave without quitting cleanly. + // TODO: This should always be an exceptional situation, but for now many tests abandon the slave without + // quitting cleanly. // error.log("Master is no longer available", e); quit(); } diff --git a/drjava/src/edu/rice/cs/util/newjvm/IntegratedMasterSlaveTest.java b/drjava/src/edu/rice/cs/util/newjvm/IntegratedMasterSlaveTest.java index 2d6d3f158..3256cfbc7 100644 --- a/drjava/src/edu/rice/cs/util/newjvm/IntegratedMasterSlaveTest.java +++ b/drjava/src/edu/rice/cs/util/newjvm/IntegratedMasterSlaveTest.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.util.newjvm; import edu.rice.cs.drjava.DrJavaTestCase; @@ -43,7 +35,8 @@ import java.rmi.RemoteException; -/** Test cases for the master/slave jvm control framework. +/** Test cases for the master/slave jvm control framework. Extends DrJavaTestCase because all JUnit assertXXX calls + * are executed in the main test thread. * @version $Id$ */ public class IntegratedMasterSlaveTest extends DrJavaTestCase { diff --git a/drjava/src/edu/rice/cs/util/newjvm/MasterRemote.java b/drjava/src/edu/rice/cs/util/newjvm/MasterRemote.java index 93ab0129a..50f5b2fb1 100644 --- a/drjava/src/edu/rice/cs/util/newjvm/MasterRemote.java +++ b/drjava/src/edu/rice/cs/util/newjvm/MasterRemote.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.util.newjvm; import java.rmi.Remote; diff --git a/drjava/src/edu/rice/cs/util/newjvm/SlaveRemote.java b/drjava/src/edu/rice/cs/util/newjvm/SlaveRemote.java index 08be892f3..0b996d782 100644 --- a/drjava/src/edu/rice/cs/util/newjvm/SlaveRemote.java +++ b/drjava/src/edu/rice/cs/util/newjvm/SlaveRemote.java @@ -1,40 +1,32 @@ /*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.util.newjvm; import java.rmi.Remote; diff --git a/drjava/src/edu/rice/cs/util/sexp/Atom.java b/drjava/src/edu/rice/cs/util/sexp/Atom.java index d1d32532a..8984b748c 100644 --- a/drjava/src/edu/rice/cs/util/sexp/Atom.java +++ b/drjava/src/edu/rice/cs/util/sexp/Atom.java @@ -1,6 +1,6 @@ /*BEGIN_COPYRIGHT_BLOCK * - * Copyright (c) 2001-2015, 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 diff --git a/drjava/src/edu/rice/cs/util/sexp/Cons.java b/drjava/src/edu/rice/cs/util/sexp/Cons.java index 6cc8c5c54..6f837a91c 100644 --- a/drjava/src/edu/rice/cs/util/sexp/Cons.java +++ b/drjava/src/edu/rice/cs/util/sexp/Cons.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.util.sexp; public class Cons extends SEList { diff --git a/drjava/src/edu/rice/cs/util/sexp/Empty.java b/drjava/src/edu/rice/cs/util/sexp/Empty.java index ddfc95adc..83ce82914 100644 --- a/drjava/src/edu/rice/cs/util/sexp/Empty.java +++ b/drjava/src/edu/rice/cs/util/sexp/Empty.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.util.sexp; public class Empty extends SEList { diff --git a/drjava/src/edu/rice/cs/util/sexp/Lexer.java b/drjava/src/edu/rice/cs/util/sexp/Lexer.java index 87d30fb84..21f3ce376 100644 --- a/drjava/src/edu/rice/cs/util/sexp/Lexer.java +++ b/drjava/src/edu/rice/cs/util/sexp/Lexer.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.util.sexp; import java.util.*; diff --git a/drjava/src/edu/rice/cs/util/sexp/LexingException.java b/drjava/src/edu/rice/cs/util/sexp/LexingException.java index ef4def466..279a8e655 100644 --- a/drjava/src/edu/rice/cs/util/sexp/LexingException.java +++ b/drjava/src/edu/rice/cs/util/sexp/LexingException.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.util.sexp; /** * This exception is used by the lexer. It extends diff --git a/drjava/src/edu/rice/cs/util/sexp/SEList.java b/drjava/src/edu/rice/cs/util/sexp/SEList.java index 214667cb9..6b07da542 100644 --- a/drjava/src/edu/rice/cs/util/sexp/SEList.java +++ b/drjava/src/edu/rice/cs/util/sexp/SEList.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.util.sexp; public abstract class SEList implements SExp { diff --git a/drjava/src/edu/rice/cs/util/sexp/SEListVisitor.java b/drjava/src/edu/rice/cs/util/sexp/SEListVisitor.java index 2258ad185..83af30f47 100644 --- a/drjava/src/edu/rice/cs/util/sexp/SEListVisitor.java +++ b/drjava/src/edu/rice/cs/util/sexp/SEListVisitor.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.util.sexp; /** The usual generically typed visitor for functional lists.*/ diff --git a/drjava/src/edu/rice/cs/util/sexp/SExp.java b/drjava/src/edu/rice/cs/util/sexp/SExp.java index 5250106ee..4b5c10cac 100644 --- a/drjava/src/edu/rice/cs/util/sexp/SExp.java +++ b/drjava/src/edu/rice/cs/util/sexp/SExp.java @@ -1,39 +1,31 @@ /*BEGIN_COPYRIGHT_BLOCK * - * Copyright (c) 2001-2010, 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. + * 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. + * + * 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.util.sexp; //package edu.rice.cs.drjava.project; diff --git a/drjava/src/edu/rice/cs/util/sexp/SExpParseException.java b/drjava/src/edu/rice/cs/util/sexp/SExpParseException.java index 34ae843b2..fad6d7908 100644 --- a/drjava/src/edu/rice/cs/util/sexp/SExpParseException.java +++ b/drjava/src/edu/rice/cs/util/sexp/SExpParseException.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.util.sexp; public class SExpParseException extends Exception { diff --git a/drjava/src/edu/rice/cs/util/sexp/SExpParser.java b/drjava/src/edu/rice/cs/util/sexp/SExpParser.java index dca74051e..74a93f52a 100644 --- a/drjava/src/edu/rice/cs/util/sexp/SExpParser.java +++ b/drjava/src/edu/rice/cs/util/sexp/SExpParser.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.util.sexp; import java.io.File; diff --git a/drjava/src/edu/rice/cs/util/sexp/SExpParserTest.java b/drjava/src/edu/rice/cs/util/sexp/SExpParserTest.java index 4e8869fcf..7a75ee55e 100644 --- a/drjava/src/edu/rice/cs/util/sexp/SExpParserTest.java +++ b/drjava/src/edu/rice/cs/util/sexp/SExpParserTest.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.util.sexp; import edu.rice.cs.drjava.DrJavaTestCase; @@ -42,7 +34,7 @@ import java.util.List; /** A JUnit test case class. Every method starting with the word "test" will be called when running - * the test with JUnit. + * the test with JUnit. Extends DrJavaTestCase because every JUnit assertXXX call is executed in the main test thread. */ public class SExpParserTest extends DrJavaTestCase { @@ -135,7 +127,7 @@ public void testTopLevel() throws SExpParseException { try { SExpParser.parse(text).get(0); fail("Didn't throw a parse exception"); - }catch(SExpParseException e) { + } catch(SExpParseException e) { assertEquals("Incorrect exception message", "A top-level s-expression must be a list. " + "Invalid start of list: true", @@ -145,7 +137,7 @@ public void testTopLevel() throws SExpParseException { try { SExpParser.parse(text).get(0); fail("Didn't throw a parse exception"); - }catch(SExpParseException e) { + } catch(SExpParseException e) { assertEquals("Incorrect exception message", "A top-level s-expression must be a list. " + "Invalid start of list: 123", @@ -155,7 +147,7 @@ public void testTopLevel() throws SExpParseException { try { SExpParser.parse(text).get(0); fail("Didn't throw a parse exception"); - }catch(SExpParseException e) { + } catch(SExpParseException e) { assertEquals("Incorrect exception message", "A top-level s-expression must be a list. " + "Invalid start of list: [help", @@ -169,7 +161,7 @@ public void testInvalidLowerLevel() { try { SExpParser.parse(text).get(0); fail("Didn't throw a parse exception"); - }catch(SExpParseException e) { + } catch(SExpParseException e) { assertEquals("Incorrect exception message", "Unexpected at line 1", e.getMessage()); @@ -179,7 +171,7 @@ public void testInvalidLowerLevel() { try { SExpParser.parse(text).get(0); fail("Didn't throw a parse exception"); - }catch(SExpParseException e) { + } catch(SExpParseException e) { assertEquals("Incorrect exception message", "Unexpected at line 2", e.getMessage()); @@ -189,7 +181,7 @@ public void testInvalidLowerLevel() { try { SExpParser.parse(text).get(0); fail("Didn't throw a parse exception"); - }catch(SExpParseException e) { + } catch(SExpParseException e) { assertEquals("Incorrect exception message", "A top-level s-expression must be a list. " + "Invalid start of list: )", @@ -200,7 +192,7 @@ public void testInvalidLowerLevel() { try { SExpParser.parse(text).get(0); fail("Didn't throw a parse exception"); - }catch(SExpParseException e) { + } catch(SExpParseException e) { assertEquals("Incorrect exception message", "Unexpected at line 1", e.getMessage()); @@ -211,7 +203,7 @@ public void testInvalidLowerLevel() { try { SExpParser.parse(text).get(0); fail("Didn't throw a parse exception"); - }catch(SExpParseException e) { + } catch(SExpParseException e) { assertEquals("Incorrect exception message", "Unexpected at line 1", e.getMessage()); diff --git a/drjava/src/edu/rice/cs/util/sexp/SExpVisitor.java b/drjava/src/edu/rice/cs/util/sexp/SExpVisitor.java index b0c2b0121..4013d752e 100644 --- a/drjava/src/edu/rice/cs/util/sexp/SExpVisitor.java +++ b/drjava/src/edu/rice/cs/util/sexp/SExpVisitor.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.util.sexp; /** * Just your every-day visitor. It works on the diff --git a/drjava/src/edu/rice/cs/util/sexp/Tokens.java b/drjava/src/edu/rice/cs/util/sexp/Tokens.java index 727cfa357..8068113a8 100644 --- a/drjava/src/edu/rice/cs/util/sexp/Tokens.java +++ b/drjava/src/edu/rice/cs/util/sexp/Tokens.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.util.sexp; /** A common namespace for the token classes. */ diff --git a/drjava/src/edu/rice/cs/util/sexp/TokensTest.java b/drjava/src/edu/rice/cs/util/sexp/TokensTest.java index f5874a573..7903e9f06 100644 --- a/drjava/src/edu/rice/cs/util/sexp/TokensTest.java +++ b/drjava/src/edu/rice/cs/util/sexp/TokensTest.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.util.sexp; + * END_COPYRIGHT_BLOCK*/package edu.rice.cs.util.sexp; import junit.framework.TestCase; diff --git a/drjava/src/edu/rice/cs/util/swing/AsyncCompletionArgs.java b/drjava/src/edu/rice/cs/util/swing/AsyncCompletionArgs.java index bbd06f5f4..3701c3633 100644 --- a/drjava/src/edu/rice/cs/util/swing/AsyncCompletionArgs.java +++ b/drjava/src/edu/rice/cs/util/swing/AsyncCompletionArgs.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.util.swing; /** * @author jlugo diff --git a/drjava/src/edu/rice/cs/util/swing/AsyncTask.java b/drjava/src/edu/rice/cs/util/swing/AsyncTask.java index 2673f648b..9d5aa3c3d 100644 --- a/drjava/src/edu/rice/cs/util/swing/AsyncTask.java +++ b/drjava/src/edu/rice/cs/util/swing/AsyncTask.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.util.swing; /** * The AsyncTask base class is a framework that facilitates execution of diff --git a/drjava/src/edu/rice/cs/util/swing/AsyncTaskLauncher.java b/drjava/src/edu/rice/cs/util/swing/AsyncTaskLauncher.java index 6abbda53e..4cf7e262d 100644 --- a/drjava/src/edu/rice/cs/util/swing/AsyncTaskLauncher.java +++ b/drjava/src/edu/rice/cs/util/swing/AsyncTaskLauncher.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.util.swing; /** The base class of the component that launches an AsyncTask. It manages the multi-threading and ensures that the diff --git a/drjava/src/edu/rice/cs/util/swing/BorderlessScrollPane.java b/drjava/src/edu/rice/cs/util/swing/BorderlessScrollPane.java index 4cc1657fd..de5705c9f 100644 --- a/drjava/src/edu/rice/cs/util/swing/BorderlessScrollPane.java +++ b/drjava/src/edu/rice/cs/util/swing/BorderlessScrollPane.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.util.swing; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/util/swing/BorderlessSplitPane.java b/drjava/src/edu/rice/cs/util/swing/BorderlessSplitPane.java index 0e4f137a1..e3ed7da4d 100644 --- a/drjava/src/edu/rice/cs/util/swing/BorderlessSplitPane.java +++ b/drjava/src/edu/rice/cs/util/swing/BorderlessSplitPane.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.util.swing; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/util/swing/CenteredIcon.java b/drjava/src/edu/rice/cs/util/swing/CenteredIcon.java index 124812f3d..1afa5b12f 100644 --- a/drjava/src/edu/rice/cs/util/swing/CenteredIcon.java +++ b/drjava/src/edu/rice/cs/util/swing/CenteredIcon.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.util.swing; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/util/swing/ConfirmCheckBoxDialog.java b/drjava/src/edu/rice/cs/util/swing/ConfirmCheckBoxDialog.java index 0d4b8cee3..5da4024a4 100644 --- a/drjava/src/edu/rice/cs/util/swing/ConfirmCheckBoxDialog.java +++ b/drjava/src/edu/rice/cs/util/swing/ConfirmCheckBoxDialog.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.util.swing; import edu.rice.cs.util.swing.Utilities; diff --git a/drjava/src/edu/rice/cs/util/swing/DefaultFileDisplayManager.java b/drjava/src/edu/rice/cs/util/swing/DefaultFileDisplayManager.java index 2ddce88ba..7d625d60d 100644 --- a/drjava/src/edu/rice/cs/util/swing/DefaultFileDisplayManager.java +++ b/drjava/src/edu/rice/cs/util/swing/DefaultFileDisplayManager.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.util.swing; import javax.swing.Icon; diff --git a/drjava/src/edu/rice/cs/util/swing/DefaultSwingFrame.java b/drjava/src/edu/rice/cs/util/swing/DefaultSwingFrame.java index 9927886de..60f3a9871 100644 --- a/drjava/src/edu/rice/cs/util/swing/DefaultSwingFrame.java +++ b/drjava/src/edu/rice/cs/util/swing/DefaultSwingFrame.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.util.swing; import java.awt.GraphicsConfiguration; diff --git a/drjava/src/edu/rice/cs/util/swing/DelegatingAction.java b/drjava/src/edu/rice/cs/util/swing/DelegatingAction.java index c50ede0e9..0f3cd0407 100644 --- a/drjava/src/edu/rice/cs/util/swing/DelegatingAction.java +++ b/drjava/src/edu/rice/cs/util/swing/DelegatingAction.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.util.swing; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/util/swing/DirectoryChooser.java b/drjava/src/edu/rice/cs/util/swing/DirectoryChooser.java index 7b31a8d3a..a2e8a0808 100644 --- a/drjava/src/edu/rice/cs/util/swing/DirectoryChooser.java +++ b/drjava/src/edu/rice/cs/util/swing/DirectoryChooser.java @@ -1,40 +1,32 @@ /*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.util.swing; import java.io.File; diff --git a/drjava/src/edu/rice/cs/util/swing/DirectorySelectorComponent.java b/drjava/src/edu/rice/cs/util/swing/DirectorySelectorComponent.java index f0326bc3e..f11bdd1d7 100644 --- a/drjava/src/edu/rice/cs/util/swing/DirectorySelectorComponent.java +++ b/drjava/src/edu/rice/cs/util/swing/DirectorySelectorComponent.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.util.swing; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/util/swing/DisplayManager.java b/drjava/src/edu/rice/cs/util/swing/DisplayManager.java index 95b980e3b..661e99332 100644 --- a/drjava/src/edu/rice/cs/util/swing/DisplayManager.java +++ b/drjava/src/edu/rice/cs/util/swing/DisplayManager.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.util.swing; import javax.swing.Icon; diff --git a/drjava/src/edu/rice/cs/util/swing/DocumentIterator.java b/drjava/src/edu/rice/cs/util/swing/DocumentIterator.java index 032335142..eea9486ae 100644 --- a/drjava/src/edu/rice/cs/util/swing/DocumentIterator.java +++ b/drjava/src/edu/rice/cs/util/swing/DocumentIterator.java @@ -1,59 +1,52 @@ /*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.util.swing; import edu.rice.cs.drjava.model.OpenDefinitionsDocument; // TODO: move this class to the model package -/** Used to get the next or previous open document given the current one. */ +/** Used to get the next or previous open document given the current one. A DocumentIterator refers to at least one + * document. It cannot be empty. */ public interface DocumentIterator { - /** Gets the next document. + /** Gets the next document, wrapping to first if necessary. * @param doc the current document. * @return the next document. */ OpenDefinitionsDocument getNextDocument(OpenDefinitionsDocument doc); - /** Gets the next document. + /** Gets the next document, wrapping to first if necessary. * @param doc the current document. * @param frame a frame for use with dialog popups * @return the next document. */ OpenDefinitionsDocument getNextDocument(OpenDefinitionsDocument doc, java.awt.Component frame); - /** Gets the previous document. + /** Gets the previous document, wrapping to last if necessary. * @param doc the current document. * @return the previous document. */ diff --git a/drjava/src/edu/rice/cs/util/swing/DocumentOutputStream.java b/drjava/src/edu/rice/cs/util/swing/DocumentOutputStream.java index dd46e64dc..8741a892f 100644 --- a/drjava/src/edu/rice/cs/util/swing/DocumentOutputStream.java +++ b/drjava/src/edu/rice/cs/util/swing/DocumentOutputStream.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.util.swing; import java.io.OutputStream; diff --git a/drjava/src/edu/rice/cs/util/swing/FileChooser.java b/drjava/src/edu/rice/cs/util/swing/FileChooser.java index c54444439..bb7d7abee 100644 --- a/drjava/src/edu/rice/cs/util/swing/FileChooser.java +++ b/drjava/src/edu/rice/cs/util/swing/FileChooser.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.util.swing; import edu.rice.cs.plt.io.IOUtil; diff --git a/drjava/src/edu/rice/cs/util/swing/FileDisplay.java b/drjava/src/edu/rice/cs/util/swing/FileDisplay.java index ce79745d9..5ba0ed1ab 100644 --- a/drjava/src/edu/rice/cs/util/swing/FileDisplay.java +++ b/drjava/src/edu/rice/cs/util/swing/FileDisplay.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.util.swing; + * END_COPYRIGHT_BLOCK*/package edu.rice.cs.util.swing; import java.io.File; diff --git a/drjava/src/edu/rice/cs/util/swing/FileDisplayManager.java b/drjava/src/edu/rice/cs/util/swing/FileDisplayManager.java index 4e6fd40ed..b45b7defc 100644 --- a/drjava/src/edu/rice/cs/util/swing/FileDisplayManager.java +++ b/drjava/src/edu/rice/cs/util/swing/FileDisplayManager.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.util.swing; import java.io.File; diff --git a/drjava/src/edu/rice/cs/util/swing/FileSelectionEvent.java b/drjava/src/edu/rice/cs/util/swing/FileSelectionEvent.java index 10ca2fb70..4708326a7 100644 --- a/drjava/src/edu/rice/cs/util/swing/FileSelectionEvent.java +++ b/drjava/src/edu/rice/cs/util/swing/FileSelectionEvent.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.util.swing; import java.util.EventObject; diff --git a/drjava/src/edu/rice/cs/util/swing/FileSelectionListener.java b/drjava/src/edu/rice/cs/util/swing/FileSelectionListener.java index 74f391071..0c9f60d1a 100644 --- a/drjava/src/edu/rice/cs/util/swing/FileSelectionListener.java +++ b/drjava/src/edu/rice/cs/util/swing/FileSelectionListener.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.util.swing; import java.util.EventListener; diff --git a/drjava/src/edu/rice/cs/util/swing/FileSelectorComponent.java b/drjava/src/edu/rice/cs/util/swing/FileSelectorComponent.java index ba632ad69..92e9170c0 100644 --- a/drjava/src/edu/rice/cs/util/swing/FileSelectorComponent.java +++ b/drjava/src/edu/rice/cs/util/swing/FileSelectorComponent.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.util.swing; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/util/swing/FileSelectorStringComponent.java b/drjava/src/edu/rice/cs/util/swing/FileSelectorStringComponent.java index d8bde7227..d5891214c 100644 --- a/drjava/src/edu/rice/cs/util/swing/FileSelectorStringComponent.java +++ b/drjava/src/edu/rice/cs/util/swing/FileSelectorStringComponent.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.util.swing; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/util/swing/FontChooser.java b/drjava/src/edu/rice/cs/util/swing/FontChooser.java index 9ad63df82..c5ece5c25 100644 --- a/drjava/src/edu/rice/cs/util/swing/FontChooser.java +++ b/drjava/src/edu/rice/cs/util/swing/FontChooser.java @@ -1,42 +1,33 @@ /*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.util.swing; -import edu.rice.cs.util.swing.Utilities; import javax.swing.*; import javax.swing.border.EmptyBorder; import javax.swing.event.ListSelectionEvent; @@ -44,6 +35,10 @@ import java.awt.*; import java.awt.event.*; +import edu.rice.cs.util.Log; +import edu.rice.cs.util.swing.Utilities; +import edu.rice.cs.util.UnexpectedException; + /** * FontChooser, adapted from NwFontChooserS by Noah Wairauch. * {@literal (see http:///forum.java.sun.com/thread.jsp?forum=57&thread=195067)} * @@ -51,17 +46,20 @@ */ public class FontChooser extends JDialog { - /** Available font styles. - */ + private static Log _log = new Log("FontChooser.txt", false); + + /** Available font styles.b */ private static final String[] STYLES = new String[] { "Plain", "Bold", "Italic", "Bold Italic" }; + + private static final String DEFAULT_STYLE = "Plain"; - /** Available font sizes. - */ + /** Available font sizes. */ private static final String[] SIZES = - new String[] { "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", - "13", "14", "15", "16", "17", "18", "19", "20", "22", - "24", "27", "30", "34", "39", "45", "51", "60"}; + new String[] { "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", + "20", "22", "24", "27", "30", "34", "39", "45", "51", "60"}; + + private static final String DEFAULT_SIZE = "12"; // Lists to display private NwList _styleList; @@ -76,16 +74,17 @@ public class FontChooser extends JDialog { private boolean _clickedOK = false; /** Constructs a new modal FontChooser for the given frame, - * using the specified font. - * @param parent The parent frame. - * @param font The previously chosen font. - */ + * using the specified font. + * @param parent The parent frame. + * @param font The previously chosen font. + */ private FontChooser(Frame parent, Font font) { super(parent, true); initAll(); if (font == null) font = _sampleText.getFont(); + _log.log("font in FontChooser = " + font); _fontList.setSelectedItem(font.getName()); - _sizeList.setSelectedItem(font.getSize() + ""); + _sizeList.setSelectedItem(Integer.toString(font.getSize())); _styleList.setSelectedItem(STYLES[font.getStyle()]); //this.setResizable(false); //resize(); @@ -110,7 +109,7 @@ public static Font showDialog(Frame parent, String title, Font font) { chosenFont = fd.getFont(); } fd.dispose(); - return (chosenFont); + return chosenFont; } /** Shows the font chooser with a standard title ("Font Chooser"). @@ -137,7 +136,9 @@ private void initAll() { c.gridy = 0; c.weightx = 1.0; c.weighty = 1.0; - _fontList = new NwList(GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames()); + String[] fontNames = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames(); + if (fontNames.length == 0) throw new UnexpectedException("There are NO fonts in the local graphics environment!"); + _fontList = new NwList(fontNames, fontNames[0]); cpLayout.setConstraints(_fontList, c); cp.add(_fontList); // JPanel fontListPanel = new JPanel(); @@ -153,8 +154,8 @@ private void initAll() { c.gridy = 0; c.weightx = 0.3; c.weighty = 1.0; - _styleList = new NwList(STYLES); - cpLayout.setConstraints(_styleList , c); + _styleList = new NwList(STYLES, DEFAULT_STYLE); + cp.add(_styleList); // JPanel styleListPanel = new JPanel(); // styleListPanel.setBackground(Color.GREEN); @@ -169,7 +170,7 @@ private void initAll() { c.gridy = 0; c.weightx = 0.3; c.weighty = 1.0; - _sizeList = new NwList(SIZES); + _sizeList = new NwList(SIZES, DEFAULT_SIZE); cpLayout.setConstraints(_sizeList, c); cp.add(_sizeList); @@ -233,14 +234,17 @@ public void windowClosing(java.awt.event.WindowEvent e) { private void showSample() { int g = 0; + _log.log("sizeList = " + _sizeList + "\n" + "_sizeList.getSelectedValue() = " + _sizeList.getSelectedValue()); try { g = Integer.parseInt(_sizeList.getSelectedValue()); } - catch (NumberFormatException nfe) { /* do nothing */ } + catch (NumberFormatException nfe) { throw new UnexpectedException(nfe); } String st = _styleList.getSelectedValue(); int s = Font.PLAIN; if (st.equalsIgnoreCase("Bold")) s = Font.BOLD; if (st.equalsIgnoreCase("Italic")) s = Font.ITALIC; if (st.equalsIgnoreCase("Bold Italic")) s = Font.BOLD | Font.ITALIC; + _log.log("_fontList = " + _fontList + "\nselectedValue = " + _fontList.getSelectedValue()); _sampleText.setFont(new Font(_fontList.getSelectedValue(), s, g)); + _log.log("Selected font is '" + getFont() + "'"); _sampleText.setText("The quick brown fox jumped over the lazy dog."); _sampleText.setVerticalAlignment(SwingConstants.TOP); } @@ -258,9 +262,9 @@ public class NwList extends JPanel { JList jl; JScrollPane sp; JLabel jt; - String si = " "; + String si; - public NwList(String[] values) { + public NwList(String[] values, String s) { GridBagLayout cpLayout = new GridBagLayout(); GridBagConstraints c = new GridBagConstraints(); setLayout(cpLayout); @@ -268,6 +272,7 @@ public NwList(String[] values) { jl = new JList (values); sp = new JScrollPane(jl); jt = new JLabel(); + si = s; jt.setBackground(Color.white); jt.setForeground(Color.black); jt.setOpaque(true); @@ -304,8 +309,9 @@ public void valueChanged(ListSelectionEvent e) { add(sp); } - public String getSelectedValue() { return (si); } - - public void setSelectedItem(String s) { jl.setSelectedValue(s, true);} + public String getSelectedValue() { return si; } + public void setSelectedItem(String s) { jl.setSelectedValue(s, true); } + public String toString() { return "NwList(" + jl + ", " + si +")"; } + } } diff --git a/drjava/src/edu/rice/cs/util/swing/HighlightManager.java b/drjava/src/edu/rice/cs/util/swing/HighlightManager.java index 0097cc5f8..e123268af 100644 --- a/drjava/src/edu/rice/cs/util/swing/HighlightManager.java +++ b/drjava/src/edu/rice/cs/util/swing/HighlightManager.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.util.swing; import java.util.Stack; diff --git a/drjava/src/edu/rice/cs/util/swing/HighlightManagerTest.java b/drjava/src/edu/rice/cs/util/swing/HighlightManagerTest.java index 6456aa94d..a2af4e29c 100644 --- a/drjava/src/edu/rice/cs/util/swing/HighlightManagerTest.java +++ b/drjava/src/edu/rice/cs/util/swing/HighlightManagerTest.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.util.swing; import edu.rice.cs.drjava.DrJavaTestCase; @@ -44,9 +36,8 @@ import javax.swing.text.JTextComponent; import java.awt.*; -/** * A JUnit test case class for the class HighlightManager. - * Every method starting with the word "test" will be called when running - * the test with JUnit. +/** A JUnit test case class for the class HighlightManager. Extends DrJavaTestCase because all JUnit assertXXX calls + * are executed in the main test thread. */ public class HighlightManagerTest extends DrJavaTestCase { diff --git a/drjava/src/edu/rice/cs/util/swing/IAsyncProgress.java b/drjava/src/edu/rice/cs/util/swing/IAsyncProgress.java index caea9b511..d7bbbca62 100644 --- a/drjava/src/edu/rice/cs/util/swing/IAsyncProgress.java +++ b/drjava/src/edu/rice/cs/util/swing/IAsyncProgress.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.util.swing; public interface IAsyncProgress { diff --git a/drjava/src/edu/rice/cs/util/swing/LayeredIcon.java b/drjava/src/edu/rice/cs/util/swing/LayeredIcon.java index fd2540698..198da59a8 100644 --- a/drjava/src/edu/rice/cs/util/swing/LayeredIcon.java +++ b/drjava/src/edu/rice/cs/util/swing/LayeredIcon.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.util.swing; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/util/swing/ProcessingDialog.java b/drjava/src/edu/rice/cs/util/swing/ProcessingDialog.java index b0d93681b..6ba68c32e 100644 --- a/drjava/src/edu/rice/cs/util/swing/ProcessingDialog.java +++ b/drjava/src/edu/rice/cs/util/swing/ProcessingDialog.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.util.swing; import java.awt.*; diff --git a/drjava/src/edu/rice/cs/util/swing/RightClickMouseAdapter.java b/drjava/src/edu/rice/cs/util/swing/RightClickMouseAdapter.java index fc08924fa..df0c188e0 100644 --- a/drjava/src/edu/rice/cs/util/swing/RightClickMouseAdapter.java +++ b/drjava/src/edu/rice/cs/util/swing/RightClickMouseAdapter.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.util.swing; import java.awt.event.*; diff --git a/drjava/src/edu/rice/cs/util/swing/ScrollableDialog.java b/drjava/src/edu/rice/cs/util/swing/ScrollableDialog.java index fbc368074..27c9d253c 100644 --- a/drjava/src/edu/rice/cs/util/swing/ScrollableDialog.java +++ b/drjava/src/edu/rice/cs/util/swing/ScrollableDialog.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.util.swing; import edu.rice.cs.util.swing.Utilities; diff --git a/drjava/src/edu/rice/cs/util/swing/ScrollableListDialog.java b/drjava/src/edu/rice/cs/util/swing/ScrollableListDialog.java index 4095ef65c..6011f123e 100644 --- a/drjava/src/edu/rice/cs/util/swing/ScrollableListDialog.java +++ b/drjava/src/edu/rice/cs/util/swing/ScrollableListDialog.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.util.swing; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/util/swing/ScrollableListDialogTest.java b/drjava/src/edu/rice/cs/util/swing/ScrollableListDialogTest.java index d714323f2..2920ede36 100644 --- a/drjava/src/edu/rice/cs/util/swing/ScrollableListDialogTest.java +++ b/drjava/src/edu/rice/cs/util/swing/ScrollableListDialogTest.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.util.swing; import junit.framework.TestCase; diff --git a/drjava/src/edu/rice/cs/util/swing/ScrollableListSelectionDialog.java b/drjava/src/edu/rice/cs/util/swing/ScrollableListSelectionDialog.java index e19439f8c..8bd6429de 100644 --- a/drjava/src/edu/rice/cs/util/swing/ScrollableListSelectionDialog.java +++ b/drjava/src/edu/rice/cs/util/swing/ScrollableListSelectionDialog.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.util.swing; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/util/swing/ScrollableListSelectionDialogTest.java b/drjava/src/edu/rice/cs/util/swing/ScrollableListSelectionDialogTest.java index c15f57136..74de10398 100644 --- a/drjava/src/edu/rice/cs/util/swing/ScrollableListSelectionDialogTest.java +++ b/drjava/src/edu/rice/cs/util/swing/ScrollableListSelectionDialogTest.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.util.swing; import junit.framework.TestCase; @@ -48,7 +40,7 @@ * @version $Id$ * @since 2007-03-06 */ -public class ScrollableListSelectionDialogTest extends TestCase { +public class ScrollableListSelectionDialogTest extends TestCase { private static final String TITLE = "DIALOG TITLE"; private static final String LEADER = "DIALOG LEADER"; private static final java.util.List DATA = Arrays.asList("hello", "there"); diff --git a/drjava/src/edu/rice/cs/util/swing/SwingFrame.java b/drjava/src/edu/rice/cs/util/swing/SwingFrame.java index 8a88bad58..17277c15a 100644 --- a/drjava/src/edu/rice/cs/util/swing/SwingFrame.java +++ b/drjava/src/edu/rice/cs/util/swing/SwingFrame.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.util.swing; import java.awt.GraphicsConfiguration; diff --git a/drjava/src/edu/rice/cs/util/swing/SwingWorker.java b/drjava/src/edu/rice/cs/util/swing/SwingWorker.java index f4faaa8af..5b82b9aae 100644 --- a/drjava/src/edu/rice/cs/util/swing/SwingWorker.java +++ b/drjava/src/edu/rice/cs/util/swing/SwingWorker.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.util.swing; import java.awt.EventQueue; diff --git a/drjava/src/edu/rice/cs/util/swing/UneditableTableModel.java b/drjava/src/edu/rice/cs/util/swing/UneditableTableModel.java index c2bdcafe7..f444bbdce 100644 --- a/drjava/src/edu/rice/cs/util/swing/UneditableTableModel.java +++ b/drjava/src/edu/rice/cs/util/swing/UneditableTableModel.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.util.swing; import javax.swing.table.*; diff --git a/drjava/src/edu/rice/cs/util/swing/UnfocusableButton.java b/drjava/src/edu/rice/cs/util/swing/UnfocusableButton.java index 67280ff61..b835fafb2 100644 --- a/drjava/src/edu/rice/cs/util/swing/UnfocusableButton.java +++ b/drjava/src/edu/rice/cs/util/swing/UnfocusableButton.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.util.swing; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/util/swing/Utilities.java b/drjava/src/edu/rice/cs/util/swing/Utilities.java index 5e4210d47..9e2f59ff5 100644 --- a/drjava/src/edu/rice/cs/util/swing/Utilities.java +++ b/drjava/src/edu/rice/cs/util/swing/Utilities.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.util.swing; import java.awt.*; diff --git a/drjava/src/edu/rice/cs/util/swing/UtilitiesTest.java b/drjava/src/edu/rice/cs/util/swing/UtilitiesTest.java index 3ce7f3128..15a42071b 100644 --- a/drjava/src/edu/rice/cs/util/swing/UtilitiesTest.java +++ b/drjava/src/edu/rice/cs/util/swing/UtilitiesTest.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.util.swing; import javax.swing.*; diff --git a/drjava/src/edu/rice/cs/util/text/AbstractDocumentInterface.java b/drjava/src/edu/rice/cs/util/text/AbstractDocumentInterface.java index 9e290ce41..0845aff81 100644 --- a/drjava/src/edu/rice/cs/util/text/AbstractDocumentInterface.java +++ b/drjava/src/edu/rice/cs/util/text/AbstractDocumentInterface.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.util.text; import javax.swing.text.AttributeSet; diff --git a/drjava/src/edu/rice/cs/util/text/ConsoleDocument.java b/drjava/src/edu/rice/cs/util/text/ConsoleDocument.java index 68e14e77c..fc54bbf56 100644 --- a/drjava/src/edu/rice/cs/util/text/ConsoleDocument.java +++ b/drjava/src/edu/rice/cs/util/text/ConsoleDocument.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.util.text; import java.io.*; @@ -53,7 +45,7 @@ /** A GUI-toolkit agnostic interface to a console document. This class assumes that the embedded document supports * readers/writers locking and uses that locking protocol to ensure the integrity of the data added in this class * WHY is prompt considered part of a console document rather than an interactions document? - * @version $Id: ConsoleDocument.java 5236 2010-04-27 01:43:36Z mgricken $ */ + * @version $Id$ */ public class ConsoleDocument implements ConsoleDocumentInterface { @@ -145,8 +137,8 @@ public void setPromptPos(int newPos) { public void setBeep(Runnable beep) { _beep = beep; } /** Resets the document to a clean state. Only runs in the event thread. - * @param banner the value to which to set the banner - */ + * @param banner the value to which to set the banner + */ public void reset(String banner) { assert EventQueue.isDispatchThread(); try { @@ -191,10 +183,10 @@ public void insertNewline(int pos) { catch (EditDocumentException e) { throw new UnexpectedException(e); } } - /** Gets the position immediately before the prompt, or the doc length if - * there is no prompt. Only runs in the event thread. - * @return the position immediately before the prompt, or the doc length if there is no prompt - */ + /** Gets the position immediately before the prompt, or the doc length if there is no prompt. Only runs in the event + * thread. + * @return the position immediately before the prompt, or the doc length if there is no prompt + */ private int _getPositionBeforePrompt() { int len = _document.getLength(); if (_document.hasPrompt()) { @@ -204,12 +196,13 @@ private int _getPositionBeforePrompt() { return len; } - /** Inserts the given string with the given attributes just before the most recent prompt. + /** Inserts the given string with the given attributes just before the most recent prompt. Only runs in event thread + * except for legacy test code. * @param text String to insert * @param style name of style to format the string */ public void insertBeforeLastPrompt(String text, String style) { -/* */ assert Utilities.TEST_MODE || EventQueue.isDispatchThread(); + assert Utilities.TEST_MODE || EventQueue.isDispatchThread(); try { int pos = _getPositionBeforePrompt(); // System.err.println("_promptPos before update = " + _promptPos); diff --git a/drjava/src/edu/rice/cs/util/text/ConsoleDocumentInterface.java b/drjava/src/edu/rice/cs/util/text/ConsoleDocumentInterface.java index 0d072ba54..5c8fab6f5 100644 --- a/drjava/src/edu/rice/cs/util/text/ConsoleDocumentInterface.java +++ b/drjava/src/edu/rice/cs/util/text/ConsoleDocumentInterface.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.util.text; /** A GUI-toolkit agnostic extension of EditDocumentInterface that adds a console input state property. diff --git a/drjava/src/edu/rice/cs/util/text/ConsoleDocumentTest.java b/drjava/src/edu/rice/cs/util/text/ConsoleDocumentTest.java index 4fa5d68d0..0bc6a3344 100644 --- a/drjava/src/edu/rice/cs/util/text/ConsoleDocumentTest.java +++ b/drjava/src/edu/rice/cs/util/text/ConsoleDocumentTest.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.util.text; import javax.swing.text.BadLocationException; diff --git a/drjava/src/edu/rice/cs/util/text/DocumentEditCondition.java b/drjava/src/edu/rice/cs/util/text/DocumentEditCondition.java index 7ff4963c1..9eb777ab3 100644 --- a/drjava/src/edu/rice/cs/util/text/DocumentEditCondition.java +++ b/drjava/src/edu/rice/cs/util/text/DocumentEditCondition.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.util.text; /** Class to decide whether a given edit can be applied to the document. Subclasses can impose conditions on diff --git a/drjava/src/edu/rice/cs/util/text/EditDocumentException.java b/drjava/src/edu/rice/cs/util/text/EditDocumentException.java index 4a291434f..963847c13 100644 --- a/drjava/src/edu/rice/cs/util/text/EditDocumentException.java +++ b/drjava/src/edu/rice/cs/util/text/EditDocumentException.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.util.text; /** Exception thrown indicating an illegal state or operation on an EditDocument. diff --git a/drjava/src/edu/rice/cs/util/text/EditDocumentInterface.java b/drjava/src/edu/rice/cs/util/text/EditDocumentInterface.java index 756a90a99..56d1138c4 100644 --- a/drjava/src/edu/rice/cs/util/text/EditDocumentInterface.java +++ b/drjava/src/edu/rice/cs/util/text/EditDocumentInterface.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.util.text; import java.awt.print.Pageable; @@ -46,7 +38,7 @@ * interface cannot be safely implemented using the primitives in the Swing Document interface. Write locking is * required to safely implement the append method. * - * @version $Id: EditDocumentInterface.java 5544 2012-04-27 15:22:12Z rcartwright $ + * @version $Id$ */ public interface EditDocumentInterface { diff --git a/drjava/src/edu/rice/cs/util/text/ReadersWritersLocking.java b/drjava/src/edu/rice/cs/util/text/ReadersWritersLocking.java index fbdf110b1..3e44e154a 100644 --- a/drjava/src/edu/rice/cs/util/text/ReadersWritersLocking.java +++ b/drjava/src/edu/rice/cs/util/text/ReadersWritersLocking.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.util.text; diff --git a/drjava/src/edu/rice/cs/util/text/SwingDocument.java b/drjava/src/edu/rice/cs/util/text/SwingDocument.java index ca3a04a61..3ee527df4 100644 --- a/drjava/src/edu/rice/cs/util/text/SwingDocument.java +++ b/drjava/src/edu/rice/cs/util/text/SwingDocument.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.util.text; import java.awt.print.Pageable; diff --git a/drjava/src/edu/rice/cs/util/text/SwingDocumentInterface.java b/drjava/src/edu/rice/cs/util/text/SwingDocumentInterface.java index dbd887a45..f7089af3a 100644 --- a/drjava/src/edu/rice/cs/util/text/SwingDocumentInterface.java +++ b/drjava/src/edu/rice/cs/util/text/SwingDocumentInterface.java @@ -1,6 +1,6 @@ /*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: diff --git a/drjava/src/edu/rice/cs/util/text/SwingDocumentTest.java b/drjava/src/edu/rice/cs/util/text/SwingDocumentTest.java index e6e71963a..5ad792885 100644 --- a/drjava/src/edu/rice/cs/util/text/SwingDocumentTest.java +++ b/drjava/src/edu/rice/cs/util/text/SwingDocumentTest.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 diff --git a/dynamicjava/.gitignore b/dynamicjava/.gitignore index 6e7f4a320..2584761c8 100644 --- a/dynamicjava/.gitignore +++ b/dynamicjava/.gitignore @@ -1,3 +1,4 @@ classes/ *.jar - +src/edu/rice/cs/dynamicjava/symbol/type/ +src/koala/dynamicjava/parser/impl/ diff --git a/dynamicjava/src/edu/rice/cs/dynamicjava/interpreter/Interpreter.java b/dynamicjava/src/edu/rice/cs/dynamicjava/interpreter/Interpreter.java index 757717e82..d15b50fa4 100644 --- a/dynamicjava/src/edu/rice/cs/dynamicjava/interpreter/Interpreter.java +++ b/dynamicjava/src/edu/rice/cs/dynamicjava/interpreter/Interpreter.java @@ -13,9 +13,7 @@ import static edu.rice.cs.plt.debug.DebugUtil.debug; -/** - * The external interface for the interpreter. - */ +/** The external interface for the interpreter. */ public class Interpreter { private final Options _opt; diff --git a/javalanglevels/.gitignore b/javalanglevels/.gitignore new file mode 100644 index 000000000..9395e2228 --- /dev/null +++ b/javalanglevels/.gitignore @@ -0,0 +1,2 @@ +classes +javalanglevels-base.jar diff --git a/javalanglevels/build.xml b/javalanglevels/build.xml index a66fcb067..93103f44c 100644 --- a/javalanglevels/build.xml +++ b/javalanglevels/build.xml @@ -30,7 +30,7 @@ - + @@ -55,7 +55,7 @@ - + @@ -275,6 +274,7 @@ + @@ -287,14 +287,7 @@ Testing Targets *************** --> - - - - - - - @@ -384,24 +377,14 @@ - - - - - - - + fork="yes" forkmode="perTest" maxmemory="2G" jvm="${test-jvm}" dir="${basedir}"> - + @@ -488,38 +471,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -563,7 +514,6 @@ - @@ -803,11 +753,6 @@ - - - - - diff --git a/javalanglevels/lib/asm-all-5.0.1.jar b/javalanglevels/lib/asm-all-5.0.1.jar deleted file mode 100644 index 59b27bf81..000000000 Binary files a/javalanglevels/lib/asm-all-5.0.1.jar and /dev/null differ diff --git a/javalanglevels/lib/buildlib/junit.jar b/javalanglevels/lib/buildlib/junit.jar old mode 100755 new mode 100644 index c8f711d05..3a7fc266c Binary files a/javalanglevels/lib/buildlib/junit.jar and b/javalanglevels/lib/buildlib/junit.jar differ diff --git a/javalanglevels/lib/plt.jar b/javalanglevels/lib/plt.jar deleted file mode 100644 index c8f8303b9..000000000 Binary files a/javalanglevels/lib/plt.jar and /dev/null differ diff --git a/javalanglevels/src/edu/rice/cs/javalanglevels/.gitignore b/javalanglevels/src/edu/rice/cs/javalanglevels/.gitignore new file mode 100644 index 000000000..0922be607 --- /dev/null +++ b/javalanglevels/src/edu/rice/cs/javalanglevels/.gitignore @@ -0,0 +1,2 @@ +parser +tree \ No newline at end of file diff --git a/javalanglevels/src/edu/rice/cs/javalanglevels/AdvancedLevelTest.java b/javalanglevels/src/edu/rice/cs/javalanglevels/AdvancedLevelTest.java index 017061084..11d7ac979 100644 --- a/javalanglevels/src/edu/rice/cs/javalanglevels/AdvancedLevelTest.java +++ b/javalanglevels/src/edu/rice/cs/javalanglevels/AdvancedLevelTest.java @@ -117,7 +117,7 @@ public void testSuccessful() { for (int i = 0; i < len3; i++) { testFiles[len1 + len2 + i] = files3[i]; } Pair, LinkedList>> result; - result = llc.convert(testFiles, new Options(JavaVersion.JAVA_6, IterUtil.empty())); + result = llc.convert(testFiles, new Options(JavaVersion.JAVA_8, IterUtil.empty())); // System.err.println("testFiles = " + Arrays.toString(testFiles)); @@ -228,7 +228,7 @@ public boolean accept(File pathName) { LanguageLevelConverter llc = new LanguageLevelConverter(); Pair, LinkedList>> result; for (int i = 0; iempty())); + result = llc.convert(new File[]{testFiles[i]}, new Options(JavaVersion.JAVA_8, IterUtil.empty())); assertTrue("should be parse exceptions or visitor exceptions", !result.getFirst().isEmpty() || !result.getSecond().isEmpty()); } } @@ -247,7 +247,7 @@ public void testPackagedOrderMatters() { LanguageLevelConverter llc = new LanguageLevelConverter(); Pair, LinkedList>> result; - result = llc.convert(testFiles, new Options(JavaVersion.JAVA_6, IterUtil.empty())); + result = llc.convert(testFiles, new Options(JavaVersion.JAVA_8, IterUtil.empty())); // System.err.println("ParseExceptions: " + result.getFirst()); // System.err.println("VisitorExceptions: " + result.getSecond()); diff --git a/javalanglevels/src/edu/rice/cs/javalanglevels/Augmentor.java b/javalanglevels/src/edu/rice/cs/javalanglevels/Augmentor.java index 20af08a08..8fb14b838 100644 --- a/javalanglevels/src/edu/rice/cs/javalanglevels/Augmentor.java +++ b/javalanglevels/src/edu/rice/cs/javalanglevels/Augmentor.java @@ -1497,7 +1497,7 @@ private static LinkedList _getVariableAccessorListHelper(SymbolData VariableData vd = accessorMappings.get(i).getFirst(); MethodData md = accessorMappings.get(i).getSecond(); boolean canSeeMethod = - TypeChecker.checkAccess(new NullLiteral(SourceInfo.NONE), md.getMav(), md.getName(), + d.checkAccess(new NullLiteral(SourceInfo.NONE), md.getMav(), md.getName(), md.getSymbolData(), currClass, "method", false); //TODO: it is okay to throw Runtime exceptions or Errors) { if (canSeeMethod && (! md.hasModifier("static")) && md.getThrown().length == 0 && @@ -1658,7 +1658,7 @@ public void setUp() { _a = new Augmentor(true, null, null, llv); LanguageLevelConverter.symbolTable.clear(); Symboltable _s = LanguageLevelConverter.symbolTable; - LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_6, EmptyIterable.make()); + LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_8, EmptyIterable.make()); } public void testFormalParameters2TypeDatas() { diff --git a/javalanglevels/src/edu/rice/cs/javalanglevels/BodyTypeChecker.java b/javalanglevels/src/edu/rice/cs/javalanglevels/BodyTypeChecker.java index cedf2df7f..3b41ae982 100644 --- a/javalanglevels/src/edu/rice/cs/javalanglevels/BodyTypeChecker.java +++ b/javalanglevels/src/edu/rice/cs/javalanglevels/BodyTypeChecker.java @@ -703,6 +703,7 @@ protected boolean isException(SymbolData sd) { * Returns null if this try-catch statement doesn't necessarily return a value. NOTE: null represents an * ill-formed type or VOID_TYPE, which is ambiguous. */ + protected InstanceData tryCatchLeastCommonType(InstanceData tryBlockRes, InstanceData[] catchBlocksRes, InstanceData finallyBlock_result) { // If tryBlockRes is ill-typed, then the finallyBlock must return a type that meets context constraints @@ -1070,7 +1071,7 @@ public void setUp() { _bd2.addVars(((MethodData)_bd2).getParams()); _bbtc = new BodyTypeChecker(_bd1, new File(""), "", new LinkedList(), new LinkedList(), new LinkedList(), new LinkedList>()); - LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_6, EmptyIterable.make()); + LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_8, EmptyIterable.make()); _bbtc._importedPackages.addFirst("java.lang"); } diff --git a/javalanglevels/src/edu/rice/cs/javalanglevels/ClassBodyTypeChecker.java b/javalanglevels/src/edu/rice/cs/javalanglevels/ClassBodyTypeChecker.java index 1135dfd64..82d13a731 100644 --- a/javalanglevels/src/edu/rice/cs/javalanglevels/ClassBodyTypeChecker.java +++ b/javalanglevels/src/edu/rice/cs/javalanglevels/ClassBodyTypeChecker.java @@ -326,6 +326,7 @@ public TypeData forAbstractMethodDef(AbstractMethodDef that) { for (int i = 0; i < that.getThrows().length; i++) { throwsRes[i] = getSymbolData(that.getThrows()[i].getName(), _symbolData, that.getThrows()[i]); } + /** Commented out because it blows up simple IntList.dj visitor code */ // Ensure that this method doesn't override another method with a different return type. MethodData md = _symbolData.getMethod(that.getName().getText(), paramsRes); if (md == null) { @@ -391,7 +392,7 @@ public void setUp() { _cbbtc = new ClassBodyTypeChecker(_sd1, new File(""), "", new LinkedList(), new LinkedList(), new LinkedList(), new LinkedList>()); - LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_6, EmptyIterable.make()); + LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_8, EmptyIterable.make()); _cbbtc._importedPackages.addFirst("java.lang"); } @@ -634,43 +635,44 @@ intt, new Word(SourceInfo.NONE, "myMethod3"), new FormalParameter[] {param}, assertEquals("There should still be 2 errors", 2, errors.size()); } - public void testCheckDifferentReturnTypes() { - SymbolData superSd = new SymbolData("aiya"); - _sd1.setSuperClass(superSd); - MethodData md3 = new MethodData("methodName", - _publicMav, - new TypeParameter[0], - SymbolData.CHAR_TYPE, - new VariableData[0], - new String[0], - null, - null); - superSd.addMethod(md3); - MethodData md4 = new MethodData("methodName", - _publicMav, - new TypeParameter[0], - SymbolData.INT_TYPE, - new VariableData[0], - new String[0], - superSd, - null); - MethodDef mDef = new ConcreteMethodDef(SourceInfo.NONE, _publicMav, new TypeParameter[0], new PrimitiveType(SourceInfo.NONE, "int"), - new Word(SourceInfo.NONE, "methodName"), new FormalParameter[0], new ReferenceType[0], - new BracedBody(SourceInfo.NONE, new BodyItemI[] {new ValueReturnStatement(SourceInfo.NONE, new IntegerLiteral(SourceInfo.NONE, 76))})); - _sd1.addMethod(md4); - _cbbtc._symbolData = _sd1; - mDef.visit(_cbbtc); - assertEquals("There should be one error.", 1, errors.size()); - assertEquals("The error message should be correct", "methodName() in " + _sd1.getName() + " cannot override methodName() in aiya; attempting to use different return types", - errors.get(0).getFirst()); - mDef = new AbstractMethodDef(SourceInfo.NONE, _publicMav, new TypeParameter[0], new PrimitiveType(SourceInfo.NONE, "int"), - new Word(SourceInfo.NONE, "methodName"), new FormalParameter[0], new ReferenceType[0]); - - mDef.visit(_cbbtc); - assertEquals("There should be two errors.", 2, errors.size()); - assertEquals("The error message should be correct", "methodName() in " + _sd1.getName() + " cannot override methodName() in aiya; attempting to use different return types", - errors.get(1).getFirst()); - } + /* Commented out because this check breaks a very simply Functional Java example program: IntList.dj */ +// public void testCheckDifferentReturnTypes() { +// SymbolData superSd = new SymbolData("aiya"); +// _sd1.setSuperClass(superSd); +// MethodData md3 = new MethodData("methodName", +// _publicMav, +// new TypeParameter[0], +// SymbolData.CHAR_TYPE, +// new VariableData[0], +// new String[0], +// null, +// null); +// superSd.addMethod(md3); +// MethodData md4 = new MethodData("methodName", +// _publicMav, +// new TypeParameter[0], +// SymbolData.INT_TYPE, +// new VariableData[0], +// new String[0], +// superSd, +// null); +// MethodDef mDef = new ConcreteMethodDef(SourceInfo.NONE, _publicMav, new TypeParameter[0], new PrimitiveType(SourceInfo.NONE, "int"), +// new Word(SourceInfo.NONE, "methodName"), new FormalParameter[0], new ReferenceType[0], +// new BracedBody(SourceInfo.NONE, new BodyItemI[] {new ValueReturnStatement(SourceInfo.NONE, new IntegerLiteral(SourceInfo.NONE, 76))})); +// _sd1.addMethod(md4); +// _cbbtc._symbolData = _sd1; +// mDef.visit(_cbbtc); +// assertEquals("There should be one error.", 1, errors.size()); +// assertEquals("The error message should be correct", "methodName() in " + _sd1.getName() + " cannot override methodName() in aiya; attempting to use different return types", +// errors.get(0).getFirst()); +// mDef = new AbstractMethodDef(SourceInfo.NONE, _publicMav, new TypeParameter[0], new PrimitiveType(SourceInfo.NONE, "int"), +// new Word(SourceInfo.NONE, "methodName"), new FormalParameter[0], new ReferenceType[0]); +// +// mDef.visit(_cbbtc); +// assertEquals("There should be two errors.", 2, errors.size()); +// assertEquals("The error message should be correct", "methodName() in " + _sd1.getName() + " cannot override methodName() in aiya; attempting to use different return types", +// errors.get(1).getFirst()); +// } public void testForTypeOnly() { Type t = new PrimitiveType(SourceInfo.NONE, "double"); diff --git a/javalanglevels/src/edu/rice/cs/javalanglevels/ElementaryLevelTest.java b/javalanglevels/src/edu/rice/cs/javalanglevels/ElementaryLevelTest.java index 3b2e4ec12..30fde9fca 100644 --- a/javalanglevels/src/edu/rice/cs/javalanglevels/ElementaryLevelTest.java +++ b/javalanglevels/src/edu/rice/cs/javalanglevels/ElementaryLevelTest.java @@ -56,9 +56,7 @@ public class ElementaryLevelTest extends TestCase { File directory; - public void setUp() { - directory = new File("testFiles" + File.separatorChar + "forElementaryLevelTest"); - } + public void setUp() { directory = new File("testFiles" + File.separatorChar + "forElementaryLevelTest"); } // public void assertEquals(String s, Data answer, Data testValue) { // if (! answer.equals(testValue)) @@ -72,11 +70,13 @@ public void testSuccessful() { File[] testFiles = directory.listFiles(new FileFilter() { public boolean accept(File pathName) { return pathName.getAbsolutePath().endsWith(".dj0"); } }); + LanguageLevelConverter._log.log("testFiles for testSuccessful = " + Arrays.toString(testFiles)); for (File f: testFiles) { final LanguageLevelConverter llc = new LanguageLevelConverter(); final Pair, LinkedList>> result = - llc.convert(new File[]{f}, new Options(JavaVersion.JAVA_6, IterUtil.make(new File("lib/buildlib/junit.jar")))); + llc.convert(new File[]{f}, new Options(JavaVersion.JAVA_8, IterUtil.make(new File("lib/buildlib/junit.jar")))); + // System.err.println("Visitor exception #1 = " + result.getSecond().getFirst()); // fail("Dumping System.err"); assertEquals("should be no parse exceptions", new LinkedList(), result.getFirst()); @@ -120,14 +120,14 @@ public boolean accept(File pathName) { final LanguageLevelConverter llc = new LanguageLevelConverter(); // System.err.println("TESTING " + f); final Pair, LinkedList>> result = - llc.convert(new File[]{f}, new Options(JavaVersion.JAVA_6, EmptyIterable.make())); + llc.convert(new File[]{f}, new Options(JavaVersion.JAVA_8, EmptyIterable.make())); + // System.err.println("Test result = " + result); assertTrue("should be parse or visitor exceptions in file " + f.getName(), ! result.getFirst().isEmpty() || ! result.getSecond().isEmpty()); } } - // TODO: !!! Reinstate this test; it breaks on Subclass.dj0 /** Tests that when some files have already been compiled, the .java files are not generated for those files, * and files that reference those files are augmented correctly. */ @@ -144,7 +144,7 @@ public boolean accept(File pathName) { for (File f: testFiles) { final LanguageLevelConverter llc = new LanguageLevelConverter(); final Pair, LinkedList>> result = - llc.convert(new File[]{f}, new Options(JavaVersion.JAVA_6, EmptyIterable.make())); + llc.convert(new File[]{f}, new Options(JavaVersion.JAVA_8, EmptyIterable.make())); assertEquals("should be no parse exceptions", new LinkedList(), result.getFirst()); assertEquals("should be no visitor exceptions", new LinkedList>(), result.getSecond()); @@ -187,7 +187,7 @@ public void testOrderMatters() { LanguageLevelConverter llc = new LanguageLevelConverter(); Pair, LinkedList>> result; // System.err.println("files for testOrderMatters = " + Arrays.toString(files)); - result = llc.convert(files, new Options(JavaVersion.JAVA_6, EmptyIterable.make())); + result = llc.convert(files, new Options(JavaVersion.JAVA_8, EmptyIterable.make())); assertEquals("should be no parse exceptions", new LinkedList(), result.getFirst()); assertEquals("should be 1 visitor exception", 1, result.getSecond().size()); @@ -203,7 +203,7 @@ public void testEmptyFileNoAction() { File[] files = new File[]{ new File(directory, "EmptyFile.dj0")}; LanguageLevelConverter llc = new LanguageLevelConverter(); Pair, LinkedList>> result; - result = llc.convert(files, new Options(JavaVersion.JAVA_6, EmptyIterable.make())); + result = llc.convert(files, new Options(JavaVersion.JAVA_8, EmptyIterable.make())); assertEquals("should be no parse exceptions", new LinkedList(), result.getFirst()); assertEquals("should be no visitor exceptions", 0, result.getSecond().size()); @@ -221,7 +221,7 @@ public boolean accept(File pathName) { for (File f: testFiles) { final LanguageLevelConverter llc = new LanguageLevelConverter(); final Pair, LinkedList>> result = - llc.convert(new File[]{f}, new Options(JavaVersion.JAVA_6, EmptyIterable.make())); + llc.convert(new File[]{f}, new Options(JavaVersion.JAVA_8, EmptyIterable.make())); assertEquals("should be no parse exceptions", new LinkedList(), result.getFirst()); assertEquals("should be no visitor exceptions", new LinkedList>(), result.getSecond()); @@ -229,7 +229,7 @@ public boolean accept(File pathName) { // for (int i = 0; i make())); +// result = llc5.convert(new File[]{testFiles[i]}, new Options(JavaVersion.JAVA_8, EmptyIterable.make())); // // assertEquals("should be no parse exceptions", new LinkedList(), result.getFirst()); // assertEquals("should be no visitor exceptions", new LinkedList>(), result.getSecond()); diff --git a/javalanglevels/src/edu/rice/cs/javalanglevels/ExpressionTypeChecker.java b/javalanglevels/src/edu/rice/cs/javalanglevels/ExpressionTypeChecker.java index 36b982e3d..61bcdd7b3 100644 --- a/javalanglevels/src/edu/rice/cs/javalanglevels/ExpressionTypeChecker.java +++ b/javalanglevels/src/edu/rice/cs/javalanglevels/ExpressionTypeChecker.java @@ -1430,20 +1430,17 @@ public TypeData forConditionalExpressionOnly(ConditionalExpression that) { TypeData conseqType = conseq.visit(this); TypeData altType = alt.visit(this); TypeData returnType = getCommonSuperType(conseqType.getSymbolData(), altType.getSymbolData()); - -// System.err.println("[ETC.forCondExprOnly] conditionType = " + conditionType + ", conseqType = " + conseqType + -// ", alttype = " + altType); - - if (! conditionType.getSymbolData().isAssignableTo(SymbolData.BOOLEAN_TYPE, true)) { + + if (! conditionType.equals(SymbolData.BOOLEAN_TYPE)) { _addError("The test in this conditional has type " + conditionType.getName() + " instead of boolean.", that); return returnType; } - - if (returnType == null) { + else if (returnType == null) { _addError("The type " + conseqType.getName() + " of the consequent and the type " + altType.getName() + "of this conditional are not compatible", that); return returnType; - } + } + return returnType; } @@ -1753,7 +1750,7 @@ public void setUp() { _etc = new ExpressionTypeChecker(null, new File(""), "", new LinkedList(), new LinkedList(), new LinkedList(), new LinkedList>()); - LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_6, EmptyIterable.make()); + LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_8, EmptyIterable.make()); _etc._importedPackages.addFirst("java.lang"); _sd1 = new SymbolData("i.like.monkey"); _sd2 = new SymbolData("i.like.giraffe"); diff --git a/javalanglevels/src/edu/rice/cs/javalanglevels/FullJavaVisitor.java b/javalanglevels/src/edu/rice/cs/javalanglevels/FullJavaVisitor.java index b9180bb04..15dc5adb7 100644 --- a/javalanglevels/src/edu/rice/cs/javalanglevels/FullJavaVisitor.java +++ b/javalanglevels/src/edu/rice/cs/javalanglevels/FullJavaVisitor.java @@ -551,7 +551,7 @@ public void setUp() { errors = new LinkedList>(); LanguageLevelConverter.symbolTable.clear(); LanguageLevelConverter._newSDs.clear(); - LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_6, IterUtil.make(new File("lib/buildlib/junit.jar"))); + LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_8, IterUtil.make(new File("lib/buildlib/junit.jar"))); visitedFiles = new LinkedList>(); // _hierarchy = new Hashtable(); _fv = new FullJavaVisitor(new File(""), diff --git a/javalanglevels/src/edu/rice/cs/javalanglevels/InterfaceBodyFullJavaVisitor.java b/javalanglevels/src/edu/rice/cs/javalanglevels/InterfaceBodyFullJavaVisitor.java index 36655bfaa..4fa57dd30 100644 --- a/javalanglevels/src/edu/rice/cs/javalanglevels/InterfaceBodyFullJavaVisitor.java +++ b/javalanglevels/src/edu/rice/cs/javalanglevels/InterfaceBodyFullJavaVisitor.java @@ -262,7 +262,7 @@ public void setUp() { errors = new LinkedList>(); LanguageLevelConverter.symbolTable.clear(); LanguageLevelConverter._newSDs.clear(); - LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_6, IterUtil.make(new File("lib/buildlib/junit.jar"))); + LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_8, IterUtil.make(new File("lib/buildlib/junit.jar"))); visitedFiles = new LinkedList>(); @@ -383,8 +383,8 @@ public void testForComplexSuperReferenceDoFirst() { public void xtestForVariableDeclarationDoFirst() { //Check that if a field is initialized, no error is thrown VariableDeclaration vdecl0 = new VariableDeclaration(SourceInfo.NONE, - _packageMav, - new VariableDeclarator[] { + _packageMav, + new VariableDeclarator[] { new InitializedVariableDeclarator(SourceInfo.NONE, new PrimitiveType(SourceInfo.NONE, "double"), new Word (SourceInfo.NONE, "field0"), diff --git a/javalanglevels/src/edu/rice/cs/javalanglevels/InterfaceBodyIntermediateVisitor.java b/javalanglevels/src/edu/rice/cs/javalanglevels/InterfaceBodyIntermediateVisitor.java index 4dc7b248a..64abb01c1 100644 --- a/javalanglevels/src/edu/rice/cs/javalanglevels/InterfaceBodyIntermediateVisitor.java +++ b/javalanglevels/src/edu/rice/cs/javalanglevels/InterfaceBodyIntermediateVisitor.java @@ -204,7 +204,7 @@ public void setUp() { errors = new LinkedList>(); LanguageLevelConverter.symbolTable.clear(); LanguageLevelConverter._newSDs.clear(); - LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_6, IterUtil.make(new File("lib/buildlib/junit.jar"))); + LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_8, IterUtil.make(new File("lib/buildlib/junit.jar"))); visitedFiles = new LinkedList>(); // _hierarchy = new Hashtable(); _ibiv = diff --git a/javalanglevels/src/edu/rice/cs/javalanglevels/InterfaceBodyTypeChecker.java b/javalanglevels/src/edu/rice/cs/javalanglevels/InterfaceBodyTypeChecker.java index ce93985b5..9ffb49cda 100644 --- a/javalanglevels/src/edu/rice/cs/javalanglevels/InterfaceBodyTypeChecker.java +++ b/javalanglevels/src/edu/rice/cs/javalanglevels/InterfaceBodyTypeChecker.java @@ -176,7 +176,7 @@ public void setUp() { _ibbtc = new InterfaceBodyTypeChecker(_sd1, new File(""), "", new LinkedList(), new LinkedList(), new LinkedList(), new LinkedList>()); - LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_6, EmptyIterable.make()); + LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_8, EmptyIterable.make()); _ibbtc._importedPackages.addFirst("java.lang"); } diff --git a/javalanglevels/src/edu/rice/cs/javalanglevels/IntermediateLevelTest.java b/javalanglevels/src/edu/rice/cs/javalanglevels/IntermediateLevelTest.java index 7bcd63c96..49b2697fb 100644 --- a/javalanglevels/src/edu/rice/cs/javalanglevels/IntermediateLevelTest.java +++ b/javalanglevels/src/edu/rice/cs/javalanglevels/IntermediateLevelTest.java @@ -80,7 +80,7 @@ public void testSuccessful() { // System.err.println("testFiles for IntermediateLevelTest.testSuccessful = " + Arrays.toString(testFiles)); LanguageLevelConverter llc = new LanguageLevelConverter(); Pair, LinkedList>> result; - result = llc.convert(testFiles, new Options(JavaVersion.JAVA_6, IterUtil.make(new File("lib/buildlib/junit.jar")))); + result = llc.convert(testFiles, new Options(JavaVersion.JAVA_8, IterUtil.make(new File("lib/buildlib/junit.jar")))); // System.err.flush(); assertEquals("should be no parse exceptions", new LinkedList(), result.getFirst()); @@ -128,7 +128,7 @@ public boolean accept(File pathName) { // System.err.println("TESTING " + testFiles[i]); LanguageLevelConverter llc1 = new LanguageLevelConverter(); // System.err.println("Checking " + testFiles[i]); - result = llc1.convert(new File[] {testFiles[i]}, new Options(JavaVersion.JAVA_6, EmptyIterable.make())); + result = llc1.convert(new File[] {testFiles[i]}, new Options(JavaVersion.JAVA_8, EmptyIterable.make())); assertTrue("should be parse exceptions or visitor exceptions in file " + testFiles[i].getName(), ! result.getFirst().isEmpty() || ! result.getSecond().isEmpty()); } @@ -136,7 +136,7 @@ public boolean accept(File pathName) { /* Take care of the "references" directory */ LanguageLevelConverter llc2 = new LanguageLevelConverter(); File f = new File(new File(directory, "references"), "ReferencingClass.dj1"); - result = llc2.convert(new File[] { f }, new Options(JavaVersion.JAVA_6, EmptyIterable.make())); + result = llc2.convert(new File[] { f }, new Options(JavaVersion.JAVA_8, EmptyIterable.make())); assertTrue("should be parse exceptions or visitor exceptions in file " + f.getName(), ! result.getFirst().isEmpty() || ! result.getSecond().isEmpty()); } @@ -148,7 +148,7 @@ public void test14Augmentation() { LanguageLevelConverter llc = new LanguageLevelConverter(); Pair, LinkedList>> result; assert llc._newSDs != null; - result = llc.convert(arrayF, new Options(JavaVersion.JAVA_6, EmptyIterable.make())); + result = llc.convert(arrayF, new Options(JavaVersion.JAVA_8, EmptyIterable.make())); assertEquals("should be no parse exceptions", new LinkedList(), result.getFirst()); assertEquals("should be no visitor exceptions", new LinkedList>(), result.getSecond()); diff --git a/javalanglevels/src/edu/rice/cs/javalanglevels/IntermediateVisitor.java b/javalanglevels/src/edu/rice/cs/javalanglevels/IntermediateVisitor.java index 689fefd77..1a4a7befe 100644 --- a/javalanglevels/src/edu/rice/cs/javalanglevels/IntermediateVisitor.java +++ b/javalanglevels/src/edu/rice/cs/javalanglevels/IntermediateVisitor.java @@ -669,7 +669,7 @@ public void setUp() { errors = new LinkedList>(); LanguageLevelConverter.symbolTable.clear(); LanguageLevelConverter._newSDs.clear(); - LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_6, IterUtil.make(new File("lib/buildlib/junit.jar"))); + LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_8, IterUtil.make(new File("lib/buildlib/junit.jar"))); visitedFiles = new LinkedList>(); // _hierarchy = new Hashtable(); @@ -678,7 +678,7 @@ public void setUp() { continuations, new LinkedList(), new LinkedList>()); - LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_6, IterUtil.make(new File("lib/buildlib/junit.jar"))); + LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_8, IterUtil.make(new File("lib/buildlib/junit.jar"))); _iv._classesInThisFile = new HashSet(); _iv.continuations = new Hashtable>(); // _iv._resetNonStaticFields(); diff --git a/javalanglevels/src/edu/rice/cs/javalanglevels/LValueTypeChecker.java b/javalanglevels/src/edu/rice/cs/javalanglevels/LValueTypeChecker.java index 81fa40a68..09dd08dc8 100644 --- a/javalanglevels/src/edu/rice/cs/javalanglevels/LValueTypeChecker.java +++ b/javalanglevels/src/edu/rice/cs/javalanglevels/LValueTypeChecker.java @@ -270,7 +270,7 @@ public void setUp() { _ta = _lvtc._testAssignableInstance; _lvtc._bob.errors = new LinkedList>(); LanguageLevelConverter.symbolTable.clear(); -// LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_6, IterUtil.empty()); +// LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_8, IterUtil.empty()); _lvtc._bob._importedPackages.addFirst("java.lang"); } diff --git a/javalanglevels/src/edu/rice/cs/javalanglevels/LValueWithValueTypeChecker.java b/javalanglevels/src/edu/rice/cs/javalanglevels/LValueWithValueTypeChecker.java index f96889b4d..664783a23 100644 --- a/javalanglevels/src/edu/rice/cs/javalanglevels/LValueWithValueTypeChecker.java +++ b/javalanglevels/src/edu/rice/cs/javalanglevels/LValueWithValueTypeChecker.java @@ -263,7 +263,7 @@ public void setUp() { _ta = _lvtc._testAssignableInstance; _lvtc._bob.errors = new LinkedList>(); LanguageLevelConverter.symbolTable.clear(); -// LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_6, IterUtil.empty()); +// LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_8, IterUtil.empty()); _lvtc._bob._importedPackages.addFirst("java.lang"); } diff --git a/javalanglevels/src/edu/rice/cs/javalanglevels/LanguageLevelConverter.java b/javalanglevels/src/edu/rice/cs/javalanglevels/LanguageLevelConverter.java index 18a546210..d8b4eb6c0 100644 --- a/javalanglevels/src/edu/rice/cs/javalanglevels/LanguageLevelConverter.java +++ b/javalanglevels/src/edu/rice/cs/javalanglevels/LanguageLevelConverter.java @@ -158,7 +158,9 @@ public static SymbolData _classFile2SymbolData(String qualifiedClassName) { /** Uses the ASM class reader to read the class file corresponding to the class in the specified directory, and uses * the information from ASM to build a SymbolData corresponding to the class. Ensures that the returned SymbolData - * (if any) is inserted in the symbolTable. + * (if any) is inserted in the symbolTable. Silently fails returning null instead of throwing an exception. + * Relies on fact that a static variable, namely LanguageLevelConverter.symbolTable holds the symbol table. UGHH!! + * There should be a symbol table object and this method should be an instance method of that object!! * @param qualifiedClassName The fully qualified class name of the class we are looking up * @param programRoot The directory where the class is located. * @return The SymbolData for the class file if the class file was found; null otherwise. @@ -793,7 +795,7 @@ public static void main(String[] args) { } Pair, LinkedList>> result = - llc.convert(files, new Options(JavaVersion.JAVA_6, + llc.convert(files, new Options(JavaVersion.JAVA_8, IOUtil.parsePath(System.getProperty("java.class.path", "")))); System.out.println(result.getFirst().size() + result.getSecond().size() + " errors."); for(JExprParseException p : result.getFirst()) { diff --git a/javalanglevels/src/edu/rice/cs/javalanglevels/LanguageLevelVisitor.java b/javalanglevels/src/edu/rice/cs/javalanglevels/LanguageLevelVisitor.java index ce5e601af..91b09af82 100644 --- a/javalanglevels/src/edu/rice/cs/javalanglevels/LanguageLevelVisitor.java +++ b/javalanglevels/src/edu/rice/cs/javalanglevels/LanguageLevelVisitor.java @@ -78,7 +78,7 @@ public class LanguageLevelVisitor extends JExpressionIFPrunableDepthFirstVisitor protected static LinkedList> errors; /** Stores the classes we have referenced, and all their information, once they are resolved. Bound to static field - * LanguageLevelConverter.symboltable. */ + * LanguageLevelConverter.symboltable. UGHH!! WHY?? */ public final Symboltable symbolTable; /** A table of the names of symbols for which dummy symbol entries (continuations) have been created and resolution @@ -120,7 +120,7 @@ public class LanguageLevelVisitor extends JExpressionIFPrunableDepthFirstVisitor /** A list of package names imported by the current file. */ LinkedList _importedPackages; - // A mapping from in scope generic type parameters to their bounds. + // A mapping from in scope generic type parameters to their bounds. // Why are we processing generic types? public HashMap _genericTypes; /** The fully qualified class names for top level ClassDefs and InterfaceDefs in the current file that have not diff --git a/javalanglevels/src/edu/rice/cs/javalanglevels/Options.java b/javalanglevels/src/edu/rice/cs/javalanglevels/Options.java index beb098b70..fadc7feb2 100644 --- a/javalanglevels/src/edu/rice/cs/javalanglevels/Options.java +++ b/javalanglevels/src/edu/rice/cs/javalanglevels/Options.java @@ -47,7 +47,7 @@ public class Options { private final Iterable _bootClassPath; private final Iterable _classPath; - public static final Options DEFAULT = new Options(JavaVersion.JAVA_6, EmptyIterable.make()); + public static final Options DEFAULT = new Options(JavaVersion.JAVA_8, EmptyIterable.make()); public Options(JavaVersion javaVersion, Iterable classPath) { this(javaVersion, classPath, IOUtil.parsePath(System.getProperty("sun.boot.class.path", ""))); diff --git a/javalanglevels/src/edu/rice/cs/javalanglevels/SpecialTypeChecker.java b/javalanglevels/src/edu/rice/cs/javalanglevels/SpecialTypeChecker.java index f1e4a24bd..ed91711ad 100644 --- a/javalanglevels/src/edu/rice/cs/javalanglevels/SpecialTypeChecker.java +++ b/javalanglevels/src/edu/rice/cs/javalanglevels/SpecialTypeChecker.java @@ -581,7 +581,7 @@ public void setUp() { LanguageLevelConverter.symbolTable.clear(); _stc = new SpecialTypeChecker(null, new File(""), "", new LinkedList(), new LinkedList(), new LinkedList(), new LinkedList>()); - LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_6, EmptyIterable.make()); + LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_8, EmptyIterable.make()); _stc._importedPackages.addFirst("java.lang"); _sd1 = new SymbolData("i.like.monkey"); _sd2 = new SymbolData("i.like.giraffe"); diff --git a/javalanglevels/src/edu/rice/cs/javalanglevels/Symboltable.java b/javalanglevels/src/edu/rice/cs/javalanglevels/Symboltable.java index f42b8c15d..4e3490c0f 100644 --- a/javalanglevels/src/edu/rice/cs/javalanglevels/Symboltable.java +++ b/javalanglevels/src/edu/rice/cs/javalanglevels/Symboltable.java @@ -37,7 +37,8 @@ package edu.rice.cs.javalanglevels; import java.util.*; -/** This class extends Hashtable so that we can have extra functionality in the put function. +/** This class is obselescent. It now has no function. + * This class extends Hashtable so that we can have extra functionality in the put function. * A Symboltable is specifically a Hashtable of Strings to SymbolData. The put function * checks to see if the specified SymbolData is already in the table. If so, it simply updates its * fields. diff --git a/javalanglevels/src/edu/rice/cs/javalanglevels/TryCatchBodyTypeChecker.java b/javalanglevels/src/edu/rice/cs/javalanglevels/TryCatchBodyTypeChecker.java index ea29ab7bd..65c42cf61 100644 --- a/javalanglevels/src/edu/rice/cs/javalanglevels/TryCatchBodyTypeChecker.java +++ b/javalanglevels/src/edu/rice/cs/javalanglevels/TryCatchBodyTypeChecker.java @@ -157,7 +157,7 @@ public void setUp() { _bd1.addEnclosingData(_sd1); _bd1.addFinalVars(((MethodData)_bd1).getParams()); _tcbtc = new TryCatchBodyTypeChecker(_bd1, new File(""), "", new LinkedList(), new LinkedList(), new LinkedList(), new LinkedList>()); - LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_6, EmptyIterable.make()); + LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_8, EmptyIterable.make()); _tcbtc._importedPackages.addFirst("java.lang"); } diff --git a/javalanglevels/src/edu/rice/cs/javalanglevels/TypeChecker.java b/javalanglevels/src/edu/rice/cs/javalanglevels/TypeChecker.java index e12928dd4..35d6db9aa 100644 --- a/javalanglevels/src/edu/rice/cs/javalanglevels/TypeChecker.java +++ b/javalanglevels/src/edu/rice/cs/javalanglevels/TypeChecker.java @@ -49,7 +49,12 @@ import junit.framework.TestCase; /** Does Type Checking that is not dependent on the enclosing body. Also does top level type checking. Common - * to all langauge levels. */ + * to all langauge levels. + * Where is the symbol table?? It is buried in a static field of LanguageLevelConverter. In an older version of + * this code, it was apparently passed to the constructor of this class as an argument (a much better design), but this + * design was abandoned when refactoring should have been performed instead. There is no symbol table class and methods + * naturally belonging to this class were implemented as static methods (!!); these methods could not easily reach + * the symbol table unless it too was made static. Horrible design. */ public class TypeChecker extends JExpressionIFDepthFirstVisitor implements JExpressionIFVisitor { public static final SourceInfo NONE = SourceInfo.NONE; @@ -195,13 +200,15 @@ else if (result == SymbolData.AMBIGUOUS_REFERENCE) { } /** Returns the SymbolData corresponding to the name className, assuming that className - * does not refer to an unqualified or partially-qualified inner class. + * does not refer to an unqualified or partially-qualified inner class. What are the extra parameters for? Should + * this be re-implemented as LanguageLevelConverter.symbolTable.get ?? It is UGLY but simple. * */ public SymbolData getSymbolData(String className, JExpression jexpr, boolean giveException, boolean runnableNotOkay) { // Check qualified class name (which is no different at elementary level) SourceInfo si = jexpr.getSourceInfo(); // Create a dummy LLV; this seems awkward. TODO: refactor + // This code is not awkward; it is OBSCENE. symbolTable is static in LanguageLevelConverter. A code stench. LanguageLevelVisitor llv = new LanguageLevelVisitor(_file, _package, @@ -872,6 +879,7 @@ protected static SymbolData getCommonSuperType(SymbolData s1, SymbolData s2) { // System.err.println("Boxed Types are: " + s1 + ", " + s2); // System.err.println("Boxed Types from symbolTable are: " + symbolTable.get("java.lang.Byte") + ", " + // symbolTable.get("java.lang.Boolean")); + sd = getCommonSuperType(s1.getSuperClass(), s2); if (sd != null) { // System.err.println("CommonSuperType is " + sd); @@ -1367,7 +1375,7 @@ public void setUp() { LanguageLevelConverter.loadSymbolTable(); _btc = new TypeChecker(new File(""), "", new LinkedList(), new LinkedList()); - LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_6, EmptyIterable.make()); + LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_8, EmptyIterable.make()); _btc._importedPackages.addFirst("java.lang"); _errorAdded = false; @@ -1895,7 +1903,7 @@ public void test_isAssignableFrom() { assertTrue("Should be able to assign an array to an interface of java.io.Serializable", _btc._isAssignableFrom(symbolTable.get("java.io.Serializable"), integerArray)); - LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_6, EmptyIterable.make()); + LanguageLevelConverter.OPT = new Options(JavaVersion.JAVA_8, EmptyIterable.make()); assertFalse("Should not be assignable.", _btc._isAssignableFrom(symbolTable.get("java.lang.Double"), SymbolData.INT_TYPE)); assertFalse("Should not be assignable.", diff --git a/platform/.gitignore b/platform/.gitignore new file mode 100644 index 000000000..bc520d7a0 --- /dev/null +++ b/platform/.gitignore @@ -0,0 +1 @@ +platform.jar diff --git a/platform/build.xml b/platform/build.xml index b0d5dedcd..0cabfe5c6 100644 --- a/platform/build.xml +++ b/platform/build.xml @@ -31,14 +31,21 @@ - + - + - + + + + + + @@ -85,6 +92,7 @@ + @@ -150,6 +158,9 @@ that is not possible, later versions are used. Note that if there are dependencies on later APIs, the DrJava application is responsible for ensuring that those classes are only loaded when the necessary APIs are available. --> + + @@ -221,23 +232,33 @@ - - - - + + + - - + - - - + + + + + + + + + + + + @@ -268,11 +289,12 @@ + + verbose="true" debug="on" optimize="off" deprecation="on"> @@ -303,7 +325,62 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -427,6 +504,15 @@ + + + + + + + + @@ -576,6 +662,7 @@ + @@ -597,6 +684,7 @@ + @@ -624,6 +712,7 @@ + @@ -891,6 +980,7 @@ + @@ -925,6 +1015,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1061,11 +1185,13 @@ + + diff --git a/platform/classes/base-eclipse/edu/rice/cs/drjava/model/compiler/EclipseCompiler$1.class b/platform/classes/base-eclipse/edu/rice/cs/drjava/model/compiler/EclipseCompiler$1.class index 839362a30..b6743a3d5 100644 Binary files a/platform/classes/base-eclipse/edu/rice/cs/drjava/model/compiler/EclipseCompiler$1.class and b/platform/classes/base-eclipse/edu/rice/cs/drjava/model/compiler/EclipseCompiler$1.class differ diff --git a/platform/classes/base-eclipse/edu/rice/cs/drjava/model/compiler/EclipseCompiler.class b/platform/classes/base-eclipse/edu/rice/cs/drjava/model/compiler/EclipseCompiler.class index b43fb9f6f..eda253624 100644 Binary files a/platform/classes/base-eclipse/edu/rice/cs/drjava/model/compiler/EclipseCompiler.class and b/platform/classes/base-eclipse/edu/rice/cs/drjava/model/compiler/EclipseCompiler.class differ diff --git a/platform/classes/base-eclipse/edu/rice/cs/drjava/model/compiler/descriptors/EclipseDescriptor.class b/platform/classes/base-eclipse/edu/rice/cs/drjava/model/compiler/descriptors/EclipseDescriptor.class index 3b4b749ae..9ebe025b6 100644 Binary files a/platform/classes/base-eclipse/edu/rice/cs/drjava/model/compiler/descriptors/EclipseDescriptor.class and b/platform/classes/base-eclipse/edu/rice/cs/drjava/model/compiler/descriptors/EclipseDescriptor.class differ diff --git a/platform/classes/base-hj/edu/rice/cs/drjava/model/compiler/HjCompiler$1.class b/platform/classes/base-hj/edu/rice/cs/drjava/model/compiler/HjCompiler$1.class old mode 100644 new mode 100755 diff --git a/platform/classes/base-hj/edu/rice/cs/drjava/model/compiler/HjCompiler.class b/platform/classes/base-hj/edu/rice/cs/drjava/model/compiler/HjCompiler.class old mode 100644 new mode 100755 diff --git a/platform/classes/base-hj/edu/rice/cs/drjava/model/compiler/descriptors/HjDescriptor.class b/platform/classes/base-hj/edu/rice/cs/drjava/model/compiler/descriptors/HjDescriptor.class old mode 100644 new mode 100755 diff --git a/platform/classes/base-jdk5/edu/rice/cs/drjava/model/compiler/Javac150Compiler$1.class b/platform/classes/base-jdk5/edu/rice/cs/drjava/model/compiler/Javac150Compiler$1.class old mode 100644 new mode 100755 diff --git a/platform/classes/base-jdk5/edu/rice/cs/drjava/model/compiler/Javac150Compiler$OurLog.class b/platform/classes/base-jdk5/edu/rice/cs/drjava/model/compiler/Javac150Compiler$OurLog.class old mode 100644 new mode 100755 diff --git a/platform/classes/base-jdk5/edu/rice/cs/drjava/model/compiler/Javac150Compiler.class b/platform/classes/base-jdk5/edu/rice/cs/drjava/model/compiler/Javac150Compiler.class old mode 100644 new mode 100755 diff --git a/platform/classes/base-jdk6/edu/rice/cs/drjava/model/compiler/Javac160Compiler$1.class b/platform/classes/base-jdk6/edu/rice/cs/drjava/model/compiler/Javac160Compiler$1.class old mode 100644 new mode 100755 diff --git a/platform/classes/base-jdk6/edu/rice/cs/drjava/model/compiler/Javac160Compiler$CompilerErrorListener.class b/platform/classes/base-jdk6/edu/rice/cs/drjava/model/compiler/Javac160Compiler$CompilerErrorListener.class old mode 100644 new mode 100755 diff --git a/platform/classes/base-jdk6/edu/rice/cs/drjava/model/compiler/Javac160Compiler.class b/platform/classes/base-jdk6/edu/rice/cs/drjava/model/compiler/Javac160Compiler.class old mode 100644 new mode 100755 diff --git a/platform/classes/base-jdk7/edu/rice/cs/drjava/model/compiler/Javac170Compiler$1.class b/platform/classes/base-jdk7/edu/rice/cs/drjava/model/compiler/Javac170Compiler$1.class old mode 100644 new mode 100755 diff --git a/platform/classes/base-jdk7/edu/rice/cs/drjava/model/compiler/Javac170Compiler.class b/platform/classes/base-jdk7/edu/rice/cs/drjava/model/compiler/Javac170Compiler.class old mode 100644 new mode 100755 diff --git a/platform/classes/base-mac-java-8/edu/rice/cs/drjava/model/compiler/descriptors/SoyLatteDescriptor.class b/platform/classes/base-mac-java-8/edu/rice/cs/drjava/model/compiler/descriptors/SoyLatteDescriptor.class new file mode 100644 index 000000000..cf39d5bf9 Binary files /dev/null and b/platform/classes/base-mac-java-8/edu/rice/cs/drjava/model/compiler/descriptors/SoyLatteDescriptor.class differ diff --git a/platform/classes/base-mac-java-8/edu/rice/cs/drjava/platform/MacPlatformJava8$1.class b/platform/classes/base-mac-java-8/edu/rice/cs/drjava/platform/MacPlatformJava8$1.class new file mode 100644 index 000000000..3a5dce55e Binary files /dev/null and b/platform/classes/base-mac-java-8/edu/rice/cs/drjava/platform/MacPlatformJava8$1.class differ diff --git a/platform/classes/base-mac-java-8/edu/rice/cs/drjava/platform/MacPlatformJava8$2$1.class b/platform/classes/base-mac-java-8/edu/rice/cs/drjava/platform/MacPlatformJava8$2$1.class new file mode 100644 index 000000000..95554e7b6 Binary files /dev/null and b/platform/classes/base-mac-java-8/edu/rice/cs/drjava/platform/MacPlatformJava8$2$1.class differ diff --git a/platform/classes/base-mac-java-8/edu/rice/cs/drjava/platform/MacPlatformJava8$2.class b/platform/classes/base-mac-java-8/edu/rice/cs/drjava/platform/MacPlatformJava8$2.class new file mode 100644 index 000000000..7bac61ab9 Binary files /dev/null and b/platform/classes/base-mac-java-8/edu/rice/cs/drjava/platform/MacPlatformJava8$2.class differ diff --git a/platform/classes/base-mac-java-8/edu/rice/cs/drjava/platform/MacPlatformJava8.class b/platform/classes/base-mac-java-8/edu/rice/cs/drjava/platform/MacPlatformJava8.class new file mode 100644 index 000000000..dac52786a Binary files /dev/null and b/platform/classes/base-mac-java-8/edu/rice/cs/drjava/platform/MacPlatformJava8.class differ diff --git a/platform/classes/base-mac/edu/rice/cs/drjava/model/compiler/descriptors/SoyLatteDescriptor.class b/platform/classes/base-mac/edu/rice/cs/drjava/model/compiler/descriptors/SoyLatteDescriptor.class index 359fc2380..dc7a5ce38 100644 Binary files a/platform/classes/base-mac/edu/rice/cs/drjava/model/compiler/descriptors/SoyLatteDescriptor.class and b/platform/classes/base-mac/edu/rice/cs/drjava/model/compiler/descriptors/SoyLatteDescriptor.class differ diff --git a/platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform$1.class b/platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform$1.class index 13706f8ec..b13aa3787 100644 Binary files a/platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform$1.class and b/platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform$1.class differ diff --git a/platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform$2$1.class b/platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform$2$1.class deleted file mode 100644 index 0c48a7f0b..000000000 Binary files a/platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform$2$1.class and /dev/null differ diff --git a/platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform$2.class b/platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform$2.class index d4cddbbdf..96d5b7fe6 100644 Binary files a/platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform$2.class and b/platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform$2.class differ diff --git a/platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform$3.class b/platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform$3.class new file mode 100644 index 000000000..fdac42927 Binary files /dev/null and b/platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform$3.class differ diff --git a/platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform$4$1.class b/platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform$4$1.class new file mode 100644 index 000000000..ab918f473 Binary files /dev/null and b/platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform$4$1.class differ diff --git a/platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform$4.class b/platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform$4.class new file mode 100644 index 000000000..c3b496917 Binary files /dev/null and b/platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform$4.class differ diff --git a/platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform.class b/platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform.class index cb101a5c8..b14972142 100644 Binary files a/platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform.class and b/platform/classes/base-mac/edu/rice/cs/drjava/platform/MacPlatform.class differ diff --git a/platform/classes/base-mint/edu/rice/cs/drjava/model/compiler/descriptors/MintDescriptor.class b/platform/classes/base-mint/edu/rice/cs/drjava/model/compiler/descriptors/MintDescriptor.class old mode 100644 new mode 100755 diff --git a/platform/classes/base-nextgen/edu/rice/cs/drjava/model/compiler/NextGenCompiler$1.class b/platform/classes/base-nextgen/edu/rice/cs/drjava/model/compiler/NextGenCompiler$1.class old mode 100644 new mode 100755 diff --git a/platform/classes/base-nextgen/edu/rice/cs/drjava/model/compiler/NextGenCompiler$2.class b/platform/classes/base-nextgen/edu/rice/cs/drjava/model/compiler/NextGenCompiler$2.class old mode 100644 new mode 100755 diff --git a/platform/classes/base-nextgen/edu/rice/cs/drjava/model/compiler/NextGenCompiler$OurLog.class b/platform/classes/base-nextgen/edu/rice/cs/drjava/model/compiler/NextGenCompiler$OurLog.class old mode 100644 new mode 100755 diff --git a/platform/classes/base-windows/edu/rice/cs/drjava/platform/WindowsPlatform.class b/platform/classes/base-windows/edu/rice/cs/drjava/platform/WindowsPlatform.class old mode 100644 new mode 100755 diff --git a/platform/classes/test-mac-java-8/edu/rice/cs/drjava/platform/MacJava8FactoryTest.class b/platform/classes/test-mac-java-8/edu/rice/cs/drjava/platform/MacJava8FactoryTest.class new file mode 100644 index 000000000..3ed1751be Binary files /dev/null and b/platform/classes/test-mac-java-8/edu/rice/cs/drjava/platform/MacJava8FactoryTest.class differ diff --git a/platform/classes/test-mac/edu/rice/cs/drjava/platform/MacFactoryTest.class b/platform/classes/test-mac/edu/rice/cs/drjava/platform/MacFactoryTest.class new file mode 100644 index 000000000..4caec762c Binary files /dev/null and b/platform/classes/test-mac/edu/rice/cs/drjava/platform/MacFactoryTest.class differ diff --git a/platform/lib/ecj-4.9.jar b/platform/lib/ecj-4.9.jar deleted file mode 100644 index 29dc442ff..000000000 Binary files a/platform/lib/ecj-4.9.jar and /dev/null differ diff --git a/platform/platform-full.jar b/platform/platform-full.jar new file mode 100644 index 000000000..b3b04e9ff Binary files /dev/null and b/platform/platform-full.jar differ diff --git a/platform/src-eclipse/edu/rice/cs/drjava/model/compiler/EclipseCompiler.java b/platform/src-eclipse/edu/rice/cs/drjava/model/compiler/EclipseCompiler.java index 33954733f..3e447d27d 100644 --- a/platform/src-eclipse/edu/rice/cs/drjava/model/compiler/EclipseCompiler.java +++ b/platform/src-eclipse/edu/rice/cs/drjava/model/compiler/EclipseCompiler.java @@ -75,15 +75,15 @@ * @version $Id$ */ -public class EclipseCompiler extends JavacCompiler { +public class EclipseCompiler extends Javac170Compiler { public EclipseCompiler(JavaVersion.FullVersion version, String location, List defaultBootClassPath) { super(version, location, defaultBootClassPath); } - public static final String COMPILER_VERSION = "4.5"; - public static final Log _log = new Log("EclipseCompiler.txt",true); + public static final String COMPILER_VERSION = "4.6.3"; + public static final Log _log = new Log("EclipseCompiler.txt",false); public String getName() { return "Eclipse Compiler " + COMPILER_VERSION; } diff --git a/platform/src-eclipse/edu/rice/cs/drjava/model/compiler/descriptors/EclipseDescriptor.java b/platform/src-eclipse/edu/rice/cs/drjava/model/compiler/descriptors/EclipseDescriptor.java index 1eafea6d1..ce4907cff 100644 --- a/platform/src-eclipse/edu/rice/cs/drjava/model/compiler/descriptors/EclipseDescriptor.java +++ b/platform/src-eclipse/edu/rice/cs/drjava/model/compiler/descriptors/EclipseDescriptor.java @@ -109,7 +109,7 @@ public boolean containsCompiler(File f) { /** Return the minimum Java version required to use this JDK. * @return minimum version */ - public JavaVersion getMinimumMajorVersion() { return JavaVersion.JAVA_6; } + public JavaVersion getMinimumMajorVersion() { return JavaVersion.JAVA_8; } /** Return the list of additional files required to use the compiler. * The compiler was found in the specified file. This method may have to search the user's hard drive, e.g. @@ -128,7 +128,5 @@ public String getDescription(JavaVersion.FullVersion version) { } @Override - public String toString() { - return "Eclipse Compiler Library"; - } + public String toString() { return "Eclipse Compiler Library"; } } diff --git a/platform/src-jdk7/edu/rice/cs/drjava/model/compiler/Javac170Compiler.java b/platform/src-jdk7/edu/rice/cs/drjava/model/compiler/Javac170Compiler.java index 99ceda3c4..b13aafaa9 100644 --- a/platform/src-jdk7/edu/rice/cs/drjava/model/compiler/Javac170Compiler.java +++ b/platform/src-jdk7/edu/rice/cs/drjava/model/compiler/Javac170Compiler.java @@ -1,35 +1,31 @@ /*BEGIN_COPYRIGHT_BLOCK * - * This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ - * or http://sourceforge.net/projects/drjava/ - * - * DrJava Open Source License - * - * Copyright (C) 2001-2015 JavaPLT group at Rice University (javaplt@rice.edu). All rights reserved. - * - * Developed by: Java Programming Languages Team, Rice University, http://www.cs.rice.edu/~javaplt/ + * Copyright (c) 2001-2019, JavaPLT group at Rice University (drjava@rice.edu). All rights reserved. * - * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated - * documentation files (the "Software"), to deal with the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and - * to permit persons to whom the Software is furnished to do so, subject to the following conditions: + * 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. * - * - Redistributions of source code must retain the above copyright notice, this list of conditions and the - * following disclaimers. - * - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the - * following disclaimers in the documentation and/or other materials provided with the distribution. - * - Neither the names of DrJava, the JavaPLT, 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. - * - Products derived from this software may not be called "DrJava" nor use the term "DrJava" as part of their - * names without prior written permission from the JavaPLT group. For permission, write to javaplt@rice.edu. + * 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. * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO - * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF - * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * WITH THE SOFTWARE. + * 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*/ + * END_COPYRIGHT_BLOCK*/ package edu.rice.cs.drjava.model.compiler; @@ -43,7 +39,7 @@ import java.util.Map; import java.util.Iterator; -// Uses JDK 1.7.0 tools classes +// Uses JDK 7/8 tools classes import javax.tools.JavaFileObject; import javax.tools.JavaCompiler; import javax.tools.Diagnostic; @@ -60,20 +56,24 @@ import static edu.rice.cs.plt.debug.DebugUtil.debug; import static edu.rice.cs.plt.debug.DebugUtil.error; -/** An implementation of JavacCompiler that supports compiling with the java 1.7.0 or later compiler. Must be compiled - * using javac 1.7.0 or later. - * **TODO** Rename this class as Javac170PlusCompiler.java - * @version $Id$ - */ +/** An implementation of JavacCompiler that supports compiling with the java 7 or 8 compiler. Must be compiled + * using javac 7 or 8. + * **TODO** Rename this class as Javac8Compiler.java; all Java version older than 8 are deprecated and unsupported. + * Java 9+ in incompatible at the JDK level. Eliminate code that refers to Java versions older than 8. + * @version $Id$ + */ public class Javac170Compiler extends JavacCompiler { // Javac170FilteringCompiler { public Javac170Compiler(JavaVersion.FullVersion version, String location, List defaultBootClassPath) { super(version, location, defaultBootClassPath); } + // TODO change the code to look for a field that does not exist prior to Java 8. Will RELEASE_8 work? Is there a + // field in JavaCompiler that was introduced in Java 8? If so we only need to load class JavaCompiler and look for + // that field. public boolean isAvailable() { try { - // Diagnostic was introduced in the Java 1.6 compiler + // Diagnostic was introduced in Java 6 Class diagnostic = Class.forName("javax.tools.Diagnostic"); diagnostic.getMethod("getKind"); // javax.lang.model.SourceVersion.RELEASE_7 field introduced in Java 7 @@ -107,6 +107,7 @@ public boolean isAvailable() { * @param showWarnings Whether compiler warnings should be shown or ignored. * @return Errors that occurred. If no errors, should be zero length (not null). */ + // TODO strip out debugging other than Log public List compile(List files, List classPath, List sourcePath, File destination, List bootClassPath, String sourceVersion, boolean showWarnings) { diff --git a/platform/src-mac-java-8/edu/rice/cs/drjava/model/compiler/descriptors/SoyLatteDescriptor.java b/platform/src-mac-java-8/edu/rice/cs/drjava/model/compiler/descriptors/SoyLatteDescriptor.java new file mode 100644 index 000000000..b4719aad8 --- /dev/null +++ b/platform/src-mac-java-8/edu/rice/cs/drjava/model/compiler/descriptors/SoyLatteDescriptor.java @@ -0,0 +1,154 @@ +/*BEGIN_COPYRIGHT_BLOCK + * + * Copyright (c) 2001-2010, 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://sourceforge.net/projects/drjava/ + * + * END_COPYRIGHT_BLOCK*/ + +package edu.rice.cs.drjava.model.compiler.descriptors; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.Set; +import java.util.HashSet; +import java.util.Collections; +import java.util.jar.JarFile; +import edu.rice.cs.plt.reflect.JavaVersion; +import edu.rice.cs.plt.iter.IterUtil; +import edu.rice.cs.plt.io.IOUtil; +import edu.rice.cs.plt.lambda.LambdaUtil; +import edu.rice.cs.plt.lambda.Predicate; + +import edu.rice.cs.drjava.model.JDKDescriptor; + +/** The description of the SoyLatte JDK. */ +public class SoyLatteDescriptor extends JDKDescriptor { + /** Return the name of this JDK. + * @return name */ + public String getName() { + return "SoyLatte"; + } + + /** Packages to shadow when loading a new tools.jar. If we don't shadow these classes, we won't + * be able to load distinct versions for each tools.jar library. These should be verified whenever + * a new Java version is released. (We can't just shadow *everything* because some classes, at + * least in OS X's classes.jar, can only be loaded by the JVM.) + * + * @return set of packages that need to be shadowed + */ + public Set getToolsPackages() { + HashSet set = new HashSet(); + Collections.addAll(set, new String[] { + // Additional from 6 tools.jar: + "com.sun.codemodel", + "com.sun.istack.internal.tools", // other istack packages are in rt.jar + "com.sun.istack.internal.ws", + "com.sun.source", + "com.sun.xml.internal.dtdparser", // other xml.internal packages are in rt.jar + "com.sun.xml.internal.rngom", + "com.sun.xml.internal.xsom", + "org.relaxng", + "javax.lang.element" + }); + return set; + } + + /** Returns a list of directories that should be searched for tools.jar and classes.jar files. + * @return list of directories to search */ + public Iterable getSearchDirectories() { + if (System.getProperty("os.name").toLowerCase().indexOf("mac")<0) return IterUtil.empty(); // Mac only + Iterable roots = IterUtil.asIterable(new File[] { + new File("/usr/local/soylatte"), + new File("/usr/local") + }); + Predicate subdirFilter = LambdaUtil.or(IOUtil.regexCanonicalCaseFilePredicate("\\d+\\.\\d+\\.\\d+"), + IOUtil.regexCanonicalCaseFilePredicate("soylatte.*")); + Iterable dirs = IterUtil.empty(); + for(File d: roots) { + dirs = IterUtil.compose(dirs, IOUtil.attemptListFilesAsIterable(d, subdirFilter)); + } + return dirs; + } + + /** Returns a list of files that should be searched if they contain a compiler. + * @return list of files to search */ + public Iterable getSearchFiles() { + if (System.getProperty("os.name").toLowerCase().indexOf("mac")<0) return IterUtil.empty(); // Mac only + return IterUtil.asIterable(new File[] { + new File("/usr/local/soylatte/lib/classes.jar"), + new File("/usr/local/soylatte/lib/tools.jar") + }); + } + + /** True if this is a compound JDK and needs a fully featured JDK to operate. + * @return true if compound JDK (e.g. NextGen, Mint, Habanero). */ + public boolean isCompound() { return false; } + + /** Return true if the file (jar file or directory) contains the compiler. + * @return true if the file contains the compiler */ + public boolean containsCompiler(File f) { + if (System.getProperty("os.name").toLowerCase().indexOf("mac")<0) return false; // Mac only + return Util.exists(f, + "sun/tools/javac/Main.class", + "com/sun/tools/javac/main/JavaCompiler.class", + "com/sun/tools/javac/util/Context.class", + "com/sun/tools/javac/util/Name.class", + "com/sun/tools/javac/util/Options.class", + "com/sun/tools/javac/util/Position.class"); + } + + /** Return the class name of the compiler adapter. + * @return class name of compiler, or null if no compiler */ + public String getAdapterForCompiler() { return "edu.rice.cs.drjava.model.compiler.Javac160Compiler"; } + + /** Return the class name of the debugger adapter. + * @return class name of debugger, or null if no debugger */ + public String getAdapterForDebugger() { return null; } + + /** Return the minimum Java version required to use this JDK. + * @return minimum version */ + public JavaVersion getMinimumMajorVersion() { return JavaVersion.JAVA_6; } + + /** Return the list of additional files required to use the compiler. + * The compiler was found in the specified file. This method may have to search the user's hard drive, e.g. + * by looking relative to compiler.getParentFile(), by checking environment variables, or by looking in + * certain OS-specific directories. + * @param compiler location where the compiler was fund + * @return list of additional files that need to be available */ + public Iterable getAdditionalCompilerFiles(File compiler) throws FileNotFoundException { + File parentDir = compiler.getParentFile(); + return IterUtil.make(Util.oneOf(parentDir, "../jre/lib/rt.jar")); + } + + public String toString() { return getClass().getSimpleName()+" --> "+getAdapterForCompiler(); } +} diff --git a/platform/src-mac-java-8/edu/rice/cs/drjava/platform/MacJava8FactoryTest.java b/platform/src-mac-java-8/edu/rice/cs/drjava/platform/MacJava8FactoryTest.java new file mode 100644 index 000000000..07bd6cb11 --- /dev/null +++ b/platform/src-mac-java-8/edu/rice/cs/drjava/platform/MacJava8FactoryTest.java @@ -0,0 +1,58 @@ +/*BEGIN_COPYRIGHT_BLOCK + * + * Copyright (c) 2001-2010, 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://sourceforge.net/projects/drjava/ + * + * END_COPYRIGHT_BLOCK*/ + +package edu.rice.cs.drjava.platform; + +import junit.framework.*; + +/** + * A simple test class to verify that PlatformFactory has returned the appropriate + * PlatformSupport class. + */ +public class MacJava8FactoryTest extends TestCase { + /** + * Gets the PlatformSupport implementation for this platform from the + * PlatformFactory and verifies that it is an instance of the correct + * class. + */ + public void testFactory() { + PlatformSupport ps = PlatformFactory.ONLY; + String psClassName = ps.getClass().getName(); + assertEquals("PlatformFactory produced the appropriate PlatformSupport?", + "edu.rice.cs.drjava.platform.MacPlatformJava8", + psClassName); + } +} diff --git a/platform/src-mac-java-8/edu/rice/cs/drjava/platform/MacPlatformJava8.java b/platform/src-mac-java-8/edu/rice/cs/drjava/platform/MacPlatformJava8.java new file mode 100644 index 000000000..b5f511dd3 --- /dev/null +++ b/platform/src-mac-java-8/edu/rice/cs/drjava/platform/MacPlatformJava8.java @@ -0,0 +1,203 @@ +/*BEGIN_COPYRIGHT_BLOCK + * + * 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. + * + * 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://sourceforge.net/projects/drjava/ + * + * END_COPYRIGHT_BLOCK*/ + +package edu.rice.cs.drjava.platform; + +import java.net.URL; +import com.apple.eawt.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import javax.swing.*; + + +/** Platform-specific code shared by all Mac OS X platforms. */ + +class MacPlatformJava8 extends DefaultPlatform { + + /** Singleton instance. */ + public static MacPlatformJava8 ONLY = new MacPlatformJava8(); + + /** + * Private constructor for singleton pattern. + */ + protected MacPlatformJava8() {}; + + public boolean openURL(URL address) { + // First, try to delegate up. + if (super.openURL(address)) { + return true; + } + else { + try { + // OS X doesn't like how Java formats file URLs: + // "file:/Users/dir/file.html" isn't legal. + // Instead, we need to put another slash in the protocol: + // "file:///Users/dir/file.html" + String addressString = address.toString(); + if (addressString.startsWith("file:/")) { + String suffix = addressString.substring("file:/".length(), addressString.length()); + addressString = "file:///" + suffix; + } + + // If there is no command specified, or it won't work, try using "open". + //Process proc = + Runtime.getRuntime().exec(new String[] { "open", addressString }); + } + catch (Throwable t) { + // If there was any kind of problem, ignore it and report failure. + return false; + } + } + + // Otherwise, trust that it worked. + return true; + } + + /** + * Hook for performing general UI setup. Called before all other UI setup is done. + * The Mac JDK implementation sets a system property to use the screen menu bar. + */ + public void beforeUISetup() { + System.setProperty("apple.laf.useScreenMenuBar","true"); + + // needs to be done here, otherwise the event gets lost + ApplicationListener appListener = new ApplicationAdapter() { + public void handleOpenFile(ApplicationEvent event) { + if (event.getFilename()!=null) { + edu.rice.cs.drjava.DrJavaRoot.handleRemoteOpenFile(new java.io.File(event.getFilename()), -1); + event.setHandled(true); + } + } + }; + + // Register the ApplicationListener. + Application appl = new Application(); + appl.addApplicationListener(appListener); + } + + /** + * Hook for performing general UI setup. Called after all other UI setup is done. + * The Mac JDK implementation adds handlers for the application menu items. + * @param about the Action associated with openning the About dialog + * @param prefs the Action associated with openning the Preferences dialog + * @param quit the Action associated with quitting the DrJava application + */ + public void afterUISetup(final Action about, final Action prefs, final Action quit) { + ApplicationListener appListener = new ApplicationAdapter() { + public void handleAbout(ApplicationEvent e) { + about.actionPerformed(new ActionEvent(this, 0, "About DrJava")); + e.setHandled(true); + } + + public void handlePreferences(ApplicationEvent e) { + prefs.actionPerformed(new ActionEvent(this, 0, "Preferences...")); + e.setHandled(true); + } + + public void handleQuit(ApplicationEvent e) { + // Workaround for 2868805: show modal dialogs in a separate thread. + // This encapsulation is not necessary in 10.2, but will not break either. + final ApplicationEvent ae = e; + SwingUtilities.invokeLater(new Runnable() { + public void run() { + quit.actionPerformed(new ActionEvent(this, 0, "Quit DrJava")); + ae.setHandled(true); + } + }); + } + }; + + // Register the ApplicationListener. + Application appl = new Application(); + appl.setEnabledPreferencesMenu(true); + appl.addApplicationListener(appListener); + } + + /** + * Returns whether this is a Mac platform. + */ + public boolean isMacPlatform() { + return true; + } + + /** Set the keyboard mnemonic for the component in a way that is consistent with + * the current platform. On Mac OS, the Alt-? mnemonics are broken, so we do not + * set them. + * @param obj the component whose mnemonic should be set + * @param mnemonic the key code which represents the mnemonic + * @see javax.swing.AbstractButton#setMnemonic(int) + * @see java.awt.event.KeyEvent */ + public void setMnemonic(javax.swing.AbstractButton obj, int mnemonic) { + // on Mac OS, the Alt-? mnemonics are broken, so we do not set them + } + + /** Set the keyboard mnemonic for the component in a way that is consistent with + * the current platform. On Mac OS, the Alt-? mnemonics are broken, so we do not + * set them. + * @param obj the component whose mnemonic should be set + * @param mnemonic a char specifying the mnemonic value + * @see javax.swing.AbstractButton#setMnemonic(char) */ + public void setMnemonic(javax.swing.AbstractButton obj, char mnemonic) { + // on Mac OS, the Alt-? mnemonics are broken, so we do not set them + } + + /** Set the keyboard mnemonic for the component in a way that is consistent with + * the current platform. On Mac OS, the Alt-? mnemonics are broken, so we do not + * set them. + * @param obj the component whose mnemonic should be set + * @param mnemonic the key code which represents the mnemonic + * @see javax.swing.ButtonModel#setMnemonic(int) + * @see java.awt.event.KeyEvent */ + public void setMnemonic(javax.swing.ButtonModel obj, int mnemonic) { + // on Mac OS, the Alt-? mnemonics are broken, so we do not set them + } + + /** Set the keyboard mnemonic for the component in a way that is consistent with + * the current platform. On Mac OS, the Alt-? mnemonics are broken, so we do not + * set them. + * @param obj the component whose mnemonic should be set + * @param tabIndex the index of the tab that the mnemonic refers to + * @param mnemonic the key code which represents the mnemonic + * @see javax.swing.JTabbedPane#setMnemonic(int,int) + * @see java.awt.event.KeyEvent */ + public void setMnemonic(javax.swing.JTabbedPane obj, int tabIndex, int mnemonic) { + // on Mac OS, the Alt-? mnemonics are broken, so we do not set them + } + + /** Set the keyboard mnemonic for the component in a way that is consistent with + * the current platform. On Mac OS, the Alt-? mnemonics are broken, so we do not + * set them. + * @param obj the component whose mnemonic should be set + * @param mnemonic the key code which represents the mnemonic + * @see javax.swing.JTabbedPane#setMnemonic(int) + * @see java.awt.event.KeyEvent */ + public void setMnemonic(javax.swing.JTabbedPane obj, int mnemonic) { + // on Mac OS, the Alt-? mnemonics are broken, so we do not set them + } +} \ No newline at end of file diff --git a/platform/src-mac/edu/rice/cs/drjava/platform/MacPlatform.java b/platform/src-mac/edu/rice/cs/drjava/platform/MacPlatform.java index c7de47a7f..61988803f 100644 --- a/platform/src-mac/edu/rice/cs/drjava/platform/MacPlatform.java +++ b/platform/src-mac/edu/rice/cs/drjava/platform/MacPlatform.java @@ -2,7 +2,7 @@ * * Copyright (c) 2001-2010, 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 @@ -13,7 +13,7 @@ * * 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 @@ -28,16 +28,17 @@ * * 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/ - * + * * END_COPYRIGHT_BLOCK*/ package edu.rice.cs.drjava.platform; +import java.awt.desktop.*; import java.net.URL; -import com.apple.eawt.*; +//import com.apple.eawt.*; import java.awt.*; import java.awt.event.ActionEvent; import javax.swing.*; @@ -51,12 +52,12 @@ class MacPlatform extends DefaultPlatform { * Singleton instance. */ public static MacPlatform ONLY = new MacPlatform(); - + /** * Private constructor for singleton pattern. */ protected MacPlatform() {}; - + public boolean openURL(URL address) { // First, try to delegate up. if (super.openURL(address)) { @@ -75,7 +76,7 @@ public boolean openURL(URL address) { } // If there is no command specified, or it won't work, try using "open". - //Process proc = + //Process proc = Runtime.getRuntime().exec(new String[] { "open", addressString }); } catch (Throwable t) { @@ -83,33 +84,45 @@ public boolean openURL(URL address) { return false; } } - + // Otherwise, trust that it worked. return true; } - + /** * Hook for performing general UI setup. Called before all other UI setup is done. * The Mac JDK implementation sets a system property to use the screen menu bar. */ public void beforeUISetup() { System.setProperty("apple.laf.useScreenMenuBar","true"); - + // needs to be done here, otherwise the event gets lost - ApplicationListener appListener = new ApplicationAdapter() { - public void handleOpenFile(ApplicationEvent event) { - if (event.getFilename()!=null) { - edu.rice.cs.drjava.DrJavaRoot.handleRemoteOpenFile(new java.io.File(event.getFilename()), -1); - event.setHandled(true); +// ApplicationListener appListener = new ApplicationAdapter() { +// public void handleOpenFile(ApplicationEvent event) { +// if (event.getFilename()!=null) { +// edu.rice.cs.drjava.DrJavaRoot.handleRemoteOpenFile(new java.io.File(event.getFilename()), -1); +// event.setHandled(true); +// } +// } +// }; +// +// // Register the ApplicationListener. +// Application appl = new Application(); +// appl.addApplicationListener(appListener); + + Desktop d = Desktop.getDesktop(); + d.setOpenFileHandler(new OpenFilesHandler() { + @Override + public void openFiles(OpenFilesEvent e) { + if (e.getSearchTerm()!= null) { + edu.rice.cs.drjava.DrJavaRoot.handleRemoteOpenFile(new java.io.File(e.getSearchTerm()), -1); } } - }; - - // Register the ApplicationListener. - Application appl = new Application(); - appl.addApplicationListener(appListener); + }); + + } - + /** * Hook for performing general UI setup. Called after all other UI setup is done. * The Mac JDK implementation adds handlers for the application menu items. @@ -117,95 +130,128 @@ public void handleOpenFile(ApplicationEvent event) { * @param prefs the Action associated with openning the Preferences dialog * @param quit the Action associated with quitting the DrJava application */ - public void afterUISetup(final Action about, final Action prefs, final Action quit) { - ApplicationListener appListener = new ApplicationAdapter() { - public void handleAbout(ApplicationEvent e) { + public void afterUISetup(final Action about, final Action prefs, final Action quit) { +// ApplicationListener appListener = new ApplicationAdapter() { +// public void handleAbout(ApplicationEvent e) { +// about.actionPerformed(new ActionEvent(this, 0, "About DrJava")); +// e.setHandled(true); +// } +// +// public void handlePreferences(ApplicationEvent e) { +// prefs.actionPerformed(new ActionEvent(this, 0, "Preferences...")); +// e.setHandled(true); +// } +// +// public void handleQuit(ApplicationEvent e) { +// // Workaround for 2868805: show modal dialogs in a separate thread. +// // This encapsulation is not necessary in 10.2, but will not break either. +// final ApplicationEvent ae = e; +// SwingUtilities.invokeLater(new Runnable() { +// public void run() { +// quit.actionPerformed(new ActionEvent(this, 0, "Quit DrJava")); +// ae.setHandled(true); +// } +// }); +// } +// }; +// +// // Register the ApplicationListener. +// Application appl = new Application(); +// appl.setEnabledPreferencesMenu(true); +// appl.addApplicationListener(appListener); + + Desktop d = Desktop.getDesktop(); + d.setAboutHandler(new AboutHandler() { + @Override + public void handleAbout(AboutEvent e) { about.actionPerformed(new ActionEvent(this, 0, "About DrJava")); - e.setHandled(true); } + }); - public void handlePreferences(ApplicationEvent e) { + d.setPreferencesHandler(new PreferencesHandler() { + @Override + public void handlePreferences(PreferencesEvent e) { prefs.actionPerformed(new ActionEvent(this, 0, "Preferences...")); - e.setHandled(true); } + }); - public void handleQuit(ApplicationEvent e) { - // Workaround for 2868805: show modal dialogs in a separate thread. - // This encapsulation is not necessary in 10.2, but will not break either. - final ApplicationEvent ae = e; + d.setQuitHandler(new QuitHandler() { + @Override + public void handleQuitRequestWith(QuitEvent e, QuitResponse response) { + + final QuitEvent ae = e; SwingUtilities.invokeLater(new Runnable() { public void run() { quit.actionPerformed(new ActionEvent(this, 0, "Quit DrJava")); - ae.setHandled(true); } }); + } - }; - - // Register the ApplicationListener. - Application appl = new Application(); - appl.setEnabledPreferencesMenu(true); - appl.addApplicationListener(appListener); + }); + + + } - + + /** * Returns whether this is a Mac platform. */ public boolean isMacPlatform() { return true; } - + /** Set the keyboard mnemonic for the component in a way that is consistent with - * the current platform. On Mac OS, the Alt-? mnemonics are broken, so we do not - * set them. - * @param obj the component whose mnemonic should be set - * @param mnemonic the key code which represents the mnemonic - * @see javax.swing.AbstractButton#setMnemonic(int) - * @see java.awt.event.KeyEvent */ + * the current platform. On Mac OS, the Alt-? mnemonics are broken, so we do not + * set them. + * @param obj the component whose mnemonic should be set + * @param mnemonic the key code which represents the mnemonic + * @see javax.swing.AbstractButton#setMnemonic(int) + * @see java.awt.event.KeyEvent */ public void setMnemonic(javax.swing.AbstractButton obj, int mnemonic) { // on Mac OS, the Alt-? mnemonics are broken, so we do not set them } /** Set the keyboard mnemonic for the component in a way that is consistent with - * the current platform. On Mac OS, the Alt-? mnemonics are broken, so we do not - * set them. - * @param obj the component whose mnemonic should be set - * @param mnemonic a char specifying the mnemonic value - * @see javax.swing.AbstractButton#setMnemonic(char) */ + * the current platform. On Mac OS, the Alt-? mnemonics are broken, so we do not + * set them. + * @param obj the component whose mnemonic should be set + * @param mnemonic a char specifying the mnemonic value + * @see javax.swing.AbstractButton#setMnemonic(char) */ public void setMnemonic(javax.swing.AbstractButton obj, char mnemonic) { // on Mac OS, the Alt-? mnemonics are broken, so we do not set them } /** Set the keyboard mnemonic for the component in a way that is consistent with - * the current platform. On Mac OS, the Alt-? mnemonics are broken, so we do not - * set them. - * @param obj the component whose mnemonic should be set - * @param mnemonic the key code which represents the mnemonic - * @see javax.swing.ButtonModel#setMnemonic(int) - * @see java.awt.event.KeyEvent */ + * the current platform. On Mac OS, the Alt-? mnemonics are broken, so we do not + * set them. + * @param obj the component whose mnemonic should be set + * @param mnemonic the key code which represents the mnemonic + * @see javax.swing.ButtonModel#setMnemonic(int) + * @see java.awt.event.KeyEvent */ public void setMnemonic(javax.swing.ButtonModel obj, int mnemonic) { // on Mac OS, the Alt-? mnemonics are broken, so we do not set them } /** Set the keyboard mnemonic for the component in a way that is consistent with - * the current platform. On Mac OS, the Alt-? mnemonics are broken, so we do not - * set them. - * @param obj the component whose mnemonic should be set - * @param tabIndex the index of the tab that the mnemonic refers to - * @param mnemonic the key code which represents the mnemonic - * @see javax.swing.JTabbedPane#setMnemonic(int,int) - * @see java.awt.event.KeyEvent */ + * the current platform. On Mac OS, the Alt-? mnemonics are broken, so we do not + * set them. + * @param obj the component whose mnemonic should be set + * @param tabIndex the index of the tab that the mnemonic refers to + * @param mnemonic the key code which represents the mnemonic + * @see javax.swing.JTabbedPane#setMnemonic(int,int) + * @see java.awt.event.KeyEvent */ public void setMnemonic(javax.swing.JTabbedPane obj, int tabIndex, int mnemonic) { // on Mac OS, the Alt-? mnemonics are broken, so we do not set them } /** Set the keyboard mnemonic for the component in a way that is consistent with - * the current platform. On Mac OS, the Alt-? mnemonics are broken, so we do not - * set them. - * @param obj the component whose mnemonic should be set - * @param mnemonic the key code which represents the mnemonic - * @see javax.swing.JTabbedPane#setMnemonic(int) - * @see java.awt.event.KeyEvent */ + * the current platform. On Mac OS, the Alt-? mnemonics are broken, so we do not + * set them. + * @param obj the component whose mnemonic should be set + * @param mnemonic the key code which represents the mnemonic + * @see javax.swing.JTabbedPane#setMnemonic(int) + * @see java.awt.event.KeyEvent */ public void setMnemonic(javax.swing.JTabbedPane obj, int mnemonic) { // on Mac OS, the Alt-? mnemonics are broken, so we do not set them } diff --git a/platform/src-openjdk6/edu/rice/cs/drjava/model/compiler/Javac160OpenJDKCompiler.java b/platform/src-openjdk6/edu/rice/cs/drjava/model/compiler/Javac160OpenJDKCompiler.java old mode 100755 new mode 100644 index 8b684948f..b16f73447 --- a/platform/src-openjdk6/edu/rice/cs/drjava/model/compiler/Javac160OpenJDKCompiler.java +++ b/platform/src-openjdk6/edu/rice/cs/drjava/model/compiler/Javac160OpenJDKCompiler.java @@ -1,35 +1,31 @@ /*BEGIN_COPYRIGHT_BLOCK -* -* This file is part of DrJava. Download the current version of this project from http://www.drjava.org/ -* or http://sourceforge.net/projects/drjava/ -* -* DrJava Open Source License -* -* Copyright (C) 2001-2010 JavaPLT group at Rice University (javaplt@rice.edu). All rights reserved. -* -* Developed by: Java Programming Languages Team, Rice University, http://www.cs.rice.edu/~javaplt/ -* -* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated -* documentation files (the "Software"), to deal with the Software without restriction, including without limitation -* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and -* to permit persons to whom the Software is furnished to do so, subject to the following conditions: -* -* - Redistributions of source code must retain the above copyright notice, this list of conditions and the -* following disclaimers. -* - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the -* following disclaimers in the documentation and/or other materials provided with the distribution. -* - Neither the names of DrJava, the JavaPLT, 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. -* - Products derived from this software may not be called "DrJava" nor use the term "DrJava" as part of their -* names without prior written permission from the JavaPLT group. For permission, write to javaplt@rice.edu. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO -* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -* CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF -* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -* WITH THE SOFTWARE. -* -*END_COPYRIGHT_BLOCK*/ + * + * 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. + * + * 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://sourceforge.net/projects/drjava/ + * + * END_COPYRIGHT_BLOCK*/ package edu.rice.cs.drjava.model.compiler; @@ -61,12 +57,12 @@ import static edu.rice.cs.plt.debug.DebugUtil.debug; import static edu.rice.cs.plt.debug.DebugUtil.error; -/** - * An implementation of the CompilerInterface that supports compiling with - * OpenJDK 6.0. It is a Java 6 compiler, but uses the Java 5 interface. - * - * @version $Id$ - */ +/* Question (Corky): Is this adapter obsolete? */ +/** An implementation of the CompilerInterface (in DrJava) that supports compiling with + * OpenJDK 6.0. It is a Java 6 compiler, but uses the Java 5 interface from DrJava. + * + * @version $Id$ + */ public class Javac160OpenJDKCompiler extends JavacCompiler { public static final String COMPILER_CLASS_NAME = "com.sun.tools.javac.main.JavaCompiler"; diff --git a/platform/src-windows/edu/rice/cs/drjava/platform/WindowsPlatform.java b/platform/src-windows/edu/rice/cs/drjava/platform/WindowsPlatform.java index daf524915..a37793c3d 100644 --- a/platform/src-windows/edu/rice/cs/drjava/platform/WindowsPlatform.java +++ b/platform/src-windows/edu/rice/cs/drjava/platform/WindowsPlatform.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*/ @@ -43,26 +36,18 @@ import edu.rice.cs.util.*; import edu.rice.cs.drjava.config.OptionConstants; -/** - * Platform-specific code unique to the Windows platform. - */ +/** Platform-specific code unique to the Windows platform. */ + class WindowsPlatform extends DefaultPlatform { - /** - * Singleton instance. - */ + + /** Singleton instance. */ public static WindowsPlatform ONLY = new WindowsPlatform(); - /** - * Private constructor for singleton pattern. - */ + /** Private constructor for singleton pattern. */ protected WindowsPlatform() {}; - /** - * Returns whether this is a Windows platform. - */ - public boolean isWindowsPlatform() { - return true; - } + /** Returns whether this is a Windows platform. */ + public boolean isWindowsPlatform() { return true; } public boolean openURL(URL address) { // First, try to delegate up. diff --git a/plt/.gitignore b/plt/.gitignore new file mode 100644 index 000000000..1a9556b56 --- /dev/null +++ b/plt/.gitignore @@ -0,0 +1,3 @@ +classes +plt.jar +plt.jar.older \ No newline at end of file diff --git a/plt/build.xml b/plt/build.xml index af8b4567f..f80f35e97 100644 --- a/plt/build.xml +++ b/plt/build.xml @@ -29,9 +29,10 @@ + - - + + @@ -74,10 +75,8 @@ - - - - + + @@ -144,7 +143,7 @@ description="Compile all source files"> - + @@ -157,13 +156,14 @@ + @@ -235,28 +235,13 @@ - - - - - - - - - - - - - + + @@ -348,6 +333,7 @@ fork="yes" forkmode="perTest" maxmemory="512M" jvm="${test-jvm}" dir="${basedir}"> + @@ -426,7 +412,7 @@ - + @@ -436,14 +422,6 @@ - - - - @@ -456,6 +434,7 @@ + @@ -760,106 +739,44 @@ Property-resolution Targets *************************** --> - + + are immutable and so java8-runtime will only be set the *first* time. --> - - + + - - + + - - + + - + - + - - + + - + - - + + - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - diff --git a/plt/src/edu/rice/cs/plt/debug/DebugUtil.java b/plt/src/edu/rice/cs/plt/debug/DebugUtil.java index cc2da247b..4ecf8df48 100644 --- a/plt/src/edu/rice/cs/plt/debug/DebugUtil.java +++ b/plt/src/edu/rice/cs/plt/debug/DebugUtil.java @@ -79,13 +79,12 @@ private DebugUtil() {} static { initializeLogs(); } - /** - * Initialize {@link #debug} and {@link #error} based on the descriptors appearing in system properties - * {@code plt.debug.log} and {@code plt.error.log}. This method is run automatically when the - * {@code DebugUtil} class is loaded. If desired, it may be re-invoked at any time. - * @see #makeLog - * @see #makeLogSink - */ + /** Initialize {@link #debug} and {@link #error} based on the descriptors appearing in system properties + * {@code plt.debug.log} and {@code plt.error.log}. This method is run automatically when the + * {@code DebugUtil} class is loaded. If desired, it may be re-invoked at any time. + * @see #makeLog + * @see #makeLogSink + */ public static void initializeLogs() { String debugProp = System.getProperty("plt.debug.log"); debug = (debugProp == null) ? VoidLog.INSTANCE : makeLog(debugProp, "Debug"); diff --git a/plt/src/edu/rice/cs/plt/debug/VoidLog.java b/plt/src/edu/rice/cs/plt/debug/VoidLog.java index 763f630e7..b8d584c7d 100644 --- a/plt/src/edu/rice/cs/plt/debug/VoidLog.java +++ b/plt/src/edu/rice/cs/plt/debug/VoidLog.java @@ -34,7 +34,7 @@ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISI package edu.rice.cs.plt.debug; -/** A log that ignores all logging requests. All method invocations return immediately. */ +/** A log that ignores all logging requests. All method invocations return immediately. This is a singleton class. */ public class VoidLog implements Log { public static final VoidLog INSTANCE = new VoidLog(); diff --git a/plt/src/edu/rice/cs/plt/io/FilePredicate.java b/plt/src/edu/rice/cs/plt/io/FilePredicate.java index 77114cdfa..0c8e33268 100644 --- a/plt/src/edu/rice/cs/plt/io/FilePredicate.java +++ b/plt/src/edu/rice/cs/plt/io/FilePredicate.java @@ -38,9 +38,7 @@ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISI import java.io.File; import edu.rice.cs.plt.lambda.Predicate; -/** - * An object that is both a {@code FileFilter} and a {@code Predicate}, - * for convenient use with code that requires one or the other. - */ -public interface FilePredicate extends FileFilter, Predicate { -} +/** An object that is both a {@code FileFilter} and a {@code Predicate}, + * for convenient use with code that requires one or the other. + */ +public interface FilePredicate extends FileFilter, Predicate { } diff --git a/plt/src/edu/rice/cs/plt/io/IOUtil.java b/plt/src/edu/rice/cs/plt/io/IOUtil.java index c5e376128..42c59eedf 100644 --- a/plt/src/edu/rice/cs/plt/io/IOUtil.java +++ b/plt/src/edu/rice/cs/plt/io/IOUtil.java @@ -59,19 +59,17 @@ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISI import static edu.rice.cs.plt.debug.DebugUtil.error; -/** - * Provides additional operations on {@link File}s, {@link InputStream}s, {@link OutputStream}s, - * {@link Reader}s, and {@link Writer}s not defined in the {@code java.io} package. - */ +/** Provides additional operations on {@link File}s, {@link InputStream}s, {@link OutputStream}s, {@link Reader}s, and + * {@link Writer}s not defined in the {@code java.io} package. + */ public final class IOUtil { /** Prevents instance creation */ private IOUtil() {} - /** - * The current working directory, used as the base for relative paths. Based on System property {@code user.dir}, - * if defined, converted to an absolute path. - */ + /** The current working directory, used as the base for relative paths. Based on System property {@code user.dir}, + * if defined, converted to an absolute path. + */ public static final File WORKING_DIRECTORY = IOUtil.attemptAbsoluteFile(new File(System.getProperty("user.dir", ""))); /** A factory for Files based on a String filename. */ @@ -633,11 +631,10 @@ public Iterable value() { return result; } - /** - * Reads the entire contents of a file and return it as a byte array. - * @throws IOException If the file does not exist or cannot be opened, or if an error occurs during reading - * @throws SecurityException If read access to the file is denied - */ + /** Reads the entire contents of a file and return it as a byte array. + * @throws IOException If the file does not exist or cannot be opened, or if an error occurs during reading + * @throws SecurityException If read access to the file is denied + */ public static byte[] toByteArray(File file) throws IOException { FileInputStream input = new FileInputStream(file); try { return toByteArray(input); } diff --git a/plt/src/edu/rice/cs/plt/lambda/Runnable1.java b/plt/src/edu/rice/cs/plt/lambda/Runnable1.java index 4540a9fd7..3e5ac600d 100644 --- a/plt/src/edu/rice/cs/plt/lambda/Runnable1.java +++ b/plt/src/edu/rice/cs/plt/lambda/Runnable1.java @@ -33,18 +33,10 @@ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISI *END_COPYRIGHT_BLOCK*/ package edu.rice.cs.plt.lambda; - -/** - * A lambda that doesn't have a return value (relying instead on side effects). - * - * @param the argument type - * - * @see Runnable - * @see Runnable2 - * @see Runnable3 - * @see Runnable4 - * @see Lambda - */ +/** A lambda of one argument that doesn't have a return value (relying instead on side effects). + * @param the argument type + * @see Runnable, Runnable2, Runnable3, Runnable4, Lambda + */ public interface Runnable1 { public void run(T arg); } diff --git a/plt/src/edu/rice/cs/plt/lambda/Runnable2.java b/plt/src/edu/rice/cs/plt/lambda/Runnable2.java index 8320144fc..30a93edc6 100644 --- a/plt/src/edu/rice/cs/plt/lambda/Runnable2.java +++ b/plt/src/edu/rice/cs/plt/lambda/Runnable2.java @@ -35,7 +35,7 @@ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISI package edu.rice.cs.plt.lambda; /** - * A binary lambda that doesn't have a return value (relying instead on side effects). + * A lambda of two arguments that doesn't have a return value (relying instead on side effects). * * @param the first argument type * @param the second argument type diff --git a/plt/src/edu/rice/cs/plt/reflect/AbstractClassLoader.java b/plt/src/edu/rice/cs/plt/reflect/AbstractClassLoader.java index be60ad320..1f26f748e 100644 --- a/plt/src/edu/rice/cs/plt/reflect/AbstractClassLoader.java +++ b/plt/src/edu/rice/cs/plt/reflect/AbstractClassLoader.java @@ -40,46 +40,36 @@ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISI import edu.rice.cs.plt.iter.IterUtil; import edu.rice.cs.plt.io.IOUtil; -/** - *

A class loader that provides a helper method definePackageForClass.

- */ +/**

A class loader that provides a helper method definePackageForClass.

*/ public abstract class AbstractClassLoader extends ClassLoader { - /** - * Creates a new class loader using the ClassLoader returned by - * the method {@link #getSystemClassLoader() - * getSystemClassLoader()} as the parent class loader. - * - *

If there is a security manager, its {@link - * SecurityManager#checkCreateClassLoader() - * checkCreateClassLoader} method is invoked. This may result in - * a security exception.

- * - * @throws SecurityException - * If a security manager exists and its - * checkCreateClassLoader method doesn't allow creation - * of a new class loader. - */ + /** Creates a new class loader using the ClassLoader returned by the method {@link #getSystemClassLoader() + * getSystemClassLoader()} as the parent class loader. + * + *

If there is a security manager, its {@link + * SecurityManager#checkCreateClassLoader() + * checkCreateClassLoader} method is invoked. This may result in + * a security exception.

+ * + * @throws SecurityException + * If a security manager exists and its + * checkCreateClassLoader method doesn't allow creation + * of a new class loader. + */ protected AbstractClassLoader() { super(); } - /** - * Creates a new class loader using the specified parent class loader for - * delegation. - * - *

If there is a security manager, its {@link - * SecurityManager#checkCreateClassLoader() - * checkCreateClassLoader} method is invoked. This may result in - * a security exception.

- * - * @param parent - * The parent class loader - * - * @throws SecurityException - * If a security manager exists and its - * checkCreateClassLoader method doesn't allow creation - * of a new class loader. - * - * @since 1.2 - */ + /** Creates a new class loader using the specified parent class loader for delegation. + * + *

If there is a security manager, its {@link SecurityManager#checkCreateClassLoader() + * checkCreateClassLoader} method is invoked. This may result in a security exception.

+ * + * @param parent + * The parent class loader + * + * @throws SecurityException + * If a security manager exists and its checkCreateClassLoader method doesn't allow creation + * of a new class loader. + * @since 1.2 + */ protected AbstractClassLoader(ClassLoader parent) { super(parent); } /** Defines a package for a class, unless it has been defined already. This must be done before diff --git a/plt/src/edu/rice/cs/plt/reflect/JavaVersion.java b/plt/src/edu/rice/cs/plt/reflect/JavaVersion.java index 68c9147f4..fa515e1fb 100644 --- a/plt/src/edu/rice/cs/plt/reflect/JavaVersion.java +++ b/plt/src/edu/rice/cs/plt/reflect/JavaVersion.java @@ -136,9 +136,7 @@ public static JavaVersion parseClassVersion(java.io.File classFile) { } } - /** - * Produce the {@code JavaVersion} corresponding to the given class file. - */ + /** Produce the {@code JavaVersion} corresponding to the given class file. */ public static JavaVersion parseClassVersion(java.io.InputStream is) { java.io.DataInputStream dis = null; try { @@ -151,7 +149,7 @@ public static JavaVersion parseClassVersion(java.io.InputStream is) { } catch(java.io.IOException ioe) { return UNRECOGNIZED; } finally { - if (dis!=null) { + if (dis != null) { try { dis.close(); } catch(java.io.IOException ioe) { /* ignore */ } } diff --git a/plt/src/edu/rice/cs/plt/reflect/PathClassLoader.java b/plt/src/edu/rice/cs/plt/reflect/PathClassLoader.java index 5974967fc..aba9cb26b 100644 --- a/plt/src/edu/rice/cs/plt/reflect/PathClassLoader.java +++ b/plt/src/edu/rice/cs/plt/reflect/PathClassLoader.java @@ -44,71 +44,67 @@ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISI import java.util.List; import java.util.LinkedList; -import edu.rice.cs.plt.iter.IterUtil; import edu.rice.cs.plt.io.IOUtil; +import edu.rice.cs.plt.iter.IterUtil; +import edu.rice.cs.util.Log; import static edu.rice.cs.plt.debug.DebugUtil.error; import static edu.rice.cs.plt.debug.DebugUtil.debug; -/** - * A class loader that mimics the standard application system loader by loading classes from - * a file path of directories and jar files. This class also supports a dynamic - * class path: an {@code Iterable} provided as input to the constructor is held, not copied, - * and subsequent changes to that iterable are reflected in the path that is searched. Of - * course, once a class is loaded, subsequent changes to the path will not change the class - * bound to that name. The dynamic nature of the search path makes possible unusual errors -- - * a class may be valid in the path in which it is initially loaded, but when the JVM - * later transitively resolves the referenced classes, they may no longer exist, or may be - * shadowed. This is not a unique problem, however -- the standard system class loader is - * based on an underlying file system that may also change in arbitrary ways at any time. - */ +/** A class loader that mimics the standard application system loader by loading classes from + * a file path of directories and jar files. This class also supports a dynamic + * class path: an {@code Iterable} provided as input to the constructor is held, not copied, + * and subsequent changes to that iterable are reflected in the path that is searched. Of + * course, once a class is loaded, subsequent changes to the path will not change the class + * bound to that name. The dynamic nature of the search path makes possible unusual errors -- + * a class may be valid in the path in which it is initially loaded, but when the JVM + * later transitively resolves the referenced classes, they may no longer exist, or may be + * shadowed. This is not a unique problem, however -- the standard system class loader is + * based on an underlying file system that may also change in arbitrary ways at any time. + */ public class PathClassLoader extends AbstractClassLoader { - /** - * Locate a resource in the given path. Returns {@code null} if the resource is not found. - * If multiple queries will be performed on the same path, a PathClassLoader instance - * should be created for better performance. - */ + private static final Log _log = new Log("PathClassLoader.txt", true); + + /** Locate a resource in the given path. Returns {@code null} if the resource is not found. + * If multiple queries will be performed on the same path, a PathClassLoader instance + * should be created for better performance. + */ public static URL getResourceInPath(String name, File... path) { return getResourceInPath(name, IterUtil.asIterable(path)); } - /** - * Locate a resource in the given path. Returns {@code null} if the resource is not found. - * If multiple queries will be performed on the same path, a PathClassLoader instance - * should be created for better performance. - */ + /** Locate a resource in the given path. Returns {@code null} if the resource is not found. + * If multiple queries will be performed on the same path, a PathClassLoader instance + * should be created for better performance. + */ public static URL getResourceInPath(String name, Iterable path) { return new PathClassLoader(EmptyClassLoader.INSTANCE, path).getResource(name); } - /** - * Locate a resource in the given path. Returns {@code null} if the resource is not found. - * If multiple queries will be performed on the same path, a PathClassLoader instance - * should be created for better performance. - */ + /** Locate a resource in the given path. Returns {@code null} if the resource is not found. + * If multiple queries will be performed on the same path, a PathClassLoader instance + * should be created for better performance. + */ public static InputStream getResourceInPathAsStream(String name, File... path) { return getResourceInPathAsStream(name, IterUtil.asIterable(path)); } - /** - * Locate a resource in the given path. Returns {@code null} if the resource is not found. - * If multiple queries will be performed on the same path, a PathClassLoader instance - * should be created for better performance. - */ + /** Locate a resource in the given path. Returns {@code null} if the resource is not found. + * If multiple queries will be performed on the same path, a PathClassLoader instance + * should be created for better performance. + */ public static InputStream getResourceInPathAsStream(String name, Iterable path) { return new PathClassLoader(EmptyClassLoader.INSTANCE, path).getResourceAsStream(name); } - private final Iterable _path; private URLClassLoader _urlLoader; private Iterable _urlLoaderPath; - /** - * Create a path class loader with the default parent ({@link ClassLoader#getSystemClassLoader}) - * and the specified path. - */ + /** Create a path class loader with the default parent ({@link ClassLoader#getSystemClassLoader}) + * and the specified path. + */ public PathClassLoader(File... path) { this(IterUtil.asIterable(path)); } /** @@ -129,6 +125,7 @@ public PathClassLoader(ClassLoader parent, Iterable path) { super(parent); _path = path; updateURLLoader(); + _log.log("Constructing PathClassLoader with parent " + parent + " and path '" + path + "'"); } private void updateURLLoader() { @@ -143,7 +140,18 @@ private void updateURLLoader() { _urlLoader = new URLClassLoader(urls.toArray(new URL[urls.size()]), EmptyClassLoader.INSTANCE); } - @Override protected Class findClass(String name) throws ClassNotFoundException { +// /** This override is defined solely to trace calls to this method; it immediately invokes the +// * overridden code. +// */ +// @Override +// protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException { +// _log.log("PathClassLoader.loadClass(" + name + ", " + resolve + ") called"); +// return super.loadClass(name, resolve); +// } + + @Override + protected Class findClass(String name) throws ClassNotFoundException { + _log.log("PathClassLoader.findClass(" + name + ") called"); URL resource = findResource(name.replace('.', '/') + ".class"); if (resource == null) { throw new ClassNotFoundException(); } else { @@ -161,14 +169,17 @@ private void updateURLLoader() { } } - @Override protected URL findResource(String name) { + @Override + protected URL findResource(String name) { + _log.log("findResource(" + name + ") called; _path is " + _path); if (!IterUtil.isEqual(_path, _urlLoaderPath)) { updateURLLoader(); } return _urlLoader.findResource(name); } - @Override protected Enumeration findResources(String name) throws IOException { + @Override + protected Enumeration findResources(String name) throws IOException { + _log.log("findResources(" + name + ") called _path is " + _path); if (!IterUtil.isEqual(_path, _urlLoaderPath)) { updateURLLoader(); } return _urlLoader.findResources(name); } - } diff --git a/plt/src/edu/rice/cs/plt/reflect/PreemptingClassLoader.java b/plt/src/edu/rice/cs/plt/reflect/PreemptingClassLoader.java index 75e158577..b970e8fcb 100644 --- a/plt/src/edu/rice/cs/plt/reflect/PreemptingClassLoader.java +++ b/plt/src/edu/rice/cs/plt/reflect/PreemptingClassLoader.java @@ -40,23 +40,22 @@ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISI import edu.rice.cs.plt.iter.IterUtil; import edu.rice.cs.plt.io.IOUtil; -/** - *

A class loader that claims a set of classes available in its parent as its own. This allows classes - * that would otherwise be loaded by a grandparent or distant ancestor to be loaded in a context that - * gives them access to all classes available to the parent. For example, if a library must be loaded - * with a {@link PathClassLoader}, while an adapter for that library is available on the static class - * path (without any custom class loading), loading the adapter directly will lead to errors — the - * library will not be visible to it. When loaded instead by this class loader, the adapter can see both the - * application classes and the library classes.

- * - *

The implementation is somewhat limited: the only way to access a class definition in an arbitrary class - * loader without actually defining that class is to invoke {@link ClassLoader#getResource} with - * the name of a {@code .class} file. To work correctly, then, all preempted classes must be available - * as class files via {@code parent.getResource(classFileName)}. Most class loaders (especially those - * that simply load class files from some repository) follow the convention that a class will be loaded - * only if a resource with the appropriate class file name exists. But there is no guarantee that all - * class loaders (such as those that generate class definitions on the fly) will follow this convention.

- */ +/**

A class loader that claims a set of classes available in its parent as its own. This allows classes + * that would otherwise be loaded by a grandparent or distant ancestor to be loaded in a context that + * gives them access to all classes available to the parent. For example, if a library must be loaded + * with a {@link PathClassLoader}, while an adapter for that library is available on the static class + * path (without any custom class loading), loading the adapter directly will lead to errors — the + * library will not be visible to it. When loaded instead by this class loader, the adapter can see both the + * application classes and the library classes.

+ * + *

The implementation is somewhat limited: the only way to access a class definition in an arbitrary class + * loader without actually defining that class is to invoke {@link ClassLoader#getResource} with + * the name of a {@code .class} file. To work correctly, then, all preempted classes must be available + * as class files via {@code parent.getResource(classFileName)}. Most class loaders (especially those + * that simply load class files from some repository) follow the convention that a class will be loaded + * only if a resource with the appropriate class file name exists. But there is no guarantee that all + * class loaders (such as those that generate class definitions on the fly) will follow this convention.

+ */ public class PreemptingClassLoader extends AbstractClassLoader { private Iterable _prefixes; diff --git a/plt/src/edu/rice/cs/plt/reflect/ShadowingClassLoader.java b/plt/src/edu/rice/cs/plt/reflect/ShadowingClassLoader.java index 9413784f0..cfa8ef1d6 100644 --- a/plt/src/edu/rice/cs/plt/reflect/ShadowingClassLoader.java +++ b/plt/src/edu/rice/cs/plt/reflect/ShadowingClassLoader.java @@ -36,67 +36,74 @@ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISI import java.net.URL; import edu.rice.cs.plt.iter.IterUtil; +import edu.rice.cs.util.Log; import static edu.rice.cs.plt.debug.DebugUtil.debug; -/** - * A class loader that hides a set of classes and related resources. This allows classes - * with the same name (but perhaps a different implementation) to be cleanly loaded by a child loader. - */ +/** A class loader that hides a set of classes and related resources. This allows classes + * with the same name (but perhaps a different implementation) to be cleanly loaded by a child loader. + */ public class ShadowingClassLoader extends ClassLoader { + private static final Log _log = new Log("JUnitTestManager.txt", false); + private final Iterable _prefixes; private final boolean _blackList; private final boolean _filterBootClasses; - /** - * Create a ShadowingClassLoader that will hide non-bootstrap classes matching the given prefixes. - * @param parent The parent loader - * @param excludePrefixes A set of class name prefixes to match. Each prefix must be a package or class - * name (partial names, like {@code "java.lang.Stri"}, will not match the full class - * name). - */ + /** Create a ShadowingClassLoader that will hide non-bootstrap classes matching the given prefixes. + * @param parent The parent loader + * @param excludePrefixes A set of class name prefixes to match. Each prefix must be a package or class + * name (partial names, like {@code "java.lang.Stri"}, will not match the full class + * name). + */ + public static ShadowingClassLoader blackList(ClassLoader parent, Iterable excludePrefixes) { + return new ShadowingClassLoader(parent, true, excludePrefixes, false); + } public static ShadowingClassLoader blackList(ClassLoader parent, String... excludePrefixes) { return new ShadowingClassLoader(parent, true, IterUtil.asIterable(excludePrefixes), false); } - - /** - * Create a ShadowingClassLoader that will hide all non-bootstrap classes except those matching the - * given prefixes. - * @param parent The parent loader - * @param includePrefixes A set of class name prefixes to match. Each prefix must be a package or class - * name (partial names, like {@code "java.lang.Stri"}, will not match the full class - * name). - */ + + /** Create a ShadowingClassLoader that will hide all non-bootstrap classes except those matching the + * given prefixes. + * @param parent The parent loader + * @param includePrefixes A set of class name prefixes to match. Each prefix must be a package or class + * name (partial names, like {@code "java.lang.Stri"}, will not match the full class + * name). + */ + public static ShadowingClassLoader whiteList(ClassLoader parent, Iterable includePrefixes) { + return new ShadowingClassLoader(parent, false, includePrefixes, false); + } public static ShadowingClassLoader whiteList(ClassLoader parent, String... includePrefixes) { return new ShadowingClassLoader(parent, false, IterUtil.asIterable(includePrefixes), false); } - /** - * @param parent The parent loader - * @param blackList If {@code true}, classes matching {@code prefixes} are prevented from loading; otherwise, - * all classes except those matching {@code prefixes} are prevented from loading. - * @param prefixes A set of class name prefixes to which class names will be compared. Each prefix must - * be a package or class name (partial names, like {@code "java.lang.Stri"}, will not - * match the full class name). - * @param filterBootClasses Whether classes and resources available to the bootstrap class loader should - * be hidden. If {@code true}, care must be taken to ensure that essential - * classes (like {@code java.lang.Object}) are available when needed. - */ + /** @param parent The parent loader + * @param blackList If {@code true}, classes matching {@code prefixes} are prevented from loading; otherwise, + * all classes except those matching {@code prefixes} are prevented from loading. + * @param prefixes A set of class name prefixes to which class names will be compared. Each prefix must + * be a package or class name (partial names, like {@code "java.lang.Stri"}, will not + * match the full class name). + * @param filterBootClasses Whether classes and resources available to the bootstrap class loader should + * be hidden. If {@code true}, care must be taken to ensure that essential + * classes (like {@code java.lang.Object}) are available when needed. + */ public ShadowingClassLoader(ClassLoader parent, boolean blackList, Iterable prefixes, boolean filterBootClasses) { super(parent); _blackList = blackList; _prefixes = prefixes; _filterBootClasses = filterBootClasses; + _log.log("Constructing ShadowingClassLoader with parent '" + parent + "' blackList = " + _blackList + " filterBootClasses = " + _filterBootClasses); } - /** - * If the given class is shadowed, a {@code ClassNotFoundException} will - * occur; otherwise, the method delegates to the parent class loader. - */ + /** If the given class is shadowed, a {@code ClassNotFoundException} will occur; otherwise, the method delegates to + * the parent class loader. + */ @Override protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException { + _log.log("ShadowingClassLoader.loadClass(" + name + ", " + resolve + ") called"); if ((_filterBootClasses || !isBootClass(name)) && matchesPrefixes(name) == _blackList) { + _log.log("Class " + name + " is being shadowed"); throw new ClassNotFoundException(name + " is being shadowed"); } else {