Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [mylar-dev] example implementation ofIGraphContentProviderinterface/ what are relationships

Ian: could you answer Raphael's question?

Raphael: sorry that you still haven't seen an answer to this--I pinged Ian a
while back but he may be on vacation.  Fyi, the Mylar visualization
prototype was using the relationship objects to encapsulate the kind of edge
between two nodes (e.g. Java call, inheritance). 

Mik

> -----Original Message-----
> From: mylar-dev-bounces@xxxxxxxxxxx 
> [mailto:mylar-dev-bounces@xxxxxxxxxxx]
> On Behalf Of Raphael Ackermann
> Sent: Wednesday, August 16, 2006 8:21 AM
> To: Mylar developer discussions
> Subject: [mylar-dev] example implementation of 
> IGraphContentProviderinterface/ what are relationships
> 
> Hi,
> 
> I am developing a call graph view using zest. I have got my own 
> ContentProvider which implements the IGraphContentProvider interface.
> I've based it on the GraphContentProvider implementation which is not 
> up to date anymore, as getElements is now used instead of 
> getRelationships.
> 
> 	/**
> 	 * Returns all the relationships in the graph for the given input.
> 	 * @input the input model object.
> 	 * @return all the relationships in the graph for the given input.
> 	 */
> 	public Object[] getElements(Object input);
> 
> 
> my implementation is:
> public Object[] getElements(Object input) {
> 		Object[] rels = null;
> 		if (this.fCGModel != null) {
> 			int size = CGContentProvider.MAX <
> this.fCGModel.getConnectionSize() ? CGContentProvider.MAX :
> this.fCGModel.getConnectionSize();
> 			rels = new String[size];
> 			int length = CGContentProvider.MAX < rels.length ?
> CGContentProvider.MAX : rels.length;
> 			for (int i = 0; i < length; i++) {
> 				rels[i] = "" + i;
> 			}
> 		}
> 		return rels;
> 	}
> 
> in which I just return an array of strings from 0 to the number of the 
> connections. But these don't seem to be relationships.
> 
> So my question really is: what are relationship objects supposed to be 
> like? Does anybody have a sample implementation of getElements() where 
> something different from just an array of numbers is returned?
> 
> Raphael
> _______________________________________________
> mylar-dev mailing list
> mylar-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/mylar-dev




Back to the top