From 6faead300d76ddccb8996b9df8f3a1bf8e79c319 Mon Sep 17 00:00:00 2001 From: Andrey Loskutov Date: Sun, 15 Jul 2018 18:04:26 +0200 Subject: Bug 537044 - stop running team job for migration from 2.x to 3.0 According to bug 67778 comment 4, we can stop running this job. I doubt anyone migrates from Eclipse 2.x to 4.9 and has projects with disabled capabilities. Change-Id: I7d5845baf48dd203fb4f38c7582342fc01888760 Signed-off-by: Andrey Loskutov --- .../eclipse/team/internal/ui/IPreferenceIds.java | 5 ---- .../eclipse/team/internal/ui/TeamUIMessages.java | 2 -- .../org/eclipse/team/internal/ui/TeamUIPlugin.java | 28 ---------------------- .../eclipse/team/internal/ui/messages.properties | 4 +--- 4 files changed, 1 insertion(+), 38 deletions(-) (limited to 'bundles/org.eclipse.team.ui/src/org/eclipse/team/internal') diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java index ce85b9131..f15740ca2 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/IPreferenceIds.java @@ -77,11 +77,6 @@ public interface IPreferenceIds { */ public static final String SYNCVIEW_REMOVE_FROM_VIEW_NO_PROMPT = PREFIX + "remove_from_view_without_prompt"; //$NON-NLS-1$ - /* - * Preference to determine if the workspace is started for the first time. - */ - public static final String PREF_WORKSPACE_FIRST_TIME = PREFIX + "first_time"; //$NON-NLS-1$ - /* * Preferences for the Local History Page */ diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java index 9980b8d39..099f642b5 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIMessages.java @@ -746,6 +746,4 @@ public class TeamUIMessages extends NLS { public static String NotFound; - public static String LoadingTeamCapabilities; - } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java index 6d70df919..440b331b9 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java @@ -15,7 +15,6 @@ import java.net.URL; import java.util.*; import org.eclipse.core.runtime.*; -import org.eclipse.core.runtime.jobs.Job; import org.eclipse.core.runtime.preferences.InstanceScope; import org.eclipse.jface.dialogs.MessageDialogWithToggle; import org.eclipse.jface.operation.IRunnableWithProgress; @@ -162,7 +161,6 @@ public class TeamUIPlugin extends AbstractUIPlugin { store.setDefault(IPreferenceIds.SYNCHRONIZING_DEFAULT_PARTICIPANT_SEC_ID, GlobalRefreshAction.NO_DEFAULT_PARTICPANT); store.setDefault(IPreferenceIds.SYNCHRONIZING_COMPLETE_PERSPECTIVE, MessageDialogWithToggle.PROMPT); store.setDefault(IPreferenceIds.SYNCVIEW_REMOVE_FROM_VIEW_NO_PROMPT, false); - store.setDefault(IPreferenceIds.PREF_WORKSPACE_FIRST_TIME, true); // Convert the old compressed folder preference to the new layout preference if (!store.isDefault(IPreferenceIds.SYNCVIEW_COMPRESS_FOLDERS) && !store.getBoolean(IPreferenceIds.SYNCVIEW_COMPRESS_FOLDERS)) { @@ -221,32 +219,6 @@ public class TeamUIPlugin extends AbstractUIPlugin { debugRegistration = context.registerService(DebugOptionsListener.class, Policy.DEBUG_OPTIONS_LISTENER, properties); initializeImages(this); - - // This is a backwards compatibility check to ensure that repository - // provider capability are enabled automatically if an old workspace is - // opened for the first time and contains projects shared with a disabled - // capability. We defer the actual processing of the projects to another - // job since it is not critical to the startup of the team ui plugin. - IPreferenceStore store = getPreferenceStore(); - if (store.getBoolean(IPreferenceIds.PREF_WORKSPACE_FIRST_TIME)) { - Job capabilityInitializer = new Job(TeamUIMessages.LoadingTeamCapabilities) { - @Override - protected IStatus run(IProgressMonitor monitor) { - TeamCapabilityHelper.getInstance(); - getPreferenceStore().setValue(IPreferenceIds.PREF_WORKSPACE_FIRST_TIME, false); - return Status.OK_STATUS; - } - @Override - public boolean shouldRun() { - // Only initialize the capability helper if the UI is running (bug 76348) - return PlatformUI.isWorkbenchRunning(); - } - }; - capabilityInitializer.setSystem(true); - capabilityInitializer.setPriority(Job.DECORATE); - capabilityInitializer.schedule(1000); - } - StreamMergerDelegate.start(); } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties index 8e8a2a8a6..eadd787f8 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties @@ -367,7 +367,7 @@ RemoveSynchronizeParticipantAction_5=Save Changes ConfigureProjectWizard_showAll=&Show All Wizards ImportProjectSetMainPage_description=Import the team project file. ExportProjectSetMainPage_description=Export selected resources into the team project file. -ExportProjectSetMainPage_warning=Some projects from the selected working sets cannot be exported. +ExportProjectSetMainPage_warning=Some projects from the selected working sets cannot be exported. ExportProjectSetMainPage_DeselectAll=&Deselect All ExportProjectSetMainPage_FileButton=F&ile ExportProjectSetMainPage_EditButton=Edit... @@ -609,5 +609,3 @@ FuzzFactorDialog_message=Enter Fuzz Factor: FuzzFactorDialog_guess=&Guess FuzzFactorDialog_notANumber=Not a number FuzzFactorDialog_numberOutOfRange=Number out of range - -LoadingTeamCapabilities=Loading team capabilities support \ No newline at end of file -- cgit v1.2.3