0
votes

I would like to extend the CDT plugin for eclipse, to show/hide lines of code which are matching some regex. I don't want to "fold" via foldingStructureProviders, I really want them to be not visible while preserving line numbers. I need line numbers for later work.

Does anybody know a good extension point of the cdt c editor for that?

Example:

1: int main(){
2:     call_regex();
3:     return 1;
4: }

After activated "Hide Button":

1: int main(){
3:     return 1;
4: }

Deactivate "Hide Button":

Example:

1: int main(){
2:     call_regex();
3:     return 1;
4: }
1

1 Answers

0
votes

Look up Segmented and Projected modes in Eclipse Editors.

For example, the ProjectionViewer which is extended by CDT's CSourceViewer.