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


Java EventDispatcher.create方法代码示例

本文整理汇总了Java中com.intellij.util.EventDispatcher.create方法的典型用法代码示例。如果您正苦于以下问题:Java EventDispatcher.create方法的具体用法?Java EventDispatcher.create怎么用?Java EventDispatcher.create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.util.EventDispatcher的用法示例。


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

示例1: XBreakpointManagerImpl

import com.intellij.util.EventDispatcher; //导入方法依赖的package包/类
public XBreakpointManagerImpl(final Project project, final XDebuggerManagerImpl debuggerManager, StartupManager startupManager) {
  myProject = project;
  myDebuggerManager = debuggerManager;
  myAllBreakpointsDispatcher = EventDispatcher.create(XBreakpointListener.class);
  myDependentBreakpointManager = new XDependentBreakpointManager(this);
  myLineBreakpointManager = new XLineBreakpointManager(project, myDependentBreakpointManager, startupManager);
  if (!project.isDefault()) {
    if (!ApplicationManager.getApplication().isUnitTestMode()) {
      HttpVirtualFileListener httpVirtualFileListener = new HttpVirtualFileListener() {
        @Override
        public void fileDownloaded(@NotNull final VirtualFile file) {
          updateBreakpointInFile(file);
        }
      };
      HttpFileSystem.getInstance().addFileListener(httpVirtualFileListener, project);
    }
    for (XBreakpointType<?, ?> type : XBreakpointUtil.getBreakpointTypes()) {
      addDefaultBreakpoint(type);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:XBreakpointManagerImpl.java

示例2: XDependentBreakpointManager

import com.intellij.util.EventDispatcher; //导入方法依赖的package包/类
public XDependentBreakpointManager(final XBreakpointManagerImpl breakpointManager) {
  myBreakpointManager = breakpointManager;
  myDispatcher = EventDispatcher.create(XDependentBreakpointListener.class);
  myBreakpointManager.addBreakpointListener(new XBreakpointAdapter<XBreakpoint<?>>() {
    public void breakpointRemoved(@NotNull final XBreakpoint<?> breakpoint) {
      XDependentBreakpointInfo info = mySlave2Info.remove(breakpoint);
      if (info != null) {
        myMaster2Info.remove(info.myMasterBreakpoint, info);
      }

      Collection<XDependentBreakpointInfo> infos = myMaster2Info.removeAll((XBreakpointBase)breakpoint);
      if (infos != null) {
        for (XDependentBreakpointInfo breakpointInfo : infos) {
          XDependentBreakpointInfo removed = mySlave2Info.remove(breakpointInfo.mySlaveBreakpoint);
          if (removed != null) {
            myDispatcher.getMulticaster().dependencyCleared(breakpointInfo.mySlaveBreakpoint);
          }
        }
      }
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:XDependentBreakpointManager.java

示例3: XBreakpointManagerImpl

import com.intellij.util.EventDispatcher; //导入方法依赖的package包/类
public XBreakpointManagerImpl(final Project project, final XDebuggerManagerImpl debuggerManager, StartupManager startupManager) {
  myProject = project;
  myDebuggerManager = debuggerManager;
  myAllBreakpointsDispatcher = EventDispatcher.create(XBreakpointListener.class);
  myDependentBreakpointManager = new XDependentBreakpointManager(this);
  myLineBreakpointManager = new XLineBreakpointManager(project, myDependentBreakpointManager, startupManager);
  if (!project.isDefault() && !ApplicationManager.getApplication().isUnitTestMode()) {
    HttpVirtualFileListener httpVirtualFileListener = new HttpVirtualFileListener() {
      @Override
      public void fileDownloaded(@NotNull final VirtualFile file) {
        updateBreakpointInFile(file);
      }
    };
    HttpFileSystem.getInstance().addFileListener(httpVirtualFileListener, project);
    for (XBreakpointType<?, ?> type : XBreakpointUtil.getBreakpointTypes()) {
      addDefaultBreakpoint(type);
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:20,代码来源:XBreakpointManagerImpl.java

示例4: XBreakpointManagerImpl

import com.intellij.util.EventDispatcher; //导入方法依赖的package包/类
public XBreakpointManagerImpl(final Project project, final XDebuggerManagerImpl debuggerManager, StartupManager startupManager) {
  myProject = project;
  myDebuggerManager = debuggerManager;
  myAllBreakpointsDispatcher = EventDispatcher.create(XBreakpointListener.class);
  myDependentBreakpointManager = new XDependentBreakpointManager(this);
  myLineBreakpointManager = new XLineBreakpointManager(project, myDependentBreakpointManager, startupManager);
  if (!project.isDefault()) {
    if (!ApplicationManager.getApplication().isUnitTestMode()) {
      HttpVirtualFileListener httpVirtualFileListener = this::updateBreakpointInFile;
      HttpFileSystem.getInstance().addFileListener(httpVirtualFileListener, project);
    }
    for (XBreakpointType<?, ?> type : XBreakpointUtil.getBreakpointTypes()) {
      addDefaultBreakpoint(type);
    }
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:17,代码来源:XBreakpointManagerImpl.java

示例5: XDependentBreakpointManager

import com.intellij.util.EventDispatcher; //导入方法依赖的package包/类
public XDependentBreakpointManager(final XBreakpointManagerImpl breakpointManager) {
  myBreakpointManager = breakpointManager;
  myDispatcher = EventDispatcher.create(XDependentBreakpointListener.class);
  myBreakpointManager.addBreakpointListener(new XBreakpointAdapter<XBreakpoint<?>>() {
    public void breakpointRemoved(@Nonnull final XBreakpoint<?> breakpoint) {
      XDependentBreakpointInfo info = mySlave2Info.remove(breakpoint);
      if (info != null) {
        myMaster2Info.remove(info.myMasterBreakpoint, info);
      }

      Collection<XDependentBreakpointInfo> infos = myMaster2Info.removeAll((XBreakpointBase)breakpoint);
      if (infos != null) {
        for (XDependentBreakpointInfo breakpointInfo : infos) {
          XDependentBreakpointInfo removed = mySlave2Info.remove(breakpointInfo.mySlaveBreakpoint);
          if (removed != null) {
            myDispatcher.getMulticaster().dependencyCleared(breakpointInfo.mySlaveBreakpoint);
          }
        }
      }
    }
  });
}
 
开发者ID:consulo,项目名称:consulo,代码行数:23,代码来源:XDependentBreakpointManager.java

示例6: getPublisher

import com.intellij.util.EventDispatcher; //导入方法依赖的package包/类
@NotNull
@Override
public <T extends EventListener> T getPublisher(Class<T> listenerClass) {
  EventDispatcher<?> dispatcher = myDispatchers.get(listenerClass);
  if (dispatcher == null) {
    dispatcher = EventDispatcher.create(listenerClass);
    myDispatchers.put(listenerClass, dispatcher);
  }
  //noinspection unchecked
  return (T)dispatcher.getMulticaster();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:JpsEventDispatcherBase.java

示例7: CheckboxTreeTable

import com.intellij.util.EventDispatcher; //导入方法依赖的package包/类
public CheckboxTreeTable(CheckedTreeNode root, CheckboxTree.CheckboxTreeCellRenderer renderer, final ColumnInfo[] columns) {
  super(new ListTreeTableModelOnColumns(root, columns));
  final TreeTableTree tree = getTree();
  myEventDispatcher = EventDispatcher.create(CheckboxTreeListener.class);
  CheckboxTreeHelper helper = new CheckboxTreeHelper(CheckboxTreeHelper.DEFAULT_POLICY, myEventDispatcher);
  helper.initTree(tree, this, renderer);
  tree.setSelectionRow(0);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:CheckboxTreeTable.java

示例8: getOrCreateDispatcher

import com.intellij.util.EventDispatcher; //导入方法依赖的package包/类
private <T extends XBreakpointProperties> EventDispatcher<XBreakpointListener> getOrCreateDispatcher(final XBreakpointType<?,T> type) {
  EventDispatcher<XBreakpointListener> dispatcher = myDispatchers.get(type);
  if (dispatcher == null) {
    dispatcher = EventDispatcher.create(XBreakpointListener.class);
    myDispatchers.put(type, dispatcher);
  }
  return dispatcher;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:XBreakpointManagerImpl.java

示例9: registerListener

import com.intellij.util.EventDispatcher; //导入方法依赖的package包/类
@Override
public <F extends Facet> void registerListener(@NotNull FacetTypeId<F> typeId, @NotNull ProjectWideFacetListener<? extends F> listener) {
  EventDispatcher<ProjectWideFacetListener> dispatcher = myDispatchers.get(typeId);
  if (dispatcher == null) {
    dispatcher = EventDispatcher.create(ProjectWideFacetListener.class);
    myDispatchers.put(typeId, dispatcher);
  }
  dispatcher.addListener(listener);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:ProjectWideFacetListenersRegistryImpl.java

示例10: addListener

import com.intellij.util.EventDispatcher; //导入方法依赖的package包/类
@Override
public <F extends Facet> void addListener(final Class<F> facetClass, final FacetPointerListener<F> listener) {
  EventDispatcher<FacetPointerListener> dispatcher = myDispatchers.get(facetClass);
  if (dispatcher == null) {
    dispatcher = EventDispatcher.create(FacetPointerListener.class);
    myDispatchers.put(facetClass, dispatcher);
  }
  dispatcher.addListener(listener);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:FacetPointersManagerImpl.java

示例11: getOrCreateDispatcher

import com.intellij.util.EventDispatcher; //导入方法依赖的package包/类
private <T extends XBreakpointProperties> EventDispatcher<XBreakpointListener> getOrCreateDispatcher(final XBreakpointType<?, T> type) {
  EventDispatcher<XBreakpointListener> dispatcher = myDispatchers.get(type);
  if (dispatcher == null) {
    dispatcher = EventDispatcher.create(XBreakpointListener.class);
    myDispatchers.put(type, dispatcher);
  }
  return dispatcher;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:9,代码来源:XBreakpointManagerImpl.java

示例12: ensureListenerCreated

import com.intellij.util.EventDispatcher; //导入方法依赖的package包/类
private void ensureListenerCreated() {
  if (myListener == null) {
    myListener = EventDispatcher.create(SvnAuthenticationListener.class);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:SvnAuthenticationManager.java

示例13: FossilLineCommand

import com.intellij.util.EventDispatcher; //导入方法依赖的package包/类
public FossilLineCommand(Project project, File workingDirectory, @NotNull FCommandName commandName) {
  super(project, workingDirectory, commandName);
  myLineListeners = EventDispatcher.create(LineProcessEventListener.class);
}
 
开发者ID:irengrig,项目名称:fossil4idea,代码行数:5,代码来源:FossilLineCommand.java

示例14: SvnLineCommand

import com.intellij.util.EventDispatcher; //导入方法依赖的package包/类
public SvnLineCommand(File workingDirectory, @NotNull SvnCommandName commandName, @NotNull @NonNls String exePath, File configDir) {
  super(workingDirectory, commandName, exePath, configDir);
  myLineListeners = EventDispatcher.create(LineProcessEventListener.class);
  myExitCode = new AtomicReference<Integer>();
  myErr = new StringBuffer();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:7,代码来源:SvnLineCommand.java


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