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


Java LibraryEditorListener类代码示例

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


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

示例1: LibrariesModifiableModel

import com.intellij.openapi.roots.ui.configuration.libraryEditor.LibraryEditorListener; //导入依赖的package包/类
public LibrariesModifiableModel(final LibraryTable table, final Project project, LibraryEditorListener libraryEditorListener) {
  myProject = project;
  myTable = table;
  myLibraryEditorListener = libraryEditorListener;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:LibrariesModifiableModel.java

示例2: addLibraryEditorListener

import com.intellij.openapi.roots.ui.configuration.libraryEditor.LibraryEditorListener; //导入依赖的package包/类
public void addLibraryEditorListener(LibraryEditorListener listener) {
  myLibraryEditorListeners.addListener(listener);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:StructureConfigurableContext.java

示例3: init

import com.intellij.openapi.roots.ui.configuration.libraryEditor.LibraryEditorListener; //导入依赖的package包/类
public void init(StructureConfigurableContext context, ModuleStructureConfigurable moduleStructureConfigurable,
                 ProjectLibrariesConfigurable projectLibrariesConfig, GlobalLibrariesConfigurable globalLibrariesConfig) {
  super.init(context);
  myPackagingEditorContext = new ArtifactsStructureConfigurableContextImpl(myContext, myProject, myDefaultSettings, new ArtifactAdapter() {
    @Override
    public void artifactAdded(@NotNull Artifact artifact) {
      final MyNode node = addArtifactNode(artifact);
      selectNodeInTree(node);
      myContext.getDaemonAnalyzer().queueUpdate(myPackagingEditorContext.getOrCreateArtifactElement(artifact));
    }
  });

  context.getModulesConfigurator().addAllModuleChangeListener(new ModuleEditor.ChangeListener() {
    @Override
    public void moduleStateChanged(ModifiableRootModel moduleRootModel) {
      for (ProjectStructureElement element : getProjectStructureElements()) {
        myContext.getDaemonAnalyzer().queueUpdate(element);
      }
    }
  });

  final ItemsChangeListener listener = new ItemsChangeListener() {
    @Override
    public void itemChanged(@Nullable Object deletedItem) {
      if (deletedItem instanceof Library || deletedItem instanceof Module) {
        onElementDeleted();
      }
    }

    @Override
    public void itemsExternallyChanged() {
    }
  };
  moduleStructureConfigurable.addItemsChangeListener(listener);
  projectLibrariesConfig.addItemsChangeListener(listener);
  globalLibrariesConfig.addItemsChangeListener(listener);

  context.addLibraryEditorListener(new LibraryEditorListener() {
    @Override
    public void libraryRenamed(@NotNull Library library, String oldName, String newName) {
      final Artifact[] artifacts = myPackagingEditorContext.getArtifactModel().getArtifacts();
      for (Artifact artifact : artifacts) {
        updateLibraryElements(artifact, library, oldName, newName);
      }
    }

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

示例4: init

import com.intellij.openapi.roots.ui.configuration.libraryEditor.LibraryEditorListener; //导入依赖的package包/类
public void init(StructureConfigurableContext context, ModuleStructureConfigurable moduleStructureConfigurable,
                 ProjectLibrariesConfigurable projectLibrariesConfig) {
  super.init(context);
  myPackagingEditorContext = new ArtifactsStructureConfigurableContextImpl(myContext, myProject, myDefaultSettings, new ArtifactAdapter() {
    @Override
    public void artifactAdded(@Nonnull Artifact artifact) {
      final MyNode node = addArtifactNode(artifact);
      selectNodeInTree(node);
      myContext.getDaemonAnalyzer().queueUpdate(myPackagingEditorContext.getOrCreateArtifactElement(artifact));
    }
  });

  context.getModulesConfigurator().addAllModuleChangeListener(new ModuleEditor.ChangeListener() {
    @Override
    public void moduleStateChanged(ModifiableRootModel moduleRootModel) {
      for (ProjectStructureElement element : getProjectStructureElements()) {
        myContext.getDaemonAnalyzer().queueUpdate(element);
      }
    }
  });

  final ItemsChangeListener listener = new ItemsChangeListener() {
    @Override
    public void itemChanged(@Nullable Object deletedItem) {
      if (deletedItem instanceof Library || deletedItem instanceof Module) {
        onElementDeleted();
      }
    }

    @Override
    public void itemsExternallyChanged() {
    }
  };
  moduleStructureConfigurable.addItemsChangeListener(listener);
  projectLibrariesConfig.addItemsChangeListener(listener);

  context.addLibraryEditorListener(new LibraryEditorListener() {
    @Override
    public void libraryRenamed(@Nonnull Library library, String oldName, String newName) {
      final Artifact[] artifacts = myPackagingEditorContext.getArtifactModel().getArtifacts();
      for (Artifact artifact : artifacts) {
        updateLibraryElements(artifact, library, oldName, newName);
      }
    }

  });
}
 
开发者ID:consulo,项目名称:consulo,代码行数:48,代码来源:ArtifactsStructureConfigurable.java


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