Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Read configured repositories

Thank you. I have found a solution, which works fine, for me. 
The repositories are stored Eclipse preferences. 

The code to get the repos is here: RepositoryUtil #getRepositories()

  1. String dirs;
  2. synchronized (prefs) {
  3. dirs = prefs.get(PREFS_DIRECTORIES, ""); //$NON-NLS-1$
  4. }
  5. if (dirs == null || dirs.length() == 0)
  6. return Collections.emptySet();
  7. Set<String> configuredStrings = new HashSet<String>();
  8. StringTokenizer tok = new StringTokenizer(dirs, File.pathSeparator);
  9. while (tok.hasMoreTokens())
  10. configuredStrings.add(tok.nextToken());
  11. return configuredStrings;


Am 03.07.2015 um 14:57 schrieb Mickael Istria <mistria@xxxxxxxxxx>:

On 07/03/2015 02:53 PM, Akif Etkue wrote:
Hello,

it is possible to read (get) all configured repositories from Eclipse?
I need the location (from file system) from every configured repo in Eclipse.
Take a look at how the "Git repositories" view (class=RepositoriesView) is implemented. The content provider or the setInput on the tree should be a good starting point.
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat
My blog - My Tweets
_______________________________________________
egit-dev mailing list
egit-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/egit-dev


Back to the top