• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ArtifactPropertiesProvider类的典型用法和代码示例

java 1次浏览

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

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

示例1: ArtifactPropertiesEditors

点赞 3

import com.intellij.packaging.artifacts.ArtifactPropertiesProvider; //导入依赖的package包/类
public ArtifactPropertiesEditors(ArtifactEditorContext context, Artifact originalArtifact, Artifact artifact) {
  myContext = context;
  myOriginalArtifact = originalArtifact;
  myMainPanels = new HashMap<String, JPanel>();
  myEditors = new ArrayList<PropertiesEditorInfo>();
  for (ArtifactPropertiesProvider provider : artifact.getPropertiesProviders()) {
    final PropertiesEditorInfo editorInfo = new PropertiesEditorInfo(provider);
    myEditors.add(editorInfo);
    final String tabName = editorInfo.myEditor.getTabName();
    JPanel panel = myMainPanels.get(tabName);
    if (panel == null) {
      panel = new JPanel(new VerticalFlowLayout());
      myMainPanels.put(tabName, panel);
    }
    panel.add(editorInfo.myEditor.createComponent());
  }
}
 

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

示例2: PropertiesEditorInfo

点赞 2

import com.intellij.packaging.artifacts.ArtifactPropertiesProvider; //导入依赖的package包/类
private PropertiesEditorInfo(ArtifactPropertiesProvider provider) {
  myProvider = provider;
  myProperties = provider.createProperties(myOriginalArtifact.getArtifactType());
  final ArtifactProperties<?> originalProperties = myOriginalArtifact.getProperties(provider);
  if (originalProperties != null) {
    ArtifactUtil.copyProperties(originalProperties, myProperties);
  }
  myEditor = myProperties.createEditor(myContext);
  myEditor.reset();
}
 

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

示例3: generateTasksForArtifact

点赞 2

import com.intellij.packaging.artifacts.ArtifactPropertiesProvider; //导入依赖的package包/类
@Override
public void generateTasksForArtifact(Artifact artifact, boolean preprocessing, ArtifactAntGenerationContext context,
                                     CompositeGenerator generator) {
  final ArtifactPropertiesProvider provider;
  if (preprocessing) {
    provider = AntArtifactPreProcessingPropertiesProvider.getInstance();
  }
  else {
    provider = AntArtifactPostprocessingPropertiesProvider.getInstance();
  }
  final AntArtifactProperties properties = (AntArtifactProperties)artifact.getProperties(provider);
  if (properties != null && properties.isEnabled()) {
    final String path = VfsUtil.urlToPath(properties.getFileUrl());
    String fileName = PathUtil.getFileName(path);
    String dirPath = PathUtil.getParentPath(path);
    final String relativePath = GenerationUtils.toRelativePath(dirPath, BuildProperties.getProjectBaseDir(context.getProject()),
                                                               BuildProperties.getProjectBaseDirProperty(), context.getGenerationOptions());
    final Tag ant = new Tag("ant", Pair.create("antfile", fileName), Pair.create("target", properties.getTargetName()),
                                   Pair.create("dir", relativePath));
    final String outputPath = BuildProperties.propertyRef(context.getArtifactOutputProperty(artifact));
    ant.add(new Property(JpsAntArtifactExtensionImpl.ARTIFACT_OUTPUT_PATH_PROPERTY, outputPath));
    for (BuildFileProperty property : properties.getUserProperties()) {
      ant.add(new Property(property.getPropertyName(), property.getPropertyValue()));
    }
    generator.add(ant);
  }
}
 

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

示例4: onBuildStartedOrFinished

点赞 2

import com.intellij.packaging.artifacts.ArtifactPropertiesProvider; //导入依赖的package包/类
private void onBuildStartedOrFinished(@NotNull Artifact artifact, final boolean finished) throws Exception {
  for (ArtifactPropertiesProvider provider : artifact.getPropertiesProviders()) {
    final ArtifactProperties<?> properties = artifact.getProperties(provider);
    if (finished) {
      properties.onBuildFinished(artifact, myContext);
    }
    else {
      properties.onBuildStarted(artifact, myContext);
    }
  }
}
 

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

示例5: onBuildStartedOrFinished

点赞 2

import com.intellij.packaging.artifacts.ArtifactPropertiesProvider; //导入依赖的package包/类
private void onBuildStartedOrFinished(@Nonnull Artifact artifact, final boolean finished) throws Exception {
  for (ArtifactPropertiesProvider provider : artifact.getPropertiesProviders()) {
    final ArtifactProperties<?> properties = artifact.getProperties(provider);
    if (finished) {
      properties.onBuildFinished(artifact, myContext);
    }
    else {
      properties.onBuildStarted(artifact, myContext);
    }
  }
}
 

开发者ID:consulo,
项目名称:consulo,
代码行数:12,
代码来源:ArtifactsCompilerInstance.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)