use of com.intellij.openapi.vcs.VcsShowOptionsSettingImpl in project intellij-community by JetBrains.
the class VcsBackgroundOperationsConfigurationPanel method apply.
public void apply() throws ConfigurationException {
VcsConfiguration settings = VcsConfiguration.getInstance(myProject);
settings.PERFORM_COMMIT_IN_BACKGROUND = myCbCommitInBackground.isSelected();
settings.PERFORM_UPDATE_IN_BACKGROUND = myCbUpdateInBackground.isSelected();
settings.PERFORM_CHECKOUT_IN_BACKGROUND = myCbCheckoutInBackground.isSelected();
settings.PERFORM_EDIT_IN_BACKGROUND = myCbEditInBackground.isSelected();
settings.PERFORM_ADD_REMOVE_IN_BACKGROUND = myCbAddRemoveInBackground.isSelected();
settings.PERFORM_ROLLBACK_IN_BACKGROUND = myPerformRevertInBackgroundCheckBox.isSelected();
boolean remoteCacheStateChanged = settings.CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND != myTrackChangedOnServer.isSelected();
if (!myProject.isDefault()) {
settings.CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND = myTrackChangedOnServer.isSelected();
settings.CHANGED_ON_SERVER_INTERVAL = ((Number) myChangedOnServerInterval.getValue()).intValue();
myCacheSettingsPanel.apply();
}
for (VcsShowOptionsSettingImpl setting : myPromptOptions.keySet()) {
setting.setValue(myPromptOptions.get(setting).isSelected());
}
// will check if should + was started -> inside
RemoteRevisionsCache.getInstance(myProject).updateAutomaticRefreshAlarmState(remoteCacheStateChanged);
}
use of com.intellij.openapi.vcs.VcsShowOptionsSettingImpl in project intellij-community by JetBrains.
the class ProjectLevelVcsManagerSerialization method writeExternalUtil.
public void writeExternalUtil(@NotNull Element element, @NotNull OptionsAndConfirmations optionsAndConfirmations) throws WriteExternalException {
final Map<String, VcsShowOptionsSettingImpl> options = optionsAndConfirmations.getOptions();
final Map<String, VcsShowConfirmationOptionImpl> confirmations = optionsAndConfirmations.getConfirmations();
for (VcsShowOptionsSettingImpl setting : options.values()) {
if (!setting.getValue()) {
Element settingElement = new Element(OPTIONS_SETTING);
element.addContent(settingElement);
settingElement.setAttribute(VALUE_ATTTIBUTE, Boolean.toString(setting.getValue()));
settingElement.setAttribute(ID_ATTRIBUTE, setting.getDisplayName());
}
}
for (VcsShowConfirmationOptionImpl setting : confirmations.values()) {
if (setting.getValue() != VcsShowConfirmationOption.Value.SHOW_CONFIRMATION) {
final Element settingElement = new Element(CONFIRMATIONS_SETTING);
element.addContent(settingElement);
settingElement.setAttribute(VALUE_ATTTIBUTE, setting.getValue().toString());
settingElement.setAttribute(ID_ATTRIBUTE, setting.getDisplayName());
}
}
}
use of com.intellij.openapi.vcs.VcsShowOptionsSettingImpl in project intellij-community by JetBrains.
the class ProjectLevelVcsManagerSerialization method readExternalUtil.
public void readExternalUtil(final Element element, final OptionsAndConfirmations optionsAndConfirmations) throws InvalidDataException {
final Map<String, VcsShowOptionsSettingImpl> options = optionsAndConfirmations.getOptions();
for (Element subElement : element.getChildren(OPTIONS_SETTING)) {
final String id = subElement.getAttributeValue(ID_ATTRIBUTE);
final String value = subElement.getAttributeValue(VALUE_ATTTIBUTE);
if (id != null && value != null) {
try {
getOrCreateOption(options, id).setValue(Boolean.parseBoolean(value));
} catch (Exception ignored) {
}
}
}
myReadValue.clear();
for (Element subElement : element.getChildren(CONFIRMATIONS_SETTING)) {
final String id = subElement.getAttributeValue(ID_ATTRIBUTE);
final String value = subElement.getAttributeValue(VALUE_ATTTIBUTE);
if (id != null && value != null) {
try {
myReadValue.put(id, VcsShowConfirmationOption.Value.fromString(value));
} catch (Exception ignored) {
}
}
}
}
use of com.intellij.openapi.vcs.VcsShowOptionsSettingImpl in project intellij-community by JetBrains.
the class VcsBackgroundOperationsConfigurationPanel method reset.
public void reset() {
VcsConfiguration settings = VcsConfiguration.getInstance(myProject);
myCbCommitInBackground.setSelected(settings.PERFORM_COMMIT_IN_BACKGROUND);
myCbUpdateInBackground.setSelected(settings.PERFORM_UPDATE_IN_BACKGROUND);
myCbCheckoutInBackground.setSelected(settings.PERFORM_CHECKOUT_IN_BACKGROUND);
myCbEditInBackground.setSelected(settings.PERFORM_EDIT_IN_BACKGROUND);
myCbAddRemoveInBackground.setSelected(settings.PERFORM_ADD_REMOVE_IN_BACKGROUND);
myPerformRevertInBackgroundCheckBox.setSelected(settings.PERFORM_ROLLBACK_IN_BACKGROUND);
for (VcsShowOptionsSettingImpl setting : myPromptOptions.keySet()) {
myPromptOptions.get(setting).setSelected(setting.getValue());
}
if (!myProject.isDefault()) {
myTrackChangedOnServer.setSelected(settings.CHECK_LOCALLY_CHANGED_CONFLICTS_IN_BACKGROUND);
myChangedOnServerInterval.setValue(settings.CHANGED_ON_SERVER_INTERVAL);
myChangedOnServerInterval.setEnabled(myTrackChangedOnServer.isSelected());
myCacheSettingsPanel.reset();
}
}
Aggregations