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


Java AntInstallation类代码示例

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


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

示例1: getClassLoader

import com.intellij.lang.ant.config.impl.AntInstallation; //导入依赖的package包/类
@NotNull
public final ClassLoader getClassLoader() {
  ClassLoader loader = myClassLoader;
  if (loader == null) {
    final XmlTag tag = getXmlTag();
    final PsiFile containingFile = tag.getContainingFile();
    final AntBuildFileImpl buildFile = (AntBuildFileImpl)AntConfigurationBase.getInstance(containingFile.getProject()).getAntBuildFile(containingFile);
    if (buildFile != null) {
      loader = buildFile.getClassLoader();
    }
    else {
      AntInstallation antInstallation = getAntInstallation();
      loader = antInstallation.getClassLoader();
    }
    myClassLoader = loader;
  }
  return loader;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:AntDomProject.java

示例2: adjustName

import com.intellij.lang.ant.config.impl.AntInstallation; //导入依赖的package包/类
private void adjustName(final AntInstallation justCreated) {
  int nameIndex = 0;
  String adjustedName = justCreated.getName();
  final ListModel model = myParent.getList().getModel();
  
  int idx = 0;
  while (idx < model.getSize()) {
    final AntInstallation inst = (AntInstallation)model.getElementAt(idx++);
    if (adjustedName.equals(inst.getName())) {
      adjustedName = justCreated.getName() + " (" + (++nameIndex) + ")";
      idx = 0; // search from beginning
    }
  }
  
  if (!adjustedName.equals(justCreated.getName())) {
    justCreated.setName(adjustedName);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:AntSetPanel.java

示例3: saveAntInstallation

import com.intellij.lang.ant.config.impl.AntInstallation; //导入依赖的package包/类
private void saveAntInstallation(final AntInstallation antInstallation) {
    final GlobalAntConfiguration globalAntConfiguration = GlobalAntConfiguration.getInstance();
    if (globalAntConfiguration == null) {
        return;
    }
    globalAntConfiguration.removeConfiguration(globalAntConfiguration.getConfiguredAnts()
                                                                     .get(antInstallation.getReference()));
    globalAntConfiguration.addConfiguration(antInstallation);
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:10,代码来源:DefaultAntConfigurator.java

示例4: getAntInstallation

import com.intellij.lang.ant.config.impl.AntInstallation; //导入依赖的package包/类
public AntInstallation getAntInstallation() {
  final AntConfigurationBase configuration = AntConfigurationBase.getInstance(getXmlTag().getProject());
  AntInstallation antInstallation = null;
  if (configuration != null) {
    antInstallation = configuration.getProjectDefaultAnt();
  }
  if (antInstallation == null) {
    antInstallation = GlobalAntConfiguration.getInstance().getBundledAnt();
  }
  assert antInstallation != null;
  return antInstallation;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:AntDomProject.java

示例5: RunWithAntBinding

import com.intellij.lang.ant.config.impl.AntInstallation; //导入依赖的package包/类
RunWithAntBinding(JRadioButton useDefaultAnt, JRadioButton useCustomAnt, ComboboxWithBrowseButton ants, final GlobalAntConfiguration antConfiguration) {
  myAntConfiguration = antConfiguration;
  myComponents.add(useDefaultAnt);
  myUseCustomAnt = useCustomAnt;
  myComponents.add(myUseCustomAnt);
  myAnts = ants;
  myUseDefaultAnt = useDefaultAnt;
  ButtonGroup group = new ButtonGroup();
  group.add(useDefaultAnt);
  group.add(myUseCustomAnt);

  myUseCustomAnt.addItemListener(new ItemListener() {
    public void itemStateChanged(ItemEvent e) {
      updateEnableCombobox();
      if (myUseCustomAnt.isSelected() && !myLoadingValues)
        myAnts.getComboBox().requestFocusInWindow();
    }
  });

  myAntsController = new ChooseAndEditComboBoxController<AntReference, AntReference>(myAnts, new ConvertingIterator.IdConvertor<AntReference>(), AntReference.COMPARATOR) {
    public Iterator<AntReference> getAllListItems() {
      return antConfiguration.getConfiguredAnts().keySet().iterator();
    }

    public AntReference openConfigureDialog(AntReference reference, JComponent parent) {
      AntSetPanel antSetPanel = new AntSetPanel();
      AntInstallation installation = myAntConfiguration.getConfiguredAnts().get(reference);
      if (installation == null) installation = myAntConfiguration.getConfiguredAnts().get(AntReference.BUNDLED_ANT);
      antSetPanel.reset();
      antSetPanel.setSelection(installation);
      AntInstallation antInstallation = antSetPanel.showDialog(parent);
      return antInstallation != null ? antInstallation.getReference() : null;
    }
  };
  myAntsController.setRenderer(new AntUIUtil.AntReferenceRenderer(myAntConfiguration));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:37,代码来源:RunWithAntBinding.java

示例6: AntInstallationRenderer

import com.intellij.lang.ant.config.impl.AntInstallation; //导入依赖的package包/类
public AntInstallationRenderer(PropertiesEditor<AntInstallation> editor) {
  myEditor = editor != null ? editor : new PropertiesEditor<AntInstallation>(){
    public AbstractProperty.AbstractPropertyContainer getProperties(AntInstallation antInstallation) {
      return antInstallation.getProperties();
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:AntUIUtil.java

示例7: customizeReference

import com.intellij.lang.ant.config.impl.AntInstallation; //导入依赖的package包/类
public static void customizeReference(AntReference antReference, SimpleColoredComponent component, GlobalAntConfiguration configuration) {
  AntInstallation antInstallation = antReference.find(configuration);
  if (antInstallation != null) customizeAnt(antInstallation.getProperties(), component);
  else {
    component.setIcon(PlatformIcons.INVALID_ENTRY_ICON);
    component.append(antReference.getName(), SimpleTextAttributes.ERROR_ATTRIBUTES);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:AntUIUtil.java

示例8: customizeAnt

import com.intellij.lang.ant.config.impl.AntInstallation; //导入依赖的package包/类
public static void customizeAnt(AbstractProperty.AbstractPropertyContainer antProperties, SimpleColoredComponent component) {
  component.setIcon(AntIcons.AntInstallation);
  String name = AntInstallation.NAME.get(antProperties);
  component.append(name, SimpleTextAttributes.REGULAR_ATTRIBUTES);
  String versionString = AntInstallation.VERSION.get(antProperties);
  if (name.indexOf(versionString) == -1)
    component.append(" (" + versionString + ")", SimpleTextAttributes.SYNTHETIC_ATTRIBUTES);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:AntUIUtil.java

示例9: showDialog

import com.intellij.lang.ant.config.impl.AntInstallation; //导入依赖的package包/类
@Nullable
public AntInstallation showDialog(JComponent parent) {
  final DialogWrapper dialog = new MyDialog(parent);
  if (!dialog.showAndGet()) {
    return null;
  }

  apply();
  return myForm.getSelectedAnt();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:AntSetPanel.java

示例10: applyModifications

import com.intellij.lang.ant.config.impl.AntInstallation; //导入依赖的package包/类
public void applyModifications() {
  if (myCurrent != null) myBinding.apply(getProperties(myCurrent));
  ArrayList<AbstractProperty> properties = new ArrayList<AbstractProperty>();
  myBinding.addAllPropertiesTo(properties);
  for (AntInstallation ant : myWorkingProperties.keySet()) {
    EditPropertyContainer container = myWorkingProperties.get(ant);
    container.apply();
  }
  myGlobalWorkingProperties.apply();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:AntSetPanel.java

示例11: getProperties

import com.intellij.lang.ant.config.impl.AntInstallation; //导入依赖的package包/类
public EditPropertyContainer getProperties(AntInstallation ant) {
  EditPropertyContainer properties = myWorkingProperties.get(ant);
  if (properties != null) return properties;
  properties = new EditPropertyContainer(myGlobalWorkingProperties, ant.getProperties());

  myWorkingProperties.put(ant, properties);
  return properties;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:AntSetPanel.java

示例12: create

import com.intellij.lang.ant.config.impl.AntInstallation; //导入依赖的package包/类
public AntInstallation create() {
  FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
  VirtualFile file = FileChooser.chooseFile(descriptor, myParent, null, null);
  if (file == null) return null;
  try {
    final AntInstallation inst = AntInstallation.fromHome(file.getPresentableUrl());
    adjustName(inst);
    return inst;
  }
  catch (AntInstallation.ConfigurationException e) {
    Messages.showErrorDialog(myParent, e.getMessage(), AntBundle.message("ant.setup.dialog.title"));
    return null;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:AntSetPanel.java

示例13: doOKAction

import com.intellij.lang.ant.config.impl.AntInstallation; //导入依赖的package包/类
protected void doOKAction() {
  final Set<String> names = new HashSet<String>();
  final ListModel model = myForm.getAntsList().getModel();
  for (int idx = 0; idx  < model.getSize(); idx++) {
    final AntInstallation inst = (AntInstallation)model.getElementAt(idx);
    final String name = AntInstallation.NAME.get(myForm.getProperties(inst));
    if (names.contains(name)) {
      Messages.showErrorDialog("Duplicate ant installation name: \"" + name+ "\"", getTitle());
      return;
    }
    names.add(name);
  }
  
  super.doOKAction();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:AntSetPanel.java

示例14: customizeAnt

import com.intellij.lang.ant.config.impl.AntInstallation; //导入依赖的package包/类
public static void customizeAnt(AbstractProperty.AbstractPropertyContainer antProperties, SimpleColoredComponent component) {
  component.setIcon(AllIcons.Ant.AntInstallation);
  String name = AntInstallation.NAME.get(antProperties);
  component.append(name, SimpleTextAttributes.REGULAR_ATTRIBUTES);
  String versionString = AntInstallation.VERSION.get(antProperties);
  if (name.indexOf(versionString) == -1)
    component.append(" (" + versionString + ")", SimpleTextAttributes.SYNTHETIC_ATTRIBUTES);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:9,代码来源:AntUIUtil.java

示例15: showDialog

import com.intellij.lang.ant.config.impl.AntInstallation; //导入依赖的package包/类
@Nullable
public AntInstallation showDialog(JComponent parent) {
  final DialogWrapper dialog = new MyDialog(parent);
  dialog.show();
  if (!dialog.isOK()) {
    return null;
  }
  
  apply();
  return myForm.getSelectedAnt();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:12,代码来源:AntSetPanel.java


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