if (selection == null || !(selection instanceof IStructuredSelection)) { textViewer.setDocument(new Document("")); changePathsTableProvider.setLogEntry(null); return; } IStructuredSelection ss = (IStructuredSelection)selection; if (ss.size() != 1) { textViewer.setDocument(new Document("")); changePathsTableProvider.setLogEntry(null); return; } LogEntry entry = (LogEntry)ss.getFirstElement(); textViewer.setDocument(new Document(entry.getComment())); StyledText text = textViewer.getTextWidget(); if (projectProperties == null) linkList = ProjectProperties.getUrls(entry.getComment()); else linkList = projectProperties.getLinkList(entry.getComment()); if (linkList != null) { int[][] linkRanges = linkList.getLinkRanges(); String[] urls = linkList.getUrls(); for (int i = 0; i < linkRanges.length; i++) { text.setStyleRange(new StyleRange(linkRanges[i][0], linkRanges[i][1], JFaceColors.getHyperlinkText(Display.getCurrent()), null)); } } changePathsTableProvider.setLogEntry(entry);
updatePanels( selection);
	protected TableViewer createTableHistory(Composite parent) {				historyTableProvider = new HistoryTableProvider();		tableHistoryViewer = historyTableProvider.createTable(parent);				// set the content provider for the table		tableHistoryViewer.setContentProvider(new IStructuredContentProvider() {			public Object[] getElements(Object inputElement) {				// Short-circuit to optimize				if (entries != null) return entries;								if (!(inputElement instanceof ISVNRemoteResource)) return null;				final ISVNRemoteResource remoteResource = (ISVNRemoteResource)inputElement;				if(fetchLogEntriesJob == null) {					fetchLogEntriesJob = new FetchLogEntriesJob();				}				if(fetchLogEntriesJob.getState() != Job.NONE) {					fetchLogEntriesJob.cancel();					try {						fetchLogEntriesJob.join();					} catch (InterruptedException e) {						SVNUIPlugin.log(new SVNException(Policy.bind("HistoryView.errorFetchingEntries", remoteResource.getName()), e)); //$NON-NLS-1$					}				}				fetchLogEntriesJob.setRemoteFile(remoteResource);				Utils.schedule(fetchLogEntriesJob, getViewSite());				return new Object[0];			}			public void dispose() {			}			public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {				entries = null;				lastEntry = null;				revisionStart = SVNRevision.HEAD;			}		});		        // set the selectionchanged listener for the table        // updates the comments when selection changes		tableHistoryViewer.addSelectionChangedListener(new ISelectionChangedListener() {			public void selectionChanged(SelectionChangedEvent event) {				ISelection selection = event.getSelection();				if (selection == null || !(selection instanceof IStructuredSelection)) {					textViewer.setDocument(new Document("")); //$NON-NLS-1$                    changePathsTableProvider.setLogEntry(null);					return;				}				IStructuredSelection ss = (IStructuredSelection)selection;				if (ss.size() != 1) {					textViewer.setDocument(new Document("")); //$NON-NLS-1$                    changePathsTableProvider.setLogEntry(null);					return;				}				LogEntry entry = (LogEntry)ss.getFirstElement();				textViewer.setDocument(new Document(entry.getComment()));				StyledText text = textViewer.getTextWidget();				if (projectProperties == null) linkList = ProjectProperties.getUrls(entry.getComment());				else linkList = projectProperties.getLinkList(entry.getComment());				if (linkList != null) {					int[][] linkRanges = linkList.getLinkRanges();					String[] urls = linkList.getUrls();					for (int i = 0; i < linkRanges.length; i++) {						  text.setStyleRange(new StyleRange(linkRanges[i][0], linkRanges[i][1], JFaceColors.getHyperlinkText(Display.getCurrent()), null));				       					}				}                changePathsTableProvider.setLogEntry(entry);               			}		});				return tableHistoryViewer;	}