List of usage examples for org.eclipse.jgit.api RemoteSetUrlCommand setPush
@Deprecated public void setPush(boolean push)
From source file:com.chungkwong.jgitgui.RemoteTreeItem.java
License:Open Source License
private void gitRemoteResetURL() { TextInputDialog branchDialog = new TextInputDialog(); branchDialog.setTitle(java.util.ResourceBundle.getBundle("com/chungkwong/jgitgui/text") .getString("CHOOSE A NEW URL FOR THE REMOTE CONFIGURE")); branchDialog.setHeaderText(java.util.ResourceBundle.getBundle("com/chungkwong/jgitgui/text") .getString("ENTER THE NEW URL OF THE REMOTE CONFIGURE:")); Optional<String> name = branchDialog.showAndWait(); if (name.isPresent()) try {/*from w w w . jav a 2s. c o m*/ RemoteSetUrlCommand command = ((Git) getParent().getValue()).remoteSetUrl(); command.setName(((RemoteConfig) getValue()).getName()); command.setUri(new URIish(name.get())); command.setPush(true); command.call(); command = ((Git) getParent().getValue()).remoteSetUrl(); command.setName(((RemoteConfig) getValue()).getName()); command.setUri(new URIish(name.get())); command.setPush(false); command.call(); } catch (Exception ex) { Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); Util.informUser(ex); } }