We use a SyntaxEditor with inline buttons (popupbutton) that represent markers inside the text of the editor. Those markers get stored at their exact location in our databases.
Example:
Some text, [marker] and some other text.
Is stored as:
Some text, and some other text
Marker position: 11
Now we've solved these little markers/buttons with the AdornmentManager. We place those buttons as you guys did in the Code Review example, but without a range. However we stumble upon some problems. These markers are part of the text they are in, and when we only wish to select one of these markers, we cannot do this, because the items in the adornment layer are not part of the underlying text.
It also becomes most difficult to select one of these markers when we only have one marker in the editor with no further accompanying text. We understand that the range of one of these adornments is set to 0, and therefor the editor cannot select a range of 0 characters. But how can we overcome this difficulty?
Are adornments the way to go in this situation? If so, how can we solve this problem, or would you recommend using something different than adornments?
[Modified at 11/01/2011 10:21 AM]
Example:
Some text, [marker] and some other text.
Is stored as:
Some text, and some other text
Marker position: 11
Now we've solved these little markers/buttons with the AdornmentManager. We place those buttons as you guys did in the Code Review example, but without a range. However we stumble upon some problems. These markers are part of the text they are in, and when we only wish to select one of these markers, we cannot do this, because the items in the adornment layer are not part of the underlying text.
It also becomes most difficult to select one of these markers when we only have one marker in the editor with no further accompanying text. We understand that the range of one of these adornments is set to 0, and therefor the editor cannot select a range of 0 characters. But how can we overcome this difficulty?
Are adornments the way to go in this situation? If so, how can we solve this problem, or would you recommend using something different than adornments?
[Modified at 11/01/2011 10:21 AM]