Package protobuf.settings.facet

Examples of protobuf.settings.facet.ProtobufFacetConfiguration


    @Override
    public void setupFacet(@NotNull final PbFacet facet, final ModifiableRootModel model) {
        final PbFacet localFacet = facet;
        final Module module = facet.getModule();
        final Project project = module.getProject();
        final ProtobufFacetConfiguration config = facet.getConfiguration();
        ProtobufFacetConfiguration defaultConfiguration = (ProtobufFacetConfiguration)ProjectFacetManager.getInstance(project).createDefaultConfiguration(facet.getType());
        config.setIsCompilationEnabled(defaultConfiguration.isCompilationEnabled());
        if (StringUtil.isEmpty(config.getCompilerOutputPath())) {
            if (!StringUtil.isEmpty(defaultConfiguration.getCompilerOutputPath())) {
                config.setCompilerOutputPath(defaultConfiguration.getCompilerOutputPath());
            } else {
                final String text = PbBundle.message("facet.protobuf.configuration.missing_output_dir", module.getName());
                NotificationGroup ng = NotificationGroup.balloonGroup("Framework Detection");
                ng.createNotification("Framework configuration incomplete", text, NotificationType.INFORMATION, new NotificationListener() {
                    @Override
View Full Code Here


        return getInstance(module);
    }

    @Override
    public void initFacet() {
        ProtobufFacetConfiguration configuration = getConfiguration();
        String path = configuration.getCompilerOutputPath();
        if (!StringUtil.isEmpty(path)) {
            compilerOutputWatchRequest = LocalFileSystem.getInstance().addRootToWatch(path, true);
        }
    }
View Full Code Here

    public PbFacetType(@NotNull FacetTypeId<PbFacet> protobufFacetFacetTypeId, @NotNull String stringId, @NotNull String presentableName) {
        super(protobufFacetFacetTypeId, stringId, presentableName);
    }

    public ProtobufFacetConfiguration createDefaultConfiguration() {
        return new ProtobufFacetConfiguration();
    }
View Full Code Here

        // Force the Virtual files to refresh so generated the module sources will be available to the project and to the UI.
        for (Module module : modulesToRefresh) {
            final PbFacet facet = PbFacet.getInstance(module);
            if (facet != null) {
                ProtobufFacetConfiguration config = facet.getConfiguration();
                if (config.isCompilationEnabled()) {
                    File outputPathFile = new File(facet.getConfiguration().getCompilerOutputPath());
                    CompilerUtil.refreshIOFile(outputPathFile);

                    // Refresh the source root corresponding to the output source path.
                    VirtualFile outputDirectory = LocalFileSystem.getInstance().findFileByIoFile(outputPathFile);
View Full Code Here

TOP

Related Classes of protobuf.settings.facet.ProtobufFacetConfiguration

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.