edu.rice.cs.drjava.model

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Natural Language Processing
51.Net
52.Parser
53.PDF
54.Portal
55.Profiler
56.Project Management
57.Report
58.RSS RDF
59.Rule Engine
60.Science
61.Scripting
62.Search Engine
63.Security
64.Sevlet Container
65.Source Control
66.Swing Library
67.Template Engine
68.Test Coverage
69.Testing
70.UML
71.Web Crawler
72.Web Framework
73.Web Mail
74.Web Server
75.Web Services
76.Web Services apache cxf 2.2.6
77.Web Services AXIS2
78.Wiki Engine
79.Workflow Engines
80.XML
81.XML UI
Java Source Code / Java Documentation  » IDE » DrJava » edu.rice.cs.drjava.model 
edu.rice.cs.drjava.model
The model package is responsible for the majority of the logic and state in DrJava. It is independent of the presentation, allowing different user interfaces to be created for the same codebase. The interfaces and classes in this package maintain the state of all open documents, interface to the compiler and interaction components, and communicate with the user interface through public methods and GlobalModelListeners.

GlobalModel's Role

The GlobalModel is the central point of DrJava, coordinating all components and communicating with the user interface.

To maintain state, the GlobalModel keeps a list of the OpenDefinitionsDocuments, each of which is responsible for its own DefinitionsDocument object and document specific actions on that object, such as saving and compiling.

The GlobalModel also provides a set of public methods which allow it to communicate with the user interface. This gives the ui package access to the OpenDefinitionsDocuments, compiler, console, and interactions code.

To keep the user interface up-to-date, the GlobalModel fires events to all GlobalModelListeners which have registered with it. Events are fired after actions which can affect the user interface, such as the opening, saving, and closing of files, or the starting and ending of compilation or interaction.

Subpackages

  • The compiler package provides an interface between the model and the available compilers, allowing DrJava to compile documents and maintain any errors produced as a result.
  • The definitions package provides the model of the documents and editor kit, as well as the reducedmodel package for lightweight representation of a document for easy parenthesis matching and similar syntactic features.
  • The repl package contains the classes used for the Interactions window, allowing the dynamic execution of Java code from within DrJava.

Java Source File NameTypeComment
AbstractDJDocument.javaClass This class contains code supporting the concept of a "DJDocument"; it is shared between DefinitionsDocument and InteractionsDJDocument.
AbstractDJDocumentTest.javaClass This class contains tests for AbstractDJDocument.
AbstractGlobalModel.javaClass In simple terms, a DefaultGlobalModel without an interpreter, compiler, junit testing, debugger or javadoc.
AlreadyOpenException.javaClass Indicates that the file attempting to be opened is already open.
BrowserDocumentRegion.javaClass Class for document regions that totally ordered by allocation chronology.
BrowserHistoryManager.javaClass Browser history manager for the entire model.
ClassAndInterfaceFinder.javaClass
ClassAndInterfaceFinderTest.javaClass ClassAndInterfaceFinderTest for unit testing ClassAndInterfaceFinder.
ClipboardHistoryModel.javaClass Model class for clipboard history.
ClipboardHistoryModelTest.javaClass
ConcreteRegionManager.javaClass Simple region manager for the entire model.
DeadClassLoader.javaClass
DefaultGlobalModel.javaClass Handles the bulk of DrJava's program logic.
DefaultLightWeightParsingControl.javaClass Default light-weight parsing control.
DJDocument.javaInterface Interface shared by the Definitions Document, Open Definitions Document, and Interactions Document.
DJError.javaClass A class to represent source errors and warnings generated by the compiler, JUnit, etc.
DocumentClosedException.javaClass
DocumentRegion.javaClass Class for a simple document region that only records region offsets, not positions.
DocumentRegionTest.javaClass Trivial JUnit test case class for DocumentRegion.
DrJavaFileUtils.javaClass Some common methods for determining Java source files, language level files, etc.
DummyDocumentRegion.javaClass The concrete class for "dummy document" regions produced by ProjectFileParser.
DummyGlobalModel.javaClass Concrete implementation of GlobalModel that always throws UnsupportedOperationExceptions.
DummyGlobalModelListener.javaClass A dummy GlobalModelListener that does nothing.
DummyGlobalModelTest.javaClass DummyGetDocumentsTest for unit testing DummyGetDocuments.
DummyOpenDefDoc.javaClass
DummyOpenDefDocTest.javaClass DummyOpenDefDocTest for unit testing DummyOpenDefDoc.
EventNotifier.javaClass Base class for all component-specific EventNotifiers.
EventNotifierTest.javaClass Tests the functionality of the class that notifies listeners of a global model.
FileGroupingState.javaInterface This state pattern is used by the global model to store any information pertaining to the currently open project.
FileMovedException.javaClass Special FileMovedException to signify when a document's file no longer exists on disk where it once was.
FileRegion.javaInterface The minimal interface for all region classes.
FileSaveSelector.javaInterface An interface to give GlobalModel a file to save a document to.
Finalizable.javaInterface A listener that may be added to classes that implement the Finalizable interface.
FinalizationEvent.javaClass Objects of this type are given to those listening for finalization.
FinalizationListener.javaInterface A listener that may be added to classes that implement the Finalizable interface.
FindReplaceMachine.javaClass Implementation of logic of find/replace over a document.
FindReplaceMachineTest.javaClass Tests the FindReplaceMachine.
FindResult.javaClass Returned to FindMachineDialog with the location of the found string (or -1 if the string was not found) as well as a flag indicating whether the machine wrapped around the end of the document.
GlobalEventNotifier.javaClass Keeps track of all listeners to the model, and has the ability to notify them of some event.

This class has a specific role of managing GlobalModelListeners.

GlobalIndentTest.javaClass Tests the indenting functionality on the level of the GlobalModel.
GlobalModel.javaInterface Handles the bulk of DrJava's program logic.
GlobalModelCompileErrorsTest.javaClass Tests to ensure that compilation fails when expected, and that the errors are reported correctly.
GlobalModelCompileIOTest.javaClass Tests to ensure that compilation interacts with files correctly.
GlobalModelCompileSuccessOptionsTest.javaClass Tests to ensure that compilation succeeds when expected.
GlobalModelCompileSuccessTest.javaClass Tests to ensure that compilation succeeds when expected.
GlobalModelCompileSuccessTestCase.javaClass Tests to ensure that compilation succeeds when expected.
GlobalModelCompileTest.javaClass Tests to ensure that compilation behaves correctly in border cases.
GlobalModelIOTest.javaClass Test I/O functions of the global model.
GlobalModelJUnitTest.javaClass A test of Junit testing support in the GlobalModel.
GlobalModelListener.javaInterface An interface for responding to events generated by the GlobalModel.
GlobalModelOtherTest.javaClass A test on the GlobalModel that does deals with everything outside of simple file operations, e.g., compile, quit.
GlobalModelTestCase.javaClass Base class for tests over the GlobalModel . This class provides a number of convenience methods for testing the GlobalModel.
IDocumentRegion.javaInterface Interface supported by all bona fide document regions (e.g., region classes other than DummyDocumentRegion).
IHighlighted.javaInterface Interface for highlighted regions.
ILoadDocuments.javaInterface This interface encapsulates the behavior of a document loader.
JarJDKToolsLibrary.javaClass A JDKToolsLibrary that was loaded from a specific jar file.
JDKToolsLibrary.javaClass Provides dynamic access to the interface of a JDK's tools.jar classes.
LightWeightParsingControl.javaInterface Light-weight parsing control.
LightWeightParsingListener.javaInterface Light-weight parsing visitor.
MovingDocumentRegion.javaClass Class for a document region that moves with changes in the document; it also includes a lazy tool-tip and line boundaries.
MultiThreadedTestCase.javaClass TestCase which can fail if another thread causes an error or failure.
MultiThreadedTestCaseTest.javaClass Tests for MultiThreadedTestCase.
OpenDefinitionsDocument.javaInterface Interface for an open document in DrJava.
OrderedDocumentRegion.javaInterface Interface supported by all document regions used in search results, bookmarks, and breakpoints (e.g., region classes other than DummyDocumentRegion and BrowserDocumentRegion).
Query.javaInterface
Region.javaInterface The minimal interface for all region classes.
RegionManager.javaInterface Interface for a region manager.
RegionManagerListener.javaInterface Any class which wants to listen to DocumentRegion events fired by a RegionManager should implement this interface and use RegionManager's addListener() method.
SingleDisplayModel.javaInterface A GlobalModel that enforces invariants associated with having one active document at a time. Invariants:
  1. SingleDisplayModel.getOpenDefinitionsDocuments will always return an array of at least size 1.
  2. (follows from previous) If there is ever no document in the model, a new one will be created.
  3. There is always exactly one active document, which can be get/set via SingleDisplayModel.getActiveDocument and SingleDisplayModel.setActiveDocument .
Other functions added by this class:
  1. When calling SingleDisplayModel.openFile , if there is currently only one open document, and it is untitled and unchanged, it will be closed after the new document is opened.
SingleDisplayModelTest.javaClass Test functions of the single display model.
TestDocGetter.javaClass Test implementation of the document fetching methods in the GlobalModel interface.
TestDocGetterTest.javaClass JUnit test class for testing TestDocGetter.
ww_w_.ja__v__a__2s_._c_o_m | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.