mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge commit 'origin/master'
This commit is contained in:
+13
-13
@@ -95,19 +95,6 @@ public class ArtifactsCompilerInstance extends GenericCompilerInstance<ArtifactB
|
||||
else {
|
||||
artifacts = new HashSet<Artifact>(Arrays.asList(ArtifactManager.getInstance(getProject()).getArtifacts()));
|
||||
}
|
||||
List<Artifact> additionalArtifacts = new ArrayList<Artifact>();
|
||||
for (BuildParticipantProvider provider : BuildParticipantProvider.EXTENSION_POINT_NAME.getExtensions()) {
|
||||
for (Module module : ModuleManager.getInstance(getProject()).getModules()) {
|
||||
final Collection<? extends BuildParticipant> participants = provider.getParticipants(module);
|
||||
for (BuildParticipant participant : participants) {
|
||||
ContainerUtil.addIfNotNull(participant.createArtifact(myContext), additionalArtifacts);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (LOG.isDebugEnabled() && !additionalArtifacts.isEmpty()) {
|
||||
LOG.debug("additional artifacts to build: " + additionalArtifacts);
|
||||
}
|
||||
artifacts.addAll(additionalArtifacts);
|
||||
|
||||
Map<String, Artifact> artifactsMap = new HashMap<String, Artifact>();
|
||||
for (Artifact artifact : artifacts) {
|
||||
@@ -119,6 +106,19 @@ public class ArtifactsCompilerInstance extends GenericCompilerInstance<ArtifactB
|
||||
targets.add(new ArtifactBuildTarget(artifact));
|
||||
}
|
||||
}
|
||||
|
||||
for (BuildParticipantProvider provider : BuildParticipantProvider.EXTENSION_POINT_NAME.getExtensions()) {
|
||||
for (Module module : ModuleManager.getInstance(getProject()).getModules()) {
|
||||
final Collection<? extends BuildParticipant> participants = provider.getParticipants(module);
|
||||
for (BuildParticipant participant : participants) {
|
||||
Artifact artifact = participant.createArtifact(myContext);
|
||||
if (artifact != null) {
|
||||
LOG.debug("additional artifact to build: " + artifact);
|
||||
targets.add(new ArtifactBuildTarget(artifact));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}.execute();
|
||||
return targets;
|
||||
|
||||
+8
-2
@@ -23,13 +23,14 @@ import com.intellij.codeInsight.completion.CompletionType;
|
||||
import com.intellij.codeInsight.completion.impl.CompletionServiceImpl;
|
||||
import com.intellij.codeInsight.lookup.LookupManager;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.ex.ApplicationManagerEx;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.fileEditor.FileEditorManager;
|
||||
import com.intellij.openapi.fileTypes.FileType;
|
||||
import com.intellij.openapi.project.DumbService;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.psi.PsiDocumentManager;
|
||||
import com.intellij.psi.PsiFile;
|
||||
import com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil;
|
||||
|
||||
/**
|
||||
* @author peter
|
||||
@@ -96,7 +97,12 @@ public class CompletionAutoPopupHandler extends TypedHandlerDelegate {
|
||||
if (ApplicationManager.getApplication().isWriteAccessAllowed()) return; //it will fail anyway
|
||||
if (DumbService.getInstance(project).isDumb()) return;
|
||||
|
||||
invokeAutoPopupCompletion(project, editor);
|
||||
// retrieve the injected file from scratch since our typing might have destroyed the old one completely
|
||||
Editor topLevelEditor = InjectedLanguageUtil.getTopLevelEditor(editor);
|
||||
PsiFile topLevelFile = InjectedLanguageUtil.getTopLevelFile(file);
|
||||
PsiDocumentManager.getInstance(project).commitAllDocuments();
|
||||
Editor newEditor = InjectedLanguageUtil.getEditorForInjectedLanguageNoCommit(topLevelEditor, topLevelFile);
|
||||
invokeAutoPopupCompletion(project, newEditor);
|
||||
}
|
||||
};
|
||||
AutoPopupController.getInstance(project).invokeAutoPopupRunnable(request, CodeInsightSettings.getInstance().AUTO_LOOKUP_DELAY);
|
||||
|
||||
Reference in New Issue
Block a user