use of com.intellij.openapi.vcs.impl.VcsEP in project intellij-community by JetBrains.
the class AllVcses method getAll.
public VcsDescriptor[] getAll() {
final List<VcsDescriptor> result = new ArrayList<>(myExtensions.size());
for (VcsEP vcsEP : myExtensions.values()) {
result.add(vcsEP.createDescriptor());
}
Collections.sort(result);
return result.toArray(new VcsDescriptor[result.size()]);
}
use of com.intellij.openapi.vcs.impl.VcsEP in project intellij-community by JetBrains.
the class AllVcses method getByName.
public AbstractVcs getByName(final String name) {
synchronized (myLock) {
final AbstractVcs vcs = myVcses.get(name);
if (vcs != null) {
return vcs;
}
}
// unmodifiable map => no sync needed
final VcsEP ep = myExtensions.get(name);
if (ep == null) {
return null;
}
// VcsEP guarantees to always return the same vcs value
final AbstractVcs vcs1 = ep.getVcs(myProject);
LOG.assertTrue(vcs1 != null, name);
synchronized (myLock) {
if (!myVcses.containsKey(name)) {
addVcs(vcs1);
}
return vcs1;
}
}
Aggregations