Menu

#30 add own label provider to have carriage return

open
callgraph (38)
5
2006-09-06
2006-08-18
No

it only shows question mark "proxy" pics

Discussion

  • Raphael Ackermann

    • summary: label provider does not show workspace labels --> add own label provider to have carriage return
     
  • Raphael Ackermann

    Logged In: YES
    user_id=797032

    don't subclass GraphModelFactory anymore and move the
    relevant code to a CallGraphLabelProvider. so that the label
    provider returns the appropriate text.

    String label = getLabelProvider().getText(data);
    if (data instanceof IJavaElement) {
    IJavaElement jElement = (IJavaElement) data;
    label =
    jElement.getParent().getElementName().concat("\n").concat(label);
    }
    GraphModelNode node = new GraphModelNode(model, label,
    labelProvider.getImage(data), data);

     
  • Raphael Ackermann

    Logged In: YES
    user_id=797032

    cannot easily subclass WorkbenchLabelProvider as its
    getText() method is final and cannot be overridden.

    could just copy all of it, but uses one internal class. hm.

    could use proxy pattern

     
  • Raphael Ackermann

    • priority: 8 --> 5
     

Log in to post a comment.