use of com.intellij.codeInsight.daemon.DaemonCodeAnalyzerSettings in project intellij-community by JetBrains.
the class ToggleDistractionFreeModeAction method actionPerformed.
@Override
public void actionPerformed(@NotNull AnActionEvent e) {
Project project = e.getProject();
alternateCurrentDistractionFreeModeSetting();
boolean enter = isDistractionFreeModeEnabled();
if (project == null)
return;
PropertiesComponent p = PropertiesComponent.getInstance();
UISettings ui = UISettings.getInstance();
EditorSettingsExternalizable.OptionSet eo = EditorSettingsExternalizable.getInstance().getOptions();
DaemonCodeAnalyzerSettings ds = DaemonCodeAnalyzerSettings.getInstance();
String before = "BEFORE.DISTRACTION.MODE.";
String after = "AFTER.DISTRACTION.MODE.";
if (enter) {
applyAndSave(p, ui, eo, ds, before, after, false);
TogglePresentationModeAction.storeToolWindows(project);
} else {
applyAndSave(p, ui, eo, ds, after, before, true);
TogglePresentationModeAction.restoreToolWindows(project, true, false);
}
UISettings.getInstance().fireUISettingsChanged();
LafManager.getInstance().updateUI();
EditorUtil.reinitSettings();
DaemonCodeAnalyzer.getInstance(project).settingsChanged();
EditorFactory.getInstance().refreshAllEditors();
}
use of com.intellij.codeInsight.daemon.DaemonCodeAnalyzerSettings in project intellij-community by JetBrains.
the class GotoNextErrorHandler method gotoNextError.
private void gotoNextError(Project project, Editor editor, PsiFile file, int caretOffset) {
final SeverityRegistrar severityRegistrar = SeverityRegistrar.getSeverityRegistrar(project);
DaemonCodeAnalyzerSettings settings = DaemonCodeAnalyzerSettings.getInstance();
int maxSeverity = settings.NEXT_ERROR_ACTION_GOES_TO_ERRORS_FIRST ? severityRegistrar.getSeveritiesCount() - 1 : SeverityRegistrar.SHOWN_SEVERITIES_OFFSET;
for (int idx = maxSeverity; idx >= SeverityRegistrar.SHOWN_SEVERITIES_OFFSET; idx--) {
final HighlightSeverity minSeverity = severityRegistrar.getSeverityByIndex(idx);
HighlightInfo infoToGo = findInfo(project, editor, caretOffset, minSeverity);
if (infoToGo != null) {
navigateToError(project, editor, infoToGo);
return;
}
}
showMessageWhenNoHighlights(project, file, editor);
}
use of com.intellij.codeInsight.daemon.DaemonCodeAnalyzerSettings in project intellij-community by JetBrains.
the class ErrorHighlightingPanel method reset.
public void reset() {
DaemonCodeAnalyzerSettings settings = DaemonCodeAnalyzerSettings.getInstance();
myAutoreparseDelayField.setText(Integer.toString(settings.AUTOREPARSE_DELAY));
myMarkMinHeight.setText(Integer.toString(settings.ERROR_STRIPE_MARK_MIN_HEIGHT));
myNextErrorGoesToErrorsFirst.setSelected(settings.NEXT_ERROR_ACTION_GOES_TO_ERRORS_FIRST);
for (ErrorOptionsProvider optionsProvider : myExtensions) {
optionsProvider.reset();
}
}
use of com.intellij.codeInsight.daemon.DaemonCodeAnalyzerSettings in project intellij-community by JetBrains.
the class JavaAutoImportOptions method apply.
public void apply() {
CodeInsightSettings codeInsightSettings = CodeInsightSettings.getInstance();
DaemonCodeAnalyzerSettings daemonSettings = DaemonCodeAnalyzerSettings.getInstance();
codeInsightSettings.ADD_IMPORTS_ON_PASTE = getSmartPasteValue();
daemonSettings.setImportHintEnabled(myCbShowImportPopup.isSelected());
CodeInsightWorkspaceSettings.getInstance(myProject).optimizeImportsOnTheFly = myCbOptimizeImports.isSelected();
codeInsightSettings.ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY = myCbAddUnambiguousImports.isSelected();
codeInsightSettings.ADD_MEMBER_IMPORTS_ON_THE_FLY = myCbAddMethodImports.isSelected();
myExcludePackagesTable.apply();
for (Project project : ProjectManager.getInstance().getOpenProjects()) {
DaemonCodeAnalyzer.getInstance(project).restart();
}
}
use of com.intellij.codeInsight.daemon.DaemonCodeAnalyzerSettings in project intellij-plugins by JetBrains.
the class ActionScriptHighlightingTest method testNoOverrideForInternal.
@JSTestOptions({ JSTestOption.WithLineMarkers })
public void testNoOverrideForInternal() throws Exception {
DaemonCodeAnalyzerSettings myDaemonCodeAnalyzerSettings = DaemonCodeAnalyzerSettings.getInstance();
myDaemonCodeAnalyzerSettings.SHOW_METHOD_SEPARATORS = true;
try {
defaultTest();
} finally {
myDaemonCodeAnalyzerSettings.SHOW_METHOD_SEPARATORS = false;
}
}
Aggregations