mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
+2
-4
@@ -35,9 +35,7 @@ import org.jetbrains.jps.model.java.compiler.JavaCompilers;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import static com.sun.tools.javac.code.Flags.PRIVATE;
|
||||
@@ -166,7 +164,7 @@ public class BackwardReferenceIndexWriter {
|
||||
|
||||
synchronized void writeReferences(int fileId, Collection<JavacRefSymbol> refs) {
|
||||
final ByteArrayEnumerator byteSeqEum = myIndex.getByteSeqEum();
|
||||
final List<LightRef> usages = ContainerUtil.mapNotNull(refs, new Function<JavacRefSymbol, LightRef>() {
|
||||
final Set<LightRef> usages = ContainerUtil.map2SetNotNull(refs, new Function<JavacRefSymbol, LightRef>() {
|
||||
@Override
|
||||
public LightRef fun(JavacRefSymbol symbol) {
|
||||
return fromSymbol(symbol, byteSeqEum);
|
||||
@@ -186,7 +184,7 @@ public class BackwardReferenceIndexWriter {
|
||||
|
||||
private void updateReferenceIndicesIncrementally(int fileId, Collection<LightRef> usages) {
|
||||
final Collection<LightRef> rawOldUsages = myIndex.getReferenceMap().get(fileId);
|
||||
Collection<LightRef> oldUsages = rawOldUsages == null ? null : new ArrayList<LightRef>(rawOldUsages);
|
||||
Collection<LightRef> oldUsages = rawOldUsages == null ? null : new THashSet<LightRef>(rawOldUsages);
|
||||
for (LightRef usage : usages) {
|
||||
if (oldUsages == null || !oldUsages.remove(usage)) {
|
||||
myIndex.getBackwardReferenceMap().put(usage, fileId);
|
||||
|
||||
+2
-2
@@ -24,8 +24,8 @@ import com.intellij.openapi.fileEditor.FileDocumentManager
|
||||
import org.jetbrains.concurrency.Promise
|
||||
import org.jetbrains.concurrency.resolvedPromise
|
||||
|
||||
private class DefaultProgramRunnerImpl : AsyncGenericProgramRunner<RunnerSettings>() {
|
||||
override fun getRunnerId() = "defaultRunner"
|
||||
private class DefaultRunProgramRunner : AsyncGenericProgramRunner<RunnerSettings>() {
|
||||
override fun getRunnerId() = "defaultRunRunner"
|
||||
|
||||
override fun prepare(environment: ExecutionEnvironment, state: RunProfileState): Promise<RunProfileStarter> {
|
||||
FileDocumentManager.getInstance().saveAllDocuments()
|
||||
@@ -16,10 +16,23 @@
|
||||
package com.intellij.formatting;
|
||||
|
||||
/**
|
||||
* @author Denis Zhdanov
|
||||
* @since 8/22/12 2:44 PM
|
||||
* The current formatting mode.
|
||||
*/
|
||||
public enum FormattingMode {
|
||||
|
||||
REFORMAT, ADJUST_INDENT, ADJUST_INDENT_ON_ENTER
|
||||
|
||||
/**
|
||||
* Normal reformat (modifies indents and inline whitespaces).
|
||||
*/
|
||||
REFORMAT,
|
||||
|
||||
/**
|
||||
* Line indent adjustment.
|
||||
*/
|
||||
ADJUST_INDENT,
|
||||
|
||||
/**
|
||||
* Indent adjustment on a new line after Enter. In some cases a behavior may be different from the case when the same code is
|
||||
* reformatted or indented, especially when some more input is expected to follow on the new line.
|
||||
*/
|
||||
ADJUST_INDENT_ON_ENTER
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.intellij.ide.favoritesTreeView.FavoritesTreeNodeDescriptor;
|
||||
import com.intellij.ide.util.treeView.AbstractTreeBuilder;
|
||||
import com.intellij.ide.util.treeView.AbstractTreeNode;
|
||||
import com.intellij.ide.util.treeView.AbstractTreeStructure;
|
||||
import com.intellij.ide.util.treeView.AbstractTreeUpdater;
|
||||
import com.intellij.ide.util.treeView.NodeDescriptor;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.progress.Progressive;
|
||||
@@ -160,11 +161,14 @@ public abstract class BaseProjectTreeBuilder extends AbstractTreeBuilder {
|
||||
final boolean requestFocus,
|
||||
final Condition<AbstractTreeNode> nonStopCondition) {
|
||||
|
||||
AbstractTreeUpdater updater = getUpdater();
|
||||
if (updater == null) return ActionCallback.REJECTED;
|
||||
|
||||
final ActionCallback result = new ActionCallback();
|
||||
|
||||
final FocusRequestor requestor = IdeFocusManager.getInstance(myProject).getFurtherRequestor();
|
||||
|
||||
UiActivityMonitor.getInstance().addActivity(myProject, new UiActivity.AsyncBgOperation("projectViewSelect"), getUpdater().getModalityState());
|
||||
UiActivityMonitor.getInstance().addActivity(myProject, new UiActivity.AsyncBgOperation("projectViewSelect"), updater.getModalityState());
|
||||
batch(indicator -> {
|
||||
_select(element, file, requestFocus, nonStopCondition, result, indicator, null, requestor, false);
|
||||
UiActivityMonitor.getInstance().removeActivity(myProject, new UiActivity.AsyncBgOperation("projectViewSelect"));
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
<treeStructureProvider implementation="com.intellij.platform.PlatformProjectViewStructureProvider"/>
|
||||
|
||||
<programRunner implementation="com.intellij.execution.runners.DefaultProgramRunnerImpl" order="last"/>
|
||||
<programRunner implementation="com.intellij.execution.runners.DefaultRunProgramRunner" order="last"/>
|
||||
|
||||
<projectConfigurable groupId="editor" groupWeight="160" displayName="Inspections" id="Errors" instance="com.intellij.profile.codeInspection.ui.ProjectInspectionToolsConfigurable" order="before preferences.intentionPowerPack"/>
|
||||
<projectConfigurable groupId="appearance" groupWeight="111" instance="com.intellij.ide.util.scopeChooser.ScopeChooserConfigurable" id="project.scopes" key="scopes.display.name" bundle="messages.IdeBundle" />
|
||||
|
||||
@@ -341,7 +341,7 @@
|
||||
<stepsBeforeRunProvider implementation="com.intellij.compiler.options.CompileStepBeforeRunNoErrorCheck" id="compileBeforeRunNoErrorCheck" order="after compileBeforeRun"/>
|
||||
<stepsBeforeRunProvider implementation="com.intellij.packaging.impl.run.BuildArtifactsBeforeRunTaskProvider" order="after compileBeforeRunNoErrorCheck"/>
|
||||
<programRunner id="defaultRunRunner" implementation="com.intellij.execution.impl.DefaultJavaProgramRunner"/>
|
||||
<programRunner implementation="com.intellij.execution.runners.DefaultProgramRunnerImpl" order="last"/>
|
||||
<programRunner implementation="com.intellij.execution.runners.DefaultRunProgramRunner" order="last"/>
|
||||
|
||||
<hectorComponentProvider implementation="com.intellij.codeInsight.daemon.impl.ImportPopupHectorComponentProvider"/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user