Skip to content

Commit ab8f72f

Browse files
author
rcartwright
committed
This revision includes some more minor cosmetic changes (performed via
replace all commands), a refactoring of one of the tests in GlobalModelOtherTest in an attempt to elminate occasional test failures on some platforms, and an important bug fix. The bug fix involves updating the cached value of the DefinitionsDocument in MainFrame for the active document after findAll and replaceAll commands. On the completion of these commands, no explicit document switch is performed (which is the only way _currenDefDoc was being updated), yet a new DefinitionsDocument is created if the active document is kicked out of the cache. The following files were modified: M src/edu/rice/cs/drjava/IndentFiles.java M src/edu/rice/cs/drjava/DrJava.java M src/edu/rice/cs/drjava/DrJavaRoot.java M src/edu/rice/cs/drjava/DrJavaRestart.java M src/edu/rice/cs/drjava/model/BrowserHistoryManager.java M src/edu/rice/cs/drjava/model/debug/jpda/DocumentDebugAction.java M src/edu/rice/cs/drjava/model/debug/jpda/JPDADebugger.java M src/edu/rice/cs/drjava/model/debug/jpda/DebugTest.java M src/edu/rice/cs/drjava/model/debug/jpda/EventHandlerThread.java M src/edu/rice/cs/drjava/model/debug/jpda/PendingRequestManager.java M src/edu/rice/cs/drjava/model/debug/jpda/DebugContextTest.java M src/edu/rice/cs/drjava/model/JarJDKToolsLibrary.java M src/edu/rice/cs/drjava/model/GlobalModelTestCase.java M src/edu/rice/cs/drjava/model/DummyOpenDefDocTest.java M src/edu/rice/cs/drjava/model/definitions/indent/ActionBracePlusTest.java M src/edu/rice/cs/drjava/model/definitions/DefinitionsDocument.java M src/edu/rice/cs/drjava/model/definitions/reducedmodel/Brace.java M src/edu/rice/cs/drjava/model/definitions/reducedmodel/ReducedModelBrace.java M src/edu/rice/cs/drjava/model/definitions/IndentTest.java M src/edu/rice/cs/drjava/model/ClipboardHistoryModelTest.java M src/edu/rice/cs/drjava/model/GlobalEventNotifier.java M src/edu/rice/cs/drjava/model/junit/DefaultJUnitModel.java M src/edu/rice/cs/drjava/model/junit/JUnitErrorModelTest.java M src/edu/rice/cs/drjava/model/repl/JavaInterpreterTest.java M src/edu/rice/cs/drjava/model/repl/InteractionsModelTest.java M src/edu/rice/cs/drjava/model/repl/InteractionsModel.java M src/edu/rice/cs/drjava/model/repl/newjvm/NewJVMTest.java M src/edu/rice/cs/drjava/model/GlobalModelJUnitTest.java M src/edu/rice/cs/drjava/model/MultiThreadedTestCase.java M src/edu/rice/cs/drjava/model/compiler/DefaultCompilerModel.java M src/edu/rice/cs/drjava/model/compiler/LanguageLevelStackTraceMapper.java M src/edu/rice/cs/drjava/model/FindReplaceMachine.java M src/edu/rice/cs/drjava/model/ClassAndInterfaceFinderTest.java M src/edu/rice/cs/drjava/model/AbstractGlobalModel.java M src/edu/rice/cs/drjava/model/DefaultLightWeightParsingControl.java M src/edu/rice/cs/drjava/model/GlobalModelOtherTest.java M src/edu/rice/cs/drjava/RemoteControlServer.java M src/edu/rice/cs/drjava/config/UnaryOpProperty.java M src/edu/rice/cs/drjava/config/OptionConstants.java M src/edu/rice/cs/drjava/config/DrJavaProperty.java M src/edu/rice/cs/drjava/config/ConfigOptionListeners.java M src/edu/rice/cs/drjava/config/BinaryOpProperty.java M src/edu/rice/cs/drjava/config/DrJavaPropertySetupTest.java M src/edu/rice/cs/drjava/config/DrJavaPropertySetup.java M src/edu/rice/cs/drjava/config/QuaternaryOpProperty.java M src/edu/rice/cs/drjava/config/PropertyMaps.java M src/edu/rice/cs/drjava/config/ConfigProperty.java M src/edu/rice/cs/drjava/config/TernaryOpProperty.java M src/edu/rice/cs/drjava/config/VectorOption.java M src/edu/rice/cs/drjava/config/OptionMapLoader.java M src/edu/rice/cs/drjava/config/OptionMapLoaderTest.java M src/edu/rice/cs/drjava/CommandLineTest.java M src/edu/rice/cs/drjava/project/ProjectFileParser.java M src/edu/rice/cs/drjava/project/XMLProjectFileParser.java M src/edu/rice/cs/drjava/project/XMLProjectFileParserTest.java M src/edu/rice/cs/drjava/project/ProjectTest.java M src/edu/rice/cs/drjava/project/ProjectFileParserFacade.java M src/edu/rice/cs/drjava/project/ProjectProfile.java M src/edu/rice/cs/drjava/RemoteControlClient.java M src/edu/rice/cs/drjava/ui/MainFrame.java M src/edu/rice/cs/drjava/ui/ExternalProcessPanel.java M src/edu/rice/cs/drjava/ui/EditExternalDialog.java M src/edu/rice/cs/drjava/ui/KeyBindingManager.java M src/edu/rice/cs/drjava/ui/HTMLFrame.java M src/edu/rice/cs/drjava/ui/JarOptionsDialog.java M src/edu/rice/cs/drjava/ui/DrJavaSurveyPopup.java M src/edu/rice/cs/drjava/ui/ErrorPanel.java M src/edu/rice/cs/drjava/ui/predictive/PredictiveInputModelTest.java M src/edu/rice/cs/drjava/ui/predictive/PredictiveInputFrame.java M src/edu/rice/cs/drjava/ui/NewVersionPopup.java M src/edu/rice/cs/drjava/ui/config/ConfigFrame.java M src/edu/rice/cs/drjava/ui/config/OptionComponent.java M src/edu/rice/cs/drjava/ui/ProjectMenuTest.java M src/edu/rice/cs/drjava/ui/RegionsTreePanel.java M src/edu/rice/cs/drjava/ui/RegionsListPanel.java M src/edu/rice/cs/drjava/ui/ExecuteExternalDialog.java M src/edu/rice/cs/drjava/ui/AboutDialog.java M src/edu/rice/cs/drjava/ui/InteractionsController.java M src/edu/rice/cs/drjava/ui/DrJavaErrorWindow.java M src/edu/rice/cs/drjava/ui/JUnitPanel.java M src/edu/rice/cs/drjava/ui/LessPanel.java M src/edu/rice/cs/drjava/ui/ProjectPropertiesFrame.java M src/edu/rice/cs/util/FileOps.java M src/edu/rice/cs/util/FileOpsTest.java M src/edu/rice/cs/util/StreamRedirectThread.java M src/edu/rice/cs/util/swing/DirectorySelectorComponent.java M src/edu/rice/cs/util/swing/HighlightManager.java M src/edu/rice/cs/util/swing/FileSelectorComponent.java M src/edu/rice/cs/util/LogTest.java M src/edu/rice/cs/util/ProcessChain.java M src/edu/rice/cs/util/XMLConfig.java M src/edu/rice/cs/util/XMLConfigTest.java M src/edu/rice/cs/util/StringOps.java M src/edu/rice/cs/util/StringOpsTest.java M src/edu/rice/cs/util/jar/JarCreationTest.java M src/edu/rice/cs/util/GeneralProcessCreator.java M src/edu/rice/cs/util/sexp/Tokens.java M src/edu/rice/cs/util/sexp/SExpParser.java M src/edu/rice/cs/util/sexp/SExpParserTest.java M src/edu/rice/cs/util/ProcessSequence.java M src/edu/rice/cs/util/RunnableEST.java M src/edu/rice/cs/util/BalancingStreamTokenizer.java M src/edu/rice/cs/util/BalancingStreamTokenizerTest.java M src/edu/rice/cs/util/ProcessCreator.java git-svn-id: file:///tmp/test-svn/trunk@5027 fe72c1cf-3628-48e9-8b72-1c46755d3cff
1 parent 1a00210 commit ab8f72f

File tree

104 files changed

+1903
-1903
lines changed

Some content is hidden

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

104 files changed

+1903
-1903
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,9 @@ public void testDotPaths() {
362362

363363
assertTrue("child directory created OK", new File(newDirectory, "childDir").mkdir());
364364

365-
File relativeFile = new File(newDirectory, "."+FS+"X.java");
366-
File relativeFile2 = new File(newDirectory, "."+FS+"Y.java");
367-
File relativeFile3 = new File(newDirectory, "childDir"+FS+".."+FS+"Z.java");
365+
File relativeFile = new File(newDirectory, "." + FS + "X.java");
366+
File relativeFile2 = new File(newDirectory, "." + FS + "Y.java");
367+
File relativeFile3 = new File(newDirectory, "childDir" + FS + ".." + FS + "Z.java");
368368

369369
try {
370370
checkFile(relativeFile, funnyName);

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

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ public static void configureAndLoadDrJavaRoot(String[] args) {
193193
if (failCount > 0) {
194194
// 2nd time that spawning has failed, give up
195195
JOptionPane.showMessageDialog(null,
196-
"DrJava was unable to start, and resetting your configuration\n"+
197-
"did not help. Please file a support request at\n"+
196+
"DrJava was unable to start, and resetting your configuration\n" +
197+
"did not help. Please file a support request at\n" +
198198
"https://sourceforge.net/projects/drjava/",
199199
"Could Not Start DrJava",
200200
JOptionPane.ERROR_MESSAGE);
@@ -203,7 +203,7 @@ public static void configureAndLoadDrJavaRoot(String[] args) {
203203
else {
204204
// 1st time that spawning has failed, offer to reset configuration
205205
int result = JOptionPane.showConfirmDialog(null,
206-
"DrJava was unable to start. Your configuration file (.drjava)\n"+
206+
"DrJava was unable to start. Your configuration file (.drjava)\n" +
207207
"might be corrupt. Do you want to reset your configuration?",
208208
"Could Not Start DrJava",
209209
JOptionPane.YES_NO_OPTION);
@@ -253,7 +253,7 @@ static boolean handleCommandLineArgs(String[] args) {
253253
// Loop through arguments looking for known options
254254
int argIndex = 0;
255255
int len = args.length;
256-
_log.log("handleCommandLineArgs. _filesToOpen: "+_filesToOpen);
256+
_log.log("handleCommandLineArgs. _filesToOpen: " + _filesToOpen);
257257
_log.log("\t_filesToOpen cleared");
258258
_filesToOpen.clear();
259259

@@ -297,7 +297,7 @@ else if (arg.equals("-help") || arg.equals("-?")) {
297297

298298
if ((!("".equals(getConfig().getSetting(MASTER_JVM_XMX)))) &&
299299
(!(edu.rice.cs.drjava.config.OptionConstants.heapSizeChoices.get(0).equals(getConfig().getSetting(MASTER_JVM_XMX))))) {
300-
_jvmArgs.add("-Xmx"+getConfig().getSetting(MASTER_JVM_XMX).trim()+"M");
300+
_jvmArgs.add("-Xmx" + getConfig().getSetting(MASTER_JVM_XMX).trim() + "M");
301301
heapSizeGiven = true;
302302
}
303303
List<String> configArgs = ArgumentTokenizer.tokenize(getConfig().getSetting(MASTER_JVM_ARGS));
@@ -321,7 +321,7 @@ else if (arg.equals("-help") || arg.equals("-?")) {
321321
// Open the remaining args as filenames
322322

323323
for (int i = argIndex; i < len; i++) { addFileToOpen(args[i]); }
324-
_log.log("\t _filesToOpen now contains: "+_filesToOpen);
324+
_log.log("\t _filesToOpen now contains: " + _filesToOpen);
325325

326326
return true;
327327
}
@@ -398,7 +398,7 @@ protected static void _saveConfig() {
398398
// text = new String[] {
399399
// "The file you chose did not appear to be the correct 'tools.jar'",
400400
// "that is compatible with the version of Java that is used to",
401-
// "run DrJava (Java version "+System.getProperty("java.version")+").",
401+
// "run DrJava (Java version " + System.getProperty("java.version") + ").",
402402
// "Your choice might be an incompatible version of the file.",
403403
// "Would you like to pick again? The 'tools.jar' file is ",
404404
// "generally located in the 'lib' subdirectory under your ",
@@ -411,9 +411,9 @@ protected static void _saveConfig() {
411411
// text = new String[] {
412412
// "The file you chose did not appear to be the correct 'tools.jar'",
413413
// "that is compatible with the version of Java that is used to",
414-
// "run DrJava (Java version "+System.getProperty("java.version")+").",
414+
// "run DrJava (Java version " + System.getProperty("java.version") + ").",
415415
// "The file you have selected appears to be for",
416-
// "Java version "+selectedVersion+".",
416+
// "Java version " + selectedVersion + ".",
417417
// "Your choice might be an incompatible version of the file.",
418418
// "Would you like to pick again? The 'tools.jar' file is ",
419419
// "generally located in the 'lib' subdirectory under your ",
@@ -429,7 +429,7 @@ protected static void _saveConfig() {
429429

430430
/* Erase all non-final bindings created in this class. Only used in testing. */
431431
public static void cleanUp() {
432-
_log.log("cleanUp. _filesToOpen: "+_filesToOpen);
432+
_log.log("cleanUp. _filesToOpen: " + _filesToOpen);
433433
_filesToOpen.clear();
434434
_log.log("\t_filesToOpen cleared");
435435
_jvmArgs.clear();
@@ -466,17 +466,17 @@ public static boolean warnIfLinuxWithCompiz() {
466466

467467
String[] options = new String[] { "Yes", "Yes, and ignore from now on", "No" };
468468
int res = javax.swing.JOptionPane.showOptionDialog(null,
469-
"<html>DrJava has detected that you are using Compiz.<br>"+
470-
"<br>"+
471-
"Compiz and Java Swing are currently incompatible and can cause<br>"+
472-
"DrJava or your computer to crash.<br>"+
473-
"<br>"+
474-
"We recommend that you <b>disable Compiz</b>. On Ubuntu, go to<br>"+
475-
"System->Preferences->Appearence, display the Visual Effects tab,<br>"+
476-
"and select 'None'.<br>"+
477-
"<br>"+
478-
"For more information, please go to http://drjava.org/compiz<br>"+
479-
"<br>"+
469+
"<html>DrJava has detected that you are using Compiz.<br>" +
470+
"<br>" +
471+
"Compiz and Java Swing are currently incompatible and can cause<br>" +
472+
"DrJava or your computer to crash.<br>" +
473+
"<br>" +
474+
"We recommend that you <b>disable Compiz</b>. On Ubuntu, go to<br>" +
475+
"System->Preferences->Appearence, display the Visual Effects tab,<br>" +
476+
"and select 'None'.<br>" +
477+
"<br>" +
478+
"For more information, please go to http://drjava.org/compiz<br>" +
479+
"<br>" +
480480
"Do you want to start DrJava anyway?</html>",
481481
"Compiz detected",
482482
JOptionPane.DEFAULT_OPTION,

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

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public static void message(String message) {
6464
public static boolean delete(File f) {
6565
for(int i = 0; i < ATTEMPTS; ++i) {
6666
if (f.delete()) return true;
67-
LOG.log("Failed to delete "+f+", trying again");
67+
LOG.log("Failed to delete " + f + ", trying again");
6868
try {
6969
Thread.sleep(TIME_BETWEEN_ATTEMPTS);
7070
}
@@ -75,7 +75,7 @@ public static boolean delete(File f) {
7575
public static boolean deleteRecursively(File f) {
7676
for(int i = 0; i < ATTEMPTS; ++i) {
7777
if (edu.rice.cs.plt.io.IOUtil.deleteRecursively(f)) return true;
78-
LOG.log("Failed to recursively delete "+f+", trying again");
78+
LOG.log("Failed to recursively delete " + f + ", trying again");
7979
try {
8080
Thread.sleep(TIME_BETWEEN_ATTEMPTS);
8181
}
@@ -86,7 +86,7 @@ public static boolean deleteRecursively(File f) {
8686
public static boolean rename(File from, File to) {
8787
for(int i = 0; i < ATTEMPTS; ++i) {
8888
if (from.renameTo(to)) return true;
89-
LOG.log("Failed to rename "+from+" to "+to+", trying again");
89+
LOG.log("Failed to rename " + from + " to " + to + ", trying again");
9090
try {
9191
Thread.sleep(TIME_BETWEEN_ATTEMPTS);
9292
}
@@ -103,8 +103,8 @@ public static void main(final String[] args) {
103103
File exec = dest;
104104

105105
try {
106-
LOG.log("source: "+source.getAbsolutePath());
107-
LOG.log("dest : "+dest.getAbsolutePath());
106+
LOG.log("source: " + source.getAbsolutePath());
107+
LOG.log("dest : " + dest.getAbsolutePath());
108108

109109
if (dest.exists()) {
110110
if (dest.isFile()) {
@@ -114,21 +114,21 @@ public static void main(final String[] args) {
114114
if (!rename(source,dest)) {
115115
// could not rename, keep source as name
116116
exec = source;
117-
message("A new version of DrJava was downloaded. However, it could not be\n"+
118-
"installed in the same place as the old DrJava.\n\n"+
119-
"The new copy is now installed at:\n"+
120-
source.getAbsolutePath()+"\n\n"+
117+
message("A new version of DrJava was downloaded. However, it could not be\n" +
118+
"installed in the same place as the old DrJava.\n\n" +
119+
"The new copy is now installed at:\n" +
120+
source.getAbsolutePath() + "\n\n" +
121121
"The old copy has been deleted.");
122122
}
123123
}
124124
else {
125125
// could not delete it, keep source as name
126126
exec = source;
127-
message("A new version of DrJava was downloaded. However, it could not be\n"+
128-
"installed in the same place as the old DrJava.\n\n"+
129-
"The new copy is now installed at:\n"+
130-
source.getAbsolutePath()+"\n\n"+
131-
"The old copy is still installed at:\n"+
127+
message("A new version of DrJava was downloaded. However, it could not be\n" +
128+
"installed in the same place as the old DrJava.\n\n" +
129+
"The new copy is now installed at:\n" +
130+
source.getAbsolutePath() + "\n\n" +
131+
"The old copy is still installed at:\n" +
132132
dest.getAbsolutePath());
133133
}
134134
LOG.log("Restarting...");
@@ -145,11 +145,11 @@ public static void main(final String[] args) {
145145
// could rename, now delete the directory containing the former source
146146
delete(source.getParentFile());
147147
if (!deleteRecursively(old)) {
148-
message("A new version of DrJava was downloaded. However, the old version"+
149-
"could not be deleted.\n\n"+
150-
"The new copy is now installed at:\n"+
151-
dest.getAbsolutePath()+"\n\n"+
152-
"The old copy is still installed at:\n"+
148+
message("A new version of DrJava was downloaded. However, the old version" +
149+
"could not be deleted.\n\n" +
150+
"The new copy is now installed at:\n" +
151+
dest.getAbsolutePath() + "\n\n" +
152+
"The old copy is still installed at:\n" +
153153
old.getAbsolutePath());
154154
}
155155
}
@@ -159,43 +159,43 @@ public static void main(final String[] args) {
159159
// try to rename dest back
160160
if (rename(old,dest)) {
161161
// was at least able to rename back
162-
message("A new version of DrJava was downloaded. However, it could not be\n"+
163-
"installed in the same place as the old DrJava.\n\n"+
164-
"The new copy is now installed at:\n"+
165-
source.getAbsolutePath()+"\n\n"+
166-
"The old copy is still installed at:\n"+
162+
message("A new version of DrJava was downloaded. However, it could not be\n" +
163+
"installed in the same place as the old DrJava.\n\n" +
164+
"The new copy is now installed at:\n" +
165+
source.getAbsolutePath() + "\n\n" +
166+
"The old copy is still installed at:\n" +
167167
dest.getAbsolutePath());
168168
}
169169
else {
170170
// couldn't even rename back
171-
message("A new version of DrJava was downloaded. However, it could not be\n"+
172-
"installed in the same place as the old DrJava.\n\n"+
173-
"The new copy is now installed at:\n"+
174-
source.getAbsolutePath()+"\n\n"+
175-
"The old copy is still installed at:\n"+
171+
message("A new version of DrJava was downloaded. However, it could not be\n" +
172+
"installed in the same place as the old DrJava.\n\n" +
173+
"The new copy is now installed at:\n" +
174+
source.getAbsolutePath() + "\n\n" +
175+
"The old copy is still installed at:\n" +
176176
old.getAbsolutePath());
177177
}
178178
}
179179
}
180180
else {
181181
// could not rename keep source as name
182182
exec = source;
183-
message("A new version of DrJava was downloaded. However, it could not be\n"+
184-
"installed in the same place as the old DrJava.\n\n"+
185-
"The new copy is now installed at:\n"+
186-
source.getAbsolutePath()+"\n\n"+
187-
"The old copy is still installed at:\n"+
183+
message("A new version of DrJava was downloaded. However, it could not be\n" +
184+
"installed in the same place as the old DrJava.\n\n" +
185+
"The new copy is now installed at:\n" +
186+
source.getAbsolutePath() + "\n\n" +
187+
"The old copy is still installed at:\n" +
188188
dest.getAbsolutePath());
189189
}
190190

191191
// check if Mac's open command exists
192192
File macOpenFile = new File("/usr/bin/open");
193-
LOG.log("Searching for "+macOpenFile);
193+
LOG.log("Searching for " + macOpenFile);
194194
if (!macOpenFile.exists()) {
195195
String path = System.getenv("PATH");
196196
for(String p: path.split(System.getProperty("path.separator"))) {
197197
macOpenFile = new File(p, "tar");
198-
LOG.log("Searching for "+macOpenFile);
198+
LOG.log("Searching for " + macOpenFile);
199199
if (macOpenFile.exists()) break;
200200
}
201201
}
@@ -218,8 +218,8 @@ public static void main(final String[] args) {
218218
}
219219
}
220220
catch(Exception e) {
221-
message("A new version of DrJava was downloaded. However, there was an error"+
222-
"during installation:\n"+e.getMessage());
221+
message("A new version of DrJava was downloaded. However, there was an error" +
222+
"during installation:\n" + e.getMessage());
223223
}
224224
}
225225
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ public static void removeModalWindowAdapter(Window w) {
355355
* @param f file to open
356356
* @param lineNo line number to jump to, or -1 of not specified */
357357
public static void handleRemoteOpenFile(File f, int lineNo) {
358-
DrJava._log.log("DrJavaRoot.handleRemoteOpenFile, f="+f);
358+
DrJava._log.log("DrJavaRoot.handleRemoteOpenFile, f=" + f);
359359
if (_mainFrame != null) {
360360
DrJava._log.log("\tcalling _mainFrame");
361361
_mainFrame.handleRemoteOpenFile(f, lineNo);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private static void _displayUsage() {
9696
*/
9797
public static void indentFiles(Vector<String> fileNames, int indentLevel, boolean silent) {
9898
//System.setProperty("java.awt.headless", "true"); // attempt headless AWT
99-
//System.out.println("Using Headless AWT: "+isHeadless());
99+
//System.out.println("Using Headless AWT: " + isHeadless());
100100
Indenter indenter = new Indenter(indentLevel);
101101

102102
if (! silent) System.out.println("DrJava - Indenting files:");

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public static synchronized boolean openFile(File f) throws IOException {
8787
// send request
8888
String dString = RemoteControlServer.QUERY_PREFIX;
8989
if (f != null) {
90-
dString = dString+" "+f.getAbsolutePath();
90+
dString = dString + " " + f.getAbsolutePath();
9191
}
9292
byte[] buf = dString.getBytes();
9393
InetAddress address = InetAddress.getByName("127.0.0.1");
@@ -126,7 +126,7 @@ public static void main(String[] args) {
126126
for (int i = 0; i < args.length; ++i) {
127127
try {
128128
boolean ret = openFile(new File(args[i]));
129-
System.out.println("openFile returned "+ret);
129+
System.out.println("openFile returned " + ret);
130130
}
131131
catch(IOException ioe) {
132132
ioe.printStackTrace();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
*
5757
* A client can tell a server to open a file and jump to a certain line number by sending QUERY_PREFIX + " " +
5858
* absoluteFileName + File.pathSeparator + lineNumber.
59-
* The server will respond with RESPONSE_PREFIX, or RESPONSE_PREFIX+" "+error if an error occurred.
59+
* The server will respond with RESPONSE_PREFIX, or RESPONSE_PREFIX + " " + error if an error occurred.
6060
*
6161
* This class is declared final because it cannot be robustly subclassed because the constructor starts a thread.
6262
*/
@@ -68,7 +68,7 @@ public final class RemoteControlServer {
6868
public static final String RESPONSE_PREFIX = "DrJava Remote Control ";
6969

7070
/** Prefix of a legitimate response by this server, including the user name. */
71-
public static final String RESPONSE_PREFIX_WITH_USER = RESPONSE_PREFIX+System.getProperty("user.name")+"!";
71+
public static final String RESPONSE_PREFIX_WITH_USER = RESPONSE_PREFIX+System.getProperty("user.name") + "!";
7272

7373
/** Create a new remote control server, running in its own daemon thread.
7474
* @param frame main frame

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,29 +98,29 @@ public BinaryOpProperty(String name,
9898
public void update(PropertyMaps pm) {
9999
P op1;
100100
if (_attributes.get(_op1Name) == null) {
101-
_value = "("+_name+" Error...)";
101+
_value = "(" + _name + " Error...)";
102102
return;
103103
}
104104
else {
105105
try {
106106
op1 = _parse1.value(_attributes.get(_op1Name));
107107
}
108108
catch(Exception e) {
109-
_value = "("+_name+" Error...)";
109+
_value = "(" + _name + " Error...)";
110110
return;
111111
}
112112
}
113113
Q op2;
114114
if (_attributes.get(_op2Name) == null) {
115-
_value = "("+_name+" Error...)";
115+
_value = "(" + _name + " Error...)";
116116
return;
117117
}
118118
else {
119119
try {
120120
op2 = _parse2.value(_attributes.get(_op2Name));
121121
}
122122
catch(Exception ee) {
123-
_value = "("+_name+" Error...)";
123+
_value = "(" + _name + " Error...)";
124124
return;
125125
}
126126
}

0 commit comments

Comments
 (0)