Search in sources :

Example 6 with GeneralSettings

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);
}
Also used : GeneralSettings(com.intellij.ide.GeneralSettings)

Example 7 with GeneralSettings

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();
}
Also used : GeneralSettings(com.intellij.ide.GeneralSettings)

Example 8 with GeneralSettings

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);
}
Also used : GeneralSettings(com.intellij.ide.GeneralSettings)

Aggregations

GeneralSettings (com.intellij.ide.GeneralSettings)8 ExecutionException (com.intellij.execution.ExecutionException)1 SaveAndSyncHandlerImpl (com.intellij.ide.SaveAndSyncHandlerImpl)1 ApplicationEx (com.intellij.openapi.application.ex.ApplicationEx)1 IOException (java.io.IOException)1