Package com.intellij.openapi.projectRoots.impl

Examples of com.intellij.openapi.projectRoots.impl.ProjectJdkImpl


                    if (existingSdk == null) {
                        ProjectJdkTable jdkTable = ProjectJdkTable.getInstance();

                        String newSdkName = SdkConfigurationUtil.createUniqueSdkName(goSdkType, sdkData.GO_GOROOT_PATH, Arrays.asList(jdkTable.getAllJdks()));
                        ProjectJdkImpl goSdk = new ProjectJdkImpl(newSdkName, goSdkType);

                        goSdk.setHomePath(goRootPath);

                        goSdkType.setupSdkPaths(goSdk);
                        jdkTable.addJdk(goSdk);

                        ProjectRootManager.getInstance(project).setProjectSdk(goSdk);
View Full Code Here


                    if (existingSdk == null) {
                        ProjectJdkTable jdkTable = ProjectJdkTable.getInstance();

                        String newSdkName = SdkConfigurationUtil.createUniqueSdkName(gaeSdkType, sdkData.SDK_HOME_PATH, Arrays.asList(jdkTable.getAllJdks()));
                        ProjectJdkImpl goSdk = new ProjectJdkImpl(newSdkName, gaeSdkType);

                        goSdk.setHomePath(goRootPath);

                        gaeSdkType.setupSdkPaths(goSdk);
                        jdkTable.addJdk(goSdk);

                        ProjectRootManager.getInstance(project).setProjectSdk(goSdk);
View Full Code Here

            return;
        }

        LOG.info("We have a bundled go sdk (at " + homePath + ") that is not in the jdk table. Attempting to add");
        try {
            final ProjectJdkImpl bundledGoSdk;
            final GoSdkType goSdkType = GoSdkType.getInstance();

            goSdkType.setSdkData(sdkData);
            String newSdkName = SdkConfigurationUtil.createUniqueSdkName(goSdkType, sdkData.GO_GOROOT_PATH, Arrays.asList(jdkTable.getAllJdks()));
            bundledGoSdk = new ProjectJdkImpl(newSdkName, goSdkType);
            bundledGoSdk.setHomePath(homePath);
            ApplicationManager.getApplication().runWriteAction(new Runnable() {
                @Override
                public void run() {
                    goSdkType.setupSdkPaths(bundledGoSdk);
                    jdkTable.addJdk(bundledGoSdk);
View Full Code Here

  @VisibleForTesting
  @NotNull
  public static Sdk createMockSdk(@NotNull String sdkHome) {
    String release = getReleaseString(sdkHome);
    Sdk sdk = new ProjectJdkImpl(release, getInstance());
    SdkModificator sdkModificator = sdk.getSdkModificator();
    sdkModificator.setHomePath(sdkHome);
    sdkModificator.setVersionString(release); // must be set after home path, otherwise setting home path clears the version string
    sdkModificator.commitChanges();
    configureSdkPaths(sdk);
    return sdk;
View Full Code Here

TOP

Related Classes of com.intellij.openapi.projectRoots.impl.ProjectJdkImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.