Commits

Jon Akhtar committed 4dc23aa

Fix the lua console

Comments (0)

Files changed (3)

META-INF/plugin.xml

         <!--<action id="trigger.exception" class="com.sylvanaar.idea.errorreporting.TriggerExceptionAction" text="Trigger Exception">-->
         <!--<add-to-group group-id="NewGroup" relative-to-action="NewFile" anchor="after"/>-->
         <!--</action>-->
-        <action id="com.sylvanaar.idea.Lua.console.RunLuaConsoleAction"
+        <action id="Lua.RunLuaConsole"
                 class="com.sylvanaar.idea.Lua.console.RunLuaConsoleAction"
                 text="Run Lua Console..." description="Run the Lua console">
             <add-to-group group-id="ToolsMenu" anchor="last"/>
         </action>
-        <action id="com.sylvanaar.idea.Lua.actions.GenerateLuaListingAction"
+        <action id="Lua.GenerateLuaListing"
                 class="com.sylvanaar.idea.Lua.actions.GenerateLuaListingAction"
                 text="Generate Lua Listing"
                 description="Generate a source file annotated with comments containing the Lua byte-code for each line.">

src/console/LuaConsoleProcessHandler.java

 
 import com.intellij.execution.console.LanguageConsoleImpl;
 import com.intellij.execution.process.ColoredProcessHandler;
-import com.intellij.execution.process.ProcessOutputTypes;
-import com.intellij.execution.ui.ConsoleViewContentType;
-import com.intellij.openapi.util.Key;
 
 import java.nio.charset.Charset;
 
         myLanguageConsole = languageConsole;
     }
 
-    protected void textAvailable(String text, Key attributes) {
-        ConsoleViewContentType outputType;
-        if (attributes == ProcessOutputTypes.STDERR) outputType = ConsoleViewContentType.ERROR_OUTPUT;
-        else if (attributes == ProcessOutputTypes.SYSTEM) outputType = ConsoleViewContentType.SYSTEM_OUTPUT;
-        else outputType = ConsoleViewContentType.NORMAL_OUTPUT;
-
-        if (text.startsWith(">>")) {
-            text = text.substring(3);
-            myLanguageConsole.setPrompt(">>");
-        } else if (text.startsWith(">")) {
-            text = text.substring(2);
-            myLanguageConsole.setPrompt(">");
-        }
-
-        if (outputType != ConsoleViewContentType.SYSTEM_OUTPUT)
-            LanguageConsoleImpl.printToConsole(myLanguageConsole, text, outputType, null);
-
-        myLanguageConsole.queueUiUpdate(true);
-    }
-
-
     private final LanguageConsoleImpl myLanguageConsole;
 }
 

src/lang/psi/controlFlow/impl/ControlFlowBuilder.java

 
 
     @Override
-    public void visitDeclarationStatement(LuaDeclarationStatement e) {
-        super.visitDeclarationStatement(e);
-    }
-
-    @Override
     public void visitAssignment(LuaAssignmentStatement e) {
         LuaExpressionList rValues = e.getRightExprs();
         acceptExpressionList(rValues);