Bug #1062
Nested confinements are not folded properly
Status: | Resolved | Start date: | 2008-07-15 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | David Bruehlmeier | % Done: | 100% |
|
Category: | TypoScript 2.0 Editor | |||
Target version: | - | Estimated time: | 0.00 hour |
Description
Nested confinements are not folded properly in the TypoScript 2.0 editor.
thirdObject { subObject { subSubObject { someMessage = Text someMessage.value = "Fully or hard tail?" } } }
In this example the nesting ends at the first ending curly bracket, right after ..tail?"
Associated revisions
Replaced confinement partitions with projection annotations to allow for nested confinements (resolves issue #1062)
Replaced confinement partitions with projection annotations to allow for nested confinements (resolves issue #1062)
History
#1 Updated by David Bruehlmeier about 7 years ago
This is due to the current implementation of org.typo3.forge.dev3.ui.editors.typoScriptEditor.TypoScriptConfinementRule
which does not take nested confinements into account.
- The
TypoScriptConfinementRule
should internally keep a stack with open confinements, so that if a closing curly brace is detected, the top confinment from the stack is closed and not the bottom one. - The
TypoScriptPartitionScanner
extendsRuleBasedPartitionScanner
which expectsIPredicateRule
only. This interface demands the implementation ofpublic IToken evaluate(ICharacterScanner scanner, boolean resume)
which ask the implementation to resume scanning even within the opening and closing sequence. This means that the stack of open confinements cannot be built.
#2 Updated by David Bruehlmeier about 7 years ago
- Status changed from New to Accepted
#3 Updated by David Bruehlmeier about 7 years ago
- Status changed from Accepted to Resolved
- % Done changed from 0 to 100
Confinments are no longer defined as partitions but only as projection annotations. Partitions cannot be overlapping, therefore nested confinements cannot be represented by partitions. The new class TypoScriptConfinementAnnotationManager
handles the projection annotations for confinements.