示例#1
0
 public static <T extends SdkType> T findInstance(final Class<T> sdkTypeClass) {
   for (SdkType sdkType : Extensions.getExtensions(EP_NAME)) {
     if (sdkTypeClass.equals(sdkType.getClass())) {
       //noinspection unchecked
       return (T) sdkType;
     }
   }
   assert false;
   return null;
 }
示例#2
0
  @Override
  public void setupSdkPaths(Sdk sdk) {
    final SdkModificator modificator = sdk.getSdkModificator();

    SdkAdditionalData data = sdk.getSdkAdditionalData();
    if (data == null) {
      data = DartSdkUtil.testDartSdk(sdk.getHomePath());
      modificator.setSdkAdditionalData(data);
    }

    DartSdkUtil.setupSdkPaths(sdk.getHomeDirectory(), modificator);

    modificator.commitChanges();
    super.setupSdkPaths(sdk);
  }
 public static GoSdkType getInstance() {
   return SdkType.findInstance(GoSdkType.class);
 }
示例#4
0
 public static DartSdkType getInstance() {
   return SdkType.findInstance(DartSdkType.class);
 }
 public static AndroidSdkType getInstance() {
   return SdkType.findInstance(AndroidSdkType.class);
 }