Package com.intellij.openapi.projectRoots

Examples of com.intellij.openapi.projectRoots.Sdk


                    GoSdkType goSdkType = GoSdkType.getInstance();
                    if (goSdkType.getSdkData() == null) {
                        goSdkType.setSdkData(sdkData);
                    }

                    Sdk existingSdk = ProjectJdkTable.getInstance().findJdk(goSdkType.getSdkLongName());

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

                        String newSdkName = SdkConfigurationUtil.createUniqueSdkName(goSdkType, sdkData.GO_GOROOT_PATH, Arrays.asList(jdkTable.getAllJdks()));
View Full Code Here


                    GoAppEngineSdkType gaeSdkType = GoAppEngineSdkType.getInstance();
                    if (gaeSdkType.getSdkData() == null) {
                        gaeSdkType.setSdkData(sdkData);
                    }

                    Sdk existingSdk = ProjectJdkTable.getInstance().findJdk(gaeSdkType.getSdkLongName());

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

                        String newSdkName = SdkConfigurationUtil.createUniqueSdkName(gaeSdkType, sdkData.SDK_HOME_PATH, Arrays.asList(jdkTable.getAllJdks()));
View Full Code Here

        Module module = projectFileIndex.getModuleForFile(virtualFile);
        if (module == null) {
            return LookupElement.EMPTY_ARRAY;
        }

        Sdk sdk = GoSdkUtil.getGoogleGoSdkForModule(module);
        if (sdk == null) {
            return LookupElement.EMPTY_ARRAY;
        }

        Set<String> completions = new HashSet<String>();
        VirtualFile roots[] = sdk.getRootProvider().getFiles(OrderRootType.CLASSES);

        for (VirtualFile root : roots) {

            CommonProcessors.CollectUniquesProcessor<VirtualFile> processor = new CommonProcessors.CollectUniquesProcessor<VirtualFile>() {
                @Override
View Full Code Here

    @NotNull
    public static GoNamesCache getInstance(Project project) {
        // Not using a singleton here; calls should faily inexpensive and most of the data is now static;
        // only the call to ProjectRootManager.getInstance(project).getProjectSdk() does any work on construction.
        if (sdkData == null) {
            Sdk sdk = GoSdkUtil.getGoogleGoSdkForProject(project);
            if (sdk != null) {
                sdkData = (GoSdkData)sdk.getSdkAdditionalData();
            }
        }
        return new GoNamesCache(project);
    }
View Full Code Here

    public static Sdk getGoogleGoSdkForModule(Module module) {

        ModuleRootModel moduleRootModel = ModuleRootManager.getInstance(module);

        Sdk sdk;
        if (!moduleRootModel.isSdkInherited()) {
            sdk = moduleRootModel.getSdk();
        } else {
            sdk = ProjectRootManager.getInstance(module.getProject())
                    .getProjectSdk();
View Full Code Here

        return null;
    }

    public static Sdk getGoogleGoSdkForProject(Project project) {

        Sdk sdk = ProjectRootManager.getInstance(project).getProjectSdk();

        if (GoSdkType.isInstance(sdk)) {
            return sdk;
        }
View Full Code Here

        return null;
    }

    public static Sdk getGoogleGAESdkForProject(Project project) {

        Sdk sdk = ProjectRootManager.getInstance(project).getProjectSdk();

        if (GoAppEngineSdkType.isInstance(sdk)) {
            return sdk;
        }
View Full Code Here

        return "/usr/lib/go_appengine";
    }

    @Nullable
    public static Sdk getProjectSdk(Project project){
        Sdk sdk = GoSdkUtil.getGoogleGoSdkForProject(project);
        if (sdk != null) {
            return sdk;
        }

        return GoSdkUtil.getGoogleGAESdkForProject(project);
View Full Code Here

        }

        Project project = e.getProject();

        if( project != null ) {
            Sdk sdk = ProjectRootManager.getInstance(project).getProjectSdk();
            e.getPresentation().setVisible(debugEnabled && sdk != null && sdk.getSdkType() instanceof GoSdkType);
        }
    }
View Full Code Here

            return;
        }

        Project project = e.getProject();
        if ( project != null ) {
            Sdk sdk = ProjectRootManager.getInstance(project).getProjectSdk();
            e.getPresentation().setVisible(debugEnabled && sdk != null && sdk.getSdkType() instanceof GoAppEngineSdkType);
        }
    }
View Full Code Here

TOP

Related Classes of com.intellij.openapi.projectRoots.Sdk

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.