[kepler-dev] [Bug 3361] - parameters lose their Display Name when copy and pasted
bugzilla-daemon at ecoinformatics.org
bugzilla-daemon at ecoinformatics.org
Thu Jun 5 19:11:54 PDT 2008
http://bugzilla.ecoinformatics.org/show_bug.cgi?id=3361
cxh at eecs.berkeley.edu changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Status|NEW |ASSIGNED
Priority|P2 |P3
Target Milestone|Unspecified |Post-rel-1.0.0
------- Comment #2 from cxh at eecs.berkeley.edu 2008-06-05 19:11 -------
I've partially fixed this.
1) NamedObj._exportMoMLContents() now exports the value of _displayName
if it is non-null. Formerly, NamedObj.exportMoML() was doing the export
of _displayName, but this was causing problems when Parameter.exportMoML()
was called because NamedObj.exportMoML() was not being called,
NamedObj.exportMoMLContents() was instead being called.
NamedObj now looks like:
protected void _exportMoMLContents(Writer output, int depth)
throws IOException {
// If the display name has been set, then include a display element.
// Note that copying parameters that have _displayName set need
// to export _displayName.
// See: http://bugzilla.ecoinformatics.org/show_bug.cgi?id=3361
if (_displayName != null) {
output.write("<display name=\"");
output.write(StringUtilities.escapeForXML(_displayName));
output.write("\"/>");
}
// Callers of this method should hold read access
// so as to avoid ConcurrentModificationException.
if (_attributes != null) {
Iterator attributes = _attributes.elementList().iterator();
while (attributes.hasNext()) {
Attribute attribute = (Attribute) attributes.next();
attribute.exportMoML(output, depth);
}
}
}
2) I changed actor.gui.RenameConfigurer so that we now say "Name"
instead of "New Name". This fits better with the other dialogs.
For example, Edit Parameters does not say "New foo", it says "foo".
3) I'm not so sure if the copy of a Parameter should update the Display Name
or not. The reason is that if we start messing with the internals of
a Parameter, we are sort of violating some sort of existing contract.
This could be done, perhaps by having MoMLParser.attribute() properly
handle the _displayName, but this seems hacky. Further discussion
is warranted.
I'm moving this to an enhancement request.
More information about the Kepler-dev
mailing list