use of com.intellij.ide.GeneralSettings in project intellij-community by JetBrains.
the class TipPanel method nextTip.
public void nextTip() {
if (myTips.size() == 0) {
myBrowser.setText(IdeBundle.message("error.tips.not.found", ApplicationNamesInfo.getInstance().getFullProductName()));
return;
}
GeneralSettings settings = GeneralSettings.getInstance();
int lastTip = settings.getLastTip();
TipAndTrickBean tip;
lastTip++;
if (lastTip - 1 >= myTips.size()) {
tip = myTips.get(0);
lastTip = 1;
} else {
tip = myTips.get(lastTip - 1);
}
setTip(tip, lastTip, myBrowser, settings);
}
use of com.intellij.ide.GeneralSettings in project intellij-community by JetBrains.
the class BrowserSettingsPanel method isModified.
public boolean isModified() {
WebBrowserManager browserManager = WebBrowserManager.getInstance();
GeneralSettings generalSettings = GeneralSettings.getInstance();
DefaultBrowserPolicy defaultBrowserPolicy = getDefaultBrowser();
if (getDefaultBrowserPolicy(browserManager) != defaultBrowserPolicy || browserManager.isShowBrowserHover() != showBrowserHover.isSelected()) {
return true;
}
if (defaultBrowserPolicy == DefaultBrowserPolicy.ALTERNATIVE && !Comparing.strEqual(generalSettings.getBrowserPath(), alternativeBrowserPathField.getText())) {
return true;
}
return browsersEditor.isModified();
}
use of com.intellij.ide.GeneralSettings in project intellij-community by JetBrains.
the class BrowserSettingsPanel method reset.
public void reset() {
final WebBrowserManager browserManager = WebBrowserManager.getInstance();
DefaultBrowserPolicy effectiveDefaultBrowserPolicy = getDefaultBrowserPolicy(browserManager);
defaultBrowserPolicyComboBox.setSelectedItem(effectiveDefaultBrowserPolicy);
GeneralSettings settings = GeneralSettings.getInstance();
showBrowserHover.setSelected(browserManager.isShowBrowserHover());
browsersEditor.reset(browserManager.getList());
customPathValue = settings.getBrowserPath();
alternativeBrowserPathField.setEnabled(effectiveDefaultBrowserPolicy == DefaultBrowserPolicy.ALTERNATIVE);
updateCustomPathTextFieldValue(effectiveDefaultBrowserPolicy);
}
Aggregations