use of org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager in project subclipse by subclipse.
the class SubclipseLinkedTaskInfo method init.
private void init() {
TaskRepositoryManager repositoryManager = TasksUiPlugin.getRepositoryManager();
String[] urls = null;
ProjectProperties props = null;
try {
if (resource != null) {
props = ProjectProperties.getProjectProperties(resource);
} else if (logEntry != null) {
ISVNResource svnres = logEntry.getResource();
if (svnres != null) {
if (svnres.getResource() != null) {
props = ProjectProperties.getProjectProperties(svnres.getResource());
} else {
ISVNClientAdapter client = SVNProviderPlugin.getPlugin().getSVNClientManager().getSVNClient();
SVNProviderPlugin.disableConsoleLogging();
ISVNProperty[] properties = client.getProperties(svnres.getUrl());
SVNProviderPlugin.enableConsoleLogging();
for (int i = 0; i < properties.length; i++) {
ISVNProperty property = properties[i];
if ("bugtraq:url".equals(property.getName())) {
repositoryUrl = SubclipseTeamPlugin.getRepository(property.getValue(), repositoryManager).getRepositoryUrl();
// comments?
}
}
}
}
}
} catch (Exception ex) {
// ignore?
SVNProviderPlugin.enableConsoleLogging();
}
if (props != null) {
if (repositoryUrl == null) {
repositoryUrl = SubclipseTeamPlugin.getRepository(props.getUrl(), repositoryManager).getRepositoryUrl();
}
urls = props.getLinkList(getText()).getUrls();
}
if (urls == null || urls.length == 0) {
urls = ProjectProperties.getUrls(getText()).getUrls();
}
if (urls != null && urls.length > 0) {
taskFullUrl = urls[0];
}
}
Aggregations