Examples of ErlangProjectProperties


Examples of org.erlide.engine.model.root.ErlangProjectProperties

        final IEclipsePreferences node = new ProjectScope(wproject)
                .getNode("org.erlide.model");
        node.put(ProjectPreferencesConstants.OUTPUT_DIR, expected);
        node.flush();

        final ErlangProjectProperties pp = project.getProperties();
        final String actual = pp.getOutputDir().toPortableString();

        assertThat(actual, is(expected));
    }
View Full Code Here

Examples of org.erlide.engine.model.root.ErlangProjectProperties

    public void configCanBeParsed() throws CoreException {
        project.setConfigType(ProjectConfigType.EMAKE);
        final IProjectConfigurator config = ProjectConfiguratorFactory.getDefault()
                .getConfig(project.getConfigType(), project);

        final ErlangProjectProperties expected = ErlangProjectProperties.DEFAULT;
        final ErlangProjectProperties actual = config.getConfiguration(project
                .getWorkspaceProject().getLocation());

        assertThat(actual, is(ErlangProjectPropertiesMatcher.sameAs(expected)));
    }
View Full Code Here

Examples of org.erlide.engine.model.root.ErlangProjectProperties

      moduleName = _importModule;
      IErlangEngine _instance_1 = ErlangEngine.getInstance();
      OpenService _service = _instance_1.<OpenService>getService(OpenService.class);
      IResource _resource = module.getResource();
      OtpErlangList _pathVars = model.getPathVars(_resource);
      ErlangProjectProperties _properties = erlProject.getProperties();
      String _externalModules = _properties.getExternalModules();
      OtpErlangObject _sourceFromModule = _service.getSourceFromModule(_pathVars, moduleName, _externalModules);
      res2 = _sourceFromModule;
    }
    if ((res2 instanceof OtpErlangString)) {
      boolean _tripleNotEquals_2 = (moduleName != null);
View Full Code Here

Examples of org.erlide.engine.model.root.ErlangProjectProperties

        final IProjectConfigurator persister = ProjectConfiguratorFactory.getDefault()
                .getConfig(project.getConfigType(), project);
        final ProjectConfigurationSerializer configurator = ((FileProjectConfigurator) persister)
                .getSerializer();

        final ErlangProjectProperties expected = new ErlangProjectProperties();
        expected.copyFrom(ErlangProjectProperties.DEFAULT);
        final ErlangProjectProperties actual = configurator.decodeConfig("");

        assertThat(actual, is(ErlangProjectPropertiesMatcher.sameAs(expected)));
    }
View Full Code Here

Examples of org.erlide.engine.model.root.ErlangProjectProperties

        final String config1 = config + "{erl_opts, [{i, \"myinclude\"}, "
                + "{src_dirs, [\"src\", \"src2\"]}]}.";
        setFileContent(cfgFile, config1);

        final ErlangProjectProperties p2 = project.getProperties();

        final Collection<IPath> actualSources = p2.getSourceDirs();
        assertThat(actualSources, hasSize(2));
        assertThat(actualSources, hasItem(new Path("src2")));

        final Collection<IPath> actualIncludes = p2.getIncludeDirs();
        assertThat(actualIncludes, hasSize(1));
        assertThat(actualIncludes, hasItem(new Path("myinclude")));
    }
View Full Code Here

Examples of org.erlide.engine.model.root.ErlangProjectProperties

    String _portableString = path.toPortableString();
    final IErlProject erlProject = _model.newProject(name, _portableString);
    BuilderProperties _builderProperties = erlProject.getBuilderProperties();
    _builderProperties.setBuilderTool(BuilderTool.INTERNAL);
    final IProject project = erlProject.getWorkspaceProject();
    final ErlangProjectProperties prefs = erlProject.getProperties();
    final ArrayList<IPath> srcDirs = new ArrayList<IPath>();
    Path _path = new Path("src");
    srcDirs.add(_path);
    prefs.setSourceDirs(srcDirs);
    this.buildPaths(project, srcDirs);
    final ArrayList<IPath> includeDirs = new ArrayList<IPath>();
    Path _path_1 = new Path("include");
    includeDirs.add(_path_1);
    this.buildPaths(project, includeDirs);
    prefs.setIncludeDirs(includeDirs);
    final Path ebinDir = new Path("ebin");
    ArrayList<IPath> _newArrayList = Lists.<IPath>newArrayList(ebinDir);
    this.buildPaths(project, _newArrayList);
    prefs.setOutputDir(ebinDir);
    erlProject.open(null);
    return erlProject;
  }
View Full Code Here

Examples of org.erlide.engine.model.root.ErlangProjectProperties

    private void do_build(final BuildKind kind, final IProject project,
            final IErlProject erlProject, final BuildNotifier notifier)
            throws BackendException {

        final ErlangProjectProperties properties = erlProject.getProperties();
        final IPath out = properties.getOutputDir();
        final IResource outr = project.findMember(out);
        if (outr != null) {
            try {
                outr.setDerived(true, null);
                outr.refreshLocal(IResource.DEPTH_ZERO, null);
View Full Code Here

Examples of org.erlide.engine.model.root.ErlangProjectProperties

public class BuilderUtils {
  public static OtpErlangObject createProjectInfo(final IErlProject project) {
    try {
      OtpErlangObject _xblockexpression = null;
      {
        final ErlangProjectProperties props = project.getProperties();
        IProject _workspaceProject = project.getWorkspaceProject();
        IPath _location = _workspaceProject.getLocation();
        final String rootDir = _location.toPortableString();
        final Collection<IPath> srcDirs = props.getSourceDirs();
        final Collection<IPath> incDirs = props.getIncludeDirs();
        final IPath outDir = props.getOutputDir();
        IProject _workspaceProject_1 = project.getWorkspaceProject();
        final OtpErlangList opts = CompilerOptions.get(_workspaceProject_1);
        RuntimeVersion _requiredRuntimeVersion = props.getRequiredRuntimeVersion();
        final RuntimeVersion minOtpVsn = _requiredRuntimeVersion.asMajor();
        final Collection<String> libs = CollectionLiterals.<String>newArrayList();
        final Collection<String> libIncs = CollectionLiterals.<String>newArrayList();
        File _createTempDir = Files.createTempDir();
        final String tmpDir = _createTempDir.getAbsolutePath();
View Full Code Here

Examples of org.erlide.engine.model.root.ErlangProjectProperties

  public String encodeConfig(final ErlangProjectProperties info) {
    return null;
  }
 
  public ErlangProjectProperties decodeConfig(final String config) {
    ErlangProjectProperties _xblockexpression = null;
    {
      final ErlangProjectProperties result = new ErlangProjectProperties();
      Path _path = new Path("ebin");
      result.setOutputDir(_path);
      IErlangEngine _instance = ErlangEngine.getInstance();
      SimpleParserService _simpleParserService = _instance.getSimpleParserService();
      final List<OtpErlangObject> content = _simpleParserService.parse(config);
      boolean _isEmpty = content.isEmpty();
      if (_isEmpty) {
        result.copyFrom(ErlangProjectProperties.DEFAULT);
        return result;
      }
      final Procedure1<OtpErlangObject> _function = new Procedure1<OtpErlangObject>() {
        public void apply(final OtpErlangObject erl_opts) {
          try {
            final Bindings bindings = OtpErlang.match("{erl_opts,Opts}", erl_opts);
            boolean _tripleNotEquals = (bindings != null);
            if (_tripleNotEquals) {
              final Collection<OtpErlangObject> opts = bindings.getList("Opts");
              boolean _tripleNotEquals_1 = (opts != null);
              if (_tripleNotEquals_1) {
                final Procedure1<OtpErlangObject> _function = new Procedure1<OtpErlangObject>() {
                  public void apply(final OtpErlangObject opt) {
                    try {
                      final Bindings b = OtpErlang.match("{Tag,Arg}", opt);
                      boolean _tripleNotEquals = (b != null);
                      if (_tripleNotEquals) {
                        RebarConfigurationSerializer.this.parseOption(result, b);
                      }
                    } catch (Throwable _e) {
                      throw Exceptions.sneakyThrow(_e);
                    }
                  }
                };
                IterableExtensions.<OtpErlangObject>forEach(opts, _function);
              }
            }
          } catch (Throwable _e) {
            throw Exceptions.sneakyThrow(_e);
          }
        }
      };
      IterableExtensions.<OtpErlangObject>forEach(content, _function);
      boolean _and = false;
      Collection<IPath> _sourceDirs = result.getSourceDirs();
      boolean _isEmpty_1 = _sourceDirs.isEmpty();
      if (!_isEmpty_1) {
        _and = false;
      } else {
        Collection<IPath> _includeDirs = result.getIncludeDirs();
        boolean _isEmpty_2 = _includeDirs.isEmpty();
        _and = _isEmpty_2;
      }
      if (_and) {
        result.copyFrom(ErlangProjectProperties.DEFAULT);
      }
      _xblockexpression = result;
    }
    return _xblockexpression;
  }
View Full Code Here

Examples of org.erlide.engine.model.root.ErlangProjectProperties

  public String encodeConfig(final ErlangProjectProperties info) {
    return null;
  }
 
  public ErlangProjectProperties decodeConfig(final String config) {
    ErlangProjectProperties _xblockexpression = null;
    {
      final ErlangProjectProperties result = new ErlangProjectProperties();
      Path _path = new Path("ebin");
      result.setOutputDir(_path);
      result.setSourceDirs();
      IErlangEngine _instance = ErlangEngine.getInstance();
      SimpleParserService _simpleParserService = _instance.getSimpleParserService();
      final List<OtpErlangObject> content = _simpleParserService.parse(config);
      boolean _isEmpty = content.isEmpty();
      if (_isEmpty) {
        return result;
      }
      final Procedure1<OtpErlangObject> _function = new Procedure1<OtpErlangObject>() {
        public void apply(final OtpErlangObject erl_opts) {
          try {
            final Bindings bindings = OtpErlang.match("{Src,Opts}", erl_opts);
            boolean _tripleNotEquals = (bindings != null);
            if (_tripleNotEquals) {
              final String src = bindings.getAtom("Src");
              String _xifexpression = null;
              boolean _contains = src.contains("/");
              if (_contains) {
                String[] _split = src.split("/");
                _xifexpression = IterableExtensions.<String>head(((Iterable<String>)Conversions.doWrapArray(_split)));
              } else {
                _xifexpression = "src";
              }
              final String path = _xifexpression;
              Collection<IPath> _sourceDirs = result.getSourceDirs();
              final ArrayList<IPath> sd = new ArrayList<IPath>(_sourceDirs);
              Path _path = new Path(path);
              sd.add(_path);
              result.setSourceDirs(sd);
              final Collection<OtpErlangObject> opts = bindings.getList("Opts");
              boolean _tripleNotEquals_1 = (opts != null);
              if (_tripleNotEquals_1) {
                final Procedure1<OtpErlangObject> _function = new Procedure1<OtpErlangObject>() {
                  public void apply(final OtpErlangObject opt) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.