Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 71969 Details for
Bug 165809
allow a repository to be put into offline mode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
updated patch that persists offline setting when changed
clipboard.txt (text/plain), 5.37 KB, created by
Steffen Pingel
on 2007-06-20 18:53:53 EDT
(
hide
)
Description:
updated patch that persists offline setting when changed
Filename:
MIME Type:
Creator:
Steffen Pingel
Created:
2007-06-20 18:53:53 EDT
Size:
5.37 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.tasks.ui >Index: src/org/eclipse/mylyn/internal/tasks/ui/views/RepositoryOfflineAction.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/RepositoryOfflineAction.java,v >retrieving revision 1.1 >diff -u -r1.1 RepositoryOfflineAction.java >--- src/org/eclipse/mylyn/internal/tasks/ui/views/RepositoryOfflineAction.java 20 Jun 2007 15:05:15 -0000 1.1 >+++ src/org/eclipse/mylyn/internal/tasks/ui/views/RepositoryOfflineAction.java 20 Jun 2007 22:53:02 -0000 >@@ -46,6 +46,7 @@ > public void run() { > repository.setOffline(isChecked()); > TasksUiPlugin.getRepositoryManager().notifyRepositorySettingsChagned(repository); >+ TasksUiPlugin.getRepositoryManager().saveRepositories(TasksUiPlugin.getDefault().getRepositoriesFilePath()); > } > > public void selectionChanged(IAction action, ISelection selection) { >Index: src/org/eclipse/mylyn/tasks/ui/SynchronizeTaskJob.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/SynchronizeTaskJob.java,v >retrieving revision 1.61 >diff -u -r1.61 SynchronizeTaskJob.java >--- src/org/eclipse/mylyn/tasks/ui/SynchronizeTaskJob.java 20 Jun 2007 00:11:33 -0000 1.61 >+++ src/org/eclipse/mylyn/tasks/ui/SynchronizeTaskJob.java 20 Jun 2007 22:53:02 -0000 >@@ -27,6 +27,7 @@ > import org.eclipse.mylyn.internal.monitor.core.util.StatusManager; > import org.eclipse.mylyn.internal.tasks.ui.TaskFactory; > import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages; >+import org.eclipse.mylyn.internal.tasks.ui.actions.AbstractTaskRepositoryAction; > import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector; > import org.eclipse.mylyn.tasks.core.AbstractTask; > import org.eclipse.mylyn.tasks.core.AbstractTaskDataHandler; >@@ -137,7 +138,7 @@ > return Status.CANCEL_STATUS; > } catch (final CoreException e) { > for (AbstractTask task : tasksToSynch) { >- task.setStatus(e.getStatus()); >+ updateStatus(repository, task, e.getStatus()); > } > if (forced) { > PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { >@@ -158,37 +159,36 @@ > return Status.OK_STATUS; > } > >- private void synchronizeTask(IProgressMonitor monitor, AbstractTask repositoryTask) { >- monitor.subTask(repositoryTask.getSummary()); >+ private void synchronizeTask(IProgressMonitor monitor, AbstractTask task) { >+ monitor.subTask(task.getSummary()); > >- repositoryTask.setStatus(null); >+ task.setStatus(null); > >+ final TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository( >+ task.getRepositoryKind(), task.getRepositoryUrl()); > try { >- >- final TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository( >- repositoryTask.getRepositoryKind(), repositoryTask.getRepositoryUrl()); > if (repository == null) { > throw new CoreException(new Status(IStatus.ERROR, TasksUiPlugin.PLUGIN_ID, 0, > "Associated repository could not be found. Ensure proper repository configuration of " >- + repositoryTask.getRepositoryUrl() + " in " + TasksUiPlugin.LABEL_VIEW_REPOSITORIES >+ + task.getRepositoryUrl() + " in " + TasksUiPlugin.LABEL_VIEW_REPOSITORIES > + ".", null)); > } > >- TasksUiPlugin.getTaskListManager().getTaskList().notifyTaskChanged(repositoryTask, false); >+ TasksUiPlugin.getTaskListManager().getTaskList().notifyTaskChanged(task, false); > if (taskDataHandler != null) { >- String taskId = repositoryTask.getTaskId(); >+ String taskId = task.getTaskId(); > RepositoryTaskData downloadedTaskData = taskDataHandler.getTaskData(repository, taskId, monitor); > > if (downloadedTaskData != null) { >- updateTask(monitor, repository, repositoryTask, downloadedTaskData); >+ updateTask(monitor, repository, task, downloadedTaskData); > } else { >- updateFromRepository(repository, repositoryTask, monitor); >+ updateFromRepository(repository, task, monitor); > } > } else { >- updateFromRepository(repository, repositoryTask, monitor); >+ updateFromRepository(repository, task, monitor); > } > } catch (final CoreException e) { >- repositoryTask.setStatus(e.getStatus()); >+ updateStatus(repository, task, e.getStatus()); > if (forced) { > PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { > public void run() { >@@ -201,6 +201,17 @@ > monitor.worked(1); > } > >+ /** >+ * Does not report synchronization failures if repository is offline. >+ */ >+ private void updateStatus(TaskRepository repository, AbstractTask task, IStatus status) { >+ if (!forced && repository != null && repository.isOffline()) { >+ task.setCurrentlySynchronizing(false); >+ } else { >+ task.setStatus(status); >+ } >+ } >+ > private void synchronizeTasks(IProgressMonitor monitor, TaskRepository repository, Set<AbstractTask> tasks) > throws CoreException { > monitor.subTask("Synchronizing tasks from: " + repository.getRepositoryLabel()); >@@ -222,7 +233,7 @@ > try { > updateTask(new SubProgressMonitor(monitor, 1), repository, task, taskData); > } catch (final CoreException e) { >- task.setStatus(e.getStatus()); >+ updateStatus(repository, task, e.getStatus()); > if (forced) { > PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { > public void run() {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 165809
:
71846
|
71847
|
71848
|
71965
|
71966
| 71969