+ listener/plugin:\r
\r
- update plugin docs\r
-- extract word puts stuff in the wrong place\r
- extract word keeps indent\r
- word preview for remote words\r
- WordPreview calls markTokens() -> NPE\r
- listener should be multithreaded\r
-- compile all commands\r
- faster completion\r
- NPE in ErrorHighlight\r
- maple-like: press enter at old commands to evaluate there\r
</ACTION>
<ACTION NAME="factor-infer-effects">
<CODE>
- InferBufferProcessor.createInferUnitTests(view,buffer,
- FactorPlugin.getExternalInstance());
+ InferBufferProcessor.createInferUnitTests(view,buffer);
</CODE>
</ACTION>
<ACTION NAME="factor-compile-all">
<CODE>
- wm.showDockableWindow("console");
- CompileBufferProcessor.compileWordsInBuffer(view,buffer,
- FactorPlugin.getExternalInstance(),
- wm.getDockableWindow("console"));
+ new CompileBufferProcessor(view,buffer);
</CODE>
</ACTION>
</ACTIONS>
public class CompileBufferProcessor extends FactorBufferProcessor
{
- //{{{ compileWordsInBuffer() method
- public static void compileWordsInBuffer(View view,
- Buffer buffer,
- ExternalFactor factor,
- Output output) throws Exception
- {
- String results = new CompileBufferProcessor(
- buffer,factor).getResults();
- output.print(null,results);
- } //}}}
-
//{{{ CompileBufferProcessor constructor
- public CompileBufferProcessor(Buffer buffer, ExternalFactor factor)
+ public CompileBufferProcessor(View view, Buffer buffer)
throws Exception
{
- super(buffer,factor);
+ super(view,buffer,true);
} //}}}
//{{{ processWord() method
import factor.*;
import org.gjt.sp.jedit.Buffer;
+import org.gjt.sp.jedit.View;
/**
* A class used to compile all words in a file, or infer stack effects of all
private String results;
//{{{ FactorBufferProcessor constructor
- public FactorBufferProcessor(Buffer buffer, ExternalFactor factor)
- throws Exception
+ public FactorBufferProcessor(View view, Buffer buffer,
+ boolean evalInListener) throws Exception
{
StringBuffer buf = new StringBuffer();
buf.append("! ");
buf.append(expr);
buf.append('\n');
- buf.append(factor.eval(expr));
+ if(evalInListener)
+ FactorPlugin.evalInListener(view,expr);
+ else
+ buf.append(FactorPlugin.evalInWire(expr));
words = words.next();
}
{
//{{{ createInferUnitTests() method
public static void createInferUnitTests(View view,
- final Buffer buffer,
- final ExternalFactor factor)
+ final Buffer buffer)
throws Exception
{
- final String results = new InferBufferProcessor(buffer,factor)
+ final String results = new InferBufferProcessor(view,buffer)
.getResults();
final Buffer newBuffer = jEdit.newFile(view);
} //}}}
//{{{ InferBufferProcessor constructor
- public InferBufferProcessor(Buffer buffer, ExternalFactor factor)
+ public InferBufferProcessor(View view, Buffer buffer)
throws Exception
{
- super(buffer,factor);
+ super(view,buffer,false);
} //}}}
//{{{ processWord() method