Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » maintaining two differing views of same source code
maintaining two differing views of same source code [message #268136] Sun, 22 August 2004 00:19
Eclipse UserFriend
Hello,

I've been searching for answers or examples to what I'm doing, but so far I've
come up with nothing. I hope someone here can help me out.

What I want to do is create a specialized java editor that has certain regions
hidden by default, and in their place a summary of those hidden regions appears.
This would require having two views of the source code: the presentation view
and the real view.

An example of this would be:

Original (potentially scattered throughout the file):

int x;
int getX() { return x; }
void setX(int x) { this.x = x; }

Summary (details not worked out yet, but this is the basic idea (could put it
into a comment)):

int x --- getter | setter

At any point, the developer can "flip" to the verbose view. Don't mind the
details of how I am going to do the mapping and flipping between the summary and
its real code.

I'd like to find out how I can present one view of the document to the
developer, while maintaining an internal view representing the "real" source.

I believe that I need to do something with SlaveDocumentManager and something
else with IContentFormatter, but I'm not exactly sure what.

Am I on the right track? What would be the next steps? What I'm mostly looking
for is example code or at the very least a few pointers on which classes I
should be overriding.

I appreciate your help. Thanks in advance!

--andrew eisenberg
University of British Columbia
Previous Topic:Compile error in Google sample RCP application
Next Topic:Problem using Saxon in a Plugin project
Goto Forum:
  


Current Time: Wed Jul 16 23:05:38 EDT 2025

Powered by FUDForum. Page generated in 0.03834 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top