List of usage examples for org.eclipse.jface.viewers Viewer setData
public void setData(String key, Object value)
null if the property is to be removed. From source file:org.eclipse.mylyn.internal.reviews.ui.compare.ReviewCompareAnnotationSupport.java
License:Open Source License
public static ReviewCompareAnnotationSupport getAnnotationSupport(Viewer contentViewer) { ReviewCompareAnnotationSupport support = (ReviewCompareAnnotationSupport) contentViewer .getData(KEY_ANNOTAION_SUPPORT); if (support == null) { support = new ReviewCompareAnnotationSupport(contentViewer); contentViewer.setData(KEY_ANNOTAION_SUPPORT, support); }/*w w w. j a v a2 s.c o m*/ return support; }
From source file:org.eclipse.mylyn.reviews.r4e.ui.internal.utils.UIUtils.java
License:Open Source License
/** * Method getCompareAnnotationSupport./*from www .j a v a 2s. co m*/ * * @param aSourceViewer * ISourceViewer * @param aFileContext * R4EUIFileContext * @return IReviewAnnotationSupport */ public static IReviewAnnotationSupport getCompareAnnotationSupport(Viewer aViewer, Object aFileContext) { IReviewAnnotationSupport support = (IReviewAnnotationSupport) aViewer .getData(COMPARE_KEY_ANNOTATION_SUPPORT); if (support == null) { support = new R4ECompareAnnotationSupport(aViewer, aFileContext); aViewer.setData(COMPARE_KEY_ANNOTATION_SUPPORT, support); } return support; }