Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [pde-dev] Two models for BuildProperties Editor?


Hi Andreas,

There are two implementations, one that is based on text edits, while the other is a generic model to read and edit the contents of the file.  

The generic one is designed for programmatically reading or setting information out of the build.properties.  It will read the entire file, populate its fields and then write back the fields to the file.  This is a very simplistic approach that works well for many cases.  The drawback is that when users put custom tags/spacing or comments in the file, they are erased when the model gets written back out.

The text model was designed specifically for use in the editor.  In the old days (and on many of our less smart editors), the source page's content was created by writing out the model.  Every time a field changed and the user switched to the source page, the model would rewrite the source page completely.  This led to users comments, tags, and spacing being destroyed by the editor.  The more fancy way to do it is with the text edits.  So when a change happens, instead of rewriting the entire file, we apply a simple text edit where the change occurred.  This leaves the rest of the file in tact.  

Which model (and code) you choose to keep should depend on how fancy you want to get.  The text model will be a little more user friendly but also more complicated.

Brian Bauman
    IBM Software Group - Austin, TX
    Eclipse Committer
    baumanbr@xxxxxxxxxx
    (512) 838 -2938 (T/L 678-2938)



"Andreas Werner" <Andreas.Werner@xxxxxxxxxxxxxx>
Sent by: pde-dev-bounces@xxxxxxxxxxx

05/15/2007 06:30 AM

Please respond to
"Eclipse PDE general developers list." <pde-dev@xxxxxxxxxxx>

To
<pde-dev@xxxxxxxxxxx>
cc
Subject
[pde-dev] Two models for BuildProperties Editor?





Hi newsgroup,

while developing a MultiForm editor with one source page and one form page, I discovered that the BuildProperties editor from the PDE seemed to be an excellent starting point.

Therefore I copied the org.eclipse.pde.* plugins and deconstructed them. Thus only the BuildProperties editor is remaining, and certainly the whole abstract and interface stuff...
Now I want to slightly change the model in the pde.core plugin.

Can anyone tell me, why there are two implementations for each of the interfaces IBuildModel, IBuild and IBuildEntry?
It seems to me that one implementation has to handle some text related stuff, but what is the other implementation doing?

Further on I made Build and BuildEntry from the package org.eclipse.internal.core.text.build extend BuildObject and deleted the non-text-related implementation. And hey, everything is still working, or have I missed something!?

Please help, Andreas

_______________________________________________
pde-dev mailing list
pde-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pde-dev


Back to the top