use of com.intellij.flex.model.bc.ComponentSet in project intellij-plugins by JetBrains.
the class DependenciesConfigurable method updateSdkEntries.
private void updateSdkEntries(DefaultMutableTreeNode sdkNode, Sdk sdk) {
sdkNode.removeAllChildren();
ComponentSet componentSet = (ComponentSet) myComponentSetCombo.getSelectedItem();
String targetPlayer = (String) myTargetPlayerCombo.getSelectedItem();
for (String url : sdk.getRootProvider().getUrls(OrderRootType.CLASSES)) {
final String swcPath = VirtualFileManager.extractPath(StringUtil.trimEnd(url, JarFileSystem.JAR_SEPARATOR));
LinkageType linkageType = FlexCommonUtils.getSdkEntryLinkageType(sdk.getHomePath(), swcPath, myNature, targetPlayer, componentSet);
if (linkageType == null) {
// this swc is not applicable
continue;
}
if (linkageType == LinkageType.Default) {
linkageType = (LinkageType) myFrameworkLinkageCombo.getSelectedItem();
if (linkageType == LinkageType.Default) {
linkageType = FlexCommonUtils.getDefaultFrameworkLinkage(sdk.getVersionString(), myNature);
}
}
SdkEntryItem item = new SdkEntryItem(FileUtil.toSystemDependentName(swcPath), linkageType);
sdkNode.add(new DefaultMutableTreeNode(item, false));
}
}
use of com.intellij.flex.model.bc.ComponentSet in project intellij-plugins by JetBrains.
the class DependenciesConfigurable method updateComponentSetCombo.
private void updateComponentSetCombo() {
updateControls();
final Sdk sdk = mySdkCombo.getSelectedJdk();
if (sdk != null && myComponentSetCombo.isVisible()) {
final Object selectedItem = myComponentSetCombo.getSelectedItem();
final ComponentSet[] values = StringUtil.compareVersionNumbers(sdk.getVersionString(), "4.5") >= 0 ? ComponentSet.values() : new ComponentSet[] { ComponentSet.SparkAndMx, ComponentSet.MxOnly };
myComponentSetCombo.setModel(new DefaultComboBoxModel(values));
myComponentSetCombo.setSelectedItem(selectedItem);
}
}
Aggregations