Author: yradtsevich
Date: 2012-04-01 06:29:26 -0400 (Sun, 01 Apr 2012)
New Revision: 39954
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/callbacks/ViewSourceCallback.java
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/TransparentReader.java
Log:
https://issues.jboss.org/browse/JBIDE-11179 : BrowserSim - add a view source option
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/callbacks/ViewSourceCallback.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/callbacks/ViewSourceCallback.java 2012-04-01
10:26:24 UTC (rev 39953)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/callbacks/ViewSourceCallback.java 2012-04-01
10:29:26 UTC (rev 39954)
@@ -30,7 +30,6 @@
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.part.EditorPart;
import org.eclipse.ui.texteditor.ITextEditor;
import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
import org.jboss.tools.vpe.browsersim.eclipse.util.BrowserSimLauncher;
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/TransparentReader.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/TransparentReader.java 2012-04-01
10:26:24 UTC (rev 39953)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim.eclipse/src/org/jboss/tools/vpe/browsersim/eclipse/util/TransparentReader.java 2012-04-01
10:29:26 UTC (rev 39954)
@@ -29,9 +29,9 @@
public String readLine(boolean forwardToConcole) throws IOException {
StringBuilder nextLine = new StringBuilder();
- int nextCharInt;
+ int nextCharInt = -1;
boolean eolReached = false;
- while ((nextCharInt = reader.read()) >= 0 && !eolReached) {
+ while (!eolReached && (nextCharInt = reader.read()) >= 0) {
char nextChar = (char) nextCharInt;
if (forwardToConcole) {
output.print(nextChar);