Hi Andreas, I was just fixing a different bug (https://bugs.eclipse.org/bugs/show_bug.cgi?id=382593), and the problem was that I didn't have access to the affectedObject (which happens to be the SpecHierarchy). I just changed an interface, and this should give you access to the SpecHierarchy as well. :-)
Best, - Michael On 06/13/2012 01:54 PM, Lukas Ladenberger wrote: > Hi all, > > @Michael: I removed the code. > > @Andres: You should access with this code snippet the SpecHierarchy: > > > ProrAgileGridContentProvider provider = > (ProrAgileGridContentProvider) getAgileGrid() > .getContentProvider(); > SpecHierarchy specHierarchy = provider.getProrRow(cell.row) > .getSpecHierarchy(); > > Best regards, > Lukas > > Am 13.06.2012 13:39, schrieb Andreas Graf: >> Dear all, >> >> I will have time to look into this in a few weeks. But generally I'd >> suggest a solution where we pass in the SpecHierarchy from "above", >> if available to avoid dependencies like these. >> >> Regards, >> >> Andreas >> >> Am 13.06.2012 13:25, schrieb Michael Jastram: >>> 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 >>> <http://www.stups.uni-duesseldorf.de/w/Michael_Jastram> >>> Vorsitzender rheinjug e.V. http://rheinjug.de >>> Project Lead Eclipse Requirements Modeling Framework >>> http://eclipse.org/rmf >>> >> >> -- >> Andreas Graf >> Business Development Manager Automotive >> Spokesperson Eclipse Automotive Industry WG >> Mobil: +49 (0) 151-10860479 (preferred) >> Tel.: +49 (0) 711 / 34 21 91-0 >> Fax.: +49 (0) 711 / 34 21 91-29 >> >> >> Web: http://www.itemis.de >> Mail: andreas.g...@itemis.de >> Xing: http://www.xing.com/profile/Andreas_Graf >> Twitter: http://www.twitter.com/grafandreas >> Blog: http://5ise.quanxinquanyi.de >> >> itemis GmbH >> Meitnerstr. 10 >> D-70563 Stuttgart >> Rechtlicher Hinweis: >> Amtsgericht Mannheim, HRB 50700996 >> Ust.Id.Nr.: DE250574762 >> Geschäftsführer: Sebastian Neus -- *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 <http://www.stups.uni-duesseldorf.de/w/Michael_Jastram> Vorsitzender rheinjug e.V. http://rheinjug.de Project Lead Eclipse Requirements Modeling Framework http://eclipse.org/rmf
_______________________________________________ rmf-dev mailing list rmf-dev@eclipse.org http://dev.eclipse.org/mailman/listinfo/rmf-dev