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

Java FrameworkSupportInModuleConfigurable类代码示例

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

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



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

示例1: createConfigurable

import com.intellij.framework.addSupport.FrameworkSupportInModuleConfigurable; //导入依赖的package包/类
@Override
@NotNull
public FrameworkSupportInModuleConfigurable createConfigurable( @NotNull final FrameworkSupportModel model )
{
  return new RepositoryLibrarySupportInModuleConfigurable( model.getProject(), RepositoryLibraryDescription.findDescription( "systems.manifold", "manifold-all" ) )
         {
           @Override
           public void addSupport( @NotNull Module module, @NotNull ModifiableRootModel rootModel, @NotNull ModifiableModelsProvider modifiableModelsProvider )
           {
             super.addSupport( module, rootModel, modifiableModelsProvider );
             
             // also add tools.jar to the SDK if not already present
             ApplicationManager.getApplication().invokeLater( () -> ApplicationManager.getApplication().runWriteAction( () -> {
               ModifiableRootModel rootModel2 = ModuleRootManager.getInstance( module ).getModifiableModel();
               ManSupportProvider.addToolsJar( rootModel2 );
               rootModel2.commit();
             } ) );
           }
         };
}
 
开发者ID:manifold-systems,项目名称:manifold-ij,代码行数:21,代码来源:ManFrameworkSupportProvider.java


示例2: createConfigurable

import com.intellij.framework.addSupport.FrameworkSupportInModuleConfigurable; //导入依赖的package包/类
@NotNull
@Override
public FrameworkSupportInModuleConfigurable createConfigurable(@NotNull FrameworkSupportModel model) {
  return new FrameworkSupportInModuleConfigurable() {
    @Nullable
    @Override
    public JComponent createComponent() {
      return null;
    }

    @Override
    public void addSupport(@NotNull Module module,
                           @NotNull ModifiableRootModel rootModel,
                           @NotNull ModifiableModelsProvider modifiableModelsProvider) {
      final BuildScriptDataBuilder buildScriptData = getBuildScriptData(module);
      if (buildScriptData != null) {
        GradleFrameworkSupportProvider.this.addSupport(module, rootModel, modifiableModelsProvider, buildScriptData);
      }
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:GradleFrameworkSupportProvider.java


示例3: setupAppEngine

import com.intellij.framework.addSupport.FrameworkSupportInModuleConfigurable; //导入依赖的package包/类
private void setupAppEngine(AppEngineStandardLibraryPanel libraryPanel, Library library) {
  CloudSdkService sdkService = mock(CloudSdkService.class);
  when(sdkService.getLibraries()).thenReturn(new File[] {});

  MavenRepositoryLibraryDownloader libraryDownloader =
      mock(MavenRepositoryLibraryDownloader.class);
  when(libraryDownloader.downloadLibrary(
          any(Module.class), any(AppEngineStandardMavenLibrary.class)))
      .thenReturn(library);

  MutablePicoContainer applicationContainer =
      (MutablePicoContainer) ApplicationManager.getApplication().getPicoContainer();
  applicationContainer.unregisterComponent(CloudSdkService.class.getName());
  applicationContainer.registerComponentInstance(CloudSdkService.class.getName(), sdkService);
  applicationContainer.unregisterComponent(MavenRepositoryLibraryDownloader.class.getName());
  applicationContainer.registerComponentInstance(
      MavenRepositoryLibraryDownloader.class.getName(), libraryDownloader);

  FrameworkSupportInModuleConfigurable configurable =
      selectFramework(AppEngineStandardFrameworkType.ID);
  if (libraryPanel != null && configurable instanceof AppEngineSupportConfigurable) {
    ((AppEngineSupportConfigurable) configurable).setAppEngineStandardLibraryPanel(libraryPanel);
  }
  AppEngineStandardSupportProvider.setSdkPath(
      configurable, AppEngineCodeInsightTestCase.getSdkPath());
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:27,代码来源:AppEngineStandardSupportProviderTest.java


示例4: setUp

import com.intellij.framework.addSupport.FrameworkSupportInModuleConfigurable; //导入依赖的package包/类
@Override
protected void setUp() throws Exception {
  super.setUp();
  final Project project = getProject();
  myFrameworkSupportModel = new FrameworkSupportModelImpl(project, "", LibrariesContainerFactory.createContainer(project));
  myNodes = new LinkedHashMap<FrameworkType, FrameworkSupportNode>();
  final List<FrameworkSupportInModuleProvider> providers = FrameworkSupportUtil.getAllProviders();
  Collections.sort(providers, FrameworkSupportUtil.getFrameworkSupportProvidersComparator(providers));
  for (FrameworkSupportInModuleProvider provider : providers) {
    final FrameworkSupportNode node = new FrameworkSupportNode(provider, null, myFrameworkSupportModel, getTestRootDisposable());
    myNodes.put(provider.getFrameworkType(), node);
    myFrameworkSupportModel.registerComponent(provider, node);
  }
  myConfigurables = new HashMap<FrameworkType, FrameworkSupportInModuleConfigurable>();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:FrameworkSupportProviderTestCase.java


示例5: selectFramework

import com.intellij.framework.addSupport.FrameworkSupportInModuleConfigurable; //导入依赖的package包/类
protected FrameworkSupportInModuleConfigurable selectFramework(@NotNull String id) {
  final FrameworkSupportInModuleProvider provider = FrameworkSupportUtil.findProvider(id, FrameworkSupportUtil.getAllProviders());
  if (provider != null) {
    return selectFramework(provider);
  }
  fail("Framework provider with id='" + id + "' not found");
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:FrameworkSupportProviderTestCase.java


示例6: getOrCreateConfigurable

import com.intellij.framework.addSupport.FrameworkSupportInModuleConfigurable; //导入依赖的package包/类
private FrameworkSupportInModuleConfigurable getOrCreateConfigurable(FrameworkSupportInModuleProvider provider) {
  FrameworkSupportInModuleConfigurable configurable = myConfigurables.get(provider.getFrameworkType());
  if (configurable == null) {
    configurable = provider.createConfigurable(myFrameworkSupportModel);
    myConfigurables.put(provider.getFrameworkType(), configurable);
  }
  return configurable;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:FrameworkSupportProviderTestCase.java


示例7: getConfigurable

import com.intellij.framework.addSupport.FrameworkSupportInModuleConfigurable; //导入依赖的package包/类
public synchronized FrameworkSupportInModuleConfigurable getConfigurable() {
  if (myConfigurable == null) {
    myConfigurable = getUserObject().createConfigurable(myModel);
    Disposer.register(myParentDisposable, myConfigurable);
  }
  return myConfigurable;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:FrameworkSupportNode.java


示例8: getModuleConfigurable

import com.intellij.framework.addSupport.FrameworkSupportInModuleConfigurable; //导入依赖的package包/类
@NotNull
@Override
public FrameworkSupportInModuleConfigurable getModuleConfigurable(Module module) {
  Project project = module.getProject();
  String contentRootPath = "";
  VirtualFile[] roots = ModuleRootManager.getInstance(module).getContentRoots();
  if (roots.length > 0) {
    contentRootPath = roots[0].getPath();
  }

  FrameworkSupportModelImpl model =
      new FrameworkSupportModelImpl(
          project, contentRootPath, LibrariesContainerFactory.createContainer(project));
  return provider.createConfigurable(model);
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:16,代码来源:AddAppEngineStandardFrameworkSupportToolsMenuAction.java


示例9: AddAppEngineFrameworkSupportDialog

import com.intellij.framework.addSupport.FrameworkSupportInModuleConfigurable; //导入依赖的package包/类
public AddAppEngineFrameworkSupportDialog(
    @NotNull String title,
    @NotNull Project project,
    @NotNull Module module,
    @NotNull FrameworkSupportInModuleConfigurable configurable) {
  super(project);
  setTitle(title);
  this.module = module;
  moduleConfigurable = configurable;
  init();
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:12,代码来源:AddAppEngineFrameworkSupportDialog.java


示例10: setUp

import com.intellij.framework.addSupport.FrameworkSupportInModuleConfigurable; //导入依赖的package包/类
@Override
protected void setUp() throws Exception {
  super.setUp();
  final Project project = getProject();
  myFrameworkSupportModel = new FrameworkSupportModelImpl(project, "", LibrariesContainerFactory.createContainer(project));
  myNodes = new HashMap<FrameworkType, FrameworkSupportNode>();
  final List<FrameworkSupportInModuleProvider> providers = FrameworkSupportUtil.getAllProviders();
  Collections.sort(providers, FrameworkSupportUtil.getFrameworkSupportProvidersComparator(providers));
  for (FrameworkSupportInModuleProvider provider : providers) {
    final FrameworkSupportNode node = new FrameworkSupportNode(provider, null, myFrameworkSupportModel, getTestRootDisposable());
    myNodes.put(provider.getFrameworkType(), node);
    myFrameworkSupportModel.registerComponent(provider, node);
  }
  myConfigurables = new HashMap<FrameworkType, FrameworkSupportInModuleConfigurable>();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:16,代码来源:FrameworkSupportProviderTestCase.java


示例11: getConfigurable

import com.intellij.framework.addSupport.FrameworkSupportInModuleConfigurable; //导入依赖的package包/类
public synchronized FrameworkSupportInModuleConfigurable getConfigurable() {
  if (myConfigurable == null) {
    myConfigurable = myProvider.createConfigurable(myModel);
    Disposer.register(myParentDisposable, myConfigurable);
  }
  return myConfigurable;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:8,代码来源:FrameworkSupportNode.java


示例12: AddSupportForFrameworksPanel

import com.intellij.framework.addSupport.FrameworkSupportInModuleConfigurable; //导入依赖的package包/类
public AddSupportForFrameworksPanel(final List<FrameworkSupportInModuleProvider> providers, final FrameworkSupportModelBase model) {
  myModel = model;
  myLibrariesContainer = model.getLibrariesContainer();
  myProviders = providers;
  createNodes();

  final Splitter splitter = new Splitter(false, 0.30f, 0.1f, 0.7f);
  myFrameworksTree = new FrameworksTree(myRoots) {
    @Override
    protected void onNodeStateChanged(CheckedTreeNode node) {
      if (!(node instanceof FrameworkSupportNode)) return;

      final FrameworkSupportNode frameworkSupportNode = (FrameworkSupportNode)node;
      if (frameworkSupportNode == getSelectedNode()) {
        updateOptionsPanel();
      }
      final FrameworkSupportInModuleConfigurable configurable = frameworkSupportNode.getConfigurable();
      configurable.onFrameworkSelectionChanged(node.isChecked());
      myModel.onFrameworkSelectionChanged(frameworkSupportNode);
      onFrameworkStateChanged();
    }
  };
  myFrameworksTree.addTreeSelectionListener(new TreeSelectionListener() {
    public void valueChanged(TreeSelectionEvent e) {
      onSelectionChanged();
    }
  });

  splitter.setFirstComponent(ScrollPaneFactory.createScrollPane(myFrameworksTree));
  myOptionsPanel = new JPanel(new CardLayout());
  myOptionsPanel.add(EMPTY_CARD, new JPanel());

  splitter.setSecondComponent(myOptionsPanel);
  myFrameworksPanel.add(splitter, BorderLayout.CENTER);

  myFrameworksTree.setSelectionRow(0);    
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:38,代码来源:AddSupportForFrameworksPanel.java


示例13: createConfigurable

import com.intellij.framework.addSupport.FrameworkSupportInModuleConfigurable; //导入依赖的package包/类
@NotNull
@Override
public FrameworkSupportInModuleConfigurable createConfigurable(@NotNull FrameworkSupportModel model) {
    return new GravModuleConfigurable();
}
 
开发者ID:PioBeat,项目名称:GravSupport,代码行数:6,代码来源:GravModuleProvider.java


示例14: createConfigurable

import com.intellij.framework.addSupport.FrameworkSupportInModuleConfigurable; //导入依赖的package包/类
@NotNull
@Override
public FrameworkSupportInModuleConfigurable createConfigurable(@NotNull FrameworkSupportModel frameworkSupportModel)
{
    return new MuleFrameworkConfigurable();
}
 
开发者ID:machaval,项目名称:mule-intellij-plugins,代码行数:7,代码来源:MuleFrameworkSupportProvider.java


示例15: FrameworkSupportOptionsComponent

import com.intellij.framework.addSupport.FrameworkSupportInModuleConfigurable; //导入依赖的package包/类
public FrameworkSupportOptionsComponent(FrameworkSupportModelBase model,
                                        LibrariesContainer container,
                                        Disposable parentDisposable,
                                        final FrameworkSupportInModuleProvider provider,
                                        final FrameworkSupportInModuleConfigurable configurable) {
  myModel = model;
  myConfigurable = configurable;
  VerticalFlowLayout layout = new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 3, true, false);
  layout.setVerticalFill(true);
  myMainPanel = new JPanel(layout);
  myModel.registerOptionsComponent(provider, this);
  List<FrameworkVersion> versions = provider.getFrameworkType().getVersions();
  if (!versions.isEmpty()) {
    myFrameworkVersionComponent = new FrameworkVersionComponent(model, provider.getFrameworkType().getId(), versions, "Versions:");
    myMainPanel.add(myFrameworkVersionComponent.getMainPanel());
  }
  else {
    myFrameworkVersionComponent = null;
  }

  final JComponent component = myConfigurable.createComponent();
  if (component != null) {
    myMainPanel.add(component);
  }

  final boolean addSeparator = component != null || myFrameworkVersionComponent != null;
  myLibraryOptionsPanelWrapper = new JPanel(new BorderLayout());
  myMainPanel.add(myLibraryOptionsPanelWrapper);
  if (myConfigurable instanceof OldFrameworkSupportProviderWrapper.FrameworkSupportConfigurableWrapper) {
    ((OldFrameworkSupportProviderWrapper.FrameworkSupportConfigurableWrapper)myConfigurable).getConfigurable().addListener(
      new FrameworkSupportConfigurableListener() {
        public void frameworkVersionChanged() {
          updateLibrariesPanel();
        }
      });
  }
  model.addFrameworkListener(new FrameworkSupportModelAdapter() {
    @Override
    public void wizardStepUpdated() {
      updateLibrariesPanel();
    }
  }, parentDisposable);

  final CustomLibraryDescription description = myConfigurable.createLibraryDescription();
  if (description != null) {
    myLibraryOptionsPanel = new LibraryOptionsPanel(description, new NotNullComputable<String>() {
      @NotNull
      @Override
      public String compute() {
        return myModel.getBaseDirectoryForLibrariesPath();
      }
    }, createLibraryVersionFilter(), container, !myConfigurable.isOnlyLibraryAdded()) {
      @Override
      protected void onVersionChanged(@Nullable String version) {
        if (myFrameworkVersionComponent == null) {
          myModel.setSelectedLibraryVersion(provider.getId(), version);
        }
      }
    };
    myLibraryOptionsPanel.setLibraryProvider(myModel.getLibraryProvider());
    Disposer.register(myConfigurable, myLibraryOptionsPanel);
    if (addSeparator) {
      JComponent separator1 = SeparatorFactory.createSeparator("Libraries", null);
      separator1.setBorder(IdeBorderFactory.createEmptyBorder(5, 0, 5, 5));
      myLibraryOptionsPanelWrapper.add(BorderLayout.NORTH, separator1);
    }
    myLibraryOptionsPanelWrapper.add(BorderLayout.CENTER, myLibraryOptionsPanel.getMainPanel());
    myLibraryOptionsPanelWrapper.setVisible(myConfigurable.isVisible());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:71,代码来源:FrameworkSupportOptionsComponent.java


示例16: AddSupportForFrameworksPanel

import com.intellij.framework.addSupport.FrameworkSupportInModuleConfigurable; //导入依赖的package包/类
public AddSupportForFrameworksPanel(final List<FrameworkSupportInModuleProvider> providers,
                                    final FrameworkSupportModelBase model, boolean vertical, @Nullable JPanel associatedFrameworksPanel) {
  myModel = model;
  myAssociatedFrameworksPanel = associatedFrameworksPanel;
  myLibrariesContainer = model.getLibrariesContainer();

  myLabel.setVisible(!vertical);
  Splitter splitter = vertical ? new Splitter(true, 0.6f, 0.2f, 0.8f) : new Splitter(false, 0.3f, 0.3f, 0.7f);
  splitter.setHonorComponentsMinimumSize(false);
  myFrameworksTree = new FrameworksTree(model) {
    @Override
    protected void onNodeStateChanged(CheckedTreeNode node) {
      if (!(node instanceof FrameworkSupportNode)) return;

      final FrameworkSupportNode frameworkSupportNode = (FrameworkSupportNode)node;
      if (frameworkSupportNode == getSelectedNode()) {
        updateOptionsPanel();
      }
      final FrameworkSupportInModuleConfigurable configurable = frameworkSupportNode.getConfigurable();
      configurable.onFrameworkSelectionChanged(node.isChecked());
      myModel.onFrameworkSelectionChanged(frameworkSupportNode);
      onFrameworkStateChanged();
    }
  };
  model.addFrameworkVersionListener(new FrameworkVersionListener() {
    @Override
    public void versionChanged(FrameworkVersion version) {
      ((DefaultTreeModel)myFrameworksTree.getModel()).nodeChanged(getSelectedNode());
    }
  }, this);

  myFrameworksTree.addTreeSelectionListener(new TreeSelectionListener() {
    public void valueChanged(TreeSelectionEvent e) {
      onSelectionChanged();
    }
  });

  JPanel treePanel = new JPanel(new BorderLayout());
  treePanel.add(ScrollPaneFactory.createScrollPane(myFrameworksTree), BorderLayout.CENTER);
  treePanel.setMinimumSize(JBUI.size(200, 300));

  splitter.setFirstComponent(treePanel);
  myOptionsPanel = new JPanel(new CardLayout());
  JPanel emptyCard = new JPanel();
  emptyCard.setPreferredSize(JBUI.size(400, 100));
  myOptionsPanel.add(EMPTY_CARD, emptyCard);

  splitter.setSecondComponent(myOptionsPanel);
  myFrameworksPanel.add(splitter, BorderLayout.CENTER);

  setProviders(providers);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:53,代码来源:AddSupportForFrameworksPanel.java


示例17: createConfigurable

import com.intellij.framework.addSupport.FrameworkSupportInModuleConfigurable; //导入依赖的package包/类
@NotNull
@Override
public FrameworkSupportInModuleConfigurable createConfigurable(@NotNull FrameworkSupportModel model) {
  final FrameworkSupportConfigurable configurable = myProvider.createConfigurable(model);
  return new FrameworkSupportConfigurableWrapper(configurable);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:OldFrameworkSupportProviderWrapper.java


示例18: createConfigurable

import com.intellij.framework.addSupport.FrameworkSupportInModuleConfigurable; //导入依赖的package包/类
@NotNull
@Override
public FrameworkSupportInModuleConfigurable createConfigurable(@NotNull final FrameworkSupportModel model) {
  return new LibrarySupportConfigurable();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:LibraryBasedFrameworkSupportProvider.java


示例19: createConfigurable

import com.intellij.framework.addSupport.FrameworkSupportInModuleConfigurable; //导入依赖的package包/类
@NotNull
@Override
public FrameworkSupportInModuleConfigurable createConfigurable(@NotNull FrameworkSupportModel model) {
  return new AppEngineSupportConfigurable(model);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:AppEngineSupportProvider.java


示例20: setSdkPath

import com.intellij.framework.addSupport.FrameworkSupportInModuleConfigurable; //导入依赖的package包/类
@TestOnly
public static void setSdkPath(FrameworkSupportInModuleConfigurable configurable, String path) {
  ((AppEngineSupportConfigurable)configurable).mySdkEditor.setPath(path);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:AppEngineSupportProvider.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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