/** @param selection */ public void setSelection(RepositorySelection selection) { if (!selection.equals(validatedRepoSelection)) { currentRepoSelection = selection; setPageComplete(false); } else checkPage(); revalidate(); }
private void revalidate() { if (currentRepoSelection != null && currentRepoSelection.equals(validatedRepoSelection)) { // nothing changed on previous page checkPage(); return; } if (currentRepoSelection == null) return; specsPanel.clearRefSpecs(); specsPanel.setEnable(false); saveButton.setVisible(false); saveButton.setSelection(false); validatedRepoSelection = null; transportError = null; getControl() .getDisplay() .asyncExec( new Runnable() { public void run() { revalidateImpl(currentRepoSelection); } }); }
private void setExposedSelection(final URIish u, final RemoteConfig rc) { final RepositorySelection newSelection = new RepositorySelection(u, rc); if (newSelection.equals(selection)) return; selection = newSelection; }
/** * Compare current repository selection set by user to provided one. * * @param s repository selection to compare. * @return true if provided selection is equal to current page selection, false otherwise. */ public boolean selectionEquals(final RepositorySelection s) { return selection.equals(s); }