[Mulgara-svn] r180 - trunk/src/jar/itql/java/org/mulgara/itql
pag at mulgara.org
pag at mulgara.org
Sat Feb 24 19:23:18 UTC 2007
Author: pag
Date: 2007-02-24 13:23:18 -0600 (Sat, 24 Feb 2007)
New Revision: 180
Modified:
trunk/src/jar/itql/java/org/mulgara/itql/ItqlSessionUI.java
Log:
Standardized formatting
Modified: trunk/src/jar/itql/java/org/mulgara/itql/ItqlSessionUI.java
===================================================================
--- trunk/src/jar/itql/java/org/mulgara/itql/ItqlSessionUI.java 2007-02-24 19:22:20 UTC (rev 179)
+++ trunk/src/jar/itql/java/org/mulgara/itql/ItqlSessionUI.java 2007-02-24 19:23:18 UTC (rev 180)
@@ -163,8 +163,7 @@
try {
in = new PipedInputStream((PipedOutputStream) outPipe);
- }
- catch (IOException e) {
+ } catch (IOException e) {
log.error("Error creating input stream", e);
}
@@ -174,8 +173,7 @@
try {
inPipe = new PipedInputStream(pout);
- }
- catch (IOException e) {
+ } catch (IOException e) {
log.error("Error creating input pipe", e);
}
@@ -419,8 +417,7 @@
if (eventOccurred.equals("Copy")) {
text.copy();
- }
- else if (eventOccurred.equals("Paste")) {
+ } else if (eventOccurred.equals("Paste")) {
text.paste();
}
@@ -475,8 +472,7 @@
// Create a new thread and start it.
ExecutionThread execThread = new ExecutionThread("execThread", command);
execThread.start();
- }
- else {
+ } else {
// We've just hit enter so print the prompt.
printPrompt();
@@ -505,8 +501,7 @@
try {
command = text.getText(cursorPosition, textLength() - cursorPosition);
- }
- catch (BadLocationException e) {
+ } catch (BadLocationException e) {
log.error("Failed to get text command at position: " + cursorPosition,
e);
@@ -635,8 +630,7 @@
cursorPosition = textLength();
text.setCaretPosition(cursorPosition);
text.setCharacterAttributes(oldStyle, true);
- }
- catch (Exception e) {
+ } catch (Exception e) {
log.error("Error when printing: " + message, e);
}
@@ -662,8 +656,7 @@
if (font.isBold()) {
StyleConstants.setBold(attr, true);
- }
- else {
+ } else {
StyleConstants.setBold(attr, false);
}
@@ -700,8 +693,7 @@
print(new String(buffer, 0, read));
}
- }
- catch (IOException e) {
+ } catch (IOException e) {
log.error("Error reading input", e);
}
@@ -717,13 +709,11 @@
try {
SwingUtilities.invokeAndWait(runnable);
- }
- catch (Exception e) {
+ } catch (Exception e) {
log.error("Error while executing invoke and wait", e);
}
- }
- else {
+ } else {
runnable.run();
}
@@ -822,14 +812,12 @@
if (answer.isUnconstrained()) {
println("[ true ]");
rowCount = 1;
- }
- else {
+ } else {
if (!answer.next()) {
print("No results returned.",
new Font("Monospaced", Font.BOLD, 12), Color.BLACK);
hasAnswers = false;
- }
- else {
+ } else {
do {
rowCount++;
print("[ ");
@@ -858,8 +846,7 @@
answer.close();
}
- }
- catch (Exception te) {
+ } catch (Exception te) {
// Failed to iterate over or retrieve the answer.
log.fatal("Failed to retrieve or iterate over answer", te);
More information about the Mulgara-svn
mailing list