-
Notifications
You must be signed in to change notification settings - Fork 1
State of things on 4 July 2011 in english
- The Task (the description of what should the platform look like)
At the moment we are finishing development of the main component of the platform, which provides custom extension of the Eclipse text editor. This component should be useful not for our further goals, but for all community, so we decided to create really sustainable and user-friendly platform. Not only the thing to use for our goals as we thought at the beginning. We introduced the definition Pad - the square area in the editor, which, for the user, has no differents with native editors objects, e.g. symbols or annotations. We suggest that user is able to move, copy or mark like any other editor's objects. Еhird-party developers are suggested to use extension points for creating custom graphic wigets in the Pads, which could have their own logic. Each Pad has access to editors data, and it provides the ability to generate code, comments or any other types of text information, herewith hiding it using special folding. Some specificity of current JFace components realization make it hard to extend, but nevertheless we developed rather smart architecture, and have succesfully overcame it and added functional we need.
- Short architecture description
In our platform we have got two levels - containers and pads, which are dinamically linked with each other:
- Container - an object, linked directly to the text editor by the way of predetermined tags. The tags contain ID, the set of parametrs and the area of generated text. Example: /* iee-container-begin 123 params={id : 1; : 2} / generated-java-code / iee-container-end */ At the moment for the ease of developing we use the simliest format
Containers carry out such functions as:
- Linking to the apropriate place of the file.
- Folding of tags and visualization of rectangle area on their place
- Giving access to editor's text
ContainerManager is responsible for managing containers (creating, moving, deleting, coping)
- Pad - an object, with custom logic, which could be dinamicly linked to the container
Pad could:
- Use for drawing itself SWT-widget Composite provided by container
- Use container to write data into editor
- Report to container to change the size of rectangle area
PadManager is using for managing pads and linking them to containers
The couple of typical use-cases:
Copy -> Paste
- The user copies the text area which contains the container
- ContainerManager registers the creation of new container, and gives it new ID
- ContainerManager sends the PadManager event that the container was copied
- PadManager evaluetes the action, defined by the developer for the container coping, e.g. - creation of new pad.
- PadManager links new pad to new container
Delete -> Ctrl-Z
- The user deletes the text area, with container in it
- ContainerManager registers deletion of the container
- ContainerManager sends to the PadManager event that the container was deleted
- The deleted Pad's delink happens, but the pad is still in the memory
- User presses Ctrl-Z, the container is again in the editor
- ContainerManager registers the creation of the container 7)ContainerManager sends to the PadManager event that the new container was created
- PadManager get known that there exists the pad for given container and again links it to the pad, after that the pad is shown again
Soon we are going to create the set of UML-schemes and sequence-diagrams, and also the comprehensive archtecture description.
- The stages A lot of time was spent to learn the Eclipse and JFace source code, and also to develop qualitative achitecture concept.
At the moment we have got:
- Mechanism of containers, and drawing tools created
- Pad's structure created
For the next week we plan:
- Finish the mechanism of pads and containers interaction
- Filling out the plugin as a handy platform, with extension points and so on
- Writing the test application using pad system