本文整理汇总了Java中com.intellij.codeInsight.daemon.DaemonCodeAnalyzer.restart方法的典型用法代码示例。如果您正苦于以下问题:Java DaemonCodeAnalyzer.restart方法的具体用法?Java DaemonCodeAnalyzer.restart怎么用?Java DaemonCodeAnalyzer.restart使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.codeInsight.daemon.DaemonCodeAnalyzer
的用法示例。
在下文中一共展示了DaemonCodeAnalyzer.restart方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: updateContext
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer; //导入方法依赖的package包/类
void updateContext(Collection<Namespace> namespaces, Collection<Variable> variables) {
final HistoryElement selectedItem = myModel.getSelectedItem();
final HistoryElement newElement;
if (selectedItem != null) {
newElement = selectedItem.changeContext(namespaces, variables);
} else {
newElement = new HistoryElement(myDocument.getText(), variables, namespaces);
}
myModel.setSelectedItem(newElement);
// FIXME
if (myNamespaceCache == null) {
myContextProvider.getNamespaceContext().setMap(asMap(namespaces));
}
final DaemonCodeAnalyzer analyzer = DaemonCodeAnalyzer.getInstance(myProject);
analyzer.restart(myXPathFile);
}
示例2: processTerminated
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer; //导入方法依赖的package包/类
@Override
public void processTerminated(ProcessEvent event) {
if (m_bsbError != null) {
m_bucklescript.setError(m_fileProcessed, m_bsbError);
reset();
}
DaemonCodeAnalyzer codeAnalyzer = DaemonCodeAnalyzer.getInstance(m_project);
codeAnalyzer.restart();
}
示例3: customize
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer; //导入方法依赖的package包/类
@Override
public void customize(@NotNull EditorEx editor) {
boolean apply = isEnabled();
if (!READY) {
return;
}
Project project = editor.getProject();
if (project == null) {
return;
}
PsiFile file = PsiDocumentManager.getInstance(project).getPsiFile(editor.getDocument());
if (file == null) {
return;
}
Function<InspectionProfileWrapper, InspectionProfileWrapper> strategy = file.getUserData(InspectionProfileWrapper.CUSTOMIZATION_KEY);
if (strategy == null) {
file.putUserData(InspectionProfileWrapper.CUSTOMIZATION_KEY, strategy = new MyInspectionProfileStrategy());
}
if (!(strategy instanceof MyInspectionProfileStrategy)) {
return;
}
((MyInspectionProfileStrategy)strategy).setUseSpellCheck(apply);
if (apply) {
editor.putUserData(IntentionManager.SHOW_INTENTION_OPTIONS_KEY, false);
}
// Update representation.
DaemonCodeAnalyzer analyzer = DaemonCodeAnalyzer.getInstance(project);
if (analyzer != null) {
analyzer.restart(file);
}
}
示例4: doRehighlightMavenFile
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer; //导入方法依赖的package包/类
private void doRehighlightMavenFile(VirtualFile file) {
Document doc = FileDocumentManager.getInstance().getCachedDocument(file);
if (doc == null) return;
PsiFile psi = PsiDocumentManager.getInstance(myProject).getCachedPsiFile(doc);
if (psi == null) return;
if (!MavenDomUtil.isMavenFile(psi)) return;
DaemonCodeAnalyzer daemon = DaemonCodeAnalyzer.getInstance(myProject);
daemon.restart(psi);
}
示例5: restartDaemon
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer; //导入方法依赖的package包/类
private static void restartDaemon(Project project) {
final DaemonCodeAnalyzer daemon = DaemonCodeAnalyzer.getInstance(project);
if (ApplicationManager.getApplication().isDispatchThread()) {
daemon.restart();
}
else {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
daemon.restart();
}
});
}
}
示例6: restartDaemon
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer; //导入方法依赖的package包/类
private static void restartDaemon(Project project)
{
final DaemonCodeAnalyzer daemon = DaemonCodeAnalyzer.getInstance(project);
if(ApplicationManager.getApplication().isDispatchThread())
{
daemon.restart();
}
else
{
SwingUtilities.invokeLater(daemon::restart);
}
}