@Override public String apply(GitRemoteBranch branch) { return branch.getNameForRemoteOperations(); } });
public String getQuery() { if (branch.isPresent()) { return String.format("(project:%s+branch:%s)", getNameForRepository(repository), branch.get().getNameForRemoteOperations()); } else { return String.format("project:%s", getNameForRepository(repository)); } } }
@Override public void actionPerformed(AnActionEvent e) { value = Optional.of(new BranchDescriptor(repository, branch)); updateFilterValueLabel(String.format("%s (%s)", branch.getNameForRemoteOperations(), getNameForRepository(repository))); setChanged(); notifyObservers(project); } });
public GerritPushTargetPanel(@NotNull GitRepository repository, @Nullable GitPushTarget defaultTarget, GerritPushOptionsPanel gerritPushOptionsPanel) { super(repository, defaultTarget); String initialBranch = null; if (defaultTarget != null) { initialBranch = defaultTarget.getBranch().getNameForRemoteOperations(); } gerritPushOptionsPanel.getGerritPushExtensionPanel().registerGerritPushTargetPanel(this, initialBranch); }
public static GitRemoteBranch createRemoteBranch(final String name, final GitRemote remote) { GitRemoteBranch branch = mock(GitRemoteBranch.class); when(branch.getName()).thenReturn("refs/remotes/" + name); when(branch.getFullName()).thenReturn(name); when(branch.isRemote()).thenReturn(true); when(branch.getRemote()).thenReturn(remote); when(branch.getNameForLocalOperations()).thenReturn(name); when(branch.getNameForRemoteOperations()).thenReturn(name); return branch; }
Collections.sort(branches, ordering); for (final GitRemoteBranch branch : branches) { if (!branch.getNameForRemoteOperations().equals("HEAD")) { group.add(new DumbAwareAction(branch.getNameForRemoteOperations()) { @Override public void actionPerformed(AnActionEvent e) {