use of com.intellij.lang.javascript.flex.sdk.FlexmojosSdkAdditionalData in project intellij-plugins by JetBrains.
the class Flexmojos3ImporterTest method checkFlexmojosSdkClasspath.
private static void checkFlexmojosSdkClasspath(final String sdkVersion, final String[] expectedPaths) {
final Sdk sdk = ProjectJdkTable.getInstance().findJdk("Flexmojos SDK " + sdkVersion);
assertNotNull(sdk);
assertInstanceOf(sdk.getSdkType(), FlexmojosSdkType.class);
final SdkAdditionalData additionalData = sdk.getSdkAdditionalData();
assertInstanceOf(additionalData, FlexmojosSdkAdditionalData.class);
final Collection<String> classpath = ((FlexmojosSdkAdditionalData) additionalData).getFlexCompilerClasspath();
assertSameElements(classpath, expectedPaths);
}
use of com.intellij.lang.javascript.flex.sdk.FlexmojosSdkAdditionalData in project intellij-plugins by JetBrains.
the class Flexmojos3Configurator method ensureSdkHasRequiredAdditionalJarPaths.
private void ensureSdkHasRequiredAdditionalJarPaths(@NotNull final Sdk sdk) {
assert sdk.getSdkType() instanceof FlexmojosSdkType;
final FlexmojosSdkAdditionalData additionalData = ((FlexmojosSdkAdditionalData) sdk.getSdkAdditionalData());
assert additionalData != null;
for (MavenId dependency : myFlexmojosPlugin.getDependencies()) {
if (StringUtil.isEmpty(dependency.getArtifactId()))
continue;
for (Pattern jarNamePattern : ADDITIONAL_JAR_NAME_PATTERNS_TO_INCLUDE_IN_FLEXMOJOS_SDK_CLASSPATH) {
if (jarNamePattern.matcher(dependency.getArtifactId()).matches()) {
final String jarFilePath = getArtifactFilePath(myMavenProject, dependency, MavenConstants.TYPE_JAR);
additionalData.addFlexCompilerClasspathEntryIfNotPresentAndRemoveDifferentVersionOfThisJar(jarNamePattern, jarFilePath);
break;
}
}
}
}
Aggregations