1 19 20 package org.netbeans.modules.java.source.engine; 21 22 import org.netbeans.api.java.source.query.Query; 23 import org.netbeans.api.java.source.query.ResultTableModel; 24 import org.netbeans.api.java.source.transform.ChangeSet; 25 import org.netbeans.api.java.source.transform.Transformer; 26 import org.netbeans.modules.java.source.engine.JavaFormatOptions; 27 import org.netbeans.modules.java.source.engine.PropertySheetInfo; 28 29 import java.io.IOException ; 30 import javax.tools.JavaFileObject; 31 32 36 public interface JackpotEngine { 37 45 int initialize(String sourcepath, String classpath, String source) throws Exception ; 46 47 56 int initialize(String sourcepath, String classpath, String bootclasspath, String source) throws Exception ; 57 58 68 int initialize(String sourcepath, String classpath, String bootclasspath, String source, String encoding) throws Exception ; 69 70 73 boolean isInitialized(); 74 75 79 PropertySheetInfo getPropertySheetInfo(String className); 80 81 86 ResultTableModel runCommand(String queryName, String className) throws Exception ; 87 88 91 ResultTableModel runCommand(String queryName, String transformerName, String className) throws Exception ; 92 93 96 ResultTableModel runCommands(String queryName, Query[] queries) throws Exception ; 97 98 101 Query createCommand(String queryName, String transformerName, String className) throws Exception ; 102 103 106 ResultTableModel runScript(String queryName, String transformerName, String script) throws Exception ; 107 108 111 Transformer createScript(String queryName, String transformerName, String script) throws Exception ; 112 113 118 void undo(boolean erase); 119 120 123 void redo(); 124 125 128 boolean canUndo(); 129 130 133 boolean canRedo(); 134 135 138 void applyChanges(ChangeSet changes); 139 140 143 boolean needsCommit(); 144 145 148 boolean commit() throws IOException ; 149 150 153 JavaFormatOptions getFormatOptions(); 154 155 158 String format(JavaFileObject source, JavaFormatOptions formatOptions) throws IOException ; 159 160 163 void close(); 164 } 165 | Popular Tags |