• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java PsiTreeChangeEvent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.intellij.psi.PsiTreeChangeEvent的典型用法代码示例。如果您正苦于以下问题:Java PsiTreeChangeEvent类的具体用法?Java PsiTreeChangeEvent怎么用?Java PsiTreeChangeEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PsiTreeChangeEvent类属于com.intellij.psi包,在下文中一共展示了PsiTreeChangeEvent类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: highlightHeader

import com.intellij.psi.PsiTreeChangeEvent; //导入依赖的package包/类
private void highlightHeader(final PsiTreeChangeEvent psiTreeChangeEvent) {
    final PsiFile file = psiTreeChangeEvent.getFile();

    if (null == file) {
        return;
    }

    final Editor editor = PsiUtilBase.findEditor(file);

    if (null == editor) {
        return;
    }

    impexHeaderNameHighlighterService.highlightCurrentHeader(editor);
    impexColumnHighlighterService.highlightCurrentColumn(editor);
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:17,代码来源:ImpexHeaderHighlighterComponent.java


示例2: updatePsi

import com.intellij.psi.PsiTreeChangeEvent; //导入依赖的package包/类
@Override
protected void updatePsi(PsiTreeChangeEvent event) {
  boolean runState = myRunState;
  super.updatePsi(event);

  if (!runState && myResourceDepends != null && !myUpdateRenderer) {
    PsiFile psiFile = event.getFile();
    if (psiFile == null) {
      return;
    }
    VirtualFile file = psiFile.getVirtualFile();
    if (file == null) {
      return;
    }
    for (VirtualFile resourceDir : myResourceDepends) {
      if (VfsUtilCore.isAncestor(resourceDir, file, false)) {
        myUpdateRenderer = true;
        break;
      }
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:ExternalPSIChangeListener.java


示例3: updatePsi

import com.intellij.psi.PsiTreeChangeEvent; //导入依赖的package包/类
protected void updatePsi(PsiTreeChangeEvent event) {
    boolean runState = myRunState;

    if (myRunState && myFile == event.getFile()) {
        addRequest();
    }

    if (!runState && !myUpdateRenderer) {
        PsiFile psiFile = event.getFile();
        if (psiFile == null) {
            return;
        }
        VirtualFile file = psiFile.getVirtualFile();
        if (file == null) {
            //ignore
        }
    }
}
 
开发者ID:chrimm,项目名称:cordovastudio,代码行数:19,代码来源:ExternalPSIChangeListener.java


示例4: handleEvent

import com.intellij.psi.PsiTreeChangeEvent; //导入依赖的package包/类
private void handleEvent(final PsiTreeChangeEvent event)
{
	if(event.getParent() != null)
	{
		PsiFile containingFile = event.getParent().getContainingFile();
		if(containingFile instanceof PropertiesFile)
		{
			LOG.debug("Received PSI change event for properties file");
			myAlarm.cancelRequest(myRefreshPropertiesRequest);
			myAlarm.addRequest(myRefreshPropertiesRequest, 500, ModalityState.stateForComponent(GuiEditor.this));
		}
		else if(containingFile instanceof PsiPlainTextFile && containingFile.getFileType().equals(GuiFormFileType.INSTANCE))
		{
			// quick check if relevant
			String resourceName = FormEditingUtil.buildResourceName(containingFile);
			if(myDocument.getText().indexOf(resourceName) >= 0)
			{
				LOG.debug("Received PSI change event for nested form");
				// TODO[yole]: handle multiple nesting
				myAlarm.cancelRequest(mySynchronizeRequest);
				myAlarm.addRequest(mySynchronizeRequest, 500, ModalityState.stateForComponent(GuiEditor.this));
			}
		}
	}
}
 
开发者ID:consulo,项目名称:consulo-ui-designer,代码行数:26,代码来源:GuiEditor.java


示例5: propertyChanged

import com.intellij.psi.PsiTreeChangeEvent; //导入依赖的package包/类
/**
 * Handle when callers of FileManagerImpl.invalidateAllPsi() send this event.
 * Basically we need to listen to property change events here that are not file
 * oriented, but instead are PSI-oriented, and that pretty much rip out all psi
 * from underneath this cache.
 */
@Override
public void propertyChanged( @NotNull PsiTreeChangeEvent event )
{
  PsiFile file = event.getFile();
  String propertyName = event.getPropertyName();
  if( file == null &&
      (propertyName == null
       || propertyName.equals( PsiTreeChangeEvent.PROP_FILE_TYPES )
       || propertyName.equals( PsiTreeChangeEvent.PROP_ROOTS )) )
  {
    refreshed();
  }
}
 
开发者ID:manifold-systems,项目名称:manifold-ij,代码行数:20,代码来源:ManifoldPsiClassCache.java


示例6: PropertiesAnchorizer

import com.intellij.psi.PsiTreeChangeEvent; //导入依赖的package包/类
public PropertiesAnchorizer(Project project) {
  PsiManager.getInstance(project).addPsiTreeChangeListener(new PsiTreeChangeAdapter() {
    @Override
    public void childRemoved(@NotNull PsiTreeChangeEvent event) {
      final PsiElement removed = event.getChild();
      if (removed instanceof IProperty) {
        myAnchors.remove(removed);
      }
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:PropertiesAnchorizer.java


示例7: testEditingInDocComment

import com.intellij.psi.PsiTreeChangeEvent; //导入依赖的package包/类
public void testEditingInDocComment() throws  Exception {
  final Ref<Boolean> gotIt = new Ref<Boolean>(false);
  getPsiManager().addPsiTreeChangeListener(new PsiTreeChangeAdapter() {
    @Override
    public void childReplaced(@NotNull PsiTreeChangeEvent event) {
      gotIt.set(true);
    }
  });

  GroovyFile file = GroovyPsiElementFactory.getInstance(myProject).createGroovyFile("/** This is doc comment*/class C{}", true, null);
  final PsiDocumentManager docManager = PsiDocumentManager.getInstance(myProject);
  final Document doc = docManager.getDocument(file);
  assertNotNull(doc);
  CommandProcessor.getInstance().executeCommand(myProject,
    new Runnable() {
      @Override
      public void run() {
        ApplicationManager.getApplication().runWriteAction(new Runnable() {
          @Override
          public void run() {
            doc.insertString(3, " ");
            docManager.commitDocument(doc);
          }
        });
      }
    },
    "file text set",
    this
  );


  assertTrue(gotIt.get());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:34,代码来源:PsiEventsTest.java


示例8: propertyChanged

import com.intellij.psi.PsiTreeChangeEvent; //导入依赖的package包/类
@Override
public void propertyChanged(@NotNull final PsiTreeChangeEvent event)
{
	if(PsiTreeChangeEvent.PROP_ROOTS.equals(event.getPropertyName()))
	{
		myAlarm.cancelRequest(myRefreshPropertiesRequest);
		myAlarm.addRequest(myRefreshPropertiesRequest, 500, ModalityState.stateForComponent(GuiEditor.this));
	}
}
 
开发者ID:consulo,项目名称:consulo-ui-designer,代码行数:10,代码来源:GuiEditor.java


示例9: maybeInvalidate

import com.intellij.psi.PsiTreeChangeEvent; //导入依赖的package包/类
private void maybeInvalidate(PsiTreeChangeEvent event) {
  PsiFile file = event.getFile();
  if (file == null) {
    return;
  }

  VirtualFile virtualFile = file.getVirtualFile();
  synchronized (filesToScan) {
    filesToScan.add(virtualFile);
  }
}
 
开发者ID:square,项目名称:otto-intellij-plugin,代码行数:12,代码来源:OttoProjectHandler.java


示例10: beforeChildAddition

import com.intellij.psi.PsiTreeChangeEvent; //导入依赖的package包/类
@Override
public void beforeChildAddition(@NotNull final PsiTreeChangeEvent psiTreeChangeEvent) {
    //this.highlightHeader(psiTreeChangeEvent);
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:5,代码来源:ImpexHeaderHighlighterComponent.java


示例11: beforeChildRemoval

import com.intellij.psi.PsiTreeChangeEvent; //导入依赖的package包/类
@Override
public void beforeChildRemoval(@NotNull final PsiTreeChangeEvent psiTreeChangeEvent) {
    //this.highlightHeader(psiTreeChangeEvent);
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:5,代码来源:ImpexHeaderHighlighterComponent.java


示例12: beforeChildReplacement

import com.intellij.psi.PsiTreeChangeEvent; //导入依赖的package包/类
@Override
public void beforeChildReplacement(@NotNull final PsiTreeChangeEvent psiTreeChangeEvent) {
    //this.highlightHeader(psiTreeChangeEvent);
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:5,代码来源:ImpexHeaderHighlighterComponent.java


示例13: beforeChildMovement

import com.intellij.psi.PsiTreeChangeEvent; //导入依赖的package包/类
@Override
public void beforeChildMovement(@NotNull final PsiTreeChangeEvent psiTreeChangeEvent) {
    //this.highlightHeader(psiTreeChangeEvent);
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:5,代码来源:ImpexHeaderHighlighterComponent.java


示例14: beforeChildrenChange

import com.intellij.psi.PsiTreeChangeEvent; //导入依赖的package包/类
@Override
public void beforeChildrenChange(@NotNull final PsiTreeChangeEvent psiTreeChangeEvent) {
    //this.highlightHeader(psiTreeChangeEvent);
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:5,代码来源:ImpexHeaderHighlighterComponent.java


示例15: beforePropertyChange

import com.intellij.psi.PsiTreeChangeEvent; //导入依赖的package包/类
@Override
public void beforePropertyChange(@NotNull final PsiTreeChangeEvent psiTreeChangeEvent) {
    //this.highlightHeader(psiTreeChangeEvent);
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:5,代码来源:ImpexHeaderHighlighterComponent.java


示例16: childAdded

import com.intellij.psi.PsiTreeChangeEvent; //导入依赖的package包/类
@Override
public void childAdded(@NotNull final PsiTreeChangeEvent psiTreeChangeEvent) {
    this.highlightHeader(psiTreeChangeEvent);
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:5,代码来源:ImpexHeaderHighlighterComponent.java


示例17: childRemoved

import com.intellij.psi.PsiTreeChangeEvent; //导入依赖的package包/类
@Override
public void childRemoved(@NotNull final PsiTreeChangeEvent psiTreeChangeEvent) {
    this.highlightHeader(psiTreeChangeEvent);
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:5,代码来源:ImpexHeaderHighlighterComponent.java


示例18: childReplaced

import com.intellij.psi.PsiTreeChangeEvent; //导入依赖的package包/类
@Override
public void childReplaced(@NotNull final PsiTreeChangeEvent psiTreeChangeEvent) {
    this.highlightHeader(psiTreeChangeEvent);
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:5,代码来源:ImpexHeaderHighlighterComponent.java


示例19: childrenChanged

import com.intellij.psi.PsiTreeChangeEvent; //导入依赖的package包/类
@Override
        public void childrenChanged(@NotNull final PsiTreeChangeEvent psiTreeChangeEvent) {
//            this.highlightHeader(psiTreeChangeEvent);
        }
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:5,代码来源:ImpexHeaderHighlighterComponent.java


示例20: childMoved

import com.intellij.psi.PsiTreeChangeEvent; //导入依赖的package包/类
@Override
public void childMoved(@NotNull final PsiTreeChangeEvent psiTreeChangeEvent) {
    this.highlightHeader(psiTreeChangeEvent);
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:5,代码来源:ImpexHeaderHighlighterComponent.java



注:本文中的com.intellij.psi.PsiTreeChangeEvent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RenderWolf类代码示例发布时间:2022-05-22
下一篇:
Java ClientRequest类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap