Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [rmf-dev] Get SpecHierarchy while in Cell Editor

Hi Andreas and Lukas,

One more thing: I just came across some commented out code in ProrCellEditor:

    // LL: this method should not be used cause it depends on the specification
    // editor and the prorcelleditor is used by the properties view and the
    // specification editor (both have different content providers)
    // /**
    // * Returns the current {@link SpecHierarchy} to which the edited cell
    // * belongs.
    // */
    // protected SpecHierarchy getSpecHierarchy() {
    // ProrAgileGridContentProvider provider = (ProrAgileGridContentProvider)
    // getAgileGrid().getContentProvider();
    // SpecHierarchy specHierarchy =
    // provider.getProrRow(cell.row).getSpecHierarchy();
    // return specHierarchy;
    // }

@Andreas: This seems to be exactly what you were looking for.

@Lukas: Can you please coordinate with Andreas to find a solution?  Also, please either remove or fix the code, but don't leave it in the repository like this.

Thanks,

- Michael

On 06/13/2012 11:53 AM, Michael Jastram wrote:
Hi Andreas,

for some functionality I would like to override the behaviour of
LinewrapCellEditor, but I'd need to find out the SpecHierarchy. The
CellEditor only knows about the attribute value, which in turn allows me
to navigate to SpecObject. Any idea how I could find about the
SpecHierarchy of the line that the cell editor is in from within a cell
editor?

That information still exists in AbstractProrCellEditorProvider.getCellEditor() but is not forwarded to the Editors.  There you can grab the ProrRow and find the SpecHierarchy via getSpecHierarchy().  Feel free to update the interfaces to forward this information to the editors.

If you do this, please keep in mind that the editor may be invoked without having a SpecHierarchy (i.e. by selecting the SpecObject in the Outline and using the Properties View for editing).

Best,

- Michael



--
Michael Jastram +49 (162) 274 83 94 http://jastram.de
Geschäftsführer Formal Mind GmbH http://formalmind.com
Wissenschaftler Heinrich Heine Universität Düsseldorf http://www.stups.uni-duesseldorf.de
Vorsitzender rheinjug e.V. http://rheinjug.de
Project Lead Eclipse Requirements Modeling Framework http://eclipse.org/rmf

Back to the top