1 33 34 package edu.rice.cs.drjava.model; 35 36 import java.awt.print.PageFormat ; 37 import java.io.File ; 38 import java.io.IOException ; 39 import java.util.Hashtable ; 40 import java.util.List ; 41 42 import edu.rice.cs.drjava.model.compiler.CompilerModel; 43 import edu.rice.cs.drjava.model.debug.Debugger; 44 import edu.rice.cs.drjava.model.debug.Breakpoint; 45 import edu.rice.cs.drjava.model.definitions.DefinitionsEditorKit; 46 import edu.rice.cs.drjava.model.junit.JUnitModel; 47 import edu.rice.cs.drjava.model.repl.DefaultInteractionsModel; 48 import edu.rice.cs.drjava.model.repl.InteractionsDJDocument; 49 import edu.rice.cs.drjava.model.repl.InteractionsDocument; 50 import edu.rice.cs.drjava.model.repl.InteractionsScriptModel; 51 import edu.rice.cs.drjava.project.DocumentInfoGetter; 52 import edu.rice.cs.drjava.project.MalformedProjectFileException; 53 import edu.rice.cs.util.ClassPathVector; 54 import edu.rice.cs.util.FileOpenSelector; 55 import edu.rice.cs.util.OperationCanceledException; 56 import edu.rice.cs.util.docnavigation.IDocumentNavigator; 57 import edu.rice.cs.util.swing.DocumentIterator; 58 import edu.rice.cs.util.text.AbstractDocumentInterface; 59 import edu.rice.cs.util.text.ConsoleDocument; 60 61 75 public interface GlobalModel extends ILoadDocuments { 76 77 79 82 public void addListener(GlobalModelListener listener); 83 84 87 public void removeListener(GlobalModelListener listener); 88 89 91 92 public DefaultInteractionsModel getInteractionsModel(); 93 94 95 public CompilerModel getCompilerModel(); 96 97 98 public JUnitModel getJUnitModel(); 99 100 101 public JavadocModel getJavadocModel(); 102 103 104 public Debugger getDebugger(); 105 106 107 public IDocumentNavigator<OpenDefinitionsDocument> getDocumentNavigator(); 108 109 public void setDocumentNavigator(IDocumentNavigator<OpenDefinitionsDocument> newnav); 110 111 112 public RegionManager<Breakpoint> getBreakpointManager(); 113 114 115 public RegionManager<DocumentRegion> getBookmarkManager(); 116 117 118 public List <RegionManager<MovingDocumentRegion>> getFindResultsManagers(); 119 120 121 public RegionManager<MovingDocumentRegion> createFindResultsManager(); 122 123 124 public void disposeFindResultsManager(RegionManager<MovingDocumentRegion> rm); 125 126 127 public RegionManager<DocumentRegion> getBrowserHistoryManager(); 128 129 130 public void addToBrowserHistory(); 131 132 141 144 public OpenDefinitionsDocument newFile(); 145 146 154 public OpenDefinitionsDocument newTestCase(String name, boolean makeSetUp, boolean makeTearDown); 155 156 162 public boolean closeFile(OpenDefinitionsDocument doc); 163 164 170 public boolean closeFileWithoutPrompt(OpenDefinitionsDocument doc); 171 172 176 public boolean closeAllFiles(); 177 178 179 public void openFolder(File dir, boolean rec) throws IOException , OperationCanceledException, AlreadyOpenException; 180 181 182 public void saveAllFiles(FileSaveSelector com) throws IOException ; 183 184 187 public void createNewProject(File projFile); 188 189 190 public void configNewProject() throws IOException ; 191 192 196 public void saveProject(File f, Hashtable <OpenDefinitionsDocument,DocumentInfoGetter> info) throws IOException ; 197 198 201 public void reloadProject(File f, Hashtable <OpenDefinitionsDocument,DocumentInfoGetter> info) throws IOException ; 202 203 204 public String fixPathForNavigator(String path) throws IOException ; 205 206 209 public String getSourceBinTitle(); 210 211 214 public String getExternalBinTitle(); 215 216 219 public String getAuxiliaryBinTitle(); 220 221 222 public void addAuxiliaryFile(OpenDefinitionsDocument doc); 223 224 225 public void removeAuxiliaryFile(OpenDefinitionsDocument doc); 226 227 231 public void openProject(File file) throws IOException , MalformedProjectFileException; 232 233 236 public void closeProject(boolean qutting); 237 238 242 public File getSourceFile(String fileName); 243 244 248 public File findFileInPaths(String fileName, List <File > paths); 249 250 251 public File [] getSourceRootSet(); 252 253 256 257 258 259 public DefinitionsEditorKit getEditorKit(); 260 261 264 public DocumentIterator getDocumentIterator(); 265 266 267 268 269 public ConsoleDocument getConsoleDocument(); 270 271 274 public InteractionsDJDocument getSwingConsoleDocument(); 275 276 277 public void resetConsole(); 278 279 280 public void systemOutPrint(String s); 281 282 283 public void systemErrPrint(String s); 284 285 286 public void systemInEcho(String s); 287 288 290 291 public InteractionsDocument getInteractionsDocument(); 292 293 296 public InteractionsDJDocument getSwingInteractionsDocument(); 297 298 299 public void resetInteractions(File wd); 300 301 302 public void resetInteractions(File wd, boolean forceReset); 303 304 305 public void waitForInterpreter(); 306 307 308 public void interpretCurrentInteraction(); 309 310 313 public ClassPathVector getInteractionsClassPath(); 314 315 317 320 public void loadHistory(FileOpenSelector selector) throws IOException ; 321 322 323 public InteractionsScriptModel loadHistoryAsScript(FileOpenSelector selector) 324 throws IOException , OperationCanceledException; 325 326 327 public void clearHistory(); 328 329 332 public void saveHistory(FileSaveSelector selector) throws IOException ; 333 334 339 public void saveHistory(FileSaveSelector selector, String editedVersion) throws IOException ; 340 341 342 public String getHistoryAsStringWithSemicolons(); 343 344 345 public String getHistoryAsString(); 346 347 349 350 public void printDebugMessage(String s); 351 352 355 public int getDebugPort() throws IOException ; 356 357 359 362 public ClassPathVector getClassPath(); 363 364 public PageFormat getPageFormat(); 366 367 public void setPageFormat(PageFormat format); 369 370 371 public void quit(); 372 373 374 public void forceQuit(); 375 376 377 public int getDocumentCount(); 378 379 380 public int getNumCompErrors(); 381 382 383 public void setNumCompErrors(int num); 384 385 386 387 public OpenDefinitionsDocument getODDForDocument(AbstractDocumentInterface doc); 388 389 392 public List <OpenDefinitionsDocument> getNonProjectDocuments(); 393 394 397 public List <OpenDefinitionsDocument> getProjectDocuments(); 398 399 402 403 public boolean isProjectActive(); 404 405 408 409 public File getProjectFile(); 410 411 412 public File [] getProjectFiles(); 413 414 415 public File getProjectRoot(); 416 417 418 public void setProjectFile(File f); 419 420 421 public void setProjectRoot(File f); 422 423 424 public File getBuildDirectory(); 425 426 427 public void setBuildDirectory(File f); 428 429 430 public File getMasterWorkingDirectory(); 431 432 433 public File getWorkingDirectory(); 434 435 436 public void setWorkingDirectory(File f); 437 438 439 public void setMainClass(File f); 440 441 442 public File getMainClass(); 443 444 447 public ClassPathVector getExtraClassPath(); 448 449 452 public void setExtraClassPath(ClassPathVector cp); 453 454 455 public void setCreateJarFile(File f); 456 457 458 public File getCreateJarFile(); 459 460 461 public void setCreateJarFlags(int f); 462 463 464 public int getCreateJarFlags(); 465 466 467 public boolean inProject(File f); 468 469 472 public boolean inProjectPath(OpenDefinitionsDocument doc); 473 474 475 public void setProjectChanged(boolean changed); 476 477 478 public boolean isProjectChanged(); 479 480 481 public boolean hasOutOfSyncDocuments(); 482 483 484 public void cleanBuildDirectory(); 485 486 487 public List <File > getClassFiles(); 488 489 494 public List <OpenDefinitionsDocument> getOpenDefinitionsDocuments(); 495 496 499 public boolean hasModifiedDocuments(); 500 501 504 public boolean hasUntitledDocuments(); 505 506 510 public OpenDefinitionsDocument getDocumentForFile(File file) throws IOException ; 511 } 512 | Popular Tags |