}
/* Ask for ContentProvider of Viewer */
ContentViewer viewer = fRegistry.get(viewerId);
if (viewer instanceof NewsBrowserViewer && viewer.getContentProvider() != null) {
NewsContentProvider newsContentProvider = (NewsContentProvider) viewer.getContentProvider();
/* Look for BookMarks that are to displayed */
int displayBookMarkIndex = parameters.indexOf(OP_DISPLAY_BOOKMARK);
if (displayBookMarkIndex >= 0) {
start = displayBookMarkIndex + OP_DISPLAY_BOOKMARK.length();
end = parameters.indexOf('&', start);
if (end < 0)
end = parameters.length();
StringTokenizer tokenizer = new StringTokenizer(parameters.substring(start, end), ",");//$NON-NLS-1$
while (tokenizer.hasMoreElements()) {
BookMarkReference ref = new BookMarkReference(Long.valueOf((String) tokenizer.nextElement()));
elements.addAll(Arrays.asList(newsContentProvider.getElements(ref)));
}
}
/* Look for SearchMarks that are to displayed */
int displaySearchMarkIndex = parameters.indexOf(OP_DISPLAY_SEARCHMARK);
if (displaySearchMarkIndex >= 0) {
start = displaySearchMarkIndex + OP_DISPLAY_SEARCHMARK.length();
end = parameters.indexOf('&', start);
if (end < 0)
end = parameters.length();
StringTokenizer tokenizer = new StringTokenizer(parameters.substring(start, end), ",");//$NON-NLS-1$
while (tokenizer.hasMoreElements()) {
SearchMarkReference ref = new SearchMarkReference(Long.valueOf((String) tokenizer.nextElement()));
elements.addAll(Arrays.asList(newsContentProvider.getElements(ref)));
}
}
/* Look for News that are to displayed */
int displayNewsIndex = parameters.indexOf(OP_DISPLAY_NEWS);
if (displayNewsIndex >= 0) {
start = displayNewsIndex + OP_DISPLAY_NEWS.length();
end = parameters.indexOf('&', start);
if (end < 0)
end = parameters.length();
StringTokenizer tokenizer = new StringTokenizer(parameters.substring(start, end), ",");//$NON-NLS-1$
while (tokenizer.hasMoreElements()) {
NewsReference ref = new NewsReference(Long.valueOf((String) tokenizer.nextElement()));
elements.addAll(Arrays.asList(newsContentProvider.getElements(ref)));
}
}
}
/* Reply to the Socket */