当前位置: 首页>>代码示例>>Java>>正文


Java ModelListener类代码示例

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


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

示例1: StructureTreeBuilder

import com.intellij.ide.structureView.ModelListener; //导入依赖的package包/类
public StructureTreeBuilder(Project project,
                            JTree tree,
                            DefaultTreeModel treeModel,
                            AbstractTreeStructure treeStructure,
                            StructureViewModel structureModel) {
  super(
    tree,
    treeModel,
    treeStructure, null, false
  );

  myProject = project;
  myStructureModel = structureModel;

  final ModelListener myModelListener = new ModelListener() {
    @Override
    public void onModelChanged() {
      addRootToUpdate();
    }
  };
  PsiManager.getInstance(myProject).addPsiTreeChangeListener(new MyPsiTreeChangeListener(), this);

  CopyPasteUtil.DefaultCopyPasteListener copyPasteListener = new CopyPasteUtil.DefaultCopyPasteListener(getUpdater());
  CopyPasteManager.getInstance().addContentChangedListener(copyPasteListener, this);
  initRootNode();
  myStructureModel.addModelListener(myModelListener);
  Disposer.register(this, new Disposable() {
    @Override
    public void dispose() {
      myStructureModel.removeModelListener(myModelListener);
    }
  });

  setCanYieldUpdate(!ApplicationManager.getApplication().isUnitTestMode());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:36,代码来源:StructureTreeBuilder.java

示例2: StructureTreeBuilder

import com.intellij.ide.structureView.ModelListener; //导入依赖的package包/类
public StructureTreeBuilder(Project project,
                            JTree tree,
                            DefaultTreeModel treeModel,
                            AbstractTreeStructure treeStructure,
                            StructureViewModel structureModel) {
  super(
    tree,
    treeModel,
    treeStructure, null, false
  );

  myProject = project;
  myStructureModel = structureModel;

  myPsiTreeChangeListener = new MyPsiTreeChangeListener();
  myModelListener = new ModelListener() {
    @Override
    public void onModelChanged() {
      addRootToUpdate();
    }
  };
  PsiManager.getInstance(myProject).addPsiTreeChangeListener(myPsiTreeChangeListener);

  myCopyPasteListener = new CopyPasteUtil.DefaultCopyPasteListener(getUpdater());
  CopyPasteManager.getInstance().addContentChangedListener(myCopyPasteListener);
  initRootNode();
  myStructureModel.addModelListener(myModelListener);

  setCanYieldUpdate(!ApplicationManager.getApplication().isUnitTestMode());
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:31,代码来源:StructureTreeBuilder.java

示例3: addModelListener

import com.intellij.ide.structureView.ModelListener; //导入依赖的package包/类
@Override
public void addModelListener(@NotNull final ModelListener modelListener) {
  myStructureViewModel.addModelListener(modelListener);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:StructureViewModelWrapper.java

示例4: removeModelListener

import com.intellij.ide.structureView.ModelListener; //导入依赖的package包/类
@Override
public void removeModelListener(@NotNull final ModelListener modelListener) {
  myStructureViewModel.removeModelListener(modelListener);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:StructureViewModelWrapper.java

示例5: addModelListener

import com.intellij.ide.structureView.ModelListener; //导入依赖的package包/类
@Override
public void addModelListener(@NotNull ModelListener modelListener) {
  myModel.addModelListener(modelListener);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:TreeModelWrapper.java

示例6: removeModelListener

import com.intellij.ide.structureView.ModelListener; //导入依赖的package包/类
@Override
public void removeModelListener(@NotNull ModelListener modelListener) {
  myModel.removeModelListener(modelListener);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:TreeModelWrapper.java

示例7: addModelListener

import com.intellij.ide.structureView.ModelListener; //导入依赖的package包/类
@Override
public void addModelListener(ModelListener modelListener) {
  myModel.addModelListener(modelListener);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:5,代码来源:TreeModelWrapper.java

示例8: removeModelListener

import com.intellij.ide.structureView.ModelListener; //导入依赖的package包/类
@Override
public void removeModelListener(ModelListener modelListener) {
  myModel.removeModelListener(modelListener);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:5,代码来源:TreeModelWrapper.java

示例9: addModelListener

import com.intellij.ide.structureView.ModelListener; //导入依赖的package包/类
@Override
public void addModelListener(final ModelListener modelListener) {
  myStructureViewModel.addModelListener(modelListener);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:5,代码来源:StructureViewModelWrapper.java

示例10: removeModelListener

import com.intellij.ide.structureView.ModelListener; //导入依赖的package包/类
@Override
public void removeModelListener(final ModelListener modelListener) {
  myStructureViewModel.removeModelListener(modelListener);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:5,代码来源:StructureViewModelWrapper.java

示例11: addModelListener

import com.intellij.ide.structureView.ModelListener; //导入依赖的package包/类
@Override
public void addModelListener(@NotNull ModelListener modelListener) {

}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:TestTreeModel.java

示例12: removeModelListener

import com.intellij.ide.structureView.ModelListener; //导入依赖的package包/类
@Override
public void removeModelListener(@NotNull ModelListener modelListener) {
  
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:TestTreeModel.java

示例13: addModelListener

import com.intellij.ide.structureView.ModelListener; //导入依赖的package包/类
public void addModelListener(@NotNull ModelListener modelListener) {

  }
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:ResourceBundleStructureViewModel.java

示例14: removeModelListener

import com.intellij.ide.structureView.ModelListener; //导入依赖的package包/类
public void removeModelListener(@NotNull ModelListener modelListener) {

  }
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:ResourceBundleStructureViewModel.java

示例15: addModelListener

import com.intellij.ide.structureView.ModelListener; //导入依赖的package包/类
@Override
public void addModelListener(ModelListener modelListener) {

}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:5,代码来源:TestTreeModel.java


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