Skip to content

State of things on 4 July 2011 in english

egor1989 edited this page Jul 4, 2011 · 2 revisions
  • 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:

  1. 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:

  1. Linking to the apropriate place of the file.
  2. Folding of tags and visualization of rectangle area on their place
  3. Giving access to editor's text

ContainerManager is responsible for managing containers (creating, moving, deleting, coping)

  1. Pad - an object, with custom logic, which could be dinamicly linked to the container

Pad could:

  1. Use for drawing itself SWT-widget Composite provided by container
  2. Use container to write data into editor
  3. 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

  1. The user copies the text area which contains the container
  2. ContainerManager registers the creation of new container, and gives it new ID
  3. ContainerManager sends the PadManager event that the container was copied
  4. PadManager evaluetes the action, defined by the developer for the container coping, e.g. - creation of new pad.
  5. PadManager links new pad to new container

Delete -> Ctrl-Z

  1. The user deletes the text area, with container in it
  2. ContainerManager registers deletion of the container
  3. ContainerManager sends to the PadManager event that the container was deleted
  4. The deleted Pad's delink happens, but the pad is still in the memory
  5. User presses Ctrl-Z, the container is again in the editor
  6. ContainerManager registers the creation of the container 7)ContainerManager sends to the PadManager event that the new container was created
  7. 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:

  1. Mechanism of containers, and drawing tools created
  2. Pad's structure created

For the next week we plan:

  1. Finish the mechanism of pads and containers interaction
  2. Filling out the plugin as a handy platform, with extension points and so on
  3. Writing the test application using pad system