Opened 8 years ago

Closed 8 years ago

#2037 closed enhancement (fixed)

Add the possibility to insert new component declarations in the AST-driven editor

Reported by: tmattsson Owned by: tmattsson
Priority: major Milestone:
Component: EclipseIDE Version:
Keywords: Cc:

Description

It should be possible to add a new component declaration to a class in the AST-driven editor. At this point it will suffice to handle the case were a complete component declaration is pasted into the document at a valid place.

Change History (4)

comment:1 Changed 8 years ago by tmattsson

Status: newaccepted

comment:2 Changed 8 years ago by tmattsson

changeset:3527

A new parser target has been added, making it possible to parse strings into elements. This functionality is available in the ParserHandler.

Formatting propagation now also performs a check in all child nodes so that no new nodes with their own formatting has been added since the last propagation. If this is the case though, this formatting is now associated with corresponding nodes. Furthermore, PN_ComponentClauses and PN_FullClassDecls that are rewritten to ComponentDecls now also copy their formatting to the new nodes. These modifications prepare for new nodes with their own formatting being added to the AST.

comment:3 Changed 8 years ago by tmattsson

changeset:3528

It is now possible to add new, parsed elements to the source AST by calling ASTNode.addNewElement(...). This functionality is provided by the ASTDocument aspect.

comment:4 Changed 8 years ago by tmattsson

Resolution: fixed
Status: acceptedclosed

changeset:3529

The method ASTDocument.fireDocumentAboutToBeChanged(...) now provides the means to insert a new component declaration to a class. At least this works when the user pastes a string declaring a component at a valid place in the document.

Note: See TracTickets for help on using tickets.