|
This project is a core module for the modeling tool.
Question (arch-overall): Describe the overall architecture. Answer: The UML project is really a modeling project. One of the things (and currently the only thing) that we can model is UML. The tool is broken up into three areas Core, Language Framework, and UI.The meta data layer is based on the UML specification. Our data for the most part follows the UML specification. The interesting thing about UML 2.0 is that the architects of UML 2.0 also designed MOF 2.0. So at this point UML 2.0 is a super set of MOF 2.0. When ever a meta data element has a value changed the event framework is used to notify listeners of the change. The only business rules that the meta data layer applies are to force the correct structure data structure. The applications business rules are applied by other components in response to events sent out when a model element is about to be modified. We call these events pre events. For example when the name of a class model element is changed a name change event is sent and round trip listens for name change events and verify that the name is a valid identifier for the languages associated with the model element.
Describe was design be able to have multiple UML projects open at the same time. The job of the workspace management component was to manage the projects that are open. NetBeans 4.x has its own workspace management facilities. In Coke we will probably no longer have a dependency on this component.
The event framework is a component that does not have any dependencies to the rest of the application. However most of the rest of the tool has dependencies on the EventFramework We did not use the Java Bean event mechanisms, instead we used more of an event bus mechanism. The event mechanism is broken into event dispatchers, and event listeners. The event dispatchers are used to register listeners for events and to send events to all registered listeners. There is a number of different types of dispatchers in the tool (for example ElementChangeEventDispatcher, AddinEventDispatcher, ElementLifeTimeEventDispatcher etc) and any component can create a new event dispatcher. The component that would like to register for an event retrieves the dispatcher and registers for the event. The big difference between our event mechanism and the JavaBeans event mechanism is that you do not have to wait for a component to be created before registering for the events. For example with the JavaBean event mechanism you have to have an instance of the bean that you wish to register with. So, if you want to receive notification from all class elements in the system you have to first register for an event to notify you when a class comes into memory, register for the event with the class and then you are able to receive events. With the event bus concept the component retrieves the event dispatchers when the component is created, registers for the event and waits. Whenever something any class changes the registered listener will be notified.
Again Describe was designed to be an application that could be embedded into many shells. As such we have our own preference framework. We may want to start using the NetBeans preference mechanism in the future.
Type management is used to quickly find type in the system. Type management is also the component that makes version control possible. When model element is versioned we remove the model element information from the project and replace it with a stub. The removed information is then gets stored into its own file (.ext) that can be version controlled. When a versioned model element is referenced the Type Management component make sure that the information in the version controlled file is read in to memory and replaces the stub with the information in the version control file. In this way we are able to lazy load information.
The generative framework is used to format data. Basically we are able to use scripts to format information. The scripts are used to format the information in the diagram, project tree, and property editor. In the C++ version of Describe the generative framework was also used to generate code.
Again since Describe was designed to embed into different shell we also developed our own add in framework.
The parsers that we use in the UML tool generate events. The events are structured using UML syntax (actually they are XMI fragments). Because we use UML as our event syntax all parser listeners are able to be language agnostic because the structure of the event will look the same if the language is Java, C++, C#, VB, JSP, etc.
Takes the parser information and integrates the information into a modeling project. The modeling project can be a new project or an existing project. Note that there is only one Reverse Engineering component that can handle all of the languages. Basically it is language agnostic.
Takes the parser information and integrates the information into the modeling project by creating an interaction (Sequence Diagram, or Collaboration Diagram) that represents the parser information. Note that there is only one Method Body Reverse Engineering component that supports all of the languages.
Round trip has two purposes in life: one enforce business rules that apply to languages, two notify the code generation that something changed that affect the associated source file artifacts. Round trip registers for many of the events that can be issued from the meta data, validates the data and applies business rules. After the data changes have been applied round trip sends an event via the RoundTripEventDispatcher to notify listeners that the source file artifact may need to be updated. Round trip is not actually responsible for generating any code. Code generation is the responsibility of the round trip listeners. To apply the business rules for a language round trip uses a component called a request process to apply the rules. Each supported language supplies a request processor. So the request processor is not language agnostic, however round trip (which only manages the request processors) is language agnostic. A configuration file is used to determine the request processor to use for a specific language. Round trip was designed to allow multiple languages to be associated with one model element. So a model element can be associated with Java, and WSDL and the code can be generated for each language. When the model element is changed the code will be generated for both languages without any interaction by the user.
Code generation (you guessed it) is used to generate code. In Java Studio Enterprise the Java code generator uses the NetBeans API to generate code. However, that does not have to be the case. As mentioned earlier the C++ version of Describe the code generation module to use the generative framework to generate code. The code generation component is registered as a round trip listener for a specific language. Therefore the Java code generation component only recieves events when a Java source artifact is associated with a model element that has been modified. When something occurs in the model that affects a source artifact the code generation component is notified via round trip events. The code generation module then updates the source file.
The drawing area component is used to render the diagrams The drawing area control wrapes the Tom Sawyer components. The drawing area control is a generic control that can be used to when developing any modeling diagram. Even though the UML product has multiple diagram types there is only one drawing area control for all the diagrams.
INSERT A DIAGRAM HERE
The property editor is a generic property editor that uses the property elements/property definitions mentioned above to build property data. Since the property definitions can contain children the property editor was design to display properties in a tree structure.
Fill in at a later time.
Question (arch-time): What are the time estimates of the work? Answer:The modeling module will be released in the BUZZ time frame.
Question (arch-quality): How will the quality of your code be tested and how are future regressions going to be prevented? Answer:We have a few hundred JUnit test that we currently run during our release engineering process. As we move forward we will be building more JUNIT test that will be executed. Our quality assurance team is in the process of building suite of automated test modules to test the UI components. We have also instructed the quality assurance team that once the UI test are completed that when a new is written we also want a automated test that engineering can run to replicate the problem. By having our quality assurance team assist in the automated test genreation we will be able to have a high rate of successfully replicating issues as well as have a higher number of automated test.
DataObject
implementation
Debug
uses InputOutput
.
Antlr 2.7.2
Tom Sawyer version 6.0
100% pure Java. It should run anywhere.
Question (dep-jre): Which version of JRE do you need (1.2, 1.3, 1.4, etc.)? Answer:JRE 1.5
Question (dep-jrejdk): Do you require the JDK or is the JRE enough? Answer:The JRE is enough.
XXX no answer for deploy-nbm
Question (deploy-shared): Do you need to be installed in the shared location only, or in the user directory only, or can your module be installed anywhere? Answer:Module can be installed any where.
Question (deploy-packages): Are packages of your module made inaccessible by not declaring them public? Answer:Yes. Public packages of J2EE Server API module are specified in module manifest file : com.embarcadero.uml.**
Question (deploy-dependencies): What do other modules need to do to declare a dependency on this one? Answer:Yes
Question (compat-standards): Does the module implement or define any standards? Is the implementation exact or does it deviate somehow? Answer:The module implements the MOF 2.0/UML 2.0 as of the Jan 2003 version of the OMG specification.
Question (compat-version): Can your module coexist with earlier and future versions of itself? Can you correctly read all old settings? Will future versions be able to read your current settings? Can you read or politely ignore settings stored by a future version? Answer:This version will be compatable with the previous version of the modeling product. In the future we will be moving our configration file into the NetBeans layer mechanism.
java.io.File
directly?
Answer:
We use Files when ever reading in configuration files. We also use the File class when reading in metadata and diagram files.
Question (resources-layer): Does your module provide own layer? Does it create any files or folders in it? What it is trying to communicate by that and with which components? Answer:Yes. We use the configuration files and folders to allow modules writers add context menus, to extend the Modeling components.
Question (resources-read): Does your module read any resources from layers? For what purpose? Answer:Yes. We use the configuration files and folders to allow modules writers add context menus, to extend the Modeling components.
Question (resources-mask): Does your module mask/hide/override any resources provided by other modules in their layers? Answer:No
org.openide.util.Lookup
or any similar technology to find any components to communicate with? Which ones?
Answer:
We have added IElement instances to lookup of our nodes. Our UML project type also creates a lookup and adds the standard project classes to the lookup. We also add a UMLHelper to the lookup to allow modules writers to interact with tha model.
Question (lookup-register): Do you register anything into lookup for other code to find? Answer:We have added IElement instances to lookup of our nodes. Our UML project type also creates a lookup and adds the standard project classes to the lookup. We also add a UMLHelper to the lookup to allow modules writers to interact with tha model.
Question (lookup-remove): Do you remove entries of other modules from lookup? Answer:No
System.getProperty
) property?
Answer:
Question (exec-component): Is execution of your code influenced by any (string) property of any of your components? Answer:
No
Question (exec-ant-tasks): Do you define or register any ant tasks that other can use? Answer:We use the Antlr ant task that ships as an optional task in the Ant distribution.
Question (exec-classloader): Does your code create its own class loader(s)? Answer:No
Question (exec-reflection): Does your code use Java Reflection to execute other code? Answer:The UML code is very dynamic. We use configuration files to determine how to populate our tree, property editor, edit control, and preferences. The configuration file specifies that methods that should be used to retrieve, modify, and remove items from a given object.
Question (exec-privateaccess): Are you aware of any other parts of the system calling some of your methods by reflection? Answer:No
Question (exec-process): Do you execute an external process from your module? How do you ensure that the result is the same on different platforms? Do you parse output? Do you depend on result code? Answer:No
Question (exec-introspection): Does your module use any kind of runtime type information (instanceof
,
work with java.lang.Class
, etc.)?
Answer:
No
Question (exec-threading): What threading models, if any, does your module adhere to? Answer:We call the VCS API that is not able to run on the UI thread with out locking up the application. To solve this problem our VCS module has started a thread and executes all VCS API commands on the thread.
Question (security-policy): Does your functionality require modifications to the standard policy file? Answer:No
Question (security-grant): Does your code grant additional rights to some other code? Answer:No
We store our meta model information in files that have an etd extension. We store our diagrams in that end with the extensions etlp, and etld. Also when we version control model elements we store the metamodel information in a files with the extension etx.
Question (format-dnd): Which protocols (if any) does your code understand during Drag & Drop? Answer:DnDConstants.ACTION_COPY, DnDConstants.ACTION_MOVE
Question (format-clipboard): Which data flavors (if any) does your code read from or insert to the clipboard (by access to clipboard on means calling methods onjava.awt.datatransfer.Transferable
?
Answer:
To perform DnD between the project tree and the diagrams we use a transferable that
keeps track of the model elements that are selected. We provide our own data flavor
that can be used to retrieve the model elements that are the target of the operation.
The transferable also implements the string flavor that can be used to pass the
model element information. The string format is a XML string.
We use the same transferable when performing the copy and paste operations.
UML initializes the UML product durning the module startup.
Question (perf-exit): Does your module run any code on exit? Answer:No
Question (perf-scale): Which external criteria influence the performance of your program (size of file in editor, number of files in menu, in source directory, etc.) and how well your code scales? Answer:No
Question (perf-limit): Are there any hard-coded or practical limits in the number or size of elements your code can handle? Answer:No
Question (perf-mem): How much memory does your component consume? Estimate with a relation to the number of windows, etc. Answer:The size of memory that our module consumes depends on the size of the model. The bigger the model the bigger the XML repository.
Question (perf-wakeup): Does any piece of your code wake up periodically and do something even when the system is otherwise idle (no user interaction)? Answer:No
Question (perf-progress): Does your module execute any long-running tasks? Answer:Create Diagram form selected, and Sequence Diagram Reverse Engineering can take a while to complete.
Question (perf-huge_dialogs): Does your module contain any dialogs or wizards with a large number of GUI controls such as combo boxes, lists, trees, or text areas? Answer:No
Question (perf-menus): Does your module use dynamically updated context menus, or context-sensitive actions with complicated and slow enablement logic? Answer:No
Question (perf-spi): How the performance of the plugged in code will be enforced? Answer:Currently we do not have any enforcement.