Package org.erlide.engine.model.root

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


    _builder.append("something.");
    _builder.newLine();
    _builder.append("{erl_opts, [{src_dirs, [\"src1\", \"src2\"]}]}.");
    _builder.newLine();
    final String input = _builder.toString();
    final ErlangProjectProperties actual = this.configurator.decodeConfig(input);
    Collection<IPath> _sourceDirs = actual.getSourceDirs();
    Path _path = new Path("src1");
    Path _path_1 = new Path("src2");
    Matcher<Iterable<? extends IPath>> _contains = Matchers.<IPath>contains(
      ((IPath) _path),
      ((IPath) _path_1));
View Full Code Here


    _builder.append("{erl_opts, [{i, \"inc2\"}]}.");
    _builder.newLine();
    _builder.append("{erl_opts, [{src_dirs, [\"src3\", \"src4\"]}]}.");
    _builder.newLine();
    final String input = _builder.toString();
    final ErlangProjectProperties actual = this.configurator.decodeConfig(input);
    Collection<IPath> _includeDirs = actual.getIncludeDirs();
    Path _path = new Path("inc1");
    Path _path_1 = new Path("inc2");
    Matcher<Iterable<? extends IPath>> _contains = Matchers.<IPath>contains(
      ((IPath) _path),
      ((IPath) _path_1));
    MatcherAssert.<Collection<IPath>>assertThat(_includeDirs, _contains);
    Collection<IPath> _sourceDirs = actual.getSourceDirs();
    Path _path_2 = new Path("src3");
    Path _path_3 = new Path("src4");
    Matcher<Iterable<? extends IPath>> _contains_1 = Matchers.<IPath>contains(
      ((IPath) _path_2),
      ((IPath) _path_3));
View Full Code Here

        return getRawConfig(new File(filePath));
    }

    private ErlangProjectProperties getRawConfig(final File confFile) {
        ErlangProjectProperties result = null;
        try {
            final Charset coding = ErlangContentDescriber.detectCodingForFile(confFile);
            final List<String> confString = Files.readLines(confFile, coding);
            if (confString != null) {
                final String content = Joiner.on("\n").join(confString);
View Full Code Here

    private ErlangProjectProperties model;

    public ErlangProjectPropertyPage() {
        super();
        // noDefaultAndApplyButton();
        model = new ErlangProjectProperties();
    }
View Full Code Here

        children.add(external);
    }

    // TODO externals
    private void addExternals(final List<IErlElement> children) {
        final ErlangProjectProperties myProperties = getProperties();
        final String externalIncludes = myProperties.getExternalIncludes();
        final String externalModules = myProperties.getExternalModules();
        final Collection<IPath> includeDirs = myProperties.getIncludeDirs();
        final List<String> projectIncludes = Lists.newArrayList();
        for (final IPath path : includeDirs) {
            if (path.isAbsolute() && !fProject.getLocation().isPrefixOf(path)) {
                final Collection<String> includes = ErlangEngine.getInstance()
                        .getService(OpenService.class)
View Full Code Here

        return configType;
    }

    private ErlangProjectProperties loadProperties() {
        final IProjectConfigurator builderConfig = getConfigurator();
        final ErlangProjectProperties config = builderConfig
                .getConfiguration(getWorkspaceProject().getLocation());
        return config;
    }
View Full Code Here

        // }
        try {
            initializeBuilder(notifier);

            // TODO validate source and include directories
            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);
                } catch (final CoreException e) {
                    // ignore it
                }
            }

            if (delta != null && delta.getAffectedChildren().length != 0) {
                handleAppFile(project, project.getLocation().toPortableString() + "/"
                        + out, properties.getSourceDirs());
            }
            handleErlangFiles(erlProject, project, kind, delta, notifier);
        } catch (final OperationCanceledException e) {
            if (BuilderHelper.isDebugging()) {
                ErlLogger.debug("Build of " + project.getName() + " was canceled.");
View Full Code Here

public class ErlProjectPropertiesTests {

    @Test
    public void defaultValuesTest() {
        final ErlangProjectProperties p = new ErlangProjectProperties();
        assertThat(p.getOutputDir(), is((IPath) new Path("")));
        assertThat(p.getSourceDirs(), is(empty()));
        assertThat(p.getIncludeDirs(), is(empty()));
    }
View Full Code Here

        assertThat(p.getIncludeDirs(), is(empty()));
    }

    @Test
    public void equalsTest() {
        final ErlangProjectProperties p1 = new ErlangProjectProperties();
        final ErlangProjectProperties p2 = new ErlangProjectProperties();
        assertThat(p2, is(ErlangProjectPropertiesMatcher.sameAs(p1)));
    }
View Full Code Here

      } else {
        boolean _hasNature = project.hasNature(IErlProject.NATURE_ID);
        _and = _hasNature;
      }
      if (_and) {
        ErlangProjectProperties _projectProperties = this.getProjectProperties(project);
        ErlProject _erlProject = new ErlProject(this, project, _projectProperties);
        erlProjects.add(_erlProject);
      }
    }
    body.setChildren(((IHandle[])Conversions.unwrapArray(erlProjects, IHandle.class)));
View Full Code Here

TOP

Related Classes of org.erlide.engine.model.root.ErlangProjectProperties

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.