本文整理汇总了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;
}
示例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);
}
}
示例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;
}
示例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));
}
示例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();
}
};
}
示例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);
}
}
示例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);
}
示例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();
}
示例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();
}
示例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;
}
示例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;
}
}
示例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();
}
示例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);
}
示例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();
}