microsoft / team-explorer-everywhere

Team Explorer Everywhere Plugin for Eclipse
Other
300 stars 97 forks source link

java.lang.NoSuchMethodError: 'org.eclipse.egit.core.RepositoryUtil org.eclipse.egit.core.Activator.getRepositoryUtil()' #353

Closed kris-mart closed 1 year ago

kris-mart commented 1 year ago

Seems like its not working with new egit (my case: org.eclipse.egit.core_6.3.0.202209071007-r.jar)

kris-mart commented 1 year ago

Duplicate to #345

howlger commented 1 year ago

In EGit the method has been removed in this commit.

I guess, https://github.com/microsoft/team-explorer-everywhere/blob/ff54dc1ba266cbb8f34222e2a2b4db466a271ea1/source/com.microsoft.tfs.client.eclipse.ui.egit/src/com/microsoft/tfs/client/eclipse/ui/egit/importwizard/CrossCollectionRepositorySelectControl.java#L244-L251

has to replaced by something like:



    private static final String EGIT_PLUGIN_ID = "org.eclipse.egit.core"; //$NON-NLS-1$

    // ...

       rootFolderPreference =
            Platform.getPreferencesService().getString(EGIT_PLUGIN_ID, DEFAULT_REPOSITORY_DIR_CORE_KEY, null, null);
        if (!StringUtil.isNullOrEmpty(rootFolderPreference)) { 
            return rootFolderPreference; 
        }
howlger commented 1 year ago

As workaround downgrade JGit/EGit to 5.11 or use Eclipse 2021-03.

See also my Stack Overflow answer here.