|
|
Re: extending the wtp xml-editor [message #639971 is a reply to message #639722] |
Thu, 18 November 2010 15:16 |
|
Luke,
I am not clear on what you are trying to do. But I *THINK* that 'foldingstrategy' extension is not what you need. And if it was I would strongly recommend against extending our internal XMLFoldingStrategy and stay with using the public API.
From what I can tell what you want to do is:
1. listen to events of when people close and open folding annotations
2. react to thous events by opening and closing other folding annotations
What I think you don't want to do is add any new folding annotations, which is what the 'foldingstrategy' extension is for.
Let me know if my assessment is correct and I maybe able to help you further.
Ian Tewksbury
WTP JavaScript Tools
IBM Rational
-----
“When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return.” ~Leonardo da Vinci
|
|
|
Re: extending the wtp xml-editor [message #640641 is a reply to message #639971] |
Mon, 22 November 2010 16:46 |
|
Lukas,
I would suggest taking a look at org.eclipse.jface.text.source.AnnotationModel. It is the one keeping track of all of the folding annotations added by the SSE extensions and looks like it may have some listener hooks that you could use.
Blue Skies,
~Ian
Ian Tewksbury
WTP JavaScript Tools
IBM Rational
-----
“When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return.” ~Leonardo da Vinci
|
|
|
|
Re: extending the wtp xml-editor [message #640894 is a reply to message #640864] |
Tue, 23 November 2010 13:26 |
|
Luke,
I am not sure what information you get from the ProjectionAnnotationModel but you probably want to get your hands on the IStructuredDocument or maybe the IStructuredModel for the file with the annoation and then you can use the offsets of the annoation to get the information for the region being folded from either the document or the model depending on which has the exact info you are looking for. You can use the org.eclipse.wst.sse.core.StructuredModelManager to get the document (if you don't already have it) or the Model.
Blue Skies,
~Ian
Ian Tewksbury
WTP JavaScript Tools
IBM Rational
-----
“When once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return.” ~Leonardo da Vinci
|
|
|
Powered by
FUDForum. Page generated in 0.03926 seconds